diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-12-11 22:27:34 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-02-18 00:35:01 +0100 |
| commit | 214c3093f7e985cde610457fae9e1f97068efde5 (patch) | |
| tree | 7f8d919ec8e6b6bf6dafdbe141e1c34e65914d16 /test | |
| parent | b94821d7953dae7d9e58f703e66dca59e9086216 (diff) | |
and default to writing the 2014 namespace.
Diffstat (limited to 'test')
| -rw-r--r-- | test/data/2007.mxf | bin | 0 -> 17297 bytes | |||
| -rw-r--r-- | test/data/2010.mxf | bin | 0 -> 17297 bytes | |||
| -rw-r--r-- | test/data/2014.mxf | bin | 0 -> 17297 bytes | |||
| -rw-r--r-- | test/smpte_subtitle_test.cc | 40 |
4 files changed, 40 insertions, 0 deletions
diff --git a/test/data/2007.mxf b/test/data/2007.mxf Binary files differnew file mode 100644 index 00000000..3cdf4861 --- /dev/null +++ b/test/data/2007.mxf diff --git a/test/data/2010.mxf b/test/data/2010.mxf Binary files differnew file mode 100644 index 00000000..1d1b8554 --- /dev/null +++ b/test/data/2010.mxf diff --git a/test/data/2014.mxf b/test/data/2014.mxf Binary files differnew file mode 100644 index 00000000..63622640 --- /dev/null +++ b/test/data/2014.mxf diff --git a/test/smpte_subtitle_test.cc b/test/smpte_subtitle_test.cc index f8412daa..a23a7c45 100644 --- a/test/smpte_subtitle_test.cc +++ b/test/smpte_subtitle_test.cc @@ -708,3 +708,43 @@ BOOST_AUTO_TEST_CASE (write_subtitles_in_vertical_order_with_bottom_alignment) ); } + +BOOST_AUTO_TEST_CASE(smpte_subtitle_standard_written_correctly) +{ + RNGFixer fixer; + + boost::filesystem::path const ref = "test/data"; + boost::filesystem::path const out = "build/test/smpte_subtitle_standard_written_correctly"; + + boost::filesystem::remove_all(out); + boost::filesystem::create_directories(out); + + dcp::SMPTESubtitleAsset test_2014; + 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_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_issue_date(dcp::LocalTime("2020-01-01T14:00:00")); + test_2007.write(out / "2007.mxf"); + check_file(ref / "2007.mxf", out / "2007.mxf"); +} + + +BOOST_AUTO_TEST_CASE(smpte_subtitle_standard_read_correctly) +{ + dcp::SMPTESubtitleAsset test_2007("test/data/2007.mxf"); + BOOST_CHECK(test_2007.subtitle_standard() == dcp::SubtitleStandard::SMPTE_2007); + + dcp::SMPTESubtitleAsset test_2010("test/data/2010.mxf"); + BOOST_CHECK(test_2010.subtitle_standard() == dcp::SubtitleStandard::SMPTE_2010); + + dcp::SMPTESubtitleAsset test_2014("test/data/2014.mxf"); + BOOST_CHECK(test_2014.subtitle_standard() == dcp::SubtitleStandard::SMPTE_2014); +} + |
