diff options
author | Alberto Sartori <alberto.sartori@huawei.com> | 2023-03-15 13:02:35 +0100 |
---|---|---|
committer | Alberto Sartori <alberto.sartori@huawei.com> | 2023-03-15 14:36:44 +0100 |
commit | e73494c2342ef83c35c404a5bab306aac828770c (patch) | |
tree | 89cf80a176b1ea0729085879988cd1974d0e5fbd /test/buildtool/logging/log_sink_file.test.cpp | |
parent | 73c00a4820097588c2dc0bd9a89d34a65de0084b (diff) | |
download | justbuild-e73494c2342ef83c35c404a5bab306aac828770c.tar.gz |
catch2: bump to version 3.3.2
tests have been updated accordingly
Diffstat (limited to 'test/buildtool/logging/log_sink_file.test.cpp')
-rw-r--r-- | test/buildtool/logging/log_sink_file.test.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/test/buildtool/logging/log_sink_file.test.cpp b/test/buildtool/logging/log_sink_file.test.cpp index 5fda1680..f2c7095e 100644 --- a/test/buildtool/logging/log_sink_file.test.cpp +++ b/test/buildtool/logging/log_sink_file.test.cpp @@ -13,9 +13,12 @@ // limitations under the License. #include <fstream> +#include <iostream> #include <thread> -#include "catch2/catch.hpp" +#include "catch2/catch_test_macros.hpp" +#include "catch2/generators/catch_generators_all.hpp" +#include "catch2/matchers/catch_matchers_all.hpp" #include "src/buildtool/file_system/file_system_manager.hpp" #include "src/buildtool/logging/log_config.hpp" #include "src/buildtool/logging/log_sink_cmdline.hpp" @@ -104,10 +107,11 @@ TEST_CASE("LogSinkFile", "[logging]") { CHECK(lines.size() == num_threads + 1); // check for corrupted content - using Catch::Matchers::Contains; for (auto const& line : lines) { - CHECK_THAT(line, - Contains("somecontent") or Contains("this is thread ")); + CHECK_THAT( + line, + Catch::Matchers::ContainsSubstring("somecontent") || + Catch::Matchers::ContainsSubstring("this is thread")); } } } |