]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
remove wrap flags from compiler
authorBastian Dehn <hhaalo@arcor.de>
Sun, 17 Mar 2024 19:11:34 +0000 (20:11 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Sun, 17 Mar 2024 19:11:34 +0000 (20:11 +0100)
CMakeLists.txt
tests/kds_s2000w_read_config_tests.c
tests/kds_s2000w_read_config_tests.h

index 3e4e4820d74f3efbda14de06c751c9817bf63360..598acbe4a44153ef5b16e8294fd95b1ff55b940e 100644 (file)
@@ -8,15 +8,7 @@ else()
 -fprofile-arcs \
 -ftest-coverage \
 -Wall \
--g \
--Xlinker \
---wrap=kds_s2000w_client_get_option \
--Xlinker \
---wrap=kds_s2000w_client_stop_scan \
--Xlinker \
---wrap=kds_s2000w_client_open_session \
--Xlinker \
---wrap=load_config" CACHE STRING "test coverage compiler flags")
+-g" CACHE STRING "test coverage compiler flags")
 endif()
 
 message(STATUS "CMAKE_C_FLAGS " ${CMAKE_C_FLAGS})
index b09419f2abe148f50d95e69df34e45b482c7000e..acdaf1c2a6c1a0d277902f5f1e37258c1fa203b5 100644 (file)
@@ -4,78 +4,6 @@
 #include "../src/kds_s2000w_client.h"
 #include "../src/kds_s2000w_config.h"
 
-int __wrap_kds_s2000w_client_get_option(int64_t sessionid, response* response)
-{
-       response->data = realloc(response->data, 918);
-       const char* responsedata = "{ \
-               \"Status\": { \
-                       \"NumImagesScanned\": 0, \
-                       \"NumImagesStored\": 0, \
-                       \"State\": \"In Session\", \
-                       \"ErrorNum\": 0, \
-                       \"LastError\": \"Status: 200 Success\", \
-                       \"PaperDetected\": \"0\", \
-                       \"PercentAvailable\": 99 \
-               }, \
-               \"Configuration\": { \
-                       \"DPI\": 200, \
-                       \"ScanSide\": \"Duplex\", \
-                       \"ColorMode\": \"Color\", \
-                       \"SkipBlankPages\": 0, \
-                       \"AutoStart\": 0, \
-                       \"ColorDropOut\": \"None\", \
-                       \"ColorDropOutAggressiveness\": 0, \
-                       \"OutputType\": \"Images\", \
-                       \"ColorAutoBrightnessMode\": \"Automatic\", \
-                       \"ColorBalanceMode\": \"Automatic\", \
-                       \"ColorBalanceAggressiveness\": 0, \
-                       \"ColorBalanceRed\": 0, \
-                       \"ColorBalanceGreen\": 0, \
-                       \"ColorBalanceBlue\": 0, \
-                       \"ForegroundBoldnessMode\": \"None\", \
-                       \"ForegroundBoldnessAggressiveness\": 0, \
-                       \"BackgroundSmoothingMode\": \"None\", \
-                       \"BackgroundSmoothingAggressiveness\": 0, \
-                       \"BinarizationMode\": \"iThresholding\", \
-                       \"BinarizationContrast\": 0, \
-                       \"MaxDocumentLength\": 140, \
-                       \"ScanSource\": \"DocumentFeeder\" \
-               } \
-       }\0";
-
-       memcpy(response->data, responsedata, 918);
-
-       response->code = 200;
-       response->size = sizeof(response->data);
-
-       return mock_type(int);
-}
-
-int __wrap_kds_s2000w_client_stop_scan(int64_t sessionid, response* response)
-{
-       return mock_type(int);
-}
-
-
-int __wrap_kds_s2000w_client_open_session(response* response)
-{
-       response->data = realloc(response->data, 27);
-       const char* responsedata = "{\"SessionId\":\"1251877821\"}\0";
-
-       memcpy(response->data, responsedata, 27);
-
-       response->code = 200;
-       response->size = sizeof(response->data);
-
-       return mock_type(int);
-}
-
-
-void __wrap_load_config(program_config* config, const char* config_stream)
-{
-       __real_load_config(config, config_stream);
-}
-
 void kds_s2000w_config_read_parameter()
 {
        const char* input_stream = "   scanner_url   =   http://scanner.example.com    \n";
index 7a0e33bd79e7bc608c94b8bb65d5a3ffdcfea94b..68d91a713472e47a137d63600be4e90ddac34385 100644 (file)
@@ -1,6 +1,5 @@
 #ifndef KDS_S2000W_READ_CONFIG_TESTS_H
 #define KDS_S2000W_READ_CONFIG_TESTS_H
-#define UNIT_TESTING 1
 #include <stdarg.h>
 #include <stddef.h>
 #include <stdint.h>