summaryrefslogtreecommitdiff
path: root/source/test
diff options
context:
space:
mode:
authorMitya Selivanov <0x7fffff@guattari.ru>2022-08-09 22:10:12 +0400
committerMitya Selivanov <0x7fffff@guattari.ru>2022-08-09 22:10:12 +0400
commit487876477507038067ad3f019d58c257fc06dfda (patch)
tree1c7d1053bf8195fdead4790c9ed4b165d8bd4040 /source/test
parent3c82a1f8fa015b74c8e0b426c21189acb95368fa (diff)
downloadkit-487876477507038067ad3f019d58c257fc06dfda.zip
Add noexcept for C++
Diffstat (limited to 'source/test')
-rw-r--r--source/test/programs/CMakeLists.txt10
-rw-r--r--source/test/programs/cpp.cpp13
2 files changed, 23 insertions, 0 deletions
diff --git a/source/test/programs/CMakeLists.txt b/source/test/programs/CMakeLists.txt
index 4fd3660..641aa16 100644
--- a/source/test/programs/CMakeLists.txt
+++ b/source/test/programs/CMakeLists.txt
@@ -18,4 +18,14 @@ if(KIT_ENABLE_TESTING)
too_many_assertions_test
PROPERTIES
TIMEOUT "30")
+
+ add_executable(cpp cpp.cpp)
+ target_link_libraries(cpp ${KIT_TEST_LIBRARY})
+ add_test(
+ NAME cpp_test
+ COMMAND cpp)
+ set_tests_properties(
+ cpp_test
+ PROPERTIES
+ TIMEOUT "30")
endif()
diff --git a/source/test/programs/cpp.cpp b/source/test/programs/cpp.cpp
new file mode 100644
index 0000000..ca0b4c7
--- /dev/null
+++ b/source/test/programs/cpp.cpp
@@ -0,0 +1,13 @@
+#include "../../kit_test/test.h"
+
+TEST("foo") {
+ REQUIRE(20 + 22 == 42);
+}
+
+TEST("bar") {
+ REQUIRE(true);
+}
+
+auto main(int argc, char **argv) -> int {
+ return run_tests(argc, argv);
+}