There is still a long way to go but this is a good start.
Ideally, the f_thread will be the last project I write unit tests before the stable release is made.
--- /dev/null
+# fss-0001
+
+cmocka 1.*
--- /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_thread
+
+version_major 0
+version_minor 5
+version_micro 10
+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 -pthread -lc
+build_libraries-individual -lf_memory -lf_string
+
+build_sources_library thread.c private-thread.c thread/attribute.c thread/barrier.c thread/barrier_attribute.c thread/condition.c thread/condition_attribute.c thread/id.c thread/key.c thread/lock.c thread/lock_attribute.c thread/mutex.c thread/mutex_attribute.c thread/once.c thread/semaphore.c thread/set.c thread/spin.c ../../tests/unit/c/mock-thread.c
+
+build_sources_headers thread.h thread/attribute.h thread/barrier.h thread/barrier_attribute.h thread/condition.h thread/condition_attribute.h thread/id.h thread/key.h thread/lock.h thread/lock_attribute.h thread/mutex.h thread/mutex_attribute.h thread/once.h thread/semaphore.h thread/set.h thread/spin.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
+
+#defines -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+defines -D_pthread_sigqueue_unsupported_
+
+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.
+flags -Wl,--wrap=pthread_atfork
+flags -Wl,--wrap=pthread_attr_destroy
+flags -Wl,--wrap=pthread_attr_getaffinity_np
+flags -Wl,--wrap=pthread_attr_getdetachstate
+flags -Wl,--wrap=pthread_attr_getguardsize
+flags -Wl,--wrap=pthread_attr_getinheritsched
+flags -Wl,--wrap=pthread_attr_getschedparam
+flags -Wl,--wrap=pthread_attr_init
+flags -Wl,--wrap=pthread_attr_setaffinity_np
+flags -Wl,--wrap=pthread_attr_setdetachstate
+flags -Wl,--wrap=pthread_attr_setguardsize
+flags -Wl,--wrap=pthread_attr_setinheritsched
+flags -Wl,--wrap=pthread_attr_setschedparam
+flags -Wl,--wrap=pthread_barrier_destroy
+flags -Wl,--wrap=pthread_condattr_getclock
+flags -Wl,--wrap=pthread_condattr_getpshared
+flags -Wl,--wrap=pthread_condattr_setclock
+flags -Wl,--wrap=pthread_condattr_setpshared
+flags -Wl,--wrap=pthread_getattr_default_np
+flags -Wl,--wrap=pthread_key_delete
+flags -Wl,--wrap=pthread_setattr_default_np
--- /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_thread
+
+version_major 0
+version_minor 5
+version_micro 10
+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_thread
+
+build_sources_program test-thread-attributes_adjust.c test-thread-attributes_decimate_by.c test-thread-attributes_decrease_by.c test-thread-attributes_increase.c test-thread-attributes_increase_by.c test-thread-attributes_resize.c
+build_sources_program test-thread-barrier_attributes_adjust.c test-thread-barrier_attributes_decimate_by.c test-thread-barrier_attributes_decrease_by.c test-thread-barrier_attributes_increase.c test-thread-barrier_attributes_increase_by.c test-thread-barrier_attributes_resize.c
+build_sources_program test-thread-barriers_adjust.c test-thread-barriers_decimate_by.c test-thread-barriers_decrease_by.c test-thread-barriers_increase.c test-thread-barriers_increase_by.c test-thread-barriers_resize.c
+build_sources_program test-thread-condition_attributes_adjust.c test-thread-condition_attributes_decimate_by.c test-thread-condition_attributes_decrease_by.c test-thread-condition_attributes_increase.c test-thread-condition_attributes_increase_by.c test-thread-condition_attributes_resize.c
+build_sources_program test-thread-conditions_adjust.c test-thread-conditions_decimate_by.c test-thread-conditions_decrease_by.c test-thread-conditions_increase.c test-thread-conditions_increase_by.c test-thread-conditions_resize.c
+build_sources_program test-thread-ids_adjust.c test-thread-ids_decimate_by.c test-thread-ids_decrease_by.c test-thread-ids_increase.c test-thread-ids_increase_by.c test-thread-ids_resize.c
+build_sources_program test-thread-keys_adjust.c test-thread-keys_decimate_by.c test-thread-keys_decrease_by.c test-thread-keys_increase.c test-thread-keys_increase_by.c test-thread-keys_resize.c
+build_sources_program test-thread-lock_attributes_adjust.c test-thread-lock_attributes_decimate_by.c test-thread-lock_attributes_decrease_by.c test-thread-lock_attributes_increase.c test-thread-lock_attributes_increase_by.c test-thread-lock_attributes_resize.c
+build_sources_program test-thread-locks_adjust.c test-thread-locks_decimate_by.c test-thread-locks_decrease_by.c test-thread-locks_increase.c test-thread-locks_increase_by.c test-thread-locks_resize.c
+build_sources_program test-thread-mutex_attributes_adjust.c test-thread-mutex_attributes_decimate_by.c test-thread-mutex_attributes_decrease_by.c test-thread-mutex_attributes_increase.c test-thread-mutex_attributes_increase_by.c test-thread-mutex_attributes_resize.c
+build_sources_program test-thread-mutexs_adjust.c test-thread-mutexs_decimate_by.c test-thread-mutexs_decrease_by.c test-thread-mutexs_increase.c test-thread-mutexs_increase_by.c test-thread-mutexs_resize.c
+build_sources_program test-thread-onces_adjust.c test-thread-onces_decimate_by.c test-thread-onces_decrease_by.c test-thread-onces_increase.c test-thread-onces_increase_by.c test-thread-onces_resize.c
+build_sources_program test-thread-semaphores_adjust.c test-thread-semaphores_decimate_by.c test-thread-semaphores_decrease_by.c test-thread-semaphores_increase.c test-thread-semaphores_increase_by.c test-thread-semaphores_resize.c
+build_sources_program test-thread-sets_adjust.c test-thread-sets_decimate_by.c test-thread-sets_decrease_by.c test-thread-sets_increase.c test-thread-sets_increase_by.c test-thread-sets_resize.c
+build_sources_program test-thread-spins_adjust.c test-thread-spins_decimate_by.c test-thread-spins_decrease_by.c test-thread-spins_increase.c test-thread-spins_increase_by.c test-thread-spins_resize.c
+
+build_sources_program test-thread-at_fork.c
+build_sources_program test-thread-attribute_affinity_get.c test-thread-attribute_affinity_set.c
+build_sources_program test-thread-attribute_condition_clock_get.c test-thread-attribute_condition_clock_set.c
+build_sources_program test-thread-attribute_condition_shared_get.c test-thread-attribute_condition_shared_set.c
+build_sources_program test-thread-attribute_create.c test-thread-attribute_delete.c
+build_sources_program test-thread-attribute_default_get.c test-thread-attribute_default_set.c
+build_sources_program test-thread-attribute_detach_get.c test-thread-attribute_detach_set.c
+build_sources_program test-thread-attribute_guard_get.c test-thread-attribute_guard_set.c
+build_sources_program test-thread-attribute_scheduler_inherit_get.c test-thread-attribute_scheduler_inherit_set.c
+build_sources_program test-thread-attribute_scheduler_parameter_get.c test-thread-attribute_scheduler_parameter_set.c
+
+build_sources_program test-thread.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 -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
+defines -D_pthread_sigqueue_unsupported_
+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-mocks individual test
+ build settings-tests individual test
+
+ operate ld_library_path
+
+ if exists build/programs/shared/test-f_thread
+ shell build/programs/shared/test-f_thread
+
+ if exists build/programs/static/test-f_thread
+ shell build/programs/static/test-f_thread
+
+ if not exists build/programs/shared/test-f_thread
+ and not exists build/programs/static/test-f_thread
+ 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-thread.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int __wrap_pthread_atfork(void (*prepare)(void), void (*parent)(void), void (*child)(void)) {
+
+ const bool failure = mock_type(bool);
+
+ if (failure) {
+ return mock_type(int);
+ }
+
+ return 0;
+}
+
+int __wrap_pthread_attr_destroy(pthread_attr_t *attr) {
+
+ const bool failure = mock_type(bool);
+
+ if (failure) {
+ return mock_type(int);
+ }
+
+ return 0;
+}
+
+int __wrap_pthread_attr_getaffinity_np(const pthread_attr_t *__attr, size_t __cpusetsize, cpu_set_t *__cpuset) {
+
+ const bool failure = mock_type(bool);
+
+ if (failure) {
+ return mock_type(int);
+ }
+
+ return 0;
+}
+
+int __wrap_pthread_attr_getdetachstate(const pthread_attr_t *attr, int *detachstate) {
+
+ const bool failure = mock_type(bool);
+
+ if (failure) {
+ return mock_type(int);
+ }
+
+ return 0;
+}
+
+int __wrap_pthread_attr_getguardsize(const pthread_attr_t *restrict attr, size_t *restrict guardsize) {
+
+ const bool failure = mock_type(bool);
+
+ if (failure) {
+ return mock_type(int);
+ }
+
+ return 0;
+}
+
+int __wrap_pthread_attr_getinheritsched(const pthread_attr_t *restrict attr, int *restrict inheritsched) {
+
+ const bool failure = mock_type(bool);
+
+ if (failure) {
+ return mock_type(int);
+ }
+
+ return 0;
+}
+
+int __wrap_pthread_attr_getschedparam(const pthread_attr_t *restrict attr, struct sched_param *restrict param) {
+
+ const bool failure = mock_type(bool);
+
+ if (failure) {
+ return mock_type(int);
+ }
+
+ return 0;
+}
+
+int __wrap_pthread_attr_setaffinity_np(pthread_t __id, size_t __cpusetsize, const cpu_set_t *__cpuset) {
+
+ const bool failure = mock_type(bool);
+
+ if (failure) {
+ return mock_type(int);
+ }
+
+ return 0;
+}
+
+int __wrap_pthread_barrier_destroy(pthread_barrier_t barrier) {
+
+ const bool failure = mock_type(bool);
+
+ if (failure) {
+ return mock_type(int);
+ }
+
+ return 0;
+}
+
+int __wrap_pthread_condattr_getclock(const pthread_condattr_t *__restrict __attr, clockid_t *__restrict __clock_id) {
+
+ const bool failure = mock_type(bool);
+
+ if (failure) {
+ return mock_type(int);
+ }
+
+ return 0;
+}
+
+int __wrap_pthread_condattr_setclock(pthread_condattr_t *__attr, clockid_t __clock_id) {
+
+ const bool failure = mock_type(bool);
+
+ if (failure) {
+ return mock_type(int);
+ }
+
+ return 0;
+}
+
+int __wrap_pthread_condattr_getpshared(const pthread_condattr_t *__attr, int *__pshared) {
+
+ const bool failure = mock_type(bool);
+
+ if (failure) {
+ return mock_type(int);
+ }
+
+ return 0;
+}
+
+int __wrap_pthread_condattr_setpshared(pthread_condattr_t *__attr, int __pshared) {
+
+ const bool failure = mock_type(bool);
+
+ if (failure) {
+ return mock_type(int);
+ }
+
+ return 0;
+}
+
+int __wrap_pthread_getattr_default_np(pthread_attr_t *attr) {
+
+ const bool failure = mock_type(bool);
+
+ if (failure) {
+ return mock_type(int);
+ }
+
+ return 0;
+}
+
+int __wrap_pthread_setattr_default_np(const pthread_attr_t *attr) {
+
+ const bool failure = mock_type(bool);
+
+ if (failure) {
+ return mock_type(int);
+ }
+
+ return 0;
+}
+
+int __wrap_pthread_attr_init(pthread_attr_t *__attr) {
+
+ const bool failure = mock_type(bool);
+
+ if (failure) {
+ return mock_type(int);
+ }
+
+ return 0;
+}
+
+int __wrap_pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate) {
+
+ const bool failure = mock_type(bool);
+
+ if (failure) {
+ return mock_type(int);
+ }
+
+ return 0;
+}
+
+int __wrap_pthread_attr_setguardsize(pthread_attr_t *attr, size_t guardsize) {
+
+ const bool failure = mock_type(bool);
+
+ if (failure) {
+ return mock_type(int);
+ }
+
+ return 0;
+}
+
+int __wrap_pthread_attr_setinheritsched(pthread_attr_t *attr, int inheritsched) {
+
+ const bool failure = mock_type(bool);
+
+ if (failure) {
+ return mock_type(int);
+ }
+
+ return 0;
+}
+
+int __wrap_pthread_attr_setschedparam(pthread_attr_t *restrict attr, const struct sched_param *restrict param) {
+
+ const bool failure = mock_type(bool);
+
+ if (failure) {
+ return mock_type(int);
+ }
+
+ return 0;
+}
+
+int __wrap_pthread_key_delete(pthread_key_t key) {
+
+ return mock_type(int);
+}
+
+void stub(void) {
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the thread project.
+ */
+#ifndef _MOCK__thread_h
+#define _MOCK__thread_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/thread.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+const static int mock_errno_generic = 32767;
+
+extern int __wrap_pthread_atfork(void (*prepare)(void), void (*parent)(void), void (*child)(void));
+extern int __wrap_pthread_attr_destroy(pthread_attr_t *attr);
+extern int __wrap_pthread_attr_getaffinity_np(const pthread_attr_t *__attr, size_t __cpusetsize, cpu_set_t *__cpuset);
+extern int __wrap_pthread_attr_getdetachstate(const pthread_attr_t *attr, int *detachstate);
+extern int __wrap_pthread_attr_getguardsize(const pthread_attr_t *restrict attr, size_t *restrict guardsize);
+extern int __wrap_pthread_attr_getinheritsched(const pthread_attr_t *restrict attr, int *restrict inheritsched);
+extern int __wrap_pthread_attr_getschedparam(const pthread_attr_t *restrict attr, struct sched_param *restrict param);
+extern int __wrap_pthread_attr_init(pthread_attr_t *__attr);
+extern int __wrap_pthread_attr_setaffinity_np(pthread_t __id, size_t __cpusetsize, const cpu_set_t *__cpuset);
+extern int __wrap_pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate);
+extern int __wrap_pthread_attr_setguardsize(pthread_attr_t *attr, size_t guardsize);
+extern int __wrap_pthread_attr_setinheritsched(pthread_attr_t *attr, int inheritsched);
+extern int __wrap_pthread_attr_setschedparam(pthread_attr_t *restrict attr, const struct sched_param *restrict param);
+extern int __wrap_pthread_barrier_destroy(pthread_barrier_t barrier);
+extern int __wrap_pthread_condattr_getclock(const pthread_condattr_t *__restrict __attr, clockid_t *__restrict __clock_id);
+extern int __wrap_pthread_condattr_getpshared(const pthread_condattr_t *__attr, int *__pshared);
+extern int __wrap_pthread_condattr_setclock(pthread_condattr_t *__attr, clockid_t __clock_id);
+extern int __wrap_pthread_condattr_setpshared(pthread_condattr_t *__attr, int __pshared);
+extern int __wrap_pthread_getattr_default_np(pthread_attr_t *attr);
+extern int __wrap_pthread_key_delete(pthread_key_t key);
+extern int __wrap_pthread_setattr_default_np(const pthread_attr_t *attr);
+
+/*
+pthread_attr_getschedpolicy
+pthread_attr_setschedpolicy
+pthread_attr_getscope
+pthread_attr_setscope
+pthread_attr_getstack
+pthread_attr_setstack
+pthread_attr_getstacksize
+pthread_attr_setstacksize
+pthread_barrierattr_init
+pthread_barrierattr_getpshared
+pthread_barrierattr_setpshared
+pthread_barrier_init
+pthread_barrier_wait
+pthread_setcancelstate
+pthread_testcancel
+pthread_setcanceltype
+pthread_getcpuclockid
+pthread_equal
+pthread_getconcurrency
+pthread_setconcurrency
+pthread_condattr_init
+pthread_cond_init
+pthread_cond_broadcast
+pthread_cond_signal
+pthread_cond_wait
+pthread_cond_timedwait
+pthread_create
+pthread_detach
+pthread_exit
+pthread_join
+pthread_tryjoin_np
+pthread_timedjoin_np
+pthread_key_create
+pthread_getspecific
+pthread_setspecific
+pthread_rwlockattr_init
+pthread_rwlockattr_getpshared
+pthread_rwlockattr_setpshared
+pthread_rwlock_init
+pthread_rwlock_rdlock
+pthread_rwlock_timedrdlock
+pthread_rwlock_tryrdlock
+pthread_rwlock_wrlock
+pthread_rwlock_timedwrlock
+pthread_rwlock_trywrlock
+pthread_mutexattr_init
+pthread_mutexattr_getprioceiling
+pthread_mutexattr_setprioceiling
+pthread_mutexattr_getpshared
+pthread_mutexattr_setpshared
+pthread_mutexattr_gettype
+pthread_mutexattr_settype
+pthread_mutexattr_getprotocol
+pthread_mutexattr_setprotocol
+pthread_mutex_init
+pthread_mutex_lock
+pthread_mutex_timedlock
+pthread_mutex_trylock
+sem_init
+sem_open
+sem_close
+sem_unlink
+sem_wait
+sem_timedwait
+sem_trywait
+sem_post
+sem_getvalue
+pthread_mutex_getprioceiling
+pthread_mutex_setprioceiling
+pthread_mutex_unlock
+pthread_once
+pthread_getschedparam
+pthread_setschedparam
+pthread_setschedprio
+pthread_sigmask
+pthread_sigqueue
+pthread_spin_init
+pthread_spin_lock
+pthread_spin_trylock
+pthread_spin_unlock
+pthread_rwlock_unlock
+*/
+
+/**
+ * A stub intended to be used for passing to functions like f_thread_at_fork().
+ */
+extern void stub(void);
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _MOCK__thread_h
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-at_fork.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_at_fork__fails(void **state) {
+
+ int errnos[] = {
+ ENOMEM,
+ mock_errno_generic,
+ };
+
+ f_status_t statuss[] = {
+ F_memory_not,
+ F_failure,
+ };
+
+ for (uint8_t i = 0; i < 2; ++i) {
+
+ will_return(__wrap_pthread_atfork, true);
+ will_return(__wrap_pthread_atfork, errnos[i]);
+
+ const f_status_t status = f_thread_at_fork(stub, stub, stub);
+
+ assert_int_equal(status, F_status_set_error(statuss[i]));
+ } // for
+}
+
+void test__f_thread_at_fork__parameter_checking(void **state) {
+
+ {
+ const f_status_t status = f_thread_at_fork(0, 0, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+
+ {
+ const f_status_t status = f_thread_at_fork(stub, 0, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+
+ {
+ const f_status_t status = f_thread_at_fork(0, stub, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+
+ {
+ const f_status_t status = f_thread_at_fork(0, 0, stub);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+
+ {
+ const f_status_t status = f_thread_at_fork(stub, stub, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+
+ {
+ const f_status_t status = f_thread_at_fork(stub, 0, stub);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+
+ {
+ const f_status_t status = f_thread_at_fork(0, stub, stub);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_thread_at_fork__works(void **state) {
+
+ {
+ will_return(__wrap_pthread_atfork, false);
+
+ const f_status_t status = f_thread_at_fork(stub, stub, stub);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the thread project.
+ */
+#ifndef _TEST__F_thread__at_fork_h
+#define _TEST__F_thread__at_fork_h
+
+/**
+ * Test that function fails.
+ *
+ * @see f_thread_at_fork()
+ */
+extern void test__f_thread_at_fork__fails(void **state);
+
+/**
+ * Test that parameter checking works as expected.
+ *
+ * @see f_thread_at_fork()
+ */
+extern void test__f_thread_at_fork__parameter_checking(void **state);
+
+/**
+ * Test that function works.
+ *
+ * @see f_thread_at_fork()
+ */
+extern void test__f_thread_at_fork__works(void **state);
+
+#endif // _TEST__F_thread__at_fork_h
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-attribute_affinity_get.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_attribute_affinity_get__fails(void **state) {
+
+ f_thread_attribute_t attribute = f_thread_attribute_t_initialize;
+ cpu_set_t cpu_set;
+
+ memset(&cpu_set, 0, sizeof(cpu_set_t));
+
+ #if defined(_pthread_attr_unsupported_)
+ const f_status_t status = f_thread_attribute_affinity_get(attribute, 0, &cpu_set);
+
+ assert_int_equal(status, F_status_set_error(F_implemented_not));
+ #else
+ int errnos[] = {
+ EINVAL,
+ mock_errno_generic,
+ };
+
+ f_status_t statuss[] = {
+ F_parameter,
+ F_failure,
+ };
+
+ for (uint8_t i = 0; i < 2; ++i) {
+
+ will_return(__wrap_pthread_attr_getaffinity_np, true);
+ will_return(__wrap_pthread_attr_getaffinity_np, errnos[i]);
+
+ const f_status_t status = f_thread_attribute_affinity_get(attribute, 0, &cpu_set);
+
+ assert_int_equal(status, F_status_set_error(statuss[i]));
+ } // for
+ #endif // defined(_pthread_attr_unsupported_)
+}
+
+void test__f_thread_attribute_affinity_get__parameter_checking(void **state) {
+
+ f_thread_attribute_t attribute = f_thread_attribute_t_initialize;
+
+ {
+ const f_status_t status = f_thread_attribute_affinity_get(attribute, 0, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_thread_attribute_affinity_get__works(void **state) {
+
+ f_thread_attribute_t attribute = f_thread_attribute_t_initialize;
+ cpu_set_t cpu_set;
+
+ memset(&cpu_set, 0, sizeof(cpu_set_t));
+
+ #if defined(_pthread_attr_unsupported_)
+ {
+ const f_status_t status = f_thread_attribute_affinity_get(attribute, 0, &cpu_set);
+
+ assert_int_equal(status, F_status_set_error(F_implemented_not));
+ }
+ #else
+ {
+ will_return(__wrap_pthread_attr_getaffinity_np, false);
+
+ const f_status_t status = f_thread_attribute_affinity_get(attribute, 0, &cpu_set);
+
+ assert_int_equal(status, F_none);
+ }
+ #endif // defined(_pthread_attr_unsupported_)
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the thread project.
+ */
+#ifndef _TEST__F_thread__attribute_affinity_get_h
+#define _TEST__F_thread__attribute_affinity_get_h
+
+/**
+ * Test that function fails.
+ *
+ * @see f_thread_attribute_affinity_get()
+ */
+extern void test__f_thread_attribute_affinity_get__fails(void **state);
+
+/**
+ * Test that parameter checking works as expected.
+ *
+ * @see f_thread_attribute_affinity_get()
+ */
+extern void test__f_thread_attribute_affinity_get__parameter_checking(void **state);
+
+/**
+ * Test that function works.
+ *
+ * @see f_thread_attribute_affinity_get()
+ */
+extern void test__f_thread_attribute_affinity_get__works(void **state);
+
+#endif // _TEST__F_thread__attribute_affinity_get_h
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-attribute_affinity_set.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_attribute_affinity_set__fails(void **state) {
+
+ f_thread_attribute_t attribute = f_thread_attribute_t_initialize;
+ cpu_set_t cpu_set;
+
+ memset(&cpu_set, 0, sizeof(cpu_set_t));
+
+ #if defined(_pthread_attr_unsupported_)
+ const f_status_t status = f_thread_attribute_affinity_set(0, &cpu_set, &attribute);
+
+ assert_int_equal(status, F_status_set_error(F_implemented_not));
+ #else
+ int errnos[] = {
+ EINVAL,
+ ENOMEM,
+ mock_errno_generic,
+ };
+
+ f_status_t statuss[] = {
+ F_parameter,
+ F_memory_not,
+ F_failure,
+ };
+
+ for (uint8_t i = 0; i < 3; ++i) {
+
+ will_return(__wrap_pthread_attr_setaffinity_np, true);
+ will_return(__wrap_pthread_attr_setaffinity_np, errnos[i]);
+
+ const f_status_t status = f_thread_attribute_affinity_set(0, &cpu_set, &attribute);
+
+ assert_int_equal(status, F_status_set_error(statuss[i]));
+ } // for
+ #endif // defined(_pthread_attr_unsupported_)
+}
+
+void test__f_thread_attribute_affinity_set__parameter_checking(void **state) {
+
+ cpu_set_t cpu_set;
+
+ memset(&cpu_set, 0, sizeof(cpu_set_t));
+
+ {
+ const f_status_t status = f_thread_attribute_affinity_set(0, &cpu_set, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_thread_attribute_affinity_set__works(void **state) {
+
+ f_thread_attribute_t attribute = f_thread_attribute_t_initialize;
+ cpu_set_t cpu_set;
+
+ memset(&cpu_set, 0, sizeof(cpu_set_t));
+
+ #if defined(_pthread_attr_unsupported_)
+ {
+ const f_status_t status = f_thread_attribute_affinity_set(0, &cpu_set, &attribute);
+
+ assert_int_equal(status, F_status_set_error(F_implemented_not));
+ }
+ #else
+ {
+ will_return(__wrap_pthread_attr_setaffinity_np, false);
+
+ const f_status_t status = f_thread_attribute_affinity_set(0, &cpu_set, &attribute);
+
+ assert_int_equal(status, F_none);
+ }
+ #endif // defined(_pthread_attr_unsupported_)
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the thread project.
+ */
+#ifndef _TEST__F_thread__attribute_affinity_set_h
+#define _TEST__F_thread__attribute_affinity_set_h
+
+/**
+ * Test that function fails.
+ *
+ * @see f_thread_attribute_affinity_set()
+ */
+extern void test__f_thread_attribute_affinity_set__fails(void **state);
+
+/**
+ * Test that parameter checking works as expected.
+ *
+ * @see f_thread_attribute_affinity_set()
+ */
+extern void test__f_thread_attribute_affinity_set__parameter_checking(void **state);
+
+/**
+ * Test that function works.
+ *
+ * @see f_thread_attribute_affinity_set()
+ */
+extern void test__f_thread_attribute_affinity_set__works(void **state);
+
+#endif // _TEST__F_thread__attribute_affinity_set_h
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-attribute_condition_clock_get.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_attribute_condition_clock_get__fails(void **state) {
+
+ f_thread_condition_attribute_t attribute = f_thread_condition_attribute_t_initialize;
+ clockid_t id;
+
+ memset(&id, 0, sizeof(clockid_t));
+
+ int errnos[] = {
+ EINVAL,
+ mock_errno_generic,
+ };
+
+ f_status_t statuss[] = {
+ F_parameter,
+ F_failure,
+ };
+
+ for (uint8_t i = 0; i < 2; ++i) {
+
+ will_return(__wrap_pthread_condattr_getclock, true);
+ will_return(__wrap_pthread_condattr_getclock, errnos[i]);
+
+ const f_status_t status = f_thread_attribute_condition_clock_get(&attribute, &id);
+
+ assert_int_equal(status, F_status_set_error(statuss[i]));
+ } // for
+}
+
+void test__f_thread_attribute_condition_clock_get__parameter_checking(void **state) {
+
+ f_thread_condition_attribute_t attribute = f_thread_condition_attribute_t_initialize;
+
+ {
+ const f_status_t status = f_thread_attribute_condition_clock_get(&attribute, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_thread_attribute_condition_clock_get__works(void **state) {
+
+ f_thread_condition_attribute_t attribute = f_thread_condition_attribute_t_initialize;
+ clockid_t id;
+
+ memset(&id, 0, sizeof(clockid_t));
+
+ {
+ will_return(__wrap_pthread_condattr_getclock, false);
+
+ const f_status_t status = f_thread_attribute_condition_clock_get(&attribute, &id);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the thread project.
+ */
+#ifndef _TEST__F_thread__attribute_condition_clock_get_h
+#define _TEST__F_thread__attribute_condition_clock_get_h
+
+/**
+ * Test that function fails.
+ *
+ * @see f_thread_attribute_condition_clock_get()
+ */
+extern void test__f_thread_attribute_condition_clock_get__fails(void **state);
+
+/**
+ * Test that parameter checking works as expected.
+ *
+ * @see f_thread_attribute_condition_clock_get()
+ */
+extern void test__f_thread_attribute_condition_clock_get__parameter_checking(void **state);
+
+/**
+ * Test that function works.
+ *
+ * @see f_thread_attribute_condition_clock_get()
+ */
+extern void test__f_thread_attribute_condition_clock_get__works(void **state);
+
+#endif // _TEST__F_thread__attribute_condition_clock_get_h
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-attribute_condition_clock_set.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_attribute_condition_clock_set__fails(void **state) {
+
+ f_thread_condition_attribute_t attribute = f_thread_condition_attribute_t_initialize;
+
+ int errnos[] = {
+ EINVAL,
+ mock_errno_generic,
+ };
+
+ f_status_t statuss[] = {
+ F_parameter,
+ F_failure,
+ };
+
+ for (uint8_t i = 0; i < 2; ++i) {
+
+ will_return(__wrap_pthread_condattr_setclock, true);
+ will_return(__wrap_pthread_condattr_setclock, errnos[i]);
+
+ const f_status_t status = f_thread_attribute_condition_clock_set(0, &attribute);
+
+ assert_int_equal(status, F_status_set_error(statuss[i]));
+ } // for
+}
+
+void test__f_thread_attribute_condition_clock_set__parameter_checking(void **state) {
+
+ {
+ const f_status_t status = f_thread_attribute_condition_clock_set(0, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_thread_attribute_condition_clock_set__works(void **state) {
+
+ f_thread_condition_attribute_t attribute = f_thread_condition_attribute_t_initialize;
+
+ {
+ will_return(__wrap_pthread_condattr_setclock, false);
+
+ const f_status_t status = f_thread_attribute_condition_clock_set(0, &attribute);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the thread project.
+ */
+#ifndef _TEST__F_thread__attribute_condition_clock_set_h
+#define _TEST__F_thread__attribute_condition_clock_set_h
+
+/**
+ * Test that function fails.
+ *
+ * @see f_thread_attribute_condition_clock_set()
+ */
+extern void test__f_thread_attribute_condition_clock_set__fails(void **state);
+
+/**
+ * Test that parameter checking works as expected.
+ *
+ * @see f_thread_attribute_condition_clock_set()
+ */
+extern void test__f_thread_attribute_condition_clock_set__parameter_checking(void **state);
+
+/**
+ * Test that function works.
+ *
+ * @see f_thread_attribute_condition_clock_set()
+ */
+extern void test__f_thread_attribute_condition_clock_set__works(void **state);
+
+#endif // _TEST__F_thread__attribute_condition_clock_set_h
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-attribute_condition_shared_get.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_attribute_condition_shared_get__fails(void **state) {
+
+ f_thread_condition_attribute_t attribute = f_thread_condition_attribute_t_initialize;
+ int shared = 0;
+
+ int errnos[] = {
+ EINVAL,
+ mock_errno_generic,
+ };
+
+ f_status_t statuss[] = {
+ F_parameter,
+ F_failure,
+ };
+
+ for (uint8_t i = 0; i < 2; ++i) {
+
+ will_return(__wrap_pthread_condattr_getpshared, true);
+ will_return(__wrap_pthread_condattr_getpshared, errnos[i]);
+
+ const f_status_t status = f_thread_attribute_condition_shared_get(&attribute, &shared);
+
+ assert_int_equal(status, F_status_set_error(statuss[i]));
+ } // for
+}
+
+void test__f_thread_attribute_condition_shared_get__parameter_checking(void **state) {
+
+ f_thread_condition_attribute_t attribute = f_thread_condition_attribute_t_initialize;
+ int shared = 0;
+
+ {
+ const f_status_t status = f_thread_attribute_condition_shared_get(0, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+
+ {
+ const f_status_t status = f_thread_attribute_condition_shared_get(&attribute, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+
+ {
+ const f_status_t status = f_thread_attribute_condition_shared_get(0, &shared);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_thread_attribute_condition_shared_get__works(void **state) {
+
+ f_thread_condition_attribute_t attribute = f_thread_condition_attribute_t_initialize;
+ int shared = 0;
+
+ {
+ will_return(__wrap_pthread_condattr_getpshared, false);
+
+ const f_status_t status = f_thread_attribute_condition_shared_get(&attribute, &shared);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the thread project.
+ */
+#ifndef _TEST__F_thread__attribute_condition_shared_get_h
+#define _TEST__F_thread__attribute_condition_shared_get_h
+
+/**
+ * Test that function fails.
+ *
+ * @see f_thread_attribute_condition_shared_get()
+ */
+extern void test__f_thread_attribute_condition_shared_get__fails(void **state);
+
+/**
+ * Test that parameter checking works as expected.
+ *
+ * @see f_thread_attribute_condition_shared_get()
+ */
+extern void test__f_thread_attribute_condition_shared_get__parameter_checking(void **state);
+
+/**
+ * Test that function works.
+ *
+ * @see f_thread_attribute_condition_shared_get()
+ */
+extern void test__f_thread_attribute_condition_shared_get__works(void **state);
+
+#endif // _TEST__F_thread__attribute_condition_shared_get_h
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-attribute_condition_shared_set.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_attribute_condition_shared_set__fails(void **state) {
+
+ f_thread_condition_attribute_t attribute = f_thread_condition_attribute_t_initialize;
+
+ int errnos[] = {
+ EINVAL,
+ mock_errno_generic,
+ };
+
+ f_status_t statuss[] = {
+ F_parameter,
+ F_failure,
+ };
+
+ for (uint8_t i = 0; i < 2; ++i) {
+
+ will_return(__wrap_pthread_condattr_setpshared, true);
+ will_return(__wrap_pthread_condattr_setpshared, errnos[i]);
+
+ const f_status_t status = f_thread_attribute_condition_shared_set(0, &attribute);
+
+ assert_int_equal(status, F_status_set_error(statuss[i]));
+ } // for
+}
+
+void test__f_thread_attribute_condition_shared_set__parameter_checking(void **state) {
+
+ {
+ const f_status_t status = f_thread_attribute_condition_shared_set(0, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_thread_attribute_condition_shared_set__works(void **state) {
+
+ f_thread_condition_attribute_t attribute = f_thread_condition_attribute_t_initialize;
+
+ {
+ will_return(__wrap_pthread_condattr_setpshared, false);
+
+ const f_status_t status = f_thread_attribute_condition_shared_set(0, &attribute);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the thread project.
+ */
+#ifndef _TEST__F_thread__attribute_condition_shared_set_h
+#define _TEST__F_thread__attribute_condition_shared_set_h
+
+/**
+ * Test that function fails.
+ *
+ * @see f_thread_attribute_condition_shared_set()
+ */
+extern void test__f_thread_attribute_condition_shared_set__fails(void **state);
+
+/**
+ * Test that parameter checking works as expected.
+ *
+ * @see f_thread_attribute_condition_shared_set()
+ */
+extern void test__f_thread_attribute_condition_shared_set__parameter_checking(void **state);
+
+/**
+ * Test that function works.
+ *
+ * @see f_thread_attribute_condition_shared_set()
+ */
+extern void test__f_thread_attribute_condition_shared_set__works(void **state);
+
+#endif // _TEST__F_thread__attribute_condition_shared_set_h
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-attribute_create.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_attribute_create__fails(void **state) {
+
+ f_thread_attribute_t attribute = f_thread_attribute_t_initialize;
+
+ int errnos[] = {
+ ENOMEM,
+ mock_errno_generic,
+ };
+
+ f_status_t statuss[] = {
+ F_memory_not,
+ F_failure,
+ };
+
+ for (uint8_t i = 0; i < 2; ++i) {
+
+ will_return(__wrap_pthread_attr_init, true);
+ will_return(__wrap_pthread_attr_init, errnos[i]);
+
+ const f_status_t status = f_thread_attribute_create(&attribute);
+
+ assert_int_equal(status, F_status_set_error(statuss[i]));
+ } // for
+}
+
+void test__f_thread_attribute_create__parameter_checking(void **state) {
+
+ {
+ const f_status_t status = f_thread_attribute_create(0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_thread_attribute_create__works(void **state) {
+
+ f_thread_attribute_t attribute = f_thread_attribute_t_initialize;
+
+ {
+ will_return(__wrap_pthread_attr_init, false);
+
+ const f_status_t status = f_thread_attribute_create(&attribute);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the thread project.
+ */
+#ifndef _TEST__F_thread__attribute_create_h
+#define _TEST__F_thread__attribute_create_h
+
+/**
+ * Test that function fails.
+ *
+ * @see f_thread_attribute_create()
+ */
+extern void test__f_thread_attribute_create__fails(void **state);
+
+/**
+ * Test that parameter checking works as expected.
+ *
+ * @see f_thread_attribute_create()
+ */
+extern void test__f_thread_attribute_create__parameter_checking(void **state);
+
+/**
+ * Test that function works.
+ *
+ * @see f_thread_attribute_create()
+ */
+extern void test__f_thread_attribute_create__works(void **state);
+
+#endif // _TEST__F_thread__attribute_create_h
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-attribute_default_get.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_attribute_default_get__fails(void **state) {
+
+ f_thread_attribute_t attribute = f_thread_attribute_t_initialize;
+
+ int errnos[] = {
+ EINVAL,
+ mock_errno_generic,
+ };
+
+ f_status_t statuss[] = {
+ F_parameter,
+ F_failure,
+ };
+
+ for (uint8_t i = 0; i < 2; ++i) {
+
+ will_return(__wrap_pthread_getattr_default_np, true);
+ will_return(__wrap_pthread_getattr_default_np, errnos[i]);
+
+ const f_status_t status = f_thread_attribute_default_get(&attribute);
+
+ assert_int_equal(status, F_status_set_error(statuss[i]));
+ } // for
+}
+
+void test__f_thread_attribute_default_get__parameter_checking(void **state) {
+
+ {
+ const f_status_t status = f_thread_attribute_default_get(0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_thread_attribute_default_get__works(void **state) {
+
+ f_thread_attribute_t attribute = f_thread_attribute_t_initialize;
+
+ {
+ will_return(__wrap_pthread_getattr_default_np, false);
+
+ const f_status_t status = f_thread_attribute_default_get(&attribute);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the thread project.
+ */
+#ifndef _TEST__F_thread__attribute_default_get_h
+#define _TEST__F_thread__attribute_default_get_h
+
+/**
+ * Test that function fails.
+ *
+ * @see f_thread_attribute_default_get()
+ */
+extern void test__f_thread_attribute_default_get__fails(void **state);
+
+/**
+ * Test that parameter checking works as expected.
+ *
+ * @see f_thread_attribute_default_get()
+ */
+extern void test__f_thread_attribute_default_get__parameter_checking(void **state);
+
+/**
+ * Test that function works.
+ *
+ * @see f_thread_attribute_default_get()
+ */
+extern void test__f_thread_attribute_default_get__works(void **state);
+
+#endif // _TEST__F_thread__attribute_default_get_h
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-attribute_default_set.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_attribute_default_set__fails(void **state) {
+
+ f_thread_attribute_t attribute = f_thread_attribute_t_initialize;
+
+ int errnos[] = {
+ EINVAL,
+ ENOMEM,
+ mock_errno_generic,
+ };
+
+ f_status_t statuss[] = {
+ F_parameter,
+ F_memory_not,
+ F_failure,
+ };
+
+ for (uint8_t i = 0; i < 3; ++i) {
+
+ will_return(__wrap_pthread_setattr_default_np, true);
+ will_return(__wrap_pthread_setattr_default_np, errnos[i]);
+
+ const f_status_t status = f_thread_attribute_default_set(&attribute);
+
+ assert_int_equal(status, F_status_set_error(statuss[i]));
+ } // for
+}
+
+void test__f_thread_attribute_default_set__parameter_checking(void **state) {
+
+ {
+ const f_status_t status = f_thread_attribute_default_set(0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_thread_attribute_default_set__works(void **state) {
+
+ f_thread_attribute_t attribute = f_thread_attribute_t_initialize;
+
+ {
+ will_return(__wrap_pthread_setattr_default_np, false);
+
+ const f_status_t status = f_thread_attribute_default_set(&attribute);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the thread project.
+ */
+#ifndef _TEST__F_thread__attribute_default_set_h
+#define _TEST__F_thread__attribute_default_set_h
+
+/**
+ * Test that function fails.
+ *
+ * @see f_thread_attribute_default_set()
+ */
+extern void test__f_thread_attribute_default_set__fails(void **state);
+
+/**
+ * Test that parameter checking works as expected.
+ *
+ * @see f_thread_attribute_default_set()
+ */
+extern void test__f_thread_attribute_default_set__parameter_checking(void **state);
+
+/**
+ * Test that function works.
+ *
+ * @see f_thread_attribute_default_set()
+ */
+extern void test__f_thread_attribute_default_set__works(void **state);
+
+#endif // _TEST__F_thread__attribute_default_set_h
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-attribute_delete.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_attribute_delete__fails(void **state) {
+
+ f_thread_attribute_t attribute = f_thread_attribute_t_initialize;
+
+ int errnos[] = {
+ mock_errno_generic,
+ };
+
+ f_status_t statuss[] = {
+ F_failure,
+ };
+
+ for (uint8_t i = 0; i < 1; ++i) {
+
+ will_return(__wrap_pthread_attr_destroy, true);
+ will_return(__wrap_pthread_attr_destroy, errnos[i]);
+
+ const f_status_t status = f_thread_attribute_delete(&attribute);
+
+ assert_int_equal(status, F_status_set_error(statuss[i]));
+ } // for
+}
+
+void test__f_thread_attribute_delete__parameter_checking(void **state) {
+
+ {
+ const f_status_t status = f_thread_attribute_delete(0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_thread_attribute_delete__works(void **state) {
+
+ f_thread_attribute_t attribute = f_thread_attribute_t_initialize;
+
+ {
+ will_return(__wrap_pthread_attr_destroy, false);
+
+ const f_status_t status = f_thread_attribute_delete(&attribute);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the thread project.
+ */
+#ifndef _TEST__F_thread__attribute_delete_h
+#define _TEST__F_thread__attribute_delete_h
+
+/**
+ * Test that function fails.
+ *
+ * @see f_thread_attribute_delete()
+ */
+extern void test__f_thread_attribute_delete__fails(void **state);
+
+/**
+ * Test that parameter checking works as expected.
+ *
+ * @see f_thread_attribute_delete()
+ */
+extern void test__f_thread_attribute_delete__parameter_checking(void **state);
+
+/**
+ * Test that function works.
+ *
+ * @see f_thread_attribute_delete()
+ */
+extern void test__f_thread_attribute_delete__works(void **state);
+
+#endif // _TEST__F_thread__attribute_delete_h
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-attribute_detach_get.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_attribute_detach_get__fails(void **state) {
+
+ f_thread_attribute_t attribute = f_thread_attribute_t_initialize;
+ int state_data = 0;
+
+ int errnos[] = {
+ EINVAL,
+ mock_errno_generic,
+ };
+
+ f_status_t statuss[] = {
+ F_parameter,
+ F_failure,
+ };
+
+ for (uint8_t i = 0; i < 2; ++i) {
+
+ will_return(__wrap_pthread_attr_getdetachstate, true);
+ will_return(__wrap_pthread_attr_getdetachstate, errnos[i]);
+
+ const f_status_t status = f_thread_attribute_detach_get(attribute, &state_data);
+
+ assert_int_equal(status, F_status_set_error(statuss[i]));
+ } // for
+}
+
+void test__f_thread_attribute_detach_get__parameter_checking(void **state) {
+
+ f_thread_attribute_t attribute = f_thread_attribute_t_initialize;
+
+ {
+ const f_status_t status = f_thread_attribute_detach_get(attribute, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_thread_attribute_detach_get__works(void **state) {
+
+ f_thread_attribute_t attribute = f_thread_attribute_t_initialize;
+ int state_data = 0;
+
+ {
+ will_return(__wrap_pthread_attr_getdetachstate, false);
+
+ const f_status_t status = f_thread_attribute_detach_get(attribute, &state_data);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the thread project.
+ */
+#ifndef _TEST__F_thread__attribute_detach_get_h
+#define _TEST__F_thread__attribute_detach_get_h
+
+/**
+ * Test that function fails.
+ *
+ * @see f_thread_attribute_detach_get()
+ */
+extern void test__f_thread_attribute_detach_get__fails(void **state);
+
+/**
+ * Test that parameter checking works as expected.
+ *
+ * @see f_thread_attribute_detach_get()
+ */
+extern void test__f_thread_attribute_detach_get__parameter_checking(void **state);
+
+/**
+ * Test that function works.
+ *
+ * @see f_thread_attribute_detach_get()
+ */
+extern void test__f_thread_attribute_detach_get__works(void **state);
+
+#endif // _TEST__F_thread__attribute_detach_get_h
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-attribute_detach_set.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_attribute_detach_set__fails(void **state) {
+
+ f_thread_attribute_t attribute = f_thread_attribute_t_initialize;
+ int state_data = 0;
+
+ int errnos[] = {
+ EINVAL,
+ mock_errno_generic,
+ };
+
+ f_status_t statuss[] = {
+ F_parameter,
+ F_failure,
+ };
+
+ for (uint8_t i = 0; i < 2; ++i) {
+
+ will_return(__wrap_pthread_attr_setdetachstate, true);
+ will_return(__wrap_pthread_attr_setdetachstate, errnos[i]);
+
+ const f_status_t status = f_thread_attribute_detach_set(state_data, &attribute);
+
+ assert_int_equal(status, F_status_set_error(statuss[i]));
+ } // for
+}
+
+void test__f_thread_attribute_detach_set__parameter_checking(void **state) {
+
+ int state_data = 0;
+
+ {
+ const f_status_t status = f_thread_attribute_detach_set(state_data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_thread_attribute_detach_set__works(void **state) {
+
+ f_thread_attribute_t attribute = f_thread_attribute_t_initialize;
+ int state_data = 0;
+
+ {
+ will_return(__wrap_pthread_attr_setdetachstate, false);
+
+ const f_status_t status = f_thread_attribute_detach_set(state_data, &attribute);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the thread project.
+ */
+#ifndef _TEST__F_thread__attribute_detach_set_h
+#define _TEST__F_thread__attribute_detach_set_h
+
+/**
+ * Test that function fails.
+ *
+ * @see f_thread_attribute_detach_set()
+ */
+extern void test__f_thread_attribute_detach_set__fails(void **state);
+
+/**
+ * Test that parameter checking works as expected.
+ *
+ * @see f_thread_attribute_detach_set()
+ */
+extern void test__f_thread_attribute_detach_set__parameter_checking(void **state);
+
+/**
+ * Test that function works.
+ *
+ * @see f_thread_attribute_detach_set()
+ */
+extern void test__f_thread_attribute_detach_set__works(void **state);
+
+#endif // _TEST__F_thread__attribute_detach_set_h
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-attribute_guard_get.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_attribute_guard_get__fails(void **state) {
+
+ f_thread_attribute_t attribute = f_thread_attribute_t_initialize;
+ size_t guard = 0;
+
+ int errnos[] = {
+ EINVAL,
+ mock_errno_generic,
+ };
+
+ f_status_t statuss[] = {
+ F_parameter,
+ F_failure,
+ };
+
+ for (uint8_t i = 0; i < 2; ++i) {
+
+ will_return(__wrap_pthread_attr_getguardsize, true);
+ will_return(__wrap_pthread_attr_getguardsize, errnos[i]);
+
+ const f_status_t status = f_thread_attribute_guard_get(attribute, &guard);
+
+ assert_int_equal(status, F_status_set_error(statuss[i]));
+ } // for
+}
+
+void test__f_thread_attribute_guard_get__parameter_checking(void **state) {
+
+ f_thread_attribute_t attribute = f_thread_attribute_t_initialize;
+
+ {
+ const f_status_t status = f_thread_attribute_guard_get(attribute, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_thread_attribute_guard_get__works(void **state) {
+
+ f_thread_attribute_t attribute = f_thread_attribute_t_initialize;
+ size_t guard = 0;
+
+ {
+ will_return(__wrap_pthread_attr_getguardsize, false);
+
+ const f_status_t status = f_thread_attribute_guard_get(attribute, &guard);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the thread project.
+ */
+#ifndef _TEST__F_thread__attribute_guard_get_h
+#define _TEST__F_thread__attribute_guard_get_h
+
+/**
+ * Test that function fails.
+ *
+ * @see f_thread_attribute_guard_get()
+ */
+extern void test__f_thread_attribute_guard_get__fails(void **state);
+
+/**
+ * Test that parameter checking works as expected.
+ *
+ * @see f_thread_attribute_guard_get()
+ */
+extern void test__f_thread_attribute_guard_get__parameter_checking(void **state);
+
+/**
+ * Test that function works.
+ *
+ * @see f_thread_attribute_guard_get()
+ */
+extern void test__f_thread_attribute_guard_get__works(void **state);
+
+#endif // _TEST__F_thread__attribute_guard_get_h
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-attribute_guard_set.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_attribute_guard_set__fails(void **state) {
+
+ f_thread_attribute_t attribute = f_thread_attribute_t_initialize;
+ size_t guard = 0;
+
+ int errnos[] = {
+ EINVAL,
+ mock_errno_generic,
+ };
+
+ f_status_t statuss[] = {
+ F_parameter,
+ F_failure,
+ };
+
+ for (uint8_t i = 0; i < 2; ++i) {
+
+ will_return(__wrap_pthread_attr_setguardsize, true);
+ will_return(__wrap_pthread_attr_setguardsize, errnos[i]);
+
+ const f_status_t status = f_thread_attribute_guard_set(guard, &attribute);
+
+ assert_int_equal(status, F_status_set_error(statuss[i]));
+ } // for
+}
+
+void test__f_thread_attribute_guard_set__parameter_checking(void **state) {
+
+ size_t guard = 0;
+
+ {
+ const f_status_t status = f_thread_attribute_guard_set(guard, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_thread_attribute_guard_set__works(void **state) {
+
+ f_thread_attribute_t attribute = f_thread_attribute_t_initialize;
+ size_t guard = 0;
+
+ {
+ will_return(__wrap_pthread_attr_setguardsize, false);
+
+ const f_status_t status = f_thread_attribute_guard_set(guard, &attribute);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the thread project.
+ */
+#ifndef _TEST__F_thread__attribute_guard_set_h
+#define _TEST__F_thread__attribute_guard_set_h
+
+/**
+ * Test that function fails.
+ *
+ * @see f_thread_attribute_guard_set()
+ */
+extern void test__f_thread_attribute_guard_set__fails(void **state);
+
+/**
+ * Test that parameter checking works as expected.
+ *
+ * @see f_thread_attribute_guard_set()
+ */
+extern void test__f_thread_attribute_guard_set__parameter_checking(void **state);
+
+/**
+ * Test that function works.
+ *
+ * @see f_thread_attribute_guard_set()
+ */
+extern void test__f_thread_attribute_guard_set__works(void **state);
+
+#endif // _TEST__F_thread__attribute_guard_set_h
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-attribute_scheduler_inherit_get.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_attribute_scheduler_inherit_get__fails(void **state) {
+
+ f_thread_attribute_t attribute = f_thread_attribute_t_initialize;
+ int inherit = 0;
+
+ int errnos[] = {
+ EINVAL,
+ mock_errno_generic,
+ };
+
+ f_status_t statuss[] = {
+ F_parameter,
+ F_failure,
+ };
+
+ for (uint8_t i = 0; i < 2; ++i) {
+
+ will_return(__wrap_pthread_attr_getinheritsched, true);
+ will_return(__wrap_pthread_attr_getinheritsched, errnos[i]);
+
+ const f_status_t status = f_thread_attribute_scheduler_inherit_get(attribute, &inherit);
+
+ assert_int_equal(status, F_status_set_error(statuss[i]));
+ } // for
+}
+
+void test__f_thread_attribute_scheduler_inherit_get__parameter_checking(void **state) {
+
+ f_thread_attribute_t attribute = f_thread_attribute_t_initialize;
+
+ {
+ const f_status_t status = f_thread_attribute_scheduler_inherit_get(attribute, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_thread_attribute_scheduler_inherit_get__works(void **state) {
+
+ f_thread_attribute_t attribute = f_thread_attribute_t_initialize;
+ int inherit = 0;
+
+ {
+ will_return(__wrap_pthread_attr_getinheritsched, false);
+
+ const f_status_t status = f_thread_attribute_scheduler_inherit_get(attribute, &inherit);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the thread project.
+ */
+#ifndef _TEST__F_thread__attribute_scheduler_inherit_get_h
+#define _TEST__F_thread__attribute_scheduler_inherit_get_h
+
+/**
+ * Test that function fails.
+ *
+ * @see f_thread_attribute_scheduler_inherit_get()
+ */
+extern void test__f_thread_attribute_scheduler_inherit_get__fails(void **state);
+
+/**
+ * Test that parameter checking works as expected.
+ *
+ * @see f_thread_attribute_scheduler_inherit_get()
+ */
+extern void test__f_thread_attribute_scheduler_inherit_get__parameter_checking(void **state);
+
+/**
+ * Test that function works.
+ *
+ * @see f_thread_attribute_scheduler_inherit_get()
+ */
+extern void test__f_thread_attribute_scheduler_inherit_get__works(void **state);
+
+#endif // _TEST__F_thread__attribute_scheduler_inherit_get_h
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-attribute_scheduler_inherit_set.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_attribute_scheduler_inherit_set__fails(void **state) {
+
+ f_thread_attribute_t attribute = f_thread_attribute_t_initialize;
+ int inherit = 0;
+
+ int errnos[] = {
+ EINVAL,
+ mock_errno_generic,
+ };
+
+ f_status_t statuss[] = {
+ F_parameter,
+ F_failure,
+ };
+
+ for (uint8_t i = 0; i < 2; ++i) {
+
+ will_return(__wrap_pthread_attr_setinheritsched, true);
+ will_return(__wrap_pthread_attr_setinheritsched, errnos[i]);
+
+ const f_status_t status = f_thread_attribute_scheduler_inherit_set(inherit, &attribute);
+
+ assert_int_equal(status, F_status_set_error(statuss[i]));
+ } // for
+}
+
+void test__f_thread_attribute_scheduler_inherit_set__parameter_checking(void **state) {
+
+ int inherit = 0;
+
+ {
+ const f_status_t status = f_thread_attribute_scheduler_inherit_set(inherit, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_thread_attribute_scheduler_inherit_set__works(void **state) {
+
+ f_thread_attribute_t attribute = f_thread_attribute_t_initialize;
+ int inherit = 0;
+
+ {
+ will_return(__wrap_pthread_attr_setinheritsched, false);
+
+ const f_status_t status = f_thread_attribute_scheduler_inherit_set(inherit, &attribute);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the thread project.
+ */
+#ifndef _TEST__F_thread__attribute_scheduler_inherit_set_h
+#define _TEST__F_thread__attribute_scheduler_inherit_set_h
+
+/**
+ * Test that function fails.
+ *
+ * @see f_thread_attribute_scheduler_inherit_set()
+ */
+extern void test__f_thread_attribute_scheduler_inherit_set__fails(void **state);
+
+/**
+ * Test that parameter checking works as expected.
+ *
+ * @see f_thread_attribute_scheduler_inherit_set()
+ */
+extern void test__f_thread_attribute_scheduler_inherit_set__parameter_checking(void **state);
+
+/**
+ * Test that function works.
+ *
+ * @see f_thread_attribute_scheduler_inherit_set()
+ */
+extern void test__f_thread_attribute_scheduler_inherit_set__works(void **state);
+
+#endif // _TEST__F_thread__attribute_scheduler_inherit_set_h
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-attribute_scheduler_parameter_get.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_attribute_scheduler_parameter_get__fails(void **state) {
+
+ f_thread_attribute_t attribute = f_thread_attribute_t_initialize;
+ struct sched_param parameter;
+
+ memset(¶meter, 0, sizeof(struct sched_param));
+
+ int errnos[] = {
+ EINVAL,
+ mock_errno_generic,
+ };
+
+ f_status_t statuss[] = {
+ F_parameter,
+ F_failure,
+ };
+
+ for (uint8_t i = 0; i < 2; ++i) {
+
+ will_return(__wrap_pthread_attr_getschedparam, true);
+ will_return(__wrap_pthread_attr_getschedparam, errnos[i]);
+
+ const f_status_t status = f_thread_attribute_scheduler_parameter_get(attribute, ¶meter);
+
+ assert_int_equal(status, F_status_set_error(statuss[i]));
+ } // for
+}
+
+void test__f_thread_attribute_scheduler_parameter_get__parameter_checking(void **state) {
+
+ f_thread_attribute_t attribute = f_thread_attribute_t_initialize;
+
+ {
+ const f_status_t status = f_thread_attribute_scheduler_parameter_get(attribute, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_thread_attribute_scheduler_parameter_get__works(void **state) {
+
+ f_thread_attribute_t attribute = f_thread_attribute_t_initialize;
+ struct sched_param parameter;
+
+ memset(¶meter, 0, sizeof(struct sched_param));
+
+ {
+ will_return(__wrap_pthread_attr_getschedparam, false);
+
+ const f_status_t status = f_thread_attribute_scheduler_parameter_get(attribute, ¶meter);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the thread project.
+ */
+#ifndef _TEST__F_thread__attribute_scheduler_parameter_get_h
+#define _TEST__F_thread__attribute_scheduler_parameter_get_h
+
+/**
+ * Test that function fails.
+ *
+ * @see f_thread_attribute_scheduler_parameter_get()
+ */
+extern void test__f_thread_attribute_scheduler_parameter_get__fails(void **state);
+
+/**
+ * Test that parameter checking works as expected.
+ *
+ * @see f_thread_attribute_scheduler_parameter_get()
+ */
+extern void test__f_thread_attribute_scheduler_parameter_get__parameter_checking(void **state);
+
+/**
+ * Test that function works.
+ *
+ * @see f_thread_attribute_scheduler_parameter_get()
+ */
+extern void test__f_thread_attribute_scheduler_parameter_get__works(void **state);
+
+#endif // _TEST__F_thread__attribute_scheduler_parameter_get_h
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-attribute_scheduler_parameter_set.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_attribute_scheduler_parameter_set__fails(void **state) {
+
+ f_thread_attribute_t attribute = f_thread_attribute_t_initialize;
+ struct sched_param parameter;
+
+ memset(¶meter, 0, sizeof(struct sched_param));
+
+ int errnos[] = {
+ EINVAL,
+ mock_errno_generic,
+ };
+
+ f_status_t statuss[] = {
+ F_parameter,
+ F_failure,
+ };
+
+ for (uint8_t i = 0; i < 2; ++i) {
+
+ will_return(__wrap_pthread_attr_setschedparam, true);
+ will_return(__wrap_pthread_attr_setschedparam, errnos[i]);
+
+ const f_status_t status = f_thread_attribute_scheduler_parameter_set(parameter, &attribute);
+
+ assert_int_equal(status, F_status_set_error(statuss[i]));
+ } // for
+}
+
+void test__f_thread_attribute_scheduler_parameter_set__parameter_checking(void **state) {
+
+ struct sched_param parameter;
+
+ memset(¶meter, 0, sizeof(struct sched_param));
+
+ {
+ const f_status_t status = f_thread_attribute_scheduler_parameter_set(parameter, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_thread_attribute_scheduler_parameter_set__works(void **state) {
+
+ f_thread_attribute_t attribute = f_thread_attribute_t_initialize;
+ struct sched_param parameter;
+
+ memset(¶meter, 0, sizeof(struct sched_param));
+
+ {
+ will_return(__wrap_pthread_attr_setschedparam, false);
+
+ const f_status_t status = f_thread_attribute_scheduler_parameter_set(parameter, &attribute);
+
+ assert_int_equal(status, F_none);
+ }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the thread project.
+ */
+#ifndef _TEST__F_thread__attribute_scheduler_parameter_set_h
+#define _TEST__F_thread__attribute_scheduler_parameter_set_h
+
+/**
+ * Test that function fails.
+ *
+ * @see f_thread_attribute_scheduler_parameter_set()
+ */
+extern void test__f_thread_attribute_scheduler_parameter_set__fails(void **state);
+
+/**
+ * Test that parameter checking works as expected.
+ *
+ * @see f_thread_attribute_scheduler_parameter_set()
+ */
+extern void test__f_thread_attribute_scheduler_parameter_set__parameter_checking(void **state);
+
+/**
+ * Test that function works.
+ *
+ * @see f_thread_attribute_scheduler_parameter_set()
+ */
+extern void test__f_thread_attribute_scheduler_parameter_set__works(void **state);
+
+#endif // _TEST__F_thread__attribute_scheduler_parameter_set_h
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-attributes_adjust.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_attributes_adjust__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_attributes_t data = f_thread_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_attributes_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_thread_attributes_adjust__works(void **state) {
+
+ const int length = 5;
+ f_thread_attributes_t data = f_thread_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_attributes_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_attributes_adjust
+#define _TEST__F_thread__thread_attributes_adjust
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_attributes_adjust()
+ */
+extern void test__f_thread_attributes_adjust__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_attributes_adjust()
+ */
+extern void test__f_thread_attributes_adjust__works(void **state);
+
+#endif // _TEST__F_thread__thread_attributes_adjust
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-attributes_decimate_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_attributes_decimate_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_attributes_t data = f_thread_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_attributes_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_thread_attributes_decimate_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_attributes_t data = f_thread_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_attributes_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_thread_attributes_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_thread_attributes_decimate_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_attributes_t data = f_thread_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_attributes_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ for (uint8_t i = 0; i < length; ++i) {
+ will_return(__wrap_pthread_attr_destroy, false);
+ } // for
+
+ const f_status_t status = f_thread_attributes_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_attributes_decimate_by
+#define _TEST__F_thread__thread_attributes_decimate_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_attributes_decimate_by()
+ */
+extern void test__f_thread_attributes_decimate_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_attributes_decimate_by()
+ */
+extern void test__f_thread_attributes_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_attributes_decimate_by()
+ */
+extern void test__f_thread_attributes_decimate_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_attributes_decimate_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-attributes_decrease_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_attributes_decrease_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_attributes_t data = f_thread_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_attributes_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_thread_attributes_decrease_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_attributes_t data = f_thread_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_attributes_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_thread_attributes_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_thread_attributes_decrease_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_attributes_t data = f_thread_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_attributes_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ for (uint8_t i = 0; i < length; ++i) {
+ will_return(__wrap_pthread_attr_destroy, false);
+ } // for
+
+ const f_status_t status = f_thread_attributes_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_attributes_decrease_by
+#define _TEST__F_thread__thread_attributes_decrease_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_attributes_decrease_by()
+ */
+extern void test__f_thread_attributes_decrease_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_attributes_decrease_by()
+ */
+extern void test__f_thread_attributes_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_attributes_decrease_by()
+ */
+extern void test__f_thread_attributes_decrease_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_attributes_decrease_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-attributes_increase.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_attributes_increase__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_attributes_t data = f_thread_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_attributes_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_thread_attributes_increase__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_attributes_t data = f_thread_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_attributes_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_thread_attributes_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_thread_attributes_increase__works(void **state) {
+
+ const int length = 5;
+ f_thread_attributes_t data = f_thread_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_attributes_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_thread_attributes_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_attributes_increase
+#define _TEST__F_thread__thread_attributes_increase
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_attributes_increase()
+ */
+extern void test__f_thread_attributes_increase__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_attributes_increase()
+ */
+extern void test__f_thread_attributes_increase__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_attributes_increase()
+ */
+extern void test__f_thread_attributes_increase__works(void **state);
+
+#endif // _TEST__F_thread__thread_attributes_increase
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-attributes_increase_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_attributes_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_attributes_t data = f_thread_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_attributes_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_thread_attributes_increase_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_attributes_t data = f_thread_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_attributes_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_thread_attributes_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_thread_attributes_increase_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_attributes_t data = f_thread_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_attributes_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_thread_attributes_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_attributes_increase_by
+#define _TEST__F_thread__thread_attributes_increase_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_attributes_increase_by()
+ */
+extern void test__f_thread_attributes_increase_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_attributes_increase_by()
+ */
+extern void test__f_thread_attributes_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_attributes_increase_by()
+ */
+extern void test__f_thread_attributes_increase_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_attributes_increase_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-attributes_resize.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_attributes_resize__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_attributes_t data = f_thread_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_attributes_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_thread_attributes_resize__works(void **state) {
+
+ const int length = 5;
+ f_thread_attributes_t data = f_thread_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_attributes_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_attributes_resize
+#define _TEST__F_thread__thread_attributes_resize
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_attributes_resize()
+ */
+extern void test__f_thread_attributes_resize__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_attributes_resize()
+ */
+extern void test__f_thread_attributes_resize__works(void **state);
+
+#endif // _TEST__F_thread__thread_attributes_resize
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-barrier_attributes_adjust.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_barrier_attributes_adjust__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_barrier_attributes_t data = f_thread_barrier_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_barrier_attributes_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_thread_barrier_attributes_adjust__works(void **state) {
+
+ const int length = 5;
+ f_thread_barrier_attributes_t data = f_thread_barrier_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_barrier_attributes_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_barrier_attributes_adjust
+#define _TEST__F_thread__thread_barrier_attributes_adjust
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_barrier_attributes_adjust()
+ */
+extern void test__f_thread_barrier_attributes_adjust__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_barrier_attributes_adjust()
+ */
+extern void test__f_thread_barrier_attributes_adjust__works(void **state);
+
+#endif // _TEST__F_thread__thread_barrier_attributes_adjust
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-barrier_attributes_decimate_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_barrier_attributes_decimate_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_barrier_attributes_t data = f_thread_barrier_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_barrier_attributes_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_thread_barrier_attributes_decimate_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_barrier_attributes_t data = f_thread_barrier_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_barrier_attributes_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_thread_barrier_attributes_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_thread_barrier_attributes_decimate_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_barrier_attributes_t data = f_thread_barrier_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_barrier_attributes_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_thread_barrier_attributes_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_barrier_attributes_decimate_by
+#define _TEST__F_thread__thread_barrier_attributes_decimate_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_barrier_attributes_decimate_by()
+ */
+extern void test__f_thread_barrier_attributes_decimate_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_barrier_attributes_decimate_by()
+ */
+extern void test__f_thread_barrier_attributes_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_barrier_attributes_decimate_by()
+ */
+extern void test__f_thread_barrier_attributes_decimate_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_barrier_attributes_decimate_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-barrier_attributes_decrease_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_barrier_attributes_decrease_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_barrier_attributes_t data = f_thread_barrier_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_barrier_attributes_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_thread_barrier_attributes_decrease_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_barrier_attributes_t data = f_thread_barrier_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_barrier_attributes_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_thread_barrier_attributes_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_thread_barrier_attributes_decrease_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_barrier_attributes_t data = f_thread_barrier_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_barrier_attributes_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_thread_barrier_attributes_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_barrier_attributes_decrease_by
+#define _TEST__F_thread__thread_barrier_attributes_decrease_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_barrier_attributes_decrease_by()
+ */
+extern void test__f_thread_barrier_attributes_decrease_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_barrier_attributes_decrease_by()
+ */
+extern void test__f_thread_barrier_attributes_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_barrier_attributes_decrease_by()
+ */
+extern void test__f_thread_barrier_attributes_decrease_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_barrier_attributes_decrease_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-barrier_attributes_increase.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_barrier_attributes_increase__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_barrier_attributes_t data = f_thread_barrier_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_barrier_attributes_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_thread_barrier_attributes_increase__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_barrier_attributes_t data = f_thread_barrier_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_barrier_attributes_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_thread_barrier_attributes_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_thread_barrier_attributes_increase__works(void **state) {
+
+ const int length = 5;
+ f_thread_barrier_attributes_t data = f_thread_barrier_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_barrier_attributes_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_thread_barrier_attributes_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_barrier_attributes_increase
+#define _TEST__F_thread__thread_barrier_attributes_increase
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_barrier_attributes_increase()
+ */
+extern void test__f_thread_barrier_attributes_increase__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_barrier_attributes_increase()
+ */
+extern void test__f_thread_barrier_attributes_increase__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_barrier_attributes_increase()
+ */
+extern void test__f_thread_barrier_attributes_increase__works(void **state);
+
+#endif // _TEST__F_thread__thread_barrier_attributes_increase
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-barrier_attributes_increase_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_barrier_attributes_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_barrier_attributes_t data = f_thread_barrier_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_barrier_attributes_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_thread_barrier_attributes_increase_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_barrier_attributes_t data = f_thread_barrier_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_barrier_attributes_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_thread_barrier_attributes_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_thread_barrier_attributes_increase_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_barrier_attributes_t data = f_thread_barrier_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_barrier_attributes_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_thread_barrier_attributes_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_barrier_attributes_increase_by
+#define _TEST__F_thread__thread_barrier_attributes_increase_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_barrier_attributes_increase_by()
+ */
+extern void test__f_thread_barrier_attributes_increase_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_barrier_attributes_increase_by()
+ */
+extern void test__f_thread_barrier_attributes_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_barrier_attributes_increase_by()
+ */
+extern void test__f_thread_barrier_attributes_increase_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_barrier_attributes_increase_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-barrier_attributes_resize.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_barrier_attributes_resize__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_barrier_attributes_t data = f_thread_barrier_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_barrier_attributes_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_thread_barrier_attributes_resize__works(void **state) {
+
+ const int length = 5;
+ f_thread_barrier_attributes_t data = f_thread_barrier_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_barrier_attributes_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_barrier_attributes_resize
+#define _TEST__F_thread__thread_barrier_attributes_resize
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_barrier_attributes_resize()
+ */
+extern void test__f_thread_barrier_attributes_resize__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_barrier_attributes_resize()
+ */
+extern void test__f_thread_barrier_attributes_resize__works(void **state);
+
+#endif // _TEST__F_thread__thread_barrier_attributes_resize
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-barriers_adjust.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_barriers_adjust__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_barriers_t data = f_thread_barriers_t_initialize;
+
+ {
+ const f_status_t status = f_thread_barriers_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_thread_barriers_adjust__works(void **state) {
+
+ const int length = 5;
+ f_thread_barriers_t data = f_thread_barriers_t_initialize;
+
+ {
+ const f_status_t status = f_thread_barriers_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_barriers_adjust
+#define _TEST__F_thread__thread_barriers_adjust
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_barriers_adjust()
+ */
+extern void test__f_thread_barriers_adjust__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_barriers_adjust()
+ */
+extern void test__f_thread_barriers_adjust__works(void **state);
+
+#endif // _TEST__F_thread__thread_barriers_adjust
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-barriers_decimate_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_barriers_decimate_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_barriers_t data = f_thread_barriers_t_initialize;
+
+ {
+ const f_status_t status = f_thread_barriers_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_thread_barriers_decimate_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_barriers_t data = f_thread_barriers_t_initialize;
+
+ {
+ const f_status_t status = f_thread_barriers_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_thread_barriers_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_thread_barriers_decimate_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_barriers_t data = f_thread_barriers_t_initialize;
+
+ {
+ const f_status_t status = f_thread_barriers_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ for (uint8_t i = 0; i < length; ++i) {
+ will_return(__wrap_pthread_barrier_destroy, F_false);
+ } // for
+
+ const f_status_t status = f_thread_barriers_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_barriers_decimate_by
+#define _TEST__F_thread__thread_barriers_decimate_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_barriers_decimate_by()
+ */
+extern void test__f_thread_barriers_decimate_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_barriers_decimate_by()
+ */
+extern void test__f_thread_barriers_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_barriers_decimate_by()
+ */
+extern void test__f_thread_barriers_decimate_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_barriers_decimate_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-barriers_decrease_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_barriers_decrease_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_barriers_t data = f_thread_barriers_t_initialize;
+
+ {
+ const f_status_t status = f_thread_barriers_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_thread_barriers_decrease_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_barriers_t data = f_thread_barriers_t_initialize;
+
+ {
+ const f_status_t status = f_thread_barriers_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_thread_barriers_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_thread_barriers_decrease_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_barriers_t data = f_thread_barriers_t_initialize;
+
+ {
+ const f_status_t status = f_thread_barriers_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ for (uint8_t i = 0; i < length; ++i) {
+ will_return(__wrap_pthread_barrier_destroy, F_false);
+ } // for
+
+ const f_status_t status = f_thread_barriers_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_barriers_decrease_by
+#define _TEST__F_thread__thread_barriers_decrease_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_barriers_decrease_by()
+ */
+extern void test__f_thread_barriers_decrease_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_barriers_decrease_by()
+ */
+extern void test__f_thread_barriers_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_barriers_decrease_by()
+ */
+extern void test__f_thread_barriers_decrease_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_barriers_decrease_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-barriers_increase.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_barriers_increase__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_barriers_t data = f_thread_barriers_t_initialize;
+
+ {
+ const f_status_t status = f_thread_barriers_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_thread_barriers_increase__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_barriers_t data = f_thread_barriers_t_initialize;
+
+ {
+ const f_status_t status = f_thread_barriers_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_thread_barriers_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_thread_barriers_increase__works(void **state) {
+
+ const int length = 5;
+ f_thread_barriers_t data = f_thread_barriers_t_initialize;
+
+ {
+ const f_status_t status = f_thread_barriers_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_thread_barriers_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_barriers_increase
+#define _TEST__F_thread__thread_barriers_increase
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_barriers_increase()
+ */
+extern void test__f_thread_barriers_increase__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_barriers_increase()
+ */
+extern void test__f_thread_barriers_increase__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_barriers_increase()
+ */
+extern void test__f_thread_barriers_increase__works(void **state);
+
+#endif // _TEST__F_thread__thread_barriers_increase
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-barriers_increase_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_barriers_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_barriers_t data = f_thread_barriers_t_initialize;
+
+ {
+ const f_status_t status = f_thread_barriers_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_thread_barriers_increase_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_barriers_t data = f_thread_barriers_t_initialize;
+
+ {
+ const f_status_t status = f_thread_barriers_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_thread_barriers_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_thread_barriers_increase_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_barriers_t data = f_thread_barriers_t_initialize;
+
+ {
+ const f_status_t status = f_thread_barriers_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_thread_barriers_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_barriers_increase_by
+#define _TEST__F_thread__thread_barriers_increase_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_barriers_increase_by()
+ */
+extern void test__f_thread_barriers_increase_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_barriers_increase_by()
+ */
+extern void test__f_thread_barriers_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_barriers_increase_by()
+ */
+extern void test__f_thread_barriers_increase_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_barriers_increase_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-barriers_resize.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_barriers_resize__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_barriers_t data = f_thread_barriers_t_initialize;
+
+ {
+ const f_status_t status = f_thread_barriers_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_thread_barriers_resize__works(void **state) {
+
+ const int length = 5;
+ f_thread_barriers_t data = f_thread_barriers_t_initialize;
+
+ {
+ const f_status_t status = f_thread_barriers_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_barriers_resize
+#define _TEST__F_thread__thread_barriers_resize
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_barriers_resize()
+ */
+extern void test__f_thread_barriers_resize__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_barriers_resize()
+ */
+extern void test__f_thread_barriers_resize__works(void **state);
+
+#endif // _TEST__F_thread__thread_barriers_resize
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-condition_attributes_adjust.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_condition_attributes_adjust__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_condition_attributes_t data = f_thread_condition_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_condition_attributes_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_thread_condition_attributes_adjust__works(void **state) {
+
+ const int length = 5;
+ f_thread_condition_attributes_t data = f_thread_condition_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_condition_attributes_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_condition_attributes_adjust
+#define _TEST__F_thread__thread_condition_attributes_adjust
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_condition_attributes_adjust()
+ */
+extern void test__f_thread_condition_attributes_adjust__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_condition_attributes_adjust()
+ */
+extern void test__f_thread_condition_attributes_adjust__works(void **state);
+
+#endif // _TEST__F_thread__thread_condition_attributes_adjust
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-condition_attributes_decimate_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_condition_attributes_decimate_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_condition_attributes_t data = f_thread_condition_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_condition_attributes_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_thread_condition_attributes_decimate_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_condition_attributes_t data = f_thread_condition_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_condition_attributes_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_thread_condition_attributes_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_thread_condition_attributes_decimate_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_condition_attributes_t data = f_thread_condition_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_condition_attributes_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_thread_condition_attributes_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_condition_attributes_decimate_by
+#define _TEST__F_thread__thread_condition_attributes_decimate_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_condition_attributes_decimate_by()
+ */
+extern void test__f_thread_condition_attributes_decimate_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_condition_attributes_decimate_by()
+ */
+extern void test__f_thread_condition_attributes_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_condition_attributes_decimate_by()
+ */
+extern void test__f_thread_condition_attributes_decimate_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_condition_attributes_decimate_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-condition_attributes_decrease_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_condition_attributes_decrease_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_condition_attributes_t data = f_thread_condition_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_condition_attributes_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_thread_condition_attributes_decrease_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_condition_attributes_t data = f_thread_condition_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_condition_attributes_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_thread_condition_attributes_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_thread_condition_attributes_decrease_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_condition_attributes_t data = f_thread_condition_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_condition_attributes_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_thread_condition_attributes_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_condition_attributes_decrease_by
+#define _TEST__F_thread__thread_condition_attributes_decrease_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_condition_attributes_decrease_by()
+ */
+extern void test__f_thread_condition_attributes_decrease_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_condition_attributes_decrease_by()
+ */
+extern void test__f_thread_condition_attributes_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_condition_attributes_decrease_by()
+ */
+extern void test__f_thread_condition_attributes_decrease_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_condition_attributes_decrease_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-condition_attributes_increase.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_condition_attributes_increase__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_condition_attributes_t data = f_thread_condition_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_condition_attributes_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_thread_condition_attributes_increase__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_condition_attributes_t data = f_thread_condition_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_condition_attributes_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_thread_condition_attributes_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_thread_condition_attributes_increase__works(void **state) {
+
+ const int length = 5;
+ f_thread_condition_attributes_t data = f_thread_condition_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_condition_attributes_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_thread_condition_attributes_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_condition_attributes_increase
+#define _TEST__F_thread__thread_condition_attributes_increase
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_condition_attributes_increase()
+ */
+extern void test__f_thread_condition_attributes_increase__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_condition_attributes_increase()
+ */
+extern void test__f_thread_condition_attributes_increase__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_condition_attributes_increase()
+ */
+extern void test__f_thread_condition_attributes_increase__works(void **state);
+
+#endif // _TEST__F_thread__thread_condition_attributes_increase
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-condition_attributes_increase_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_condition_attributes_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_condition_attributes_t data = f_thread_condition_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_condition_attributes_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_thread_condition_attributes_increase_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_condition_attributes_t data = f_thread_condition_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_condition_attributes_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_thread_condition_attributes_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_thread_condition_attributes_increase_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_condition_attributes_t data = f_thread_condition_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_condition_attributes_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_thread_condition_attributes_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_condition_attributes_increase_by
+#define _TEST__F_thread__thread_condition_attributes_increase_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_condition_attributes_increase_by()
+ */
+extern void test__f_thread_condition_attributes_increase_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_condition_attributes_increase_by()
+ */
+extern void test__f_thread_condition_attributes_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_condition_attributes_increase_by()
+ */
+extern void test__f_thread_condition_attributes_increase_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_condition_attributes_increase_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-condition_attributes_resize.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_condition_attributes_resize__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_condition_attributes_t data = f_thread_condition_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_condition_attributes_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_thread_condition_attributes_resize__works(void **state) {
+
+ const int length = 5;
+ f_thread_condition_attributes_t data = f_thread_condition_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_condition_attributes_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_condition_attributes_resize
+#define _TEST__F_thread__thread_condition_attributes_resize
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_condition_attributes_resize()
+ */
+extern void test__f_thread_condition_attributes_resize__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_condition_attributes_resize()
+ */
+extern void test__f_thread_condition_attributes_resize__works(void **state);
+
+#endif // _TEST__F_thread__thread_condition_attributes_resize
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-conditions_adjust.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_conditions_adjust__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_conditions_t data = f_thread_conditions_t_initialize;
+
+ {
+ const f_status_t status = f_thread_conditions_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_thread_conditions_adjust__works(void **state) {
+
+ const int length = 5;
+ f_thread_conditions_t data = f_thread_conditions_t_initialize;
+
+ {
+ const f_status_t status = f_thread_conditions_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_conditions_adjust
+#define _TEST__F_thread__thread_conditions_adjust
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_conditions_adjust()
+ */
+extern void test__f_thread_conditions_adjust__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_conditions_adjust()
+ */
+extern void test__f_thread_conditions_adjust__works(void **state);
+
+#endif // _TEST__F_thread__thread_conditions_adjust
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-conditions_decimate_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_conditions_decimate_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_conditions_t data = f_thread_conditions_t_initialize;
+
+ {
+ const f_status_t status = f_thread_conditions_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_thread_conditions_decimate_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_conditions_t data = f_thread_conditions_t_initialize;
+
+ {
+ const f_status_t status = f_thread_conditions_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_thread_conditions_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_thread_conditions_decimate_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_conditions_t data = f_thread_conditions_t_initialize;
+
+ {
+ const f_status_t status = f_thread_conditions_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_thread_conditions_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_conditions_decimate_by
+#define _TEST__F_thread__thread_conditions_decimate_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_conditions_decimate_by()
+ */
+extern void test__f_thread_conditions_decimate_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_conditions_decimate_by()
+ */
+extern void test__f_thread_conditions_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_conditions_decimate_by()
+ */
+extern void test__f_thread_conditions_decimate_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_conditions_decimate_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-conditions_decrease_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_conditions_decrease_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_conditions_t data = f_thread_conditions_t_initialize;
+
+ {
+ const f_status_t status = f_thread_conditions_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_thread_conditions_decrease_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_conditions_t data = f_thread_conditions_t_initialize;
+
+ {
+ const f_status_t status = f_thread_conditions_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_thread_conditions_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_thread_conditions_decrease_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_conditions_t data = f_thread_conditions_t_initialize;
+
+ {
+ const f_status_t status = f_thread_conditions_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_thread_conditions_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_conditions_decrease_by
+#define _TEST__F_thread__thread_conditions_decrease_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_conditions_decrease_by()
+ */
+extern void test__f_thread_conditions_decrease_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_conditions_decrease_by()
+ */
+extern void test__f_thread_conditions_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_conditions_decrease_by()
+ */
+extern void test__f_thread_conditions_decrease_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_conditions_decrease_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-conditions_increase.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_conditions_increase__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_conditions_t data = f_thread_conditions_t_initialize;
+
+ {
+ const f_status_t status = f_thread_conditions_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_thread_conditions_increase__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_conditions_t data = f_thread_conditions_t_initialize;
+
+ {
+ const f_status_t status = f_thread_conditions_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_thread_conditions_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_thread_conditions_increase__works(void **state) {
+
+ const int length = 5;
+ f_thread_conditions_t data = f_thread_conditions_t_initialize;
+
+ {
+ const f_status_t status = f_thread_conditions_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_thread_conditions_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_conditions_increase
+#define _TEST__F_thread__thread_conditions_increase
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_conditions_increase()
+ */
+extern void test__f_thread_conditions_increase__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_conditions_increase()
+ */
+extern void test__f_thread_conditions_increase__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_conditions_increase()
+ */
+extern void test__f_thread_conditions_increase__works(void **state);
+
+#endif // _TEST__F_thread__thread_conditions_increase
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-conditions_increase_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_conditions_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_conditions_t data = f_thread_conditions_t_initialize;
+
+ {
+ const f_status_t status = f_thread_conditions_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_thread_conditions_increase_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_conditions_t data = f_thread_conditions_t_initialize;
+
+ {
+ const f_status_t status = f_thread_conditions_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_thread_conditions_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_thread_conditions_increase_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_conditions_t data = f_thread_conditions_t_initialize;
+
+ {
+ const f_status_t status = f_thread_conditions_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_thread_conditions_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_conditions_increase_by
+#define _TEST__F_thread__thread_conditions_increase_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_conditions_increase_by()
+ */
+extern void test__f_thread_conditions_increase_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_conditions_increase_by()
+ */
+extern void test__f_thread_conditions_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_conditions_increase_by()
+ */
+extern void test__f_thread_conditions_increase_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_conditions_increase_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-conditions_resize.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_conditions_resize__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_conditions_t data = f_thread_conditions_t_initialize;
+
+ {
+ const f_status_t status = f_thread_conditions_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_thread_conditions_resize__works(void **state) {
+
+ const int length = 5;
+ f_thread_conditions_t data = f_thread_conditions_t_initialize;
+
+ {
+ const f_status_t status = f_thread_conditions_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_conditions_resize
+#define _TEST__F_thread__thread_conditions_resize
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_conditions_resize()
+ */
+extern void test__f_thread_conditions_resize__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_conditions_resize()
+ */
+extern void test__f_thread_conditions_resize__works(void **state);
+
+#endif // _TEST__F_thread__thread_conditions_resize
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-ids_adjust.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_ids_adjust__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_ids_t data = f_thread_ids_t_initialize;
+
+ {
+ const f_status_t status = f_thread_ids_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_thread_ids_adjust__works(void **state) {
+
+ const int length = 5;
+ f_thread_ids_t data = f_thread_ids_t_initialize;
+
+ {
+ const f_status_t status = f_thread_ids_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_ids_adjust
+#define _TEST__F_thread__thread_ids_adjust
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_ids_adjust()
+ */
+extern void test__f_thread_ids_adjust__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_ids_adjust()
+ */
+extern void test__f_thread_ids_adjust__works(void **state);
+
+#endif // _TEST__F_thread__thread_ids_adjust
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-ids_decimate_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_ids_decimate_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_ids_t data = f_thread_ids_t_initialize;
+
+ {
+ const f_status_t status = f_thread_ids_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_thread_ids_decimate_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_ids_t data = f_thread_ids_t_initialize;
+
+ {
+ const f_status_t status = f_thread_ids_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_thread_ids_decimate_by(0, &data);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ free((void *) data.array);
+}
+
+void test__f_thread_ids_decimate_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_ids_t data = f_thread_ids_t_initialize;
+
+ {
+ const f_status_t status = f_thread_ids_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_thread_ids_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_ids_decimate_by
+#define _TEST__F_thread__thread_ids_decimate_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_ids_decimate_by()
+ */
+extern void test__f_thread_ids_decimate_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_ids_decimate_by()
+ */
+extern void test__f_thread_ids_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_ids_decimate_by()
+ */
+extern void test__f_thread_ids_decimate_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_ids_decimate_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-ids_decrease_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_ids_decrease_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_ids_t data = f_thread_ids_t_initialize;
+
+ {
+ const f_status_t status = f_thread_ids_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_thread_ids_decrease_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_ids_t data = f_thread_ids_t_initialize;
+
+ {
+ const f_status_t status = f_thread_ids_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_thread_ids_decrease_by(0, &data);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ free((void *) data.array);
+}
+
+void test__f_thread_ids_decrease_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_ids_t data = f_thread_ids_t_initialize;
+
+ {
+ const f_status_t status = f_thread_ids_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_thread_ids_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_ids_decrease_by
+#define _TEST__F_thread__thread_ids_decrease_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_ids_decrease_by()
+ */
+extern void test__f_thread_ids_decrease_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_ids_decrease_by()
+ */
+extern void test__f_thread_ids_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_ids_decrease_by()
+ */
+extern void test__f_thread_ids_decrease_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_ids_decrease_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-ids_increase.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_ids_increase__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_ids_t data = f_thread_ids_t_initialize;
+
+ {
+ const f_status_t status = f_thread_ids_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_thread_ids_increase__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_ids_t data = f_thread_ids_t_initialize;
+
+ {
+ const f_status_t status = f_thread_ids_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_thread_ids_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_thread_ids_increase__works(void **state) {
+
+ const int length = 5;
+ f_thread_ids_t data = f_thread_ids_t_initialize;
+
+ {
+ const f_status_t status = f_thread_ids_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_thread_ids_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_ids_increase
+#define _TEST__F_thread__thread_ids_increase
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_ids_increase()
+ */
+extern void test__f_thread_ids_increase__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_ids_increase()
+ */
+extern void test__f_thread_ids_increase__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_ids_increase()
+ */
+extern void test__f_thread_ids_increase__works(void **state);
+
+#endif // _TEST__F_thread__thread_ids_increase
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-ids_increase_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_ids_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_ids_t data = f_thread_ids_t_initialize;
+
+ {
+ const f_status_t status = f_thread_ids_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_thread_ids_increase_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_ids_t data = f_thread_ids_t_initialize;
+
+ {
+ const f_status_t status = f_thread_ids_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_thread_ids_increase_by(0, &data);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ free((void *) data.array);
+}
+
+void test__f_thread_ids_increase_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_ids_t data = f_thread_ids_t_initialize;
+
+ {
+ const f_status_t status = f_thread_ids_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_thread_ids_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_ids_increase_by
+#define _TEST__F_thread__thread_ids_increase_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_ids_increase_by()
+ */
+extern void test__f_thread_ids_increase_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_ids_increase_by()
+ */
+extern void test__f_thread_ids_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_ids_increase_by()
+ */
+extern void test__f_thread_ids_increase_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_ids_increase_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-ids_resize.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_ids_resize__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_ids_t data = f_thread_ids_t_initialize;
+
+ {
+ const f_status_t status = f_thread_ids_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_thread_ids_resize__works(void **state) {
+
+ const int length = 5;
+ f_thread_ids_t data = f_thread_ids_t_initialize;
+
+ {
+ const f_status_t status = f_thread_ids_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_ids_resize
+#define _TEST__F_thread__thread_ids_resize
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_ids_resize()
+ */
+extern void test__f_thread_ids_resize__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_ids_resize()
+ */
+extern void test__f_thread_ids_resize__works(void **state);
+
+#endif // _TEST__F_thread__thread_ids_resize
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-keys_adjust.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_keys_adjust__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_keys_t data = f_thread_keys_t_initialize;
+
+ {
+ const f_status_t status = f_thread_keys_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_thread_keys_adjust__works(void **state) {
+
+ const int length = 5;
+ f_thread_keys_t data = f_thread_keys_t_initialize;
+
+ {
+ const f_status_t status = f_thread_keys_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_keys_adjust
+#define _TEST__F_thread__thread_keys_adjust
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_keys_adjust()
+ */
+extern void test__f_thread_keys_adjust__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_keys_adjust()
+ */
+extern void test__f_thread_keys_adjust__works(void **state);
+
+#endif // _TEST__F_thread__thread_keys_adjust
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-keys_decimate_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_keys_decimate_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_keys_t data = f_thread_keys_t_initialize;
+
+ {
+ const f_status_t status = f_thread_keys_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_thread_keys_decimate_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_keys_t data = f_thread_keys_t_initialize;
+
+ {
+ const f_status_t status = f_thread_keys_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_thread_keys_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_thread_keys_decimate_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_keys_t data = f_thread_keys_t_initialize;
+
+ {
+ const f_status_t status = f_thread_keys_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ for (uint8_t i = 0; i < length; ++i) {
+ will_return(__wrap_pthread_key_delete, F_false);
+ } // for
+
+ const f_status_t status = f_thread_keys_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_keys_decimate_by
+#define _TEST__F_thread__thread_keys_decimate_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_keys_decimate_by()
+ */
+extern void test__f_thread_keys_decimate_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_keys_decimate_by()
+ */
+extern void test__f_thread_keys_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_keys_decimate_by()
+ */
+extern void test__f_thread_keys_decimate_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_keys_decimate_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-keys_decrease_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_keys_decrease_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_keys_t data = f_thread_keys_t_initialize;
+
+ {
+ const f_status_t status = f_thread_keys_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_thread_keys_decrease_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_keys_t data = f_thread_keys_t_initialize;
+
+ {
+ const f_status_t status = f_thread_keys_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_thread_keys_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_thread_keys_decrease_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_keys_t data = f_thread_keys_t_initialize;
+
+ {
+ const f_status_t status = f_thread_keys_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ for (uint8_t i = 0; i < length; ++i) {
+ will_return(__wrap_pthread_key_delete, F_false);
+ } // for
+
+ const f_status_t status = f_thread_keys_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_keys_decrease_by
+#define _TEST__F_thread__thread_keys_decrease_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_keys_decrease_by()
+ */
+extern void test__f_thread_keys_decrease_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_keys_decrease_by()
+ */
+extern void test__f_thread_keys_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_keys_decrease_by()
+ */
+extern void test__f_thread_keys_decrease_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_keys_decrease_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-keys_increase.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_keys_increase__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_keys_t data = f_thread_keys_t_initialize;
+
+ {
+ const f_status_t status = f_thread_keys_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_thread_keys_increase__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_keys_t data = f_thread_keys_t_initialize;
+
+ {
+ const f_status_t status = f_thread_keys_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_thread_keys_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_thread_keys_increase__works(void **state) {
+
+ const int length = 5;
+ f_thread_keys_t data = f_thread_keys_t_initialize;
+
+ {
+ const f_status_t status = f_thread_keys_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_thread_keys_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_keys_increase
+#define _TEST__F_thread__thread_keys_increase
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_keys_increase()
+ */
+extern void test__f_thread_keys_increase__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_keys_increase()
+ */
+extern void test__f_thread_keys_increase__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_keys_increase()
+ */
+extern void test__f_thread_keys_increase__works(void **state);
+
+#endif // _TEST__F_thread__thread_keys_increase
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-keys_increase_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_keys_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_keys_t data = f_thread_keys_t_initialize;
+
+ {
+ const f_status_t status = f_thread_keys_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_thread_keys_increase_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_keys_t data = f_thread_keys_t_initialize;
+
+ {
+ const f_status_t status = f_thread_keys_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_thread_keys_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_thread_keys_increase_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_keys_t data = f_thread_keys_t_initialize;
+
+ {
+ const f_status_t status = f_thread_keys_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_thread_keys_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_keys_increase_by
+#define _TEST__F_thread__thread_keys_increase_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_keys_increase_by()
+ */
+extern void test__f_thread_keys_increase_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_keys_increase_by()
+ */
+extern void test__f_thread_keys_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_keys_increase_by()
+ */
+extern void test__f_thread_keys_increase_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_keys_increase_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-keys_resize.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_keys_resize__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_keys_t data = f_thread_keys_t_initialize;
+
+ {
+ const f_status_t status = f_thread_keys_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_thread_keys_resize__works(void **state) {
+
+ const int length = 5;
+ f_thread_keys_t data = f_thread_keys_t_initialize;
+
+ {
+ const f_status_t status = f_thread_keys_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_keys_resize
+#define _TEST__F_thread__thread_keys_resize
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_keys_resize()
+ */
+extern void test__f_thread_keys_resize__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_keys_resize()
+ */
+extern void test__f_thread_keys_resize__works(void **state);
+
+#endif // _TEST__F_thread__thread_keys_resize
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-lock_attributes_adjust.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_lock_attributes_adjust__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_lock_attributes_t data = f_thread_lock_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_lock_attributes_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_thread_lock_attributes_adjust__works(void **state) {
+
+ const int length = 5;
+ f_thread_lock_attributes_t data = f_thread_lock_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_lock_attributes_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_lock_attributes_adjust
+#define _TEST__F_thread__thread_lock_attributes_adjust
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_lock_attributes_adjust()
+ */
+extern void test__f_thread_lock_attributes_adjust__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_lock_attributes_adjust()
+ */
+extern void test__f_thread_lock_attributes_adjust__works(void **state);
+
+#endif // _TEST__F_thread__thread_lock_attributes_adjust
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-lock_attributes_decimate_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_lock_attributes_decimate_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_lock_attributes_t data = f_thread_lock_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_lock_attributes_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_thread_lock_attributes_decimate_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_lock_attributes_t data = f_thread_lock_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_lock_attributes_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_thread_lock_attributes_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_thread_lock_attributes_decimate_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_lock_attributes_t data = f_thread_lock_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_lock_attributes_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_thread_lock_attributes_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_lock_attributes_decimate_by
+#define _TEST__F_thread__thread_lock_attributes_decimate_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_lock_attributes_decimate_by()
+ */
+extern void test__f_thread_lock_attributes_decimate_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_lock_attributes_decimate_by()
+ */
+extern void test__f_thread_lock_attributes_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_lock_attributes_decimate_by()
+ */
+extern void test__f_thread_lock_attributes_decimate_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_lock_attributes_decimate_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-lock_attributes_decrease_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_lock_attributes_decrease_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_lock_attributes_t data = f_thread_lock_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_lock_attributes_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_thread_lock_attributes_decrease_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_lock_attributes_t data = f_thread_lock_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_lock_attributes_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_thread_lock_attributes_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_thread_lock_attributes_decrease_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_lock_attributes_t data = f_thread_lock_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_lock_attributes_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_thread_lock_attributes_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_lock_attributes_decrease_by
+#define _TEST__F_thread__thread_lock_attributes_decrease_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_lock_attributes_decrease_by()
+ */
+extern void test__f_thread_lock_attributes_decrease_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_lock_attributes_decrease_by()
+ */
+extern void test__f_thread_lock_attributes_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_lock_attributes_decrease_by()
+ */
+extern void test__f_thread_lock_attributes_decrease_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_lock_attributes_decrease_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-lock_attributes_increase.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_lock_attributes_increase__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_lock_attributes_t data = f_thread_lock_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_lock_attributes_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_thread_lock_attributes_increase__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_lock_attributes_t data = f_thread_lock_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_lock_attributes_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_thread_lock_attributes_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_thread_lock_attributes_increase__works(void **state) {
+
+ const int length = 5;
+ f_thread_lock_attributes_t data = f_thread_lock_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_lock_attributes_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_thread_lock_attributes_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_lock_attributes_increase
+#define _TEST__F_thread__thread_lock_attributes_increase
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_lock_attributes_increase()
+ */
+extern void test__f_thread_lock_attributes_increase__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_lock_attributes_increase()
+ */
+extern void test__f_thread_lock_attributes_increase__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_lock_attributes_increase()
+ */
+extern void test__f_thread_lock_attributes_increase__works(void **state);
+
+#endif // _TEST__F_thread__thread_lock_attributes_increase
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-lock_attributes_increase_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_lock_attributes_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_lock_attributes_t data = f_thread_lock_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_lock_attributes_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_thread_lock_attributes_increase_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_lock_attributes_t data = f_thread_lock_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_lock_attributes_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_thread_lock_attributes_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_thread_lock_attributes_increase_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_lock_attributes_t data = f_thread_lock_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_lock_attributes_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_thread_lock_attributes_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_lock_attributes_increase_by
+#define _TEST__F_thread__thread_lock_attributes_increase_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_lock_attributes_increase_by()
+ */
+extern void test__f_thread_lock_attributes_increase_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_lock_attributes_increase_by()
+ */
+extern void test__f_thread_lock_attributes_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_lock_attributes_increase_by()
+ */
+extern void test__f_thread_lock_attributes_increase_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_lock_attributes_increase_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-lock_attributes_resize.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_lock_attributes_resize__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_lock_attributes_t data = f_thread_lock_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_lock_attributes_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_thread_lock_attributes_resize__works(void **state) {
+
+ const int length = 5;
+ f_thread_lock_attributes_t data = f_thread_lock_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_lock_attributes_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_lock_attributes_resize
+#define _TEST__F_thread__thread_lock_attributes_resize
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_lock_attributes_resize()
+ */
+extern void test__f_thread_lock_attributes_resize__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_lock_attributes_resize()
+ */
+extern void test__f_thread_lock_attributes_resize__works(void **state);
+
+#endif // _TEST__F_thread__thread_lock_attributes_resize
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-locks_adjust.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_locks_adjust__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_locks_t data = f_thread_locks_t_initialize;
+
+ {
+ const f_status_t status = f_thread_locks_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_thread_locks_adjust__works(void **state) {
+
+ const int length = 5;
+ f_thread_locks_t data = f_thread_locks_t_initialize;
+
+ {
+ const f_status_t status = f_thread_locks_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_locks_adjust
+#define _TEST__F_thread__thread_locks_adjust
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_locks_adjust()
+ */
+extern void test__f_thread_locks_adjust__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_locks_adjust()
+ */
+extern void test__f_thread_locks_adjust__works(void **state);
+
+#endif // _TEST__F_thread__thread_locks_adjust
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-locks_decimate_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_locks_decimate_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_locks_t data = f_thread_locks_t_initialize;
+
+ {
+ const f_status_t status = f_thread_locks_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_thread_locks_decimate_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_locks_t data = f_thread_locks_t_initialize;
+
+ {
+ const f_status_t status = f_thread_locks_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_thread_locks_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_thread_locks_decimate_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_locks_t data = f_thread_locks_t_initialize;
+
+ {
+ const f_status_t status = f_thread_locks_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_thread_locks_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_locks_decimate_by
+#define _TEST__F_thread__thread_locks_decimate_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_locks_decimate_by()
+ */
+extern void test__f_thread_locks_decimate_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_locks_decimate_by()
+ */
+extern void test__f_thread_locks_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_locks_decimate_by()
+ */
+extern void test__f_thread_locks_decimate_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_locks_decimate_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-locks_decrease_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_locks_decrease_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_locks_t data = f_thread_locks_t_initialize;
+
+ {
+ const f_status_t status = f_thread_locks_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_thread_locks_decrease_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_locks_t data = f_thread_locks_t_initialize;
+
+ {
+ const f_status_t status = f_thread_locks_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_thread_locks_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_thread_locks_decrease_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_locks_t data = f_thread_locks_t_initialize;
+
+ {
+ const f_status_t status = f_thread_locks_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_thread_locks_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_locks_decrease_by
+#define _TEST__F_thread__thread_locks_decrease_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_locks_decrease_by()
+ */
+extern void test__f_thread_locks_decrease_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_locks_decrease_by()
+ */
+extern void test__f_thread_locks_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_locks_decrease_by()
+ */
+extern void test__f_thread_locks_decrease_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_locks_decrease_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-locks_increase.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_locks_increase__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_locks_t data = f_thread_locks_t_initialize;
+
+ {
+ const f_status_t status = f_thread_locks_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_thread_locks_increase__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_locks_t data = f_thread_locks_t_initialize;
+
+ {
+ const f_status_t status = f_thread_locks_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_thread_locks_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_thread_locks_increase__works(void **state) {
+
+ const int length = 5;
+ f_thread_locks_t data = f_thread_locks_t_initialize;
+
+ {
+ const f_status_t status = f_thread_locks_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_thread_locks_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_locks_increase
+#define _TEST__F_thread__thread_locks_increase
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_locks_increase()
+ */
+extern void test__f_thread_locks_increase__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_locks_increase()
+ */
+extern void test__f_thread_locks_increase__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_locks_increase()
+ */
+extern void test__f_thread_locks_increase__works(void **state);
+
+#endif // _TEST__F_thread__thread_locks_increase
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-locks_increase_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_locks_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_locks_t data = f_thread_locks_t_initialize;
+
+ {
+ const f_status_t status = f_thread_locks_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_thread_locks_increase_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_locks_t data = f_thread_locks_t_initialize;
+
+ {
+ const f_status_t status = f_thread_locks_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_thread_locks_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_thread_locks_increase_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_locks_t data = f_thread_locks_t_initialize;
+
+ {
+ const f_status_t status = f_thread_locks_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_thread_locks_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_locks_increase_by
+#define _TEST__F_thread__thread_locks_increase_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_locks_increase_by()
+ */
+extern void test__f_thread_locks_increase_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_locks_increase_by()
+ */
+extern void test__f_thread_locks_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_locks_increase_by()
+ */
+extern void test__f_thread_locks_increase_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_locks_increase_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-locks_resize.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_locks_resize__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_locks_t data = f_thread_locks_t_initialize;
+
+ {
+ const f_status_t status = f_thread_locks_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_thread_locks_resize__works(void **state) {
+
+ const int length = 5;
+ f_thread_locks_t data = f_thread_locks_t_initialize;
+
+ {
+ const f_status_t status = f_thread_locks_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_locks_resize
+#define _TEST__F_thread__thread_locks_resize
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_locks_resize()
+ */
+extern void test__f_thread_locks_resize__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_locks_resize()
+ */
+extern void test__f_thread_locks_resize__works(void **state);
+
+#endif // _TEST__F_thread__thread_locks_resize
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-mutex_attributes_adjust.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_mutex_attributes_adjust__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_mutex_attributes_t data = f_thread_mutex_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_mutex_attributes_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_thread_mutex_attributes_adjust__works(void **state) {
+
+ const int length = 5;
+ f_thread_mutex_attributes_t data = f_thread_mutex_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_mutex_attributes_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_mutex_attributes_adjust
+#define _TEST__F_thread__thread_mutex_attributes_adjust
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_mutex_attributes_adjust()
+ */
+extern void test__f_thread_mutex_attributes_adjust__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_mutex_attributes_adjust()
+ */
+extern void test__f_thread_mutex_attributes_adjust__works(void **state);
+
+#endif // _TEST__F_thread__thread_mutex_attributes_adjust
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-mutex_attributes_decimate_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_mutex_attributes_decimate_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_mutex_attributes_t data = f_thread_mutex_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_mutex_attributes_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_thread_mutex_attributes_decimate_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_mutex_attributes_t data = f_thread_mutex_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_mutex_attributes_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_thread_mutex_attributes_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_thread_mutex_attributes_decimate_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_mutex_attributes_t data = f_thread_mutex_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_mutex_attributes_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_thread_mutex_attributes_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_mutex_attributes_decimate_by
+#define _TEST__F_thread__thread_mutex_attributes_decimate_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_mutex_attributes_decimate_by()
+ */
+extern void test__f_thread_mutex_attributes_decimate_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_mutex_attributes_decimate_by()
+ */
+extern void test__f_thread_mutex_attributes_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_mutex_attributes_decimate_by()
+ */
+extern void test__f_thread_mutex_attributes_decimate_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_mutex_attributes_decimate_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-mutex_attributes_decrease_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_mutex_attributes_decrease_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_mutex_attributes_t data = f_thread_mutex_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_mutex_attributes_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_thread_mutex_attributes_decrease_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_mutex_attributes_t data = f_thread_mutex_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_mutex_attributes_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_thread_mutex_attributes_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_thread_mutex_attributes_decrease_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_mutex_attributes_t data = f_thread_mutex_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_mutex_attributes_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_thread_mutex_attributes_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_mutex_attributes_decrease_by
+#define _TEST__F_thread__thread_mutex_attributes_decrease_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_mutex_attributes_decrease_by()
+ */
+extern void test__f_thread_mutex_attributes_decrease_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_mutex_attributes_decrease_by()
+ */
+extern void test__f_thread_mutex_attributes_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_mutex_attributes_decrease_by()
+ */
+extern void test__f_thread_mutex_attributes_decrease_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_mutex_attributes_decrease_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-mutex_attributes_increase.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_mutex_attributes_increase__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_mutex_attributes_t data = f_thread_mutex_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_mutex_attributes_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_thread_mutex_attributes_increase__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_mutex_attributes_t data = f_thread_mutex_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_mutex_attributes_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_thread_mutex_attributes_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_thread_mutex_attributes_increase__works(void **state) {
+
+ const int length = 5;
+ f_thread_mutex_attributes_t data = f_thread_mutex_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_mutex_attributes_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_thread_mutex_attributes_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_mutex_attributes_increase
+#define _TEST__F_thread__thread_mutex_attributes_increase
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_mutex_attributes_increase()
+ */
+extern void test__f_thread_mutex_attributes_increase__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_mutex_attributes_increase()
+ */
+extern void test__f_thread_mutex_attributes_increase__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_mutex_attributes_increase()
+ */
+extern void test__f_thread_mutex_attributes_increase__works(void **state);
+
+#endif // _TEST__F_thread__thread_mutex_attributes_increase
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-mutex_attributes_increase_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_mutex_attributes_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_mutex_attributes_t data = f_thread_mutex_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_mutex_attributes_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_thread_mutex_attributes_increase_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_mutex_attributes_t data = f_thread_mutex_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_mutex_attributes_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_thread_mutex_attributes_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_thread_mutex_attributes_increase_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_mutex_attributes_t data = f_thread_mutex_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_mutex_attributes_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_thread_mutex_attributes_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_mutex_attributes_increase_by
+#define _TEST__F_thread__thread_mutex_attributes_increase_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_mutex_attributes_increase_by()
+ */
+extern void test__f_thread_mutex_attributes_increase_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_mutex_attributes_increase_by()
+ */
+extern void test__f_thread_mutex_attributes_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_mutex_attributes_increase_by()
+ */
+extern void test__f_thread_mutex_attributes_increase_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_mutex_attributes_increase_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-mutex_attributes_resize.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_mutex_attributes_resize__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_mutex_attributes_t data = f_thread_mutex_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_mutex_attributes_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_thread_mutex_attributes_resize__works(void **state) {
+
+ const int length = 5;
+ f_thread_mutex_attributes_t data = f_thread_mutex_attributes_t_initialize;
+
+ {
+ const f_status_t status = f_thread_mutex_attributes_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_mutex_attributes_resize
+#define _TEST__F_thread__thread_mutex_attributes_resize
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_mutex_attributes_resize()
+ */
+extern void test__f_thread_mutex_attributes_resize__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_mutex_attributes_resize()
+ */
+extern void test__f_thread_mutex_attributes_resize__works(void **state);
+
+#endif // _TEST__F_thread__thread_mutex_attributes_resize
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-mutexs_adjust.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_mutexs_adjust__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_mutexs_t data = f_thread_mutexs_t_initialize;
+
+ {
+ const f_status_t status = f_thread_mutexs_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_thread_mutexs_adjust__works(void **state) {
+
+ const int length = 5;
+ f_thread_mutexs_t data = f_thread_mutexs_t_initialize;
+
+ {
+ const f_status_t status = f_thread_mutexs_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_mutexs_adjust
+#define _TEST__F_thread__thread_mutexs_adjust
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_mutexs_adjust()
+ */
+extern void test__f_thread_mutexs_adjust__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_mutexs_adjust()
+ */
+extern void test__f_thread_mutexs_adjust__works(void **state);
+
+#endif // _TEST__F_thread__thread_mutexs_adjust
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-mutexs_decimate_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_mutexs_decimate_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_mutexs_t data = f_thread_mutexs_t_initialize;
+
+ {
+ const f_status_t status = f_thread_mutexs_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_thread_mutexs_decimate_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_mutexs_t data = f_thread_mutexs_t_initialize;
+
+ {
+ const f_status_t status = f_thread_mutexs_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_thread_mutexs_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_thread_mutexs_decimate_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_mutexs_t data = f_thread_mutexs_t_initialize;
+
+ {
+ const f_status_t status = f_thread_mutexs_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_thread_mutexs_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_mutexs_decimate_by
+#define _TEST__F_thread__thread_mutexs_decimate_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_mutexs_decimate_by()
+ */
+extern void test__f_thread_mutexs_decimate_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_mutexs_decimate_by()
+ */
+extern void test__f_thread_mutexs_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_mutexs_decimate_by()
+ */
+extern void test__f_thread_mutexs_decimate_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_mutexs_decimate_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-mutexs_decrease_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_mutexs_decrease_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_mutexs_t data = f_thread_mutexs_t_initialize;
+
+ {
+ const f_status_t status = f_thread_mutexs_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_thread_mutexs_decrease_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_mutexs_t data = f_thread_mutexs_t_initialize;
+
+ {
+ const f_status_t status = f_thread_mutexs_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_thread_mutexs_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_thread_mutexs_decrease_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_mutexs_t data = f_thread_mutexs_t_initialize;
+
+ {
+ const f_status_t status = f_thread_mutexs_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_thread_mutexs_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_mutexs_decrease_by
+#define _TEST__F_thread__thread_mutexs_decrease_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_mutexs_decrease_by()
+ */
+extern void test__f_thread_mutexs_decrease_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_mutexs_decrease_by()
+ */
+extern void test__f_thread_mutexs_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_mutexs_decrease_by()
+ */
+extern void test__f_thread_mutexs_decrease_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_mutexs_decrease_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-mutexs_increase.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_mutexs_increase__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_mutexs_t data = f_thread_mutexs_t_initialize;
+
+ {
+ const f_status_t status = f_thread_mutexs_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_thread_mutexs_increase__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_mutexs_t data = f_thread_mutexs_t_initialize;
+
+ {
+ const f_status_t status = f_thread_mutexs_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_thread_mutexs_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_thread_mutexs_increase__works(void **state) {
+
+ const int length = 5;
+ f_thread_mutexs_t data = f_thread_mutexs_t_initialize;
+
+ {
+ const f_status_t status = f_thread_mutexs_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_thread_mutexs_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_mutexs_increase
+#define _TEST__F_thread__thread_mutexs_increase
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_mutexs_increase()
+ */
+extern void test__f_thread_mutexs_increase__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_mutexs_increase()
+ */
+extern void test__f_thread_mutexs_increase__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_mutexs_increase()
+ */
+extern void test__f_thread_mutexs_increase__works(void **state);
+
+#endif // _TEST__F_thread__thread_mutexs_increase
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-mutexs_increase_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_mutexs_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_mutexs_t data = f_thread_mutexs_t_initialize;
+
+ {
+ const f_status_t status = f_thread_mutexs_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_thread_mutexs_increase_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_mutexs_t data = f_thread_mutexs_t_initialize;
+
+ {
+ const f_status_t status = f_thread_mutexs_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_thread_mutexs_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_thread_mutexs_increase_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_mutexs_t data = f_thread_mutexs_t_initialize;
+
+ {
+ const f_status_t status = f_thread_mutexs_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_thread_mutexs_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_mutexs_increase_by
+#define _TEST__F_thread__thread_mutexs_increase_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_mutexs_increase_by()
+ */
+extern void test__f_thread_mutexs_increase_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_mutexs_increase_by()
+ */
+extern void test__f_thread_mutexs_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_mutexs_increase_by()
+ */
+extern void test__f_thread_mutexs_increase_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_mutexs_increase_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-mutexs_resize.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_mutexs_resize__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_mutexs_t data = f_thread_mutexs_t_initialize;
+
+ {
+ const f_status_t status = f_thread_mutexs_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_thread_mutexs_resize__works(void **state) {
+
+ const int length = 5;
+ f_thread_mutexs_t data = f_thread_mutexs_t_initialize;
+
+ {
+ const f_status_t status = f_thread_mutexs_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_mutexs_resize
+#define _TEST__F_thread__thread_mutexs_resize
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_mutexs_resize()
+ */
+extern void test__f_thread_mutexs_resize__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_mutexs_resize()
+ */
+extern void test__f_thread_mutexs_resize__works(void **state);
+
+#endif // _TEST__F_thread__thread_mutexs_resize
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-onces_adjust.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_onces_adjust__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_onces_t data = f_thread_onces_t_initialize;
+
+ {
+ const f_status_t status = f_thread_onces_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_thread_onces_adjust__works(void **state) {
+
+ const int length = 5;
+ f_thread_onces_t data = f_thread_onces_t_initialize;
+
+ {
+ const f_status_t status = f_thread_onces_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_onces_adjust
+#define _TEST__F_thread__thread_onces_adjust
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_onces_adjust()
+ */
+extern void test__f_thread_onces_adjust__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_onces_adjust()
+ */
+extern void test__f_thread_onces_adjust__works(void **state);
+
+#endif // _TEST__F_thread__thread_onces_adjust
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-onces_decimate_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_onces_decimate_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_onces_t data = f_thread_onces_t_initialize;
+
+ {
+ const f_status_t status = f_thread_onces_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_thread_onces_decimate_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_onces_t data = f_thread_onces_t_initialize;
+
+ {
+ const f_status_t status = f_thread_onces_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_thread_onces_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_thread_onces_decimate_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_onces_t data = f_thread_onces_t_initialize;
+
+ {
+ const f_status_t status = f_thread_onces_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_thread_onces_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_onces_decimate_by
+#define _TEST__F_thread__thread_onces_decimate_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_onces_decimate_by()
+ */
+extern void test__f_thread_onces_decimate_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_onces_decimate_by()
+ */
+extern void test__f_thread_onces_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_onces_decimate_by()
+ */
+extern void test__f_thread_onces_decimate_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_onces_decimate_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-onces_decrease_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_onces_decrease_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_onces_t data = f_thread_onces_t_initialize;
+
+ {
+ const f_status_t status = f_thread_onces_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_thread_onces_decrease_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_onces_t data = f_thread_onces_t_initialize;
+
+ {
+ const f_status_t status = f_thread_onces_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_thread_onces_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_thread_onces_decrease_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_onces_t data = f_thread_onces_t_initialize;
+
+ {
+ const f_status_t status = f_thread_onces_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_thread_onces_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_onces_decrease_by
+#define _TEST__F_thread__thread_onces_decrease_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_onces_decrease_by()
+ */
+extern void test__f_thread_onces_decrease_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_onces_decrease_by()
+ */
+extern void test__f_thread_onces_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_onces_decrease_by()
+ */
+extern void test__f_thread_onces_decrease_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_onces_decrease_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-onces_increase.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_onces_increase__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_onces_t data = f_thread_onces_t_initialize;
+
+ {
+ const f_status_t status = f_thread_onces_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_thread_onces_increase__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_onces_t data = f_thread_onces_t_initialize;
+
+ {
+ const f_status_t status = f_thread_onces_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_thread_onces_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_thread_onces_increase__works(void **state) {
+
+ const int length = 5;
+ f_thread_onces_t data = f_thread_onces_t_initialize;
+
+ {
+ const f_status_t status = f_thread_onces_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_thread_onces_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_onces_increase
+#define _TEST__F_thread__thread_onces_increase
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_onces_increase()
+ */
+extern void test__f_thread_onces_increase__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_onces_increase()
+ */
+extern void test__f_thread_onces_increase__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_onces_increase()
+ */
+extern void test__f_thread_onces_increase__works(void **state);
+
+#endif // _TEST__F_thread__thread_onces_increase
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-onces_increase_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_onces_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_onces_t data = f_thread_onces_t_initialize;
+
+ {
+ const f_status_t status = f_thread_onces_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_thread_onces_increase_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_onces_t data = f_thread_onces_t_initialize;
+
+ {
+ const f_status_t status = f_thread_onces_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_thread_onces_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_thread_onces_increase_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_onces_t data = f_thread_onces_t_initialize;
+
+ {
+ const f_status_t status = f_thread_onces_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_thread_onces_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_onces_increase_by
+#define _TEST__F_thread__thread_onces_increase_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_onces_increase_by()
+ */
+extern void test__f_thread_onces_increase_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_onces_increase_by()
+ */
+extern void test__f_thread_onces_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_onces_increase_by()
+ */
+extern void test__f_thread_onces_increase_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_onces_increase_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-onces_resize.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_onces_resize__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_onces_t data = f_thread_onces_t_initialize;
+
+ {
+ const f_status_t status = f_thread_onces_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_thread_onces_resize__works(void **state) {
+
+ const int length = 5;
+ f_thread_onces_t data = f_thread_onces_t_initialize;
+
+ {
+ const f_status_t status = f_thread_onces_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_onces_resize
+#define _TEST__F_thread__thread_onces_resize
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_onces_resize()
+ */
+extern void test__f_thread_onces_resize__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_onces_resize()
+ */
+extern void test__f_thread_onces_resize__works(void **state);
+
+#endif // _TEST__F_thread__thread_onces_resize
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-semaphores_adjust.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_semaphores_adjust__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_semaphores_t data = f_thread_semaphores_t_initialize;
+
+ {
+ const f_status_t status = f_thread_semaphores_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_thread_semaphores_adjust__works(void **state) {
+
+ const int length = 5;
+ f_thread_semaphores_t data = f_thread_semaphores_t_initialize;
+
+ {
+ const f_status_t status = f_thread_semaphores_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_semaphores_adjust
+#define _TEST__F_thread__thread_semaphores_adjust
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_semaphores_adjust()
+ */
+extern void test__f_thread_semaphores_adjust__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_semaphores_adjust()
+ */
+extern void test__f_thread_semaphores_adjust__works(void **state);
+
+#endif // _TEST__F_thread__thread_semaphores_adjust
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-semaphores_decimate_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_semaphores_decimate_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_semaphores_t data = f_thread_semaphores_t_initialize;
+
+ {
+ const f_status_t status = f_thread_semaphores_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_thread_semaphores_decimate_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_semaphores_t data = f_thread_semaphores_t_initialize;
+
+ {
+ const f_status_t status = f_thread_semaphores_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_thread_semaphores_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_thread_semaphores_decimate_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_semaphores_t data = f_thread_semaphores_t_initialize;
+
+ {
+ const f_status_t status = f_thread_semaphores_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_thread_semaphores_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_semaphores_decimate_by
+#define _TEST__F_thread__thread_semaphores_decimate_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_semaphores_decimate_by()
+ */
+extern void test__f_thread_semaphores_decimate_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_semaphores_decimate_by()
+ */
+extern void test__f_thread_semaphores_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_semaphores_decimate_by()
+ */
+extern void test__f_thread_semaphores_decimate_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_semaphores_decimate_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-semaphores_decrease_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_semaphores_decrease_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_semaphores_t data = f_thread_semaphores_t_initialize;
+
+ {
+ const f_status_t status = f_thread_semaphores_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_thread_semaphores_decrease_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_semaphores_t data = f_thread_semaphores_t_initialize;
+
+ {
+ const f_status_t status = f_thread_semaphores_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_thread_semaphores_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_thread_semaphores_decrease_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_semaphores_t data = f_thread_semaphores_t_initialize;
+
+ {
+ const f_status_t status = f_thread_semaphores_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_thread_semaphores_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_semaphores_decrease_by
+#define _TEST__F_thread__thread_semaphores_decrease_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_semaphores_decrease_by()
+ */
+extern void test__f_thread_semaphores_decrease_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_semaphores_decrease_by()
+ */
+extern void test__f_thread_semaphores_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_semaphores_decrease_by()
+ */
+extern void test__f_thread_semaphores_decrease_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_semaphores_decrease_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-semaphores_increase.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_semaphores_increase__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_semaphores_t data = f_thread_semaphores_t_initialize;
+
+ {
+ const f_status_t status = f_thread_semaphores_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_thread_semaphores_increase__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_semaphores_t data = f_thread_semaphores_t_initialize;
+
+ {
+ const f_status_t status = f_thread_semaphores_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_thread_semaphores_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_thread_semaphores_increase__works(void **state) {
+
+ const int length = 5;
+ f_thread_semaphores_t data = f_thread_semaphores_t_initialize;
+
+ {
+ const f_status_t status = f_thread_semaphores_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_thread_semaphores_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_semaphores_increase
+#define _TEST__F_thread__thread_semaphores_increase
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_semaphores_increase()
+ */
+extern void test__f_thread_semaphores_increase__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_semaphores_increase()
+ */
+extern void test__f_thread_semaphores_increase__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_semaphores_increase()
+ */
+extern void test__f_thread_semaphores_increase__works(void **state);
+
+#endif // _TEST__F_thread__thread_semaphores_increase
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-semaphores_increase_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_semaphores_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_semaphores_t data = f_thread_semaphores_t_initialize;
+
+ {
+ const f_status_t status = f_thread_semaphores_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_thread_semaphores_increase_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_semaphores_t data = f_thread_semaphores_t_initialize;
+
+ {
+ const f_status_t status = f_thread_semaphores_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_thread_semaphores_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_thread_semaphores_increase_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_semaphores_t data = f_thread_semaphores_t_initialize;
+
+ {
+ const f_status_t status = f_thread_semaphores_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_thread_semaphores_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_semaphores_increase_by
+#define _TEST__F_thread__thread_semaphores_increase_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_semaphores_increase_by()
+ */
+extern void test__f_thread_semaphores_increase_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_semaphores_increase_by()
+ */
+extern void test__f_thread_semaphores_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_semaphores_increase_by()
+ */
+extern void test__f_thread_semaphores_increase_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_semaphores_increase_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-semaphores_resize.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_semaphores_resize__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_semaphores_t data = f_thread_semaphores_t_initialize;
+
+ {
+ const f_status_t status = f_thread_semaphores_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_thread_semaphores_resize__works(void **state) {
+
+ const int length = 5;
+ f_thread_semaphores_t data = f_thread_semaphores_t_initialize;
+
+ {
+ const f_status_t status = f_thread_semaphores_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_semaphores_resize
+#define _TEST__F_thread__thread_semaphores_resize
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_semaphores_resize()
+ */
+extern void test__f_thread_semaphores_resize__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_semaphores_resize()
+ */
+extern void test__f_thread_semaphores_resize__works(void **state);
+
+#endif // _TEST__F_thread__thread_semaphores_resize
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-sets_adjust.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_sets_adjust__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_sets_t data = f_thread_sets_t_initialize;
+
+ {
+ const f_status_t status = f_thread_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_thread_sets_adjust__works(void **state) {
+
+ const int length = 5;
+ f_thread_sets_t data = f_thread_sets_t_initialize;
+
+ {
+ const f_status_t status = f_thread_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_sets_adjust
+#define _TEST__F_thread__thread_sets_adjust
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_sets_adjust()
+ */
+extern void test__f_thread_sets_adjust__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_sets_adjust()
+ */
+extern void test__f_thread_sets_adjust__works(void **state);
+
+#endif // _TEST__F_thread__thread_sets_adjust
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-sets_decimate_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_sets_decimate_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_sets_t data = f_thread_sets_t_initialize;
+
+ {
+ const f_status_t status = f_thread_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_thread_sets_decimate_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_sets_t data = f_thread_sets_t_initialize;
+
+ {
+ const f_status_t status = f_thread_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_thread_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_thread_sets_decimate_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_sets_t data = f_thread_sets_t_initialize;
+
+ {
+ const f_status_t status = f_thread_sets_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ for (uint8_t i = 0; i < length; ++i) {
+ will_return(__wrap_pthread_attr_destroy, false);
+ } // for
+
+ const f_status_t status = f_thread_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_sets_decimate_by
+#define _TEST__F_thread__thread_sets_decimate_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_sets_decimate_by()
+ */
+extern void test__f_thread_sets_decimate_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_sets_decimate_by()
+ */
+extern void test__f_thread_sets_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_sets_decimate_by()
+ */
+extern void test__f_thread_sets_decimate_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_sets_decimate_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-sets_decrease_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_sets_decrease_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_sets_t data = f_thread_sets_t_initialize;
+
+ {
+ const f_status_t status = f_thread_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_thread_sets_decrease_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_sets_t data = f_thread_sets_t_initialize;
+
+ {
+ const f_status_t status = f_thread_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_thread_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_thread_sets_decrease_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_sets_t data = f_thread_sets_t_initialize;
+
+ {
+ const f_status_t status = f_thread_sets_resize(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ for (uint8_t i = 0; i < length; ++i) {
+ will_return(__wrap_pthread_attr_destroy, false);
+ } // for
+
+ const f_status_t status = f_thread_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_sets_decrease_by
+#define _TEST__F_thread__thread_sets_decrease_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_sets_decrease_by()
+ */
+extern void test__f_thread_sets_decrease_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_sets_decrease_by()
+ */
+extern void test__f_thread_sets_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_sets_decrease_by()
+ */
+extern void test__f_thread_sets_decrease_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_sets_decrease_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-sets_increase.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_sets_increase__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_sets_t data = f_thread_sets_t_initialize;
+
+ {
+ const f_status_t status = f_thread_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_thread_sets_increase__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_sets_t data = f_thread_sets_t_initialize;
+
+ {
+ const f_status_t status = f_thread_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_thread_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_thread_sets_increase__works(void **state) {
+
+ const int length = 5;
+ f_thread_sets_t data = f_thread_sets_t_initialize;
+
+ {
+ const f_status_t status = f_thread_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_thread_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_sets_increase
+#define _TEST__F_thread__thread_sets_increase
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_sets_increase()
+ */
+extern void test__f_thread_sets_increase__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_sets_increase()
+ */
+extern void test__f_thread_sets_increase__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_sets_increase()
+ */
+extern void test__f_thread_sets_increase__works(void **state);
+
+#endif // _TEST__F_thread__thread_sets_increase
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-sets_increase_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_sets_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_sets_t data = f_thread_sets_t_initialize;
+
+ {
+ const f_status_t status = f_thread_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_thread_sets_increase_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_sets_t data = f_thread_sets_t_initialize;
+
+ {
+ const f_status_t status = f_thread_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_thread_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_thread_sets_increase_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_sets_t data = f_thread_sets_t_initialize;
+
+ {
+ const f_status_t status = f_thread_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_thread_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_sets_increase_by
+#define _TEST__F_thread__thread_sets_increase_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_sets_increase_by()
+ */
+extern void test__f_thread_sets_increase_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_sets_increase_by()
+ */
+extern void test__f_thread_sets_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_sets_increase_by()
+ */
+extern void test__f_thread_sets_increase_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_sets_increase_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-sets_resize.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_sets_resize__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_sets_t data = f_thread_sets_t_initialize;
+
+ {
+ const f_status_t status = f_thread_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_thread_sets_resize__works(void **state) {
+
+ const int length = 5;
+ f_thread_sets_t data = f_thread_sets_t_initialize;
+
+ {
+ const f_status_t status = f_thread_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_sets_resize
+#define _TEST__F_thread__thread_sets_resize
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_sets_resize()
+ */
+extern void test__f_thread_sets_resize__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_sets_resize()
+ */
+extern void test__f_thread_sets_resize__works(void **state);
+
+#endif // _TEST__F_thread__thread_sets_resize
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-spins_adjust.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_spins_adjust__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_spins_t data = f_thread_spins_t_initialize;
+
+ {
+ const f_status_t status = f_thread_spins_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_thread_spins_adjust__works(void **state) {
+
+ const int length = 5;
+ f_thread_spins_t data = f_thread_spins_t_initialize;
+
+ {
+ const f_status_t status = f_thread_spins_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_spins_adjust
+#define _TEST__F_thread__thread_spins_adjust
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_spins_adjust()
+ */
+extern void test__f_thread_spins_adjust__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_spins_adjust()
+ */
+extern void test__f_thread_spins_adjust__works(void **state);
+
+#endif // _TEST__F_thread__thread_spins_adjust
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-spins_decimate_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_spins_decimate_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_spins_t data = f_thread_spins_t_initialize;
+
+ {
+ const f_status_t status = f_thread_spins_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_thread_spins_decimate_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_spins_t data = f_thread_spins_t_initialize;
+
+ {
+ const f_status_t status = f_thread_spins_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_thread_spins_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_thread_spins_decimate_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_spins_t data = f_thread_spins_t_initialize;
+
+ {
+ const f_status_t status = f_thread_spins_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_thread_spins_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_spins_decimate_by
+#define _TEST__F_thread__thread_spins_decimate_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_spins_decimate_by()
+ */
+extern void test__f_thread_spins_decimate_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_spins_decimate_by()
+ */
+extern void test__f_thread_spins_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_spins_decimate_by()
+ */
+extern void test__f_thread_spins_decimate_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_spins_decimate_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-spins_decrease_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_spins_decrease_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_spins_t data = f_thread_spins_t_initialize;
+
+ {
+ const f_status_t status = f_thread_spins_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_thread_spins_decrease_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_spins_t data = f_thread_spins_t_initialize;
+
+ {
+ const f_status_t status = f_thread_spins_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_thread_spins_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_thread_spins_decrease_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_spins_t data = f_thread_spins_t_initialize;
+
+ {
+ const f_status_t status = f_thread_spins_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_thread_spins_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_spins_decrease_by
+#define _TEST__F_thread__thread_spins_decrease_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_spins_decrease_by()
+ */
+extern void test__f_thread_spins_decrease_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_spins_decrease_by()
+ */
+extern void test__f_thread_spins_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_spins_decrease_by()
+ */
+extern void test__f_thread_spins_decrease_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_spins_decrease_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-spins_increase.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_spins_increase__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_spins_t data = f_thread_spins_t_initialize;
+
+ {
+ const f_status_t status = f_thread_spins_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_thread_spins_increase__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_spins_t data = f_thread_spins_t_initialize;
+
+ {
+ const f_status_t status = f_thread_spins_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_thread_spins_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_thread_spins_increase__works(void **state) {
+
+ const int length = 5;
+ f_thread_spins_t data = f_thread_spins_t_initialize;
+
+ {
+ const f_status_t status = f_thread_spins_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_thread_spins_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_spins_increase
+#define _TEST__F_thread__thread_spins_increase
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_spins_increase()
+ */
+extern void test__f_thread_spins_increase__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_spins_increase()
+ */
+extern void test__f_thread_spins_increase__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_spins_increase()
+ */
+extern void test__f_thread_spins_increase__works(void **state);
+
+#endif // _TEST__F_thread__thread_spins_increase
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-spins_increase_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_spins_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_spins_t data = f_thread_spins_t_initialize;
+
+ {
+ const f_status_t status = f_thread_spins_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_thread_spins_increase_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_thread_spins_t data = f_thread_spins_t_initialize;
+
+ {
+ const f_status_t status = f_thread_spins_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_thread_spins_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_thread_spins_increase_by__works(void **state) {
+
+ const int length = 5;
+ f_thread_spins_t data = f_thread_spins_t_initialize;
+
+ {
+ const f_status_t status = f_thread_spins_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_thread_spins_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_spins_increase_by
+#define _TEST__F_thread__thread_spins_increase_by
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_spins_increase_by()
+ */
+extern void test__f_thread_spins_increase_by__parameter_checking(void **state);
+
+/**
+ * Test that the function returns F_data_not.
+ *
+ * @see f_thread_spins_increase_by()
+ */
+extern void test__f_thread_spins_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_spins_increase_by()
+ */
+extern void test__f_thread_spins_increase_by__works(void **state);
+
+#endif // _TEST__F_thread__thread_spins_increase_by
--- /dev/null
+#include "test-thread.h"
+#include "test-thread-spins_resize.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_thread_spins_resize__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_thread_spins_t data = f_thread_spins_t_initialize;
+
+ {
+ const f_status_t status = f_thread_spins_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_thread_spins_resize__works(void **state) {
+
+ const int length = 5;
+ f_thread_spins_t data = f_thread_spins_t_initialize;
+
+ {
+ const f_status_t status = f_thread_spins_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: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the thread project.
+ */
+#ifndef _TEST__F_thread__thread_spins_resize
+#define _TEST__F_thread__thread_spins_resize
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_thread_spins_resize()
+ */
+extern void test__f_thread_spins_resize__parameter_checking(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_thread_spins_resize()
+ */
+extern void test__f_thread_spins_resize__works(void **state);
+
+#endif // _TEST__F_thread__thread_spins_resize
--- /dev/null
+#include "test-thread.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_thread_attributes_decimate_by__returns_data_not),
+ cmocka_unit_test(test__f_thread_attributes_decrease_by__returns_data_not),
+ cmocka_unit_test(test__f_thread_attributes_increase__returns_data_not),
+ cmocka_unit_test(test__f_thread_attributes_increase_by__returns_data_not),
+
+ cmocka_unit_test(test__f_thread_attributes_adjust__works),
+ cmocka_unit_test(test__f_thread_attributes_decimate_by__works),
+ cmocka_unit_test(test__f_thread_attributes_decrease_by__works),
+ cmocka_unit_test(test__f_thread_attributes_increase__works),
+ cmocka_unit_test(test__f_thread_attributes_increase_by__works),
+ cmocka_unit_test(test__f_thread_attributes_resize__works),
+
+ cmocka_unit_test(test__f_thread_barrier_attributes_decimate_by__returns_data_not),
+ cmocka_unit_test(test__f_thread_barrier_attributes_decrease_by__returns_data_not),
+ cmocka_unit_test(test__f_thread_barrier_attributes_increase__returns_data_not),
+ cmocka_unit_test(test__f_thread_barrier_attributes_increase_by__returns_data_not),
+
+ cmocka_unit_test(test__f_thread_barrier_attributes_adjust__works),
+ cmocka_unit_test(test__f_thread_barrier_attributes_decimate_by__works),
+ cmocka_unit_test(test__f_thread_barrier_attributes_decrease_by__works),
+ cmocka_unit_test(test__f_thread_barrier_attributes_increase__works),
+ cmocka_unit_test(test__f_thread_barrier_attributes_increase_by__works),
+ cmocka_unit_test(test__f_thread_barrier_attributes_resize__works),
+
+ cmocka_unit_test(test__f_thread_barriers_decimate_by__returns_data_not),
+ cmocka_unit_test(test__f_thread_barriers_decrease_by__returns_data_not),
+ cmocka_unit_test(test__f_thread_barriers_increase__returns_data_not),
+ cmocka_unit_test(test__f_thread_barriers_increase_by__returns_data_not),
+
+ cmocka_unit_test(test__f_thread_barriers_adjust__works),
+ cmocka_unit_test(test__f_thread_barriers_decimate_by__works),
+ cmocka_unit_test(test__f_thread_barriers_decrease_by__works),
+ cmocka_unit_test(test__f_thread_barriers_increase__works),
+ cmocka_unit_test(test__f_thread_barriers_increase_by__works),
+ cmocka_unit_test(test__f_thread_barriers_resize__works),
+
+ cmocka_unit_test(test__f_thread_condition_attributes_decimate_by__returns_data_not),
+ cmocka_unit_test(test__f_thread_condition_attributes_decrease_by__returns_data_not),
+ cmocka_unit_test(test__f_thread_condition_attributes_increase__returns_data_not),
+ cmocka_unit_test(test__f_thread_condition_attributes_increase_by__returns_data_not),
+
+ cmocka_unit_test(test__f_thread_condition_attributes_adjust__works),
+ cmocka_unit_test(test__f_thread_condition_attributes_decimate_by__works),
+ cmocka_unit_test(test__f_thread_condition_attributes_decrease_by__works),
+ cmocka_unit_test(test__f_thread_condition_attributes_increase__works),
+ cmocka_unit_test(test__f_thread_condition_attributes_increase_by__works),
+ cmocka_unit_test(test__f_thread_condition_attributes_resize__works),
+
+ cmocka_unit_test(test__f_thread_conditions_decimate_by__returns_data_not),
+ cmocka_unit_test(test__f_thread_conditions_decrease_by__returns_data_not),
+ cmocka_unit_test(test__f_thread_conditions_increase__returns_data_not),
+ cmocka_unit_test(test__f_thread_conditions_increase_by__returns_data_not),
+
+ cmocka_unit_test(test__f_thread_conditions_adjust__works),
+ cmocka_unit_test(test__f_thread_conditions_decimate_by__works),
+ cmocka_unit_test(test__f_thread_conditions_decrease_by__works),
+ cmocka_unit_test(test__f_thread_conditions_increase__works),
+ cmocka_unit_test(test__f_thread_conditions_increase_by__works),
+ cmocka_unit_test(test__f_thread_conditions_resize__works),
+
+ cmocka_unit_test(test__f_thread_ids_decimate_by__returns_data_not),
+ cmocka_unit_test(test__f_thread_ids_decrease_by__returns_data_not),
+ cmocka_unit_test(test__f_thread_ids_increase__returns_data_not),
+ cmocka_unit_test(test__f_thread_ids_increase_by__returns_data_not),
+
+ cmocka_unit_test(test__f_thread_ids_adjust__works),
+ cmocka_unit_test(test__f_thread_ids_decimate_by__works),
+ cmocka_unit_test(test__f_thread_ids_decrease_by__works),
+ cmocka_unit_test(test__f_thread_ids_increase__works),
+ cmocka_unit_test(test__f_thread_ids_increase_by__works),
+ cmocka_unit_test(test__f_thread_ids_resize__works),
+
+ cmocka_unit_test(test__f_thread_keys_decimate_by__returns_data_not),
+ cmocka_unit_test(test__f_thread_keys_decrease_by__returns_data_not),
+ cmocka_unit_test(test__f_thread_keys_increase__returns_data_not),
+ cmocka_unit_test(test__f_thread_keys_increase_by__returns_data_not),
+
+ cmocka_unit_test(test__f_thread_keys_adjust__works),
+ cmocka_unit_test(test__f_thread_keys_decimate_by__works),
+ cmocka_unit_test(test__f_thread_keys_decrease_by__works),
+ cmocka_unit_test(test__f_thread_keys_increase__works),
+ cmocka_unit_test(test__f_thread_keys_increase_by__works),
+ cmocka_unit_test(test__f_thread_keys_resize__works),
+
+ cmocka_unit_test(test__f_thread_lock_attributes_decimate_by__returns_data_not),
+ cmocka_unit_test(test__f_thread_lock_attributes_decrease_by__returns_data_not),
+ cmocka_unit_test(test__f_thread_lock_attributes_increase__returns_data_not),
+ cmocka_unit_test(test__f_thread_lock_attributes_increase_by__returns_data_not),
+
+ cmocka_unit_test(test__f_thread_lock_attributes_adjust__works),
+ cmocka_unit_test(test__f_thread_lock_attributes_decimate_by__works),
+ cmocka_unit_test(test__f_thread_lock_attributes_decrease_by__works),
+ cmocka_unit_test(test__f_thread_lock_attributes_increase__works),
+ cmocka_unit_test(test__f_thread_lock_attributes_increase_by__works),
+ cmocka_unit_test(test__f_thread_lock_attributes_resize__works),
+
+ cmocka_unit_test(test__f_thread_locks_decimate_by__returns_data_not),
+ cmocka_unit_test(test__f_thread_locks_decrease_by__returns_data_not),
+ cmocka_unit_test(test__f_thread_locks_increase__returns_data_not),
+ cmocka_unit_test(test__f_thread_locks_increase_by__returns_data_not),
+
+ cmocka_unit_test(test__f_thread_locks_adjust__works),
+ cmocka_unit_test(test__f_thread_locks_decimate_by__works),
+ cmocka_unit_test(test__f_thread_locks_decrease_by__works),
+ cmocka_unit_test(test__f_thread_locks_increase__works),
+ cmocka_unit_test(test__f_thread_locks_increase_by__works),
+ cmocka_unit_test(test__f_thread_locks_resize__works),
+
+ cmocka_unit_test(test__f_thread_mutex_attributes_decimate_by__returns_data_not),
+ cmocka_unit_test(test__f_thread_mutex_attributes_decrease_by__returns_data_not),
+ cmocka_unit_test(test__f_thread_mutex_attributes_increase__returns_data_not),
+ cmocka_unit_test(test__f_thread_mutex_attributes_increase_by__returns_data_not),
+
+ cmocka_unit_test(test__f_thread_mutex_attributes_adjust__works),
+ cmocka_unit_test(test__f_thread_mutex_attributes_decimate_by__works),
+ cmocka_unit_test(test__f_thread_mutex_attributes_decrease_by__works),
+ cmocka_unit_test(test__f_thread_mutex_attributes_increase__works),
+ cmocka_unit_test(test__f_thread_mutex_attributes_increase_by__works),
+ cmocka_unit_test(test__f_thread_mutex_attributes_resize__works),
+
+ cmocka_unit_test(test__f_thread_mutexs_decimate_by__returns_data_not),
+ cmocka_unit_test(test__f_thread_mutexs_decrease_by__returns_data_not),
+ cmocka_unit_test(test__f_thread_mutexs_increase__returns_data_not),
+ cmocka_unit_test(test__f_thread_mutexs_increase_by__returns_data_not),
+
+ cmocka_unit_test(test__f_thread_mutexs_adjust__works),
+ cmocka_unit_test(test__f_thread_mutexs_decimate_by__works),
+ cmocka_unit_test(test__f_thread_mutexs_decrease_by__works),
+ cmocka_unit_test(test__f_thread_mutexs_increase__works),
+ cmocka_unit_test(test__f_thread_mutexs_increase_by__works),
+ cmocka_unit_test(test__f_thread_mutexs_resize__works),
+
+ cmocka_unit_test(test__f_thread_onces_decimate_by__returns_data_not),
+ cmocka_unit_test(test__f_thread_onces_decrease_by__returns_data_not),
+ cmocka_unit_test(test__f_thread_onces_increase__returns_data_not),
+ cmocka_unit_test(test__f_thread_onces_increase_by__returns_data_not),
+
+ cmocka_unit_test(test__f_thread_onces_adjust__works),
+ cmocka_unit_test(test__f_thread_onces_decimate_by__works),
+ cmocka_unit_test(test__f_thread_onces_decrease_by__works),
+ cmocka_unit_test(test__f_thread_onces_increase__works),
+ cmocka_unit_test(test__f_thread_onces_increase_by__works),
+ cmocka_unit_test(test__f_thread_onces_resize__works),
+
+ cmocka_unit_test(test__f_thread_semaphores_decimate_by__returns_data_not),
+ cmocka_unit_test(test__f_thread_semaphores_decrease_by__returns_data_not),
+ cmocka_unit_test(test__f_thread_semaphores_increase__returns_data_not),
+ cmocka_unit_test(test__f_thread_semaphores_increase_by__returns_data_not),
+
+ cmocka_unit_test(test__f_thread_semaphores_adjust__works),
+ cmocka_unit_test(test__f_thread_semaphores_decimate_by__works),
+ cmocka_unit_test(test__f_thread_semaphores_decrease_by__works),
+ cmocka_unit_test(test__f_thread_semaphores_increase__works),
+ cmocka_unit_test(test__f_thread_semaphores_increase_by__works),
+ cmocka_unit_test(test__f_thread_semaphores_resize__works),
+
+ cmocka_unit_test(test__f_thread_sets_decimate_by__returns_data_not),
+ cmocka_unit_test(test__f_thread_sets_decrease_by__returns_data_not),
+ cmocka_unit_test(test__f_thread_sets_increase__returns_data_not),
+ cmocka_unit_test(test__f_thread_sets_increase_by__returns_data_not),
+
+ cmocka_unit_test(test__f_thread_sets_adjust__works),
+ cmocka_unit_test(test__f_thread_sets_decimate_by__works),
+ cmocka_unit_test(test__f_thread_sets_decrease_by__works),
+ cmocka_unit_test(test__f_thread_sets_increase__works),
+ cmocka_unit_test(test__f_thread_sets_increase_by__works),
+ cmocka_unit_test(test__f_thread_sets_resize__works),
+
+ cmocka_unit_test(test__f_thread_spins_decimate_by__returns_data_not),
+ cmocka_unit_test(test__f_thread_spins_decrease_by__returns_data_not),
+ cmocka_unit_test(test__f_thread_spins_increase__returns_data_not),
+ cmocka_unit_test(test__f_thread_spins_increase_by__returns_data_not),
+
+ cmocka_unit_test(test__f_thread_spins_adjust__works),
+ cmocka_unit_test(test__f_thread_spins_decimate_by__works),
+ cmocka_unit_test(test__f_thread_spins_decrease_by__works),
+ cmocka_unit_test(test__f_thread_spins_increase__works),
+ cmocka_unit_test(test__f_thread_spins_increase_by__works),
+ cmocka_unit_test(test__f_thread_spins_resize__works),
+
+ cmocka_unit_test(test__f_thread_at_fork__fails),
+ cmocka_unit_test(test__f_thread_at_fork__works),
+
+ cmocka_unit_test(test__f_thread_attribute_affinity_get__fails),
+ cmocka_unit_test(test__f_thread_attribute_affinity_get__works),
+
+ cmocka_unit_test(test__f_thread_attribute_affinity_set__fails),
+ cmocka_unit_test(test__f_thread_attribute_affinity_set__works),
+
+ cmocka_unit_test(test__f_thread_attribute_condition_clock_get__fails),
+ cmocka_unit_test(test__f_thread_attribute_condition_clock_get__works),
+
+ cmocka_unit_test(test__f_thread_attribute_condition_clock_set__fails),
+ cmocka_unit_test(test__f_thread_attribute_condition_clock_set__works),
+
+ cmocka_unit_test(test__f_thread_attribute_condition_shared_get__fails),
+ cmocka_unit_test(test__f_thread_attribute_condition_shared_get__works),
+
+ cmocka_unit_test(test__f_thread_attribute_condition_shared_set__fails),
+ cmocka_unit_test(test__f_thread_attribute_condition_shared_set__works),
+
+ cmocka_unit_test(test__f_thread_attribute_create__fails),
+ cmocka_unit_test(test__f_thread_attribute_create__works),
+
+ cmocka_unit_test(test__f_thread_attribute_default_get__fails),
+ cmocka_unit_test(test__f_thread_attribute_default_get__works),
+
+ cmocka_unit_test(test__f_thread_attribute_default_set__fails),
+ cmocka_unit_test(test__f_thread_attribute_default_set__works),
+
+ cmocka_unit_test(test__f_thread_attribute_delete__fails),
+ cmocka_unit_test(test__f_thread_attribute_delete__works),
+
+ cmocka_unit_test(test__f_thread_attribute_detach_get__fails),
+ cmocka_unit_test(test__f_thread_attribute_detach_get__works),
+
+ cmocka_unit_test(test__f_thread_attribute_detach_set__fails),
+ cmocka_unit_test(test__f_thread_attribute_detach_set__works),
+
+ cmocka_unit_test(test__f_thread_attribute_guard_get__fails),
+ cmocka_unit_test(test__f_thread_attribute_guard_get__works),
+
+ cmocka_unit_test(test__f_thread_attribute_guard_set__fails),
+ cmocka_unit_test(test__f_thread_attribute_guard_set__works),
+
+ cmocka_unit_test(test__f_thread_attribute_scheduler_inherit_get__fails),
+ cmocka_unit_test(test__f_thread_attribute_scheduler_inherit_get__works),
+
+ cmocka_unit_test(test__f_thread_attribute_scheduler_inherit_set__fails),
+ cmocka_unit_test(test__f_thread_attribute_scheduler_inherit_set__works),
+
+ cmocka_unit_test(test__f_thread_attribute_scheduler_parameter_get__fails),
+ cmocka_unit_test(test__f_thread_attribute_scheduler_parameter_get__works),
+
+ cmocka_unit_test(test__f_thread_attribute_scheduler_parameter_set__fails),
+ cmocka_unit_test(test__f_thread_attribute_scheduler_parameter_set__works),
+
+ #ifndef _di_level_0_parameter_checking_
+ cmocka_unit_test(test__f_thread_attributes_adjust__parameter_checking),
+ cmocka_unit_test(test__f_thread_attributes_decimate_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_attributes_decrease_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_attributes_increase__parameter_checking),
+ cmocka_unit_test(test__f_thread_attributes_increase_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_attributes_resize__parameter_checking),
+
+ cmocka_unit_test(test__f_thread_barrier_attributes_adjust__parameter_checking),
+ cmocka_unit_test(test__f_thread_barrier_attributes_decimate_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_barrier_attributes_decrease_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_barrier_attributes_increase__parameter_checking),
+ cmocka_unit_test(test__f_thread_barrier_attributes_increase_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_barrier_attributes_resize__parameter_checking),
+
+ cmocka_unit_test(test__f_thread_barriers_adjust__parameter_checking),
+ cmocka_unit_test(test__f_thread_barriers_decimate_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_barriers_decrease_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_barriers_increase__parameter_checking),
+ cmocka_unit_test(test__f_thread_barriers_increase_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_barriers_resize__parameter_checking),
+
+ cmocka_unit_test(test__f_thread_condition_attributes_adjust__parameter_checking),
+ cmocka_unit_test(test__f_thread_condition_attributes_decimate_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_condition_attributes_decrease_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_condition_attributes_increase__parameter_checking),
+ cmocka_unit_test(test__f_thread_condition_attributes_increase_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_condition_attributes_resize__parameter_checking),
+
+ cmocka_unit_test(test__f_thread_conditions_adjust__parameter_checking),
+ cmocka_unit_test(test__f_thread_conditions_decimate_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_conditions_decrease_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_conditions_increase__parameter_checking),
+ cmocka_unit_test(test__f_thread_conditions_increase_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_conditions_resize__parameter_checking),
+
+ cmocka_unit_test(test__f_thread_ids_adjust__parameter_checking),
+ cmocka_unit_test(test__f_thread_ids_decimate_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_ids_decrease_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_ids_increase__parameter_checking),
+ cmocka_unit_test(test__f_thread_ids_increase_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_ids_resize__parameter_checking),
+
+ cmocka_unit_test(test__f_thread_keys_adjust__parameter_checking),
+ cmocka_unit_test(test__f_thread_keys_decimate_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_keys_decrease_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_keys_increase__parameter_checking),
+ cmocka_unit_test(test__f_thread_keys_increase_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_keys_resize__parameter_checking),
+
+ cmocka_unit_test(test__f_thread_lock_attributes_adjust__parameter_checking),
+ cmocka_unit_test(test__f_thread_lock_attributes_decimate_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_lock_attributes_decrease_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_lock_attributes_increase__parameter_checking),
+ cmocka_unit_test(test__f_thread_lock_attributes_increase_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_lock_attributes_resize__parameter_checking),
+
+ cmocka_unit_test(test__f_thread_locks_adjust__parameter_checking),
+ cmocka_unit_test(test__f_thread_locks_decimate_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_locks_decrease_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_locks_increase__parameter_checking),
+ cmocka_unit_test(test__f_thread_locks_increase_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_locks_resize__parameter_checking),
+
+ cmocka_unit_test(test__f_thread_mutex_attributes_adjust__parameter_checking),
+ cmocka_unit_test(test__f_thread_mutex_attributes_decimate_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_mutex_attributes_decrease_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_mutex_attributes_increase__parameter_checking),
+ cmocka_unit_test(test__f_thread_mutex_attributes_increase_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_mutex_attributes_resize__parameter_checking),
+
+ cmocka_unit_test(test__f_thread_mutexs_adjust__parameter_checking),
+ cmocka_unit_test(test__f_thread_mutexs_decimate_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_mutexs_decrease_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_mutexs_increase__parameter_checking),
+ cmocka_unit_test(test__f_thread_mutexs_increase_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_mutexs_resize__parameter_checking),
+
+ cmocka_unit_test(test__f_thread_onces_adjust__parameter_checking),
+ cmocka_unit_test(test__f_thread_onces_decimate_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_onces_decrease_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_onces_increase__parameter_checking),
+ cmocka_unit_test(test__f_thread_onces_increase_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_onces_resize__parameter_checking),
+
+ cmocka_unit_test(test__f_thread_semaphores_adjust__parameter_checking),
+ cmocka_unit_test(test__f_thread_semaphores_decimate_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_semaphores_decrease_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_semaphores_increase__parameter_checking),
+ cmocka_unit_test(test__f_thread_semaphores_increase_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_semaphores_resize__parameter_checking),
+
+ cmocka_unit_test(test__f_thread_sets_adjust__parameter_checking),
+ cmocka_unit_test(test__f_thread_sets_decimate_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_sets_decrease_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_sets_increase__parameter_checking),
+ cmocka_unit_test(test__f_thread_sets_increase_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_sets_resize__parameter_checking),
+
+ cmocka_unit_test(test__f_thread_spins_adjust__parameter_checking),
+ cmocka_unit_test(test__f_thread_spins_decimate_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_spins_decrease_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_spins_increase__parameter_checking),
+ cmocka_unit_test(test__f_thread_spins_increase_by__parameter_checking),
+ cmocka_unit_test(test__f_thread_spins_resize__parameter_checking),
+
+ cmocka_unit_test(test__f_thread_at_fork__parameter_checking),
+
+ cmocka_unit_test(test__f_thread_attribute_affinity_get__parameter_checking),
+ cmocka_unit_test(test__f_thread_attribute_affinity_set__parameter_checking),
+
+ cmocka_unit_test(test__f_thread_attribute_condition_clock_get__parameter_checking),
+ cmocka_unit_test(test__f_thread_attribute_condition_clock_set__parameter_checking),
+
+ cmocka_unit_test(test__f_thread_attribute_condition_shared_get__parameter_checking),
+ cmocka_unit_test(test__f_thread_attribute_condition_shared_set__parameter_checking),
+
+ cmocka_unit_test(test__f_thread_attribute_create__parameter_checking),
+
+ cmocka_unit_test(test__f_thread_attribute_default_get__parameter_checking),
+ cmocka_unit_test(test__f_thread_attribute_default_set__parameter_checking),
+
+ cmocka_unit_test(test__f_thread_attribute_delete__parameter_checking),
+
+ cmocka_unit_test(test__f_thread_attribute_detach_get__parameter_checking),
+ cmocka_unit_test(test__f_thread_attribute_detach_set__parameter_checking),
+
+ cmocka_unit_test(test__f_thread_attribute_guard_get__parameter_checking),
+ cmocka_unit_test(test__f_thread_attribute_guard_set__parameter_checking),
+
+ cmocka_unit_test(test__f_thread_attribute_scheduler_inherit_get__parameter_checking),
+ cmocka_unit_test(test__f_thread_attribute_scheduler_inherit_set__parameter_checking),
+
+ cmocka_unit_test(test__f_thread_attribute_scheduler_parameter_get__parameter_checking),
+ cmocka_unit_test(test__f_thread_attribute_scheduler_parameter_set__parameter_checking),
+
+ #endif // _di_level_0_parameter_checking_
+
+ // f_thread_user_set() doesn't use parameter checking.
+ };
+
+ return cmocka_run_group_tests(tests, setup, setdown);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Thread
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the thread project.
+ */
+#ifndef _TEST__F_thread_h
+#define _TEST__F_thread_h
+
+// Libc includes.
+#include <stdarg.h>
+#include <stddef.h>
+#include <setjmp.h>
+#include <stdint.h>
+#include <stdio.h>
+
+// cmocka includes.
+#include <cmocka.h>
+
+// FLL-0 includes.
+#include <fll/level_0/thread.h>
+
+// Mock includes.
+#include "mock-thread.h"
+
+// Test includes.
+#include "test-thread-attributes_adjust.h"
+#include "test-thread-attributes_decimate_by.h"
+#include "test-thread-attributes_decrease_by.h"
+#include "test-thread-attributes_increase.h"
+#include "test-thread-attributes_increase_by.h"
+#include "test-thread-attributes_resize.h"
+#include "test-thread-barriers_adjust.h"
+#include "test-thread-barriers_decimate_by.h"
+#include "test-thread-barriers_decrease_by.h"
+#include "test-thread-barriers_increase.h"
+#include "test-thread-barriers_increase_by.h"
+#include "test-thread-barriers_resize.h"
+#include "test-thread-barrier_attributes_adjust.h"
+#include "test-thread-barrier_attributes_decimate_by.h"
+#include "test-thread-barrier_attributes_decrease_by.h"
+#include "test-thread-barrier_attributes_increase.h"
+#include "test-thread-barrier_attributes_increase_by.h"
+#include "test-thread-barrier_attributes_resize.h"
+#include "test-thread-conditions_adjust.h"
+#include "test-thread-conditions_decimate_by.h"
+#include "test-thread-conditions_decrease_by.h"
+#include "test-thread-conditions_increase.h"
+#include "test-thread-conditions_increase_by.h"
+#include "test-thread-conditions_resize.h"
+#include "test-thread-condition_attributes_adjust.h"
+#include "test-thread-condition_attributes_decimate_by.h"
+#include "test-thread-condition_attributes_decrease_by.h"
+#include "test-thread-condition_attributes_increase.h"
+#include "test-thread-condition_attributes_increase_by.h"
+#include "test-thread-condition_attributes_resize.h"
+#include "test-thread-ids_adjust.h"
+#include "test-thread-ids_decimate_by.h"
+#include "test-thread-ids_decrease_by.h"
+#include "test-thread-ids_increase.h"
+#include "test-thread-ids_increase_by.h"
+#include "test-thread-ids_resize.h"
+#include "test-thread-keys_adjust.h"
+#include "test-thread-keys_decimate_by.h"
+#include "test-thread-keys_decrease_by.h"
+#include "test-thread-keys_increase.h"
+#include "test-thread-keys_increase_by.h"
+#include "test-thread-keys_resize.h"
+#include "test-thread-locks_adjust.h"
+#include "test-thread-locks_decimate_by.h"
+#include "test-thread-locks_decrease_by.h"
+#include "test-thread-locks_increase.h"
+#include "test-thread-locks_increase_by.h"
+#include "test-thread-locks_resize.h"
+#include "test-thread-lock_attributes_adjust.h"
+#include "test-thread-lock_attributes_decimate_by.h"
+#include "test-thread-lock_attributes_decrease_by.h"
+#include "test-thread-lock_attributes_increase.h"
+#include "test-thread-lock_attributes_increase_by.h"
+#include "test-thread-lock_attributes_resize.h"
+#include "test-thread-mutexs_adjust.h"
+#include "test-thread-mutexs_decimate_by.h"
+#include "test-thread-mutexs_decrease_by.h"
+#include "test-thread-mutexs_increase.h"
+#include "test-thread-mutexs_increase_by.h"
+#include "test-thread-mutexs_resize.h"
+#include "test-thread-mutex_attributes_adjust.h"
+#include "test-thread-mutex_attributes_decimate_by.h"
+#include "test-thread-mutex_attributes_decrease_by.h"
+#include "test-thread-mutex_attributes_increase.h"
+#include "test-thread-mutex_attributes_increase_by.h"
+#include "test-thread-mutex_attributes_resize.h"
+#include "test-thread-onces_adjust.h"
+#include "test-thread-onces_decimate_by.h"
+#include "test-thread-onces_decrease_by.h"
+#include "test-thread-onces_increase.h"
+#include "test-thread-onces_increase_by.h"
+#include "test-thread-onces_resize.h"
+#include "test-thread-semaphores_adjust.h"
+#include "test-thread-semaphores_decimate_by.h"
+#include "test-thread-semaphores_decrease_by.h"
+#include "test-thread-semaphores_increase.h"
+#include "test-thread-semaphores_increase_by.h"
+#include "test-thread-semaphores_resize.h"
+#include "test-thread-sets_adjust.h"
+#include "test-thread-sets_decimate_by.h"
+#include "test-thread-sets_decrease_by.h"
+#include "test-thread-sets_increase.h"
+#include "test-thread-sets_increase_by.h"
+#include "test-thread-sets_resize.h"
+#include "test-thread-spins_adjust.h"
+#include "test-thread-spins_decimate_by.h"
+#include "test-thread-spins_decrease_by.h"
+#include "test-thread-spins_increase.h"
+#include "test-thread-spins_increase_by.h"
+#include "test-thread-spins_resize.h"
+
+#include "test-thread-at_fork.h"
+#include "test-thread-attribute_affinity_get.h"
+#include "test-thread-attribute_affinity_set.h"
+#include "test-thread-attribute_condition_clock_get.h"
+#include "test-thread-attribute_condition_clock_set.h"
+#include "test-thread-attribute_condition_shared_get.h"
+#include "test-thread-attribute_condition_shared_set.h"
+#include "test-thread-attribute_create.h"
+#include "test-thread-attribute_default_get.h"
+#include "test-thread-attribute_default_set.h"
+#include "test-thread-attribute_delete.h"
+#include "test-thread-attribute_detach_get.h"
+#include "test-thread-attribute_detach_set.h"
+#include "test-thread-attribute_guard_get.h"
+#include "test-thread-attribute_guard_set.h"
+#include "test-thread-attribute_scheduler_inherit_get.h"
+#include "test-thread-attribute_scheduler_inherit_set.h"
+#include "test-thread-attribute_scheduler_parameter_get.h"
+#include "test-thread-attribute_scheduler_parameter_set.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_thread_h