From a54d8f62aa9ec8ed93996cb888631e5285c03f8b Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Wed, 1 Jun 2022 23:44:06 -0500 Subject: [PATCH] Update: Unit tests, fixing minor problems and adding missing functionality. Many of the testfile files have "tests" when they instead should have "test". The f_print must have a clang specific define passed to work-around a clang problem. I noticed that I forgot to implement several "returns_data_not" unit test while writing the f_fss unit tests. Provide these missing unit tests for the f_type_array project unit tests. This project is my de-facto standard for basing all of my standard data type unit tests and needs to be as correct and up to date as possible. --- level_0/f_account/data/build/testfile | 2 +- level_0/f_capability/data/build/testfile | 2 +- level_0/f_color/data/build/testfile | 2 +- level_0/f_console/data/build/testfile | 2 +- level_0/f_control_group/data/build/testfile | 2 +- level_0/f_conversion/data/build/testfile | 2 +- level_0/f_directory/data/build/testfile | 2 +- level_0/f_environment/data/build/testfile | 2 +- level_0/f_execute/data/build/testfile | 2 +- level_0/f_file/data/build/testfile | 2 +- level_0/f_iki/data/build/testfile | 2 +- level_0/f_limit/data/build/testfile | 2 +- level_0/f_memory/data/build/testfile | 2 +- level_0/f_path/data/build/testfile | 2 +- level_0/f_pipe/data/build/testfile | 2 +- level_0/f_print/data/build/settings-mocks | 2 + level_0/f_print/data/build/settings-tests | 1 + level_0/f_serialize/data/build/testfile | 2 +- level_0/f_socket/data/build/testfile | 2 +- level_0/f_status_string/data/build/testfile | 2 +- level_0/f_string/data/build/testfile | 2 +- level_0/f_type_array/data/build/testfile | 2 +- ...est-type_array-array_lengths_decimate_by.c | 24 +++++ ...est-type_array-array_lengths_decimate_by.h | 7 ++ ...est-type_array-array_lengths_decrease_by.c | 24 +++++ ...est-type_array-array_lengths_decrease_by.h | 7 ++ ...est-type_array-array_lengths_increase_by.c | 24 +++++ ...est-type_array-array_lengths_increase_by.h | 7 ++ .../c/test-type_array-cells_decimate_by.c | 24 +++++ .../c/test-type_array-cells_decimate_by.h | 7 ++ .../c/test-type_array-cells_decrease_by.c | 24 +++++ .../c/test-type_array-cells_decrease_by.h | 7 ++ .../c/test-type_array-cells_increase_by.c | 24 +++++ .../c/test-type_array-cells_increase_by.h | 7 ++ .../c/test-type_array-cellss_append_all.c | 22 ++--- .../c/test-type_array-fll_ids_decimate_by.c | 24 +++++ .../c/test-type_array-fll_ids_decimate_by.h | 7 ++ .../c/test-type_array-fll_ids_decrease_by.c | 24 +++++ .../c/test-type_array-fll_ids_decrease_by.h | 7 ++ .../c/test-type_array-fll_ids_increase_by.c | 24 +++++ .../c/test-type_array-fll_ids_increase_by.h | 7 ++ .../c/test-type_array-int128s_decimate_by.c | 24 +++++ .../c/test-type_array-int128s_decimate_by.h | 7 ++ .../c/test-type_array-int128s_decrease_by.c | 24 +++++ .../c/test-type_array-int128s_decrease_by.h | 7 ++ .../c/test-type_array-int128s_increase_by.c | 24 +++++ .../c/test-type_array-int128s_increase_by.h | 7 ++ .../c/test-type_array-int16s_decimate_by.c | 24 +++++ .../c/test-type_array-int16s_decimate_by.h | 7 ++ .../c/test-type_array-int16s_decrease_by.c | 24 +++++ .../c/test-type_array-int16s_decrease_by.h | 7 ++ .../c/test-type_array-int16s_increase_by.c | 24 +++++ .../c/test-type_array-int16s_increase_by.h | 7 ++ .../c/test-type_array-int32s_decimate_by.c | 24 +++++ .../c/test-type_array-int32s_decimate_by.h | 7 ++ .../c/test-type_array-int32s_decrease_by.c | 24 +++++ .../c/test-type_array-int32s_decrease_by.h | 7 ++ .../c/test-type_array-int32s_increase_by.c | 24 +++++ .../c/test-type_array-int32s_increase_by.h | 7 ++ .../c/test-type_array-int64s_decimate_by.c | 24 +++++ .../c/test-type_array-int64s_decimate_by.h | 7 ++ .../c/test-type_array-int64s_decrease_by.c | 24 +++++ .../c/test-type_array-int64s_decrease_by.h | 7 ++ .../c/test-type_array-int64s_increase_by.c | 24 +++++ .../c/test-type_array-int64s_increase_by.h | 7 ++ .../c/test-type_array-int8s_decimate_by.c | 24 +++++ .../c/test-type_array-int8s_decimate_by.h | 7 ++ .../c/test-type_array-int8s_decrease_by.c | 24 +++++ .../c/test-type_array-int8s_decrease_by.h | 7 ++ .../c/test-type_array-int8s_increase_by.c | 24 +++++ .../c/test-type_array-int8s_increase_by.h | 7 ++ .../c/test-type_array-states_decimate_by.c | 24 +++++ .../c/test-type_array-states_decimate_by.h | 7 ++ .../c/test-type_array-states_decrease_by.c | 24 +++++ .../c/test-type_array-states_decrease_by.h | 7 ++ .../c/test-type_array-states_increase_by.c | 24 +++++ .../c/test-type_array-states_increase_by.h | 7 ++ .../c/test-type_array-statuss_decimate_by.c | 24 +++++ .../c/test-type_array-statuss_decimate_by.h | 7 ++ .../c/test-type_array-statuss_decrease_by.c | 24 +++++ .../c/test-type_array-statuss_decrease_by.h | 7 ++ .../c/test-type_array-statuss_increase_by.c | 24 +++++ .../c/test-type_array-statuss_increase_by.h | 7 ++ .../c/test-type_array-uint128s_decimate_by.c | 24 +++++ .../c/test-type_array-uint128s_decimate_by.h | 7 ++ .../c/test-type_array-uint128s_decrease_by.c | 24 +++++ .../c/test-type_array-uint128s_decrease_by.h | 7 ++ .../c/test-type_array-uint128s_increase_by.c | 24 +++++ .../c/test-type_array-uint128s_increase_by.h | 7 ++ .../unit/c/test-type_array-uint128ss_adjust.h | 7 ++ .../c/test-type_array-uint16s_decimate_by.c | 24 +++++ .../c/test-type_array-uint16s_decimate_by.h | 7 ++ .../c/test-type_array-uint16s_decrease_by.c | 24 +++++ .../c/test-type_array-uint16s_decrease_by.h | 7 ++ .../c/test-type_array-uint16s_increase_by.c | 24 +++++ .../c/test-type_array-uint16s_increase_by.h | 7 ++ .../c/test-type_array-uint32s_decimate_by.c | 24 +++++ .../c/test-type_array-uint32s_decimate_by.h | 7 ++ .../c/test-type_array-uint32s_decrease_by.c | 24 +++++ .../c/test-type_array-uint32s_decrease_by.h | 7 ++ .../c/test-type_array-uint32s_increase_by.c | 24 +++++ .../c/test-type_array-uint32s_increase_by.h | 7 ++ .../c/test-type_array-uint64s_decimate_by.c | 24 +++++ .../c/test-type_array-uint64s_decimate_by.h | 7 ++ .../c/test-type_array-uint64s_decrease_by.c | 24 +++++ .../c/test-type_array-uint64s_decrease_by.h | 7 ++ .../c/test-type_array-uint64s_increase_by.c | 24 +++++ .../c/test-type_array-uint64s_increase_by.h | 7 ++ .../c/test-type_array-uint8s_decimate_by.c | 24 +++++ .../c/test-type_array-uint8s_decimate_by.h | 7 ++ .../c/test-type_array-uint8s_decrease_by.c | 24 +++++ .../c/test-type_array-uint8s_decrease_by.h | 7 ++ .../c/test-type_array-uint8s_increase_by.c | 25 ++++++ .../c/test-type_array-uint8s_increase_by.h | 7 ++ .../tests/unit/c/test-type_array.c | 90 +++++++++++++++++++ level_0/f_utf/data/build/testfile | 2 +- 116 files changed, 1528 insertions(+), 32 deletions(-) diff --git a/level_0/f_account/data/build/testfile b/level_0/f_account/data/build/testfile index c05a9d686..a6b28ed11 100644 --- a/level_0/f_account/data/build/testfile +++ b/level_0/f_account/data/build/testfile @@ -17,7 +17,7 @@ settings: #define CMOCKA_XML_FILE ./out.xml main: - build settings-mocks individual tests + build settings-mocks individual test build settings-tests individual test operate ld_library_path diff --git a/level_0/f_capability/data/build/testfile b/level_0/f_capability/data/build/testfile index 56019d2d4..378e39051 100644 --- a/level_0/f_capability/data/build/testfile +++ b/level_0/f_capability/data/build/testfile @@ -17,7 +17,7 @@ settings: #define CMOCKA_XML_FILE ./out.xml main: - build settings-mocks individual tests + build settings-mocks individual test build settings-tests individual test operate ld_library_path diff --git a/level_0/f_color/data/build/testfile b/level_0/f_color/data/build/testfile index 06377c281..db8792baa 100644 --- a/level_0/f_color/data/build/testfile +++ b/level_0/f_color/data/build/testfile @@ -17,7 +17,7 @@ settings: #define CMOCKA_XML_FILE ./out.xml main: - build settings-mocks individual tests + build settings-mocks individual test build settings-tests individual test operate ld_library_path diff --git a/level_0/f_console/data/build/testfile b/level_0/f_console/data/build/testfile index 93b306905..ae2d4bed2 100644 --- a/level_0/f_console/data/build/testfile +++ b/level_0/f_console/data/build/testfile @@ -17,7 +17,7 @@ settings: #define CMOCKA_XML_FILE ./out.xml main: - build settings individual tests + build settings individual test build settings-tests individual test operate ld_library_path diff --git a/level_0/f_control_group/data/build/testfile b/level_0/f_control_group/data/build/testfile index e76ee395c..331cbbcdb 100644 --- a/level_0/f_control_group/data/build/testfile +++ b/level_0/f_control_group/data/build/testfile @@ -17,7 +17,7 @@ settings: #define CMOCKA_XML_FILE ./out.xml main: - build settings individual tests + build settings individual test build settings-tests individual test operate ld_library_path diff --git a/level_0/f_conversion/data/build/testfile b/level_0/f_conversion/data/build/testfile index bd460764e..b1b8535e2 100644 --- a/level_0/f_conversion/data/build/testfile +++ b/level_0/f_conversion/data/build/testfile @@ -19,7 +19,7 @@ settings: main: # Disable mocks until mocking can be fixed for this project. #build settings-mocks - build settings individual tests + build settings individual test build settings-tests individual test operate ld_library_path diff --git a/level_0/f_directory/data/build/testfile b/level_0/f_directory/data/build/testfile index be7af0382..7c390e2cc 100644 --- a/level_0/f_directory/data/build/testfile +++ b/level_0/f_directory/data/build/testfile @@ -17,7 +17,7 @@ settings: #define CMOCKA_XML_FILE ./out.xml main: - build settings-mocks individual tests + build settings-mocks individual test build settings-tests individual test operate ld_library_path diff --git a/level_0/f_environment/data/build/testfile b/level_0/f_environment/data/build/testfile index 71249b710..2d488c4cb 100644 --- a/level_0/f_environment/data/build/testfile +++ b/level_0/f_environment/data/build/testfile @@ -17,7 +17,7 @@ settings: #define CMOCKA_XML_FILE ./out.xml main: - build settings-mocks individual tests + build settings-mocks individual test build settings-tests individual test operate ld_library_path diff --git a/level_0/f_execute/data/build/testfile b/level_0/f_execute/data/build/testfile index 619b20712..510d511ca 100644 --- a/level_0/f_execute/data/build/testfile +++ b/level_0/f_execute/data/build/testfile @@ -17,7 +17,7 @@ settings: #define CMOCKA_XML_FILE ./out.xml main: - build settings individual tests + build settings individual test build settings-tests individual test operate ld_library_path diff --git a/level_0/f_file/data/build/testfile b/level_0/f_file/data/build/testfile index 1d80c52b1..9cd9231ca 100644 --- a/level_0/f_file/data/build/testfile +++ b/level_0/f_file/data/build/testfile @@ -17,7 +17,7 @@ settings: #define CMOCKA_XML_FILE ./out.xml main: - build settings-mocks individual tests + build settings-mocks individual test build settings-tests individual test operate ld_library_path diff --git a/level_0/f_iki/data/build/testfile b/level_0/f_iki/data/build/testfile index e3904d2db..ea4a6a4b9 100644 --- a/level_0/f_iki/data/build/testfile +++ b/level_0/f_iki/data/build/testfile @@ -17,7 +17,7 @@ settings: #define CMOCKA_XML_FILE ./out.xml main: - build settings individual tests + build settings individual test build settings-tests individual test operate ld_library_path diff --git a/level_0/f_limit/data/build/testfile b/level_0/f_limit/data/build/testfile index d7768be5c..4fb065ee0 100644 --- a/level_0/f_limit/data/build/testfile +++ b/level_0/f_limit/data/build/testfile @@ -17,7 +17,7 @@ settings: #define CMOCKA_XML_FILE ./out.xml main: - build settings-mocks individual tests + build settings-mocks individual test build settings-tests individual test operate ld_library_path diff --git a/level_0/f_memory/data/build/testfile b/level_0/f_memory/data/build/testfile index 9921df5bf..7f9642d00 100644 --- a/level_0/f_memory/data/build/testfile +++ b/level_0/f_memory/data/build/testfile @@ -17,7 +17,7 @@ settings: #define CMOCKA_XML_FILE ./out.xml main: - build settings individual tests + build settings individual test build settings-tests individual test operate ld_library_path diff --git a/level_0/f_path/data/build/testfile b/level_0/f_path/data/build/testfile index ecf21ba58..a35c22d69 100644 --- a/level_0/f_path/data/build/testfile +++ b/level_0/f_path/data/build/testfile @@ -17,7 +17,7 @@ settings: #define CMOCKA_XML_FILE ./out.xml main: - build settings-mocks individual tests + build settings-mocks individual test build settings-tests individual test operate ld_library_path diff --git a/level_0/f_pipe/data/build/testfile b/level_0/f_pipe/data/build/testfile index 5dcdb2c06..27acfa154 100644 --- a/level_0/f_pipe/data/build/testfile +++ b/level_0/f_pipe/data/build/testfile @@ -17,7 +17,7 @@ settings: #define CMOCKA_XML_FILE ./out.xml main: - build settings-mocks individual tests + build settings-mocks individual test build settings-tests individual test operate ld_library_path diff --git a/level_0/f_print/data/build/settings-mocks b/level_0/f_print/data/build/settings-mocks index f52d1a522..315d13692 100644 --- a/level_0/f_print/data/build/settings-mocks +++ b/level_0/f_print/data/build/settings-mocks @@ -50,6 +50,8 @@ search_exclusive yes search_shared yes search_static yes +defines-clang -D_clang_not_a_compile_time_constant_workaround_ + flags -O0 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses flags-clang -Wno-logical-op-parentheses flags-test -fstack-protector -Wall diff --git a/level_0/f_print/data/build/settings-tests b/level_0/f_print/data/build/settings-tests index 3a01c8c3e..b3f47f8e4 100644 --- a/level_0/f_print/data/build/settings-tests +++ b/level_0/f_print/data/build/settings-tests @@ -62,6 +62,7 @@ search_shared yes search_static yes defines -Ibuild/includes +defines-clang -D_clang_not_a_compile_time_constant_workaround_ defines_static -Lbuild/libraries/static defines_shared -Lbuild/libraries/shared diff --git a/level_0/f_serialize/data/build/testfile b/level_0/f_serialize/data/build/testfile index 0f732c44a..88c56d3e9 100644 --- a/level_0/f_serialize/data/build/testfile +++ b/level_0/f_serialize/data/build/testfile @@ -17,7 +17,7 @@ settings: #define CMOCKA_XML_FILE ./out.xml main: - build settings individual tests + build settings individual test build settings-tests individual test operate ld_library_path diff --git a/level_0/f_socket/data/build/testfile b/level_0/f_socket/data/build/testfile index 0d11af5b4..08abf6eea 100644 --- a/level_0/f_socket/data/build/testfile +++ b/level_0/f_socket/data/build/testfile @@ -17,7 +17,7 @@ settings: #define CMOCKA_XML_FILE ./out.xml main: - build settings-mocks individual tests + build settings-mocks individual test build settings-tests individual test operate ld_library_path diff --git a/level_0/f_status_string/data/build/testfile b/level_0/f_status_string/data/build/testfile index a50294f9b..8331e2a07 100644 --- a/level_0/f_status_string/data/build/testfile +++ b/level_0/f_status_string/data/build/testfile @@ -17,7 +17,7 @@ settings: #define CMOCKA_XML_FILE ./out.xml main: - build settings individual tests + build settings individual test build settings-tests individual test operate ld_library_path diff --git a/level_0/f_string/data/build/testfile b/level_0/f_string/data/build/testfile index 36f3c7750..85b5e6b3b 100644 --- a/level_0/f_string/data/build/testfile +++ b/level_0/f_string/data/build/testfile @@ -17,7 +17,7 @@ settings: #define CMOCKA_XML_FILE ./out.xml main: - build settings individual tests + build settings individual test build settings-tests individual test operate ld_library_path diff --git a/level_0/f_type_array/data/build/testfile b/level_0/f_type_array/data/build/testfile index cc9d4d869..e2178dd39 100644 --- a/level_0/f_type_array/data/build/testfile +++ b/level_0/f_type_array/data/build/testfile @@ -17,7 +17,7 @@ settings: #define CMOCKA_XML_FILE ./out.xml main: - build settings individual tests + build settings individual test build settings-tests individual test operate ld_library_path diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_decimate_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_decimate_by.c index 1472bbeba..04d781efc 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_decimate_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_decimate_by.c @@ -21,6 +21,30 @@ void test__f_type_array_array_lengths_decimate_by__parameter_checking(void **sta assert_null(data.array); } +void test__f_type_array_array_lengths_decimate_by__returns_data_not(void **state) { + + const int length = 5; + f_array_lengths_t data = f_array_lengths_t_initialize; + + { + const f_status_t status = f_array_lengths_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_array_lengths_decimate_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_array_lengths_decimate_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_decimate_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_decimate_by.h index 7816c6004..df023afa5 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_decimate_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_decimate_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_array_lengths_decimate_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_array_lengths_decimate_by() + */ +extern void test__f_type_array_array_lengths_decimate_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_decrease_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_decrease_by.c index 0ea8d0539..669eae93e 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_decrease_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_decrease_by.c @@ -21,6 +21,30 @@ void test__f_type_array_array_lengths_decrease_by__parameter_checking(void **sta assert_null(data.array); } +void test__f_type_array_array_lengths_decrease_by__returns_data_not(void **state) { + + const int length = 5; + f_array_lengths_t data = f_array_lengths_t_initialize; + + { + const f_status_t status = f_array_lengths_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_array_lengths_decrease_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_array_lengths_decrease_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_decrease_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_decrease_by.h index cb533dd68..9a180cccf 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_decrease_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_decrease_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_array_lengths_decrease_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_array_lengths_decrease_by() + */ +extern void test__f_type_array_array_lengths_decrease_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_increase_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_increase_by.c index 6ffff45e6..0eae48301 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_increase_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_increase_by.c @@ -21,6 +21,30 @@ void test__f_type_array_array_lengths_increase_by__parameter_checking(void **sta assert_null(data.array); } +void test__f_type_array_array_lengths_increase_by__returns_data_not(void **state) { + + const int length = 5; + f_array_lengths_t data = f_array_lengths_t_initialize; + + { + const f_status_t status = f_array_lengths_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_array_lengths_increase_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_array_lengths_increase_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_increase_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_increase_by.h index 9f9daafef..955cb182d 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_increase_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_increase_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_array_lengths_increase_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_array_lengths_increase_by() + */ +extern void test__f_type_array_array_lengths_increase_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-cells_decimate_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-cells_decimate_by.c index 45cf6e979..072ba7f3a 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-cells_decimate_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-cells_decimate_by.c @@ -21,6 +21,30 @@ void test__f_type_array_cells_decimate_by__parameter_checking(void **state) { assert_null(data.array); } +void test__f_type_array_cells_decimate_by__returns_data_not(void **state) { + + const int length = 5; + f_cells_t data = f_cells_t_initialize; + + { + const f_status_t status = f_cells_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_cells_decimate_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_cells_decimate_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-cells_decimate_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-cells_decimate_by.h index a3abba22a..3a4ec6911 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-cells_decimate_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-cells_decimate_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_cells_decimate_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_cells_decimate_by() + */ +extern void test__f_type_array_cells_decimate_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-cells_decrease_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-cells_decrease_by.c index 7cd12b15c..5f5015456 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-cells_decrease_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-cells_decrease_by.c @@ -21,6 +21,30 @@ void test__f_type_array_cells_decrease_by__parameter_checking(void **state) { assert_null(data.array); } +void test__f_type_array_cells_decrease_by__returns_data_not(void **state) { + + const int length = 5; + f_cells_t data = f_cells_t_initialize; + + { + const f_status_t status = f_cells_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_cells_decrease_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_cells_decrease_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-cells_decrease_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-cells_decrease_by.h index 71c3e2377..02b621d10 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-cells_decrease_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-cells_decrease_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_cells_decrease_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_cells_decrease_by() + */ +extern void test__f_type_array_cells_decrease_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-cells_increase_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-cells_increase_by.c index debeb96db..7ae85cb85 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-cells_increase_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-cells_increase_by.c @@ -21,6 +21,30 @@ void test__f_type_array_cells_increase_by__parameter_checking(void **state) { assert_null(data.array); } +void test__f_type_array_cells_increase_by__returns_data_not(void **state) { + + const int length = 5; + f_cells_t data = f_cells_t_initialize; + + { + const f_status_t status = f_cells_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_cells_increase_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_cells_increase_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-cells_increase_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-cells_increase_by.h index 896175e43..558b42268 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-cells_increase_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-cells_increase_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_cells_increase_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_cells_increase_by() + */ +extern void test__f_type_array_cells_increase_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-cellss_append_all.c b/level_0/f_type_array/tests/unit/c/test-type_array-cellss_append_all.c index 8ffe29740..e219131ec 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-cellss_append_all.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-cellss_append_all.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_type_array_cellss_append_all__parameter_checking(void **state) { + + const f_cellss_t data = f_cellss_t_initialize; + + { + const f_status_t status = f_cellss_append_all(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_type_array_cellss_append_all__returns_data_not(void **state) { const int length = 5; @@ -31,17 +42,6 @@ void test__f_type_array_cellss_append_all__returns_data_not(void **state) { free((void *) source.array); } -void test__f_type_array_cellss_append_all__parameter_checking(void **state) { - - const f_cellss_t data = f_cellss_t_initialize; - - { - const f_status_t status = f_cellss_append_all(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - void test__f_type_array_cellss_append_all__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_decimate_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_decimate_by.c index fdc51380a..85b522820 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_decimate_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_decimate_by.c @@ -21,6 +21,30 @@ void test__f_type_array_fll_ids_decimate_by__parameter_checking(void **state) { assert_null(data.array); } +void test__f_type_array_fll_ids_decimate_by__returns_data_not(void **state) { + + const int length = 5; + f_fll_ids_t data = f_fll_ids_t_initialize; + + { + const f_status_t status = f_fll_ids_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_fll_ids_decimate_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_fll_ids_decimate_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_decimate_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_decimate_by.h index 81a721fe8..e65ed8f05 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_decimate_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_decimate_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_fll_ids_decimate_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_fll_ids_decimate_by() + */ +extern void test__f_type_array_fll_ids_decimate_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_decrease_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_decrease_by.c index a55df2d16..6815c0ccc 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_decrease_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_decrease_by.c @@ -21,6 +21,30 @@ void test__f_type_array_fll_ids_decrease_by__parameter_checking(void **state) { assert_null(data.array); } +void test__f_type_array_fll_ids_decrease_by__returns_data_not(void **state) { + + const int length = 5; + f_fll_ids_t data = f_fll_ids_t_initialize; + + { + const f_status_t status = f_fll_ids_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_fll_ids_decrease_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_fll_ids_decrease_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_decrease_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_decrease_by.h index 568cd1397..eac27d869 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_decrease_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_decrease_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_fll_ids_decrease_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_fll_ids_decrease_by() + */ +extern void test__f_type_array_fll_ids_decrease_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_increase_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_increase_by.c index 9faef8973..e95bab0c6 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_increase_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_increase_by.c @@ -21,6 +21,30 @@ void test__f_type_array_fll_ids_increase_by__parameter_checking(void **state) { assert_null(data.array); } +void test__f_type_array_fll_ids_increase_by__returns_data_not(void **state) { + + const int length = 5; + f_fll_ids_t data = f_fll_ids_t_initialize; + + { + const f_status_t status = f_fll_ids_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_fll_ids_increase_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_fll_ids_increase_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_increase_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_increase_by.h index c60ae6876..513e6bc47 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_increase_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_increase_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_fll_ids_increase_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_fll_ids_increase_by() + */ +extern void test__f_type_array_fll_ids_increase_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int128s_decimate_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-int128s_decimate_by.c index 3d4ed9136..9a655aa06 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-int128s_decimate_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-int128s_decimate_by.c @@ -21,6 +21,30 @@ void test__f_type_array_int128s_decimate_by__parameter_checking(void **state) { assert_null(data.array); } +void test__f_type_array_int128s_decimate_by__returns_data_not(void **state) { + + const int length = 5; + f_int128s_t data = f_int128s_t_initialize; + + { + const f_status_t status = f_int128s_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_int128s_decimate_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_int128s_decimate_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int128s_decimate_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-int128s_decimate_by.h index 62689ba69..ec1534904 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-int128s_decimate_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-int128s_decimate_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_int128s_decimate_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_int128s_decimate_by() + */ +extern void test__f_type_array_int128s_decimate_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int128s_decrease_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-int128s_decrease_by.c index bc7831ba7..5039bf92e 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-int128s_decrease_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-int128s_decrease_by.c @@ -21,6 +21,30 @@ void test__f_type_array_int128s_decrease_by__parameter_checking(void **state) { assert_null(data.array); } +void test__f_type_array_int128s_decrease_by__returns_data_not(void **state) { + + const int length = 5; + f_int128s_t data = f_int128s_t_initialize; + + { + const f_status_t status = f_int128s_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_int128s_decrease_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_int128s_decrease_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int128s_decrease_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-int128s_decrease_by.h index 3dd881a59..cd62483dc 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-int128s_decrease_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-int128s_decrease_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_int128s_decrease_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_int128s_decrease_by() + */ +extern void test__f_type_array_int128s_decrease_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int128s_increase_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-int128s_increase_by.c index 059d196bb..d74b84d5e 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-int128s_increase_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-int128s_increase_by.c @@ -21,6 +21,30 @@ void test__f_type_array_int128s_increase_by__parameter_checking(void **state) { assert_null(data.array); } +void test__f_type_array_int128s_increase_by__returns_data_not(void **state) { + + const int length = 5; + f_int128s_t data = f_int128s_t_initialize; + + { + const f_status_t status = f_int128s_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_int128s_increase_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_int128s_increase_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int128s_increase_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-int128s_increase_by.h index 77c8b26d2..4536a2aac 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-int128s_increase_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-int128s_increase_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_int128s_increase_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_int128s_increase_by() + */ +extern void test__f_type_array_int128s_increase_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int16s_decimate_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-int16s_decimate_by.c index fc67c906a..a8f4dd183 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-int16s_decimate_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-int16s_decimate_by.c @@ -21,6 +21,30 @@ void test__f_type_array_int16s_decimate_by__parameter_checking(void **state) { assert_null(data.array); } +void test__f_type_array_int16s_decimate_by__returns_data_not(void **state) { + + const int length = 5; + f_int16s_t data = f_int16s_t_initialize; + + { + const f_status_t status = f_int16s_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_int16s_decimate_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_int16s_decimate_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int16s_decimate_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-int16s_decimate_by.h index 4341b060b..8c0930fcb 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-int16s_decimate_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-int16s_decimate_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_int16s_decimate_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_int16s_decimate_by() + */ +extern void test__f_type_array_int16s_decimate_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int16s_decrease_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-int16s_decrease_by.c index b4ac65989..a25efbd81 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-int16s_decrease_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-int16s_decrease_by.c @@ -21,6 +21,30 @@ void test__f_type_array_int16s_decrease_by__parameter_checking(void **state) { assert_null(data.array); } +void test__f_type_array_int16s_decrease_by__returns_data_not(void **state) { + + const int length = 5; + f_int16s_t data = f_int16s_t_initialize; + + { + const f_status_t status = f_int16s_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_int16s_decrease_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_int16s_decrease_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int16s_decrease_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-int16s_decrease_by.h index 695b227c5..933deecea 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-int16s_decrease_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-int16s_decrease_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_int16s_decrease_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_int16s_decrease_by() + */ +extern void test__f_type_array_int16s_decrease_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int16s_increase_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-int16s_increase_by.c index e33b5a4a3..e1d7d72ec 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-int16s_increase_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-int16s_increase_by.c @@ -21,6 +21,30 @@ void test__f_type_array_int16s_increase_by__parameter_checking(void **state) { assert_null(data.array); } +void test__f_type_array_int16s_increase_by__returns_data_not(void **state) { + + const int length = 5; + f_int16s_t data = f_int16s_t_initialize; + + { + const f_status_t status = f_int16s_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_int16s_increase_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_int16s_increase_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int16s_increase_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-int16s_increase_by.h index 575753fc6..124301a6b 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-int16s_increase_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-int16s_increase_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_int16s_increase_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_int16s_increase_by() + */ +extern void test__f_type_array_int16s_increase_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int32s_decimate_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-int32s_decimate_by.c index c7ad47911..7b6c32694 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-int32s_decimate_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-int32s_decimate_by.c @@ -21,6 +21,30 @@ void test__f_type_array_int32s_decimate_by__parameter_checking(void **state) { assert_null(data.array); } +void test__f_type_array_int32s_decimate_by__returns_data_not(void **state) { + + const int length = 5; + f_int32s_t data = f_int32s_t_initialize; + + { + const f_status_t status = f_int32s_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_int32s_decimate_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_int32s_decimate_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int32s_decimate_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-int32s_decimate_by.h index f6e6e0d09..346fb8469 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-int32s_decimate_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-int32s_decimate_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_int32s_decimate_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_int32s_decimate_by() + */ +extern void test__f_type_array_int32s_decimate_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int32s_decrease_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-int32s_decrease_by.c index 0eec16142..3bfb171b2 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-int32s_decrease_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-int32s_decrease_by.c @@ -21,6 +21,30 @@ void test__f_type_array_int32s_decrease_by__parameter_checking(void **state) { assert_null(data.array); } +void test__f_type_array_int32s_decrease_by__returns_data_not(void **state) { + + const int length = 5; + f_int32s_t data = f_int32s_t_initialize; + + { + const f_status_t status = f_int32s_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_int32s_decrease_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_int32s_decrease_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int32s_decrease_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-int32s_decrease_by.h index 93be3e1e0..05f81d298 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-int32s_decrease_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-int32s_decrease_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_int32s_decrease_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_int32s_decrease_by() + */ +extern void test__f_type_array_int32s_decrease_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int32s_increase_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-int32s_increase_by.c index 2f609afec..f7ee04a1c 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-int32s_increase_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-int32s_increase_by.c @@ -21,6 +21,30 @@ void test__f_type_array_int32s_increase_by__parameter_checking(void **state) { assert_null(data.array); } +void test__f_type_array_int32s_increase_by__returns_data_not(void **state) { + + const int length = 5; + f_int32s_t data = f_int32s_t_initialize; + + { + const f_status_t status = f_int32s_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_int32s_increase_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_int32s_increase_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int32s_increase_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-int32s_increase_by.h index 0f7ea165f..7124ba61e 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-int32s_increase_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-int32s_increase_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_int32s_increase_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_int32s_increase_by() + */ +extern void test__f_type_array_int32s_increase_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int64s_decimate_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-int64s_decimate_by.c index a5be8d892..272d0801c 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-int64s_decimate_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-int64s_decimate_by.c @@ -21,6 +21,30 @@ void test__f_type_array_int64s_decimate_by__parameter_checking(void **state) { assert_null(data.array); } +void test__f_type_array_int64s_decimate_by__returns_data_not(void **state) { + + const int length = 5; + f_int64s_t data = f_int64s_t_initialize; + + { + const f_status_t status = f_int64s_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_int64s_decimate_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_int64s_decimate_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int64s_decimate_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-int64s_decimate_by.h index feeb67da0..e734e736e 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-int64s_decimate_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-int64s_decimate_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_int64s_decimate_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_int64s_decimate_by() + */ +extern void test__f_type_array_int64s_decimate_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int64s_decrease_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-int64s_decrease_by.c index 581f31ec1..83c490745 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-int64s_decrease_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-int64s_decrease_by.c @@ -21,6 +21,30 @@ void test__f_type_array_int64s_decrease_by__parameter_checking(void **state) { assert_null(data.array); } +void test__f_type_array_int64s_decrease_by__returns_data_not(void **state) { + + const int length = 5; + f_int64s_t data = f_int64s_t_initialize; + + { + const f_status_t status = f_int64s_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_int64s_decrease_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_int64s_decrease_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int64s_decrease_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-int64s_decrease_by.h index 4c3511cc8..da5afd2b0 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-int64s_decrease_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-int64s_decrease_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_int64s_decrease_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_int64s_decrease_by() + */ +extern void test__f_type_array_int64s_decrease_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int64s_increase_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-int64s_increase_by.c index 2ce8ad622..a45c56fa9 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-int64s_increase_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-int64s_increase_by.c @@ -21,6 +21,30 @@ void test__f_type_array_int64s_increase_by__parameter_checking(void **state) { assert_null(data.array); } +void test__f_type_array_int64s_increase_by__returns_data_not(void **state) { + + const int length = 5; + f_int64s_t data = f_int64s_t_initialize; + + { + const f_status_t status = f_int64s_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_int64s_increase_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_int64s_increase_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int64s_increase_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-int64s_increase_by.h index fa02badb9..939a1b9ef 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-int64s_increase_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-int64s_increase_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_int64s_increase_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_int64s_increase_by() + */ +extern void test__f_type_array_int64s_increase_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int8s_decimate_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-int8s_decimate_by.c index 19cd30853..2bf8d355a 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-int8s_decimate_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-int8s_decimate_by.c @@ -21,6 +21,30 @@ void test__f_type_array_int8s_decimate_by__parameter_checking(void **state) { assert_null(data.array); } +void test__f_type_array_int8s_decimate_by__returns_data_not(void **state) { + + const int length = 5; + f_int8s_t data = f_int8s_t_initialize; + + { + const f_status_t status = f_int8s_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_int8s_decimate_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_int8s_decimate_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int8s_decimate_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-int8s_decimate_by.h index a73804b1e..a68591466 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-int8s_decimate_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-int8s_decimate_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_int8s_decimate_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_int8s_decimate_by() + */ +extern void test__f_type_array_int8s_decimate_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int8s_decrease_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-int8s_decrease_by.c index 156501472..79ba58723 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-int8s_decrease_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-int8s_decrease_by.c @@ -21,6 +21,30 @@ void test__f_type_array_int8s_decrease_by__parameter_checking(void **state) { assert_null(data.array); } +void test__f_type_array_int8s_decrease_by__returns_data_not(void **state) { + + const int length = 5; + f_int8s_t data = f_int8s_t_initialize; + + { + const f_status_t status = f_int8s_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_int8s_decrease_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_int8s_decrease_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int8s_decrease_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-int8s_decrease_by.h index edba0a358..4e98750b5 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-int8s_decrease_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-int8s_decrease_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_int8s_decrease_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_int8s_decrease_by() + */ +extern void test__f_type_array_int8s_decrease_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int8s_increase_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-int8s_increase_by.c index 6b022216a..6e9445cb7 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-int8s_increase_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-int8s_increase_by.c @@ -21,6 +21,30 @@ void test__f_type_array_int8s_increase_by__parameter_checking(void **state) { assert_null(data.array); } +void test__f_type_array_int8s_increase_by__returns_data_not(void **state) { + + const int length = 5; + f_int8s_t data = f_int8s_t_initialize; + + { + const f_status_t status = f_int8s_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_int8s_increase_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_int8s_increase_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int8s_increase_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-int8s_increase_by.h index 9934fed7c..d7a7f1336 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-int8s_increase_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-int8s_increase_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_int8s_increase_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_int8s_increase_by() + */ +extern void test__f_type_array_int8s_increase_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-states_decimate_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-states_decimate_by.c index e74f0b72f..363cc277d 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-states_decimate_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-states_decimate_by.c @@ -21,6 +21,30 @@ void test__f_type_array_states_decimate_by__parameter_checking(void **state) { assert_null(data.array); } +void test__f_type_array_states_decimate_by__returns_data_not(void **state) { + + const int length = 5; + f_states_t data = f_states_t_initialize; + + { + const f_status_t status = f_states_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_states_decimate_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_states_decimate_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-states_decimate_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-states_decimate_by.h index 7c983cd81..e09c66624 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-states_decimate_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-states_decimate_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_states_decimate_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_states_decimate_by() + */ +extern void test__f_type_array_states_decimate_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-states_decrease_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-states_decrease_by.c index 1b15b17c4..6ecf14fc4 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-states_decrease_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-states_decrease_by.c @@ -21,6 +21,30 @@ void test__f_type_array_states_decrease_by__parameter_checking(void **state) { assert_null(data.array); } +void test__f_type_array_states_decrease_by__returns_data_not(void **state) { + + const int length = 5; + f_states_t data = f_states_t_initialize; + + { + const f_status_t status = f_states_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_states_decrease_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_states_decrease_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-states_decrease_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-states_decrease_by.h index d79921a61..3c0bc1e4d 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-states_decrease_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-states_decrease_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_states_decrease_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_states_decrease_by() + */ +extern void test__f_type_array_states_decrease_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-states_increase_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-states_increase_by.c index 3cfc0b928..ae7f3112b 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-states_increase_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-states_increase_by.c @@ -21,6 +21,30 @@ void test__f_type_array_states_increase_by__parameter_checking(void **state) { assert_null(data.array); } +void test__f_type_array_states_increase_by__returns_data_not(void **state) { + + const int length = 5; + f_states_t data = f_states_t_initialize; + + { + const f_status_t status = f_states_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_states_increase_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_states_increase_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-states_increase_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-states_increase_by.h index 1b1011ff6..faf7e6d80 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-states_increase_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-states_increase_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_states_increase_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_states_increase_by() + */ +extern void test__f_type_array_states_increase_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-statuss_decimate_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-statuss_decimate_by.c index 479f12925..961dc76c3 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-statuss_decimate_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-statuss_decimate_by.c @@ -21,6 +21,30 @@ void test__f_type_array_statuss_decimate_by__parameter_checking(void **state) { assert_null(data.array); } +void test__f_type_array_statuss_decimate_by__returns_data_not(void **state) { + + const int length = 5; + f_statuss_t data = f_statuss_t_initialize; + + { + const f_status_t status = f_statuss_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_statuss_decimate_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_statuss_decimate_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-statuss_decimate_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-statuss_decimate_by.h index f999d0cb7..c67422273 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-statuss_decimate_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-statuss_decimate_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_statuss_decimate_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_statuss_decimate_by() + */ +extern void test__f_type_array_statuss_decimate_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-statuss_decrease_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-statuss_decrease_by.c index 1c92e8db3..449c3f9cc 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-statuss_decrease_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-statuss_decrease_by.c @@ -21,6 +21,30 @@ void test__f_type_array_statuss_decrease_by__parameter_checking(void **state) { assert_null(data.array); } +void test__f_type_array_statuss_decrease_by__returns_data_not(void **state) { + + const int length = 5; + f_statuss_t data = f_statuss_t_initialize; + + { + const f_status_t status = f_statuss_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_statuss_decrease_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_statuss_decrease_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-statuss_decrease_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-statuss_decrease_by.h index 523c47c0b..3ddc5e0db 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-statuss_decrease_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-statuss_decrease_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_statuss_decrease_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_statuss_decrease_by() + */ +extern void test__f_type_array_statuss_decrease_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-statuss_increase_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-statuss_increase_by.c index 5cc7bd6b4..5585c1701 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-statuss_increase_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-statuss_increase_by.c @@ -22,6 +22,30 @@ void test__f_type_array_statuss_increase_by__parameter_checking(void **state) { assert_null(data.array); } +void test__f_type_array_statuss_increase_by__returns_data_not(void **state) { + + const int length = 5; + f_statuss_t data = f_statuss_t_initialize; + + { + const f_status_t status = f_statuss_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_statuss_increase_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_statuss_increase_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-statuss_increase_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-statuss_increase_by.h index 0bed9391d..41fe6f051 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-statuss_increase_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-statuss_increase_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_statuss_increase_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_statuss_increase_by() + */ +extern void test__f_type_array_statuss_increase_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_decimate_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_decimate_by.c index 256d110e8..14b4f6694 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_decimate_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_decimate_by.c @@ -21,6 +21,30 @@ void test__f_type_array_uint128s_decimate_by__parameter_checking(void **state) { assert_null(data.array); } +void test__f_type_array_uint128s_decimate_by__returns_data_not(void **state) { + + const int length = 5; + f_uint128s_t data = f_uint128s_t_initialize; + + { + const f_status_t status = f_uint128s_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_uint128s_decimate_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_uint128s_decimate_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_decimate_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_decimate_by.h index bccbadadc..02bf1a57a 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_decimate_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_decimate_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_uint128s_decimate_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_uint128s_decimate_by() + */ +extern void test__f_type_array_uint128s_decimate_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_decrease_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_decrease_by.c index a6322721e..11025d116 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_decrease_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_decrease_by.c @@ -21,6 +21,30 @@ void test__f_type_array_uint128s_decrease_by__parameter_checking(void **state) { assert_null(data.array); } +void test__f_type_array_uint128s_decrease_by__returns_data_not(void **state) { + + const int length = 5; + f_uint128s_t data = f_uint128s_t_initialize; + + { + const f_status_t status = f_uint128s_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_uint128s_decrease_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_uint128s_decrease_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_decrease_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_decrease_by.h index a3e3b81ab..82f63fb1d 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_decrease_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_decrease_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_uint128s_decrease_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_uint128s_decrease_by() + */ +extern void test__f_type_array_uint128s_decrease_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_increase_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_increase_by.c index 8a3424d72..6be1ebafd 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_increase_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_increase_by.c @@ -21,6 +21,30 @@ void test__f_type_array_uint128s_increase_by__parameter_checking(void **state) { assert_null(data.array); } +void test__f_type_array_uint128s_increase_by__returns_data_not(void **state) { + + const int length = 5; + f_uint128s_t data = f_uint128s_t_initialize; + + { + const f_status_t status = f_uint128s_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_uint128s_increase_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_uint128s_increase_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_increase_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_increase_by.h index 9200183f9..10ef9af20 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_increase_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_increase_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_uint128s_increase_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_uint128s_increase_by() + */ +extern void test__f_type_array_uint128s_increase_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_adjust.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_adjust.h index 75f000a1f..02cfc42bb 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_adjust.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_adjust.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_uint128ss_adjust__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_uint128ss_increase_by() + */ +extern void test__f_type_array_uint128ss_increase_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_decimate_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_decimate_by.c index 7a9020b53..4c4c0b9e0 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_decimate_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_decimate_by.c @@ -21,6 +21,30 @@ void test__f_type_array_uint16s_decimate_by__parameter_checking(void **state) { assert_null(data.array); } +void test__f_type_array_uint16s_decimate_by__returns_data_not(void **state) { + + const int length = 5; + f_uint16s_t data = f_uint16s_t_initialize; + + { + const f_status_t status = f_uint16s_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_uint16s_decimate_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_uint16s_decimate_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_decimate_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_decimate_by.h index 90ab5fd3e..f1f9ac547 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_decimate_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_decimate_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_uint16s_decimate_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_uint16s_decimate_by() + */ +extern void test__f_type_array_uint16s_decimate_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_decrease_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_decrease_by.c index 00979b4be..9c0ffe0c1 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_decrease_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_decrease_by.c @@ -21,6 +21,30 @@ void test__f_type_array_uint16s_decrease_by__parameter_checking(void **state) { assert_null(data.array); } +void test__f_type_array_uint16s_decrease_by__returns_data_not(void **state) { + + const int length = 5; + f_uint16s_t data = f_uint16s_t_initialize; + + { + const f_status_t status = f_uint16s_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_uint16s_decrease_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_uint16s_decrease_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_decrease_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_decrease_by.h index c2ab789e5..6390a2f76 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_decrease_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_decrease_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_uint16s_decrease_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_uint16s_decrease_by() + */ +extern void test__f_type_array_uint16s_decrease_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_increase_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_increase_by.c index 1784d0662..8da3d3eb9 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_increase_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_increase_by.c @@ -21,6 +21,30 @@ void test__f_type_array_uint16s_increase_by__parameter_checking(void **state) { assert_null(data.array); } +void test__f_type_array_uint16s_increase_by__returns_data_not(void **state) { + + const int length = 5; + f_uint16s_t data = f_uint16s_t_initialize; + + { + const f_status_t status = f_uint16s_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_uint16s_increase_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_uint16s_increase_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_increase_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_increase_by.h index 5d7f3e2d7..dc6168c5a 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_increase_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_increase_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_uint16s_increase_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_uint16s_increase_by() + */ +extern void test__f_type_array_uint16s_increase_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_decimate_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_decimate_by.c index 5fc0dc40a..f73028ad4 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_decimate_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_decimate_by.c @@ -21,6 +21,30 @@ void test__f_type_array_uint32s_decimate_by__parameter_checking(void **state) { assert_null(data.array); } +void test__f_type_array_uint32s_decimate_by__returns_data_not(void **state) { + + const int length = 5; + f_uint32s_t data = f_uint32s_t_initialize; + + { + const f_status_t status = f_uint32s_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_uint32s_decimate_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_uint32s_decimate_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_decimate_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_decimate_by.h index e76bc6058..3c0c5926f 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_decimate_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_decimate_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_uint32s_decimate_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_uint32s_decimate_by() + */ +extern void test__f_type_array_uint32s_decimate_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_decrease_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_decrease_by.c index 207d384ab..eff4ffa9d 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_decrease_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_decrease_by.c @@ -21,6 +21,30 @@ void test__f_type_array_uint32s_decrease_by__parameter_checking(void **state) { assert_null(data.array); } +void test__f_type_array_uint32s_decrease_by__returns_data_not(void **state) { + + const int length = 5; + f_uint32s_t data = f_uint32s_t_initialize; + + { + const f_status_t status = f_uint32s_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_uint32s_decrease_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_uint32s_decrease_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_decrease_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_decrease_by.h index bf74dcb30..e1cddc58a 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_decrease_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_decrease_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_uint32s_decrease_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_uint32s_decrease_by() + */ +extern void test__f_type_array_uint32s_decrease_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_increase_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_increase_by.c index 8d42d04e5..a05c1d24b 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_increase_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_increase_by.c @@ -21,6 +21,30 @@ void test__f_type_array_uint32s_increase_by__parameter_checking(void **state) { assert_null(data.array); } +void test__f_type_array_uint32s_increase_by__returns_data_not(void **state) { + + const int length = 5; + f_uint32s_t data = f_uint32s_t_initialize; + + { + const f_status_t status = f_uint32s_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_uint32s_increase_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_uint32s_increase_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_increase_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_increase_by.h index 9b6dd4532..53e5e410f 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_increase_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_increase_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_uint32s_increase_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_uint32s_increase_by() + */ +extern void test__f_type_array_uint32s_increase_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_decimate_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_decimate_by.c index 03532923a..92109ee96 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_decimate_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_decimate_by.c @@ -21,6 +21,30 @@ void test__f_type_array_uint64s_decimate_by__parameter_checking(void **state) { assert_null(data.array); } +void test__f_type_array_uint64s_decimate_by__returns_data_not(void **state) { + + const int length = 5; + f_uint64s_t data = f_uint64s_t_initialize; + + { + const f_status_t status = f_uint64s_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_uint64s_decimate_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_uint64s_decimate_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_decimate_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_decimate_by.h index 6ab6f114e..18e1bfd8e 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_decimate_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_decimate_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_uint64s_decimate_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_uint64s_decimate_by() + */ +extern void test__f_type_array_uint64s_decimate_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_decrease_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_decrease_by.c index 35d7845d0..018c1c8fa 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_decrease_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_decrease_by.c @@ -21,6 +21,30 @@ void test__f_type_array_uint64s_decrease_by__parameter_checking(void **state) { assert_null(data.array); } +void test__f_type_array_uint64s_decrease_by__returns_data_not(void **state) { + + const int length = 5; + f_uint64s_t data = f_uint64s_t_initialize; + + { + const f_status_t status = f_uint64s_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_uint64s_decrease_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_uint64s_decrease_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_decrease_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_decrease_by.h index c862c30d7..024d9296e 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_decrease_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_decrease_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_uint64s_decrease_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_uint64s_decrease_by() + */ +extern void test__f_type_array_uint64s_decrease_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_increase_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_increase_by.c index f3ef9ea1a..a16d82c72 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_increase_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_increase_by.c @@ -21,6 +21,30 @@ void test__f_type_array_uint64s_increase_by__parameter_checking(void **state) { assert_null(data.array); } +void test__f_type_array_uint64s_increase_by__returns_data_not(void **state) { + + const int length = 5; + f_uint64s_t data = f_uint64s_t_initialize; + + { + const f_status_t status = f_uint64s_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_uint64s_increase_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_uint64s_increase_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_increase_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_increase_by.h index 60e4e77b0..573065c70 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_increase_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_increase_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_uint64s_increase_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_uint64s_increase_by() + */ +extern void test__f_type_array_uint64s_increase_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_decimate_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_decimate_by.c index 2d3a21a9c..99e13196e 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_decimate_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_decimate_by.c @@ -21,6 +21,30 @@ void test__f_type_array_uint8s_decimate_by__parameter_checking(void **state) { assert_null(data.array); } +void test__f_type_array_uint8s_decimate_by__returns_data_not(void **state) { + + const int length = 5; + f_uint8s_t data = f_uint8s_t_initialize; + + { + const f_status_t status = f_uint8s_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_uint8s_decimate_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_uint8s_decimate_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_decimate_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_decimate_by.h index 709cec41a..cd88cae4a 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_decimate_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_decimate_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_uint8s_decimate_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_uint8s_decimate_by() + */ +extern void test__f_type_array_uint8s_decimate_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_decrease_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_decrease_by.c index 7b12e5958..ead28f546 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_decrease_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_decrease_by.c @@ -21,6 +21,30 @@ void test__f_type_array_uint8s_decrease_by__parameter_checking(void **state) { assert_null(data.array); } +void test__f_type_array_uint8s_decrease_by__returns_data_not(void **state) { + + const int length = 5; + f_uint8s_t data = f_uint8s_t_initialize; + + { + const f_status_t status = f_uint8s_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_uint8s_decrease_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_uint8s_decrease_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_decrease_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_decrease_by.h index c73f24e57..0349f1b0c 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_decrease_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_decrease_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_uint8s_decrease_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_uint8s_decrease_by() + */ +extern void test__f_type_array_uint8s_decrease_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_increase_by.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_increase_by.c index 98a32b2a4..29ac46d7d 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_increase_by.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_increase_by.c @@ -21,6 +21,31 @@ void test__f_type_array_uint8s_increase_by__parameter_checking(void **state) { assert_null(data.array); } + +void test__f_type_array_uint8s_increase_by__returns_data_not(void **state) { + + const int length = 5; + f_uint8s_t data = f_uint8s_t_initialize; + + { + const f_status_t status = f_uint8s_resize(length, &data); + + assert_int_equal(status, F_none); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + { + const f_status_t status = f_uint8s_increase_by(0, &data); + + assert_int_equal(status, F_data_not); + assert_int_equal(data.used, 0); + assert_int_equal(data.size, length); + } + + free((void *) data.array); +} + void test__f_type_array_uint8s_increase_by__works(void **state) { const int length = 5; diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_increase_by.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_increase_by.h index 7ac98ebe6..941191b5c 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_increase_by.h +++ b/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_increase_by.h @@ -17,6 +17,13 @@ */ extern void test__f_type_array_uint8s_increase_by__parameter_checking(void **state); +/** + * Test that the function returns F_data_not. + * + * @see f_uint8s_increase_by() + */ +extern void test__f_type_array_uint8s_increase_by__returns_data_not(void **state); + /** * Test that the function works. * diff --git a/level_0/f_type_array/tests/unit/c/test-type_array.c b/level_0/f_type_array/tests/unit/c/test-type_array.c index 15ee24517..8e4b8bfb9 100644 --- a/level_0/f_type_array/tests/unit/c/test-type_array.c +++ b/level_0/f_type_array/tests/unit/c/test-type_array.c @@ -17,6 +17,12 @@ int setdown(void **state) { int main(void) { const struct CMUnitTest tests[] = { + cmocka_unit_test(test__f_type_array_array_lengths_append_all__returns_data_not), + cmocka_unit_test(test__f_type_array_array_lengths_decimate_by__returns_data_not), + cmocka_unit_test(test__f_type_array_array_lengths_decrease_by__returns_data_not), + cmocka_unit_test(test__f_type_array_array_lengths_increase__returns_data_not), + cmocka_unit_test(test__f_type_array_array_lengths_increase_by__returns_data_not), + cmocka_unit_test(test__f_type_array_array_lengths_adjust__works), cmocka_unit_test(test__f_type_array_array_lengths_append__works), cmocka_unit_test(test__f_type_array_array_lengths_append_all__works), @@ -42,6 +48,12 @@ int main(void) { cmocka_unit_test(test__f_type_array_array_lengthss_increase_by__works), cmocka_unit_test(test__f_type_array_array_lengthss_resize__works), + cmocka_unit_test(test__f_type_array_cells_append_all__returns_data_not), + cmocka_unit_test(test__f_type_array_cells_decimate_by__returns_data_not), + cmocka_unit_test(test__f_type_array_cells_decrease_by__returns_data_not), + cmocka_unit_test(test__f_type_array_cells_increase__returns_data_not), + cmocka_unit_test(test__f_type_array_cells_increase_by__returns_data_not), + cmocka_unit_test(test__f_type_array_cells_adjust__works), cmocka_unit_test(test__f_type_array_cells_append__works), cmocka_unit_test(test__f_type_array_cells_append_all__works), @@ -67,6 +79,12 @@ int main(void) { cmocka_unit_test(test__f_type_array_cellss_increase_by__works), cmocka_unit_test(test__f_type_array_cellss_resize__works), + cmocka_unit_test(test__f_type_array_fll_ids_append_all__returns_data_not), + cmocka_unit_test(test__f_type_array_fll_ids_decimate_by__returns_data_not), + cmocka_unit_test(test__f_type_array_fll_ids_decrease_by__returns_data_not), + cmocka_unit_test(test__f_type_array_fll_ids_increase__returns_data_not), + cmocka_unit_test(test__f_type_array_fll_ids_increase_by__returns_data_not), + cmocka_unit_test(test__f_type_array_fll_ids_adjust__works), cmocka_unit_test(test__f_type_array_fll_ids_append__works), cmocka_unit_test(test__f_type_array_fll_ids_append_all__works), @@ -92,6 +110,12 @@ int main(void) { cmocka_unit_test(test__f_type_array_fll_idss_increase_by__works), cmocka_unit_test(test__f_type_array_fll_idss_resize__works), + cmocka_unit_test(test__f_type_array_int8s_append_all__returns_data_not), + cmocka_unit_test(test__f_type_array_int8s_decimate_by__returns_data_not), + cmocka_unit_test(test__f_type_array_int8s_decrease_by__returns_data_not), + cmocka_unit_test(test__f_type_array_int8s_increase__returns_data_not), + cmocka_unit_test(test__f_type_array_int8s_increase_by__returns_data_not), + cmocka_unit_test(test__f_type_array_int8s_adjust__works), cmocka_unit_test(test__f_type_array_int8s_append__works), cmocka_unit_test(test__f_type_array_int8s_append_all__works), @@ -117,6 +141,12 @@ int main(void) { cmocka_unit_test(test__f_type_array_int8ss_increase_by__works), cmocka_unit_test(test__f_type_array_int8ss_resize__works), + cmocka_unit_test(test__f_type_array_int16s_append_all__returns_data_not), + cmocka_unit_test(test__f_type_array_int16s_decimate_by__returns_data_not), + cmocka_unit_test(test__f_type_array_int16s_decrease_by__returns_data_not), + cmocka_unit_test(test__f_type_array_int16s_increase__returns_data_not), + cmocka_unit_test(test__f_type_array_int16s_increase_by__returns_data_not), + cmocka_unit_test(test__f_type_array_int16s_adjust__works), cmocka_unit_test(test__f_type_array_int16s_append__works), cmocka_unit_test(test__f_type_array_int16s_append_all__works), @@ -142,6 +172,12 @@ int main(void) { cmocka_unit_test(test__f_type_array_int16ss_increase_by__works), cmocka_unit_test(test__f_type_array_int16ss_resize__works), + cmocka_unit_test(test__f_type_array_int32s_append_all__returns_data_not), + cmocka_unit_test(test__f_type_array_int32s_decimate_by__returns_data_not), + cmocka_unit_test(test__f_type_array_int32s_decrease_by__returns_data_not), + cmocka_unit_test(test__f_type_array_int32s_increase__returns_data_not), + cmocka_unit_test(test__f_type_array_int32s_increase_by__returns_data_not), + cmocka_unit_test(test__f_type_array_int32s_adjust__works), cmocka_unit_test(test__f_type_array_int32s_append__works), cmocka_unit_test(test__f_type_array_int32s_append_all__works), @@ -167,6 +203,12 @@ int main(void) { cmocka_unit_test(test__f_type_array_int32ss_increase_by__works), cmocka_unit_test(test__f_type_array_int32ss_resize__works), + cmocka_unit_test(test__f_type_array_int64s_append_all__returns_data_not), + cmocka_unit_test(test__f_type_array_int64s_decimate_by__returns_data_not), + cmocka_unit_test(test__f_type_array_int64s_decrease_by__returns_data_not), + cmocka_unit_test(test__f_type_array_int64s_increase__returns_data_not), + cmocka_unit_test(test__f_type_array_int64s_increase_by__returns_data_not), + cmocka_unit_test(test__f_type_array_int64s_adjust__works), cmocka_unit_test(test__f_type_array_int64s_append__works), cmocka_unit_test(test__f_type_array_int64s_append_all__works), @@ -192,6 +234,12 @@ int main(void) { cmocka_unit_test(test__f_type_array_int64ss_increase_by__works), cmocka_unit_test(test__f_type_array_int64ss_resize__works), + cmocka_unit_test(test__f_type_array_int128s_append_all__returns_data_not), + cmocka_unit_test(test__f_type_array_int128s_decimate_by__returns_data_not), + cmocka_unit_test(test__f_type_array_int128s_decrease_by__returns_data_not), + cmocka_unit_test(test__f_type_array_int128s_increase__returns_data_not), + cmocka_unit_test(test__f_type_array_int128s_increase_by__returns_data_not), + cmocka_unit_test(test__f_type_array_int128s_adjust__works), cmocka_unit_test(test__f_type_array_int128s_append__works), cmocka_unit_test(test__f_type_array_int128s_append_all__works), @@ -217,6 +265,12 @@ int main(void) { cmocka_unit_test(test__f_type_array_int128ss_increase_by__works), cmocka_unit_test(test__f_type_array_int128ss_resize__works), + cmocka_unit_test(test__f_type_array_states_append_all__returns_data_not), + cmocka_unit_test(test__f_type_array_states_decimate_by__returns_data_not), + cmocka_unit_test(test__f_type_array_states_decrease_by__returns_data_not), + cmocka_unit_test(test__f_type_array_states_increase__returns_data_not), + cmocka_unit_test(test__f_type_array_states_increase_by__returns_data_not), + cmocka_unit_test(test__f_type_array_states_adjust__works), cmocka_unit_test(test__f_type_array_states_append__works), cmocka_unit_test(test__f_type_array_states_append_all__works), @@ -242,6 +296,12 @@ int main(void) { cmocka_unit_test(test__f_type_array_statess_increase_by__works), cmocka_unit_test(test__f_type_array_statess_resize__works), + cmocka_unit_test(test__f_type_array_statuss_append_all__returns_data_not), + cmocka_unit_test(test__f_type_array_statuss_decimate_by__returns_data_not), + cmocka_unit_test(test__f_type_array_statuss_decrease_by__returns_data_not), + cmocka_unit_test(test__f_type_array_statuss_increase__returns_data_not), + cmocka_unit_test(test__f_type_array_statuss_increase_by__returns_data_not), + cmocka_unit_test(test__f_type_array_statuss_adjust__works), cmocka_unit_test(test__f_type_array_statuss_append__works), cmocka_unit_test(test__f_type_array_statuss_append_all__works), @@ -267,6 +327,12 @@ int main(void) { cmocka_unit_test(test__f_type_array_statusss_increase_by__works), cmocka_unit_test(test__f_type_array_statusss_resize__works), + cmocka_unit_test(test__f_type_array_uint8s_append_all__returns_data_not), + cmocka_unit_test(test__f_type_array_uint8s_decimate_by__returns_data_not), + cmocka_unit_test(test__f_type_array_uint8s_decrease_by__returns_data_not), + cmocka_unit_test(test__f_type_array_uint8s_increase__returns_data_not), + cmocka_unit_test(test__f_type_array_uint8s_increase_by__returns_data_not), + cmocka_unit_test(test__f_type_array_uint8s_adjust__works), cmocka_unit_test(test__f_type_array_uint8s_append__works), cmocka_unit_test(test__f_type_array_uint8s_append_all__works), @@ -292,6 +358,12 @@ int main(void) { cmocka_unit_test(test__f_type_array_uint8ss_increase_by__works), cmocka_unit_test(test__f_type_array_uint8ss_resize__works), + cmocka_unit_test(test__f_type_array_uint16s_append_all__returns_data_not), + cmocka_unit_test(test__f_type_array_uint16s_decimate_by__returns_data_not), + cmocka_unit_test(test__f_type_array_uint16s_decrease_by__returns_data_not), + cmocka_unit_test(test__f_type_array_uint16s_increase__returns_data_not), + cmocka_unit_test(test__f_type_array_uint16s_increase_by__returns_data_not), + cmocka_unit_test(test__f_type_array_uint16s_adjust__works), cmocka_unit_test(test__f_type_array_uint16s_append__works), cmocka_unit_test(test__f_type_array_uint16s_append_all__works), @@ -317,6 +389,12 @@ int main(void) { cmocka_unit_test(test__f_type_array_uint16ss_increase_by__works), cmocka_unit_test(test__f_type_array_uint16ss_resize__works), + cmocka_unit_test(test__f_type_array_uint32s_append_all__returns_data_not), + cmocka_unit_test(test__f_type_array_uint32s_decimate_by__returns_data_not), + cmocka_unit_test(test__f_type_array_uint32s_decrease_by__returns_data_not), + cmocka_unit_test(test__f_type_array_uint32s_increase__returns_data_not), + cmocka_unit_test(test__f_type_array_uint32s_increase_by__returns_data_not), + cmocka_unit_test(test__f_type_array_uint32s_adjust__works), cmocka_unit_test(test__f_type_array_uint32s_append__works), cmocka_unit_test(test__f_type_array_uint32s_append_all__works), @@ -342,6 +420,12 @@ int main(void) { cmocka_unit_test(test__f_type_array_uint32ss_increase_by__works), cmocka_unit_test(test__f_type_array_uint32ss_resize__works), + cmocka_unit_test(test__f_type_array_uint64s_append_all__returns_data_not), + cmocka_unit_test(test__f_type_array_uint64s_decimate_by__returns_data_not), + cmocka_unit_test(test__f_type_array_uint64s_decrease_by__returns_data_not), + cmocka_unit_test(test__f_type_array_uint64s_increase__returns_data_not), + cmocka_unit_test(test__f_type_array_uint64s_increase_by__returns_data_not), + cmocka_unit_test(test__f_type_array_uint64s_adjust__works), cmocka_unit_test(test__f_type_array_uint64s_append__works), cmocka_unit_test(test__f_type_array_uint64s_append_all__works), @@ -367,6 +451,12 @@ int main(void) { cmocka_unit_test(test__f_type_array_uint64ss_increase_by__works), cmocka_unit_test(test__f_type_array_uint64ss_resize__works), + cmocka_unit_test(test__f_type_array_uint128s_append_all__returns_data_not), + cmocka_unit_test(test__f_type_array_uint128s_decimate_by__returns_data_not), + cmocka_unit_test(test__f_type_array_uint128s_decrease_by__returns_data_not), + cmocka_unit_test(test__f_type_array_uint128s_increase__returns_data_not), + cmocka_unit_test(test__f_type_array_uint128s_increase_by__returns_data_not), + cmocka_unit_test(test__f_type_array_uint128s_adjust__works), cmocka_unit_test(test__f_type_array_uint128s_append__works), cmocka_unit_test(test__f_type_array_uint128s_append_all__works), diff --git a/level_0/f_utf/data/build/testfile b/level_0/f_utf/data/build/testfile index 8b5a6d12e..6f680f2c5 100644 --- a/level_0/f_utf/data/build/testfile +++ b/level_0/f_utf/data/build/testfile @@ -17,7 +17,7 @@ settings: #define CMOCKA_XML_FILE ./out.xml main: - build settings individual tests + build settings individual test build settings-tests individual test operate ld_library_path -- 2.47.3