summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-05-30 17:20:32 +0200
committerCarl Hetherington <cth@carlh.net>2023-05-30 17:20:32 +0200
commitbe911c68ee4fdc98a8c406d0f10e9d71c69714c0 (patch)
tree590b7d7b76bec6e626e141a8bfea80ce983ea28f
parent6fc484fddc32ea7160ec8d9e16ffe1465c3be3ab (diff)
Clarify some test failure messages.
-rw-r--r--test/test.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/test.cc b/test/test.cc
index 06ec23dbc..3a2286eb8 100644
--- a/test/test.cc
+++ b/test/test.cc
@@ -989,11 +989,11 @@ find_file (boost::filesystem::path dir, string filename_part)
boost::optional<boost::filesystem::path> found;
for (auto i: boost::filesystem::directory_iterator(dir)) {
if (i.path().filename().string().find(filename_part) != string::npos) {
- BOOST_REQUIRE (!found);
+ BOOST_REQUIRE_MESSAGE(!found, "File " << filename_part << " found more than once in " << dir);
found = i;
}
}
- BOOST_REQUIRE (found);
+ BOOST_REQUIRE_MESSAGE(found, "Could not find " << filename_part << " in " << dir);
return *found;
}