From a3b513dca8f94e0301a7728ef8ca17c150048994 Mon Sep 17 00:00:00 2001 From: Jacek Galowicz Date: Mon, 30 Sep 2024 17:31:22 +0200 Subject: [PATCH] upgrade to cath2_3 --- build.nix | 4 ++-- test/CMakeLists.txt | 3 +-- test/gdb.cpp | 2 +- test/main.cpp | 6 ------ test/math_expression.cpp | 2 +- test/test.cpp | 2 +- 6 files changed, 6 insertions(+), 13 deletions(-) delete mode 100644 test/main.cpp diff --git a/build.nix b/build.nix index a5c727e..011f4ab 100644 --- a/build.nix +++ b/build.nix @@ -1,6 +1,6 @@ { stdenv , lib -, catch2 +, catch2_3 , clang-tools , cmake , gbenchmark @@ -25,7 +25,7 @@ stdenv.mkDerivation { }; checkInputs = [ - catch2 + catch2_3 gbenchmark ] ++ lib.optional stdenv.cc.isClang llvm; # for llvm-cov diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 019fc80..d2cb189 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -5,7 +5,6 @@ include(Catch) add_executable(${PROJECT_NAME}-test gdb.cpp - main.cpp math_expression.cpp test.cpp ) @@ -13,7 +12,7 @@ target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME}) target_compile_features(${PROJECT_NAME}-test INTERFACE cxx_std_17) target_compile_options(${PROJECT_NAME}-test PRIVATE -Wall -Wextra -Werror) -target_link_libraries(${PROJECT_NAME}-test Catch2::Catch2) +target_link_libraries(${PROJECT_NAME}-test Catch2::Catch2WithMain) catch_discover_tests(${PROJECT_NAME}-test) diff --git a/test/gdb.cpp b/test/gdb.cpp index 416f188..002554d 100644 --- a/test/gdb.cpp +++ b/test/gdb.cpp @@ -1,7 +1,7 @@ #include #include -#include +#include using namespace apl; using namespace std::string_literals; diff --git a/test/main.cpp b/test/main.cpp deleted file mode 100644 index abe07db..0000000 --- a/test/main.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#define CATCH_CONFIG_MAIN -#include - -/* - * This part is in its own file because it takes ages to compile. - */ diff --git a/test/math_expression.cpp b/test/math_expression.cpp index 32f27ff..8f0b179 100644 --- a/test/math_expression.cpp +++ b/test/math_expression.cpp @@ -1,6 +1,6 @@ #include -#include +#include using namespace apl; diff --git a/test/test.cpp b/test/test.cpp index 24e2c0e..bdb621e 100644 --- a/test/test.cpp +++ b/test/test.cpp @@ -5,7 +5,7 @@ #include -#include +#include using namespace apl; using namespace std::string_literals;