summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-12-06 12:32:01 +0100
committerCarl Hetherington <cth@carlh.net>2019-12-22 01:21:00 +0100
commit9fd59dda3de1049c17bf2ca098861bf767de98f7 (patch)
tree5888a02744e6b3328d27cfa7f2b6f8dbe305f021 /test
parent30dfa051113792305f9704d5a76ffaf57c21063d (diff)
Add another verification test.
Diffstat (limited to 'test')
-rw-r--r--test/verify_test.cc23
1 files changed, 20 insertions, 3 deletions
diff --git a/test/verify_test.cc b/test/verify_test.cc
index 9b028729..45a91bd2 100644
--- a/test/verify_test.cc
+++ b/test/verify_test.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2018 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2018-2019 Carl Hetherington <cth@carlh.net>
This file is part of libdcp.
@@ -35,6 +35,7 @@
#include "util.h"
#include "compose.hpp"
#include <boost/test/unit_test.hpp>
+#include <boost/foreach.hpp>
#include <boost/algorithm/string.hpp>
#include <cstdio>
#include <iostream>
@@ -241,8 +242,6 @@ BOOST_AUTO_TEST_CASE (verify_test7)
{
vector<boost::filesystem::path> directories = setup (7);
- boost::filesystem::path const assetmap_file = "build/test/verify_test7/ASSETMAP.xml";
-
{
Editor e ("build/test/verify_test7/ASSETMAP.xml");
e.replace ("<Path>video.mxf</Path>", "<Path></Path>");
@@ -255,3 +254,21 @@ BOOST_AUTO_TEST_CASE (verify_test7)
BOOST_CHECK_EQUAL (notes.front().code(), dcp::VerificationNote::Code::EMPTY_ASSET_PATH);
}
+/* Mismatched standard */
+BOOST_AUTO_TEST_CASE (verify_test8)
+{
+ vector<boost::filesystem::path> directories = setup (8);
+
+ {
+ Editor e ("build/test/verify_test8/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml");
+ e.replace ("http://www.smpte-ra.org/schemas/429-7/2006/CPL", "http://www.digicine.com/PROTO-ASDCP-CPL-20040511#");
+ }
+
+ list<dcp::VerificationNote> notes = dcp::verify (directories, &stage, &progress);
+
+ BOOST_REQUIRE_EQUAL (notes.size(), 2);
+ BOOST_CHECK_EQUAL (notes.front().type(), dcp::VerificationNote::VERIFY_ERROR);
+ BOOST_CHECK_EQUAL (notes.front().code(), dcp::VerificationNote::Code::MISMATCHED_STANDARD);
+ BOOST_CHECK_EQUAL (notes.back().code(), dcp::VerificationNote::Code::CPL_HASH_INCORRECT);
+}
+