diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index aadd67c92..f2848aca7 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -2,7 +2,7 @@ if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.19.0") cmake_policy(SET CMP0110 NEW) # don't spam about add_test names.. endif() -include("${PROJECT_SOURCE_DIR}/vendor/Catch2/contrib/ParseAndAddCatchTests.cmake") +include("${PROJECT_SOURCE_DIR}/vendor/Catch2/extras/ParseAndAddCatchTests.cmake") # Add includes to library so they show up in IDEs file(GLOB_RECURSE TEST_INCLUDES *.h) @@ -28,8 +28,6 @@ target_link_libraries( set_property(TARGET unit_test_suite PROPERTY CXX_STANDARD 17) -add_definitions("-DCATCH_CONFIG_ENABLE_BENCHMARKING") - add_celerity_to_target(TARGET unit_test_suite SOURCES unit_test_suite_celerity.cc) foreach(TEST_TARGET ${TEST_TARGETS}) diff --git a/test/benchmarks.cc b/test/benchmarks.cc index ca226bca7..e65a77d20 100644 --- a/test/benchmarks.cc +++ b/test/benchmarks.cc @@ -1,4 +1,5 @@ -#include +#include +#include #include "intrusive_graph.h" diff --git a/test/graph_compaction_tests.cc b/test/graph_compaction_tests.cc index 64367df45..9d3be530a 100644 --- a/test/graph_compaction_tests.cc +++ b/test/graph_compaction_tests.cc @@ -5,7 +5,7 @@ #include #include -#include +#include #include @@ -304,7 +304,7 @@ namespace detail { } for(auto cid : initial_last_writer_ids) { - INFO("initial last writer with id " << cid << " has been deleted") + INFO("initial last writer with id " << cid << " has been deleted"); CHECK_FALSE(ctx.get_command_graph().has(cid)); } diff --git a/test/graph_generation_tests.cc b/test/graph_generation_tests.cc index 15f2d7617..913993e4b 100644 --- a/test/graph_generation_tests.cc +++ b/test/graph_generation_tests.cc @@ -4,7 +4,7 @@ #include #include -#include +#include #include diff --git a/test/intrusive_graph_tests.cc b/test/intrusive_graph_tests.cc index ea3bb53f9..6b6e2d9bf 100644 --- a/test/intrusive_graph_tests.cc +++ b/test/intrusive_graph_tests.cc @@ -1,6 +1,6 @@ #include "unit_test_suite_celerity.h" -#include +#include #include "intrusive_graph.h" diff --git a/test/runtime_deprecation_tests.cc b/test/runtime_deprecation_tests.cc index 799f87b32..2e48dbc6a 100644 --- a/test/runtime_deprecation_tests.cc +++ b/test/runtime_deprecation_tests.cc @@ -8,7 +8,7 @@ #include #include -#include +#include #include diff --git a/test/runtime_tests.cc b/test/runtime_tests.cc index 8afe38e30..a57a3c8db 100644 --- a/test/runtime_tests.cc +++ b/test/runtime_tests.cc @@ -13,7 +13,7 @@ #include #endif -#include +#include #include @@ -179,7 +179,7 @@ namespace detail { // Attempting to merge region maps with incompatible extents should throw const region_map rm_incompat(cl::sycl::range<3>(128, 64, 30)); - REQUIRE_THROWS_WITH(rm1.merge(rm_incompat), Catch::Equals("Incompatible region map")); + REQUIRE_THROWS_WITH(rm1.merge(rm_incompat), Catch::Matchers::Equals("Incompatible region map")); } TEST_CASE("range mapper results are clamped to buffer range", "[range-mapper]") { diff --git a/test/system/distr_tests.cc b/test/system/distr_tests.cc index 152389995..46afbd7d0 100644 --- a/test/system/distr_tests.cc +++ b/test/system/distr_tests.cc @@ -2,7 +2,7 @@ #include -#include +#include #include #include diff --git a/test/task_graph_tests.cc b/test/task_graph_tests.cc index c71fc82d2..4b88a03c5 100644 --- a/test/task_graph_tests.cc +++ b/test/task_graph_tests.cc @@ -4,7 +4,7 @@ #include "types.h" #include "unit_test_suite_celerity.h" -#include +#include #include #include @@ -488,7 +488,7 @@ namespace detail { } } - INFO("initial last writer with id " << initial_last_writer_id << " has been deleted") + INFO("initial last writer with id " << initial_last_writer_id << " has been deleted"); CHECK_FALSE(tm.has_task(initial_last_writer_id)); auto buf = mbf.create_buffer(cl::sycl::range<1>(1), true); diff --git a/test/test_utils.h b/test/test_utils.h index 1bad65a6c..7a69bd78e 100644 --- a/test/test_utils.h +++ b/test/test_utils.h @@ -3,7 +3,7 @@ #include #include -#include +#include #include #include diff --git a/test/unit_test_suite.cc b/test/unit_test_suite.cc index 131c30619..157423ab1 100644 --- a/test/unit_test_suite.cc +++ b/test/unit_test_suite.cc @@ -1,7 +1,9 @@ #include "unit_test_suite.h" -#define CATCH_CONFIG_RUNNER -#include +#include +#include +#include +#include bool print_graphs = false; @@ -11,7 +13,7 @@ bool print_graphs = false; int main(int argc, char* argv[]) { Catch::Session session; - using namespace Catch::clara; + using namespace Catch::Clara; const auto cli = session.cli() | Opt(print_graphs)["--print-graphs"]("print graphs (GraphViz)"); session.cli(cli); @@ -22,8 +24,8 @@ int main(int argc, char* argv[]) { return session.run(); } -struct GlobalSetupAndTeardown : Catch::TestEventListenerBase { - using TestEventListenerBase::TestEventListenerBase; +struct GlobalSetupAndTeardown : Catch::EventListenerBase { + using EventListenerBase::EventListenerBase; void testRunStarting(const Catch::TestRunInfo&) override { detail::test_run_started_callback(); } void testCaseEnded(const Catch::TestCaseStats&) override { detail::test_case_ended_callback(); } void testRunEnded(const Catch::TestRunStats&) override { detail::test_run_ended_callback(); } diff --git a/vendor/Catch2 b/vendor/Catch2 index 216713a40..fff494c10 160000 --- a/vendor/Catch2 +++ b/vendor/Catch2 @@ -1 +1 @@ -Subproject commit 216713a4066b79d9803d374f261ccb30c0fb451f +Subproject commit fff494c10ad223d8fe7732d227be9e3cede6097e