From 45dba25b3c770886833fedb3150733b97a9fad42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ne=C4=8Dada?= Date: Wed, 30 Mar 2022 09:28:07 +0300 Subject: [PATCH] Introduce testing witch catch2 (no runtime tests yet) --- CMakeLists.txt | 1 + tests/catch/CMakeLists.txt | 5 +++++ tests/catch/all_includes.C | 31 +++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 tests/catch/CMakeLists.txt create mode 100644 tests/catch/all_includes.C diff --git a/CMakeLists.txt b/CMakeLists.txt index e17a741..f443fd3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,6 +48,7 @@ add_subdirectory(faddeeva) add_subdirectory (qpms) +add_subdirectory (tests/catch EXCLUDE_FROM_ALL) enable_testing() add_subdirectory (tests EXCLUDE_FROM_ALL) diff --git a/tests/catch/CMakeLists.txt b/tests/catch/CMakeLists.txt new file mode 100644 index 0000000..287c600 --- /dev/null +++ b/tests/catch/CMakeLists.txt @@ -0,0 +1,5 @@ +find_package(Catch2 REQUIRED) +add_executable(catchtest all_includes.C) +target_link_libraries(catchtest PRIVATE Catch2::Catch2WithMain qpms) + + diff --git a/tests/catch/all_includes.C b/tests/catch/all_includes.C new file mode 100644 index 0000000..10f3e9a --- /dev/null +++ b/tests/catch/all_includes.C @@ -0,0 +1,31 @@ +// Just to test that all headers are C++ compatible +#include +extern "C" { +#include +//#include // C++ keyword as an identifier +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +// C++ type conversion issues: +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include +}