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 | |
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')
-rw-r--r-- | test/buildtool/logging/log_sink_file.test.cpp | 12 | ||||
-rw-r--r-- | test/buildtool/logging/logger.test.cpp | 2 |
2 files changed, 9 insertions, 5 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")); } } } diff --git a/test/buildtool/logging/logger.test.cpp b/test/buildtool/logging/logger.test.cpp index 93c916b8..fd8f3bda 100644 --- a/test/buildtool/logging/logger.test.cpp +++ b/test/buildtool/logging/logger.test.cpp @@ -16,7 +16,7 @@ #include <string> #include <unordered_map> -#include "catch2/catch.hpp" +#include "catch2/catch_test_macros.hpp" #include "src/buildtool/logging/log_config.hpp" #include "src/buildtool/logging/log_sink.hpp" #include "src/buildtool/logging/logger.hpp" |