]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
free unit test device list
authorBastian Dehn <hhaalo@arcor.de>
Sat, 23 Mar 2024 08:39:06 +0000 (09:39 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Sat, 23 Mar 2024 08:39:06 +0000 (09:39 +0100)
tests/kds_s2000w_net_read_tests.h
tests/kds_s2000w_net_tests.c
tests/kds_s2000w_net_tests.h
tests/kds_s2000w_read_config_tests.h

index 355d750b305e2887c23ba450bdfc13ab7682544a..107db579084b439b4f841b0938f7f960125e6487 100644 (file)
@@ -1,6 +1,5 @@
 #ifndef KDS_S2000W_NET_READ_TESTS_H
 #define KDS_S2000W_NET_READ_TESTS_H
-#define UNIT_TESTING
 #include <stdarg.h>
 #include <stddef.h>
 #include <stdint.h>
index 500fcba1937645697ecd1f643dc766eadd958366..2f868df513cd2c2aac9a05dfba5f33f12ea09fc3 100644 (file)
@@ -120,6 +120,10 @@ void kds_s2000w_net_get_devices()
        assert_string_equal(device_list[0][0]->type, "sheetfed scanner");
        assert_null(device_list[0][1]);
 
+       free(device_list[0][0]);
+       device_list[0][0] = NULL;
+       free(device_list[0]);
+       device_list[0] = NULL;
        free(device_list);
        device_list = NULL;
 }
index 3ca3c389e433c3b12fcbd1f452a6bdc20821d92e..3f2334c98b33199f0438284e7956ac38b3025803 100644 (file)
@@ -1,6 +1,5 @@
 #ifndef KDS_S2000W_NET_TESTS_H
 #define KDS_S2000W_NET_TESTS_H
-#define UNIT_TESTING
 #include <stdarg.h>
 #include <stddef.h>
 #include <stdint.h>
index aae626c031263c9e689b3ce396c32b62842718d3..68d91a713472e47a137d63600be4e90ddac34385 100644 (file)
@@ -1,6 +1,5 @@
 #ifndef KDS_S2000W_READ_CONFIG_TESTS_H
 #define KDS_S2000W_READ_CONFIG_TESTS_H
-#define UNIT_TESTING
 #include <stdarg.h>
 #include <stddef.h>
 #include <stdint.h>