Skip to content

Commit

Permalink
Merge pull request #186 from pinotree/system-catch2
Browse files Browse the repository at this point in the history
Use Catch2 as installed
  • Loading branch information
arximboldi authored Jul 31, 2023
2 parents dd29870 + 417dcf4 commit a2eceee
Show file tree
Hide file tree
Showing 35 changed files with 38 additions and 18,066 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,10 @@ endif()

# the library, local development target
if(lager_BUILD_TESTS)
find_package(Catch2 REQUIRED)

add_library(lager-dev INTERFACE)
target_include_directories(lager-dev SYSTEM INTERFACE
"$<BUILD_INTERFACE:${lager_SOURCE_DIR}/>/tools/include"
${lager_SOURCE_DIR}
${Boost_INCLUDE_DIR}
)
Expand Down
4 changes: 4 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ stdenv.mkDerivation rec {
sass
pkgconfig
];
cmakeFlags = [
"-Dlager_BUILD_TESTS=OFF"
"-Dlager_BUILD_EXAMPLES=OFF"
];
propagatedBuildInputs = [
boost
deps.cereal
Expand Down
1 change: 1 addition & 0 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ in
theStdenv.mkDerivation rec {
name = "lager-env";
buildInputs = [
catch2
cmake
ccache
ncurses
Expand Down
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ foreach(_file IN LISTS lager_unit_tests)
set_target_properties(${_target} PROPERTIES OUTPUT_NAME ${_output})
add_dependencies(tests ${_target})
target_compile_definitions(${_target} PUBLIC CATCH_CONFIG_MAIN)
target_link_libraries(${_target} PUBLIC lager-dev ${_qt_libs})
target_link_libraries(${_target} PUBLIC lager-dev Catch2::Catch2 ${_qt_libs})
add_test("test/${_output}" ${_output})
endforeach()

Expand Down
2 changes: 1 addition & 1 deletion test/cereal/immer_array.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
//

#include "cerealize.hpp"
#include <catch.hpp>
#include <catch2/catch.hpp>
#include <lager/extra/cereal/immer_array.hpp>

TEST_CASE("basic")
Expand Down
2 changes: 1 addition & 1 deletion test/cereal/immer_box.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
//

#include "cerealize.hpp"
#include <catch.hpp>
#include <catch2/catch.hpp>
#include <lager/extra/cereal/immer_box.hpp>

TEST_CASE("basic")
Expand Down
2 changes: 1 addition & 1 deletion test/cereal/immer_flex_vector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
//

#include "cerealize.hpp"
#include <catch.hpp>
#include <catch2/catch.hpp>
#include <lager/extra/cereal/immer_flex_vector.hpp>

TEST_CASE("basic")
Expand Down
2 changes: 1 addition & 1 deletion test/cereal/immer_vector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
//

#include "cerealize.hpp"
#include <catch.hpp>
#include <catch2/catch.hpp>
#include <lager/extra/cereal/immer_vector.hpp>

TEST_CASE("basic")
Expand Down
2 changes: 1 addition & 1 deletion test/cereal/tuple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
//

#include "cerealize.hpp"
#include <catch.hpp>
#include <catch2/catch.hpp>
#include <lager/extra/cereal/tuple.hpp>

TEST_CASE("basic")
Expand Down
2 changes: 1 addition & 1 deletion test/cereal/variant_with_name.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
//

#include "cerealize.hpp"
#include <catch.hpp>
#include <catch2/catch.hpp>
#include <lager/extra/cereal/variant_with_name.hpp>

TEST_CASE("basic")
Expand Down
2 changes: 1 addition & 1 deletion test/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// or here: <https://github.com/arximboldi/lager/blob/master/LICENSE>
//

#include <catch.hpp>
#include <catch2/catch.hpp>

#include <lager/event_loop/manual.hpp>
#include <lager/store.hpp>
Expand Down
2 changes: 1 addition & 1 deletion test/cursor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// or here: <https://github.com/arximboldi/lager/blob/master/LICENSE>
//

#include <catch.hpp>
#include <catch2/catch.hpp>

#include <lager/constant.hpp>
#include <lager/cursor.hpp>
Expand Down
2 changes: 1 addition & 1 deletion test/debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// or here: <https://github.com/arximboldi/lager/blob/master/LICENSE>
//

#include <catch.hpp>
#include <catch2/catch.hpp>

#include <lager/debug/debugger.hpp>
#include <lager/event_loop/manual.hpp>
Expand Down
2 changes: 1 addition & 1 deletion test/deps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// or here: <https://github.com/arximboldi/lager/blob/master/LICENSE>
//

#include <catch.hpp>
#include <catch2/catch.hpp>

#include <lager/deps.hpp>

Expand Down
2 changes: 1 addition & 1 deletion test/detail/nodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// or here: <https://github.com/arximboldi/lager/blob/master/LICENSE>
//

#include <catch.hpp>
#include <catch2/catch.hpp>

#include "../spies.hpp"

Expand Down
2 changes: 1 addition & 1 deletion test/errors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// or here: <https://github.com/arximboldi/lager/blob/master/LICENSE>
//

#include <catch.hpp>
#include <catch2/catch.hpp>

#include <lager/deps.hpp>
#include <lager/store.hpp>
Expand Down
2 changes: 1 addition & 1 deletion test/event_loop/boost_asio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// or here: <https://github.com/arximboldi/lager/blob/master/LICENSE>
//

#include <catch.hpp>
#include <catch2/catch.hpp>

#include <lager/event_loop/boost_asio.hpp>
#include <lager/store.hpp>
Expand Down
2 changes: 1 addition & 1 deletion test/event_loop/manual.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// or here: <https://github.com/arximboldi/lager/blob/master/LICENSE>
//

#include <catch.hpp>
#include <catch2/catch.hpp>

#include <lager/event_loop/manual.hpp>
#include <lager/store.hpp>
Expand Down
2 changes: 1 addition & 1 deletion test/event_loop/qml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// or here: <https://github.com/arximboldi/lager/blob/master/LICENSE>
//

#include <catch.hpp>
#include <catch2/catch.hpp>

#include <lager/event_loop/qml.hpp>
#include <lager/store.hpp>
Expand Down
2 changes: 1 addition & 1 deletion test/event_loop/qt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// or here: <https://github.com/arximboldi/lager/blob/master/LICENSE>
//

#include <catch.hpp>
#include <catch2/catch.hpp>

#include <QCoreApplication>

Expand Down
2 changes: 1 addition & 1 deletion test/event_loop/queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// or here: <https://github.com/arximboldi/lager/blob/master/LICENSE>
//

#include <catch.hpp>
#include <catch2/catch.hpp>

#include <lager/event_loop/queue.hpp>
#include <lager/store.hpp>
Expand Down
2 changes: 1 addition & 1 deletion test/event_loop/safe_queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// or here: <https://github.com/arximboldi/lager/blob/master/LICENSE>
//

#include <catch.hpp>
#include <catch2/catch.hpp>

#include <lager/event_loop/safe_queue.hpp>
#include <lager/store.hpp>
Expand Down
2 changes: 1 addition & 1 deletion test/extra/derive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#include "test/cereal/cerealize.hpp"

#include <catch.hpp>
#include <catch2/catch.hpp>

#include <lager/extra/derive.hpp>
#include <lager/extra/derive/cereal.hpp>
Expand Down
2 changes: 1 addition & 1 deletion test/extra/enum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
//

#include "test/cereal/cerealize.hpp"
#include <catch.hpp>
#include <catch2/catch.hpp>

#include <lager/extra/cereal/enum.hpp>
#include <lager/extra/enum.hpp>
Expand Down
2 changes: 1 addition & 1 deletion test/extra/struct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
//

#include "test/cereal/cerealize.hpp"
#include <catch.hpp>
#include <catch2/catch.hpp>

#include <lager/extra/cereal/struct.hpp>
#include <lager/extra/struct.hpp>
Expand Down
2 changes: 1 addition & 1 deletion test/futures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// or here: <https://github.com/arximboldi/lager/blob/master/LICENSE>
//

#include <catch.hpp>
#include <catch2/catch.hpp>

#include <lager/event_loop/queue.hpp>
#include <lager/store.hpp>
Expand Down
2 changes: 1 addition & 1 deletion test/lenses.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// or here: <https://github.com/arximboldi/lager/blob/master/LICENSE>
//

#include <catch.hpp>
#include <catch2/catch.hpp>

#include <immer/vector.hpp>
#include <zug/compose.hpp>
Expand Down
2 changes: 1 addition & 1 deletion test/sensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// or here: <https://github.com/arximboldi/lager/blob/master/LICENSE>
//

#include <catch.hpp>
#include <catch2/catch.hpp>

#include <lager/sensor.hpp>
#include <lager/state.hpp>
Expand Down
2 changes: 1 addition & 1 deletion test/setter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// or here: <https://github.com/arximboldi/lager/blob/master/LICENSE>
//

#include <catch.hpp>
#include <catch2/catch.hpp>

#include <lager/event_loop/manual.hpp>

Expand Down
2 changes: 1 addition & 1 deletion test/state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#include <boost/operators.hpp>

#include <catch.hpp>
#include <catch2/catch.hpp>

#include <lager/state.hpp>

Expand Down
2 changes: 1 addition & 1 deletion test/type_erased_lens.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// or here: <https://github.com/arximboldi/lager/blob/master/LICENSE>
//

#include <catch.hpp>
#include <catch2/catch.hpp>

#include <vector>

Expand Down
2 changes: 1 addition & 1 deletion test/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// or here: <https://github.com/arximboldi/lager/blob/master/LICENSE>
//

#include <catch.hpp>
#include <catch2/catch.hpp>

#include <lager/util.hpp>

Expand Down
2 changes: 1 addition & 1 deletion test/watchers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// or here: <https://github.com/arximboldi/lager/blob/master/LICENSE>
//

#include <catch.hpp>
#include <catch2/catch.hpp>

#include <lager/state.hpp>

Expand Down
2 changes: 1 addition & 1 deletion test/xformed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// or here: <https://github.com/arximboldi/lager/blob/master/LICENSE>
//

#include <catch.hpp>
#include <catch2/catch.hpp>

#include <lager/constant.hpp>
#include <lager/state.hpp>
Expand Down
Loading

0 comments on commit a2eceee

Please sign in to comment.