diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-10-07 22:42:49 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-10-07 22:42:49 +0100 |
| commit | bed01a8e72f31e73ea8f206f9b18d5910416e0c2 (patch) | |
| tree | 7d8e4801075fc47cb5883e1ae2fff45733426144 /test | |
| parent | d9fd19336dcb823a5f0199adf41b37eb8d177f4d (diff) | |
Simple test to make sure a couple of simple make DCP jobs complete.
Diffstat (limited to 'test')
| -rw-r--r-- | test/test.cc | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/test/test.cc b/test/test.cc index 638d526e0..99781d1a2 100644 --- a/test/test.cc +++ b/test/test.cc @@ -315,3 +315,50 @@ BOOST_AUTO_TEST_CASE (client_server_test) (*i)->join (); } } + +BOOST_AUTO_TEST_CASE (make_dcp_test) +{ + string const test_film = "build/test/film2"; + + if (boost::filesystem::exists (test_film)) { + boost::filesystem::remove_all (test_film); + } + + Film film (test_film, false); + film.set_name ("test_film"); + film.set_content ("../../../test/test.mp4"); + film.examine_content (); + film.set_format (Format::from_ratio (185)); + film.set_dcp_content_type (DCPContentType::from_pretty_name ("Test")); + film.make_dcp (true); + + while (JobManager::instance()->work_to_do ()) { + sleep (1); + } + + BOOST_CHECK_EQUAL (JobManager::instance()->errors(), false); +} + +BOOST_AUTO_TEST_CASE (make_dcp_with_range_test) +{ + string const test_film = "build/test/film3"; + + if (boost::filesystem::exists (test_film)) { + boost::filesystem::remove_all (test_film); + } + + Film film (test_film, false); + film.set_name ("test_film"); + film.set_content ("../../../test/test.mp4"); + film.examine_content (); + film.set_format (Format::from_ratio (185)); + film.set_dcp_content_type (DCPContentType::from_pretty_name ("Test")); + film.set_dcp_frames (42); + film.make_dcp (true); + + while (JobManager::instance()->work_to_do ()) { + sleep (1); + } + + BOOST_CHECK_EQUAL (JobManager::instance()->errors(), false); +} |
