diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-08-11 23:35:30 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-08-11 23:35:46 +0200 |
| commit | b3cb9c0e9712fdaa713b8b4b4d07dfa69dd690e4 (patch) | |
| tree | fe6d64e692bde62c426c6f5f3dcd02176db57754 | |
| parent | c259338463b394e61504ff0e232b0ba102c1eda2 (diff) | |
Improve message on verify test failure.
| -rw-r--r-- | test/verify_test.cc | 13 |
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); } |
