summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-12-08 23:42:40 +0100
committerCarl Hetherington <cth@carlh.net>2021-01-17 20:13:22 +0100
commit8dd69a2a86b64bbf5ec80a78a6ad74865f752fde (patch)
tree3edcb1bbf14b85c61e3124f3c76bfd54f6121d8c /test
parentb6cfa3cfa660622997a52f00a9f0376339c0f743 (diff)
Bv2.1 6.1: DCPs must be SMPTE.
Diffstat (limited to 'test')
-rw-r--r--test/combine_test.cc8
-rw-r--r--test/verify_test.cc24
2 files changed, 26 insertions, 6 deletions
diff --git a/test/combine_test.cc b/test/combine_test.cc
index 6db968f6..c62f0322 100644
--- a/test/combine_test.cc
+++ b/test/combine_test.cc
@@ -85,6 +85,14 @@ check_no_errors (boost::filesystem::path path)
vector<boost::filesystem::path> directories;
directories.push_back (path);
list<dcp::VerificationNote> notes = dcp::verify (directories, &stage, &progress, xsd_test);
+ for (list<dcp::VerificationNote>::iterator i = notes.begin(); i != notes.end(); ) {
+ list<dcp::VerificationNote>::iterator tmp = i;
+ ++tmp;
+ if (i->code() == dcp::VerificationNote::NOT_SMPTE) {
+ notes.erase (i);
+ }
+ i = tmp;
+ }
dump_notes (notes);
BOOST_CHECK (notes.empty());
}
diff --git a/test/verify_test.cc b/test/verify_test.cc
index fdf85100..5a05bcd3 100644
--- a/test/verify_test.cc
+++ b/test/verify_test.cc
@@ -485,7 +485,10 @@ BOOST_AUTO_TEST_CASE (verify_test13)
++st;
BOOST_REQUIRE (st == stages.end());
- BOOST_CHECK_EQUAL (notes.size(), 0);
+ BOOST_REQUIRE_EQUAL (notes.size(), 1U);
+ list<dcp::VerificationNote>::const_iterator i = notes.begin ();
+ BOOST_CHECK_EQUAL (i->type(), dcp::VerificationNote::VERIFY_BV21_ERROR);
+ BOOST_CHECK_EQUAL (i->code(), dcp::VerificationNote::NOT_SMPTE);
}
/* DCP with a short asset */
@@ -494,8 +497,10 @@ BOOST_AUTO_TEST_CASE (verify_test14)
vector<boost::filesystem::path> directories = setup (8, 14);
list<dcp::VerificationNote> notes = dcp::verify (directories, &stage, &progress, xsd_test);
- BOOST_REQUIRE_EQUAL (notes.size(), 4);
+ BOOST_REQUIRE_EQUAL (notes.size(), 5);
list<dcp::VerificationNote>::const_iterator i = notes.begin ();
+ BOOST_CHECK_EQUAL (i->code(), dcp::VerificationNote::NOT_SMPTE);
+ ++i;
BOOST_CHECK_EQUAL (i->code(), dcp::VerificationNote::DURATION_TOO_SMALL);
++i;
BOOST_CHECK_EQUAL (i->code(), dcp::VerificationNote::INTRINSIC_DURATION_TOO_SMALL);
@@ -623,7 +628,9 @@ BOOST_AUTO_TEST_CASE (verify_test18)
vector<boost::filesystem::path> dirs;
dirs.push_back (dir);
list<dcp::VerificationNote> notes = dcp::verify (dirs, &stage, &progress, xsd_test);
- BOOST_REQUIRE_EQUAL (notes.size(), 0);
+ BOOST_REQUIRE_EQUAL (notes.size(), 1U);
+ list<dcp::VerificationNote>::const_iterator i = notes.begin ();
+ BOOST_CHECK_EQUAL (i->code(), dcp::VerificationNote::NOT_SMPTE);
}
@@ -652,9 +659,14 @@ BOOST_AUTO_TEST_CASE (verify_test19)
vector<boost::filesystem::path> dirs;
dirs.push_back (dir);
list<dcp::VerificationNote> notes = dcp::verify (dirs, &stage, &progress, xsd_test);
- BOOST_REQUIRE_EQUAL (notes.size(), 2);
- BOOST_CHECK_EQUAL (notes.front().code(), dcp::VerificationNote::XML_VALIDATION_ERROR);
- BOOST_CHECK_EQUAL (notes.back().code(), dcp::VerificationNote::XML_VALIDATION_ERROR);
+ BOOST_REQUIRE_EQUAL (notes.size(), 3);
+ list<dcp::VerificationNote>::const_iterator i = notes.begin ();
+ BOOST_CHECK_EQUAL (i->code(), dcp::VerificationNote::NOT_SMPTE);
+ ++i;
+ BOOST_CHECK_EQUAL (i->code(), dcp::VerificationNote::XML_VALIDATION_ERROR);
+ ++i;
+ BOOST_CHECK_EQUAL (i->code(), dcp::VerificationNote::XML_VALIDATION_ERROR);
+ ++i;
}