From 56fcbad9cac0972d4895ac03d935471da8673e0c Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 24 Mar 2022 01:28:16 +0100 Subject: Add verify test to check for erroneous and tags inside --- src/verify.cc | 10 ++++++++++ src/verify.h | 5 +++++ 2 files changed, 15 insertions(+) (limited to 'src') diff --git a/src/verify.cc b/src/verify.cc index a0c329d0..bef05a16 100644 --- a/src/verify.cc +++ b/src/verify.cc @@ -1452,6 +1452,12 @@ dcp::verify ( for (auto const& i: reel->main_markers()->get()) { markers_seen.insert (i); } + if (reel->main_markers()->entry_point()) { + notes.push_back ({VerificationNote::Type::ERROR, VerificationNote::Code::UNEXPECTED_ENTRY_POINT}); + } + if (reel->main_markers()->duration()) { + notes.push_back ({VerificationNote::Type::ERROR, VerificationNote::Code::UNEXPECTED_DURATION}); + } } fewest_closed_captions = std::min (fewest_closed_captions, reel->closed_captions().size()); @@ -1763,6 +1769,10 @@ dcp::note_to_string (VerificationNote note) return "Some closed or nodes have different vertical alignments within a ."; case VerificationNote::Code::INCORRECT_CLOSED_CAPTION_ORDERING: return "Some closed captions are not listed in the order of their vertical position."; + case VerificationNote::Code::UNEXPECTED_ENTRY_POINT: + return "There is an node inside a ."; + case VerificationNote::Code::UNEXPECTED_DURATION: + return "There is an node inside a ."; } return ""; diff --git a/src/verify.h b/src/verify.h index 424b29e7..3dd7d125 100644 --- a/src/verify.h +++ b/src/verify.h @@ -82,6 +82,7 @@ public: * - MISMATCHED: two things, which should be the same, are not. * - EMPTY: something, which should have a value, has no value. * - MISSING: something, which should be present, is not. + * - UNEXPECTED: something, which is present, should not be. * - FAILED: some part of the verification failed in some serious way. * * Comments should clarify meaning and also say which of the optional fields (e.g. file) @@ -392,6 +393,10 @@ public: MISMATCHED_CLOSED_CAPTION_VALIGN, /** Some closed captions are not listed in the XML in the order of their vertical position */ INCORRECT_CLOSED_CAPTION_ORDERING, + /** Some asset has an that should not be there */ + UNEXPECTED_ENTRY_POINT, + /** Some asset has an that should not be there */ + UNEXPECTED_DURATION }; VerificationNote (Type type, Code code) -- cgit v1.2.3