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
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
+++ /dev/null
-#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
--- /dev/null
+#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