Fix tests with different library versions.
authorCarl Hetherington <cth@carlh.net>
Sun, 26 Feb 2023 19:56:34 +0000 (20:56 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 26 Feb 2023 19:56:34 +0000 (20:56 +0100)
test/smpte_subtitle_test.cc

index a23a7c458b1513564cb901c1064071ac6f831093..e5cdfa23c1f37a8db2836c63325de9dd06d7dac8 100644 (file)
@@ -719,17 +719,24 @@ BOOST_AUTO_TEST_CASE(smpte_subtitle_standard_written_correctly)
        boost::filesystem::remove_all(out);
        boost::filesystem::create_directories(out);
 
+       dcp::MXFMetadata metadata;
+       /* Pin this so tests don't fail on newer version */
+       metadata.product_version = "1.8.59";
+
        dcp::SMPTESubtitleAsset test_2014;
+       test_2014.set_metadata(metadata);
        test_2014.set_issue_date(dcp::LocalTime("2020-01-01T14:00:00"));
        test_2014.write(out / "2014.mxf");
        check_file(ref / "2014.mxf", out / "2014.mxf");
 
        dcp::SMPTESubtitleAsset test_2010(dcp::SubtitleStandard::SMPTE_2010);
+       test_2010.set_metadata(metadata);
        test_2010.set_issue_date(dcp::LocalTime("2020-01-01T14:00:00"));
        test_2010.write(out / "2010.mxf");
        check_file(ref / "2010.mxf", out / "2010.mxf");
 
        dcp::SMPTESubtitleAsset test_2007(dcp::SubtitleStandard::SMPTE_2007);
+       test_2007.set_metadata(metadata);
        test_2007.set_issue_date(dcp::LocalTime("2020-01-01T14:00:00"));
        test_2007.write(out / "2007.mxf");
        check_file(ref / "2007.mxf", out / "2007.mxf");