summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-11-29 01:09:16 +0100
committerCarl Hetherington <cth@carlh.net>2024-12-08 21:29:37 +0100
commitf97db44f499d5f1b1749a6f188ebba9b5c101f1f (patch)
tree48a7d6b1d2e81858046e28b2b14bbf1f685ad9ac /test
parentd0255af1234de0f90017930b2ceb7e75ec14ca95 (diff)
Fix DCP Constraints Profile verification in the presence of other CPL metadata Properties.
Diffstat (limited to 'test')
-rw-r--r--test/verify_test.cc24
1 files changed, 21 insertions, 3 deletions
diff --git a/test/verify_test.cc b/test/verify_test.cc
index 57e2e0f6..51448297 100644
--- a/test/verify_test.cc
+++ b/test/verify_test.cc
@@ -4340,7 +4340,7 @@ BOOST_AUTO_TEST_CASE (verify_invalid_extension_metadata2)
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_CPL_HASHES, cpl->file().get()
).set_cpl_id(cpl->id()).set_reference_hash(calc.old_hash()).set_calculated_hash(calc.new_hash()),
dcp::VerificationNote(
- dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_EXTENSION_METADATA, string("<Name> property should be 'DCP Constraints Profile'"), cpl->file().get()
+ dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_EXTENSION_METADATA, string("No correctly-formed DCP Constraints Profile found"), cpl->file().get()
).set_cpl_id(cpl->id())
});
}
@@ -4387,7 +4387,10 @@ BOOST_AUTO_TEST_CASE (verify_invalid_xml_cpl_extension_metadata6)
).set_cpl_id(cpl->id()),
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_CPL_HASHES, cpl->file().get()
- ).set_cpl_id(cpl->id()).set_reference_hash(calc.old_hash()).set_calculated_hash(calc.new_hash())
+ ).set_cpl_id(cpl->id()).set_reference_hash(calc.old_hash()).set_calculated_hash(calc.new_hash()),
+ dcp::VerificationNote(
+ dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_EXTENSION_METADATA, string("No correctly-formed DCP Constraints Profile found"), cpl->file().get()
+ ).set_cpl_id(cpl->id())
});
}
@@ -4428,7 +4431,7 @@ BOOST_AUTO_TEST_CASE (verify_invalid_xml_cpl_extension_metadata7)
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_CPL_HASHES, cpl->file().get()
).set_cpl_id(cpl->id()).set_reference_hash(calc.old_hash()).set_calculated_hash(calc.new_hash()),
dcp::VerificationNote(
- dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_EXTENSION_METADATA, string("<Value> property should be 'SMPTE-RDD-52:2020-Bv2.1'"), cpl->file().get()
+ dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_EXTENSION_METADATA, string("No correctly-formed DCP Constraints Profile found"), cpl->file().get()
).set_cpl_id(cpl->id())
});
}
@@ -4475,6 +4478,9 @@ BOOST_AUTO_TEST_CASE (verify_invalid_xml_cpl_extension_metadata8)
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_CPL_HASHES, cpl->file().get()
).set_cpl_id(cpl->id()).set_reference_hash(calc.old_hash()).set_calculated_hash(calc.new_hash()),
+ dcp::VerificationNote(
+ dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_EXTENSION_METADATA, string("No correctly-formed DCP Constraints Profile found"), cpl->file().get()
+ ).set_cpl_id(cpl->id())
});
}
@@ -5875,3 +5881,15 @@ BOOST_AUTO_TEST_CASE(overlapping_subtitles)
dcp::verify_text_lines_and_characters(asset, 64, 80, &result);
}
+
+BOOST_AUTO_TEST_CASE(multiple_metadata_property)
+{
+ vector<dcp::VerificationNote> notes;
+ auto stage = [](std::string, boost::optional<boost::filesystem::path>) {};
+ auto progress = [](float) {};
+
+ dcp::Context context(notes, {}, stage, progress, {});
+ context.cpl = make_shared<dcp::CPL>(private_test / "CPL_6935f81f-30d3-4283-898e-5bb1e9c2558c.xml");
+ verify_extension_metadata(context);
+}
+