]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
rename run tests only to tests
authorBastian Dehn <hhaalo@arcor.de>
Wed, 6 May 2026 06:46:53 +0000 (08:46 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Wed, 6 May 2026 06:46:53 +0000 (08:46 +0200)
tests/CMakeLists.txt
tests/run_tests.c [deleted file]
tests/tests.c [new file with mode: 0644]

index 183c214be6ca7bb5488df377eee56d05354c1200..eca6517110132797037b215e26b191d28d6a73c3 100644 (file)
@@ -16,8 +16,8 @@ message(STATUS "CPPCHECK_VERSION: ${CPPCHECK_VERSION}")
 file(COPY ${CMAKE_SOURCE_DIR}/src/kds_s2000w_net.conf
        DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
 
-add_executable(run_tests
-       run_tests.c
+add_executable(tests
+       tests.c
        kds_s2000w_client_mock.c
        kds_s2000w_net_get_opt_tests.c
        kds_s2000w_net_set_opt_tests.c
@@ -29,16 +29,16 @@ add_executable(run_tests
        kds_s2000w_image_type_check_tests.c
        kds_s2000w_pixel_converter_tests.c
        kds_s2000w_client_mock.c)
-add_dependencies(run_tests
+add_dependencies(tests
        sane-kds_s2000w_net-static)
-target_link_libraries(run_tests
+target_link_libraries(tests
        ${CMOCKA_LIBRARY}
        sane-kds_s2000w_net-static)
 
 add_custom_target(runningtests
-       ALL ./run_tests
+       ALL ./tests
        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-       DEPENDS run_tests)
+       DEPENDS tests)
 
 add_custom_command(TARGET runningtests
        POST_BUILD
diff --git a/tests/run_tests.c b/tests/run_tests.c
deleted file mode 100644 (file)
index 4e39ed9..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-#include "kds_s2000w_client_mock.h"
-
-typedef int (*testgroupfn)();
-
-int run_kds_s2000w_net_get_opt_tests();
-int run_kds_s2000w_net_set_opt_tests();
-int run_kds_s2000w_net_read_tests();
-int run_kds_s2000w_net_tests();
-int run_kds_s2000w_read_config_tests();
-int run_kds_s2000w_image_converter_tests();
-int run_kds_s2000w_option_descriptor_tests();
-int run_kds_s2000w_image_type_check_tests();
-int run_kds_s2000w_pixel_converter_tests();
-
-int main()
-{
-    testgroupfn testgroups[] = {
-        run_kds_s2000w_net_get_opt_tests,
-        run_kds_s2000w_net_set_opt_tests,
-        run_kds_s2000w_net_read_tests,
-        run_kds_s2000w_net_tests,
-        run_kds_s2000w_read_config_tests,
-        run_kds_s2000w_image_converter_tests,
-        run_kds_s2000w_option_descriptor_tests,
-        run_kds_s2000w_image_type_check_tests,
-        run_kds_s2000w_pixel_converter_tests,
-    };
-
-    size_t count = sizeof(testgroups) / sizeof(testgroupfn);
-    for (size_t i = 0; i < count; i++) {
-        if (testgroups[i]())
-            return 1;
-    }
-
-    return 0;
-}
\ No newline at end of file
diff --git a/tests/tests.c b/tests/tests.c
new file mode 100644 (file)
index 0000000..4e39ed9
--- /dev/null
@@ -0,0 +1,36 @@
+#include "kds_s2000w_client_mock.h"
+
+typedef int (*testgroupfn)();
+
+int run_kds_s2000w_net_get_opt_tests();
+int run_kds_s2000w_net_set_opt_tests();
+int run_kds_s2000w_net_read_tests();
+int run_kds_s2000w_net_tests();
+int run_kds_s2000w_read_config_tests();
+int run_kds_s2000w_image_converter_tests();
+int run_kds_s2000w_option_descriptor_tests();
+int run_kds_s2000w_image_type_check_tests();
+int run_kds_s2000w_pixel_converter_tests();
+
+int main()
+{
+    testgroupfn testgroups[] = {
+        run_kds_s2000w_net_get_opt_tests,
+        run_kds_s2000w_net_set_opt_tests,
+        run_kds_s2000w_net_read_tests,
+        run_kds_s2000w_net_tests,
+        run_kds_s2000w_read_config_tests,
+        run_kds_s2000w_image_converter_tests,
+        run_kds_s2000w_option_descriptor_tests,
+        run_kds_s2000w_image_type_check_tests,
+        run_kds_s2000w_pixel_converter_tests,
+    };
+
+    size_t count = sizeof(testgroups) / sizeof(testgroupfn);
+    for (size_t i = 0; i < count; i++) {
+        if (testgroups[i]())
+            return 1;
+    }
+
+    return 0;
+}
\ No newline at end of file