From 8dd69a2a86b64bbf5ec80a78a6ad74865f752fde Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 8 Dec 2020 23:42:40 +0100 Subject: Bv2.1 6.1: DCPs must be SMPTE. --- test/combine_test.cc | 8 ++++++++ test/verify_test.cc | 24 ++++++++++++++++++------ 2 files changed, 26 insertions(+), 6 deletions(-) (limited to 'test') 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 directories; directories.push_back (path); list notes = dcp::verify (directories, &stage, &progress, xsd_test); + for (list::iterator i = notes.begin(); i != notes.end(); ) { + list::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::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 directories = setup (8, 14); list notes = dcp::verify (directories, &stage, &progress, xsd_test); - BOOST_REQUIRE_EQUAL (notes.size(), 4); + BOOST_REQUIRE_EQUAL (notes.size(), 5); list::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 dirs; dirs.push_back (dir); list notes = dcp::verify (dirs, &stage, &progress, xsd_test); - BOOST_REQUIRE_EQUAL (notes.size(), 0); + BOOST_REQUIRE_EQUAL (notes.size(), 1U); + list::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 dirs; dirs.push_back (dir); list 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::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; } -- cgit v1.2.3