summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-12-09 00:04:23 +0100
committerCarl Hetherington <cth@carlh.net>2019-12-22 01:21:00 +0100
commit63357f32e8229b9d734b0c0ab38cc062dcfec393 (patch)
tree0f9f6eddc9e7e9532e07b86dc95452ec72ef187d /test
parentaeb2f36ede25d6e8ce583592c23bbb1dfb05041e (diff)
Also check PKL XML.
Diffstat (limited to 'test')
-rw-r--r--test/verify_test.cc20
1 files changed, 18 insertions, 2 deletions
diff --git a/test/verify_test.cc b/test/verify_test.cc
index 737c2fb9..f6f7ee43 100644
--- a/test/verify_test.cc
+++ b/test/verify_test.cc
@@ -108,7 +108,7 @@ void
dump_notes (list<dcp::VerificationNote> const & notes)
{
BOOST_FOREACH (dcp::VerificationNote i, notes) {
- std::cout << dcp::note_to_string(i) << "\n";
+ std::cout << dcp::note_to_string(i) << " " << i.note().get_value_or("") << "\n";
}
}
@@ -119,6 +119,7 @@ BOOST_AUTO_TEST_CASE (verify_test1)
list<dcp::VerificationNote> notes = dcp::verify (directories, &stage, &progress, "xsd");
boost::filesystem::path const cpl_file = "build/test/verify_test1/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml";
+ boost::filesystem::path const pkl_file = "build/test/verify_test1/pkl_ae8a9818-872a-4f86-8493-11dfdea03e09.xml";
list<pair<string, optional<boost::filesystem::path> > >::const_iterator st = stages.begin();
BOOST_CHECK_EQUAL (st->first, "Checking DCP");
@@ -140,6 +141,10 @@ BOOST_AUTO_TEST_CASE (verify_test1)
BOOST_REQUIRE (st->second);
BOOST_CHECK_EQUAL (st->second.get(), boost::filesystem::canonical("build/test/verify_test1/audio.mxf"));
++st;
+ BOOST_CHECK_EQUAL (st->first, "Checking PKL");
+ BOOST_REQUIRE (st->second);
+ BOOST_CHECK_EQUAL (st->second.get(), boost::filesystem::canonical(pkl_file));
+ ++st;
BOOST_REQUIRE (st == stages.end());
dump_notes (notes);
@@ -186,7 +191,9 @@ BOOST_AUTO_TEST_CASE (verify_test3)
list<dcp::VerificationNote> notes = dcp::verify (directories, &stage, &progress, "xsd");
- BOOST_REQUIRE_EQUAL (notes.size(), 3);
+ dump_notes (notes);
+
+ BOOST_REQUIRE_EQUAL (notes.size(), 6);
list<dcp::VerificationNote>::const_iterator i = notes.begin();
BOOST_CHECK_EQUAL (i->type(), dcp::VerificationNote::VERIFY_ERROR);
BOOST_CHECK_EQUAL (i->code(), dcp::VerificationNote::CPL_HASH_INCORRECT);
@@ -197,6 +204,15 @@ BOOST_AUTO_TEST_CASE (verify_test3)
BOOST_CHECK_EQUAL (i->type(), dcp::VerificationNote::VERIFY_ERROR);
BOOST_CHECK_EQUAL (i->code(), dcp::VerificationNote::PKL_CPL_SOUND_HASHES_DISAGREE);
++i;
+ BOOST_CHECK_EQUAL (i->type(), dcp::VerificationNote::VERIFY_ERROR);
+ BOOST_CHECK_EQUAL (i->code(), dcp::VerificationNote::XML_VALIDATION_ERROR);
+ ++i;
+ BOOST_CHECK_EQUAL (i->type(), dcp::VerificationNote::VERIFY_ERROR);
+ BOOST_CHECK_EQUAL (i->code(), dcp::VerificationNote::XML_VALIDATION_ERROR);
+ ++i;
+ BOOST_CHECK_EQUAL (i->type(), dcp::VerificationNote::VERIFY_ERROR);
+ BOOST_CHECK_EQUAL (i->code(), dcp::VerificationNote::XML_VALIDATION_ERROR);
+ ++i;
}
/* Corrupt the ContentKind in the CPL */