dcp::CPL cpl("", dcp::ContentKind::FEATURE, dcp::Standard::SMPTE);
BOOST_CHECK_THROW (cpl.set_version_number(-1), dcp::BadSettingError);
- vector<dcp::ContentVersion> cv;
- cv.push_back (dcp::ContentVersion("same-id", "version 1"));
- cv.push_back (dcp::ContentVersion("same-id", "version 2"));
+ vector<dcp::ContentVersion> cv = {
+ dcp::ContentVersion("same-id", "version 1"),
+ dcp::ContentVersion("same-id", "version 2")
+ };
BOOST_CHECK_THROW (cpl.set_content_versions(cv), dcp::DuplicateIdError);
}
BOOST_AUTO_TEST_CASE (luminance_test2)
{
- shared_ptr<cxml::Document> doc (new cxml::Document("Luminance"));
+ auto doc = make_shared<cxml::Document>("Luminance");
doc->read_string (
"<Luminance units=\"candela-per-square-metre\">4.5</Luminance>"
BOOST_AUTO_TEST_CASE (luminance_test3)
{
- shared_ptr<cxml::Document> doc (new cxml::Document("Luminance"));
+ auto doc = make_shared<cxml::Document>("Luminance");
doc->read_string (
"<Luminance units=\"candela-per-square-motre\">4.5</Luminance>"
BOOST_AUTO_TEST_CASE (luminance_test4)
{
- shared_ptr<cxml::Document> doc (new cxml::Document("Luminance"));
+ auto doc = make_shared<cxml::Document>("Luminance");
doc->read_string (
"<Luminance units=\"candela-per-square-metre\">-4.5</Luminance>"
BOOST_REQUIRE (reels.front()->main_subtitle()->language());
BOOST_CHECK_EQUAL (reels.front()->main_subtitle()->language().get(), "de-DE");
- vector<string> asl = cpl.additional_subtitle_languages();
+ auto asl = cpl.additional_subtitle_languages();
BOOST_REQUIRE_EQUAL (asl.size(), 2);
BOOST_CHECK_EQUAL (asl[0], "en-US");
BOOST_CHECK_EQUAL (asl[1], "fr-ZA");
dcp::CPL cpl("", dcp::ContentKind::FEATURE, dcp::Standard::SMPTE);
cpl.set_issue_date ("2020-08-28T13:35:06+02:00");
- vector<dcp::ContentVersion> cv;
- cv.push_back (dcp::ContentVersion("some-id", "version 1"));
- cv.push_back (dcp::ContentVersion("another-id", "version 2"));
+ vector<dcp::ContentVersion> cv = {
+ dcp::ContentVersion("some-id", "version 1"),
+ dcp::ContentVersion("another-id", "version 2")
+ };;
cpl.set_content_versions (cv);
cpl.set_full_content_title_text ("full-content-title");
cpl.set_main_picture_stored_area (dcp::Size(1998, 1080));
cpl.set_main_picture_active_area (dcp::Size(1440, 1080));
- shared_ptr<cxml::Document> doc (new cxml::Document("MainSubtitle"));
+ auto doc = make_shared<cxml::Document>("MainSubtitle");
doc->read_string (
"<MainSubtitle>"
"</MainSubtitle>"
);
- shared_ptr<dcp::Reel> reel(new dcp::Reel());
+ auto reel = make_shared<dcp::Reel>();
reel->add (black_picture_asset("build/test/cpl_metadata_write_test1"));
reel->add (make_shared<dcp::ReelSMPTESubtitleAsset>(doc));
cpl.add (reel);
BOOST_AUTO_TEST_CASE (cpl_metadata_roundtrip_test_2)
{
dcp::CPL cpl ("test/ref/cpl_metadata_test2.xml");
- vector<string> ignore;
- ignore.push_back ("Id");
cpl.write_xml ("build/test/cpl_metadata_roundtrip_test2.xml", shared_ptr<dcp::CertificateChain>());
check_xml (
dcp::file_to_string("test/ref/cpl_metadata_test2.xml"),
dcp::file_to_string("build/test/cpl_metadata_roundtrip_test2.xml"),
- ignore
+ {"Id"}
);
}