Some more details when verification results fail.
authorCarl Hetherington <cth@carlh.net>
Thu, 15 Dec 2022 22:51:21 +0000 (23:51 +0100)
committerCarl Hetherington <cth@carlh.net>
Thu, 15 Dec 2022 22:51:21 +0000 (23:51 +0100)
test/verify_test.cc

index 981f8e24557293c4df2df06a0aa4c36d090882a7..02067cf348f5f8e1ba5340e929518c6695d200f7 100644 (file)
@@ -304,10 +304,26 @@ check_verify_result (vector<path> dir, vector<dcp::VerificationNote> test_notes)
        string message = "\nVerification notes from test:\n";
        for (auto i: notes) {
                message += "  " + note_to_string(i) + "\n";
+               message += dcp::String::compose(
+                       "  [%1 %2 %3 %4 %5]\n",
+                       static_cast<int>(i.type()),
+                       static_cast<int>(i.code()),
+                       i.note().get_value_or("<none>"),
+                       i.file().get_value_or("<none>"),
+                       i.line().get_value_or(0)
+                       );
        }
        message += "Expected:\n";
        for (auto i: test_notes) {
                message += "  " + note_to_string(i) + "\n";
+               message += dcp::String::compose(
+                       "  [%1 %2 %3 %4 %5]\n",
+                       static_cast<int>(i.type()),
+                       static_cast<int>(i.code()),
+                       i.note().get_value_or("<none>"),
+                       i.file().get_value_or("<none>"),
+                       i.line().get_value_or(0)
+                       );
        }
 
        BOOST_REQUIRE_MESSAGE (notes == test_notes, message);