X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=test%2Freels_test.cc;h=f516fb2622a23d5c49dbc90d14a6a3f1b742028a;hp=6178c88ac71f2d2eccdb9b4082fe7ff1a17daeb2;hb=5a5324ed3a381a86dfe0a6e3932c1d58fdcd596f;hpb=4e83acad0c2a5c528709a175a80261b8147d3b49 diff --git a/test/reels_test.cc b/test/reels_test.cc index 6178c88ac..f516fb262 100644 --- a/test/reels_test.cc +++ b/test/reels_test.cc @@ -29,18 +29,20 @@ #include "test.h" #include #include +#include using std::list; using boost::shared_ptr; +using boost::make_shared; /** Test Film::reels() */ BOOST_AUTO_TEST_CASE (reels_test1) { shared_ptr film = new_test_film ("reels_test1"); film->set_container (Ratio::from_id ("185")); - shared_ptr A (new FFmpegContent (film, "test/data/test.mp4")); + shared_ptr A = make_shared (film, "test/data/test.mp4"); film->examine_and_add_content (A); - shared_ptr B (new FFmpegContent (film, "test/data/test.mp4")); + shared_ptr B = make_shared (film, "test/data/test.mp4"); film->examine_and_add_content (B); wait_for_jobs (); BOOST_CHECK_EQUAL (A->full_length(), DCPTime (288000)); @@ -87,21 +89,21 @@ BOOST_AUTO_TEST_CASE (reels_test2) film->set_dcp_content_type (DCPContentType::from_pretty_name ("Test")); { - shared_ptr c (new ImageContent (film, "test/data/flat_red.png")); + shared_ptr c = make_shared (film, "test/data/flat_red.png"); film->examine_and_add_content (c); wait_for_jobs (); c->video->set_length (24); } { - shared_ptr c (new ImageContent (film, "test/data/flat_green.png")); + shared_ptr c = make_shared (film, "test/data/flat_green.png"); film->examine_and_add_content (c); wait_for_jobs (); c->video->set_length (24); } { - shared_ptr c (new ImageContent (film, "test/data/flat_blue.png")); + shared_ptr c = make_shared (film, "test/data/flat_blue.png"); film->examine_and_add_content (c); wait_for_jobs (); c->video->set_length (24); @@ -121,7 +123,7 @@ BOOST_AUTO_TEST_CASE (reels_test2) film2->set_dcp_content_type (DCPContentType::from_pretty_name ("Test")); film2->set_reel_type (REELTYPE_BY_VIDEO_CONTENT); - shared_ptr c (new DCPContent (film2, film->dir (film->dcp_name ()))); + shared_ptr c = make_shared (film2, film->dir (film->dcp_name ())); film2->examine_and_add_content (c); wait_for_jobs (); @@ -155,9 +157,9 @@ BOOST_AUTO_TEST_CASE (reels_test3) film->set_dcp_content_type (DCPContentType::from_pretty_name ("Test")); film->set_reel_type (REELTYPE_BY_VIDEO_CONTENT); - shared_ptr dcp (new DCPContent (film, "test/data/reels_test2")); + shared_ptr dcp = make_shared (film, "test/data/reels_test2"); film->examine_and_add_content (dcp); - shared_ptr sub (new TextSubtitleContent (film, "test/data/subrip.srt")); + shared_ptr sub = make_shared (film, "test/data/subrip.srt"); film->examine_and_add_content (sub); wait_for_jobs (); @@ -197,7 +199,7 @@ BOOST_AUTO_TEST_CASE (reels_test4) content[i]->video->set_length (24); } - shared_ptr subs (new TextSubtitleContent (film, "test/data/subrip3.srt")); + shared_ptr subs = make_shared (film, "test/data/subrip3.srt"); film->examine_and_add_content (subs); wait_for_jobs ();