From: Carl Hetherington Date: Tue, 30 May 2023 15:20:32 +0000 (+0200) Subject: Clarify some test failure messages. X-Git-Tag: v2.16.58~15 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=be911c68ee4fdc98a8c406d0f10e9d71c69714c0 Clarify some test failure messages. --- 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 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; }