summaryrefslogtreecommitdiff
path: root/source/test/programs
diff options
context:
space:
mode:
Diffstat (limited to 'source/test/programs')
-rw-r--r--source/test/programs/CMakeLists.txt49
-rw-r--r--source/test/programs/cpp_example.cpp13
-rw-r--r--source/test/programs/signals.cpp29
-rw-r--r--source/test/programs/too_many_assertions.c13
-rw-r--r--source/test/programs/too_many_tests.c14
5 files changed, 0 insertions, 118 deletions
diff --git a/source/test/programs/CMakeLists.txt b/source/test/programs/CMakeLists.txt
deleted file mode 100644
index 81332cf..0000000
--- a/source/test/programs/CMakeLists.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-project(
- ${KIT_PROJECT}_test_programs
- VERSION 0.1.1
- DESCRIPTION "Kit test programs"
- LANGUAGES C CXX)
-
-if(KIT_ENABLE_TESTING)
- add_executable(too_many_tests too_many_tests.c)
- target_link_libraries(too_many_tests kit_test)
- add_test(
- NAME too_many_tests_test
- COMMAND too_many_tests --quiet)
- set_tests_properties(
- too_many_tests_test
- PROPERTIES
- TIMEOUT "15")
-
- add_executable(too_many_assertions too_many_assertions.c)
- target_link_libraries(too_many_assertions kit_test)
- add_test(
- NAME too_many_assertions_test
- COMMAND too_many_assertions --quiet)
- set_tests_properties(
- too_many_assertions_test
- PROPERTIES
- TIMEOUT "15")
-
- add_executable(cpp_example cpp_example.cpp)
- target_link_libraries(cpp_example kit_test)
- add_test(
- NAME cpp_example_test
- COMMAND cpp_example --quiet)
- set_tests_properties(
- cpp_example_test
- PROPERTIES
- TIMEOUT "15")
-
- if(NOT MSVC)
- add_executable(signals signals.cpp)
- target_link_libraries(signals kit_test)
- add_test(
- NAME signals_test
- COMMAND signals --no-carriage-return)
- set_tests_properties(
- signals_test
- PROPERTIES
- TIMEOUT "15")
- endif()
-endif()
diff --git a/source/test/programs/cpp_example.cpp b/source/test/programs/cpp_example.cpp
deleted file mode 100644
index 523186b..0000000
--- a/source/test/programs/cpp_example.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "../../kit_test/test.h"
-
-TEST("foo") {
- REQUIRE(20 + 22 == 42);
-}
-
-TEST("bar") {
- REQUIRE(true);
-}
-
-int main(int argc, char **argv) {
- return run_tests(argc, argv);
-}
diff --git a/source/test/programs/signals.cpp b/source/test/programs/signals.cpp
deleted file mode 100644
index e2532c2..0000000
--- a/source/test/programs/signals.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-#include "../../kit_test/test.h"
-
-#include <cstdlib>
-#include <stdexcept>
-
-/* FIXME
- * MSVC tests fail in GitHub Actions.
- */
-
-TEST("c++ exception") {
- throw std::exception();
-}
-
-TEST("abort") {
- abort();
-}
-
-TEST("invalid access") {
- *(volatile int *) nullptr = 42;
-}
-
-int main(int argc, char **argv) {
-#ifndef _MSC_VER
- if (run_tests(argc, argv) != 1)
- return 1;
-#endif
-
- return 0;
-}
diff --git a/source/test/programs/too_many_assertions.c b/source/test/programs/too_many_assertions.c
deleted file mode 100644
index 06b440b..0000000
--- a/source/test/programs/too_many_assertions.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "../../kit_test/test.h"
-
-TEST("foo") {
- int i;
- for (i = 0; i <= KIT_TEST_ASSERTIONS_LIMIT; i++) REQUIRE(1);
-}
-
-int main(int argc, char **argv) {
- if (run_tests(argc, argv) != 1)
- return 1;
-
- return 0;
-}
diff --git a/source/test/programs/too_many_tests.c b/source/test/programs/too_many_tests.c
deleted file mode 100644
index ac1cbf7..0000000
--- a/source/test/programs/too_many_tests.c
+++ /dev/null
@@ -1,14 +0,0 @@
-#include "../../kit_test/test.h"
-
-void bar(int index, kit_test_report_fn report) { }
-
-int main(int argc, char **argv) {
- int i;
- for (i = 0; i <= KIT_TESTS_SIZE_LIMIT; i++)
- test_register("foo", __FILE__, bar);
-
- if (run_tests(argc, argv) != 1)
- return 1;
-
- return 0;
-}