--- /dev/null
+#include "mock-limit.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int __wrap_prlimit(pid_t pid, int resource, const struct rlimit *new_limit, struct rlimit *old_limit) {
+
+ const bool failure = mock_type(bool);
+
+ if (failure) {
+ errno = mock_type(int);
+
+ return -1;
+ }
+
+ if (old_limit) {
+ struct rlimit *mocked_limit = mock_type(struct rlimit *);
+
+ old_limit->rlim_cur = mocked_limit->rlim_cur;
+ old_limit->rlim_max = mocked_limit->rlim_max;
+ }
+
+ return mock_type(int);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Limit
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the limit project.
+ */
+#ifndef _MOCK__limit_h
+#define _MOCK__limit_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/limit.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+const static int mock_errno_generic = 32767;
+
+extern int __wrap_prlimit(pid_t pid, int resource, const struct rlimit *new_limit, struct rlimit *old_limit);
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _MOCK__limit_h
--- /dev/null
+#include "test-limit.h"
+#include "test-limit-process.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_limit_process__fails(void **state) {
+
+ const f_limit_value_t value = f_limit_value_t_initialize;
+
+ int errnos[] = {
+ EFAULT,
+ EINVAL,
+ EPERM,
+ ESRCH,
+ mock_errno_generic,
+ };
+
+ f_status_t statuss[] = {
+ F_address_not,
+ F_parameter,
+ F_prohibited,
+ F_found_not,
+ F_failure,
+ };
+
+ for (int i = 0; i < 5; ++i) {
+
+ will_return(__wrap_prlimit, true);
+ will_return(__wrap_prlimit, errnos[i]);
+
+ const f_status_t status = f_limit_process(1, 1, &value, 0);
+
+ assert_int_equal(status, F_status_set_error(statuss[i]));
+ } // for
+}
+
+#ifndef _di_level_0_parameter_checking_
+ void test__f_limit_process__parameter_checking(void **state) {
+
+ {
+ const f_status_t status = f_limit_process(1, 1, 0, 0);
+
+ assert_int_equal(F_status_set_fine(status), F_parameter);
+ }
+ }
+#endif // _di_level_0_parameter_checking_
+
+void test__f_limit_process__works(void **state) {
+
+ const f_limit_value_t value = macro_f_limit_value_t_initialize(1, 2);
+ f_limit_value_t destination = f_limit_value_t_initialize;
+
+ {
+ will_return(__wrap_prlimit, F_false);
+ will_return(__wrap_prlimit, &value);
+ will_return(__wrap_prlimit, 0);
+
+ const f_status_t status = f_limit_process(1, 1, &value, &destination);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(destination.rlim_cur, value.rlim_cur);
+ assert_int_equal(destination.rlim_max, value.rlim_max);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Limit
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the limit project.
+ */
+#ifndef _TEST__F_limit_process_h
+#define _TEST__F_limit_process_h
+
+/**
+ * Test that function fails.
+ *
+ * @see f_limit_process()
+ */
+extern void test__f_limit_process__fails(void **state);
+
+/**
+ * Test that parameter checking works as expected.
+ *
+ * @see f_limit_process()
+ */
+#ifndef _di_level_0_parameter_checking_
+ extern void test__f_limit_process__parameter_checking(void **state);
+#endif // _di_level_0_parameter_checking_
+
+/**
+ * Test that function works.
+ *
+ * @see f_limit_process()
+ */
+extern void test__f_limit_process__works(void **state);
+
+#endif // _TEST__F_limit_process_h
--- /dev/null
+#include "test-limit.h"
+#include "test-limit-sets_adjust.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_limit_sets_adjust__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_limit_sets_t data = f_limit_sets_t_initialize;
+
+ {
+ const f_status_t status = f_limit_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_limit_sets_adjust__works(void **state) {
+
+ const int length = 5;
+ f_limit_sets_t data = f_limit_sets_t_initialize;
+
+ {
+ const f_status_t status = f_limit_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: Limit
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the limit project.
+ */
+#ifndef _TEST__F_limit__sets_adjust
+#define _TEST__F_limit__sets_adjust
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_limit_sets_adjust()
+ */
+extern void test__f_limit_sets_adjust__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_limit_sets_adjust()
+ */
+extern void test__f_limit_sets_adjust__works(void **state);
+
+#endif // _TEST__F_limit__sets_adjust
--- /dev/null
+#include "test-limit.h"
+#include "test-limit-sets_append.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_limit_sets_append__parameter_checking(void **state) {
+
+ const f_limit_set_t data = f_limit_set_t_initialize;
+
+ {
+ const f_status_t status = f_limit_sets_append(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_limit_sets_append__works(void **state) {
+
+ const f_limit_set_t source = macro_f_limit_set_t_initialize(1, macro_f_limit_value_t_initialize(2, 3));
+ f_limit_sets_t destination = f_limit_sets_t_initialize;
+
+ {
+ const f_status_t status = f_limit_sets_append(source, &destination);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(destination.used, 1);
+ assert_int_equal(destination.array[0].type, source.type);
+ assert_int_equal(destination.array[0].value.rlim_cur, source.value.rlim_cur);
+ assert_int_equal(destination.array[0].value.rlim_max, source.value.rlim_max);
+ }
+
+ free((void *) destination.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Limit
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the limit project.
+ */
+#ifndef _TEST__F_limit__sets_append
+#define _TEST__F_limit__sets_append
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_limit_sets_append()
+ */
+extern void test__f_limit_sets_append__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_limit_sets_append()
+ */
+extern void test__f_limit_sets_append__works(void **state);
+
+#endif // _TEST__F_limit__sets_append
--- /dev/null
+#include "test-limit.h"
+#include "test-limit-sets_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_limit_sets_append_all__parameter_checking(void **state) {
+
+ const f_limit_sets_t data = f_limit_sets_t_initialize;
+
+ {
+ const f_status_t status = f_limit_sets_append_all(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_limit_sets_append_all__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_limit_sets_t source = f_limit_sets_t_initialize;
+ f_limit_sets_t destination = f_limit_sets_t_initialize;
+
+ {
+ const f_status_t status = f_limit_sets_resize(length, &source);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(source.used, 0);
+ assert_int_equal(source.size, length);
+ }
+
+ {
+ const f_status_t status = f_limit_sets_append_all(source, &destination);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(destination.used, 0);
+ assert_int_equal(destination.size, 0);
+ assert_null(destination.array);
+ }
+
+ free((void *) source.array);
+}
+
+void test__f_limit_sets_append_all__works(void **state) {
+
+ const int length = 5;
+ const int length_used = 2;
+ f_limit_sets_t source = f_limit_sets_t_initialize;
+ f_limit_sets_t destination = f_limit_sets_t_initialize;
+
+ {
+ const f_status_t status = f_limit_sets_resize(length, &source);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(source.used, 0);
+ assert_int_equal(source.size, length);
+ }
+
+ for (; source.used < length_used; ++source.used) {
+
+ source.array[source.used].type = source.used + 1;
+ source.array[source.used].value.rlim_cur = source.used + 2;
+ source.array[source.used].value.rlim_max = source.used + 3;
+ } // for
+ {
+ const f_status_t status = f_limit_sets_append_all(source, &destination);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(destination.used, source.used);
+ assert_int_equal(destination.size, source.used);
+
+ for (f_array_length_t i = 0; i < source.used; ++i) {
+
+ assert_int_equal(destination.array[i].type, i + 1);
+ assert_int_equal(destination.array[i].value.rlim_cur, i + 2);
+ assert_int_equal(destination.array[i].value.rlim_max, i + 3);
+ } // for
+ }
+
+ free((void *) source.array);
+ free((void *) destination.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Limit
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the limit project.
+ */
+#ifndef _TEST__F_limit__sets_append_all
+#define _TEST__F_limit__sets_append_all
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_limit_sets_append_all()
+ */
+extern void test__f_limit_sets_append_all__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_limit_sets_append_all()
+ */
+extern void test__f_limit_sets_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_limit_sets_append_all()
+ */
+extern void test__f_limit_sets_append_all__works(void **state);
+
+#endif // _TEST__F_limit__sets_append_all
--- /dev/null
+#include "test-limit.h"
+#include "test-limit-sets_decimate_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_limit_sets_decimate_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_limit_sets_t data = f_limit_sets_t_initialize;
+
+ {
+ const f_status_t status = f_limit_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_limit_sets_decimate_by__works(void **state) {
+
+ const int length = 5;
+ f_limit_sets_t data = f_limit_sets_t_initialize;
+
+ {
+ const f_status_t status = f_limit_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_limit_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: Limit
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the limit project.
+ */
+#ifndef _TEST__F_limit__sets_decimate_by
+#define _TEST__F_limit__sets_decimate_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_limit_sets_decimate_by()
+ */
+extern void test__f_limit_sets_decimate_by__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_limit_sets_decimate_by()
+ */
+extern void test__f_limit_sets_decimate_by__works(void **state);
+
+#endif // _TEST__F_limit__sets_decimate_by
--- /dev/null
+#include "test-limit.h"
+#include "test-limit-sets_decrease_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_limit_sets_decrease_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_limit_sets_t data = f_limit_sets_t_initialize;
+
+ {
+ const f_status_t status = f_limit_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_limit_sets_decrease_by__works(void **state) {
+
+ const int length = 5;
+ f_limit_sets_t data = f_limit_sets_t_initialize;
+
+ {
+ const f_status_t status = f_limit_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_limit_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: Limit
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the limit project.
+ */
+#ifndef _TEST__F_limit__sets_decrease_by
+#define _TEST__F_limit__sets_decrease_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_limit_sets_decrease_by()
+ */
+extern void test__f_limit_sets_decrease_by__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_limit_sets_decrease_by()
+ */
+extern void test__f_limit_sets_decrease_by__works(void **state);
+
+#endif // _TEST__F_limit__sets_decrease_by
--- /dev/null
+#include "test-limit.h"
+#include "test-limit-sets_increase.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_limit_sets_increase__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_limit_sets_t data = f_limit_sets_t_initialize;
+
+ {
+ const f_status_t status = f_limit_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_limit_sets_increase__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_limit_sets_t data = f_limit_sets_t_initialize;
+
+ {
+ const f_status_t status = f_limit_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_limit_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_limit_sets_increase__works(void **state) {
+
+ const int length = 5;
+ f_limit_sets_t data = f_limit_sets_t_initialize;
+
+ {
+ const f_status_t status = f_limit_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_limit_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: Limit
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the limit project.
+ */
+#ifndef _TEST__F_limit__sets_increase
+#define _TEST__F_limit__sets_increase
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_limit_sets_increase()
+ */
+extern void test__f_limit_sets_increase__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_limit_sets_increase()
+ */
+extern void test__f_limit_sets_increase__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_limit_sets_increase()
+ */
+extern void test__f_limit_sets_increase__works(void **state);
+
+#endif // _TEST__F_limit__sets_increase
--- /dev/null
+#include "test-limit.h"
+#include "test-limit-sets_increase_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_limit_sets_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_limit_sets_t data = f_limit_sets_t_initialize;
+
+ {
+ const f_status_t status = f_limit_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_limit_sets_increase_by__works(void **state) {
+
+ const int length = 5;
+ f_limit_sets_t data = f_limit_sets_t_initialize;
+
+ {
+ const f_status_t status = f_limit_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_limit_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: Limit
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the limit project.
+ */
+#ifndef _TEST__F_limit__sets_increase_by
+#define _TEST__F_limit__sets_increase_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_limit_sets_increase_by()
+ */
+extern void test__f_limit_sets_increase_by__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_limit_sets_increase_by()
+ */
+extern void test__f_limit_sets_increase_by__works(void **state);
+
+#endif // _TEST__F_limit__sets_increase_by
--- /dev/null
+#include "test-limit.h"
+#include "test-limit-sets_resize.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_limit_sets_resize__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_limit_sets_t data = f_limit_sets_t_initialize;
+
+ {
+ const f_status_t status = f_limit_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_limit_sets_resize__works(void **state) {
+
+ const int length = 5;
+ f_limit_sets_t data = f_limit_sets_t_initialize;
+
+ {
+ const f_status_t status = f_limit_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: Limit
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the limit project.
+ */
+#ifndef _TEST__F_limit__sets_resize
+#define _TEST__F_limit__sets_resize
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_limit_sets_resize()
+ */
+extern void test__f_limit_sets_resize__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_limit_sets_resize()
+ */
+extern void test__f_limit_sets_resize__works(void **state);
+
+#endif // _TEST__F_limit__sets_resize
--- /dev/null
+#include "test-limit.h"
+#include "test-limit-setss_adjust.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_limit_setss_adjust__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_limit_setss_t data = f_limit_setss_t_initialize;
+
+ {
+ const f_status_t status = f_limit_setss_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_limit_setss_adjust__works(void **state) {
+
+ const int length = 5;
+ f_limit_setss_t data = f_limit_setss_t_initialize;
+
+ {
+ const f_status_t status = f_limit_setss_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: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_limit__setss_adjust
+#define _TEST__F_limit__setss_adjust
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_limit_setss_adjust()
+ */
+extern void test__f_limit_setss_adjust__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_limit_setss_adjust()
+ */
+extern void test__f_limit_setss_adjust__works(void **state);
+
+#endif // _TEST__F_limit__setss_adjust
--- /dev/null
+#include "test-limit.h"
+#include "test-limit-setss_append.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_limit_setss_append__parameter_checking(void **state) {
+
+ f_limit_sets_t data = f_limit_setss_t_initialize;
+
+ {
+ const f_status_t status = f_limit_setss_append(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_limit_setss_append__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_limit_sets_t source = f_limit_setss_t_initialize;
+ f_limit_setss_t destination = f_limit_setss_t_initialize;
+
+ {
+ const f_status_t status = f_limit_sets_resize(length, &source);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(source.used, 0);
+ assert_int_equal(source.size, length);
+ }
+
+ {
+ const f_status_t status = f_limit_setss_append(source, &destination);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(destination.used, 0);
+ assert_int_equal(destination.size, 0);
+ assert_null(destination.array);
+ }
+
+ free((void *) source.array);
+}
+
+void test__f_limit_setss_append__works(void **state) {
+
+ const int length = 5;
+ f_limit_sets_t source = f_limit_setss_t_initialize;
+ f_limit_setss_t destination = f_limit_setss_t_initialize;
+
+ {
+ const f_status_t status = f_limit_sets_resize(length, &source);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(source.used, 0);
+ assert_int_equal(source.size, length);
+ }
+
+ for (; source.used < length; ++source.used) {
+
+ source.array[source.used].type = source.used + 1;
+ source.array[source.used].value.rlim_cur = source.used + 2;
+ source.array[source.used].value.rlim_max = source.used + 3;
+ } // for
+
+ {
+ const f_status_t status = f_limit_setss_append(source, &destination);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(destination.used, 1);
+ assert_int_equal(destination.array[0].used, source.used);
+ assert_int_equal(destination.array[0].size, source.used);
+
+ for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
+
+ assert_int_equal(destination.array[0].array[i].type, i + 1);
+ assert_int_equal(destination.array[0].array[i].value.rlim_cur, i + 2);
+ assert_int_equal(destination.array[0].array[i].value.rlim_max, i + 3);
+ } // for
+ }
+
+ for (f_array_length_t i = 0; i < destination.used; ++i) {
+ free((void *) destination.array[i].array);
+ } // for
+
+ free((void *) source.array);
+ free((void *) destination.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_limit__setss_append
+#define _TEST__F_limit__setss_append
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_limit_setss_append()
+ */
+extern void test__f_limit_setss_append__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_limit_setss_append()
+ */
+extern void test__f_limit_setss_append__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_limit_setss_append()
+ */
+extern void test__f_limit_setss_append__works(void **state);
+
+#endif // _TEST__F_limit__setss_append
--- /dev/null
+#include "test-limit.h"
+#include "test-limit-setss_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_limit_setss_append_all__parameter_checking(void **state) {
+
+ const f_limit_setss_t data = f_limit_setss_t_initialize;
+
+ {
+ const f_status_t status = f_limit_setss_append_all(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_limit_setss_append_all__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_limit_setss_t source = f_limit_setss_t_initialize;
+ f_limit_setss_t destination = f_limit_setss_t_initialize;
+
+ {
+ const f_status_t status = f_limit_setss_resize(length, &source);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(source.used, 0);
+ assert_int_equal(source.size, length);
+ }
+
+ {
+ const f_status_t status = f_limit_setss_append_all(source, &destination);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(destination.used, 0);
+ assert_int_equal(destination.size, 0);
+ assert_null(destination.array);
+ }
+
+ free((void *) source.array);
+}
+
+void test__f_limit_setss_append_all__works(void **state) {
+
+ const int length = 5;
+ const int length_inner = 2;
+ f_limit_setss_t source = f_limit_setss_t_initialize;
+ f_limit_setss_t destination = f_limit_setss_t_initialize;
+
+ {
+ const f_status_t status = f_limit_setss_resize(length, &source);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(source.used, 0);
+ assert_int_equal(source.size, length);
+ }
+
+ {
+ for (; source.used < length; ++source.used) {
+
+ const f_status_t status = f_limit_sets_resize(length_inner, &source.array[source.used]);
+
+ assert_int_equal(status, F_none);
+
+ for (f_array_length_t i = 0; i < length_inner; ++i) {
+
+ source.array[source.used].array[i].type = i + 1;
+ source.array[source.used].array[i].value.rlim_cur = i + 2;
+ source.array[source.used].array[i].value.rlim_max = i + 3;
+ } // for
+
+ source.array[source.used].used = length_inner;
+ } // for
+ }
+
+ {
+ const f_status_t status = f_limit_setss_append_all(source, &destination);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(destination.used, source.used);
+ assert_int_equal(destination.size, source.used);
+
+ for (f_array_length_t i = 0; i < destination.used; ++i) {
+
+ assert_int_equal(destination.array[i].used, length_inner);
+ assert_int_equal(destination.array[i].size, length_inner);
+
+ for (f_array_length_t j = 0; j < length_inner; ++j) {
+
+ assert_int_equal(destination.array[i].array[j].type, j + 1);
+ assert_int_equal(destination.array[i].array[j].value.rlim_cur, j + 2);
+ assert_int_equal(destination.array[i].array[j].value.rlim_max, j + 3);
+ } // for
+ } // for
+ }
+
+ for (f_array_length_t i = 0; i < source.used; ++i) {
+ free((void *) source.array[i].array);
+ } // for
+
+ for (f_array_length_t i = 0; i < destination.used; ++i) {
+ free((void *) destination.array[i].array);
+ } // for
+
+ free((void *) source.array);
+ free((void *) destination.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_limit__setss_append_all
+#define _TEST__F_limit__setss_append_all
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_limit_setss_append_all()
+ */
+extern void test__f_limit_setss_append_all__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_limit_setss_append_all()
+ */
+extern void test__f_limit_setss_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_limit_setss_append_all()
+ */
+extern void test__f_limit_setss_append_all__works(void **state);
+
+#endif // _TEST__F_limit__setss_append_all
--- /dev/null
+#include "test-limit.h"
+#include "test-limit-setss_decimate_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_limit_setss_decimate_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_limit_setss_t data = f_limit_setss_t_initialize;
+
+ {
+ const f_status_t status = f_limit_setss_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_limit_setss_decimate_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_limit_setss_t data = f_limit_setss_t_initialize;
+
+ {
+ const f_status_t status = f_limit_setss_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_limit_setss_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_limit_setss_decimate_by__works(void **state) {
+
+ const int length = 5;
+ f_limit_setss_t data = f_limit_setss_t_initialize;
+
+ {
+ const f_status_t status = f_limit_setss_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_limit_setss_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: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_limit__setss_decimate_by
+#define _TEST__F_limit__setss_decimate_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_limit_setss_decimate_by()
+ */
+extern void test__f_limit_setss_decimate_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_limit_setss_decimate_by()
+ */
+extern void test__f_limit_setss_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_limit_setss_decimate_by()
+ */
+extern void test__f_limit_setss_decimate_by__works(void **state);
+
+#endif // _TEST__F_limit__setss_decimate_by
--- /dev/null
+#include "test-limit.h"
+#include "test-limit-setss_decrease_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_limit_setss_decrease_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_limit_setss_t data = f_limit_setss_t_initialize;
+
+ {
+ const f_status_t status = f_limit_setss_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_limit_setss_decrease_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_limit_setss_t data = f_limit_setss_t_initialize;
+
+ {
+ const f_status_t status = f_limit_setss_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_limit_setss_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_limit_setss_decrease_by__works(void **state) {
+
+ const int length = 5;
+ f_limit_setss_t data = f_limit_setss_t_initialize;
+
+ {
+ const f_status_t status = f_limit_setss_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_limit_setss_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: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_limit__setss_decrease_by
+#define _TEST__F_limit__setss_decrease_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_limit_setss_decrease_by()
+ */
+extern void test__f_limit_setss_decrease_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_limit_setss_decrease_by()
+ */
+extern void test__f_limit_setss_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_limit_setss_decrease_by()
+ */
+extern void test__f_limit_setss_decrease_by__works(void **state);
+
+#endif // _TEST__F_limit__setss_decrease_by
--- /dev/null
+#include "test-limit.h"
+#include "test-limit-setss_increase.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_limit_setss_increase__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_limit_setss_t data = f_limit_setss_t_initialize;
+
+ {
+ const f_status_t status = f_limit_setss_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_limit_setss_increase__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_limit_setss_t data = f_limit_setss_t_initialize;
+
+ {
+ const f_status_t status = f_limit_setss_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_limit_setss_increase(0, &data);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_limit_setss_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_limit_setss_increase__works(void **state) {
+
+ const int length = 5;
+ f_limit_setss_t data = f_limit_setss_t_initialize;
+
+ {
+ const f_status_t status = f_limit_setss_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_limit_setss_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: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_limit__setss_increase
+#define _TEST__F_limit__setss_increase
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_limit_setss_increase()
+ */
+extern void test__f_limit_setss_increase__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_limit_setss_increase()
+ */
+extern void test__f_limit_setss_increase__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_limit_setss_increase()
+ */
+extern void test__f_limit_setss_increase__works(void **state);
+
+#endif // _TEST__F_limit__setss_increase
--- /dev/null
+#include "test-limit.h"
+#include "test-limit-setss_increase_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_limit_setss_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_limit_setss_t data = f_limit_sets_t_initialize;
+
+ {
+ const f_status_t status = f_limit_setss_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_limit_setss_increase_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_limit_setss_t data = f_limit_setss_t_initialize;
+
+ {
+ const f_status_t status = f_limit_setss_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_limit_setss_increase_by(0, &data);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_limit_setss_increase_by(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_limit_setss_increase_by__works(void **state) {
+
+ const int length = 5;
+ f_limit_setss_t data = f_limit_sets_t_initialize;
+
+ {
+ const f_status_t status = f_limit_setss_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_limit_setss_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: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_limit__setss_increase_by
+#define _TEST__F_limit__setss_increase_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_limit_setss_increase_by()
+ */
+extern void test__f_limit_setss_increase_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_limit_setss_increase_by()
+ */
+extern void test__f_limit_setss_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_limit_setss_increase_by()
+ */
+extern void test__f_limit_setss_increase_by__works(void **state);
+
+#endif // _TEST__F_limit__setss_increase_by
--- /dev/null
+#include "test-limit.h"
+#include "test-limit-setss_resize.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_limit_setss_resize__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_limit_setss_t data = f_limit_setss_t_initialize;
+
+ {
+ const f_status_t status = f_limit_setss_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_limit_setss_resize__works(void **state) {
+
+ const int length = 5;
+ f_limit_setss_t data = f_limit_setss_t_initialize;
+
+ {
+ const f_status_t status = f_limit_setss_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: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_limit__setss_resize
+#define _TEST__F_limit__setss_resize
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_limit_setss_resize()
+ */
+extern void test__f_limit_setss_resize__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_limit_setss_resize()
+ */
+extern void test__f_limit_setss_resize__works(void **state);
+
+#endif // _TEST__F_limit__setss_resize
--- /dev/null
+#include "test-limit.h"
+#include "test-limit-values_adjust.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_limit_values_adjust__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_limit_values_t data = f_limit_values_t_initialize;
+
+ {
+ const f_status_t status = f_limit_values_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_limit_values_adjust__works(void **state) {
+
+ const int length = 5;
+ f_limit_values_t data = f_limit_values_t_initialize;
+
+ {
+ const f_status_t status = f_limit_values_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: Limit
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the limit project.
+ */
+#ifndef _TEST__F_limit__values_adjust
+#define _TEST__F_limit__values_adjust
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_limit_values_adjust()
+ */
+extern void test__f_limit_values_adjust__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_limit_values_adjust()
+ */
+extern void test__f_limit_values_adjust__works(void **state);
+
+#endif // _TEST__F_limit__values_adjust
--- /dev/null
+#include "test-limit.h"
+#include "test-limit-values_append.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_limit_values_append__parameter_checking(void **state) {
+
+ const f_limit_value_t data = f_limit_value_t_initialize;
+
+ {
+ const f_status_t status = f_limit_values_append(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_limit_values_append__works(void **state) {
+
+ const f_limit_value_t source = macro_f_limit_value_t_initialize(1, 2);
+ f_limit_values_t destination = f_limit_values_t_initialize;
+
+ {
+ const f_status_t status = f_limit_values_append(source, &destination);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(destination.used, 1);
+ assert_int_equal(destination.array[0].rlim_cur, source.rlim_cur);
+ assert_int_equal(destination.array[0].rlim_max, source.rlim_max);
+ }
+
+ free((void *) destination.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Limit
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the limit project.
+ */
+#ifndef _TEST__F_limit__values_append
+#define _TEST__F_limit__values_append
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_limit_values_append()
+ */
+extern void test__f_limit_values_append__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_limit_values_append()
+ */
+extern void test__f_limit_values_append__works(void **state);
+
+#endif // _TEST__F_limit__values_append
--- /dev/null
+#include "test-limit.h"
+#include "test-limit-values_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_limit_values_append_all__parameter_checking(void **state) {
+
+ const f_limit_values_t data = f_limit_values_t_initialize;
+
+ {
+ const f_status_t status = f_limit_values_append_all(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_limit_values_append_all__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_limit_values_t source = f_limit_values_t_initialize;
+ f_limit_values_t destination = f_limit_values_t_initialize;
+
+ {
+ const f_status_t status = f_limit_values_resize(length, &source);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(source.used, 0);
+ assert_int_equal(source.size, length);
+ }
+
+ {
+ const f_status_t status = f_limit_values_append_all(source, &destination);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(destination.used, 0);
+ assert_int_equal(destination.size, 0);
+ assert_null(destination.array);
+ }
+
+ free((void *) source.array);
+}
+
+void test__f_limit_values_append_all__works(void **state) {
+
+ const int length = 5;
+ const int length_used = 2;
+ f_limit_values_t source = f_limit_values_t_initialize;
+ f_limit_values_t destination = f_limit_values_t_initialize;
+
+ {
+ const f_status_t status = f_limit_values_resize(length, &source);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(source.used, 0);
+ assert_int_equal(source.size, length);
+ }
+
+ for (; source.used < length_used; ++source.used) {
+
+ source.array[source.used].rlim_cur = source.used + 1;
+ source.array[source.used].rlim_max = source.used + 2;
+ } // for
+ {
+ const f_status_t status = f_limit_values_append_all(source, &destination);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(destination.used, source.used);
+ assert_int_equal(destination.size, source.used);
+
+ for (f_array_length_t i = 0; i < source.used; ++i) {
+
+ assert_int_equal(destination.array[i].rlim_cur, i + 1);
+ assert_int_equal(destination.array[i].rlim_max, i + 2);
+ } // for
+ }
+
+ free((void *) source.array);
+ free((void *) destination.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Limit
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the limit project.
+ */
+#ifndef _TEST__F_limit__values_append_all
+#define _TEST__F_limit__values_append_all
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_limit_values_append_all()
+ */
+extern void test__f_limit_values_append_all__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_limit_values_append_all()
+ */
+extern void test__f_limit_values_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_limit_values_append_all()
+ */
+extern void test__f_limit_values_append_all__works(void **state);
+
+#endif // _TEST__F_limit__values_append_all
--- /dev/null
+#include "test-limit.h"
+#include "test-limit-values_decimate_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_limit_values_decimate_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_limit_values_t data = f_limit_values_t_initialize;
+
+ {
+ const f_status_t status = f_limit_values_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_limit_values_decimate_by__works(void **state) {
+
+ const int length = 5;
+ f_limit_values_t data = f_limit_values_t_initialize;
+
+ {
+ const f_status_t status = f_limit_values_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_limit_values_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: Limit
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the limit project.
+ */
+#ifndef _TEST__F_limit__values_decimate_by
+#define _TEST__F_limit__values_decimate_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_limit_values_decimate_by()
+ */
+extern void test__f_limit_values_decimate_by__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_limit_values_decimate_by()
+ */
+extern void test__f_limit_values_decimate_by__works(void **state);
+
+#endif // _TEST__F_limit__values_decimate_by
--- /dev/null
+#include "test-limit.h"
+#include "test-limit-values_decrease_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_limit_values_decrease_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_limit_values_t data = f_limit_values_t_initialize;
+
+ {
+ const f_status_t status = f_limit_values_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_limit_values_decrease_by__works(void **state) {
+
+ const int length = 5;
+ f_limit_values_t data = f_limit_values_t_initialize;
+
+ {
+ const f_status_t status = f_limit_values_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_limit_values_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: Limit
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the limit project.
+ */
+#ifndef _TEST__F_limit__values_decrease_by
+#define _TEST__F_limit__values_decrease_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_limit_values_decrease_by()
+ */
+extern void test__f_limit_values_decrease_by__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_limit_values_decrease_by()
+ */
+extern void test__f_limit_values_decrease_by__works(void **state);
+
+#endif // _TEST__F_limit__values_decrease_by
--- /dev/null
+#include "test-limit.h"
+#include "test-limit-values_increase.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_limit_values_increase__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_limit_values_t data = f_limit_values_t_initialize;
+
+ {
+ const f_status_t status = f_limit_values_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_limit_values_increase__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_limit_values_t data = f_limit_values_t_initialize;
+
+ {
+ const f_status_t status = f_limit_values_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_limit_values_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_limit_values_increase__works(void **state) {
+
+ const int length = 5;
+ f_limit_values_t data = f_limit_values_t_initialize;
+
+ {
+ const f_status_t status = f_limit_values_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_limit_values_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: Limit
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the limit project.
+ */
+#ifndef _TEST__F_limit__values_increase
+#define _TEST__F_limit__values_increase
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_limit_values_increase()
+ */
+extern void test__f_limit_values_increase__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_limit_values_increase()
+ */
+extern void test__f_limit_values_increase__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_limit_values_increase()
+ */
+extern void test__f_limit_values_increase__works(void **state);
+
+#endif // _TEST__F_limit__values_increase
--- /dev/null
+#include "test-limit.h"
+#include "test-limit-values_increase_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_limit_values_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_limit_values_t data = f_limit_values_t_initialize;
+
+ {
+ const f_status_t status = f_limit_values_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_limit_values_increase_by__works(void **state) {
+
+ const int length = 5;
+ f_limit_values_t data = f_limit_values_t_initialize;
+
+ {
+ const f_status_t status = f_limit_values_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_limit_values_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: Limit
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the limit project.
+ */
+#ifndef _TEST__F_limit__values_increase_by
+#define _TEST__F_limit__values_increase_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_limit_values_increase_by()
+ */
+extern void test__f_limit_values_increase_by__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_limit_values_increase_by()
+ */
+extern void test__f_limit_values_increase_by__works(void **state);
+
+#endif // _TEST__F_limit__values_increase_by
--- /dev/null
+#include "test-limit.h"
+#include "test-limit-values_resize.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_limit_values_resize__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_limit_values_t data = f_limit_values_t_initialize;
+
+ {
+ const f_status_t status = f_limit_values_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_limit_values_resize__works(void **state) {
+
+ const int length = 5;
+ f_limit_values_t data = f_limit_values_t_initialize;
+
+ {
+ const f_status_t status = f_limit_values_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: Limit
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the limit project.
+ */
+#ifndef _TEST__F_limit__values_resize
+#define _TEST__F_limit__values_resize
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_limit_values_resize()
+ */
+extern void test__f_limit_values_resize__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_limit_values_resize()
+ */
+extern void test__f_limit_values_resize__works(void **state);
+
+#endif // _TEST__F_limit__values_resize
--- /dev/null
+#include "test-limit.h"
+#include "test-limit-valuess_adjust.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_limit_valuess_adjust__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_limit_valuess_t data = f_limit_valuess_t_initialize;
+
+ {
+ const f_status_t status = f_limit_valuess_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_limit_valuess_adjust__works(void **state) {
+
+ const int length = 5;
+ f_limit_valuess_t data = f_limit_valuess_t_initialize;
+
+ {
+ const f_status_t status = f_limit_valuess_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: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_limit__valuess_adjust
+#define _TEST__F_limit__valuess_adjust
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_limit_valuess_adjust()
+ */
+extern void test__f_limit_valuess_adjust__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_limit_valuess_adjust()
+ */
+extern void test__f_limit_valuess_adjust__works(void **state);
+
+#endif // _TEST__F_limit__valuess_adjust
--- /dev/null
+#include "test-limit.h"
+#include "test-limit-valuess_append.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_limit_valuess_append__parameter_checking(void **state) {
+
+ f_limit_values_t data = f_limit_valuess_t_initialize;
+
+ {
+ const f_status_t status = f_limit_valuess_append(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_limit_valuess_append__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_limit_values_t source = f_limit_valuess_t_initialize;
+ f_limit_valuess_t destination = f_limit_valuess_t_initialize;
+
+ {
+ const f_status_t status = f_limit_values_resize(length, &source);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(source.used, 0);
+ assert_int_equal(source.size, length);
+ }
+
+ {
+ const f_status_t status = f_limit_valuess_append(source, &destination);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(destination.used, 0);
+ assert_int_equal(destination.size, 0);
+ assert_null(destination.array);
+ }
+
+ free((void *) source.array);
+}
+
+void test__f_limit_valuess_append__works(void **state) {
+
+ const int length = 5;
+ f_limit_values_t source = f_limit_valuess_t_initialize;
+ f_limit_valuess_t destination = f_limit_valuess_t_initialize;
+
+ {
+ const f_status_t status = f_limit_values_resize(length, &source);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(source.used, 0);
+ assert_int_equal(source.size, length);
+ }
+
+ for (; source.used < length; ++source.used) {
+
+ source.array[source.used].rlim_cur = source.used + 1;
+ source.array[source.used].rlim_max = source.used + 2;
+ } // for
+
+ {
+ const f_status_t status = f_limit_valuess_append(source, &destination);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(destination.used, 1);
+ assert_int_equal(destination.array[0].used, source.used);
+ assert_int_equal(destination.array[0].size, source.used);
+
+ for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
+
+ assert_int_equal(destination.array[0].array[i].rlim_cur, i + 1);
+ assert_int_equal(destination.array[0].array[i].rlim_max, i + 2);
+ } // for
+ }
+
+ for (f_array_length_t i = 0; i < destination.used; ++i) {
+ free((void *) destination.array[i].array);
+ } // for
+
+ free((void *) source.array);
+ free((void *) destination.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_limit__valuess_append
+#define _TEST__F_limit__valuess_append
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_limit_valuess_append()
+ */
+extern void test__f_limit_valuess_append__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_limit_valuess_append()
+ */
+extern void test__f_limit_valuess_append__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_limit_valuess_append()
+ */
+extern void test__f_limit_valuess_append__works(void **state);
+
+#endif // _TEST__F_limit__valuess_append
--- /dev/null
+#include "test-limit.h"
+#include "test-limit-valuess_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_limit_valuess_append_all__parameter_checking(void **state) {
+
+ const f_limit_valuess_t data = f_limit_valuess_t_initialize;
+
+ {
+ const f_status_t status = f_limit_valuess_append_all(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_limit_valuess_append_all__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_limit_valuess_t source = f_limit_valuess_t_initialize;
+ f_limit_valuess_t destination = f_limit_valuess_t_initialize;
+
+ {
+ const f_status_t status = f_limit_valuess_resize(length, &source);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(source.used, 0);
+ assert_int_equal(source.size, length);
+ }
+
+ {
+ const f_status_t status = f_limit_valuess_append_all(source, &destination);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(destination.used, 0);
+ assert_int_equal(destination.size, 0);
+ assert_null(destination.array);
+ }
+
+ free((void *) source.array);
+}
+
+void test__f_limit_valuess_append_all__works(void **state) {
+
+ const int length = 5;
+ const int length_inner = 2;
+ f_limit_valuess_t source = f_limit_valuess_t_initialize;
+ f_limit_valuess_t destination = f_limit_valuess_t_initialize;
+
+ {
+ const f_status_t status = f_limit_valuess_resize(length, &source);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(source.used, 0);
+ assert_int_equal(source.size, length);
+ }
+
+ {
+ for (; source.used < length; ++source.used) {
+
+ const f_status_t status = f_limit_values_resize(length_inner, &source.array[source.used]);
+
+ assert_int_equal(status, F_none);
+
+ for (f_array_length_t i = 0; i < length_inner; ++i) {
+
+ source.array[source.used].array[i].rlim_cur = i + 1;
+ source.array[source.used].array[i].rlim_max = i + 2;
+ } // for
+
+ source.array[source.used].used = length_inner;
+ } // for
+ }
+
+ {
+ const f_status_t status = f_limit_valuess_append_all(source, &destination);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(destination.used, source.used);
+ assert_int_equal(destination.size, source.used);
+
+ for (f_array_length_t i = 0; i < destination.used; ++i) {
+
+ assert_int_equal(destination.array[i].used, length_inner);
+ assert_int_equal(destination.array[i].size, length_inner);
+
+ for (f_array_length_t j = 0; j < length_inner; ++j) {
+
+ assert_int_equal(destination.array[i].array[j].rlim_cur, j + 1);
+ assert_int_equal(destination.array[i].array[j].rlim_max, j + 2);
+ } // for
+ } // for
+ }
+
+ for (f_array_length_t i = 0; i < source.used; ++i) {
+ free((void *) source.array[i].array);
+ } // for
+
+ for (f_array_length_t i = 0; i < destination.used; ++i) {
+ free((void *) destination.array[i].array);
+ } // for
+
+ free((void *) source.array);
+ free((void *) destination.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_limit__valuess_append_all
+#define _TEST__F_limit__valuess_append_all
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_limit_valuess_append_all()
+ */
+extern void test__f_limit_valuess_append_all__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_limit_valuess_append_all()
+ */
+extern void test__f_limit_valuess_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_limit_valuess_append_all()
+ */
+extern void test__f_limit_valuess_append_all__works(void **state);
+
+#endif // _TEST__F_limit__valuess_append_all
--- /dev/null
+#include "test-limit.h"
+#include "test-limit-valuess_decimate_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_limit_valuess_decimate_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_limit_valuess_t data = f_limit_valuess_t_initialize;
+
+ {
+ const f_status_t status = f_limit_valuess_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_limit_valuess_decimate_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_limit_valuess_t data = f_limit_valuess_t_initialize;
+
+ {
+ const f_status_t status = f_limit_valuess_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_limit_valuess_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_limit_valuess_decimate_by__works(void **state) {
+
+ const int length = 5;
+ f_limit_valuess_t data = f_limit_valuess_t_initialize;
+
+ {
+ const f_status_t status = f_limit_valuess_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_limit_valuess_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: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_limit__valuess_decimate_by
+#define _TEST__F_limit__valuess_decimate_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_limit_valuess_decimate_by()
+ */
+extern void test__f_limit_valuess_decimate_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_limit_valuess_decimate_by()
+ */
+extern void test__f_limit_valuess_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_limit_valuess_decimate_by()
+ */
+extern void test__f_limit_valuess_decimate_by__works(void **state);
+
+#endif // _TEST__F_limit__valuess_decimate_by
--- /dev/null
+#include "test-limit.h"
+#include "test-limit-valuess_decrease_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_limit_valuess_decrease_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_limit_valuess_t data = f_limit_valuess_t_initialize;
+
+ {
+ const f_status_t status = f_limit_valuess_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_limit_valuess_decrease_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_limit_valuess_t data = f_limit_valuess_t_initialize;
+
+ {
+ const f_status_t status = f_limit_valuess_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_limit_valuess_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_limit_valuess_decrease_by__works(void **state) {
+
+ const int length = 5;
+ f_limit_valuess_t data = f_limit_valuess_t_initialize;
+
+ {
+ const f_status_t status = f_limit_valuess_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_limit_valuess_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: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_limit__valuess_decrease_by
+#define _TEST__F_limit__valuess_decrease_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_limit_valuess_decrease_by()
+ */
+extern void test__f_limit_valuess_decrease_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_limit_valuess_decrease_by()
+ */
+extern void test__f_limit_valuess_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_limit_valuess_decrease_by()
+ */
+extern void test__f_limit_valuess_decrease_by__works(void **state);
+
+#endif // _TEST__F_limit__valuess_decrease_by
--- /dev/null
+#include "test-limit.h"
+#include "test-limit-valuess_increase.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_limit_valuess_increase__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_limit_valuess_t data = f_limit_valuess_t_initialize;
+
+ {
+ const f_status_t status = f_limit_valuess_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_limit_valuess_increase__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_limit_valuess_t data = f_limit_valuess_t_initialize;
+
+ {
+ const f_status_t status = f_limit_valuess_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_limit_valuess_increase(0, &data);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_limit_valuess_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_limit_valuess_increase__works(void **state) {
+
+ const int length = 5;
+ f_limit_valuess_t data = f_limit_valuess_t_initialize;
+
+ {
+ const f_status_t status = f_limit_valuess_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_limit_valuess_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: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_limit__valuess_increase
+#define _TEST__F_limit__valuess_increase
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_limit_valuess_increase()
+ */
+extern void test__f_limit_valuess_increase__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_limit_valuess_increase()
+ */
+extern void test__f_limit_valuess_increase__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_limit_valuess_increase()
+ */
+extern void test__f_limit_valuess_increase__works(void **state);
+
+#endif // _TEST__F_limit__valuess_increase
--- /dev/null
+#include "test-limit.h"
+#include "test-limit-valuess_increase_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_limit_valuess_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_limit_valuess_t data = f_limit_values_t_initialize;
+
+ {
+ const f_status_t status = f_limit_valuess_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_limit_valuess_increase_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_limit_valuess_t data = f_limit_valuess_t_initialize;
+
+ {
+ const f_status_t status = f_limit_valuess_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_limit_valuess_increase_by(0, &data);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_limit_valuess_increase_by(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_limit_valuess_increase_by__works(void **state) {
+
+ const int length = 5;
+ f_limit_valuess_t data = f_limit_values_t_initialize;
+
+ {
+ const f_status_t status = f_limit_valuess_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_limit_valuess_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: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_limit__valuess_increase_by
+#define _TEST__F_limit__valuess_increase_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_limit_valuess_increase_by()
+ */
+extern void test__f_limit_valuess_increase_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_limit_valuess_increase_by()
+ */
+extern void test__f_limit_valuess_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_limit_valuess_increase_by()
+ */
+extern void test__f_limit_valuess_increase_by__works(void **state);
+
+#endif // _TEST__F_limit__valuess_increase_by
--- /dev/null
+#include "test-limit.h"
+#include "test-limit-valuess_resize.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_limit_valuess_resize__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_limit_valuess_t data = f_limit_valuess_t_initialize;
+
+ {
+ const f_status_t status = f_limit_valuess_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_limit_valuess_resize__works(void **state) {
+
+ const int length = 5;
+ f_limit_valuess_t data = f_limit_valuess_t_initialize;
+
+ {
+ const f_status_t status = f_limit_valuess_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: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_limit__valuess_resize
+#define _TEST__F_limit__valuess_resize
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_limit_valuess_resize()
+ */
+extern void test__f_limit_valuess_resize__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_limit_valuess_resize()
+ */
+extern void test__f_limit_valuess_resize__works(void **state);
+
+#endif // _TEST__F_limit__valuess_resize
--- /dev/null
+#include "test-limit.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_limit_process__fails),
+ cmocka_unit_test(test__f_limit_process__works),
+
+ cmocka_unit_test(test__f_limit_sets_adjust__works),
+ cmocka_unit_test(test__f_limit_sets_append__works),
+ cmocka_unit_test(test__f_limit_sets_append_all__works),
+ cmocka_unit_test(test__f_limit_sets_decimate_by__works),
+ cmocka_unit_test(test__f_limit_sets_decrease_by__works),
+ cmocka_unit_test(test__f_limit_sets_increase__works),
+ cmocka_unit_test(test__f_limit_sets_increase_by__works),
+ cmocka_unit_test(test__f_limit_sets_resize__works),
+
+ cmocka_unit_test(test__f_limit_setss_append__returns_data_not),
+ cmocka_unit_test(test__f_limit_setss_append_all__returns_data_not),
+ cmocka_unit_test(test__f_limit_setss_decimate_by__returns_data_not),
+ cmocka_unit_test(test__f_limit_setss_decrease_by__returns_data_not),
+ cmocka_unit_test(test__f_limit_setss_increase__returns_data_not),
+ cmocka_unit_test(test__f_limit_setss_increase_by__returns_data_not),
+
+ cmocka_unit_test(test__f_limit_setss_adjust__works),
+ cmocka_unit_test(test__f_limit_setss_append__works),
+ cmocka_unit_test(test__f_limit_setss_append_all__works),
+ cmocka_unit_test(test__f_limit_setss_decimate_by__works),
+ cmocka_unit_test(test__f_limit_setss_decrease_by__works),
+ cmocka_unit_test(test__f_limit_setss_increase__works),
+ cmocka_unit_test(test__f_limit_setss_increase_by__works),
+ cmocka_unit_test(test__f_limit_setss_resize__works),
+
+ cmocka_unit_test(test__f_limit_values_adjust__works),
+ cmocka_unit_test(test__f_limit_values_append__works),
+ cmocka_unit_test(test__f_limit_values_append_all__works),
+ cmocka_unit_test(test__f_limit_values_decimate_by__works),
+ cmocka_unit_test(test__f_limit_values_decrease_by__works),
+ cmocka_unit_test(test__f_limit_values_increase__works),
+ cmocka_unit_test(test__f_limit_values_increase_by__works),
+ cmocka_unit_test(test__f_limit_values_resize__works),
+
+ cmocka_unit_test(test__f_limit_valuess_append__returns_data_not),
+ cmocka_unit_test(test__f_limit_valuess_append_all__returns_data_not),
+ cmocka_unit_test(test__f_limit_valuess_decimate_by__returns_data_not),
+ cmocka_unit_test(test__f_limit_valuess_decrease_by__returns_data_not),
+ cmocka_unit_test(test__f_limit_valuess_increase__returns_data_not),
+ cmocka_unit_test(test__f_limit_valuess_increase_by__returns_data_not),
+
+ cmocka_unit_test(test__f_limit_valuess_adjust__works),
+ cmocka_unit_test(test__f_limit_valuess_append__works),
+ cmocka_unit_test(test__f_limit_valuess_append_all__works),
+ cmocka_unit_test(test__f_limit_valuess_decimate_by__works),
+ cmocka_unit_test(test__f_limit_valuess_decrease_by__works),
+ cmocka_unit_test(test__f_limit_valuess_increase__works),
+ cmocka_unit_test(test__f_limit_valuess_increase_by__works),
+ cmocka_unit_test(test__f_limit_valuess_resize__works),
+
+ #ifndef _di_level_0_parameter_checking_
+ cmocka_unit_test(test__f_limit_process__parameter_checking),
+
+ cmocka_unit_test(test__f_limit_sets_adjust__parameter_checking),
+ cmocka_unit_test(test__f_limit_sets_append__parameter_checking),
+ cmocka_unit_test(test__f_limit_sets_append_all__parameter_checking),
+ cmocka_unit_test(test__f_limit_sets_decimate_by__parameter_checking),
+ cmocka_unit_test(test__f_limit_sets_decrease_by__parameter_checking),
+ cmocka_unit_test(test__f_limit_sets_increase__parameter_checking),
+ cmocka_unit_test(test__f_limit_sets_increase_by__parameter_checking),
+ cmocka_unit_test(test__f_limit_sets_resize__parameter_checking),
+
+ cmocka_unit_test(test__f_limit_setss_adjust__parameter_checking),
+ cmocka_unit_test(test__f_limit_setss_append__parameter_checking),
+ cmocka_unit_test(test__f_limit_setss_append_all__parameter_checking),
+ cmocka_unit_test(test__f_limit_setss_decimate_by__parameter_checking),
+ cmocka_unit_test(test__f_limit_setss_decrease_by__parameter_checking),
+ cmocka_unit_test(test__f_limit_setss_increase__parameter_checking),
+ cmocka_unit_test(test__f_limit_setss_increase_by__parameter_checking),
+ cmocka_unit_test(test__f_limit_setss_resize__parameter_checking),
+
+ cmocka_unit_test(test__f_limit_values_adjust__parameter_checking),
+ cmocka_unit_test(test__f_limit_values_append__parameter_checking),
+ cmocka_unit_test(test__f_limit_values_append_all__parameter_checking),
+ cmocka_unit_test(test__f_limit_values_decimate_by__parameter_checking),
+ cmocka_unit_test(test__f_limit_values_decrease_by__parameter_checking),
+ cmocka_unit_test(test__f_limit_values_increase__parameter_checking),
+ cmocka_unit_test(test__f_limit_values_increase_by__parameter_checking),
+ cmocka_unit_test(test__f_limit_values_resize__parameter_checking),
+
+ cmocka_unit_test(test__f_limit_valuess_adjust__parameter_checking),
+ cmocka_unit_test(test__f_limit_valuess_append__parameter_checking),
+ cmocka_unit_test(test__f_limit_valuess_append_all__parameter_checking),
+ cmocka_unit_test(test__f_limit_valuess_decimate_by__parameter_checking),
+ cmocka_unit_test(test__f_limit_valuess_decrease_by__parameter_checking),
+ cmocka_unit_test(test__f_limit_valuess_increase__parameter_checking),
+ cmocka_unit_test(test__f_limit_valuess_increase_by__parameter_checking),
+ cmocka_unit_test(test__f_limit_valuess_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: Limit
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the limit project.
+ */
+#ifndef _TEST__F_limit_h
+#define _TEST__F_limit_h
+
+// Libc includes.
+#include <stdarg.h>
+#include <stddef.h>
+#include <setjmp.h>
+#include <stdint.h>
+#include <string.h>
+
+// cmocka includes.
+#include <cmocka.h>
+
+// FLL-0 includes.
+#include <fll/level_0/limit.h>
+
+// Mock includes.
+#include "mock-limit.h"
+
+// Test includes.
+#include "test-limit-process.h"
+#include "test-limit-sets_adjust.h"
+#include "test-limit-sets_append.h"
+#include "test-limit-sets_append_all.h"
+#include "test-limit-sets_decimate_by.h"
+#include "test-limit-sets_decrease_by.h"
+#include "test-limit-sets_increase.h"
+#include "test-limit-sets_increase_by.h"
+#include "test-limit-sets_resize.h"
+#include "test-limit-setss_adjust.h"
+#include "test-limit-setss_append.h"
+#include "test-limit-setss_append_all.h"
+#include "test-limit-setss_decimate_by.h"
+#include "test-limit-setss_decrease_by.h"
+#include "test-limit-setss_increase.h"
+#include "test-limit-setss_increase_by.h"
+#include "test-limit-setss_resize.h"
+#include "test-limit-values_adjust.h"
+#include "test-limit-values_append.h"
+#include "test-limit-values_append_all.h"
+#include "test-limit-values_decimate_by.h"
+#include "test-limit-values_decrease_by.h"
+#include "test-limit-values_increase.h"
+#include "test-limit-values_increase_by.h"
+#include "test-limit-values_resize.h"
+#include "test-limit-valuess_adjust.h"
+#include "test-limit-valuess_append.h"
+#include "test-limit-valuess_append_all.h"
+#include "test-limit-valuess_decimate_by.h"
+#include "test-limit-valuess_decrease_by.h"
+#include "test-limit-valuess_increase.h"
+#include "test-limit-valuess_increase_by.h"
+#include "test-limit-valuess_resize.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_limit_h