Add new OK type of verification note.
authorCarl Hetherington <cth@carlh.net>
Sun, 25 Dec 2022 23:29:30 +0000 (00:29 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 14 Apr 2024 15:27:42 +0000 (17:27 +0200)
src/verify.h
test/stream_operators.cc
tools/dcpverify.cc

index 4ca3297ac582d1b01c9f541d7f812b2d320414df..88b4d0b99c4a374fb5c0bd8d7bfd1a25b81ff1b9 100644 (file)
@@ -62,12 +62,13 @@ class VerificationNote
 {
 public:
        enum class Type {
+               OK,
                ERROR,
                BV21_ERROR, ///< may not always be considered an error, but violates a "shall" requirement of Bv2.1
                WARNING
        };
 
-       /** Codes for errors or warnings from verifying DCPs.
+       /** Codes for successful checks, errors or warnings from verifying DCPs.
         *
         *  The names should (in general) answer the question "what is wrong?" with an answer that begins "There is a ..."
         *  e.g. "There is a INCORRECT_CPL_HASH"
index 87949e8455597ec2486c51c7c8854ec28030e2fc..4895076a5f4e47e572a926e5f067ef2b96fc48bd 100644 (file)
@@ -208,6 +208,9 @@ ostream&
 dcp::operator<< (ostream& s, VerificationNote::Type t)
 {
        switch (t) {
+       case VerificationNote::Type::OK:
+               s << "check";
+               break;
        case VerificationNote::Type::ERROR:
                s << "error";
                break;
index 0ef256eb03976f432891a0656f5b03af173e1935..ebc02874e113c8e44c1991778c6b1c1ea8f025c0 100644 (file)
@@ -188,6 +188,8 @@ main (int argc, char* argv[])
                        continue;
                }
                switch (i.type()) {
+               case dcp::VerificationNote::Type::OK:
+                       break;
                case dcp::VerificationNote::Type::ERROR:
                        cout << "Error: " << note_to_string(i) << "\n";
                        failed = true;