diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-01-22 12:16:21 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-01-22 12:16:21 +0100 |
| commit | 38c9cdda667210fa869d30d3335c3fb9f25773c4 (patch) | |
| tree | a841a6491c7e232a54b28a6b0551658c1f14682b | |
| parent | 42ff8a5202f7f6133fe0847c45a2d406ce617aa1 (diff) | |
c++11 tidying.
| -rw-r--r-- | test/no_use_video_test.cc | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/test/no_use_video_test.cc b/test/no_use_video_test.cc index 3bda3ccc4..e64a21621 100644 --- a/test/no_use_video_test.cc +++ b/test/no_use_video_test.cc @@ -42,6 +42,7 @@ using std::dynamic_pointer_cast; +using std::make_shared; using std::shared_ptr; @@ -50,9 +51,9 @@ using std::shared_ptr; */ BOOST_AUTO_TEST_CASE (no_use_video_test1) { - shared_ptr<Film> film = new_test_film2 ("no_use_video_test1"); - shared_ptr<Content> A = content_factory ("test/data/flat_red.png").front(); - shared_ptr<Content> B = content_factory ("test/data/flat_green.png").front(); + auto film = new_test_film2 ("no_use_video_test1"); + auto A = content_factory("test/data/flat_red.png").front(); + auto B = content_factory("test/data/flat_green.png").front(); film->examine_and_add_content (A); film->examine_and_add_content (B); BOOST_REQUIRE (!wait_for_jobs()); @@ -71,9 +72,9 @@ BOOST_AUTO_TEST_CASE (no_use_video_test1) /** Overlay two muxed sources and disable the video on one */ BOOST_AUTO_TEST_CASE (no_use_video_test2) { - shared_ptr<Film> film = new_test_film2 ("no_use_video_test2"); - shared_ptr<Content> A = content_factory (TestPaths::private_data() / "dolby_aurora.vob").front(); - shared_ptr<Content> B = content_factory (TestPaths::private_data() / "big_buck_bunny_trailer_480p.mov").front(); + auto film = new_test_film2 ("no_use_video_test2"); + auto A = content_factory (TestPaths::private_data() / "dolby_aurora.vob").front(); + auto B = content_factory (TestPaths::private_data() / "big_buck_bunny_trailer_480p.mov").front(); film->examine_and_add_content (A); film->examine_and_add_content (B); BOOST_REQUIRE (!wait_for_jobs()); @@ -92,10 +93,10 @@ BOOST_AUTO_TEST_CASE (no_use_video_test2) /** Make two DCPs and make a VF with the audio from one and the video from another */ BOOST_AUTO_TEST_CASE (no_use_video_test3) { - shared_ptr<Film> ov_a = new_test_film2 ("no_use_video_test3_ov_a"); - shared_ptr<Content> ov_a_pic = content_factory ("test/data/flat_red.png").front(); + auto ov_a = new_test_film2 ("no_use_video_test3_ov_a"); + auto ov_a_pic = content_factory("test/data/flat_red.png").front(); BOOST_REQUIRE (ov_a_pic); - shared_ptr<Content> ov_a_snd = content_factory ("test/data/sine_16_48_220_10.wav").front(); + auto ov_a_snd = content_factory("test/data/sine_16_48_220_10.wav").front(); BOOST_REQUIRE (ov_a_snd); ov_a->examine_and_add_content (ov_a_pic); ov_a->examine_and_add_content (ov_a_snd); @@ -103,10 +104,10 @@ BOOST_AUTO_TEST_CASE (no_use_video_test3) ov_a->make_dcp (); BOOST_REQUIRE (!wait_for_jobs()); - shared_ptr<Film> ov_b = new_test_film2 ("no_use_video_test3_ov_b"); - shared_ptr<Content> ov_b_pic = content_factory ("test/data/flat_green.png").front(); + auto ov_b = new_test_film2("no_use_video_test3_ov_b"); + auto ov_b_pic = content_factory("test/data/flat_green.png").front(); BOOST_REQUIRE (ov_b_pic); - shared_ptr<Content> ov_b_snd = content_factory ("test/data/sine_16_48_880_10.wav").front(); + auto ov_b_snd = content_factory("test/data/sine_16_48_880_10.wav").front(); BOOST_REQUIRE (ov_b_snd); ov_b->examine_and_add_content (ov_b_pic); ov_b->examine_and_add_content (ov_b_snd); @@ -114,9 +115,9 @@ BOOST_AUTO_TEST_CASE (no_use_video_test3) ov_b->make_dcp (); BOOST_REQUIRE (!wait_for_jobs()); - shared_ptr<Film> vf = new_test_film2 ("no_use_video_test3_vf"); - shared_ptr<DCPContent> A (new DCPContent(ov_a->dir(ov_a->dcp_name()))); - shared_ptr<DCPContent> B (new DCPContent(ov_b->dir(ov_b->dcp_name()))); + auto vf = new_test_film2 ("no_use_video_test3_vf"); + auto A = make_shared<DCPContent>(ov_a->dir(ov_a->dcp_name())); + auto B = make_shared<DCPContent>(ov_b->dir(ov_b->dcp_name())); vf->examine_and_add_content (A); vf->examine_and_add_content (B); BOOST_REQUIRE (!wait_for_jobs()); @@ -138,19 +139,19 @@ BOOST_AUTO_TEST_CASE (no_use_video_test3) ov_a_check.read (); BOOST_REQUIRE_EQUAL (ov_a_check.cpls().size(), 1U); BOOST_REQUIRE_EQUAL (ov_a_check.cpls().front()->reels().size(), 1U); - shared_ptr<dcp::Reel> ov_a_reel (ov_a_check.cpls().front()->reels().front()); + auto ov_a_reel (ov_a_check.cpls().front()->reels().front()); dcp::DCP ov_b_check (ov_b->dir(ov_b->dcp_name())); ov_b_check.read (); BOOST_REQUIRE_EQUAL (ov_b_check.cpls().size(), 1U); BOOST_REQUIRE_EQUAL (ov_b_check.cpls().front()->reels().size(), 1U); - shared_ptr<dcp::Reel> ov_b_reel (ov_b_check.cpls().front()->reels().front()); + auto ov_b_reel (ov_b_check.cpls().front()->reels().front()); dcp::DCP vf_check (vf->dir(vf->dcp_name())); vf_check.read (); BOOST_REQUIRE_EQUAL (vf_check.cpls().size(), 1U); BOOST_REQUIRE_EQUAL (vf_check.cpls().front()->reels().size(), 1U); - shared_ptr<dcp::Reel> vf_reel (vf_check.cpls().front()->reels().front()); + auto vf_reel (vf_check.cpls().front()->reels().front()); BOOST_CHECK_EQUAL (vf_reel->main_picture()->asset_ref().id(), ov_b_reel->main_picture()->asset_ref().id()); BOOST_CHECK_EQUAL (vf_reel->main_sound()->asset_ref().id(), ov_a_reel->main_sound()->asset_ref().id()); |
