Skip to content

Commit b60403c

Browse files
authored
Merge pull request #267 from pinotree/system-catch2
Use Catch2 as installed
2 parents b70f1c2 + eec8507 commit b60403c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+50
-18002
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ endif()
139139
if (immer_BUILD_TESTS)
140140
enable_testing()
141141

142+
find_package(Catch2 REQUIRED)
143+
142144
add_custom_target(check
143145
COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure
144146
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}

default.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ stdenv.mkDerivation rec {
2424
nativeBuildInputs = [ cmake ];
2525
dontBuild = true;
2626
dontUseCmakeBuildDir = true;
27+
cmakeFlags = [
28+
"-Dimmer_BUILD_TESTS=OFF"
29+
"-Dimmer_BUILD_EXAMPLES=OFF"
30+
];
2731
meta = {
2832
homepage = "https://github.com/arximboldi/immer";
2933
description = "Postmodern immutable data structures for C++";

shell.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ tc.stdenv.mkDerivation rec {
4949
buildInputs = [
5050
tc.cc
5151
git
52+
catch2
5253
cmake
5354
pkgconfig
5455
ninja

test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ foreach(_file IN LISTS immer_unit_tests)
1717
target_compile_definitions(${_target} PUBLIC
1818
-DIMMER_OSS_FUZZ_DATA_PATH="${CMAKE_CURRENT_SOURCE_DIR}/oss-fuzz/data"
1919
CATCH_CONFIG_MAIN)
20-
target_link_libraries(${_target} PUBLIC immer-dev)
20+
target_link_libraries(${_target} PUBLIC immer-dev Catch2::Catch2)
2121
add_test("test/${_output}" ${_output})
2222
endforeach()

test/algorithm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#include <immer/algorithm.hpp>
99

10-
#include <catch.hpp>
10+
#include <catch2/catch.hpp>
1111

1212
struct thing
1313
{

test/atom/generic.ipp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#error "define the box template to use in ATOM_T"
1111
#endif
1212

13-
#include <catch.hpp>
13+
#include <catch2/catch.hpp>
1414

1515
template <typename T>
1616
using BOX_T = typename ATOM_T<T>::box_type;

test/box/generic.ipp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#error "define the box template to use in BOX_T"
1111
#endif
1212

13-
#include <catch.hpp>
13+
#include <catch2/catch.hpp>
1414

1515
TEST_CASE("construction and copy")
1616
{

test/box/recursive.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include <immer/set.hpp>
1414
#include <immer/vector.hpp>
1515

16-
#include <catch.hpp>
16+
#include <catch2/catch.hpp>
1717

1818
struct rec_vec
1919
{

test/box/vector-of-boxes-transient.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include <immer/vector.hpp>
1111
#include <immer/vector_transient.hpp>
1212

13-
#include <catch.hpp>
13+
#include <catch2/catch.hpp>
1414

1515
TEST_CASE("issue-33")
1616
{

test/detail/type_traits.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// See accompanying file LICENSE or copy at http://boost.org/LICENSE_1_0.txt
77
//
88

9-
#include <catch.hpp>
9+
#include <catch2/catch.hpp>
1010
#include <forward_list>
1111
#include <immer/detail/type_traits.hpp>
1212
#include <list>

0 commit comments

Comments
 (0)