X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=test%2Fsubtitle_reel_number_test.cc;h=b19fd1cd00fcbf474253f37f25da73d8a08f1658;hb=ef578569611e2fa0e91bdd5a726fc0c251540e6d;hp=d78cb63d7c1076271ef695f4e90323d8955a98b7;hpb=df17bbd25da69fc38eb2dcd8b4a2531cf0bab0bc;p=dcpomatic.git diff --git a/test/subtitle_reel_number_test.cc b/test/subtitle_reel_number_test.cc index d78cb63d7..b19fd1cd0 100644 --- a/test/subtitle_reel_number_test.cc +++ b/test/subtitle_reel_number_test.cc @@ -33,8 +33,8 @@ #include using std::string; -using boost::shared_ptr; -using boost::dynamic_pointer_cast; +using std::shared_ptr; +using std::dynamic_pointer_cast; /* Check that ReelNumber is setup correctly when making multi-reel subtitled DCPs */ BOOST_AUTO_TEST_CASE (subtitle_reel_number_test) @@ -43,12 +43,12 @@ BOOST_AUTO_TEST_CASE (subtitle_reel_number_test) film->set_container (Ratio::from_id ("185")); film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TLR")); film->set_name ("frobozz"); - shared_ptr content (new StringTextFileContent (film, "test/data/subrip5.srt")); + shared_ptr content (new StringTextFileContent("test/data/subrip5.srt")); film->examine_and_add_content (content); BOOST_REQUIRE (!wait_for_jobs ()); - content->only_caption()->set_use (true); - content->only_caption()->set_burn (false); - film->set_reel_type (REELTYPE_BY_LENGTH); + content->only_text()->set_use (true); + content->only_text()->set_burn (false); + film->set_reel_type (ReelType::BY_LENGTH); film->set_interop (true); film->set_reel_length (1024 * 1024 * 512); film->make_dcp (); @@ -56,14 +56,14 @@ BOOST_AUTO_TEST_CASE (subtitle_reel_number_test) dcp::DCP dcp ("build/test/subtitle_reel_number_test/" + film->dcp_name()); dcp.read (); - BOOST_REQUIRE_EQUAL (dcp.cpls().size(), 1); - shared_ptr cpl = dcp.cpls().front(); - BOOST_REQUIRE_EQUAL (cpl->reels().size(), 6); + BOOST_REQUIRE_EQUAL (dcp.cpls().size(), 1U); + auto cpl = dcp.cpls()[0]; + BOOST_REQUIRE_EQUAL (cpl->reels().size(), 6U); int n = 1; - BOOST_FOREACH (shared_ptr i, cpl->reels()) { + for (auto i: cpl->reels()) { if (i->main_subtitle()) { - shared_ptr ass = dynamic_pointer_cast(i->main_subtitle()->asset()); + auto ass = dynamic_pointer_cast(i->main_subtitle()->asset()); BOOST_REQUIRE (ass); BOOST_CHECK_EQUAL (ass->reel_number(), dcp::raw_convert(n)); ++n;