X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=test%2Fsubtitle_reel_test.cc;h=f22698d1f6c82b3bd9d0b424b3f5f97fbbdf5c2c;hb=182b9d2e2feb6545592868606aaf0f0146095481;hp=d75c8af1a155dfd6b8151fb9fcd8aa3cb23b0e84;hpb=a8f48589d3eaec9de5bfd34f45410f88ab836363;p=dcpomatic.git diff --git a/test/subtitle_reel_test.cc b/test/subtitle_reel_test.cc index d75c8af1a..f22698d1f 100644 --- a/test/subtitle_reel_test.cc +++ b/test/subtitle_reel_test.cc @@ -106,13 +106,13 @@ BOOST_AUTO_TEST_CASE (subtitle_in_all_reels_test) film->set_sequence (false); film->set_reel_type (ReelType::BY_VIDEO_CONTENT); for (int i = 0; i < 3; ++i) { - auto video = content_factory("test/data/flat_red.png").front(); + auto video = content_factory("test/data/flat_red.png")[0]; film->examine_and_add_content (video); BOOST_REQUIRE (!wait_for_jobs()); video->video->set_length (15 * 24); video->set_position (film, dcpomatic::DCPTime::from_seconds(15 * i)); } - auto subs = content_factory("test/data/15s.srt").front(); + auto subs = content_factory("test/data/15s.srt")[0]; film->examine_and_add_content (subs); BOOST_REQUIRE (!wait_for_jobs()); make_and_verify_dcp ( @@ -146,24 +146,24 @@ BOOST_AUTO_TEST_CASE (closed_captions_in_all_reels_test) film->set_reel_type (ReelType::BY_VIDEO_CONTENT); for (int i = 0; i < 3; ++i) { - auto video = content_factory("test/data/flat_red.png").front(); + auto video = content_factory("test/data/flat_red.png")[0]; film->examine_and_add_content (video); BOOST_REQUIRE (!wait_for_jobs()); video->video->set_length (15 * 24); video->set_position (film, dcpomatic::DCPTime::from_seconds(15 * i)); } - auto ccap1 = content_factory("test/data/15s.srt").front(); + auto ccap1 = content_factory("test/data/15s.srt")[0]; film->examine_and_add_content (ccap1); BOOST_REQUIRE (!wait_for_jobs()); ccap1->text.front()->set_type (TextType::CLOSED_CAPTION); - ccap1->text.front()->set_dcp_track (DCPTextTrack("Test", "de-DE")); + ccap1->text.front()->set_dcp_track (DCPTextTrack("Test", dcp::LanguageTag("de-DE"))); - auto ccap2 = content_factory("test/data/15s.srt").front(); + auto ccap2 = content_factory("test/data/15s.srt")[0]; film->examine_and_add_content (ccap2); BOOST_REQUIRE (!wait_for_jobs()); ccap2->text.front()->set_type (TextType::CLOSED_CAPTION); - ccap2->text.front()->set_dcp_track (DCPTextTrack("Other", "en-GB")); + ccap2->text.front()->set_dcp_track (DCPTextTrack("Other", dcp::LanguageTag("en-GB"))); make_and_verify_dcp ( film, @@ -201,31 +201,31 @@ BOOST_AUTO_TEST_CASE (subtitles_split_at_reel_boundaries) film->set_reel_type (ReelType::BY_VIDEO_CONTENT); for (int i = 0; i < 3; ++i) { - auto video = content_factory("test/data/flat_red.png").front(); + auto video = content_factory("test/data/flat_red.png")[0]; film->examine_and_add_content (video); BOOST_REQUIRE (!wait_for_jobs()); video->video->set_length (15 * 24); video->set_position (film, dcpomatic::DCPTime::from_seconds(15 * i)); } - auto subtitle = content_factory("test/data/45s.srt").front(); + auto subtitle = content_factory("test/data/45s.srt")[0]; film->examine_and_add_content (subtitle); BOOST_REQUIRE (!wait_for_jobs()); - make_and_verify_dcp (film, {{ dcp::VerificationNote::Code::INVALID_STANDARD }}); + make_and_verify_dcp (film, { dcp::VerificationNote::Code::INVALID_STANDARD }); dcp::DCP dcp (film->dir(film->dcp_name())); dcp.read(); - BOOST_REQUIRE_EQUAL (dcp.cpls().size(), 1); + BOOST_REQUIRE_EQUAL (dcp.cpls().size(), 1U); auto cpl = dcp.cpls()[0]; - BOOST_REQUIRE_EQUAL (cpl->reels().size(), 3); + BOOST_REQUIRE_EQUAL (cpl->reels().size(), 3U); for (auto i: cpl->reels()) { auto reel_sub = i->main_subtitle(); BOOST_REQUIRE (reel_sub); auto sub = reel_sub->asset(); BOOST_REQUIRE (sub); - BOOST_CHECK_EQUAL (sub->subtitles().size(), 1); + BOOST_CHECK_EQUAL (sub->subtitles().size(), 1U); } }