From 9fd59dda3de1049c17bf2ca098861bf767de98f7 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 6 Dec 2019 12:32:01 +0100 Subject: Add another verification test. --- test/verify_test.cc | 23 ++++++++++++++++++++--- 1 file 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 + Copyright (C) 2018-2019 Carl Hetherington This file is part of libdcp. @@ -35,6 +35,7 @@ #include "util.h" #include "compose.hpp" #include +#include #include #include #include @@ -241,8 +242,6 @@ BOOST_AUTO_TEST_CASE (verify_test7) { vector 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 ("video.mxf", ""); @@ -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 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 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); +} + -- cgit v1.2.3