From 835e1fcd131c63ee2b3b647e327b33a3bfb369e3 Mon Sep 17 00:00:00 2001 From: Mitya Selivanov Date: Sat, 2 Sep 2023 20:59:29 +0200 Subject: [Linux] Change build system; Remove CMake --- source/test/programs/CMakeLists.txt | 49 ------------------------------ source/test/programs/cpp_example.cpp | 13 -------- source/test/programs/signals.cpp | 29 ------------------ source/test/programs/too_many_assertions.c | 13 -------- source/test/programs/too_many_tests.c | 14 --------- 5 files changed, 118 deletions(-) delete mode 100644 source/test/programs/CMakeLists.txt delete mode 100644 source/test/programs/cpp_example.cpp delete mode 100644 source/test/programs/signals.cpp delete mode 100644 source/test/programs/too_many_assertions.c delete mode 100644 source/test/programs/too_many_tests.c (limited to 'source/test/programs') 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 -#include - -/* 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; -} -- cgit v1.2.3