summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlberto Sartori <alberto.sartori@huawei.com>2023-03-15 13:02:35 +0100
committerAlberto Sartori <alberto.sartori@huawei.com>2023-03-15 14:36:44 +0100
commite73494c2342ef83c35c404a5bab306aac828770c (patch)
tree89cf80a176b1ea0729085879988cd1974d0e5fbd /test
parent73c00a4820097588c2dc0bd9a89d34a65de0084b (diff)
downloadjustbuild-e73494c2342ef83c35c404a5bab306aac828770c.tar.gz
catch2: bump to version 3.3.2
tests have been updated accordingly
Diffstat (limited to 'test')
-rw-r--r--test/buildtool/build_engine/base_maps/directory_map.test.cpp2
-rw-r--r--test/buildtool/build_engine/base_maps/entity_name.test.cpp2
-rw-r--r--test/buildtool/build_engine/base_maps/expression_map.test.cpp2
-rw-r--r--test/buildtool/build_engine/base_maps/json_file_map.test.cpp2
-rw-r--r--test/buildtool/build_engine/base_maps/rule_map.test.cpp2
-rw-r--r--test/buildtool/build_engine/base_maps/source_map.test.cpp2
-rw-r--r--test/buildtool/build_engine/expression/configuration.test.cpp2
-rw-r--r--test/buildtool/build_engine/expression/expression.test.cpp6
-rw-r--r--test/buildtool/build_engine/expression/linked_map.test.cpp2
-rw-r--r--test/buildtool/build_engine/target_map/result_map.test.cpp2
-rw-r--r--test/buildtool/build_engine/target_map/target_map.test.cpp2
-rw-r--r--test/buildtool/build_engine/target_map/target_map_internals.test.cpp2
-rw-r--r--test/buildtool/common/action_description.test.cpp2
-rw-r--r--test/buildtool/common/artifact_description.test.cpp2
-rw-r--r--test/buildtool/common/artifact_factory.test.cpp2
-rw-r--r--test/buildtool/common/repository_config.test.cpp2
-rw-r--r--test/buildtool/crypto/hash_function.test.cpp2
-rw-r--r--test/buildtool/crypto/hasher.test.cpp2
-rw-r--r--test/buildtool/execution_api/bazel/bazel_api.test.cpp2
-rw-r--r--test/buildtool/execution_api/bazel/bazel_cas_client.test.cpp2
-rwxr-xr-xtest/buildtool/execution_api/bazel/bazel_execution_client.test.cpp2
-rw-r--r--test/buildtool/execution_api/bazel/bazel_msg_factory.test.cpp2
-rw-r--r--test/buildtool/execution_api/bazel/bazel_network.test.cpp2
-rw-r--r--test/buildtool/execution_api/bazel/bytestream_client.test.cpp2
-rw-r--r--test/buildtool/execution_api/common/api_test.hpp2
-rw-r--r--test/buildtool/execution_api/local/local_api.test.cpp2
-rwxr-xr-xtest/buildtool/execution_api/local/local_execution.test.cpp2
-rw-r--r--test/buildtool/execution_engine/dag/dag.test.cpp2
-rwxr-xr-xtest/buildtool/execution_engine/executor/executor.test.cpp2
-rwxr-xr-xtest/buildtool/execution_engine/executor/executor_api.test.hpp2
-rwxr-xr-xtest/buildtool/execution_engine/executor/executor_api_local.test.cpp2
-rwxr-xr-xtest/buildtool/execution_engine/executor/executor_api_remote_bazel.test.cpp2
-rw-r--r--test/buildtool/execution_engine/traverser/traverser.test.cpp2
-rw-r--r--test/buildtool/file_system/directory_entries.test.cpp2
-rw-r--r--test/buildtool/file_system/file_root.test.cpp2
-rw-r--r--test/buildtool/file_system/file_system_manager.test.cpp3
-rw-r--r--test/buildtool/file_system/git_repo.test.cpp2
-rw-r--r--test/buildtool/file_system/git_tree.test.cpp2
-rw-r--r--test/buildtool/file_system/object_cas.test.cpp2
-rw-r--r--test/buildtool/graph_traverser/graph_traverser.test.hpp2
-rw-r--r--test/buildtool/graph_traverser/graph_traverser_local.test.cpp2
-rw-r--r--test/buildtool/graph_traverser/graph_traverser_remote.test.cpp2
-rw-r--r--test/buildtool/logging/log_sink_file.test.cpp12
-rw-r--r--test/buildtool/logging/logger.test.cpp2
-rw-r--r--test/buildtool/main/install_cas.test.cpp2
-rw-r--r--test/buildtool/multithreading/async_map.test.cpp2
-rw-r--r--test/buildtool/multithreading/async_map_consumer.test.cpp3
-rw-r--r--test/buildtool/multithreading/async_map_node.test.cpp3
-rw-r--r--test/buildtool/multithreading/task.test.cpp54
-rw-r--r--test/buildtool/multithreading/task_system.test.cpp4
-rw-r--r--test/buildtool/storage/local_ac.test.cpp2
-rw-r--r--test/buildtool/storage/local_cas.test.cpp2
-rw-r--r--test/buildtool/system/system_command.test.cpp3
-rw-r--r--test/main.cpp3
-rw-r--r--test/other_tools/git_operations/critical_git_ops.test.cpp2
-rw-r--r--test/other_tools/git_operations/git_repo_remote.test.cpp2
-rw-r--r--test/other_tools/utils/archive_usage.test.cpp2
-rw-r--r--test/other_tools/utils/curl_url.test.cpp2
-rw-r--r--test/other_tools/utils/curl_usage.test.cpp2
-rw-r--r--test/utils/container_matchers.hpp9
-rw-r--r--test/utils/cpp/file_locking.test.cpp2
-rw-r--r--test/utils/cpp/path.test.cpp2
-rw-r--r--test/utils/remote_execution/main-remote-execution.cpp3
63 files changed, 127 insertions, 80 deletions
diff --git a/test/buildtool/build_engine/base_maps/directory_map.test.cpp b/test/buildtool/build_engine/base_maps/directory_map.test.cpp
index 82227c28..1b9fe6cd 100644
--- a/test/buildtool/build_engine/base_maps/directory_map.test.cpp
+++ b/test/buildtool/build_engine/base_maps/directory_map.test.cpp
@@ -14,7 +14,7 @@
#include <filesystem>
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/build_engine/base_maps/directory_map.hpp"
#include "src/buildtool/common/repository_config.hpp"
#include "src/buildtool/multithreading/task_system.hpp"
diff --git a/test/buildtool/build_engine/base_maps/entity_name.test.cpp b/test/buildtool/build_engine/base_maps/entity_name.test.cpp
index feb80b2d..223de0fc 100644
--- a/test/buildtool/build_engine/base_maps/entity_name.test.cpp
+++ b/test/buildtool/build_engine/base_maps/entity_name.test.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/build_engine/base_maps/entity_name.hpp"
TEST_CASE("Normal module names") {
diff --git a/test/buildtool/build_engine/base_maps/expression_map.test.cpp b/test/buildtool/build_engine/base_maps/expression_map.test.cpp
index 58d1161b..89b73d33 100644
--- a/test/buildtool/build_engine/base_maps/expression_map.test.cpp
+++ b/test/buildtool/build_engine/base_maps/expression_map.test.cpp
@@ -15,7 +15,7 @@
#include <filesystem>
#include <functional>
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/build_engine/base_maps/expression_map.hpp"
#include "src/buildtool/build_engine/base_maps/json_file_map.hpp"
#include "src/buildtool/common/repository_config.hpp"
diff --git a/test/buildtool/build_engine/base_maps/json_file_map.test.cpp b/test/buildtool/build_engine/base_maps/json_file_map.test.cpp
index f57fd5ff..15ff87cd 100644
--- a/test/buildtool/build_engine/base_maps/json_file_map.test.cpp
+++ b/test/buildtool/build_engine/base_maps/json_file_map.test.cpp
@@ -15,7 +15,7 @@
#include <filesystem>
#include <utility>
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/build_engine/base_maps/json_file_map.hpp"
#include "src/buildtool/multithreading/task_system.hpp"
#include "test/buildtool/build_engine/base_maps/test_repo.hpp"
diff --git a/test/buildtool/build_engine/base_maps/rule_map.test.cpp b/test/buildtool/build_engine/base_maps/rule_map.test.cpp
index eb61c05a..4235d1f1 100644
--- a/test/buildtool/build_engine/base_maps/rule_map.test.cpp
+++ b/test/buildtool/build_engine/base_maps/rule_map.test.cpp
@@ -15,7 +15,7 @@
#include <filesystem>
#include <functional>
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/build_engine/base_maps/expression_map.hpp"
#include "src/buildtool/build_engine/base_maps/json_file_map.hpp"
#include "src/buildtool/build_engine/base_maps/rule_map.hpp"
diff --git a/test/buildtool/build_engine/base_maps/source_map.test.cpp b/test/buildtool/build_engine/base_maps/source_map.test.cpp
index 15b32ead..3b787ffe 100644
--- a/test/buildtool/build_engine/base_maps/source_map.test.cpp
+++ b/test/buildtool/build_engine/base_maps/source_map.test.cpp
@@ -15,7 +15,7 @@
#include <filesystem>
#include <utility>
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/build_engine/base_maps/directory_map.hpp"
#include "src/buildtool/build_engine/base_maps/entity_name.hpp"
#include "src/buildtool/build_engine/base_maps/source_map.hpp"
diff --git a/test/buildtool/build_engine/expression/configuration.test.cpp b/test/buildtool/build_engine/expression/configuration.test.cpp
index 2ca98a24..47ad8084 100644
--- a/test/buildtool/build_engine/expression/configuration.test.cpp
+++ b/test/buildtool/build_engine/expression/configuration.test.cpp
@@ -14,7 +14,7 @@
#include <vector>
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/build_engine/expression/configuration.hpp"
#include "test/utils/container_matchers.hpp"
diff --git a/test/buildtool/build_engine/expression/expression.test.cpp b/test/buildtool/build_engine/expression/expression.test.cpp
index 780b66e5..10edbcbd 100644
--- a/test/buildtool/build_engine/expression/expression.test.cpp
+++ b/test/buildtool/build_engine/expression/expression.test.cpp
@@ -12,7 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
+#include "catch2/matchers/catch_matchers_all.hpp"
#include "src/buildtool/build_engine/expression/configuration.hpp"
#include "src/buildtool/build_engine/expression/expression.hpp"
#include "src/buildtool/build_engine/expression/function_map.hpp"
@@ -78,7 +79,8 @@ TEST_CASE("Expression access", "[expression]") { // NOLINT
CHECK(result->Result() == result_t{boolean, number, string});
CHECK_THROWS_AS(result->String(), Expression::ExpressionTypeError);
- CHECK_THAT(list->List(), Catch::Equals<ExpressionPtr>({number}));
+ CHECK_THAT(list->List(),
+ Catch::Matchers::Equals<ExpressionPtr>({number}));
CHECK_THROWS_AS(list->Map(), Expression::ExpressionTypeError);
REQUIRE(map->Map().at("3"s) == number);
diff --git a/test/buildtool/build_engine/expression/linked_map.test.cpp b/test/buildtool/build_engine/expression/linked_map.test.cpp
index 358ac229..dd15a5b0 100644
--- a/test/buildtool/build_engine/expression/linked_map.test.cpp
+++ b/test/buildtool/build_engine/expression/linked_map.test.cpp
@@ -14,7 +14,7 @@
#include <algorithm>
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/build_engine/expression/linked_map.hpp"
#include "test/utils/container_matchers.hpp"
diff --git a/test/buildtool/build_engine/target_map/result_map.test.cpp b/test/buildtool/build_engine/target_map/result_map.test.cpp
index bb901d36..07e12f80 100644
--- a/test/buildtool/build_engine/target_map/result_map.test.cpp
+++ b/test/buildtool/build_engine/target_map/result_map.test.cpp
@@ -18,7 +18,7 @@
#include <string>
#include <vector>
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/build_engine/target_map/result_map.hpp"
#include "src/buildtool/file_system/file_system_manager.hpp"
diff --git a/test/buildtool/build_engine/target_map/target_map.test.cpp b/test/buildtool/build_engine/target_map/target_map.test.cpp
index e111f98f..6d9cbbdd 100644
--- a/test/buildtool/build_engine/target_map/target_map.test.cpp
+++ b/test/buildtool/build_engine/target_map/target_map.test.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/build_engine/base_maps/directory_map.hpp"
#include "src/buildtool/build_engine/base_maps/entity_name.hpp"
#include "src/buildtool/build_engine/base_maps/expression_map.hpp"
diff --git a/test/buildtool/build_engine/target_map/target_map_internals.test.cpp b/test/buildtool/build_engine/target_map/target_map_internals.test.cpp
index d0c67dde..c562b8fd 100644
--- a/test/buildtool/build_engine/target_map/target_map_internals.test.cpp
+++ b/test/buildtool/build_engine/target_map/target_map_internals.test.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/build_engine/expression/expression.hpp"
#include "src/buildtool/build_engine/target_map/utils.hpp"
diff --git a/test/buildtool/common/action_description.test.cpp b/test/buildtool/common/action_description.test.cpp
index 5f3b1b57..b32e6914 100644
--- a/test/buildtool/common/action_description.test.cpp
+++ b/test/buildtool/common/action_description.test.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/common/action_description.hpp"
#include "src/buildtool/common/artifact_factory.hpp"
diff --git a/test/buildtool/common/artifact_description.test.cpp b/test/buildtool/common/artifact_description.test.cpp
index 7de79dcf..434c0d91 100644
--- a/test/buildtool/common/artifact_description.test.cpp
+++ b/test/buildtool/common/artifact_description.test.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/common/artifact_description.hpp"
#include "src/buildtool/common/artifact_factory.hpp"
diff --git a/test/buildtool/common/artifact_factory.test.cpp b/test/buildtool/common/artifact_factory.test.cpp
index 47e3d0e5..a71a5b63 100644
--- a/test/buildtool/common/artifact_factory.test.cpp
+++ b/test/buildtool/common/artifact_factory.test.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/common/artifact_factory.hpp"
TEST_CASE("Description missing mandatory key/value pair",
diff --git a/test/buildtool/common/repository_config.test.cpp b/test/buildtool/common/repository_config.test.cpp
index 406ca2fe..29c89d50 100644
--- a/test/buildtool/common/repository_config.test.cpp
+++ b/test/buildtool/common/repository_config.test.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/common/repository_config.hpp"
#include "src/buildtool/storage/storage.hpp"
#include "test/utils/hermeticity/local.hpp"
diff --git a/test/buildtool/crypto/hash_function.test.cpp b/test/buildtool/crypto/hash_function.test.cpp
index efee09fd..340384e7 100644
--- a/test/buildtool/crypto/hash_function.test.cpp
+++ b/test/buildtool/crypto/hash_function.test.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/crypto/hash_function.hpp"
TEST_CASE("Hash Function", "[crypto]") {
diff --git a/test/buildtool/crypto/hasher.test.cpp b/test/buildtool/crypto/hasher.test.cpp
index 45f24db7..26cc8568 100644
--- a/test/buildtool/crypto/hasher.test.cpp
+++ b/test/buildtool/crypto/hasher.test.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/crypto/hasher.hpp"
template <Hasher::HashType type>
diff --git a/test/buildtool/execution_api/bazel/bazel_api.test.cpp b/test/buildtool/execution_api/bazel/bazel_api.test.cpp
index 9eadb483..288b9bcc 100644
--- a/test/buildtool/execution_api/bazel/bazel_api.test.cpp
+++ b/test/buildtool/execution_api/bazel/bazel_api.test.cpp
@@ -15,7 +15,7 @@
#include <cstdlib>
#include <string>
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/execution_api/remote/bazel/bazel_api.hpp"
#include "src/buildtool/execution_api/remote/config.hpp"
#include "test/buildtool/execution_api/common/api_test.hpp"
diff --git a/test/buildtool/execution_api/bazel/bazel_cas_client.test.cpp b/test/buildtool/execution_api/bazel/bazel_cas_client.test.cpp
index 8b81307b..8d21dbb3 100644
--- a/test/buildtool/execution_api/bazel/bazel_cas_client.test.cpp
+++ b/test/buildtool/execution_api/bazel/bazel_cas_client.test.cpp
@@ -14,7 +14,7 @@
#include <string>
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/execution_api/remote/bazel/bazel_cas_client.hpp"
#include "src/buildtool/execution_api/remote/bazel/bazel_execution_client.hpp"
#include "src/buildtool/execution_api/remote/config.hpp"
diff --git a/test/buildtool/execution_api/bazel/bazel_execution_client.test.cpp b/test/buildtool/execution_api/bazel/bazel_execution_client.test.cpp
index d136e818..cb79fc8d 100755
--- a/test/buildtool/execution_api/bazel/bazel_execution_client.test.cpp
+++ b/test/buildtool/execution_api/bazel/bazel_execution_client.test.cpp
@@ -14,7 +14,7 @@
#include <string>
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/execution_api/remote/bazel/bazel_execution_client.hpp"
#include "src/buildtool/execution_api/remote/config.hpp"
#include "test/utils/remote_execution/bazel_action_creator.hpp"
diff --git a/test/buildtool/execution_api/bazel/bazel_msg_factory.test.cpp b/test/buildtool/execution_api/bazel/bazel_msg_factory.test.cpp
index 67deb467..4322a46b 100644
--- a/test/buildtool/execution_api/bazel/bazel_msg_factory.test.cpp
+++ b/test/buildtool/execution_api/bazel/bazel_msg_factory.test.cpp
@@ -14,7 +14,7 @@
#include <filesystem>
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/common/artifact_factory.hpp"
#include "src/buildtool/execution_api/bazel_msg/bazel_blob.hpp"
#include "src/buildtool/execution_api/bazel_msg/bazel_blob_container.hpp"
diff --git a/test/buildtool/execution_api/bazel/bazel_network.test.cpp b/test/buildtool/execution_api/bazel/bazel_network.test.cpp
index b7f801f2..80714b97 100644
--- a/test/buildtool/execution_api/bazel/bazel_network.test.cpp
+++ b/test/buildtool/execution_api/bazel/bazel_network.test.cpp
@@ -14,7 +14,7 @@
#include <string>
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/execution_api/remote/bazel/bazel_execution_client.hpp"
#include "src/buildtool/execution_api/remote/bazel/bazel_network.hpp"
#include "src/buildtool/execution_api/remote/config.hpp"
diff --git a/test/buildtool/execution_api/bazel/bytestream_client.test.cpp b/test/buildtool/execution_api/bazel/bytestream_client.test.cpp
index c7e4d7bc..e67afdb2 100644
--- a/test/buildtool/execution_api/bazel/bytestream_client.test.cpp
+++ b/test/buildtool/execution_api/bazel/bytestream_client.test.cpp
@@ -14,7 +14,7 @@
#include <string>
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/execution_api/bazel_msg/bazel_blob.hpp"
#include "src/buildtool/execution_api/common/execution_common.hpp"
#include "src/buildtool/execution_api/remote/bazel/bytestream_client.hpp"
diff --git a/test/buildtool/execution_api/common/api_test.hpp b/test/buildtool/execution_api/common/api_test.hpp
index 2589bbdf..4e4c0793 100644
--- a/test/buildtool/execution_api/common/api_test.hpp
+++ b/test/buildtool/execution_api/common/api_test.hpp
@@ -15,7 +15,7 @@
#include <cstdlib>
#include <string>
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/common/artifact_factory.hpp"
#include "src/buildtool/execution_api/common/execution_action.hpp"
#include "src/buildtool/execution_api/common/execution_api.hpp"
diff --git a/test/buildtool/execution_api/local/local_api.test.cpp b/test/buildtool/execution_api/local/local_api.test.cpp
index cd1d866f..38c9007d 100644
--- a/test/buildtool/execution_api/local/local_api.test.cpp
+++ b/test/buildtool/execution_api/local/local_api.test.cpp
@@ -15,7 +15,7 @@
#include <cstdlib>
#include <string>
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/execution_api/local/local_api.hpp"
#include "test/buildtool/execution_api/common/api_test.hpp"
#include "test/utils/hermeticity/local.hpp"
diff --git a/test/buildtool/execution_api/local/local_execution.test.cpp b/test/buildtool/execution_api/local/local_execution.test.cpp
index b695df1e..9dbed876 100755
--- a/test/buildtool/execution_api/local/local_execution.test.cpp
+++ b/test/buildtool/execution_api/local/local_execution.test.cpp
@@ -16,7 +16,7 @@
#include <string>
#include <vector>
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/common/artifact_factory.hpp"
#include "src/buildtool/execution_api/local/local_api.hpp"
#include "test/utils/hermeticity/local.hpp"
diff --git a/test/buildtool/execution_engine/dag/dag.test.cpp b/test/buildtool/execution_engine/dag/dag.test.cpp
index 7a1ca1de..b793a2a7 100644
--- a/test/buildtool/execution_engine/dag/dag.test.cpp
+++ b/test/buildtool/execution_engine/dag/dag.test.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/common/artifact_factory.hpp"
#include "src/buildtool/execution_engine/dag/dag.hpp"
#include "test/utils/container_matchers.hpp"
diff --git a/test/buildtool/execution_engine/executor/executor.test.cpp b/test/buildtool/execution_engine/executor/executor.test.cpp
index 0c5279a0..e4cdb3a1 100755
--- a/test/buildtool/execution_engine/executor/executor.test.cpp
+++ b/test/buildtool/execution_engine/executor/executor.test.cpp
@@ -16,7 +16,7 @@
#include <unordered_map>
#include <vector>
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/common/artifact_factory.hpp"
#include "src/buildtool/execution_api/common/execution_api.hpp"
#include "src/buildtool/execution_engine/executor/executor.hpp"
diff --git a/test/buildtool/execution_engine/executor/executor_api.test.hpp b/test/buildtool/execution_engine/executor/executor_api.test.hpp
index c83bc615..f432fb54 100755
--- a/test/buildtool/execution_engine/executor/executor_api.test.hpp
+++ b/test/buildtool/execution_engine/executor/executor_api.test.hpp
@@ -17,7 +17,7 @@
#include <functional>
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/common/artifact.hpp"
#include "src/buildtool/common/artifact_description.hpp"
#include "src/buildtool/common/artifact_factory.hpp"
diff --git a/test/buildtool/execution_engine/executor/executor_api_local.test.cpp b/test/buildtool/execution_engine/executor/executor_api_local.test.cpp
index d09ad17f..3f5f2ac9 100755
--- a/test/buildtool/execution_engine/executor/executor_api_local.test.cpp
+++ b/test/buildtool/execution_engine/executor/executor_api_local.test.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/execution_api/local/local_api.hpp"
#include "src/buildtool/execution_api/remote/config.hpp"
#include "src/buildtool/execution_engine/executor/executor.hpp"
diff --git a/test/buildtool/execution_engine/executor/executor_api_remote_bazel.test.cpp b/test/buildtool/execution_engine/executor/executor_api_remote_bazel.test.cpp
index 76d03aef..fb34749f 100755
--- a/test/buildtool/execution_engine/executor/executor_api_remote_bazel.test.cpp
+++ b/test/buildtool/execution_engine/executor/executor_api_remote_bazel.test.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/execution_api/remote/bazel/bazel_api.hpp"
#include "src/buildtool/execution_api/remote/config.hpp"
#include "src/buildtool/execution_engine/executor/executor.hpp"
diff --git a/test/buildtool/execution_engine/traverser/traverser.test.cpp b/test/buildtool/execution_engine/traverser/traverser.test.cpp
index f002d34e..2354aaf1 100644
--- a/test/buildtool/execution_engine/traverser/traverser.test.cpp
+++ b/test/buildtool/execution_engine/traverser/traverser.test.cpp
@@ -20,7 +20,7 @@
#include <variant>
#include <vector>
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/common/artifact_factory.hpp"
#include "src/buildtool/execution_engine/dag/dag.hpp"
#include "src/buildtool/execution_engine/traverser/traverser.hpp"
diff --git a/test/buildtool/file_system/directory_entries.test.cpp b/test/buildtool/file_system/directory_entries.test.cpp
index 009a09f6..b2729b58 100644
--- a/test/buildtool/file_system/directory_entries.test.cpp
+++ b/test/buildtool/file_system/directory_entries.test.cpp
@@ -15,7 +15,7 @@
#include <atomic>
#include <thread>
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/common/artifact_description.hpp"
#include "src/buildtool/file_system/file_root.hpp"
#include "test/utils/container_matchers.hpp"
diff --git a/test/buildtool/file_system/file_root.test.cpp b/test/buildtool/file_system/file_root.test.cpp
index 7ac1c680..1255a263 100644
--- a/test/buildtool/file_system/file_root.test.cpp
+++ b/test/buildtool/file_system/file_root.test.cpp
@@ -15,7 +15,7 @@
#include <atomic>
#include <thread>
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/common/artifact_description.hpp"
#include "src/buildtool/file_system/file_root.hpp"
#include "test/utils/container_matchers.hpp"
diff --git a/test/buildtool/file_system/file_system_manager.test.cpp b/test/buildtool/file_system/file_system_manager.test.cpp
index 8958854d..f627bf02 100644
--- a/test/buildtool/file_system/file_system_manager.test.cpp
+++ b/test/buildtool/file_system/file_system_manager.test.cpp
@@ -18,7 +18,8 @@
#include <filesystem>
#include <iostream>
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
+#include "catch2/generators/catch_generators_all.hpp"
#include "src/buildtool/file_system/file_system_manager.hpp"
class CopyFileFixture {
diff --git a/test/buildtool/file_system/git_repo.test.cpp b/test/buildtool/file_system/git_repo.test.cpp
index 01898c26..55e51148 100644
--- a/test/buildtool/file_system/git_repo.test.cpp
+++ b/test/buildtool/file_system/git_repo.test.cpp
@@ -14,7 +14,7 @@
#include <thread>
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "nlohmann/json.hpp"
#include "src/buildtool/file_system/file_system_manager.hpp"
#include "src/buildtool/file_system/git_repo.hpp"
diff --git a/test/buildtool/file_system/git_tree.test.cpp b/test/buildtool/file_system/git_tree.test.cpp
index ace61721..b6daea57 100644
--- a/test/buildtool/file_system/git_tree.test.cpp
+++ b/test/buildtool/file_system/git_tree.test.cpp
@@ -14,7 +14,7 @@
#include <thread>
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/file_system/file_system_manager.hpp"
#include "src/buildtool/file_system/git_tree.hpp"
#include "test/utils/container_matchers.hpp"
diff --git a/test/buildtool/file_system/object_cas.test.cpp b/test/buildtool/file_system/object_cas.test.cpp
index bf20a287..3692b5fb 100644
--- a/test/buildtool/file_system/object_cas.test.cpp
+++ b/test/buildtool/file_system/object_cas.test.cpp
@@ -14,7 +14,7 @@
#include <string>
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/crypto/hash_function.hpp"
#include "src/buildtool/file_system/file_system_manager.hpp"
#include "src/buildtool/file_system/object_cas.hpp"
diff --git a/test/buildtool/graph_traverser/graph_traverser.test.hpp b/test/buildtool/graph_traverser/graph_traverser.test.hpp
index b6dfbea4..c5ffb840 100644
--- a/test/buildtool/graph_traverser/graph_traverser.test.hpp
+++ b/test/buildtool/graph_traverser/graph_traverser.test.hpp
@@ -19,7 +19,7 @@
#include <sstream>
#include <utility>
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/common/statistics.hpp"
#include "src/buildtool/file_system/file_system_manager.hpp"
#include "src/buildtool/file_system/jsonfs.hpp"
diff --git a/test/buildtool/graph_traverser/graph_traverser_local.test.cpp b/test/buildtool/graph_traverser/graph_traverser_local.test.cpp
index 0641c38b..bfb8a2e0 100644
--- a/test/buildtool/graph_traverser/graph_traverser_local.test.cpp
+++ b/test/buildtool/graph_traverser/graph_traverser_local.test.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "test/buildtool/graph_traverser/graph_traverser.test.hpp"
#include "test/utils/hermeticity/local.hpp"
diff --git a/test/buildtool/graph_traverser/graph_traverser_remote.test.cpp b/test/buildtool/graph_traverser/graph_traverser_remote.test.cpp
index 4cdabffc..48867d16 100644
--- a/test/buildtool/graph_traverser/graph_traverser_remote.test.cpp
+++ b/test/buildtool/graph_traverser/graph_traverser_remote.test.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "test/buildtool/graph_traverser/graph_traverser.test.hpp"
TEST_CASE("Remote: Output created and contents are correct",
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"
diff --git a/test/buildtool/main/install_cas.test.cpp b/test/buildtool/main/install_cas.test.cpp
index 810b532b..6929d446 100644
--- a/test/buildtool/main/install_cas.test.cpp
+++ b/test/buildtool/main/install_cas.test.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/main/install_cas.hpp"
TEST_CASE("ObjectInfoFromLiberalString", "[artifact]") {
diff --git a/test/buildtool/multithreading/async_map.test.cpp b/test/buildtool/multithreading/async_map.test.cpp
index 589b799a..30a6322a 100644
--- a/test/buildtool/multithreading/async_map.test.cpp
+++ b/test/buildtool/multithreading/async_map.test.cpp
@@ -14,7 +14,7 @@
#include <string>
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/multithreading/async_map.hpp"
#include "src/buildtool/multithreading/async_map_node.hpp"
#include "src/buildtool/multithreading/task_system.hpp"
diff --git a/test/buildtool/multithreading/async_map_consumer.test.cpp b/test/buildtool/multithreading/async_map_consumer.test.cpp
index f9cbc36b..4e8df652 100644
--- a/test/buildtool/multithreading/async_map_consumer.test.cpp
+++ b/test/buildtool/multithreading/async_map_consumer.test.cpp
@@ -16,7 +16,8 @@
#include <numeric>
#include <string>
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
+#include "catch2/matchers/catch_matchers_all.hpp"
#include "src/buildtool/multithreading/async_map.hpp"
#include "src/buildtool/multithreading/async_map_consumer.hpp"
#include "src/buildtool/multithreading/task_system.hpp"
diff --git a/test/buildtool/multithreading/async_map_node.test.cpp b/test/buildtool/multithreading/async_map_node.test.cpp
index 8aa8f598..8dd9bf89 100644
--- a/test/buildtool/multithreading/async_map_node.test.cpp
+++ b/test/buildtool/multithreading/async_map_node.test.cpp
@@ -16,7 +16,8 @@
#include <string>
#include <thread>
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
+#include "catch2/matchers/catch_matchers_all.hpp"
#include "src/buildtool/multithreading/async_map_node.hpp"
#include "src/buildtool/multithreading/task_system.hpp"
diff --git a/test/buildtool/multithreading/task.test.cpp b/test/buildtool/multithreading/task.test.cpp
index c39067ed..cb540def 100644
--- a/test/buildtool/multithreading/task.test.cpp
+++ b/test/buildtool/multithreading/task.test.cpp
@@ -12,11 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/multithreading/task.hpp"
namespace {
-
+constexpr int kDummyValue{5};
struct StatelessCallable {
void operator()() noexcept {}
};
@@ -25,7 +25,7 @@ struct ValueCaptureCallable {
explicit ValueCaptureCallable(int i) noexcept : number{i} {}
// NOLINTNEXTLINE
- void operator()() noexcept { number += 5; }
+ void operator()() noexcept { number += kDummyValue; }
int number;
};
@@ -125,12 +125,24 @@ TEST_CASE("Task constructed from lambda is not empty", "[task]") {
SECTION("Value capture") {
int a = 1;
// NOLINTNEXTLINE
- Task t_value{[num = a]() mutable { num += 5; }};
+ Task t_value{[num = a]() mutable {
+ num += kDummyValue;
+ // get rid of "set but unused var"
+ static_cast<void>(num);
+ }};
// NOLINTNEXTLINE
- auto lambda = [num = a]() mutable { num += 5; };
+ auto lambda = [num = a]() mutable {
+ num += kDummyValue;
+ // get rid of "set but unused var"
+ static_cast<void>(num);
+ };
Task t_from_named_lambda_value_capture{lambda};
- CHECK(Task{[num = a]() mutable { num += 5; }});
+ CHECK(Task{[num = a]() mutable {
+ num += kDummyValue;
+ // get rid of "set but unused var"
+ static_cast<void>(num);
+ }});
CHECK(Task{lambda});
CHECK(t_value);
CHECK(t_from_named_lambda_value_capture);
@@ -174,7 +186,11 @@ TEST_CASE("Task can be executed and doesn't steal contents", "[task]") {
int const initial_value = 2;
int num = initial_value;
// NOLINTNEXTLINE
- Task t_add_five{[a = num]() mutable { a += 5; }};
+ Task t_add_five{[a = num]() mutable {
+ a += kDummyValue;
+ // get rid of "set but unused var"
+ static_cast<void>(a);
+ }};
t_add_five();
// Internal data can not be observed, external data does not change
@@ -197,7 +213,11 @@ TEST_CASE("Task can be executed and doesn't steal contents", "[task]") {
int const initial_value = 2;
int num = initial_value;
// NOLINTNEXTLINE
- auto add_five = [a = num]() mutable { a += 5; };
+ auto add_five = [a = num]() mutable {
+ a += kDummyValue;
+ // get rid of "set but unused var"
+ static_cast<void>(a);
+ };
Task t_add_five{add_five};
t_add_five();
@@ -227,7 +247,11 @@ TEST_CASE("Task can be executed and doesn't steal contents", "[task]") {
int const initial_value = 2;
int num = initial_value;
// NOLINTNEXTLINE
- std::function<void()> add_five{[a = num]() mutable { a += 5; }};
+ std::function<void()> add_five{[a = num]() mutable {
+ a += kDummyValue;
+ // get rid of "set but unused var"
+ static_cast<void>(a);
+ }};
Task t_add_five{add_five};
t_add_five();
@@ -295,7 +319,11 @@ TEST_CASE("Task moving from named object can be executed", "[task]") {
int const initial_value = 2;
int num = initial_value;
// NOLINTNEXTLINE
- auto add_five = [a = num]() mutable { a += 5; };
+ auto add_five = [a = num]() mutable {
+ a += kDummyValue;
+ // get rid of "set but unused var"
+ static_cast<void>(a);
+ };
Task t_add_five{std::move(add_five)};
t_add_five();
@@ -320,7 +348,11 @@ TEST_CASE("Task moving from named object can be executed", "[task]") {
int const initial_value = 2;
int num = initial_value;
// NOLINTNEXTLINE
- std::function<void()> add_five{[a = num]() mutable { a += 5; }};
+ std::function<void()> add_five{[a = num]() mutable {
+ a += kDummyValue;
+ // get rid of "set but unused var"
+ static_cast<void>(a);
+ }};
Task t_add_five{std::move(add_five)};
t_add_five();
diff --git a/test/buildtool/multithreading/task_system.test.cpp b/test/buildtool/multithreading/task_system.test.cpp
index 82b2e2a0..694158ba 100644
--- a/test/buildtool/multithreading/task_system.test.cpp
+++ b/test/buildtool/multithreading/task_system.test.cpp
@@ -19,7 +19,9 @@
#include <thread>
#include <unordered_set>
-#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/multithreading/task_system.hpp"
#include "test/utils/container_matchers.hpp"
diff --git a/test/buildtool/storage/local_ac.test.cpp b/test/buildtool/storage/local_ac.test.cpp
index 19da0e59..f4867e32 100644
--- a/test/buildtool/storage/local_ac.test.cpp
+++ b/test/buildtool/storage/local_ac.test.cpp
@@ -14,7 +14,7 @@
#include <string>
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "gsl-lite/gsl-lite.hpp"
#include "src/buildtool/file_system/file_system_manager.hpp"
#include "src/buildtool/storage/storage.hpp"
diff --git a/test/buildtool/storage/local_cas.test.cpp b/test/buildtool/storage/local_cas.test.cpp
index 95d119bf..631d2eba 100644
--- a/test/buildtool/storage/local_cas.test.cpp
+++ b/test/buildtool/storage/local_cas.test.cpp
@@ -14,7 +14,7 @@
#include <string>
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/storage/storage.hpp"
#include "test/utils/hermeticity/local.hpp"
diff --git a/test/buildtool/system/system_command.test.cpp b/test/buildtool/system/system_command.test.cpp
index dbe73006..292f437f 100644
--- a/test/buildtool/system/system_command.test.cpp
+++ b/test/buildtool/system/system_command.test.cpp
@@ -15,7 +15,8 @@
#include <cstdlib>
#include <iostream>
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
+#include "catch2/matchers/catch_matchers_all.hpp"
#include "src/buildtool/system/system_command.hpp"
namespace {
diff --git a/test/main.cpp b/test/main.cpp
index 0bcae614..c93583f2 100644
--- a/test/main.cpp
+++ b/test/main.cpp
@@ -12,8 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#define CATCH_CONFIG_RUNNER
-#include "catch2/catch.hpp"
+#include "catch2/catch_session.hpp"
#include "test/utils/logging/log_config.hpp"
auto main(int argc, char* argv[]) -> int {
diff --git a/test/other_tools/git_operations/critical_git_ops.test.cpp b/test/other_tools/git_operations/critical_git_ops.test.cpp
index 04faa6b9..092a3293 100644
--- a/test/other_tools/git_operations/critical_git_ops.test.cpp
+++ b/test/other_tools/git_operations/critical_git_ops.test.cpp
@@ -14,7 +14,7 @@
#include <thread>
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "nlohmann/json.hpp"
#include "src/buildtool/execution_api/common/execution_common.hpp"
#include "src/buildtool/file_system/file_system_manager.hpp"
diff --git a/test/other_tools/git_operations/git_repo_remote.test.cpp b/test/other_tools/git_operations/git_repo_remote.test.cpp
index 4b7a2a77..6850355e 100644
--- a/test/other_tools/git_operations/git_repo_remote.test.cpp
+++ b/test/other_tools/git_operations/git_repo_remote.test.cpp
@@ -14,7 +14,7 @@
#include <thread>
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "nlohmann/json.hpp"
#include "src/buildtool/file_system/file_system_manager.hpp"
#include "src/other_tools/git_operations/git_repo_remote.hpp"
diff --git a/test/other_tools/utils/archive_usage.test.cpp b/test/other_tools/utils/archive_usage.test.cpp
index 2fe38460..cfbbc5ae 100644
--- a/test/other_tools/utils/archive_usage.test.cpp
+++ b/test/other_tools/utils/archive_usage.test.cpp
@@ -15,7 +15,7 @@
#include <string>
#include <unordered_map>
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/file_system/file_system_manager.hpp"
#include "src/other_tools/utils/archive_ops.hpp"
diff --git a/test/other_tools/utils/curl_url.test.cpp b/test/other_tools/utils/curl_url.test.cpp
index ebddeca9..61c979af 100644
--- a/test/other_tools/utils/curl_url.test.cpp
+++ b/test/other_tools/utils/curl_url.test.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/other_tools/utils/curl_url_handle.hpp"
TEST_CASE("Curl URL handle basics", "[curl_url_handle_basics]") {
diff --git a/test/other_tools/utils/curl_usage.test.cpp b/test/other_tools/utils/curl_usage.test.cpp
index eaa84c7d..742026b6 100644
--- a/test/other_tools/utils/curl_usage.test.cpp
+++ b/test/other_tools/utils/curl_usage.test.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/file_system/file_system_manager.hpp"
#include "src/other_tools/utils/curl_context.hpp"
#include "src/other_tools/utils/curl_easy_handle.hpp"
diff --git a/test/utils/container_matchers.hpp b/test/utils/container_matchers.hpp
index cb2ce05d..35a334e3 100644
--- a/test/utils/container_matchers.hpp
+++ b/test/utils/container_matchers.hpp
@@ -16,19 +16,21 @@
#define INCLUDED_SRC_TEST_UTILS_CONTAINER_MATCHERS_HPP
#include <algorithm>
+#include <numeric>
#include <sstream>
#include <string>
#include <type_traits>
#include <unordered_set>
#include <vector>
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
+#include "catch2/matchers/catch_matchers_all.hpp"
/// \brief Matcher to check if the sets of elements present in two different
/// containers are the same
template <class LeftContainer, class RightContainer>
class UniqueElementsUnorderedMatcher
- : public Catch::MatcherBase<LeftContainer> {
+ : public Catch::Matchers::MatcherBase<LeftContainer> {
RightContainer rhs_;
@@ -101,7 +103,8 @@ inline auto HasSameUniqueElementsAs(std::initializer_list<T> const& rc)
/// \brief Matcher to compare the contents of two containers up to permutation
template <class LeftContainer>
-class ContainerUnorderedMatcher : public Catch::MatcherBase<LeftContainer> {
+class ContainerUnorderedMatcher
+ : public Catch::Matchers::MatcherBase<LeftContainer> {
public:
using value_type = typename LeftContainer::value_type;
using T = value_type;
diff --git a/test/utils/cpp/file_locking.test.cpp b/test/utils/cpp/file_locking.test.cpp
index 9e3924e8..b313a21f 100644
--- a/test/utils/cpp/file_locking.test.cpp
+++ b/test/utils/cpp/file_locking.test.cpp
@@ -14,7 +14,7 @@
#include <thread>
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/file_system/file_system_manager.hpp"
#include "src/utils/cpp/atomic.hpp"
#include "src/utils/cpp/file_locking.hpp"
diff --git a/test/utils/cpp/path.test.cpp b/test/utils/cpp/path.test.cpp
index 27ccb419..d6d4eb85 100644
--- a/test/utils/cpp/path.test.cpp
+++ b/test/utils/cpp/path.test.cpp
@@ -14,7 +14,7 @@
#include <filesystem>
-#include "catch2/catch.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/utils/cpp/path.hpp"
TEST_CASE("normalization", "[path]") {
diff --git a/test/utils/remote_execution/main-remote-execution.cpp b/test/utils/remote_execution/main-remote-execution.cpp
index 703de7f4..7dd48d92 100644
--- a/test/utils/remote_execution/main-remote-execution.cpp
+++ b/test/utils/remote_execution/main-remote-execution.cpp
@@ -19,7 +19,8 @@
#include <sstream>
#include <thread>
-#include "catch2/catch.hpp"
+#include "catch2/catch_session.hpp"
+#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/compatibility/compatibility.hpp"
#include "src/buildtool/execution_api/remote/config.hpp"
#include "src/buildtool/file_system/file_system_manager.hpp"