summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-08-11 23:35:30 +0200
committerCarl Hetherington <cth@carlh.net>2021-08-11 23:35:46 +0200
commitb3cb9c0e9712fdaa713b8b4b4d07dfa69dd690e4 (patch)
treefe6d64e692bde62c426c6f5f3dcd02176db57754
parentc259338463b394e61504ff0e232b0ba102c1eda2 (diff)
Improve message on verify test failure.
-rw-r--r--test/verify_test.cc13
1 files changed, 10 insertions, 3 deletions
diff --git a/test/verify_test.cc b/test/verify_test.cc
index ec4dea9d..c68152b3 100644
--- a/test/verify_test.cc
+++ b/test/verify_test.cc
@@ -239,12 +239,19 @@ void
check_verify_result (vector<path> dir, vector<dcp::VerificationNote> test_notes)
{
auto notes = dcp::verify ({dir}, &stage, &progress, xsd_test);
- BOOST_REQUIRE_EQUAL (notes.size(), test_notes.size());
std::sort (notes.begin(), notes.end());
std::sort (test_notes.begin(), test_notes.end());
- for (auto i = 0U; i < notes.size(); ++i) {
- BOOST_REQUIRE_MESSAGE (notes[i] == test_notes[i], "Note from verify:\n" << notes[i] << "\ndoes not match the expected:\n" << test_notes[i]);
+
+ string message = "\nVerification notes from test:\n";
+ for (auto i: notes) {
+ message += " " + note_to_string(i) + "\n";
}
+ message += "Expected:\n";
+ for (auto i: test_notes) {
+ message += " " + note_to_string(i) + "\n";
+ }
+
+ BOOST_REQUIRE_MESSAGE (notes == test_notes, message);
}