summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-06-26 01:45:17 +0200
committerCarl Hetherington <cth@carlh.net>2023-06-27 00:09:54 +0200
commitc72e832423ceb81f30e8ca19bfeb87fca26298c1 (patch)
tree7981151787cad7ea2365cc302aec587079dd7ffe /test
parent54617cea2d186bd62eb44b07292b8722fe59ed4e (diff)
Add verifier check for the actual asset file's ID not being the same as the one in the asset map.
Diffstat (limited to 'test')
-rw-r--r--test/verify_test.cc24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/verify_test.cc b/test/verify_test.cc
index 310c1f81..bc76de75 100644
--- a/test/verify_test.cc
+++ b/test/verify_test.cc
@@ -3723,3 +3723,27 @@ BOOST_AUTO_TEST_CASE(verify_missing_load_font)
});
}
+
+BOOST_AUTO_TEST_CASE(verify_spots_wrong_asset)
+{
+ boost::filesystem::path const dir = "build/test/verify_spots_wrong_asset";
+ boost::filesystem::remove_all(dir);
+
+ auto dcp1 = make_simple(dir / "1");
+ dcp1->write_xml();
+
+ auto const asset_1 = dcp::MonoPictureAsset(dir / "1" / "video.mxf").id();
+
+ auto dcp2 = make_simple(dir / "2");
+ dcp2->write_xml();
+ auto const asset_2 = dcp::MonoPictureAsset(dir / "2" / "video.mxf").id();
+
+ boost::filesystem::remove(dir / "1" / "video.mxf");
+ boost::filesystem::copy_file(dir / "2" / "video.mxf", dir / "1" / "video.mxf");
+
+ check_verify_result(
+ {dir / "1"},
+ {
+ dcp::VerificationNote(dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_ASSET_MAP_ID).set_id(asset_1).set_other_id(asset_2)
+ });
+}