diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-10-14 21:06:47 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-10-14 21:06:47 +0100 |
| commit | 009a58293bf2e9727d544d1a2648422cc395d81e (patch) | |
| tree | c581d457104195a0219a0197c523981756bf9ecd /test/test.cc | |
| parent | b5001080a3e5b414f6cad1c52926ed757f2d8574 (diff) | |
| parent | ade28a703b15af710161faa017cddf95d66c4118 (diff) | |
Merge branch 'subs'
Diffstat (limited to 'test/test.cc')
| -rw-r--r-- | test/test.cc | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/test/test.cc b/test/test.cc index c801d538e..aaa911b32 100644 --- a/test/test.cc +++ b/test/test.cc @@ -36,6 +36,7 @@ #include "server.h" #include "cross.h" #include "job.h" +#include "subtitle.h" #define BOOST_TEST_DYN_LINK #define BOOST_TEST_MODULE dvdomatic_test #include <boost/test/unit_test.hpp> @@ -248,7 +249,7 @@ BOOST_AUTO_TEST_CASE (paths_test) FilmState s; s.directory = "build/test/a/b/c/d/e"; s.thumbs.push_back (42); - BOOST_CHECK_EQUAL (s.thumb_file (0), "build/test/a/b/c/d/e/thumbs/00000042.tiff"); + BOOST_CHECK_EQUAL (s.thumb_file (0), "build/test/a/b/c/d/e/thumbs/00000042.png"); s.content = "/foo/bar/baz"; BOOST_CHECK_EQUAL (s.content_path(), "/foo/bar/baz"); @@ -269,8 +270,7 @@ do_remote_encode (shared_ptr<DCPVideoFrame> frame, ServerDescription* descriptio BOOST_AUTO_TEST_CASE (client_server_test) { - shared_ptr<SimpleImage> image (new SimpleImage (PIX_FMT_RGB24, Size (1998, 1080))); - image->set_line_size (0, 1998 * 3); + shared_ptr<Image> image (new SimpleImage (PIX_FMT_RGB24, Size (1998, 1080))); uint8_t* p = image->data()[0]; @@ -287,8 +287,11 @@ BOOST_AUTO_TEST_CASE (client_server_test) shared_ptr<DCPVideoFrame> frame ( new DCPVideoFrame ( image, + shared_ptr<Subtitle> (), Size (1998, 1080), 0, + 0, + 0, Scaler::from_id ("bicubic"), 0, 24, @@ -438,24 +441,9 @@ BOOST_AUTO_TEST_CASE (job_manager_test) dvdomatic_sleep (2); BOOST_CHECK_EQUAL (a->finished_ok(), true); - /* Two jobs, no dependency */ - a.reset (new TestJob (s, o, &log, shared_ptr<Job> ())); - shared_ptr<TestJob> b (new TestJob (s, o, &log, shared_ptr<Job> ())); - - JobManager::instance()->add (a); - JobManager::instance()->add (b); - dvdomatic_sleep (2); - BOOST_CHECK_EQUAL (a->running (), true); - BOOST_CHECK_EQUAL (b->running (), true); - a->set_finished_ok (); - b->set_finished_ok (); - dvdomatic_sleep (2); - BOOST_CHECK_EQUAL (a->finished_ok (), true); - BOOST_CHECK_EQUAL (b->finished_ok (), true); - /* Two jobs, dependency */ a.reset (new TestJob (s, o, &log, shared_ptr<Job> ())); - b.reset (new TestJob (s, o, &log, a)); + shared_ptr<TestJob> b (new TestJob (s, o, &log, a)); JobManager::instance()->add (a); JobManager::instance()->add (b); |
