diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-06-02 23:37:58 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-06-02 23:37:58 +0200 |
| commit | 8ea0d3bbc98054a2b6582343c96c4d03bcc2d4c1 (patch) | |
| tree | 20184a79624e3f2db735a5e98236cfafa28e0b28 | |
| parent | 6d3ad3c4d83297f277a7772c31b61034edab2a55 (diff) | |
Improve a test failure message.
| -rw-r--r-- | test/hints_test.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/hints_test.cc b/test/hints_test.cc index 42c1c7cda..55e859e0d 100644 --- a/test/hints_test.cc +++ b/test/hints_test.cc @@ -84,7 +84,11 @@ check (TextType type, string name, optional<string> expected_hint = optional<str BOOST_REQUIRE_EQUAL (hints.size(), 1U); BOOST_CHECK_EQUAL (hints[0], *expected_hint); } else { - BOOST_CHECK (hints.empty()); + string message; + for (auto hint: hints) { + message += hint + "\n"; + } + BOOST_CHECK_MESSAGE(hints.empty(), "Found: " << message); } } |
