More verification of DCPs during tests.
[dcpomatic.git] / test / threed_test.cc
index 8b58e2bfb79c8b850d60998c78572dd58820f7e8..cda278a59702506a654392aaf3c4d8b8897723fd 100644 (file)
@@ -56,12 +56,10 @@ BOOST_AUTO_TEST_CASE (threed_test1)
        film->set_container (Ratio::from_id ("185"));
        film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TST"));
        film->set_three_d (true);
-       film->make_dcp ();
-       film->write_metadata ();
-
-       BOOST_REQUIRE (!wait_for_jobs ());
+       make_and_verify_dcp (film);
 }
 
+
 /** Basic sanity check of THREE_D_ALTERNATE; at the moment this is just to make sure
  *  that such a transcode completes without error.
  */
@@ -78,12 +76,10 @@ BOOST_AUTO_TEST_CASE (threed_test2)
        film->set_container (Ratio::from_id ("185"));
        film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TST"));
        film->set_three_d (true);
-       film->make_dcp ();
-       film->write_metadata ();
-
-       BOOST_REQUIRE (!wait_for_jobs ());
+       make_and_verify_dcp (film);
 }
 
+
 /** Basic sanity check of THREE_D_LEFT and THREE_D_RIGHT; at the moment this is just to make sure
  *  that such a transcode completes without error.
  */
@@ -100,12 +96,10 @@ BOOST_AUTO_TEST_CASE (threed_test3)
        R->video->set_frame_type (VideoFrameType::THREE_D_RIGHT);
 
        film->set_three_d (true);
-       film->make_dcp ();
-       film->write_metadata ();
-
-       BOOST_REQUIRE (!wait_for_jobs ());
+       make_and_verify_dcp (film);
 }
 
+
 BOOST_AUTO_TEST_CASE (threed_test4)
 {
        auto film = new_test_film2 ("threed_test4");
@@ -125,12 +119,10 @@ BOOST_AUTO_TEST_CASE (threed_test4)
        R->set_trim_end (dcpomatic::ContentTime::from_seconds(22));
 
        film->set_three_d (true);
-       film->make_dcp ();
-       film->write_metadata ();
-
-       BOOST_REQUIRE (!wait_for_jobs ());
+       make_and_verify_dcp (film, {dcp::VerificationNote::Code::INVALID_PICTURE_ASSET_RESOLUTION_FOR_3D});
 }
 
+
 BOOST_AUTO_TEST_CASE (threed_test5)
 {
        auto film = new_test_film2 ("threed_test5");
@@ -149,12 +141,10 @@ BOOST_AUTO_TEST_CASE (threed_test5)
        R->set_trim_end (dcpomatic::ContentTime::from_seconds(3 * 60 + 20));
 
        film->set_three_d (true);
-       film->make_dcp ();
-       film->write_metadata ();
-
-       BOOST_REQUIRE (!wait_for_jobs ());
+       make_and_verify_dcp (film, {dcp::VerificationNote::Code::INVALID_PICTURE_FRAME_RATE_FOR_2K});
 }
 
+
 BOOST_AUTO_TEST_CASE (threed_test6)
 {
        auto film = new_test_film2 ("threed_test6");
@@ -168,13 +158,11 @@ BOOST_AUTO_TEST_CASE (threed_test6)
        R->video->set_frame_type (VideoFrameType::THREE_D_RIGHT);
 
        film->set_three_d (true);
-       film->make_dcp ();
-       film->write_metadata ();
-
-       BOOST_REQUIRE (!wait_for_jobs());
+       make_and_verify_dcp (film);
        check_dcp ("test/data/threed_test6", film->dir(film->dcp_name()));
 }
 
+
 /** Check 2D content set as being 3D; this should give an informative error */
 BOOST_AUTO_TEST_CASE (threed_test7)
 {