Skip to content

Commit

Permalink
Unit tests: include test-specific headers
Browse files Browse the repository at this point in the history
  • Loading branch information
tstenner committed Oct 28, 2023
1 parent 9b6d12b commit 4210bb6
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion testing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Include(FetchContent)
FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v3.0.1 # or a later release
GIT_TAG v3.4.0 # or a later release
)
FetchContent_MakeAvailable(Catch2)

Expand Down
2 changes: 1 addition & 1 deletion testing/catch_main.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#define CATCH_CONFIG_RUNNER
#include <catch2/catch_all.hpp>
#include <catch2/catch_session.hpp>

extern "C" {
const char *lsl_library_info() { return LSL_VERSION_INFO; }
Expand Down
4 changes: 3 additions & 1 deletion testing/ext/DataType.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include "../common/create_streampair.hpp"
#include "../common/lsltypes.hpp"
#include <catch2/catch_all.hpp>
#include <catch2/catch_approx.hpp>
#include <catch2/catch_template_test_macros.hpp>
#include <catch2/catch_test_macros.hpp>
#include <cstdint>
#include <lsl_cpp.h>
#include <thread>
Expand Down
3 changes: 2 additions & 1 deletion testing/int/bench_sleep.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <catch2/catch_all.hpp>
#include <catch2/benchmark/catch_benchmark.hpp>
#include <catch2/catch_test_macros.hpp>
#include <common.h>
#include <thread>

Expand Down
3 changes: 2 additions & 1 deletion testing/int/bench_timesync.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "stream_info_impl.h"
#include "udp_server.h"
#include <catch2/catch_all.hpp>
#include <catch2/benchmark/catch_benchmark.hpp>
#include <catch2/catch_test_macros.hpp>
#include <sstream>
#include <thread>

Expand Down
2 changes: 1 addition & 1 deletion testing/int/inireader.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "util/inireader.hpp"
#include <catch2/catch_all.hpp>
#include <catch2/catch_test_macros.hpp>
#include <sstream>

// clazy:excludeall=non-pod-global-static
Expand Down
2 changes: 1 addition & 1 deletion testing/int/loguruthreadnames.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <loguru.hpp>
#include <thread>
// Include loguru before catch
#include <catch2/catch_all.hpp>
#include <catch2/catch_test_macros.hpp>

// clazy:excludeall=non-pod-global-static

Expand Down
4 changes: 3 additions & 1 deletion testing/int/network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
#include <asio/read.hpp>
#include <asio/use_future.hpp>
#include <asio/write.hpp>
#include <catch2/catch_all.hpp>
#include <catch2/benchmark/catch_benchmark.hpp>
#include <catch2/catch_test_macros.hpp>
#include <catch2/generators/catch_generators.hpp>
#include <chrono>
#include <condition_variable>
#include <future>
Expand Down
3 changes: 2 additions & 1 deletion testing/int/postproc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
#include <random>
#include <thread>
// include loguru before catch
#include <catch2/catch_all.hpp>
#include <catch2/catch_approx.cpp>
#include <catch2/catch_test_macros.hpp>

// clazy:excludeall=non-pod-global-static

Expand Down

0 comments on commit 4210bb6

Please sign in to comment.