--- /dev/null
+# fss-0001
+#
+# Build the project with appropriate mocks linked in via the dynamic linker's "--wrap" functionality.
+#
+# The -Wl,--wrap does not work across shared files.
+# Therefore, this file is a work-around to inject the mocks into the library for testing purposes.
+# This should exactly match the "settings" file, except for the additional "-Wl,--wrap" parts and the additional mock source file.
+#
+# The flags -o0 must be passed to prevent the compiler from optimizing away any functions being mocked (which results in the mock not happening and a real function being called).
+# Alternatively, figure out which optimization that is disabled by -o0 and have that specific optimization disabled.
+#
+
+build_name f_fss
+
+version_major 0
+version_minor 5
+version_micro 9
+version_file micro
+version_target minor
+
+modes individual clang test coverage
+modes_default individual test
+
+build_compiler gcc
+build_compiler-clang clang
+build_indexer ar
+build_indexer_arguments rcs
+build_language c
+
+build_libraries -lc
+build_libraries-individual -lf_memory -lf_string -lf_type_array -lf_utf
+
+build_sources_library fss.c private-fss.c fss/common.c fss/named.c fss/nest.c fss/set.c ../../tests/unit/c/mock-fss.c
+
+build_sources_headers fss.h fss/comment.h fss/common.h fss/delimit.h fss/named.h fss/nest.h fss/quote.h fss/set.h
+
+build_script yes
+build_shared yes
+build_static no
+
+path_headers fll/level_0
+path_library_script script
+path_library_shared shared
+path_library_static static
+
+has_path_standard yes
+preserve_path_headers yes
+
+search_exclusive yes
+search_shared yes
+search_static yes
+
+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
+flags-coverage --coverage -fprofile-abs-path -fprofile-dir=build/coverage/
+
+flags_library -fPIC
+
+# Inject mocks.
--- /dev/null
+# fss-0001
+#
+# Builds a program that is links to the generated library and is executed to perform tests.
+#
+# Memory leaks in the test program can be checked for by running valgrind with this executable.
+#
+
+build_name test-f_fss
+
+version_major 0
+version_minor 5
+version_micro 9
+version_file major
+version_target major
+
+modes individual clang test coverage
+modes_default individual test
+
+build_compiler gcc
+build_compiler-clang clang
+build_indexer ar
+build_indexer_arguments rcs
+build_language c
+
+build_libraries -lc -lcmocka
+build_libraries-individual -lf_memory -lf_string -lf_type_array -lf_utf -lf_fss
+
+build_sources_program test-fss-apply_delimit.c test-fss-apply_delimit_range.c test-fss-count_lines.c test-fss-count_lines_range.c test-fss-fail_utf.c test-fss-fail_utf_to_false.c test-fss-is_combining.c test-fss-is_graph.c test-fss-is_space.c test-fss-is_zero_width.c test-fss-seek_to_eol.c test-fss-skip_past_delimit.c test-fss-skip_past_space.c
+
+build_sources_program test-fss-items_adjust.c test-fss-items_decimate_by.c test-fss-items_decrease_by.c test-fss-items_increase.c test-fss-items_increase_by.c test-fss-items_resize.c
+build_sources_program test-fss-named_adjust.c test-fss-named_decimate_by.c test-fss-named_decrease_by.c test-fss-named_increase.c test-fss-named_increase_by.c test-fss-named_resize.c
+build_sources_program test-fss-nameds_adjust.c test-fss-nameds_decimate_by.c test-fss-nameds_decrease_by.c test-fss-nameds_increase.c test-fss-nameds_increase_by.c test-fss-nameds_resize.c
+build_sources_program test-fss-nest_adjust.c test-fss-nest_decimate_by.c test-fss-nest_decrease_by.c test-fss-nest_increase.c test-fss-nest_increase_by.c test-fss-nest_resize.c
+build_sources_program test-fss-nests_adjust.c test-fss-nests_decimate_by.c test-fss-nests_decrease_by.c test-fss-nests_increase.c test-fss-nests_increase_by.c test-fss-nests_resize.c
+build_sources_program test-fss-set_adjust.c test-fss-set_decimate_by.c test-fss-set_decrease_by.c test-fss-set_increase.c test-fss-set_increase_by.c test-fss-set_resize.c
+build_sources_program test-fss-set_quote_adjust.c test-fss-set_quote_decimate_by.c test-fss-set_quote_decrease_by.c test-fss-set_quote_increase.c test-fss-set_quote_increase_by.c test-fss-set_quote_resize.c
+build_sources_program test-fss-set_quotes_adjust.c test-fss-set_quotes_decimate_by.c test-fss-set_quotes_decrease_by.c test-fss-set_quotes_increase.c test-fss-set_quotes_increase_by.c test-fss-set_quotes_resize.c
+build_sources_program test-fss-sets_adjust.c test-fss-sets_decimate_by.c test-fss-sets_decrease_by.c test-fss-sets_increase.c test-fss-sets_increase_by.c test-fss-sets_resize.c
+
+build_sources_program test-fss.c
+
+build_script no
+build_shared yes
+build_static no
+
+path_headers tests/unit/c
+path_sources tests/unit/c
+
+has_path_standard no
+preserve_path_headers yes
+
+search_exclusive yes
+search_shared yes
+search_static yes
+
+defines -Ibuild/includes
+defines_static -Lbuild/libraries/static
+defines_shared -Lbuild/libraries/shared
+
+flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses
+flags-clang -Wno-logical-op-parentheses
+flags-test -fstack-protector -Wall
+flags-coverage -O0 --coverage -fprofile-abs-path -fprofile-dir=build/coverage/
+
+flags_program -fPIE
--- /dev/null
+# fss-0005 iki-0002
+
+settings:
+ load_build yes
+ fail exit
+
+ environment LD_LIBRARY_PATH
+ environment CMOCKA_XML_FILE CMOCKA_MESSAGE_OUTPUT CMOCKA_TEST_ABORT
+
+ # Cmcka is not fully thread-safe, set this to "1" to have cmocka call abort() on a test failure.
+ #CMOCKA_TEST_ABORT 1
+
+ # One of: STDOUT, SUBUNIT, TAP, or XML.
+ #define CMOCKA_MESSAGE_OUTPUT STDOUT
+
+ # When in "XML" output mode, output to this file rather than stdout.
+ #define CMOCKA_XML_FILE ./out.xml
+
+main:
+ build settings individual test
+ build settings-tests individual test
+
+ operate ld_library_path
+
+ if exists build/programs/shared/test-f_fss
+ shell build/programs/shared/test-f_fss
+
+ if exists build/programs/static/test-f_fss
+ shell build/programs/static/test-f_fss
+
+ if not exists build/programs/shared/test-f_fss
+ and not exists build/programs/static/test-f_fss
+ operate not_created
+
+not_created:
+ print
+ print 'context:"error"Failed to test due to being unable to find either a shared or static test binary to perform tests. context:"reset"'
+
+ exit failure
+
+ld_library_path:
+ if defined environment LD_LIBRARY_PATH
+ and defined parameter work
+ define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared:define:"LD_LIBRARY_PATH"'
+
+ else
+ if defined environment LD_LIBRARY_PATH
+ define LD_LIBRARY_PATH 'build/libraries/shared:parameter:define:"LD_LIBRARY_PATH"'
+
+ else
+ if defined parameter work
+ define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared'
+
+ else
+ define LD_LIBRARY_PATH build/libraries/shared
--- /dev/null
+#include "mock-fss.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*int __wrap_getgrgid_r(uid_t uid, struct group *grp, char *buf, size_t buflen, struct group **result) {
+
+ const bool failure = mock_type(bool);
+
+ if (failure) {
+ errno = mock_type(int);
+
+ return 1;
+ }
+
+ *grp = *mock_type(struct group *);
+ *result = mock_type(struct group *);
+
+ return 0;
+}*/
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the fss project.
+ */
+#ifndef _MOCK__fss_h
+#define _MOCK__fss_h
+
+// Libc includes.
+#include <stdarg.h>
+#include <stddef.h>
+#include <setjmp.h>
+#include <stdint.h>
+
+// cmocka includes.
+#include <cmocka.h>
+
+// FLL-0 includes.
+#include <fll/level_0/fss.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+const static int mock_errno_generic = 32767;
+
+//extern long __wrap_sysconf(int name);
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _MOCK__fss_h
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-apply_delimit.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_apply_delimit__parameter_checking(void **state) {
+
+ const f_fss_delimits_t delimits = f_fss_delimits_t_initialize;
+ f_state_t state_data = f_state_t_initialize;
+
+ {
+ const f_status_t status = f_fss_apply_delimit(state_data, delimits, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_fss_apply_delimit__returns_data_not(void **state) {
+
+ const f_fss_delimits_t delimits = f_fss_delimits_t_initialize;
+ f_state_t state_data = f_state_t_initialize;
+
+ {
+ f_string_static_t empty = f_string_static_t_initialize;
+
+ const f_status_t status = f_fss_apply_delimit(state_data, delimits, &empty);
+
+ assert_int_equal(status, F_data_not);
+ }
+}
+
+void test__f_fss_apply_delimit__works(void **state) {
+
+ f_state_t state_data = f_state_t_initialize;
+
+ f_char_t strings_0[] = "test";
+ f_char_t strings_1[] = "test";
+ f_char_t strings_2[] = "test";
+ f_char_t strings_3[] = "test";
+ f_char_t strings_4[] = "test";
+ f_char_t strings_5[] = "test";
+ f_char_t strings_6[] = "⸙test全test";
+
+ f_string_static_t tests[] = {
+ macro_f_string_static_t_initialize(strings_0, 0, 4),
+ macro_f_string_static_t_initialize(strings_1, 0, 4),
+ macro_f_string_static_t_initialize(strings_2, 0, 4),
+ macro_f_string_static_t_initialize(strings_3, 0, 4),
+ macro_f_string_static_t_initialize(strings_4, 0, 4),
+ macro_f_string_static_t_initialize(strings_5, 0, 4),
+ macro_f_string_static_t_initialize(strings_6, 0, 14),
+ };
+
+ const f_string_static_t expects[] = {
+ macro_f_string_static_t_initialize("test", 0, 4),
+ macro_f_string_static_t_initialize("t\0st", 0, 4),
+ macro_f_string_static_t_initialize("t\0\0t", 0, 4),
+ macro_f_string_static_t_initialize("t\0s\0", 0, 4),
+ macro_f_string_static_t_initialize("\0\0s\0", 0, 4),
+ macro_f_string_static_t_initialize("\0\0\0\0", 0, 4),
+ macro_f_string_static_t_initialize("\0\0\0test全\0est", 0, 14),
+ };
+
+ f_fss_delimit_t delimits_0[] = {
+ macro_f_fss_delimit_t_initialize(tests[0].used + 2),
+ };
+
+ f_fss_delimit_t delimits_1[] = {
+ macro_f_fss_delimit_t_initialize(1),
+ };
+
+ f_fss_delimit_t delimits_2[] = {
+ macro_f_fss_delimit_t_initialize(1),
+ macro_f_fss_delimit_t_initialize(2),
+ };
+
+ f_fss_delimit_t delimits_3[] = {
+ macro_f_fss_delimit_t_initialize(1),
+ macro_f_fss_delimit_t_initialize(3),
+ };
+
+ f_fss_delimit_t delimits_4[] = {
+ macro_f_fss_delimit_t_initialize(0),
+ macro_f_fss_delimit_t_initialize(1),
+ macro_f_fss_delimit_t_initialize(3),
+ };
+
+ f_fss_delimit_t delimits_5[] = {
+ macro_f_fss_delimit_t_initialize(0),
+ macro_f_fss_delimit_t_initialize(1),
+ macro_f_fss_delimit_t_initialize(2),
+ macro_f_fss_delimit_t_initialize(3),
+ };
+
+ f_fss_delimit_t delimits_6[] = {
+ macro_f_fss_delimit_t_initialize(0),
+ macro_f_fss_delimit_t_initialize(1),
+ macro_f_fss_delimit_t_initialize(2),
+ macro_f_fss_delimit_t_initialize(10),
+ };
+
+ const f_fss_delimits_t delimitss[] = {
+ macro_f_fss_delimits_t_initialize(delimits_0, 0, 1),
+ macro_f_fss_delimits_t_initialize(delimits_1, 0, 1),
+ macro_f_fss_delimits_t_initialize(delimits_2, 0, 2),
+ macro_f_fss_delimits_t_initialize(delimits_3, 0, 2),
+ macro_f_fss_delimits_t_initialize(delimits_4, 0, 3),
+ macro_f_fss_delimits_t_initialize(delimits_5, 0, 4),
+ macro_f_fss_delimits_t_initialize(delimits_6, 0, 4),
+ };
+
+ for (uint8_t i = 0; i < 7; ++i) {
+
+ const f_status_t status = f_fss_apply_delimit(state_data, delimitss[i], &tests[i]);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(tests[i].used, expects[i].used);
+
+ for (uint8_t j = 0; j < tests[i].used; ++j) {
+ assert_int_equal(tests[i].string[j], expects[i].string[j]);
+ } // for
+ } // for
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test apply delimit in the fss project.
+ */
+#ifndef _TEST__F_fss__apply_delimit
+#define _TEST__F_fss__apply_delimit
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_apply_delimit()
+ */
+extern void test__f_fss_apply_delimit__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_apply_delimit()
+ */
+extern void test__f_fss_apply_delimit__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_apply_delimit()
+ */
+extern void test__f_fss_apply_delimit__works(void **state);
+
+#endif // _TEST__F_fss__apply_delimit
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-apply_delimit_range.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_apply_delimit_range__parameter_checking(void **state) {
+
+ const f_fss_delimits_t delimits = f_fss_delimits_t_initialize;
+ f_state_t state_data = f_state_t_initialize;
+ const f_string_range_t range = f_string_range_t_initialize;
+
+ {
+ const f_status_t status = f_fss_apply_delimit_range(state_data, delimits, range, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_fss_apply_delimit_range__returns_data_not(void **state) {
+
+ f_string_static_t test = macro_f_string_static_t_initialize("test", 0, 4);
+ const f_fss_delimits_t delimits = f_fss_delimits_t_initialize;
+ f_state_t state_data = f_state_t_initialize;
+
+ {
+ const f_string_range_t range = f_string_range_t_initialize;
+ f_string_static_t empty = f_string_static_t_initialize;
+
+ const f_status_t status = f_fss_apply_delimit_range(state_data, delimits, range, &empty);
+
+ assert_int_equal(status, F_data_not);
+ }
+
+ {
+ const f_string_range_t range = f_string_range_t_initialize;
+
+ const f_status_t status = f_fss_apply_delimit_range(state_data, delimits, range, &test);
+
+ assert_int_equal(status, F_data_not);
+ }
+
+ {
+ const f_string_range_t range = macro_f_string_range_t_initialize(0, test.used - 1);
+ f_string_static_t empty = f_string_static_t_initialize;
+
+ const f_status_t status = f_fss_apply_delimit_range(state_data, delimits, range, &empty);
+
+ assert_int_equal(status, F_data_not);
+ }
+}
+
+void test__f_fss_apply_delimit_range__works(void **state) {
+
+ f_state_t state_data = f_state_t_initialize;
+
+ f_char_t strings_0[] = "test";
+ f_char_t strings_1[] = "test";
+ f_char_t strings_2[] = "test";
+ f_char_t strings_3[] = "test";
+ f_char_t strings_4[] = "test";
+ f_char_t strings_5[] = "test";
+ f_char_t strings_6[] = "⸙test全test";
+
+ f_string_static_t tests[] = {
+ macro_f_string_static_t_initialize(strings_0, 0, 4),
+ macro_f_string_static_t_initialize(strings_1, 0, 4),
+ macro_f_string_static_t_initialize(strings_2, 0, 4),
+ macro_f_string_static_t_initialize(strings_3, 0, 4),
+ macro_f_string_static_t_initialize(strings_4, 0, 4),
+ macro_f_string_static_t_initialize(strings_5, 0, 4),
+ macro_f_string_static_t_initialize(strings_6, 0, 14),
+ };
+
+ const f_string_static_t expects[] = {
+ macro_f_string_static_t_initialize("test", 0, 4),
+ macro_f_string_static_t_initialize("t\0st", 0, 4),
+ macro_f_string_static_t_initialize("t\0\0t", 0, 4),
+ macro_f_string_static_t_initialize("t\0s\0", 0, 4),
+ macro_f_string_static_t_initialize("\0\0s\0", 0, 4),
+ macro_f_string_static_t_initialize("\0\0\0\0", 0, 4),
+ macro_f_string_static_t_initialize("\0\0\0test全\0est", 0, 14),
+ };
+
+ f_fss_delimit_t delimits_0[] = {
+ macro_f_fss_delimit_t_initialize(tests[0].used + 2),
+ };
+
+ f_fss_delimit_t delimits_1[] = {
+ macro_f_fss_delimit_t_initialize(1),
+ };
+
+ f_fss_delimit_t delimits_2[] = {
+ macro_f_fss_delimit_t_initialize(1),
+ macro_f_fss_delimit_t_initialize(2),
+ };
+
+ f_fss_delimit_t delimits_3[] = {
+ macro_f_fss_delimit_t_initialize(1),
+ macro_f_fss_delimit_t_initialize(3),
+ };
+
+ f_fss_delimit_t delimits_4[] = {
+ macro_f_fss_delimit_t_initialize(0),
+ macro_f_fss_delimit_t_initialize(1),
+ macro_f_fss_delimit_t_initialize(3),
+ };
+
+ f_fss_delimit_t delimits_5[] = {
+ macro_f_fss_delimit_t_initialize(0),
+ macro_f_fss_delimit_t_initialize(1),
+ macro_f_fss_delimit_t_initialize(2),
+ macro_f_fss_delimit_t_initialize(3),
+ };
+
+ f_fss_delimit_t delimits_6[] = {
+ macro_f_fss_delimit_t_initialize(0),
+ macro_f_fss_delimit_t_initialize(1),
+ macro_f_fss_delimit_t_initialize(2),
+ macro_f_fss_delimit_t_initialize(10),
+ };
+
+ const f_fss_delimits_t delimitss[] = {
+ macro_f_fss_delimits_t_initialize(delimits_0, 0, 1),
+ macro_f_fss_delimits_t_initialize(delimits_1, 0, 1),
+ macro_f_fss_delimits_t_initialize(delimits_2, 0, 2),
+ macro_f_fss_delimits_t_initialize(delimits_3, 0, 2),
+ macro_f_fss_delimits_t_initialize(delimits_4, 0, 3),
+ macro_f_fss_delimits_t_initialize(delimits_5, 0, 4),
+ macro_f_fss_delimits_t_initialize(delimits_6, 0, 4),
+ };
+
+ for (uint8_t i = 0; i < 7; ++i) {
+
+ const f_string_range_t range = macro_f_string_range_t_initialize(0, tests[i].used - 1);
+
+ const f_status_t status = f_fss_apply_delimit_range(state_data, delimitss[i], range, &tests[i]);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(tests[i].used, expects[i].used);
+
+ for (uint8_t j = 0; j < tests[i].used; ++j) {
+ assert_int_equal(tests[i].string[j], expects[i].string[j]);
+ } // for
+ } // for
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test apply delimit between in the fss project.
+ */
+#ifndef _TEST__F_fss__apply_delimit_range
+#define _TEST__F_fss__apply_delimit_range
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_apply_delimit_range()
+ */
+extern void test__f_fss_apply_delimit_range__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_apply_delimit_range()
+ */
+extern void test__f_fss_apply_delimit_range__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_apply_delimit_range()
+ */
+extern void test__f_fss_apply_delimit_range__works(void **state);
+
+#endif // _TEST__F_fss__apply_delimit_range
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-count_lines.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_count_lines__parameter_checking(void **state) {
+
+ const f_string_static_t test = macro_f_string_static_t_initialize("test", 0, 4);
+ f_state_t state_data = f_state_t_initialize;
+
+ {
+ const f_status_t status = f_fss_count_lines(state_data, test, 0, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_fss_count_lines__returns_data_not(void **state) {
+
+ f_state_t state_data = f_state_t_initialize;
+
+ {
+ f_array_length_t line = 0;
+
+ const f_status_t status = f_fss_count_lines(state_data, f_string_empty_s, 0, &line);
+
+ assert_int_equal(status, F_data_not);
+ }
+}
+
+void test__f_fss_count_lines__works(void **state) {
+
+ f_state_t state_data = f_state_t_initialize;
+
+ const f_string_static_t buffers[] = {
+ macro_f_string_static_t_initialize("zero", 0, 4),
+ macro_f_string_static_t_initialize("one\n", 0, 4),
+ macro_f_string_static_t_initialize("\ntwo\n", 0, 5),
+ macro_f_string_static_t_initialize("\nthree\n\n", 0, 8),
+ macro_f_string_static_t_initialize("\n⸙\nfour\n全\n", 0, 14),
+ };
+
+ f_array_length_t line = 0;
+ f_array_length_t expect = 0;
+
+ for (uint8_t i = 0; i < 5; expect += ++i) {
+
+ const f_status_t status = f_fss_count_lines(state_data, buffers[i], buffers[i].used, &line);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(line, expect);
+ } // for
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test count lines in the fss project.
+ */
+#ifndef _TEST__F_fss__count_lines
+#define _TEST__F_fss__count_lines
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_count_lines()
+ */
+extern void test__f_fss_count_lines__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_count_lines()
+ */
+extern void test__f_fss_count_lines__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_count_lines()
+ */
+extern void test__f_fss_count_lines__works(void **state);
+
+#endif // _TEST__F_fss__count_lines
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-count_lines_range.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_count_lines_range__parameter_checking(void **state) {
+
+ f_state_t state_data = f_state_t_initialize;
+ const f_string_range_t range = f_string_range_t_initialize;
+
+ {
+ const f_status_t status = f_fss_count_lines_range(state_data, f_string_empty_s, range, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_fss_count_lines_range__returns_data_not(void **state) {
+
+ const f_string_static_t test = macro_f_string_static_t_initialize("test", 0, 4);
+ f_state_t state_data = f_state_t_initialize;
+
+ {
+ f_array_length_t line = 0;
+ f_string_range_t range = f_string_range_t_initialize;
+
+ const f_status_t status = f_fss_count_lines_range(state_data, f_string_empty_s, range, &line);
+
+ assert_int_equal(status, F_data_not);
+ }
+
+ {
+ f_array_length_t line = 0;
+ f_string_range_t range = f_string_range_t_initialize;
+
+ const f_status_t status = f_fss_count_lines_range(state_data, test, range, &line);
+
+ assert_int_equal(status, F_data_not);
+ }
+
+ {
+ f_array_length_t line = 0;
+ f_string_range_t range = macro_f_string_range_t_initialize(0, test.used - 1);
+
+ const f_status_t status = f_fss_count_lines_range(state_data, f_string_empty_s, range, &line);
+
+ assert_int_equal(status, F_data_not);
+ }
+}
+
+void test__f_fss_count_lines_range__works(void **state) {
+
+ f_state_t state_data = f_state_t_initialize;
+
+ const f_string_static_t buffers[] = {
+ macro_f_string_static_t_initialize("zero", 0, 4),
+ macro_f_string_static_t_initialize("one\n", 0, 4),
+ macro_f_string_static_t_initialize("\ntwo\n", 0, 5),
+ macro_f_string_static_t_initialize("\nthree\n\n", 0, 8),
+ macro_f_string_static_t_initialize("\n⸙\nfour\n全\n", 0, 14),
+ };
+
+ f_array_length_t line = 0;
+ f_array_length_t expect = 0;
+
+ for (uint8_t i = 0; i < 5; expect += ++i) {
+
+ f_string_range_t range = macro_f_string_range_t_initialize(0, buffers[i].used - 1);
+
+ const f_status_t status = f_fss_count_lines_range(state_data, buffers[i], range, &line);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(line, expect);
+ } // for
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test count lines range in the fss project.
+ */
+#ifndef _TEST__F_fss__count_lines_range
+#define _TEST__F_fss__count_lines_range
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_count_lines_range()
+ */
+extern void test__f_fss_count_lines_range__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_count_lines_range()
+ */
+extern void test__f_fss_count_lines_range__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_count_lines_range()
+ */
+extern void test__f_fss_count_lines_range__works(void **state);
+
+#endif // _TEST__F_fss__count_lines_range
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-fail_utf.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_fail_utf__works_for_error(void **state) {
+
+ f_state_t state_data = f_state_t_initialize;
+
+ {
+ f_status_t statuss[] = {
+ F_utf_fragment,
+ F_complete_not_utf,
+ F_utf_not,
+ };
+
+ uint8_t j = 0;
+
+ for (f_status_t i = 0; i < F_status_code_last; ++i) {
+
+ const f_status_t status = f_fss_fail_utf(state_data, F_status_set_error(i));
+
+ for (j = 0; j < 3; ++j) {
+ if (i == statuss[j]) break;
+ } // for
+
+ if (j == 3) {
+ assert_int_equal(status, F_status_set_error(i));
+ }
+ else {
+ assert_int_equal(status, statuss[j]);
+ }
+ } // for
+ }
+
+ state_data.flag |= f_fss_state_flag_utf_fail_on_valid_not_e;
+
+ for (f_status_t i = 0; i < F_status_code_last; ++i) {
+
+ const f_status_t status = f_fss_fail_utf(state_data, F_status_set_error(i));
+
+ assert_int_equal(status, F_status_set_error(i));
+ } // for
+}
+
+void test__f_fss_fail_utf__works_for_no_error(void **state) {
+
+ f_state_t state_data = f_state_t_initialize;
+
+ for (f_status_t i = 0; i < F_status_code_last; ++i) {
+
+ const f_status_t status = f_fss_fail_utf(state_data, i);
+
+ assert_int_equal(status, i);
+ } // for
+
+ state_data.flag |= f_fss_state_flag_utf_fail_on_valid_not_e;
+
+ for (f_status_t i = 0; i < F_status_code_last; ++i) {
+
+ const f_status_t status = f_fss_fail_utf(state_data, i);
+
+ assert_int_equal(status, i);
+ } // for
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test fail utf in the fss project.
+ */
+#ifndef _TEST__F_fss__fail_utf
+#define _TEST__F_fss__fail_utf
+
+/**
+ * Test that the function works for when error bit is set.
+ *
+ * @see f_fss_fail_utf()
+ */
+extern void test__f_fss_fail_utf__works_for_error(void **state);
+
+/**
+ * Test that the function works for when no error bit is set.
+ *
+ * @see f_fss_fail_utf()
+ */
+extern void test__f_fss_fail_utf__works_for_no_error(void **state);
+
+#endif // _TEST__F_fss__fail_utf
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-fail_utf_to_false.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_fail_utf_to_false__works_for_error(void **state) {
+
+ f_state_t state_data = f_state_t_initialize;
+
+ {
+ f_status_t statuss[] = {
+ F_utf_fragment,
+ F_complete_not_utf,
+ F_utf_not,
+ };
+
+ uint8_t j = 0;
+
+ for (f_status_t i = 0; i < F_status_code_last; ++i) {
+
+ const f_status_t status = f_fss_fail_utf_to_false(state_data, F_status_set_error(i));
+
+ for (j = 0; j < 3; ++j) {
+ if (i == statuss[j]) break;
+ } // for
+
+ if (j == 3) {
+ assert_int_equal(status, F_status_set_error(i));
+ }
+ else {
+ assert_int_equal(status, F_false);
+ }
+ } // for
+ }
+
+ state_data.flag |= f_fss_state_flag_utf_fail_on_valid_not_e;
+
+ for (f_status_t i = 0; i < F_status_code_last; ++i) {
+
+ const f_status_t status = f_fss_fail_utf_to_false(state_data, F_status_set_error(i));
+
+ assert_int_equal(status, F_status_set_error(i));
+ } // for
+}
+
+void test__f_fss_fail_utf_to_false__works_for_no_error(void **state) {
+
+ f_state_t state_data = f_state_t_initialize;
+
+ for (f_status_t i = 0; i < F_status_code_last; ++i) {
+
+ const f_status_t status = f_fss_fail_utf_to_false(state_data, i);
+
+ assert_int_equal(status, i);
+ } // for
+
+ state_data.flag |= f_fss_state_flag_utf_fail_on_valid_not_e;
+
+ for (f_status_t i = 0; i < F_status_code_last; ++i) {
+
+ const f_status_t status = f_fss_fail_utf_to_false(state_data, i);
+
+ assert_int_equal(status, i);
+ } // for
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test fail utf to false in the fss project.
+ */
+#ifndef _TEST__F_fss__fail_utf_to_false
+#define _TEST__F_fss__fail_utf_to_false
+
+/**
+ * Test that the function works for when error bit is set.
+ *
+ * @see f_fss_fail_utf_to_false()
+ */
+extern void test__f_fss_fail_utf_to_false__works_for_error(void **state);
+
+/**
+ * Test that the function works for when no error bit is set.
+ *
+ * @see f_fss_fail_utf_to_false()
+ */
+extern void test__f_fss_fail_utf_to_false__works_for_no_error(void **state);
+
+#endif // _TEST__F_fss__fail_utf_to_false
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-is_combining.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_is_combining__works(void **state) {
+
+ f_state_t state_data = f_state_t_initialize;
+
+ f_string_static_t tests[] = {
+ macro_f_string_static_t_initialize("\0", 0, 1),
+ macro_f_string_static_t_initialize("\a", 0, 1),
+ macro_f_string_static_t_initialize("\t", 0, 1),
+ macro_f_string_static_t_initialize("\n", 0, 1),
+ macro_f_string_static_t_initialize(" ", 0, 1),
+ macro_f_string_static_t_initialize("⸙", 0, 3),
+ macro_f_string_static_t_initialize("t", 0, 1),
+ macro_f_string_static_t_initialize("全", 0, 3),
+ macro_f_string_static_t_initialize("$", 0, 1),
+ macro_f_string_static_t_initialize(".", 0, 1),
+ macro_f_string_static_t_initialize(" ́", 0, 3),
+ };
+
+ f_status_t expects[] = {
+ F_false,
+ F_false,
+ F_false,
+ F_false,
+ F_false,
+ F_false,
+ F_false,
+ F_false,
+ F_false,
+ F_false,
+ F_true,
+ };
+
+ // Apply an offset so that the combining character is combining into something inside the quotes rather than the quotes for convenience and code safety.
+ f_array_length_t offset[] = {
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ };
+
+ for (f_array_length_t i = 0; i < 11; ++i) {
+
+ const f_string_range_t range = macro_f_string_range_t_initialize(offset[i], tests[i].used - 1);
+
+ const f_status_t status = f_fss_is_combining(state_data, tests[i], range);
+
+ assert_int_equal(status, expects[i]);
+ } // for
+
+ {
+ const f_string_range_t range = f_string_range_t_initialize;
+
+ const f_status_t status = f_fss_is_combining(state_data, f_string_empty_s, range);
+
+ assert_int_equal(status, F_false);
+ }
+
+ {
+ const f_string_range_t range = macro_f_string_range_t_initialize(0, 2);
+
+ const f_status_t status = f_fss_is_combining(state_data, f_string_empty_s, range);
+
+ assert_int_equal(status, F_false);
+ }
+
+ {
+ const f_string_static_t test = macro_f_string_static_t_initialize("test", 0, 4);
+ const f_string_range_t range = f_string_range_t_initialize;
+
+ const f_status_t status = f_fss_is_combining(state_data, test, range);
+
+ assert_int_equal(status, F_false);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test is space in the fss project.
+ */
+#ifndef _TEST__F_fss__is_combining
+#define _TEST__F_fss__is_combining
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_is_combining()
+ */
+extern void test__f_fss_is_combining__works(void **state);
+
+#endif // _TEST__F_fss__is_combining
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-is_graph.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_is_graph__works(void **state) {
+
+ f_state_t state_data = f_state_t_initialize;
+
+ f_string_static_t tests[] = {
+ macro_f_string_static_t_initialize("\0", 0, 1),
+ macro_f_string_static_t_initialize("\a", 0, 1),
+ macro_f_string_static_t_initialize("\t", 0, 1),
+ macro_f_string_static_t_initialize("\n", 0, 1),
+ macro_f_string_static_t_initialize(" ", 0, 1),
+ macro_f_string_static_t_initialize("⸙", 0, 3),
+ macro_f_string_static_t_initialize("t", 0, 1),
+ macro_f_string_static_t_initialize("全", 0, 3),
+ macro_f_string_static_t_initialize("$", 0, 1),
+ macro_f_string_static_t_initialize(".", 0, 1),
+ macro_f_string_static_t_initialize(" ́", 0, 3), // Space followed by a combining character (U+0020 U+0301).
+ macro_f_string_static_t_initialize("", 0, 3), // Zero-width space (U+200B).
+ };
+
+ f_status_t expects[] = {
+ F_false,
+ F_false,
+ F_false,
+ F_false,
+ F_false,
+ F_true,
+ F_true,
+ F_true,
+ F_true,
+ F_true,
+ F_false,
+ F_false,
+ };
+
+ for (f_array_length_t i = 0; i < 12; ++i) {
+
+ const f_string_range_t range = macro_f_string_range_t_initialize(0, tests[i].used - 1);
+
+ const f_status_t status = f_fss_is_graph(state_data, tests[i], range);
+
+ assert_int_equal(status, expects[i]);
+ } // for
+
+ {
+ const f_string_range_t range = f_string_range_t_initialize;
+
+ const f_status_t status = f_fss_is_graph(state_data, f_string_empty_s, range);
+
+ assert_int_equal(status, F_false);
+ }
+
+ {
+ const f_string_range_t range = macro_f_string_range_t_initialize(0, 2);
+
+ const f_status_t status = f_fss_is_graph(state_data, f_string_empty_s, range);
+
+ assert_int_equal(status, F_false);
+ }
+
+ {
+ const f_string_static_t test = macro_f_string_static_t_initialize("test", 0, 4);
+ const f_string_range_t range = f_string_range_t_initialize;
+
+ const f_status_t status = f_fss_is_graph(state_data, test, range);
+
+ assert_int_equal(status, F_false);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test is graph in the fss project.
+ */
+#ifndef _TEST__F_fss__is_graph
+#define _TEST__F_fss__is_graph
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_is_graph()
+ */
+extern void test__f_fss_is_graph__works(void **state);
+
+#endif // _TEST__F_fss__is_graph
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-is_space.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_is_space__works(void **state) {
+
+ f_state_t state_data = f_state_t_initialize;
+
+ f_string_static_t tests[] = {
+ macro_f_string_static_t_initialize("\0", 0, 1),
+ macro_f_string_static_t_initialize("\a", 0, 1),
+ macro_f_string_static_t_initialize("\t", 0, 1),
+ macro_f_string_static_t_initialize("\n", 0, 1),
+ macro_f_string_static_t_initialize(" ", 0, 1),
+ macro_f_string_static_t_initialize("⸙", 0, 3),
+ macro_f_string_static_t_initialize("t", 0, 1),
+ macro_f_string_static_t_initialize("全", 0, 3),
+ macro_f_string_static_t_initialize("$", 0, 1),
+ macro_f_string_static_t_initialize(".", 0, 1),
+ macro_f_string_static_t_initialize(" ́", 0, 3), // Space followed by a combining character (U+0020 U+0301).
+ macro_f_string_static_t_initialize("", 0, 3), // Zero-width space (U+200B).
+ };
+
+ f_status_t expects[] = {
+ F_false,
+ F_false,
+ F_true,
+ F_true,
+ F_true,
+ F_false,
+ F_false,
+ F_false,
+ F_false,
+ F_false,
+ F_true,
+ F_false,
+ };
+
+ for (f_array_length_t i = 0; i < 12; ++i) {
+
+ const f_string_range_t range = macro_f_string_range_t_initialize(0, tests[i].used - 1);
+
+ const f_status_t status = f_fss_is_space(state_data, tests[i], range);
+
+ assert_int_equal(status, expects[i]);
+ } // for
+
+ {
+ const f_string_range_t range = f_string_range_t_initialize;
+
+ const f_status_t status = f_fss_is_space(state_data, f_string_empty_s, range);
+
+ assert_int_equal(status, F_false);
+ }
+
+ {
+ const f_string_range_t range = macro_f_string_range_t_initialize(0, 2);
+
+ const f_status_t status = f_fss_is_space(state_data, f_string_empty_s, range);
+
+ assert_int_equal(status, F_false);
+ }
+
+ {
+ const f_string_static_t test = macro_f_string_static_t_initialize("test", 0, 4);
+ const f_string_range_t range = f_string_range_t_initialize;
+
+ const f_status_t status = f_fss_is_space(state_data, test, range);
+
+ assert_int_equal(status, F_false);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test is space in the fss project.
+ */
+#ifndef _TEST__F_fss__is_space
+#define _TEST__F_fss__is_space
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_is_space()
+ */
+extern void test__f_fss_is_space__works(void **state);
+
+#endif // _TEST__F_fss__is_space
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-is_zero_width.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_is_zero_width__works(void **state) {
+
+ f_state_t state_data = f_state_t_initialize;
+
+ f_string_static_t tests[] = {
+ macro_f_string_static_t_initialize("\0", 0, 1),
+ macro_f_string_static_t_initialize("\a", 0, 1),
+ macro_f_string_static_t_initialize("\t", 0, 1),
+ macro_f_string_static_t_initialize("\n", 0, 1),
+ macro_f_string_static_t_initialize(" ", 0, 1),
+ macro_f_string_static_t_initialize("⸙", 0, 3),
+ macro_f_string_static_t_initialize("t", 0, 1),
+ macro_f_string_static_t_initialize("全", 0, 3),
+ macro_f_string_static_t_initialize("$", 0, 1),
+ macro_f_string_static_t_initialize(".", 0, 1),
+ macro_f_string_static_t_initialize(" ́", 0, 3), // Space followed by a combining character (U+0020 U+0301).
+ macro_f_string_static_t_initialize("", 0, 3), // Zero-width space (U+200B).
+ };
+
+ f_status_t expects[] = {
+ F_true,
+ F_true,
+ F_false,
+ F_false,
+ F_false,
+ F_false,
+ F_false,
+ F_false,
+ F_false,
+ F_false,
+ F_false,
+ F_true,
+ };
+
+ // Apply an offset so that the combining character is combining into something inside the quotes rather than the quotes for convenience and code safety.
+ f_array_length_t offset[] = {
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 0,
+ };
+
+ for (f_array_length_t i = 0; i < 12; ++i) {
+
+ const f_string_range_t range = macro_f_string_range_t_initialize(offset[i], tests[i].used - 1);
+
+ const f_status_t status = f_fss_is_zero_width(state_data, tests[i], range);
+
+ assert_int_equal(status, expects[i]);
+ } // for
+
+ {
+ const f_string_range_t range = f_string_range_t_initialize;
+
+ const f_status_t status = f_fss_is_zero_width(state_data, f_string_empty_s, range);
+
+ assert_int_equal(status, F_false);
+ }
+
+ {
+ const f_string_range_t range = macro_f_string_range_t_initialize(0, 2);
+
+ const f_status_t status = f_fss_is_zero_width(state_data, f_string_empty_s, range);
+
+ assert_int_equal(status, F_false);
+ }
+
+ {
+ const f_string_static_t test = macro_f_string_static_t_initialize("test", 0, 4);
+ const f_string_range_t range = f_string_range_t_initialize;
+
+ const f_status_t status = f_fss_is_zero_width(state_data, test, range);
+
+ assert_int_equal(status, F_false);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test is zero width in the fss project.
+ */
+#ifndef _TEST__F_fss__is_zero_width
+#define _TEST__F_fss__is_zero_width
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_is_zero_width()
+ */
+extern void test__f_fss_is_zero_width__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_is_zero_width()
+ */
+extern void test__f_fss_is_zero_width__works(void **state);
+
+#endif // _TEST__F_fss__is_zero_width
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-items_adjust.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_items_adjust__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_items_t data = f_fss_items_t_initialize;
+
+ {
+ const f_status_t status = f_fss_items_adjust(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_fss_items_adjust__works(void **state) {
+
+ const int length = 5;
+ f_fss_items_t data = f_fss_items_t_initialize;
+
+ {
+ const f_status_t status = f_fss_items_adjust(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ free((void *) data.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test items adjust in the fss project.
+ */
+#ifndef _TEST__F_fss__items_adjust
+#define _TEST__F_fss__items_adjust
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_items_adjust()
+ */
+extern void test__f_fss_items_adjust__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_items_adjust()
+ */
+extern void test__f_fss_items_adjust__works(void **state);
+
+#endif // _TEST__F_fss__items_adjust
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-items_decimate_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_items_decimate_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_items_t data = f_fss_items_t_initialize;
+
+ {
+ const f_status_t status = f_fss_items_decimate_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_fss_items_decimate_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fss_items_t data = f_fss_items_t_initialize;
+
+ {
+ const f_status_t status = f_fss_items_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_fss_items_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_fss_items_decimate_by__works(void **state) {
+
+ const int length = 5;
+ f_fss_items_t data = f_fss_items_t_initialize;
+
+ {
+ const f_status_t status = f_fss_items_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_fss_items_decimate_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test items decimate by in the fss project.
+ */
+#ifndef _TEST__F_fss__items_decimate_by
+#define _TEST__F_fss__items_decimate_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_items_decimate_by()
+ */
+extern void test__f_fss_items_decimate_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_items_decimate_by()
+ */
+extern void test__f_fss_items_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_items_decimate_by()
+ */
+extern void test__f_fss_items_decimate_by__works(void **state);
+
+#endif // _TEST__F_fss__items_decimate_by
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-items_decrease_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_items_decrease_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_items_t data = f_fss_items_t_initialize;
+
+ {
+ const f_status_t status = f_fss_items_decrease_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_fss_items_decrease_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fss_items_t data = f_fss_items_t_initialize;
+
+ {
+ const f_status_t status = f_fss_items_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_fss_items_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_fss_items_decrease_by__works(void **state) {
+
+ const int length = 5;
+ f_fss_items_t data = f_fss_items_t_initialize;
+
+ {
+ const f_status_t status = f_fss_items_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_fss_items_decrease_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test items decrease by in the fss project.
+ */
+#ifndef _TEST__F_fss__items_decrease_by
+#define _TEST__F_fss__items_decrease_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_items_decrease_by()
+ */
+extern void test__f_fss_items_decrease_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_items_decrease_by()
+ */
+extern void test__f_fss_items_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_items_decrease_by()
+ */
+extern void test__f_fss_items_decrease_by__works(void **state);
+
+#endif // _TEST__F_fss__items_decrease_by
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-items_increase.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_items_increase__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_items_t data = f_fss_items_t_initialize;
+
+ {
+ const f_status_t status = f_fss_items_increase(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ free((void *) data.array);
+}
+
+void test__f_fss_items_increase__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fss_items_t data = f_fss_items_t_initialize;
+
+ {
+ const f_status_t status = f_fss_items_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_fss_items_increase(length, &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_fss_items_increase__works(void **state) {
+
+ const int length = 5;
+ f_fss_items_t data = f_fss_items_t_initialize;
+
+ {
+ const f_status_t status = f_fss_items_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_fss_items_increase(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ }
+
+ free((void *) data.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test items increase in the fss project.
+ */
+#ifndef _TEST__F_fss__items_increase
+#define _TEST__F_fss__items_increase
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_items_increase()
+ */
+extern void test__f_fss_items_increase__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_items_increase()
+ */
+extern void test__f_fss_items_increase__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_items_increase()
+ */
+extern void test__f_fss_items_increase__works(void **state);
+
+#endif // _TEST__F_fss__items_increase
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-items_increase_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_items_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_items_t data = f_fss_items_t_initialize;
+
+ {
+ const f_status_t status = f_fss_items_increase_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_fss_items_increase_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fss_items_t data = f_fss_items_t_initialize;
+
+ {
+ const f_status_t status = f_fss_items_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_fss_items_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_fss_items_increase_by__works(void **state) {
+
+ const int length = 5;
+ f_fss_items_t data = f_fss_items_t_initialize;
+
+ {
+ const f_status_t status = f_fss_items_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_fss_items_increase_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_int_equal(data.size, length * 2);
+ }
+
+ free((void *) data.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test items increase by in the fss project.
+ */
+#ifndef _TEST__F_fss__items_increase_by
+#define _TEST__F_fss__items_increase_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_items_increase_by()
+ */
+extern void test__f_fss_items_increase_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_items_increase_by()
+ */
+extern void test__f_fss_items_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_items_increase_by()
+ */
+extern void test__f_fss_items_increase_by__works(void **state);
+
+#endif // _TEST__F_fss__items_increase_by
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-items_resize.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_items_resize__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_items_t data = f_fss_items_t_initialize;
+
+ {
+ const f_status_t status = f_fss_items_resize(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_fss_items_resize__works(void **state) {
+
+ const int length = 5;
+ f_fss_items_t data = f_fss_items_t_initialize;
+
+ {
+ const f_status_t status = f_fss_items_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ free((void *) data.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test items resize in the fss project.
+ */
+#ifndef _TEST__F_fss__items_resize
+#define _TEST__F_fss__items_resize
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_items_resize()
+ */
+extern void test__f_fss_items_resize__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_items_resize()
+ */
+extern void test__f_fss_items_resize__works(void **state);
+
+#endif // _TEST__F_fss__items_resize
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-nameds_adjust.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_named_adjust__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_named_t data = f_fss_named_t_initialize;
+
+ {
+ const f_status_t status = f_fss_named_adjust(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, 0);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, 0);
+ assert_int_equal(data.quotess.used, 0);
+ assert_int_equal(data.quotess.size, 0);
+ }
+
+ assert_null(data.objects.array);
+ assert_null(data.contents.array);
+ assert_null(data.quotess.array);
+}
+
+void test__f_fss_named_adjust__works(void **state) {
+
+ const int length = 5;
+ f_fss_named_t data = f_fss_named_t_initialize;
+
+ {
+ const f_status_t status = f_fss_named_adjust(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, length);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, length);
+ assert_int_equal(data.quotess.used, 0);
+ assert_int_equal(data.quotess.size, length);
+ }
+
+ free((void *) data.objects.array);
+ free((void *) data.contents.array);
+ free((void *) data.quotess.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test named adjust in the fss project.
+ */
+#ifndef _TEST__F_fss__named_adjust
+#define _TEST__F_fss__named_adjust
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_named_adjust()
+ */
+extern void test__f_fss_named_adjust__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_named_adjust()
+ */
+extern void test__f_fss_named_adjust__works(void **state);
+
+#endif // _TEST__F_fss__named_adjust
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-nameds_decimate_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_named_decimate_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_named_t data = f_fss_named_t_initialize;
+
+ {
+ const f_status_t status = f_fss_named_decimate_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, 0);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, 0);
+ assert_int_equal(data.quotess.used, 0);
+ assert_int_equal(data.quotess.size, 0);
+ }
+
+ assert_null(data.objects.array);
+ assert_null(data.contents.array);
+ assert_null(data.quotess.array);
+}
+
+void test__f_fss_named_decimate_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fss_named_t data = f_fss_named_t_initialize;
+
+ {
+ const f_status_t status = f_fss_named_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, length);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, length);
+ assert_int_equal(data.quotess.used, 0);
+ assert_int_equal(data.quotess.size, length);
+ }
+
+ {
+ const f_status_t status = f_fss_named_decimate_by(0, &data);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, length);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, length);
+ assert_int_equal(data.quotess.used, 0);
+ assert_int_equal(data.quotess.size, length);
+ }
+
+ free((void *) data.objects.array);
+ free((void *) data.contents.array);
+ free((void *) data.quotess.array);
+}
+
+void test__f_fss_named_decimate_by__works(void **state) {
+
+ const int length = 5;
+ f_fss_named_t data = f_fss_named_t_initialize;
+
+ {
+ const f_status_t status = f_fss_named_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, length);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, length);
+ assert_int_equal(data.quotess.used, 0);
+ assert_int_equal(data.quotess.size, length);
+ }
+
+ {
+ const f_status_t status = f_fss_named_decimate_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, 0);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, 0);
+ assert_int_equal(data.quotess.used, 0);
+ assert_int_equal(data.quotess.size, 0);
+ }
+
+ assert_null(data.objects.array);
+ assert_null(data.contents.array);
+ assert_null(data.quotess.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test named decimate by in the fss project.
+ */
+#ifndef _TEST__F_fss__named_decimate_by
+#define _TEST__F_fss__named_decimate_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_named_decimate_by()
+ */
+extern void test__f_fss_named_decimate_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_named_decimate_by()
+ */
+extern void test__f_fss_named_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_named_decimate_by()
+ */
+extern void test__f_fss_named_decimate_by__works(void **state);
+
+#endif // _TEST__F_fss__named_decimate_by
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-nameds_decrease_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_named_decrease_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_named_t data = f_fss_named_t_initialize;
+
+ {
+ const f_status_t status = f_fss_named_decrease_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, 0);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, 0);
+ assert_int_equal(data.quotess.used, 0);
+ assert_int_equal(data.quotess.size, 0);
+ }
+
+ assert_null(data.objects.array);
+ assert_null(data.contents.array);
+ assert_null(data.quotess.array);
+}
+
+void test__f_fss_named_decrease_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fss_named_t data = f_fss_named_t_initialize;
+
+ {
+ const f_status_t status = f_fss_named_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, length);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, length);
+ assert_int_equal(data.quotess.used, 0);
+ assert_int_equal(data.quotess.size, length);
+ }
+
+ {
+ const f_status_t status = f_fss_named_decrease_by(0, &data);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, length);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, length);
+ assert_int_equal(data.quotess.used, 0);
+ assert_int_equal(data.quotess.size, length);
+ }
+
+ free((void *) data.objects.array);
+ free((void *) data.contents.array);
+ free((void *) data.quotess.array);
+}
+
+void test__f_fss_named_decrease_by__works(void **state) {
+
+ const int length = 5;
+ f_fss_named_t data = f_fss_named_t_initialize;
+
+ {
+ const f_status_t status = f_fss_named_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, length);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, length);
+ assert_int_equal(data.quotess.used, 0);
+ assert_int_equal(data.quotess.size, length);
+ }
+
+ {
+ const f_status_t status = f_fss_named_decrease_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, 0);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, 0);
+ assert_int_equal(data.quotess.used, 0);
+ assert_int_equal(data.quotess.size, 0);
+ }
+
+ assert_null(data.objects.array);
+ assert_null(data.contents.array);
+ assert_null(data.quotess.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test named decrease by in the fss project.
+ */
+#ifndef _TEST__F_fss__named_decrease_by
+#define _TEST__F_fss__named_decrease_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_named_decrease_by()
+ */
+extern void test__f_fss_named_decrease_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_named_decrease_by()
+ */
+extern void test__f_fss_named_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_named_decrease_by()
+ */
+extern void test__f_fss_named_decrease_by__works(void **state);
+
+#endif // _TEST__F_fss__named_decrease_by
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-nameds_increase.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_named_increase__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_named_t data = f_fss_named_t_initialize;
+
+ {
+ const f_status_t status = f_fss_named_increase(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, 0);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, 0);
+ assert_int_equal(data.quotess.used, 0);
+ assert_int_equal(data.quotess.size, 0);
+ }
+
+ free((void *) data.objects.array);
+ free((void *) data.contents.array);
+ free((void *) data.quotess.array);
+}
+
+void test__f_fss_named_increase__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fss_named_t data = f_fss_named_t_initialize;
+
+ {
+ const f_status_t status = f_fss_named_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, length);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, length);
+ assert_int_equal(data.quotess.used, 0);
+ assert_int_equal(data.quotess.size, length);
+ }
+
+ {
+ const f_status_t status = f_fss_named_increase(length, &data);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, length);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, length);
+ assert_int_equal(data.quotess.used, 0);
+ assert_int_equal(data.quotess.size, length);
+ }
+
+ free((void *) data.objects.array);
+ free((void *) data.contents.array);
+ free((void *) data.quotess.array);
+}
+
+void test__f_fss_named_increase__works(void **state) {
+
+ const int length = 5;
+ f_fss_named_t data = f_fss_named_t_initialize;
+
+ {
+ const f_status_t status = f_fss_named_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, length);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, length);
+ assert_int_equal(data.quotess.used, 0);
+ assert_int_equal(data.quotess.size, length);
+ }
+
+ {
+ data.objects.used = length;
+ data.contents.used = length;
+ data.quotess.used = length;
+
+ const f_status_t status = f_fss_named_increase(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.objects.used, length);
+ assert_in_range(data.objects.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ assert_int_equal(data.contents.used, length);
+ assert_in_range(data.contents.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ assert_int_equal(data.quotess.used, length);
+ assert_in_range(data.quotess.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ }
+
+ free((void *) data.objects.array);
+ free((void *) data.contents.array);
+ free((void *) data.quotess.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test named increase in the fss project.
+ */
+#ifndef _TEST__F_fss__named_increase
+#define _TEST__F_fss__named_increase
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_named_increase()
+ */
+extern void test__f_fss_named_increase__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_named_increase()
+ */
+extern void test__f_fss_named_increase__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_named_increase()
+ */
+extern void test__f_fss_named_increase__works(void **state);
+
+#endif // _TEST__F_fss__named_increase
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-nameds_increase_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_named_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_named_t data = f_fss_named_t_initialize;
+
+ {
+ const f_status_t status = f_fss_named_increase_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, 0);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, 0);
+ assert_int_equal(data.quotess.used, 0);
+ assert_int_equal(data.quotess.size, 0);
+ }
+
+ assert_null(data.objects.array);
+ assert_null(data.contents.array);
+ assert_null(data.quotess.array);
+}
+
+void test__f_fss_named_increase_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fss_named_t data = f_fss_named_t_initialize;
+
+ {
+ const f_status_t status = f_fss_named_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, length);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, length);
+ assert_int_equal(data.quotess.used, 0);
+ assert_int_equal(data.quotess.size, length);
+ }
+
+ {
+ const f_status_t status = f_fss_named_decimate_by(0, &data);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, length);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, length);
+ assert_int_equal(data.quotess.used, 0);
+ assert_int_equal(data.quotess.size, length);
+ }
+
+ free((void *) data.objects.array);
+ free((void *) data.contents.array);
+ free((void *) data.quotess.array);
+}
+
+void test__f_fss_named_increase_by__works(void **state) {
+
+ const int length = 5;
+ f_fss_named_t data = f_fss_named_t_initialize;
+
+ {
+ const f_status_t status = f_fss_named_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, length);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, length);
+ assert_int_equal(data.quotess.used, 0);
+ assert_int_equal(data.quotess.size, length);
+ }
+
+ {
+ data.objects.used = length;
+ data.contents.used = length;
+ data.quotess.used = length;
+
+ const f_status_t status = f_fss_named_increase_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.objects.used, length);
+ assert_int_equal(data.objects.size, length * 2);
+ assert_int_equal(data.contents.used, length);
+ assert_int_equal(data.contents.size, length * 2);
+ assert_int_equal(data.quotess.used, length);
+ assert_int_equal(data.quotess.size, length * 2);
+ }
+
+ free((void *) data.objects.array);
+ free((void *) data.contents.array);
+ free((void *) data.quotess.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test named increase by in the fss project.
+ */
+#ifndef _TEST__F_fss__named_increase_by
+#define _TEST__F_fss__named_increase_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_named_increase_by()
+ */
+extern void test__f_fss_named_increase_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_named_increase_by()
+ */
+extern void test__f_fss_named_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_named_increase_by()
+ */
+extern void test__f_fss_named_increase_by__works(void **state);
+
+#endif // _TEST__F_fss__named_increase_by
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-nameds_resize.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_named_resize__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_named_t data = f_fss_named_t_initialize;
+
+ {
+ const f_status_t status = f_fss_named_resize(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, 0);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, 0);
+ assert_int_equal(data.quotess.used, 0);
+ assert_int_equal(data.quotess.size, 0);
+ }
+
+ assert_null(data.objects.array);
+ assert_null(data.contents.array);
+ assert_null(data.quotess.array);
+}
+
+void test__f_fss_named_resize__works(void **state) {
+
+ const int length = 5;
+ f_fss_named_t data = f_fss_named_t_initialize;
+
+ {
+ const f_status_t status = f_fss_named_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, length);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, length);
+ assert_int_equal(data.quotess.used, 0);
+ assert_int_equal(data.quotess.size, length);
+ }
+
+ free((void *) data.objects.array);
+ free((void *) data.contents.array);
+ free((void *) data.quotess.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test named resize in the fss project.
+ */
+#ifndef _TEST__F_fss__named_resize
+#define _TEST__F_fss__named_resize
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_named_resize()
+ */
+extern void test__f_fss_named_resize__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_named_resize()
+ */
+extern void test__f_fss_named_resize__works(void **state);
+
+#endif // _TEST__F_fss__named_resize
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-nameds_adjust.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_nameds_adjust__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_nameds_t data = f_fss_nameds_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nameds_adjust(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_fss_nameds_adjust__works(void **state) {
+
+ const int length = 5;
+ f_fss_nameds_t data = f_fss_nameds_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nameds_adjust(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ free((void *) data.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test nameds adjust in the fss project.
+ */
+#ifndef _TEST__F_fss__nameds_adjust
+#define _TEST__F_fss__nameds_adjust
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_nameds_adjust()
+ */
+extern void test__f_fss_nameds_adjust__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_nameds_adjust()
+ */
+extern void test__f_fss_nameds_adjust__works(void **state);
+
+#endif // _TEST__F_fss__nameds_adjust
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-nameds_decimate_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_nameds_decimate_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_nameds_t data = f_fss_nameds_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nameds_decimate_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_fss_nameds_decimate_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fss_nameds_t data = f_fss_nameds_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nameds_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_fss_nameds_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_fss_nameds_decimate_by__works(void **state) {
+
+ const int length = 5;
+ f_fss_nameds_t data = f_fss_nameds_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nameds_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_fss_nameds_decimate_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test nameds decimate by in the fss project.
+ */
+#ifndef _TEST__F_fss__nameds_decimate_by
+#define _TEST__F_fss__nameds_decimate_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_nameds_decimate_by()
+ */
+extern void test__f_fss_nameds_decimate_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_nameds_decimate_by()
+ */
+extern void test__f_fss_nameds_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_nameds_decimate_by()
+ */
+extern void test__f_fss_nameds_decimate_by__works(void **state);
+
+#endif // _TEST__F_fss__nameds_decimate_by
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-nameds_decrease_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_nameds_decrease_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_nameds_t data = f_fss_nameds_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nameds_decrease_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_fss_nameds_decrease_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fss_nameds_t data = f_fss_nameds_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nameds_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_fss_nameds_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_fss_nameds_decrease_by__works(void **state) {
+
+ const int length = 5;
+ f_fss_nameds_t data = f_fss_nameds_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nameds_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_fss_nameds_decrease_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test nameds decrease by in the fss project.
+ */
+#ifndef _TEST__F_fss__nameds_decrease_by
+#define _TEST__F_fss__nameds_decrease_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_nameds_decrease_by()
+ */
+extern void test__f_fss_nameds_decrease_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_nameds_decrease_by()
+ */
+extern void test__f_fss_nameds_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_nameds_decrease_by()
+ */
+extern void test__f_fss_nameds_decrease_by__works(void **state);
+
+#endif // _TEST__F_fss__nameds_decrease_by
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-nameds_increase.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_nameds_increase__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_nameds_t data = f_fss_nameds_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nameds_increase(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ free((void *) data.array);
+}
+
+void test__f_fss_nameds_increase__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fss_nameds_t data = f_fss_nameds_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nameds_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_fss_nameds_increase(length, &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_fss_nameds_increase__works(void **state) {
+
+ const int length = 5;
+ f_fss_nameds_t data = f_fss_nameds_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nameds_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_fss_nameds_increase(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ }
+
+ free((void *) data.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test nameds increase in the fss project.
+ */
+#ifndef _TEST__F_fss__nameds_increase
+#define _TEST__F_fss__nameds_increase
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_nameds_increase()
+ */
+extern void test__f_fss_nameds_increase__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_nameds_increase()
+ */
+extern void test__f_fss_nameds_increase__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_nameds_increase()
+ */
+extern void test__f_fss_nameds_increase__works(void **state);
+
+#endif // _TEST__F_fss__nameds_increase
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-nameds_increase_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_nameds_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_nameds_t data = f_fss_nameds_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nameds_increase_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_fss_nameds_increase_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fss_nameds_t data = f_fss_nameds_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nameds_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_fss_nameds_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_fss_nameds_increase_by__works(void **state) {
+
+ const int length = 5;
+ f_fss_nameds_t data = f_fss_nameds_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nameds_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_fss_nameds_increase_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_int_equal(data.size, length * 2);
+ }
+
+ free((void *) data.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test nameds increase by in the fss project.
+ */
+#ifndef _TEST__F_fss__nameds_increase_by
+#define _TEST__F_fss__nameds_increase_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_nameds_increase_by()
+ */
+extern void test__f_fss_nameds_increase_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_nameds_increase_by()
+ */
+extern void test__f_fss_nameds_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_nameds_increase_by()
+ */
+extern void test__f_fss_nameds_increase_by__works(void **state);
+
+#endif // _TEST__F_fss__nameds_increase_by
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-nameds_resize.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_nameds_resize__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_nameds_t data = f_fss_nameds_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nameds_resize(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_fss_nameds_resize__works(void **state) {
+
+ const int length = 5;
+ f_fss_nameds_t data = f_fss_nameds_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nameds_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ free((void *) data.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test nameds resize in the fss project.
+ */
+#ifndef _TEST__F_fss__nameds_resize
+#define _TEST__F_fss__nameds_resize
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_nameds_resize()
+ */
+extern void test__f_fss_nameds_resize__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_nameds_resize()
+ */
+extern void test__f_fss_nameds_resize__works(void **state);
+
+#endif // _TEST__F_fss__nameds_resize
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-nests_adjust.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_nest_adjust__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_nest_t data = f_fss_nest_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nest_adjust(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.depth);
+}
+
+void test__f_fss_nest_adjust__works(void **state) {
+
+ const int length = 5;
+ f_fss_nest_t data = f_fss_nest_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nest_adjust(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ free((void *) data.depth);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test nest adjust in the fss project.
+ */
+#ifndef _TEST__F_fss__nest_adjust
+#define _TEST__F_fss__nest_adjust
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_nest_adjust()
+ */
+extern void test__f_fss_nest_adjust__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_nest_adjust()
+ */
+extern void test__f_fss_nest_adjust__works(void **state);
+
+#endif // _TEST__F_fss__nest_adjust
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-nests_decimate_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_nest_decimate_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_nest_t data = f_fss_nest_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nest_decimate_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.depth);
+}
+
+void test__f_fss_nest_decimate_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fss_nest_t data = f_fss_nest_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nest_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_fss_nest_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.depth);
+}
+
+void test__f_fss_nest_decimate_by__works(void **state) {
+
+ const int length = 5;
+ f_fss_nest_t data = f_fss_nest_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nest_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_fss_nest_decimate_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.depth);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test nest decimate by in the fss project.
+ */
+#ifndef _TEST__F_fss__nest_decimate_by
+#define _TEST__F_fss__nest_decimate_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_nest_decimate_by()
+ */
+extern void test__f_fss_nest_decimate_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_nest_decimate_by()
+ */
+extern void test__f_fss_nest_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_nest_decimate_by()
+ */
+extern void test__f_fss_nest_decimate_by__works(void **state);
+
+#endif // _TEST__F_fss__nest_decimate_by
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-nests_decrease_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_nest_decrease_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_nest_t data = f_fss_nest_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nest_decrease_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.depth);
+}
+
+void test__f_fss_nest_decrease_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fss_nest_t data = f_fss_nest_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nest_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_fss_nest_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.depth);
+}
+
+void test__f_fss_nest_decrease_by__works(void **state) {
+
+ const int length = 5;
+ f_fss_nest_t data = f_fss_nest_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nest_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_fss_nest_decrease_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.depth);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test nest decrease by in the fss project.
+ */
+#ifndef _TEST__F_fss__nest_decrease_by
+#define _TEST__F_fss__nest_decrease_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_nest_decrease_by()
+ */
+extern void test__f_fss_nest_decrease_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_nest_decrease_by()
+ */
+extern void test__f_fss_nest_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_nest_decrease_by()
+ */
+extern void test__f_fss_nest_decrease_by__works(void **state);
+
+#endif // _TEST__F_fss__nest_decrease_by
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-nests_increase.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_nest_increase__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_nest_t data = f_fss_nest_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nest_increase(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ free((void *) data.depth);
+}
+
+void test__f_fss_nest_increase__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fss_nest_t data = f_fss_nest_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nest_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_fss_nest_increase(length, &data);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ free((void *) data.depth);
+}
+
+void test__f_fss_nest_increase__works(void **state) {
+
+ const int length = 5;
+ f_fss_nest_t data = f_fss_nest_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nest_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_fss_nest_increase(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ }
+
+ free((void *) data.depth);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test nest increase in the fss project.
+ */
+#ifndef _TEST__F_fss__nest_increase
+#define _TEST__F_fss__nest_increase
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_nest_increase()
+ */
+extern void test__f_fss_nest_increase__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_nest_increase()
+ */
+extern void test__f_fss_nest_increase__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_nest_increase()
+ */
+extern void test__f_fss_nest_increase__works(void **state);
+
+#endif // _TEST__F_fss__nest_increase
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-nests_increase_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_nest_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_nest_t data = f_fss_nest_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nest_increase_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.depth);
+}
+
+void test__f_fss_nest_increase_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fss_nest_t data = f_fss_nest_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nest_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_fss_nest_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.depth);
+}
+
+void test__f_fss_nest_increase_by__works(void **state) {
+
+ const int length = 5;
+ f_fss_nest_t data = f_fss_nest_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nest_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_fss_nest_increase_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_int_equal(data.size, length * 2);
+ }
+
+ free((void *) data.depth);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test nest increase by in the fss project.
+ */
+#ifndef _TEST__F_fss__nest_increase_by
+#define _TEST__F_fss__nest_increase_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_nest_increase_by()
+ */
+extern void test__f_fss_nest_increase_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_nest_increase_by()
+ */
+extern void test__f_fss_nest_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_nest_increase_by()
+ */
+extern void test__f_fss_nest_increase_by__works(void **state);
+
+#endif // _TEST__F_fss__nest_increase_by
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-nests_resize.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_nest_resize__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_nest_t data = f_fss_nest_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nest_resize(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.depth);
+}
+
+void test__f_fss_nest_resize__works(void **state) {
+
+ const int length = 5;
+ f_fss_nest_t data = f_fss_nest_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nest_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ free((void *) data.depth);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test nest resize in the fss project.
+ */
+#ifndef _TEST__F_fss__nest_resize
+#define _TEST__F_fss__nest_resize
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_nest_resize()
+ */
+extern void test__f_fss_nest_resize__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_nest_resize()
+ */
+extern void test__f_fss_nest_resize__works(void **state);
+
+#endif // _TEST__F_fss__nest_resize
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-nests_adjust.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_nests_adjust__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_nests_t data = f_fss_nests_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nests_adjust(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_fss_nests_adjust__works(void **state) {
+
+ const int length = 5;
+ f_fss_nests_t data = f_fss_nests_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nests_adjust(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ free((void *) data.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test nests adjust in the fss project.
+ */
+#ifndef _TEST__F_fss__nests_adjust
+#define _TEST__F_fss__nests_adjust
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_nests_adjust()
+ */
+extern void test__f_fss_nests_adjust__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_nests_adjust()
+ */
+extern void test__f_fss_nests_adjust__works(void **state);
+
+#endif // _TEST__F_fss__nests_adjust
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-nests_decimate_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_nests_decimate_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_nests_t data = f_fss_nests_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nests_decimate_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_fss_nests_decimate_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fss_nests_t data = f_fss_nests_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nests_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_fss_nests_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_fss_nests_decimate_by__works(void **state) {
+
+ const int length = 5;
+ f_fss_nests_t data = f_fss_nests_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nests_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_fss_nests_decimate_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test nests decimate by in the fss project.
+ */
+#ifndef _TEST__F_fss__nests_decimate_by
+#define _TEST__F_fss__nests_decimate_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_nests_decimate_by()
+ */
+extern void test__f_fss_nests_decimate_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_nests_decimate_by()
+ */
+extern void test__f_fss_nests_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_nests_decimate_by()
+ */
+extern void test__f_fss_nests_decimate_by__works(void **state);
+
+#endif // _TEST__F_fss__nests_decimate_by
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-nests_decrease_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_nests_decrease_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_nests_t data = f_fss_nests_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nests_decrease_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_fss_nests_decrease_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fss_nests_t data = f_fss_nests_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nests_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_fss_nests_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_fss_nests_decrease_by__works(void **state) {
+
+ const int length = 5;
+ f_fss_nests_t data = f_fss_nests_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nests_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_fss_nests_decrease_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test nests decrease by in the fss project.
+ */
+#ifndef _TEST__F_fss__nests_decrease_by
+#define _TEST__F_fss__nests_decrease_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_nests_decrease_by()
+ */
+extern void test__f_fss_nests_decrease_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_nests_decrease_by()
+ */
+extern void test__f_fss_nests_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_nests_decrease_by()
+ */
+extern void test__f_fss_nests_decrease_by__works(void **state);
+
+#endif // _TEST__F_fss__nests_decrease_by
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-nests_increase.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_nests_increase__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_nests_t data = f_fss_nests_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nests_increase(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ free((void *) data.array);
+}
+
+void test__f_fss_nests_increase__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fss_nests_t data = f_fss_nests_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nests_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_fss_nests_increase(length, &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_fss_nests_increase__works(void **state) {
+
+ const int length = 5;
+ f_fss_nests_t data = f_fss_nests_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nests_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_fss_nests_increase(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ }
+
+ free((void *) data.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test nests increase in the fss project.
+ */
+#ifndef _TEST__F_fss__nests_increase
+#define _TEST__F_fss__nests_increase
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_nests_increase()
+ */
+extern void test__f_fss_nests_increase__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_nests_increase()
+ */
+extern void test__f_fss_nests_increase__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_nests_increase()
+ */
+extern void test__f_fss_nests_increase__works(void **state);
+
+#endif // _TEST__F_fss__nests_increase
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-nests_increase_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_nests_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_nests_t data = f_fss_nests_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nests_increase_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_fss_nests_increase_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fss_nests_t data = f_fss_nests_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nests_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_fss_nests_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_fss_nests_increase_by__works(void **state) {
+
+ const int length = 5;
+ f_fss_nests_t data = f_fss_nests_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nests_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_fss_nests_increase_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_int_equal(data.size, length * 2);
+ }
+
+ free((void *) data.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test nests increase by in the fss project.
+ */
+#ifndef _TEST__F_fss__nests_increase_by
+#define _TEST__F_fss__nests_increase_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_nests_increase_by()
+ */
+extern void test__f_fss_nests_increase_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_nests_increase_by()
+ */
+extern void test__f_fss_nests_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_nests_increase_by()
+ */
+extern void test__f_fss_nests_increase_by__works(void **state);
+
+#endif // _TEST__F_fss__nests_increase_by
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-nests_resize.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_nests_resize__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_nests_t data = f_fss_nests_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nests_resize(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_fss_nests_resize__works(void **state) {
+
+ const int length = 5;
+ f_fss_nests_t data = f_fss_nests_t_initialize;
+
+ {
+ const f_status_t status = f_fss_nests_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ free((void *) data.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test nests resize in the fss project.
+ */
+#ifndef _TEST__F_fss__nests_resize
+#define _TEST__F_fss__nests_resize
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_nests_resize()
+ */
+extern void test__f_fss_nests_resize__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_nests_resize()
+ */
+extern void test__f_fss_nests_resize__works(void **state);
+
+#endif // _TEST__F_fss__nests_resize
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-seek_to_eol.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_seek_to_eol__parameter_checking(void **state) {
+
+ const f_string_static_t test = macro_f_string_static_t_initialize("test", 0, 4);
+ f_state_t state_data = f_state_t_initialize;
+
+ {
+ const f_status_t status = f_fss_seek_to_eol(state_data, test, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_fss_seek_to_eol__returns_data_not(void **state) {
+
+ const f_string_static_t test = macro_f_string_static_t_initialize("test", 0, 4);
+ f_state_t state_data = f_state_t_initialize;
+
+ {
+ f_string_range_t range = f_string_range_t_initialize;
+ const f_status_t status = f_fss_seek_to_eol(state_data, f_string_empty_s, &range);
+
+ assert_int_equal(status, F_data_not);
+ }
+
+ {
+ f_string_range_t range = f_string_range_t_initialize;
+ const f_status_t status = f_fss_seek_to_eol(state_data, test, &range);
+
+ assert_int_equal(status, F_data_not);
+ }
+
+ {
+ f_string_range_t range = macro_f_string_range_t_initialize(0, 1);
+ const f_status_t status = f_fss_seek_to_eol(state_data, f_string_empty_s, &range);
+
+ assert_int_equal(status, F_data_not);
+ }
+}
+
+void test__f_fss_seek_to_eol__works(void **state) {
+
+ f_state_t state_data = f_state_t_initialize;
+
+ f_string_static_t tests[] = {
+ macro_f_string_static_t_initialize(" ", 0, 2),
+ macro_f_string_static_t_initialize("\0\0", 0, 2),
+ macro_f_string_static_t_initialize("\n\n", 0, 2),
+ macro_f_string_static_t_initialize(" \ntest", 0, 7),
+ macro_f_string_static_t_initialize("test\ntest\n", 0, 6),
+ macro_f_string_static_t_initialize("\ntest\n\n", 0, 7),
+ macro_f_string_static_t_initialize(" ", 0, 2),
+ macro_f_string_static_t_initialize("\0\0", 0, 2),
+ macro_f_string_static_t_initialize("\n\n", 0, 2),
+ macro_f_string_static_t_initialize(" \ntest", 0, 7),
+ macro_f_string_static_t_initialize("test\ntest\n", 0, 6),
+ macro_f_string_static_t_initialize("\ntest\n\n", 0, 7),
+ };
+
+ f_string_range_t ranges[] = {
+ macro_f_string_range_t_initialize(0, tests[0].used - 1),
+ macro_f_string_range_t_initialize(0, tests[1].used - 1),
+ macro_f_string_range_t_initialize(0, tests[2].used - 1),
+ macro_f_string_range_t_initialize(0, tests[3].used - 1),
+ macro_f_string_range_t_initialize(0, tests[4].used - 1),
+ macro_f_string_range_t_initialize(0, tests[5].used - 1),
+ macro_f_string_range_t_initialize(0, tests[6].used - 2),
+ macro_f_string_range_t_initialize(0, tests[7].used - 2),
+ macro_f_string_range_t_initialize(0, tests[8].used - 2),
+ macro_f_string_range_t_initialize(0, tests[9].used - 2),
+ macro_f_string_range_t_initialize(0, tests[10].used - 2),
+ macro_f_string_range_t_initialize(1, tests[11].used - 2),
+ };
+
+ f_array_length_t expects[] = {
+ 2,
+ 2,
+ 0,
+ 2,
+ 4,
+ 0,
+ 1,
+ 1,
+ 0,
+ 2,
+ 4,
+ 5,
+ };
+
+ f_status_t statuss[] = {
+ F_none_eos,
+ F_none_eos,
+ F_none,
+ F_none,
+ F_none,
+ F_none,
+ F_none_stop,
+ F_none_stop,
+ F_none,
+ F_none,
+ F_none,
+ F_none,
+ };
+
+ for (uint8_t i = 0; i < 12; ++i) {
+
+ f_string_range_t range = ranges[i];
+
+ const f_status_t status = f_fss_seek_to_eol(state_data, tests[i], &range);
+
+ assert_int_equal(status, statuss[i]);
+ assert_int_equal(range.start, expects[i]);
+ } // for
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test seek to eol in the fss project.
+ */
+#ifndef _TEST__F_fss__seek_to_eol
+#define _TEST__F_fss__seek_to_eol
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_seek_to_eol()
+ */
+extern void test__f_fss_seek_to_eol__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_seek_to_eol()
+ */
+extern void test__f_fss_seek_to_eol__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_seek_to_eol()
+ */
+extern void test__f_fss_seek_to_eol__works(void **state);
+
+#endif // _TEST__F_fss__seek_to_eol
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-sets_adjust.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_set_adjust__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_set_t data = f_fss_set_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_adjust(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.contents.size, 0);
+ }
+
+ assert_null(data.objects.array);
+ assert_null(data.contents.array);
+}
+
+void test__f_fss_set_adjust__works(void **state) {
+
+ const int length = 5;
+ f_fss_set_t data = f_fss_set_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_adjust(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.contents.size, length);
+ }
+
+ free((void *) data.objects.array);
+ free((void *) data.contents.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test set adjust in the fss project.
+ */
+#ifndef _TEST__F_fss__set_adjust
+#define _TEST__F_fss__set_adjust
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_set_adjust()
+ */
+extern void test__f_fss_set_adjust__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_set_adjust()
+ */
+extern void test__f_fss_set_adjust__works(void **state);
+
+#endif // _TEST__F_fss__set_adjust
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-sets_decimate_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_set_decimate_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_set_t data = f_fss_set_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_decimate_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.contents.size, 0);
+ }
+
+ assert_null(data.objects.array);
+ assert_null(data.contents.array);
+}
+
+void test__f_fss_set_decimate_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fss_set_t data = f_fss_set_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.contents.size, length);
+ }
+
+ {
+ const f_status_t status = f_fss_set_decimate_by(0, &data);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.contents.size, length);
+ }
+
+ free((void *) data.objects.array);
+ free((void *) data.contents.array);
+}
+
+void test__f_fss_set_decimate_by__works(void **state) {
+
+ const int length = 5;
+ f_fss_set_t data = f_fss_set_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.contents.size, length);
+ }
+
+ {
+ const f_status_t status = f_fss_set_decimate_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.contents.size, 0);
+ }
+
+ assert_null(data.objects.array);
+ assert_null(data.contents.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test set decimate by in the fss project.
+ */
+#ifndef _TEST__F_fss__set_decimate_by
+#define _TEST__F_fss__set_decimate_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_set_decimate_by()
+ */
+extern void test__f_fss_set_decimate_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_set_decimate_by()
+ */
+extern void test__f_fss_set_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_set_decimate_by()
+ */
+extern void test__f_fss_set_decimate_by__works(void **state);
+
+#endif // _TEST__F_fss__set_decimate_by
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-sets_decrease_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_set_decrease_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_set_t data = f_fss_set_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_decrease_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.contents.size, 0);
+ }
+
+ assert_null(data.objects.array);
+ assert_null(data.contents.array);
+}
+
+void test__f_fss_set_decrease_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fss_set_t data = f_fss_set_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.contents.size, length);
+ }
+
+ {
+ const f_status_t status = f_fss_set_decrease_by(0, &data);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.contents.size, length);
+ }
+
+ free((void *) data.objects.array);
+ free((void *) data.contents.array);
+}
+
+void test__f_fss_set_decrease_by__works(void **state) {
+
+ const int length = 5;
+ f_fss_set_t data = f_fss_set_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.contents.size, length);
+ }
+
+ {
+ const f_status_t status = f_fss_set_decrease_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.contents.size, 0);
+ }
+
+ assert_null(data.objects.array);
+ assert_null(data.contents.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test set decrease by in the fss project.
+ */
+#ifndef _TEST__F_fss__set_decrease_by
+#define _TEST__F_fss__set_decrease_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_set_decrease_by()
+ */
+extern void test__f_fss_set_decrease_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_set_decrease_by()
+ */
+extern void test__f_fss_set_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_set_decrease_by()
+ */
+extern void test__f_fss_set_decrease_by__works(void **state);
+
+#endif // _TEST__F_fss__set_decrease_by
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-sets_increase.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_set_increase__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_set_t data = f_fss_set_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_increase(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.contents.size, 0);
+ }
+
+ free((void *) data.objects.array);
+ free((void *) data.contents.array);
+}
+
+void test__f_fss_set_increase__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fss_set_t data = f_fss_set_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.contents.size, length);
+ }
+
+ {
+ const f_status_t status = f_fss_set_increase(length, &data);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.contents.size, length);
+ }
+
+ free((void *) data.objects.array);
+ free((void *) data.contents.array);
+}
+
+void test__f_fss_set_increase__works(void **state) {
+
+ const int length = 5;
+ f_fss_set_t data = f_fss_set_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.contents.size, length);
+ }
+
+ {
+ data.objects.used = length;
+ data.contents.used = length;
+
+ const f_status_t status = f_fss_set_increase(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.objects.used, length);
+ assert_in_range(data.contents.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ }
+
+ free((void *) data.objects.array);
+ free((void *) data.contents.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test set increase in the fss project.
+ */
+#ifndef _TEST__F_fss__set_increase
+#define _TEST__F_fss__set_increase
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_set_increase()
+ */
+extern void test__f_fss_set_increase__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_set_increase()
+ */
+extern void test__f_fss_set_increase__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_set_increase()
+ */
+extern void test__f_fss_set_increase__works(void **state);
+
+#endif // _TEST__F_fss__set_increase
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-sets_increase_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_set_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_set_t data = f_fss_set_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_increase_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.contents.size, 0);
+ }
+
+ assert_null(data.objects.array);
+ assert_null(data.contents.array);
+}
+
+void test__f_fss_set_increase_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fss_set_t data = f_fss_set_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.contents.size, length);
+ }
+
+ {
+ const f_status_t status = f_fss_set_increase_by(0, &data);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.contents.size, length);
+ }
+
+ free((void *) data.objects.array);
+ free((void *) data.contents.array);
+}
+
+void test__f_fss_set_increase_by__works(void **state) {
+
+ const int length = 5;
+ f_fss_set_t data = f_fss_set_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.contents.size, length);
+ }
+
+ {
+ data.objects.used = length;
+ data.contents.used = length;
+
+ const f_status_t status = f_fss_set_increase_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.objects.used, length);
+ assert_int_equal(data.contents.size, length * 2);
+ }
+
+ free((void *) data.objects.array);
+ free((void *) data.contents.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test set increase by in the fss project.
+ */
+#ifndef _TEST__F_fss__set_increase_by
+#define _TEST__F_fss__set_increase_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_set_increase_by()
+ */
+extern void test__f_fss_set_increase_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_set_increase_by()
+ */
+extern void test__f_fss_set_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_set_increase_by()
+ */
+extern void test__f_fss_set_increase_by__works(void **state);
+
+#endif // _TEST__F_fss__set_increase_by
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-set_quote_adjust.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_set_quote_adjust__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_quote_adjust(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, 0);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, 0);
+ assert_int_equal(data.objects_quote.used, 0);
+ assert_int_equal(data.objects_quote.size, 0);
+ assert_int_equal(data.contents_quote.used, 0);
+ assert_int_equal(data.contents_quote.size, 0);
+ }
+
+ assert_null(data.objects.array);
+ assert_null(data.contents.array);
+ assert_null(data.objects_quote.array);
+ assert_null(data.contents_quote.array);
+}
+
+void test__f_fss_set_quote_adjust__works(void **state) {
+
+ const int length = 5;
+ f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_quote_adjust(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, length);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, length);
+ assert_int_equal(data.objects_quote.used, 0);
+ assert_int_equal(data.objects_quote.size, length);
+ assert_int_equal(data.contents_quote.used, 0);
+ assert_int_equal(data.contents_quote.size, length);
+ }
+
+ free((void *) data.objects.array);
+ free((void *) data.contents.array);
+ free((void *) data.objects_quote.array);
+ free((void *) data.contents_quote.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test set quote adjust in the fss project.
+ */
+#ifndef _TEST__F_fss__set_quote_adjust
+#define _TEST__F_fss__set_quote_adjust
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_set_quote_adjust()
+ */
+extern void test__f_fss_set_quote_adjust__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_set_quote_adjust()
+ */
+extern void test__f_fss_set_quote_adjust__works(void **state);
+
+#endif // _TEST__F_fss__set_quote_adjust
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-set_quote_decimate_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_set_quote_decimate_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_quote_decimate_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, 0);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, 0);
+ assert_int_equal(data.objects_quote.used, 0);
+ assert_int_equal(data.objects_quote.size, 0);
+ assert_int_equal(data.contents_quote.used, 0);
+ assert_int_equal(data.contents_quote.size, 0);
+ }
+
+ assert_null(data.objects.array);
+ assert_null(data.contents.array);
+ assert_null(data.objects_quote.array);
+ assert_null(data.contents_quote.array);
+}
+
+void test__f_fss_set_quote_decimate_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_quote_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, length);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, length);
+ assert_int_equal(data.objects_quote.used, 0);
+ assert_int_equal(data.objects_quote.size, length);
+ assert_int_equal(data.contents_quote.used, 0);
+ assert_int_equal(data.contents_quote.size, length);
+ }
+
+ {
+ const f_status_t status = f_fss_set_quote_decimate_by(0, &data);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, length);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, length);
+ assert_int_equal(data.objects_quote.used, 0);
+ assert_int_equal(data.objects_quote.size, length);
+ assert_int_equal(data.contents_quote.used, 0);
+ assert_int_equal(data.contents_quote.size, length);
+ }
+
+ free((void *) data.objects.array);
+ free((void *) data.contents.array);
+ free((void *) data.objects_quote.array);
+ free((void *) data.contents_quote.array);
+}
+
+void test__f_fss_set_quote_decimate_by__works(void **state) {
+
+ const int length = 5;
+ f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_quote_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, length);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, length);
+ assert_int_equal(data.objects_quote.used, 0);
+ assert_int_equal(data.objects_quote.size, length);
+ assert_int_equal(data.contents_quote.used, 0);
+ assert_int_equal(data.contents_quote.size, length);
+ }
+
+ {
+ const f_status_t status = f_fss_set_quote_decimate_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, 0);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, 0);
+ assert_int_equal(data.objects_quote.used, 0);
+ assert_int_equal(data.objects_quote.size, 0);
+ assert_int_equal(data.contents_quote.used, 0);
+ assert_int_equal(data.contents_quote.size, 0);
+ }
+
+ assert_null(data.objects.array);
+ assert_null(data.contents.array);
+ assert_null(data.objects_quote.array);
+ assert_null(data.contents_quote.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test set quote decimate by in the fss project.
+ */
+#ifndef _TEST__F_fss__set_quote_decimate_by
+#define _TEST__F_fss__set_quote_decimate_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_set_quote_decimate_by()
+ */
+extern void test__f_fss_set_quote_decimate_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_set_quote_decimate_by()
+ */
+extern void test__f_fss_set_quote_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_set_quote_decimate_by()
+ */
+extern void test__f_fss_set_quote_decimate_by__works(void **state);
+
+#endif // _TEST__F_fss__set_quote_decimate_by
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-set_quote_decrease_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_set_quote_decrease_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_quote_decrease_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, 0);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, 0);
+ assert_int_equal(data.objects_quote.used, 0);
+ assert_int_equal(data.objects_quote.size, 0);
+ assert_int_equal(data.contents_quote.used, 0);
+ assert_int_equal(data.contents_quote.size, 0);
+ }
+
+ assert_null(data.objects.array);
+ assert_null(data.contents.array);
+ assert_null(data.objects_quote.array);
+ assert_null(data.contents_quote.array);
+}
+
+void test__f_fss_set_quote_decrease_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_quote_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, length);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, length);
+ assert_int_equal(data.objects_quote.used, 0);
+ assert_int_equal(data.objects_quote.size, length);
+ assert_int_equal(data.contents_quote.used, 0);
+ assert_int_equal(data.contents_quote.size, length);
+ }
+
+ {
+ const f_status_t status = f_fss_set_quote_decrease_by(0, &data);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, length);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, length);
+ assert_int_equal(data.objects_quote.used, 0);
+ assert_int_equal(data.objects_quote.size, length);
+ assert_int_equal(data.contents_quote.used, 0);
+ assert_int_equal(data.contents_quote.size, length);
+ }
+
+ free((void *) data.objects.array);
+ free((void *) data.contents.array);
+ free((void *) data.objects_quote.array);
+ free((void *) data.contents_quote.array);
+}
+
+void test__f_fss_set_quote_decrease_by__works(void **state) {
+
+ const int length = 5;
+ f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_quote_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, length);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, length);
+ assert_int_equal(data.objects_quote.used, 0);
+ assert_int_equal(data.objects_quote.size, length);
+ assert_int_equal(data.contents_quote.used, 0);
+ assert_int_equal(data.contents_quote.size, length);
+ }
+
+ {
+ const f_status_t status = f_fss_set_quote_decrease_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, 0);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, 0);
+ assert_int_equal(data.objects_quote.used, 0);
+ assert_int_equal(data.objects_quote.size, 0);
+ assert_int_equal(data.contents_quote.used, 0);
+ assert_int_equal(data.contents_quote.size, 0);
+ }
+
+ assert_null(data.objects.array);
+ assert_null(data.contents.array);
+ assert_null(data.objects_quote.array);
+ assert_null(data.contents_quote.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test set quote decrease by in the fss project.
+ */
+#ifndef _TEST__F_fss__set_quote_decrease_by
+#define _TEST__F_fss__set_quote_decrease_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_set_quote_decrease_by()
+ */
+extern void test__f_fss_set_quote_decrease_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_set_quote_decrease_by()
+ */
+extern void test__f_fss_set_quote_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_set_quote_decrease_by()
+ */
+extern void test__f_fss_set_quote_decrease_by__works(void **state);
+
+#endif // _TEST__F_fss__set_quote_decrease_by
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-set_quote_increase.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_set_quote_increase__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_quote_increase(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, 0);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, 0);
+ assert_int_equal(data.objects_quote.used, 0);
+ assert_int_equal(data.objects_quote.size, 0);
+ assert_int_equal(data.contents_quote.used, 0);
+ assert_int_equal(data.contents_quote.size, 0);
+ }
+
+ free((void *) data.objects.array);
+ free((void *) data.contents.array);
+ free((void *) data.objects_quote.array);
+ free((void *) data.contents_quote.array);
+}
+
+void test__f_fss_set_quote_increase__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_quote_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, length);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, length);
+ assert_int_equal(data.objects_quote.used, 0);
+ assert_int_equal(data.objects_quote.size, length);
+ assert_int_equal(data.contents_quote.used, 0);
+ assert_int_equal(data.contents_quote.size, length);
+ }
+
+ {
+ const f_status_t status = f_fss_set_quote_increase(length, &data);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, length);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, length);
+ assert_int_equal(data.objects_quote.used, 0);
+ assert_int_equal(data.objects_quote.size, length);
+ assert_int_equal(data.contents_quote.used, 0);
+ assert_int_equal(data.contents_quote.size, length);
+ }
+
+ free((void *) data.objects.array);
+ free((void *) data.contents.array);
+ free((void *) data.objects_quote.array);
+ free((void *) data.contents_quote.array);
+}
+
+void test__f_fss_set_quote_increase__works(void **state) {
+
+ const int length = 5;
+ f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_quote_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, length);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, length);
+ assert_int_equal(data.objects_quote.used, 0);
+ assert_int_equal(data.objects_quote.size, length);
+ assert_int_equal(data.contents_quote.used, 0);
+ assert_int_equal(data.contents_quote.size, length);
+ }
+
+ {
+ data.objects.used = length;
+ data.contents.used = length;
+ data.objects_quote.used = length;
+ data.contents_quote.used = length;
+
+ const f_status_t status = f_fss_set_quote_increase(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.objects.used, length);
+ assert_in_range(data.objects.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ assert_int_equal(data.contents.used, length);
+ assert_in_range(data.contents.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ assert_int_equal(data.objects_quote.used, length);
+ assert_in_range(data.objects_quote.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ assert_int_equal(data.contents_quote.used, length);
+ assert_in_range(data.contents_quote.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ }
+
+ free((void *) data.objects.array);
+ free((void *) data.contents.array);
+ free((void *) data.objects_quote.array);
+ free((void *) data.contents_quote.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test set quote increase in the fss project.
+ */
+#ifndef _TEST__F_fss__set_quote_increase
+#define _TEST__F_fss__set_quote_increase
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_set_quote_increase()
+ */
+extern void test__f_fss_set_quote_increase__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_set_quote_increase()
+ */
+extern void test__f_fss_set_quote_increase__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_set_quote_increase()
+ */
+extern void test__f_fss_set_quote_increase__works(void **state);
+
+#endif // _TEST__F_fss__set_quote_increase
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-set_quote_increase_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_set_quote_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_quote_increase_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, 0);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, 0);
+ assert_int_equal(data.objects_quote.used, 0);
+ assert_int_equal(data.objects_quote.size, 0);
+ assert_int_equal(data.contents_quote.used, 0);
+ assert_int_equal(data.contents_quote.size, 0);
+ }
+
+ assert_null(data.objects.array);
+ assert_null(data.contents.array);
+ assert_null(data.objects_quote.array);
+ assert_null(data.contents_quote.array);
+}
+
+void test__f_fss_set_quote_increase_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_quote_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, length);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, length);
+ assert_int_equal(data.objects_quote.used, 0);
+ assert_int_equal(data.objects_quote.size, length);
+ assert_int_equal(data.contents_quote.used, 0);
+ assert_int_equal(data.contents_quote.size, length);
+ }
+
+ {
+ const f_status_t status = f_fss_set_quote_increase_by(0, &data);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, length);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, length);
+ assert_int_equal(data.objects_quote.used, 0);
+ assert_int_equal(data.objects_quote.size, length);
+ assert_int_equal(data.contents_quote.used, 0);
+ assert_int_equal(data.contents_quote.size, length);
+ }
+
+ free((void *) data.objects.array);
+ free((void *) data.contents.array);
+ free((void *) data.objects_quote.array);
+ free((void *) data.contents_quote.array);
+}
+
+void test__f_fss_set_quote_increase_by__works(void **state) {
+
+ const int length = 5;
+ f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_quote_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, length);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, length);
+ assert_int_equal(data.objects_quote.used, 0);
+ assert_int_equal(data.objects_quote.size, length);
+ assert_int_equal(data.contents_quote.used, 0);
+ assert_int_equal(data.contents_quote.size, length);
+ }
+
+ {
+ data.objects.used = length;
+ data.contents.used = length;
+ data.objects_quote.used = length;
+ data.contents_quote.used = length;
+
+ const f_status_t status = f_fss_set_quote_increase_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.objects.used, length);
+ assert_int_equal(data.objects.size, length * 2);
+ assert_int_equal(data.contents.used, length);
+ assert_int_equal(data.contents.size, length * 2);
+ assert_int_equal(data.objects_quote.used, length);
+ assert_int_equal(data.objects_quote.size, length * 2);
+ assert_int_equal(data.contents_quote.used, length);
+ assert_int_equal(data.contents_quote.size, length * 2);
+ }
+
+ free((void *) data.objects.array);
+ free((void *) data.contents.array);
+ free((void *) data.objects_quote.array);
+ free((void *) data.contents_quote.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test set quote increase by in the fss project.
+ */
+#ifndef _TEST__F_fss__set_quote_increase_by
+#define _TEST__F_fss__set_quote_increase_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_set_quote_increase_by()
+ */
+extern void test__f_fss_set_quote_increase_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_set_quote_increase_by()
+ */
+extern void test__f_fss_set_quote_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_set_quote_increase_by()
+ */
+extern void test__f_fss_set_quote_increase_by__works(void **state);
+
+#endif // _TEST__F_fss__set_quote_increase_by
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-set_quote_resize.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_set_quote_resize__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_quote_resize(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, 0);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, 0);
+ assert_int_equal(data.objects_quote.used, 0);
+ assert_int_equal(data.objects_quote.size, 0);
+ assert_int_equal(data.contents_quote.used, 0);
+ assert_int_equal(data.contents_quote.size, 0);
+ }
+
+ assert_null(data.objects.array);
+ assert_null(data.contents.array);
+ assert_null(data.objects_quote.array);
+ assert_null(data.contents_quote.array);
+}
+
+void test__f_fss_set_quote_resize__works(void **state) {
+
+ const int length = 5;
+ f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_quote_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, length);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, length);
+ assert_int_equal(data.objects_quote.used, 0);
+ assert_int_equal(data.objects_quote.size, length);
+ assert_int_equal(data.contents_quote.used, 0);
+ assert_int_equal(data.contents_quote.size, length);
+ }
+
+ free((void *) data.objects.array);
+ free((void *) data.contents.array);
+ free((void *) data.objects_quote.array);
+ free((void *) data.contents_quote.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test set quote resize in the fss project.
+ */
+#ifndef _TEST__F_fss__set_quote_resize
+#define _TEST__F_fss__set_quote_resize
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_set_quote_resize()
+ */
+extern void test__f_fss_set_quote_resize__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_set_quote_resize()
+ */
+extern void test__f_fss_set_quote_resize__works(void **state);
+
+#endif // _TEST__F_fss__set_quote_resize
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-set_quotes_adjust.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_set_quotes_adjust__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_set_quotes_t data = f_fss_set_quotes_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_quotes_adjust(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_fss_set_quotes_adjust__works(void **state) {
+
+ const int length = 5;
+ f_fss_set_quotes_t data = f_fss_set_quotes_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_quotes_adjust(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ free((void *) data.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test set quote adjust in the fss project.
+ */
+#ifndef _TEST__F_fss__set_quotes_adjust
+#define _TEST__F_fss__set_quotes_adjust
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_set_quotes_adjust()
+ */
+extern void test__f_fss_set_quotes_adjust__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_set_quotes_adjust()
+ */
+extern void test__f_fss_set_quotes_adjust__works(void **state);
+
+#endif // _TEST__F_fss__set_quotes_adjust
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-set_quotes_decimate_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_set_quotes_decimate_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_set_quotes_t data = f_fss_set_quotes_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_quotes_decimate_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_fss_set_quotes_decimate_by__returns_data_not(void **state) {
+
+ f_fss_set_quotes_t data = f_fss_set_quotes_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_quotes_decimate_by(0, &data);
+
+ assert_int_equal(status, F_data_not);
+ }
+}
+
+void test__f_fss_set_quotes_decimate_by__works(void **state) {
+
+ const int length = 5;
+ f_fss_set_quotes_t data = f_fss_set_quotes_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_quotes_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_fss_set_quotes_decimate_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test set quote decimate by in the fss project.
+ */
+#ifndef _TEST__F_fss__set_quotes_decimate_by
+#define _TEST__F_fss__set_quotes_decimate_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_set_quotes_decimate_by()
+ */
+extern void test__f_fss_set_quotes_decimate_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_set_quotes_decimate_by()
+ */
+extern void test__f_fss_set_quotes_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_set_quotes_decimate_by()
+ */
+extern void test__f_fss_set_quotes_decimate_by__works(void **state);
+
+#endif // _TEST__F_fss__set_quotes_decimate_by
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-set_quotes_decrease_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_set_quotes_decrease_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_set_quotes_t data = f_fss_set_quotes_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_quotes_decrease_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_fss_set_quotes_decrease_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fss_set_quotes_t data = f_fss_set_quotes_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_quotes_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_fss_set_quotes_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_fss_set_quotes_decrease_by__works(void **state) {
+
+ const int length = 5;
+ f_fss_set_quotes_t data = f_fss_set_quotes_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_quotes_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_fss_set_quotes_decrease_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test set quote decrease by in the fss project.
+ */
+#ifndef _TEST__F_fss__set_quotes_decrease_by
+#define _TEST__F_fss__set_quotes_decrease_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_set_quotes_decrease_by()
+ */
+extern void test__f_fss_set_quotes_decrease_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_set_quotes_decrease_by()
+ */
+extern void test__f_fss_set_quotes_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_set_quotes_decrease_by()
+ */
+extern void test__f_fss_set_quotes_decrease_by__works(void **state);
+
+#endif // _TEST__F_fss__set_quotes_decrease_by
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-set_quotes_increase.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_set_quotes_increase__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_set_quotes_t data = f_fss_set_quotes_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_quotes_increase(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ free((void *) data.array);
+}
+
+void test__f_fss_set_quotes_increase__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fss_set_quotes_t data = f_fss_set_quotes_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_quotes_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_fss_set_quotes_increase(length, &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_fss_set_quotes_increase__works(void **state) {
+
+ const int length = 5;
+ f_fss_set_quotes_t data = f_fss_set_quotes_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_quotes_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_fss_set_quotes_increase(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ }
+
+ free((void *) data.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test set quote increase in the fss project.
+ */
+#ifndef _TEST__F_fss__set_quotes_increase
+#define _TEST__F_fss__set_quotes_increase
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_set_quotes_increase()
+ */
+extern void test__f_fss_set_quotes_increase__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_set_quotes_increase()
+ */
+extern void test__f_fss_set_quotes_increase__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_set_quotes_increase()
+ */
+extern void test__f_fss_set_quotes_increase__works(void **state);
+
+#endif // _TEST__F_fss__set_quotes_increase
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-set_quotes_increase_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_set_quotes_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_set_quotes_t data = f_fss_set_quotes_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_quotes_increase_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_fss_set_quotes_increase_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fss_set_quotes_t data = f_fss_set_quotes_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_quotes_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_fss_set_quotes_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_fss_set_quotes_increase_by__works(void **state) {
+
+ const int length = 5;
+ f_fss_set_quotes_t data = f_fss_set_quotes_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_quotes_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_fss_set_quotes_increase_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_int_equal(data.size, length * 2);
+ }
+
+ free((void *) data.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test set quote increase by in the fss project.
+ */
+#ifndef _TEST__F_fss__set_quotes_increase_by
+#define _TEST__F_fss__set_quotes_increase_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_set_quotes_increase_by()
+ */
+extern void test__f_fss_set_quotes_increase_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_set_quotes_increase_by()
+ */
+extern void test__f_fss_set_quotes_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_set_quotes_increase_by()
+ */
+extern void test__f_fss_set_quotes_increase_by__works(void **state);
+
+#endif // _TEST__F_fss__set_quotes_increase_by
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-set_quotes_resize.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_set_quotes_resize__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_set_quotes_t data = f_fss_set_quotes_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_quotes_resize(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_fss_set_quotes_resize__works(void **state) {
+
+ const int length = 5;
+ f_fss_set_quotes_t data = f_fss_set_quotes_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_quotes_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ free((void *) data.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test set quote resize in the fss project.
+ */
+#ifndef _TEST__F_fss__set_quotes_resize
+#define _TEST__F_fss__set_quotes_resize
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_set_quotes_resize()
+ */
+extern void test__f_fss_set_quotes_resize__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_set_quotes_resize()
+ */
+extern void test__f_fss_set_quotes_resize__works(void **state);
+
+#endif // _TEST__F_fss__set_quotes_resize
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-set_resize.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_set_resize__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_set_t data = f_fss_set_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_resize(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, 0);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, 0);
+ }
+
+ assert_null(data.objects.array);
+ assert_null(data.contents.array);
+}
+
+void test__f_fss_set_resize__works(void **state) {
+
+ const int length = 5;
+ f_fss_set_t data = f_fss_set_t_initialize;
+
+ {
+ const f_status_t status = f_fss_set_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.objects.used, 0);
+ assert_int_equal(data.objects.size, length);
+ assert_int_equal(data.contents.used, 0);
+ assert_int_equal(data.contents.size, length);
+ }
+
+ free((void *) data.objects.array);
+ free((void *) data.contents.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test set resize in the fss project.
+ */
+#ifndef _TEST__F_fss__set_resize
+#define _TEST__F_fss__set_resize
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_set_resize()
+ */
+extern void test__f_fss_set_resize__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_set_resize()
+ */
+extern void test__f_fss_set_resize__works(void **state);
+
+#endif // _TEST__F_fss__set_resize
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-sets_adjust.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_sets_adjust__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_sets_t data = f_fss_sets_t_initialize;
+
+ {
+ const f_status_t status = f_fss_sets_adjust(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_fss_sets_adjust__works(void **state) {
+
+ const int length = 5;
+ f_fss_sets_t data = f_fss_sets_t_initialize;
+
+ {
+ const f_status_t status = f_fss_sets_adjust(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ free((void *) data.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test sets adjust in the fss project.
+ */
+#ifndef _TEST__F_fss__sets_adjust
+#define _TEST__F_fss__sets_adjust
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_sets_adjust()
+ */
+extern void test__f_fss_sets_adjust__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_sets_adjust()
+ */
+extern void test__f_fss_sets_adjust__works(void **state);
+
+#endif // _TEST__F_fss__sets_adjust
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-sets_decimate_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_sets_decimate_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_sets_t data = f_fss_sets_t_initialize;
+
+ {
+ const f_status_t status = f_fss_sets_decimate_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_fss_sets_decimate_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fss_sets_t data = f_fss_sets_t_initialize;
+
+ {
+ const f_status_t status = f_fss_sets_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_fss_sets_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_fss_sets_decimate_by__works(void **state) {
+
+ const int length = 5;
+ f_fss_sets_t data = f_fss_sets_t_initialize;
+
+ {
+ const f_status_t status = f_fss_sets_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_fss_sets_decimate_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test sets decimate by in the fss project.
+ */
+#ifndef _TEST__F_fss__sets_decimate_by
+#define _TEST__F_fss__sets_decimate_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_sets_decimate_by()
+ */
+extern void test__f_fss_sets_decimate_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_sets_decimate_by()
+ */
+extern void test__f_fss_sets_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_sets_decimate_by()
+ */
+extern void test__f_fss_sets_decimate_by__works(void **state);
+
+#endif // _TEST__F_fss__sets_decimate_by
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-sets_decrease_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_sets_decrease_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_sets_t data = f_fss_sets_t_initialize;
+
+ {
+ const f_status_t status = f_fss_sets_decrease_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_fss_sets_decrease_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fss_sets_t data = f_fss_sets_t_initialize;
+
+ {
+ const f_status_t status = f_fss_sets_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_fss_sets_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_fss_sets_decrease_by__works(void **state) {
+
+ const int length = 5;
+ f_fss_sets_t data = f_fss_sets_t_initialize;
+
+ {
+ const f_status_t status = f_fss_sets_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_fss_sets_decrease_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test sets decrease by in the fss project.
+ */
+#ifndef _TEST__F_fss__sets_decrease_by
+#define _TEST__F_fss__sets_decrease_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_sets_decrease_by()
+ */
+extern void test__f_fss_sets_decrease_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_sets_decrease_by()
+ */
+extern void test__f_fss_sets_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_sets_decrease_by()
+ */
+extern void test__f_fss_sets_decrease_by__works(void **state);
+
+#endif // _TEST__F_fss__sets_decrease_by
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-sets_increase.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_sets_increase__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_sets_t data = f_fss_sets_t_initialize;
+
+ {
+ const f_status_t status = f_fss_sets_increase(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ free((void *) data.array);
+}
+
+void test__f_fss_sets_increase__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fss_sets_t data = f_fss_sets_t_initialize;
+
+ {
+ const f_status_t status = f_fss_sets_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_fss_sets_increase(length, &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_fss_sets_increase__works(void **state) {
+
+ const int length = 5;
+ f_fss_sets_t data = f_fss_sets_t_initialize;
+
+ {
+ const f_status_t status = f_fss_sets_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_fss_sets_increase(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ }
+
+ free((void *) data.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test sets increase in the fss project.
+ */
+#ifndef _TEST__F_fss__sets_increase
+#define _TEST__F_fss__sets_increase
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_sets_increase()
+ */
+extern void test__f_fss_sets_increase__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_sets_increase()
+ */
+extern void test__f_fss_sets_increase__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_sets_increase()
+ */
+extern void test__f_fss_sets_increase__works(void **state);
+
+#endif // _TEST__F_fss__sets_increase
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-sets_increase_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_sets_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_sets_t data = f_fss_sets_t_initialize;
+
+ {
+ const f_status_t status = f_fss_sets_increase_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_fss_sets_increase_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fss_sets_t data = f_fss_sets_t_initialize;
+
+ {
+ const f_status_t status = f_fss_sets_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_fss_sets_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_fss_sets_increase_by__works(void **state) {
+
+ const int length = 5;
+ f_fss_sets_t data = f_fss_sets_t_initialize;
+
+ {
+ const f_status_t status = f_fss_sets_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_fss_sets_increase_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_int_equal(data.size, length * 2);
+ }
+
+ free((void *) data.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test sets increase by in the fss project.
+ */
+#ifndef _TEST__F_fss__sets_increase_by
+#define _TEST__F_fss__sets_increase_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_sets_increase_by()
+ */
+extern void test__f_fss_sets_increase_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_sets_increase_by()
+ */
+extern void test__f_fss_sets_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_sets_increase_by()
+ */
+extern void test__f_fss_sets_increase_by__works(void **state);
+
+#endif // _TEST__F_fss__sets_increase_by
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-sets_resize.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_sets_resize__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fss_sets_t data = f_fss_sets_t_initialize;
+
+ {
+ const f_status_t status = f_fss_sets_resize(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_fss_sets_resize__works(void **state) {
+
+ const int length = 5;
+ f_fss_sets_t data = f_fss_sets_t_initialize;
+
+ {
+ const f_status_t status = f_fss_sets_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ free((void *) data.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test sets resize by in the fss project.
+ */
+#ifndef _TEST__F_fss__sets_resize
+#define _TEST__F_fss__sets_resize
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_sets_resize()
+ */
+extern void test__f_fss_sets_resize__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_sets_resize()
+ */
+extern void test__f_fss_sets_resize__works(void **state);
+
+#endif // _TEST__F_fss__sets_resize
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-skip_past_delimit.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_skip_past_delimit__parameter_checking(void **state) {
+
+ const f_string_static_t test = macro_f_string_static_t_initialize("test", 0, 4);
+ f_state_t state_data = f_state_t_initialize;
+
+ {
+ const f_status_t status = f_fss_skip_past_delimit(state_data, test, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_fss_skip_past_delimit__returns_data_not(void **state) {
+
+ const f_string_static_t test = macro_f_string_static_t_initialize("test", 0, 4);
+ f_state_t state_data = f_state_t_initialize;
+
+ {
+ f_string_range_t range = f_string_range_t_initialize;
+
+ const f_status_t status = f_fss_skip_past_delimit(state_data, f_string_empty_s, &range);
+
+ assert_int_equal(status, F_data_not);
+ }
+
+ {
+ f_string_range_t range = f_string_range_t_initialize;
+
+ const f_status_t status = f_fss_skip_past_delimit(state_data, test, &range);
+
+ assert_int_equal(status, F_data_not);
+ }
+
+ {
+ f_string_range_t range = macro_f_string_range_t_initialize(0, test.used - 1);
+
+ const f_status_t status = f_fss_skip_past_delimit(state_data, f_string_empty_s, &range);
+
+ assert_int_equal(status, F_data_not);
+ }
+
+ {
+ f_string_range_t range = macro_f_string_range_t_initialize(test.used, test.used + 2);
+
+ const f_status_t status = f_fss_skip_past_delimit(state_data, test, &range);
+
+ assert_int_equal(status, F_data_not);
+ }
+}
+
+void test__f_fss_skip_past_delimit__works(void **state) {
+
+ f_state_t state_data = f_state_t_initialize;
+
+ f_string_static_t tests[] = {
+ macro_f_string_static_t_initialize("test", 0, 4),
+ macro_f_string_static_t_initialize("\0test", 0, 5),
+ macro_f_string_static_t_initialize("\0\0\0test", 0, 7),
+ macro_f_string_static_t_initialize("\0\0\0test\0\0", 0, 9),
+ };
+
+ f_array_length_t expects[] = {
+ 0,
+ 1,
+ 3,
+ 3,
+ };
+
+ for (uint8_t i = 0; i < 4; ++i) {
+
+ f_string_range_t range = macro_f_string_range_t_initialize(0, tests[i].used - 1);
+
+ const f_status_t status = f_fss_skip_past_delimit(state_data, tests[i], &range);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(range.start, expects[i]);
+ } // for
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test skip past delimit in the fss project.
+ */
+#ifndef _TEST__F_fss__skip_past_delimit
+#define _TEST__F_fss__skip_past_delimit
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_skip_past_delimit()
+ */
+extern void test__f_fss_skip_past_delimit__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_skip_past_delimit()
+ */
+extern void test__f_fss_skip_past_delimit__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_skip_past_delimit()
+ */
+extern void test__f_fss_skip_past_delimit__works(void **state);
+
+#endif // _TEST__F_fss__skip_past_delimit
--- /dev/null
+#include "test-fss.h"
+#include "test-fss-skip_past_space.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_skip_past_space__parameter_checking(void **state) {
+
+ const f_string_static_t test = macro_f_string_static_t_initialize("test", 0, 4);
+ f_state_t state_data = f_state_t_initialize;
+
+ {
+ const f_status_t status = f_fss_skip_past_space(state_data, test, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_fss_skip_past_space__returns_data_not(void **state) {
+
+ const f_string_static_t test = macro_f_string_static_t_initialize("test", 0, 4);
+ f_state_t state_data = f_state_t_initialize;
+
+ {
+ f_string_range_t range = f_string_range_t_initialize;
+
+ const f_status_t status = f_fss_skip_past_space(state_data, f_string_empty_s, &range);
+
+ assert_int_equal(status, F_data_not);
+ }
+
+ {
+ f_string_range_t range = f_string_range_t_initialize;
+
+ const f_status_t status = f_fss_skip_past_space(state_data, test, &range);
+
+ assert_int_equal(status, F_data_not);
+ }
+
+ {
+ f_string_range_t range = macro_f_string_range_t_initialize(0, test.used - 1);
+
+ const f_status_t status = f_fss_skip_past_space(state_data, f_string_empty_s, &range);
+
+ assert_int_equal(status, F_data_not);
+ }
+
+ {
+ f_string_range_t range = macro_f_string_range_t_initialize(test.used, test.used + 2);
+
+ const f_status_t status = f_fss_skip_past_space(state_data, test, &range);
+
+ assert_int_equal(status, F_data_not);
+ }
+}
+
+void test__f_fss_skip_past_space__works(void **state) {
+
+ f_state_t state_data = f_state_t_initialize;
+
+ f_string_static_t tests[] = {
+ macro_f_string_static_t_initialize("test", 0, 4),
+ macro_f_string_static_t_initialize(" test", 0, 5),
+ macro_f_string_static_t_initialize(" test", 0, 7),
+ macro_f_string_static_t_initialize(" \0test ", 0, 9),
+ macro_f_string_static_t_initialize(" \t\atest ", 0, 9),
+ macro_f_string_static_t_initialize("\a\t $test ", 0, 10),
+ macro_f_string_static_t_initialize(" ́test", 0, 7),
+ };
+
+ f_array_length_t expects[] = {
+ 0,
+ 1,
+ 3,
+ 3,
+ 3,
+ 3,
+ 3,
+ };
+
+ for (uint8_t i = 0; i < 7; ++i) {
+
+ f_string_range_t range = macro_f_string_range_t_initialize(0, tests[i].used - 1);
+
+ const f_status_t status = f_fss_skip_past_space(state_data, tests[i], &range);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(range.start, expects[i]);
+ } // for
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test skip past space in the fss project.
+ */
+#ifndef _TEST__F_fss__skip_past_space
+#define _TEST__F_fss__skip_past_space
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_fss_skip_past_space()
+ */
+extern void test__f_fss_skip_past_space__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_fss_skip_past_space()
+ */
+extern void test__f_fss_skip_past_space__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_skip_past_space()
+ */
+extern void test__f_fss_skip_past_space__works(void **state);
+
+#endif // _TEST__F_fss__skip_past_space
--- /dev/null
+#include "test-fss.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int setup(void **state) {
+
+ return 0;
+}
+
+int setdown(void **state) {
+
+ errno = 0;
+
+ return 0;
+}
+
+int main(void) {
+
+ const struct CMUnitTest tests[] = {
+ cmocka_unit_test(test__f_fss_apply_delimit__returns_data_not),
+ cmocka_unit_test(test__f_fss_apply_delimit_range__returns_data_not),
+ cmocka_unit_test(test__f_fss_count_lines__returns_data_not),
+ cmocka_unit_test(test__f_fss_count_lines_range__returns_data_not),
+ cmocka_unit_test(test__f_fss_seek_to_eol__returns_data_not),
+ cmocka_unit_test(test__f_fss_skip_past_delimit__returns_data_not),
+ cmocka_unit_test(test__f_fss_skip_past_space__returns_data_not),
+
+ cmocka_unit_test(test__f_fss_apply_delimit__works),
+ cmocka_unit_test(test__f_fss_apply_delimit_range__works),
+ cmocka_unit_test(test__f_fss_count_lines__works),
+ cmocka_unit_test(test__f_fss_count_lines_range__works),
+ cmocka_unit_test(test__f_fss_is_combining__works),
+ cmocka_unit_test(test__f_fss_is_graph__works),
+ cmocka_unit_test(test__f_fss_is_space__works),
+ cmocka_unit_test(test__f_fss_is_zero_width__works),
+ cmocka_unit_test(test__f_fss_seek_to_eol__works),
+ cmocka_unit_test(test__f_fss_skip_past_delimit__works),
+ cmocka_unit_test(test__f_fss_skip_past_space__works),
+
+ cmocka_unit_test(test__f_fss_fail_utf__works_for_error),
+ cmocka_unit_test(test__f_fss_fail_utf_to_false__works_for_error),
+
+ cmocka_unit_test(test__f_fss_fail_utf__works_for_no_error),
+ cmocka_unit_test(test__f_fss_fail_utf_to_false__works_for_no_error),
+
+ cmocka_unit_test(test__f_fss_items_decimate_by__returns_data_not),
+ cmocka_unit_test(test__f_fss_items_decrease_by__returns_data_not),
+ cmocka_unit_test(test__f_fss_items_increase__returns_data_not),
+ cmocka_unit_test(test__f_fss_items_increase_by__returns_data_not),
+
+ cmocka_unit_test(test__f_fss_named_decimate_by__returns_data_not),
+ cmocka_unit_test(test__f_fss_named_decrease_by__returns_data_not),
+ cmocka_unit_test(test__f_fss_named_increase__returns_data_not),
+ cmocka_unit_test(test__f_fss_named_increase_by__returns_data_not),
+
+ cmocka_unit_test(test__f_fss_nameds_decimate_by__returns_data_not),
+ cmocka_unit_test(test__f_fss_nameds_decrease_by__returns_data_not),
+ cmocka_unit_test(test__f_fss_nameds_increase__returns_data_not),
+ cmocka_unit_test(test__f_fss_nameds_increase_by__returns_data_not),
+
+ cmocka_unit_test(test__f_fss_nest_decimate_by__returns_data_not),
+ cmocka_unit_test(test__f_fss_nest_decrease_by__returns_data_not),
+ cmocka_unit_test(test__f_fss_nest_increase__returns_data_not),
+ cmocka_unit_test(test__f_fss_nest_increase_by__returns_data_not),
+
+ cmocka_unit_test(test__f_fss_nests_decimate_by__returns_data_not),
+ cmocka_unit_test(test__f_fss_nests_decrease_by__returns_data_not),
+ cmocka_unit_test(test__f_fss_nests_increase__returns_data_not),
+ cmocka_unit_test(test__f_fss_nests_increase_by__returns_data_not),
+
+ cmocka_unit_test(test__f_fss_set_decimate_by__returns_data_not),
+ cmocka_unit_test(test__f_fss_set_decrease_by__returns_data_not),
+ cmocka_unit_test(test__f_fss_set_increase__returns_data_not),
+ cmocka_unit_test(test__f_fss_set_increase_by__returns_data_not),
+
+ cmocka_unit_test(test__f_fss_set_quote_decimate_by__returns_data_not),
+ cmocka_unit_test(test__f_fss_set_quote_decrease_by__returns_data_not),
+ cmocka_unit_test(test__f_fss_set_quote_increase__returns_data_not),
+ cmocka_unit_test(test__f_fss_set_quote_increase_by__returns_data_not),
+
+ cmocka_unit_test(test__f_fss_set_quotes_decimate_by__returns_data_not),
+ cmocka_unit_test(test__f_fss_set_quotes_decrease_by__returns_data_not),
+ cmocka_unit_test(test__f_fss_set_quotes_increase__returns_data_not),
+ cmocka_unit_test(test__f_fss_set_quotes_increase_by__returns_data_not),
+
+ cmocka_unit_test(test__f_fss_sets_decimate_by__returns_data_not),
+ cmocka_unit_test(test__f_fss_sets_decrease_by__returns_data_not),
+ cmocka_unit_test(test__f_fss_sets_increase__returns_data_not),
+ cmocka_unit_test(test__f_fss_sets_increase_by__returns_data_not),
+
+ #ifndef _di_level_0_parameter_checking_
+ cmocka_unit_test(test__f_fss_apply_delimit__parameter_checking),
+ cmocka_unit_test(test__f_fss_apply_delimit_range__parameter_checking),
+ cmocka_unit_test(test__f_fss_count_lines__parameter_checking),
+ cmocka_unit_test(test__f_fss_count_lines_range__parameter_checking),
+ // f_fss_fail_utf() doesn't use parameter checking.
+ // f_fss_fail_utf_false() doesn't use parameter checking.
+ // f_fss_is_combining() doesn't use parameter checking.
+ // f_fss_is_graph() doesn't use parameter checking.
+ // f_fss_is_space() doesn't use parameter checking.
+ // f_fss_is_zero_width() doesn't use parameter checking.
+ cmocka_unit_test(test__f_fss_seek_to_eol__parameter_checking),
+ cmocka_unit_test(test__f_fss_skip_past_delimit__parameter_checking),
+ cmocka_unit_test(test__f_fss_skip_past_space__parameter_checking),
+
+ cmocka_unit_test(test__f_fss_items_adjust__parameter_checking),
+ cmocka_unit_test(test__f_fss_items_decimate_by__parameter_checking),
+ cmocka_unit_test(test__f_fss_items_decrease_by__parameter_checking),
+ cmocka_unit_test(test__f_fss_items_increase__parameter_checking),
+ cmocka_unit_test(test__f_fss_items_increase_by__parameter_checking),
+ cmocka_unit_test(test__f_fss_items_resize__parameter_checking),
+
+ cmocka_unit_test(test__f_fss_named_adjust__parameter_checking),
+ cmocka_unit_test(test__f_fss_named_decimate_by__parameter_checking),
+ cmocka_unit_test(test__f_fss_named_decrease_by__parameter_checking),
+ cmocka_unit_test(test__f_fss_named_increase__parameter_checking),
+ cmocka_unit_test(test__f_fss_named_increase_by__parameter_checking),
+ cmocka_unit_test(test__f_fss_named_resize__parameter_checking),
+
+ cmocka_unit_test(test__f_fss_nameds_adjust__parameter_checking),
+ cmocka_unit_test(test__f_fss_nameds_decimate_by__parameter_checking),
+ cmocka_unit_test(test__f_fss_nameds_decrease_by__parameter_checking),
+ cmocka_unit_test(test__f_fss_nameds_increase__parameter_checking),
+ cmocka_unit_test(test__f_fss_nameds_increase_by__parameter_checking),
+ cmocka_unit_test(test__f_fss_nameds_resize__parameter_checking),
+
+ cmocka_unit_test(test__f_fss_nest_adjust__parameter_checking),
+ cmocka_unit_test(test__f_fss_nest_decimate_by__parameter_checking),
+ cmocka_unit_test(test__f_fss_nest_decrease_by__parameter_checking),
+ cmocka_unit_test(test__f_fss_nest_increase__parameter_checking),
+ cmocka_unit_test(test__f_fss_nest_increase_by__parameter_checking),
+ cmocka_unit_test(test__f_fss_nest_resize__parameter_checking),
+
+ cmocka_unit_test(test__f_fss_nests_adjust__parameter_checking),
+ cmocka_unit_test(test__f_fss_nests_decimate_by__parameter_checking),
+ cmocka_unit_test(test__f_fss_nests_decrease_by__parameter_checking),
+ cmocka_unit_test(test__f_fss_nests_increase__parameter_checking),
+ cmocka_unit_test(test__f_fss_nests_increase_by__parameter_checking),
+ cmocka_unit_test(test__f_fss_nests_resize__parameter_checking),
+
+ cmocka_unit_test(test__f_fss_set_adjust__parameter_checking),
+ cmocka_unit_test(test__f_fss_set_decimate_by__parameter_checking),
+ cmocka_unit_test(test__f_fss_set_decrease_by__parameter_checking),
+ cmocka_unit_test(test__f_fss_set_increase__parameter_checking),
+ cmocka_unit_test(test__f_fss_set_increase_by__parameter_checking),
+ cmocka_unit_test(test__f_fss_set_resize__parameter_checking),
+
+ cmocka_unit_test(test__f_fss_set_quote_adjust__parameter_checking),
+ cmocka_unit_test(test__f_fss_set_quote_decimate_by__parameter_checking),
+ cmocka_unit_test(test__f_fss_set_quote_decrease_by__parameter_checking),
+ cmocka_unit_test(test__f_fss_set_quote_increase__parameter_checking),
+ cmocka_unit_test(test__f_fss_set_quote_increase_by__parameter_checking),
+ cmocka_unit_test(test__f_fss_set_quote_resize__parameter_checking),
+
+ cmocka_unit_test(test__f_fss_set_quotes_adjust__parameter_checking),
+ cmocka_unit_test(test__f_fss_set_quotes_decimate_by__parameter_checking),
+ cmocka_unit_test(test__f_fss_set_quotes_decrease_by__parameter_checking),
+ cmocka_unit_test(test__f_fss_set_quotes_increase__parameter_checking),
+ cmocka_unit_test(test__f_fss_set_quotes_increase_by__parameter_checking),
+ cmocka_unit_test(test__f_fss_set_quotes_resize__parameter_checking),
+
+ cmocka_unit_test(test__f_fss_sets_adjust__parameter_checking),
+ cmocka_unit_test(test__f_fss_sets_decimate_by__parameter_checking),
+ cmocka_unit_test(test__f_fss_sets_decrease_by__parameter_checking),
+ cmocka_unit_test(test__f_fss_sets_increase__parameter_checking),
+ cmocka_unit_test(test__f_fss_sets_increase_by__parameter_checking),
+ cmocka_unit_test(test__f_fss_sets_resize__parameter_checking),
+ #endif // _di_level_0_parameter_checking_
+ };
+
+ return cmocka_run_group_tests(tests, setup, setdown);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the fss project.
+ */
+#ifndef _TEST__F_fss_h
+#define _TEST__F_fss_h
+
+// Libc includes.
+#include <stdarg.h>
+#include <stddef.h>
+#include <setjmp.h>
+#include <stdint.h>
+
+// cmocka includes.
+#include <cmocka.h>
+
+// FLL-0 includes.
+#include <fll/level_0/fss.h>
+
+// Mock includes.
+#include "mock-fss.h"
+
+// Test includes.
+#include "test-fss-apply_delimit.h"
+#include "test-fss-apply_delimit_range.h"
+#include "test-fss-count_lines.h"
+#include "test-fss-count_lines_range.h"
+#include "test-fss-fail_utf.h"
+#include "test-fss-fail_utf_to_false.h"
+#include "test-fss-is_combining.h"
+#include "test-fss-is_graph.h"
+#include "test-fss-is_space.h"
+#include "test-fss-is_zero_width.h"
+#include "test-fss-items_adjust.h"
+#include "test-fss-items_decimate_by.h"
+#include "test-fss-items_decrease_by.h"
+#include "test-fss-items_increase.h"
+#include "test-fss-items_increase_by.h"
+#include "test-fss-items_resize.h"
+#include "test-fss-named_adjust.h"
+#include "test-fss-named_decimate_by.h"
+#include "test-fss-named_decrease_by.h"
+#include "test-fss-named_increase.h"
+#include "test-fss-named_increase_by.h"
+#include "test-fss-named_resize.h"
+#include "test-fss-nameds_adjust.h"
+#include "test-fss-nameds_decimate_by.h"
+#include "test-fss-nameds_decrease_by.h"
+#include "test-fss-nameds_increase.h"
+#include "test-fss-nameds_increase_by.h"
+#include "test-fss-nameds_resize.h"
+#include "test-fss-nest_adjust.h"
+#include "test-fss-nest_decimate_by.h"
+#include "test-fss-nest_decrease_by.h"
+#include "test-fss-nest_increase.h"
+#include "test-fss-nest_increase_by.h"
+#include "test-fss-nest_resize.h"
+#include "test-fss-nests_adjust.h"
+#include "test-fss-nests_decimate_by.h"
+#include "test-fss-nests_decrease_by.h"
+#include "test-fss-nests_increase.h"
+#include "test-fss-nests_increase_by.h"
+#include "test-fss-nests_resize.h"
+#include "test-fss-seek_to_eol.h"
+#include "test-fss-set_adjust.h"
+#include "test-fss-set_decimate_by.h"
+#include "test-fss-set_decrease_by.h"
+#include "test-fss-set_increase.h"
+#include "test-fss-set_increase_by.h"
+#include "test-fss-set_resize.h"
+#include "test-fss-set_quote_adjust.h"
+#include "test-fss-set_quote_decimate_by.h"
+#include "test-fss-set_quote_decrease_by.h"
+#include "test-fss-set_quote_increase.h"
+#include "test-fss-set_quote_increase_by.h"
+#include "test-fss-set_quote_resize.h"
+#include "test-fss-set_quotes_adjust.h"
+#include "test-fss-set_quotes_decimate_by.h"
+#include "test-fss-set_quotes_decrease_by.h"
+#include "test-fss-set_quotes_increase.h"
+#include "test-fss-set_quotes_increase_by.h"
+#include "test-fss-set_quotes_resize.h"
+#include "test-fss-sets_adjust.h"
+#include "test-fss-sets_decimate_by.h"
+#include "test-fss-sets_decrease_by.h"
+#include "test-fss-sets_increase.h"
+#include "test-fss-sets_increase_by.h"
+#include "test-fss-sets_resize.h"
+#include "test-fss-skip_past_delimit.h"
+#include "test-fss-skip_past_space.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Perform any setup operations.
+ *
+ * @param state
+ * The test state.
+ *
+ * @return
+ * The status of this function, where 0 means success.
+ */
+extern int setup(void **state);
+
+/**
+ * Peform any setdown operations.
+ *
+ * @param state
+ * The test state.
+ *
+ * @return
+ * The status of this function, where 0 means success.
+ */
+extern int setdown(void **state);
+
+/**
+ * Run all tests.
+ *
+ * @return
+ * The final result of the tests.
+ *
+ * @see cmocka_run_group_tests()
+ * @see cmocka_unit_test()
+ */
+extern int main(void);
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _TEST__F_fss_h