summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-01-14 22:38:58 +0100
committerCarl Hetherington <cth@carlh.net>2021-01-17 20:13:23 +0100
commita79574aab09f3908d228b715ebbc8a2ebb16f7fb (patch)
treef43a96c40098bb92948bdd22c293eeaa1446f6ff /test
parentad03415009155f8771ca48200f3c4a469c85277e (diff)
Bv2.1 8.1: CPL must have <AnnotationText>.
Diffstat (limited to 'test')
-rw-r--r--test/verify_test.cc23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/verify_test.cc b/test/verify_test.cc
index 42e1eefc..98a28cbc 100644
--- a/test/verify_test.cc
+++ b/test/verify_test.cc
@@ -1628,3 +1628,26 @@ BOOST_AUTO_TEST_CASE (verify_sound_sampling_rate_must_be_48k)
check_verify_result ({dir}, {{ dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::INVALID_SOUND_FRAME_RATE }});
}
+
+
+BOOST_AUTO_TEST_CASE (verify_cpl_must_have_annotation_text)
+{
+ boost::filesystem::path const dir("build/test/verify_cpl_must_have_annotation_text");
+ auto dcp = make_simple (dir);
+ dcp->write_xml (dcp::SMPTE);
+ BOOST_REQUIRE_EQUAL (dcp->cpls().size(), 1U);
+
+ {
+ BOOST_REQUIRE (dcp->cpls()[0]->file());
+ Editor e(dcp->cpls()[0]->file().get());
+ e.replace("<AnnotationText>A Test DCP</AnnotationText>", "");
+ }
+
+ check_verify_result (
+ {dir},
+ {
+ { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::MISSING_ANNOTATION_TEXT_IN_CPL },
+ { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::CPL_HASH_INCORRECT }
+ });
+}
+