diff options
Diffstat (limited to 'test/verify_test.cc')
| -rw-r--r-- | test/verify_test.cc | 45 |
1 files changed, 21 insertions, 24 deletions
diff --git a/test/verify_test.cc b/test/verify_test.cc index 96e77a6a..02b2fd03 100644 --- a/test/verify_test.cc +++ b/test/verify_test.cc @@ -6224,31 +6224,28 @@ BOOST_AUTO_TEST_CASE(verify_dcp_with_two_cpls) prepare_directory(combined); dcp::combine({ prefix + "_0", prefix+ "_1" }, combined); + using VN = dcp::VerificationNote; + using VC = VN::Code; + check_verify_result_with_duplicates({combined}, {}, { - ok(dcp::VerificationNote::Code::MATCHING_CPL_HASHES, cpls[0]), - ok(dcp::VerificationNote::Code::MATCHING_CPL_HASHES, cpls[1]), - ok(dcp::VerificationNote::Code::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpls[0]), - ok(dcp::VerificationNote::Code::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpls[1]), - ok(dcp::VerificationNote::Code::VALID_CONTENT_KIND, string{"trailer"}, cpls[0]), - ok(dcp::VerificationNote::Code::VALID_CONTENT_KIND, string{"trailer"}, cpls[1]), - ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpls[0]), - ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpls[1]), - ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"hello"}, cpls[0]), - ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"hello"}, cpls[1]), - ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpls[0]->content_version()->label_text, cpls[0]), - ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpls[1]->content_version()->label_text, cpls[1]), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(combined / "videofoo.mxf"), cpls[0]), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(combined / "videofoo0.mxf"), cpls[1]), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(combined / "videofoo.mxf"), cpls[0]), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(combined / "videofoo0.mxf"), cpls[1]), - dcp::VerificationNote( - dcp::VerificationNote::Type::BV21_ERROR, - dcp::VerificationNote::Code::MISSING_CPL_METADATA, - canonical(combined / cpls[0]->file()->filename())).set_cpl_id(cpls[0]->id()), - dcp::VerificationNote( - dcp::VerificationNote::Type::BV21_ERROR, - dcp::VerificationNote::Code::MISSING_CPL_METADATA, - canonical(combined / cpls[1]->file()->filename())).set_cpl_id(cpls[1]->id()) + note(VC::MATCHING_CPL_HASHES, cpls[0]), + note(VC::MATCHING_CPL_HASHES, cpls[1]), + note(VC::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpls[0]), + note(VC::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpls[1]), + note(VC::VALID_CONTENT_KIND, string{"trailer"}, cpls[0]), + note(VC::VALID_CONTENT_KIND, string{"trailer"}, cpls[1]), + note(VC::NONE_ENCRYPTED, cpls[0]), + note(VC::NONE_ENCRYPTED, cpls[1]), + note(VC::VALID_CPL_ANNOTATION_TEXT, string{"hello"}, cpls[0]), + note(VC::VALID_CPL_ANNOTATION_TEXT, string{"hello"}, cpls[1]), + note(VC::VALID_CONTENT_VERSION_LABEL_TEXT, cpls[0]->content_version()->label_text, cpls[0]), + note(VC::VALID_CONTENT_VERSION_LABEL_TEXT, cpls[1]->content_version()->label_text, cpls[1]), + note(VC::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(combined / "videofoo.mxf"), cpls[0]), + note(VC::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(combined / "videofoo0.mxf"), cpls[1]), + note(VC::CORRECT_PICTURE_HASH, canonical(combined / "videofoo.mxf"), cpls[0]), + note(VC::CORRECT_PICTURE_HASH, canonical(combined / "videofoo0.mxf"), cpls[1]), + note(VC::MISSING_CPL_METADATA, canonical(combined / cpls[0]->file()->filename()), cpls[0]), + note(VC::MISSING_CPL_METADATA, canonical(combined / cpls[1]->file()->filename()), cpls[1]) }); } |
