]> Kevux Git Server - fll/commitdiff
Update: Unit tests, fixing minor mistakes and add missing tests.
authorKevin Day <thekevinday@gmail.com>
Sun, 15 May 2022 03:19:50 +0000 (22:19 -0500)
committerKevin Day <thekevinday@gmail.com>
Sun, 15 May 2022 03:19:50 +0000 (22:19 -0500)
While these tests are not expected to be thorough at this time, there are several checks that should still be and can easily be made.

Some of the test files have incorrect comments.

Order test functions alphabetically.

500 files changed:
level_0/f_limit/tests/unit/c/test-limit-sets_append_all.h
level_0/f_limit/tests/unit/c/test-limit-sets_increase.h
level_0/f_limit/tests/unit/c/test-limit-setss_append.h
level_0/f_limit/tests/unit/c/test-limit-setss_append_all.h
level_0/f_limit/tests/unit/c/test-limit-setss_decimate_by.h
level_0/f_limit/tests/unit/c/test-limit-setss_decrease_by.h
level_0/f_limit/tests/unit/c/test-limit-setss_increase.h
level_0/f_limit/tests/unit/c/test-limit-setss_increase_by.h
level_0/f_limit/tests/unit/c/test-limit-values_append_all.h
level_0/f_limit/tests/unit/c/test-limit-values_increase.h
level_0/f_limit/tests/unit/c/test-limit-valuess_append.h
level_0/f_limit/tests/unit/c/test-limit-valuess_append_all.h
level_0/f_limit/tests/unit/c/test-limit-valuess_decimate_by.h
level_0/f_limit/tests/unit/c/test-limit-valuess_decrease_by.h
level_0/f_limit/tests/unit/c/test-limit-valuess_increase.h
level_0/f_limit/tests/unit/c/test-limit-valuess_increase_by.h
level_0/f_path/tests/unit/c/test-path-current.h
level_0/f_pipe/tests/unit/c/mock-pipe.h
level_0/f_pipe/tests/unit/c/test-pipe.h
level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_append.c
level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_append.h
level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_append_all.c
level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_append_all.h
level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-array_lengthss_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-array_lengthss_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-array_lengthss_append.c
level_0/f_type_array/tests/unit/c/test-type_array-array_lengthss_append.h
level_0/f_type_array/tests/unit/c/test-type_array-array_lengthss_append_all.c
level_0/f_type_array/tests/unit/c/test-type_array-array_lengthss_append_all.h
level_0/f_type_array/tests/unit/c/test-type_array-array_lengthss_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-array_lengthss_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-array_lengthss_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-array_lengthss_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-array_lengthss_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-array_lengthss_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-array_lengthss_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-array_lengthss_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-array_lengthss_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-array_lengthss_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-cells_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-cells_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-cells_append.c
level_0/f_type_array/tests/unit/c/test-type_array-cells_append.h
level_0/f_type_array/tests/unit/c/test-type_array-cells_append_all.c
level_0/f_type_array/tests/unit/c/test-type_array-cells_append_all.h
level_0/f_type_array/tests/unit/c/test-type_array-cells_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-cells_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-cells_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-cells_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-cells_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-cells_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-cells_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-cells_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-cells_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-cells_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-cellss_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-cellss_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-cellss_append.c
level_0/f_type_array/tests/unit/c/test-type_array-cellss_append.h
level_0/f_type_array/tests/unit/c/test-type_array-cellss_append_all.c
level_0/f_type_array/tests/unit/c/test-type_array-cellss_append_all.h
level_0/f_type_array/tests/unit/c/test-type_array-cellss_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-cellss_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-cellss_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-cellss_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-cellss_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-cellss_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-cellss_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-cellss_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-cellss_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-cellss_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_append.c
level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_append.h
level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_append_all.c
level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_append_all.h
level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_append.c
level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_append.h
level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_append_all.c
level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_append_all.h
level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-int128s_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-int128s_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-int128s_append.c
level_0/f_type_array/tests/unit/c/test-type_array-int128s_append.h
level_0/f_type_array/tests/unit/c/test-type_array-int128s_append_all.c
level_0/f_type_array/tests/unit/c/test-type_array-int128s_append_all.h
level_0/f_type_array/tests/unit/c/test-type_array-int128s_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int128s_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int128s_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int128s_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int128s_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-int128s_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-int128s_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int128s_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int128s_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-int128s_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-int128ss_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-int128ss_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-int128ss_append.c
level_0/f_type_array/tests/unit/c/test-type_array-int128ss_append.h
level_0/f_type_array/tests/unit/c/test-type_array-int128ss_append_all.c
level_0/f_type_array/tests/unit/c/test-type_array-int128ss_append_all.h
level_0/f_type_array/tests/unit/c/test-type_array-int128ss_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int128ss_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int128ss_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int128ss_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int128ss_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-int128ss_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-int128ss_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int128ss_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int128ss_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-int128ss_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-int16s_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-int16s_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-int16s_append.c
level_0/f_type_array/tests/unit/c/test-type_array-int16s_append.h
level_0/f_type_array/tests/unit/c/test-type_array-int16s_append_all.c
level_0/f_type_array/tests/unit/c/test-type_array-int16s_append_all.h
level_0/f_type_array/tests/unit/c/test-type_array-int16s_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int16s_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int16s_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int16s_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int16s_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-int16s_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-int16s_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int16s_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int16s_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-int16s_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-int16ss_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-int16ss_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-int16ss_append.c
level_0/f_type_array/tests/unit/c/test-type_array-int16ss_append.h
level_0/f_type_array/tests/unit/c/test-type_array-int16ss_append_all.c
level_0/f_type_array/tests/unit/c/test-type_array-int16ss_append_all.h
level_0/f_type_array/tests/unit/c/test-type_array-int16ss_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int16ss_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int16ss_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int16ss_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int16ss_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-int16ss_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-int16ss_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int16ss_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int16ss_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-int16ss_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-int32s_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-int32s_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-int32s_append.c
level_0/f_type_array/tests/unit/c/test-type_array-int32s_append.h
level_0/f_type_array/tests/unit/c/test-type_array-int32s_append_all.c
level_0/f_type_array/tests/unit/c/test-type_array-int32s_append_all.h
level_0/f_type_array/tests/unit/c/test-type_array-int32s_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int32s_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int32s_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int32s_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int32s_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-int32s_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-int32s_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int32s_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int32s_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-int32s_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-int32ss_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-int32ss_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-int32ss_append.c
level_0/f_type_array/tests/unit/c/test-type_array-int32ss_append.h
level_0/f_type_array/tests/unit/c/test-type_array-int32ss_append_all.c
level_0/f_type_array/tests/unit/c/test-type_array-int32ss_append_all.h
level_0/f_type_array/tests/unit/c/test-type_array-int32ss_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int32ss_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int32ss_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int32ss_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int32ss_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-int32ss_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-int32ss_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int32ss_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int32ss_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-int32ss_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-int64s_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-int64s_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-int64s_append.c
level_0/f_type_array/tests/unit/c/test-type_array-int64s_append.h
level_0/f_type_array/tests/unit/c/test-type_array-int64s_append_all.c
level_0/f_type_array/tests/unit/c/test-type_array-int64s_append_all.h
level_0/f_type_array/tests/unit/c/test-type_array-int64s_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int64s_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int64s_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int64s_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int64s_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-int64s_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-int64s_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int64s_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int64s_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-int64s_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-int64ss_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-int64ss_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-int64ss_append.c
level_0/f_type_array/tests/unit/c/test-type_array-int64ss_append.h
level_0/f_type_array/tests/unit/c/test-type_array-int64ss_append_all.c
level_0/f_type_array/tests/unit/c/test-type_array-int64ss_append_all.h
level_0/f_type_array/tests/unit/c/test-type_array-int64ss_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int64ss_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int64ss_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int64ss_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int64ss_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-int64ss_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-int64ss_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int64ss_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int64ss_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-int64ss_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-int8s_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-int8s_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-int8s_append.c
level_0/f_type_array/tests/unit/c/test-type_array-int8s_append.h
level_0/f_type_array/tests/unit/c/test-type_array-int8s_append_all.c
level_0/f_type_array/tests/unit/c/test-type_array-int8s_append_all.h
level_0/f_type_array/tests/unit/c/test-type_array-int8s_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int8s_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int8s_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int8s_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int8s_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-int8s_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-int8s_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int8s_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int8s_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-int8s_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-int8ss_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-int8ss_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-int8ss_append.c
level_0/f_type_array/tests/unit/c/test-type_array-int8ss_append.h
level_0/f_type_array/tests/unit/c/test-type_array-int8ss_append_all.c
level_0/f_type_array/tests/unit/c/test-type_array-int8ss_append_all.h
level_0/f_type_array/tests/unit/c/test-type_array-int8ss_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int8ss_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int8ss_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int8ss_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int8ss_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-int8ss_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-int8ss_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int8ss_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int8ss_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-int8ss_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-states_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-states_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-states_append.c
level_0/f_type_array/tests/unit/c/test-type_array-states_append.h
level_0/f_type_array/tests/unit/c/test-type_array-states_append_all.c
level_0/f_type_array/tests/unit/c/test-type_array-states_append_all.h
level_0/f_type_array/tests/unit/c/test-type_array-states_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-states_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-states_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-states_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-states_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-states_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-states_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-states_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-states_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-states_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-statess_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-statess_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-statess_append.c
level_0/f_type_array/tests/unit/c/test-type_array-statess_append.h
level_0/f_type_array/tests/unit/c/test-type_array-statess_append_all.c
level_0/f_type_array/tests/unit/c/test-type_array-statess_append_all.h
level_0/f_type_array/tests/unit/c/test-type_array-statess_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-statess_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-statess_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-statess_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-statess_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-statess_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-statess_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-statess_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-statess_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-statess_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-statuss_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-statuss_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-statuss_append.c
level_0/f_type_array/tests/unit/c/test-type_array-statuss_append.h
level_0/f_type_array/tests/unit/c/test-type_array-statuss_append_all.c
level_0/f_type_array/tests/unit/c/test-type_array-statuss_append_all.h
level_0/f_type_array/tests/unit/c/test-type_array-statuss_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-statuss_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-statuss_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-statuss_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-statuss_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-statuss_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-statuss_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-statuss_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-statuss_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-statuss_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-statusss_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-statusss_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-statusss_append.c
level_0/f_type_array/tests/unit/c/test-type_array-statusss_append.h
level_0/f_type_array/tests/unit/c/test-type_array-statusss_append_all.c
level_0/f_type_array/tests/unit/c/test-type_array-statusss_append_all.h
level_0/f_type_array/tests/unit/c/test-type_array-statusss_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-statusss_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-statusss_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-statusss_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-statusss_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-statusss_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-statusss_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-statusss_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-statusss_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-statusss_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-uint128s_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-uint128s_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-uint128s_append.c
level_0/f_type_array/tests/unit/c/test-type_array-uint128s_append.h
level_0/f_type_array/tests/unit/c/test-type_array-uint128s_append_all.c
level_0/f_type_array/tests/unit/c/test-type_array-uint128s_append_all.h
level_0/f_type_array/tests/unit/c/test-type_array-uint128s_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint128s_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint128s_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint128s_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint128s_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-uint128s_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-uint128s_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint128s_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint128s_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-uint128s_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_append.c
level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_append.h
level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_append_all.c
level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_append_all.h
level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-uint16s_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-uint16s_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-uint16s_append.c
level_0/f_type_array/tests/unit/c/test-type_array-uint16s_append.h
level_0/f_type_array/tests/unit/c/test-type_array-uint16s_append_all.c
level_0/f_type_array/tests/unit/c/test-type_array-uint16s_append_all.h
level_0/f_type_array/tests/unit/c/test-type_array-uint16s_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint16s_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint16s_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint16s_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint16s_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-uint16s_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-uint16s_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint16s_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint16s_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-uint16s_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_append.c
level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_append.h
level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_append_all.c
level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_append_all.h
level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-uint32s_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-uint32s_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-uint32s_append.c
level_0/f_type_array/tests/unit/c/test-type_array-uint32s_append.h
level_0/f_type_array/tests/unit/c/test-type_array-uint32s_append_all.c
level_0/f_type_array/tests/unit/c/test-type_array-uint32s_append_all.h
level_0/f_type_array/tests/unit/c/test-type_array-uint32s_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint32s_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint32s_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint32s_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint32s_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-uint32s_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-uint32s_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint32s_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint32s_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-uint32s_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_append.c
level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_append.h
level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_append_all.c
level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_append_all.h
level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-uint64s_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-uint64s_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-uint64s_append.c
level_0/f_type_array/tests/unit/c/test-type_array-uint64s_append.h
level_0/f_type_array/tests/unit/c/test-type_array-uint64s_append_all.c
level_0/f_type_array/tests/unit/c/test-type_array-uint64s_append_all.h
level_0/f_type_array/tests/unit/c/test-type_array-uint64s_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint64s_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint64s_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint64s_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint64s_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-uint64s_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-uint64s_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint64s_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint64s_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-uint64s_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_append.c
level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_append.h
level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_append_all.c
level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_append_all.h
level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-uint8s_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-uint8s_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-uint8s_append.c
level_0/f_type_array/tests/unit/c/test-type_array-uint8s_append.h
level_0/f_type_array/tests/unit/c/test-type_array-uint8s_append_all.c
level_0/f_type_array/tests/unit/c/test-type_array-uint8s_append_all.h
level_0/f_type_array/tests/unit/c/test-type_array-uint8s_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint8s_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint8s_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint8s_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint8s_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-uint8s_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-uint8s_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint8s_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint8s_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-uint8s_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_append.c
level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_append.h
level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_append_all.c
level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_append_all.h
level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_resize.h
level_0/f_type_array/tests/unit/c/test-type_array.c

index dcf55a50914d2e0c61c763f46b59102620d7ae5a..6371ff760a3bfb5805d63861a7500e91dcae5c57 100644 (file)
@@ -18,7 +18,7 @@
 extern void test__f_limit_sets_append_all__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
  * @see f_limit_sets_append_all()
  */
index 8d90cb27078d72c183a1e50c3be1a50cfc4de80a..96387ff440c6ace434776357e7fda2e9caa4d94a 100644 (file)
@@ -18,7 +18,7 @@
 extern void test__f_limit_sets_increase__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
  * @see f_limit_sets_increase()
  */
index a113b17e934a96b59e62e61a4b74e5c88df4fedf..a29fed8df9a51a4948a2c1da32370f6dd9366033 100644 (file)
@@ -18,7 +18,7 @@
 extern void test__f_limit_setss_append__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
  * @see f_limit_setss_append()
  */
index 575e9feecb436a255e6d382f605510e79a971699..696e35ea622d796c4eb9aaae056f95db050d91ba 100644 (file)
@@ -18,7 +18,7 @@
 extern void test__f_limit_setss_append_all__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
  * @see f_limit_setss_append_all()
  */
index 62e46e46f516da582593c2dace5e513780389bed..265644c34dbf5e4c82f4dbed145c02aa7a60b6b8 100644 (file)
@@ -18,7 +18,7 @@
 extern void test__f_limit_setss_decimate_by__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
  * @see f_limit_setss_decimate_by()
  */
index 52266c56075e5ec0640bc8d0d4ee875b445d2cd7..30989487cf4d7aac2cd01f6f09fff2381df563c2 100644 (file)
@@ -18,7 +18,7 @@
 extern void test__f_limit_setss_decrease_by__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
  * @see f_limit_setss_decrease_by()
  */
index a4ba142251e4570cceee06a255ec4b1cc2500623..121d2710da5581d356c056ad4912d8650e6768ff 100644 (file)
@@ -18,7 +18,7 @@
 extern void test__f_limit_setss_increase__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
  * @see f_limit_setss_increase()
  */
index 06f361274e05a63af66edfdddaff6acdc2cd20d5..320fa11b39d97ba75412b348aca3ec31f0d5118a 100644 (file)
@@ -18,7 +18,7 @@
 extern void test__f_limit_setss_increase_by__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
  * @see f_limit_setss_increase_by()
  */
index 0dd4ba629cd3cfe515d4330a48987b82807f3326..a9e5942fa0640c05aa80a2c5413d066143c28cbc 100644 (file)
@@ -18,7 +18,7 @@
 extern void test__f_limit_values_append_all__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
  * @see f_limit_values_append_all()
  */
index bbe04508daf27704dffd4bbf09b492b300687906..fd7a1f1ac7ed5aae366b756db832a9927c617217 100644 (file)
@@ -18,7 +18,7 @@
 extern void test__f_limit_values_increase__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
  * @see f_limit_values_increase()
  */
index 611e95f4d5bea2a121977674f65c28bd52ad16a7..da69f38ff373d41850065452e360539672043af2 100644 (file)
@@ -18,7 +18,7 @@
 extern void test__f_limit_valuess_append__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
  * @see f_limit_valuess_append()
  */
index c80dcbce88f05d1731b699acbe5f76d9d8064b8a..1bd9b93f668fd55995d3af9340f34fb65cf0ddac 100644 (file)
@@ -18,7 +18,7 @@
 extern void test__f_limit_valuess_append_all__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
  * @see f_limit_valuess_append_all()
  */
index c6cd25774edd06635731bc4d7499562abd4acace..fe735442c804cde6fdc081d5a250603d20eaf20e 100644 (file)
@@ -18,7 +18,7 @@
 extern void test__f_limit_valuess_decimate_by__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
  * @see f_limit_valuess_decimate_by()
  */
index 3592fc3ddf0b6106c2455bb8b3cb70e2e0a71c85..e969828cb78c82189c76b0354b491ce072ac7994 100644 (file)
@@ -18,7 +18,7 @@
 extern void test__f_limit_valuess_decrease_by__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
  * @see f_limit_valuess_decrease_by()
  */
index acf0d69da5e477b3d31e17f7898ae2306237a408..7d58fdd19a6a30363d323468e801db57acee07bd 100644 (file)
@@ -18,7 +18,7 @@
 extern void test__f_limit_valuess_increase__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
  * @see f_limit_valuess_increase()
  */
index 8819fd88b706a077766fc3da4b2f743b9a4df772..11c2f71dc9cbc3f587cc2a8a17036cd0c45f36b0 100644 (file)
@@ -18,7 +18,7 @@
 extern void test__f_limit_valuess_increase_by__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
  * @see f_limit_valuess_increase_by()
  */
index 0f3acb863ca6255ad66bc7ddd514d015905b273f..a9ff7d3082e425805f6c67c24f36b09cd1d9e333 100644 (file)
 #define _TEST__F_path_current_h
 
 /**
+ * Test that function fails.
+ *
+ * @see f_path_current()
+ */
+extern void test__f_path_current__fails(void **state);
+
+/**
  * Test that parameter checking works as expected.
  *
  * @see f_path_current()
   extern void test__f_path_current__parameter_checking(void **state);
 #endif // _di_level_0_parameter_checking_
 
+/**
+ * Test that function works.
+ *
+ * @see f_path_current()
+ */
+extern void test__f_path_current__works(void **state);
+
 #endif // _TEST__F_path_current_h
index f6b44fe7299795fadd4359c6e71091c68518cc45..2b42a617d06e9772416b7f3074653022821747c8 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: Path
+ * Project: Pipe
  * API Version: 0.5
  * Licenses: lgpl-2.1-or-later
  *
index 1d0e9d6465953769f7936ed59768a372cc7fe824..ee9bb51acc40161d2d02df9afdcc58c2a12dc9e7 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * FLL - Level 0
  *
- * Project: IKI
+ * Project: Pipe
  * API Version: 0.5
  * Licenses: lgpl-2.1-or-later
  *
index d58020d47cd1816c78ef661f7bf4c59ad92adb0d..d2fdf68afed70e7fe5978d0de77545c6b96c1edf 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_array_lengths_adjust__works(void **state) {
+void test__f_type_array_array_lengths_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_array_lengths_t data = f_array_lengths_t_initialize;
 
   {
-    const f_status_t status = f_array_lengths_adjust(length, &data);
+    const f_status_t status = f_array_lengths_adjust(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_array_lengths_adjust__parameter_checking(void **state) {
+void test__f_type_array_array_lengths_adjust__works(void **state) {
 
   const int length = 5;
   f_array_lengths_t data = f_array_lengths_t_initialize;
 
   {
-    const f_status_t status = f_array_lengths_adjust(length, 0);
+    const f_status_t status = f_array_lengths_adjust(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index f59c7d317d57f077add784056b1b3ea819dad8f9..c9330bda4c9212b809defc1b5c93126567f8aa13 100644 (file)
 #define _TEST__F_type_array__array_lengths_adjust
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_array_lengths_adjust()
+ * @see f_array_lengths_adjust()
  */
-extern void test__f_type_array_array_lengths_adjust__works(void **state);
+extern void test__f_type_array_array_lengths_adjust__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_array_lengths_adjust()
+ * @see f_array_lengths_adjust()
  */
-extern void test__f_type_array_array_lengths_adjust__parameter_checking(void **state);
+extern void test__f_type_array_array_lengths_adjust__works(void **state);
 
 #endif // _TEST__F_type_array__array_lengths_adjust
index 8e63f947353ea7c14b23551216d9796b81836237..b3bf49cf1eaf186e81d2f228ae0f8ba77608e4b1 100644 (file)
@@ -5,6 +5,17 @@
 extern "C" {
 #endif
 
+void test__f_type_array_array_lengths_append__parameter_checking(void **state) {
+
+  const f_array_length_t data = f_array_length_t_initialize;
+
+  {
+    const f_status_t status = f_array_lengths_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
 void test__f_type_array_array_lengths_append__works(void **state) {
 
   const f_array_length_t source = 3;
@@ -21,17 +32,6 @@ void test__f_type_array_array_lengths_append__works(void **state) {
   free((void *) destination.array);
 }
 
-void test__f_type_array_array_lengths_append__parameter_checking(void **state) {
-
-  const f_array_length_t data = f_array_length_t_initialize;
-
-  {
-    const f_status_t status = f_array_lengths_append(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index de1290cee4dc200c5d52b5d9b4fed00aaea1aa89..33369c0b3305003018b61b92f70518659c364e49 100644 (file)
 #define _TEST__F_type_array__array_lengths_append
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_array_lengths_append()
+ * @see f_array_lengths_append()
  */
-extern void test__f_type_array_array_lengths_append__works(void **state);
+extern void test__f_type_array_array_lengths_append__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_array_lengths_append()
+ * @see f_array_lengths_append()
  */
-extern void test__f_type_array_array_lengths_append__parameter_checking(void **state);
+extern void test__f_type_array_array_lengths_append__works(void **state);
 
 #endif // _TEST__F_type_array__array_lengths_append
index 144a80d84a77c187a623a39dc43b2c8cdd825d17..fae08df89a9c6e2425c968a8c7f48483c3030c3c 100644 (file)
@@ -5,10 +5,20 @@
 extern "C" {
 #endif
 
-void test__f_type_array_array_lengths_append_all__works(void **state) {
+void test__f_type_array_array_lengths_append_all__parameter_checking(void **state) {
+
+  const f_array_lengths_t data = f_array_lengths_t_initialize;
+
+  {
+    const f_status_t status = f_array_lengths_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_array_lengths_append_all__returns_data_not(void **state) {
 
   const int length = 5;
-  const int length_used = 2;
   f_array_lengths_t source = f_array_lengths_t_initialize;
   f_array_lengths_t destination = f_array_lengths_t_initialize;
 
@@ -20,29 +30,22 @@ void test__f_type_array_array_lengths_append_all__works(void **state) {
     assert_int_equal(source.size, length);
   }
 
-  for (; source.used < length_used; ++source.used) {
-    source.array[source.used] = source.used + 1;
-  } // for
-
   {
     const f_status_t status = f_array_lengths_append_all(source, &destination);
 
-    assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
-
-    for (f_array_length_t i = 0; i < source.used; ++i) {
-      assert_int_equal(destination.array[i], i + 1);
-    } // for
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
   }
 
   free((void *) source.array);
-  free((void *) destination.array);
 }
 
-void test__f_type_array_array_lengths_append_all__returns_data_not(void **state) {
+void test__f_type_array_array_lengths_append_all__works(void **state) {
 
   const int length = 5;
+  const int length_used = 2;
   f_array_lengths_t source = f_array_lengths_t_initialize;
   f_array_lengths_t destination = f_array_lengths_t_initialize;
 
@@ -54,27 +57,24 @@ void test__f_type_array_array_lengths_append_all__returns_data_not(void **state)
     assert_int_equal(source.size, length);
   }
 
+  for (; source.used < length_used; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
+
   {
     const f_status_t status = f_array_lengths_append_all(source, &destination);
 
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < source.used; ++i) {
+      assert_int_equal(destination.array[i], i + 1);
+    } // for
   }
 
   free((void *) source.array);
-}
-
-void test__f_type_array_array_lengths_append_all__parameter_checking(void **state) {
-
-  const f_array_lengths_t data = f_array_lengths_t_initialize;
-
-  {
-    const f_status_t status = f_array_lengths_append_all(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
+  free((void *) destination.array);
 }
 
 #ifdef __cplusplus
index 0cf641ba753b8f5f69e5d4b60f7897a31abac734..8b128fdf87ebf3f80302c936cadf7b47ef5077ed 100644 (file)
 #define _TEST__F_type_array__array_lengths_append_all
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_array_lengths_append_all()
+ * @see f_array_lengths_append_all()
  */
-extern void test__f_type_array_array_lengths_append_all__works(void **state);
+extern void test__f_type_array_array_lengths_append_all__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_array_lengths_append_all()
+ * @see f_array_lengths_append_all()
  */
 extern void test__f_type_array_array_lengths_append_all__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_array_lengths_append_all()
+ * @see f_array_lengths_append_all()
  */
-extern void test__f_type_array_array_lengths_append_all__parameter_checking(void **state);
+extern void test__f_type_array_array_lengths_append_all__works(void **state);
 
 #endif // _TEST__F_type_array__array_lengths_append_all
index 5150b8f903566be7bdee0b8a17bafc027f8b8ea0..1472bbeba4fac9570ea7211fee979a2c380f8649 100644 (file)
@@ -5,23 +5,15 @@
 extern "C" {
 #endif
 
-void test__f_type_array_array_lengths_decimate_by__works(void **state) {
+void test__f_type_array_array_lengths_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_array_lengths_t data = f_array_lengths_t_initialize;
 
   {
-    const f_status_t status = f_array_lengths_resize(length, &data);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_array_lengths_decimate_by(length, &data);
+    const f_status_t status = f_array_lengths_decimate_by(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
@@ -29,15 +21,23 @@ void test__f_type_array_array_lengths_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_array_lengths_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_array_lengths_decimate_by__works(void **state) {
 
   const int length = 5;
   f_array_lengths_t data = f_array_lengths_t_initialize;
 
   {
-    const f_status_t status = f_array_lengths_decimate_by(length, 0);
+    const f_status_t status = f_array_lengths_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_array_lengths_decimate_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index 84d569fc2892024925875ee93e029ace9c1c4ef2..7816c600416bd51a48de6f1c12de6a4742ec7fbb 100644 (file)
 #define _TEST__F_type_array__array_lengths_decimate_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_array_lengths_decimate_by()
+ * @see f_array_lengths_decimate_by()
  */
-extern void test__f_type_array_array_lengths_decimate_by__works(void **state);
+extern void test__f_type_array_array_lengths_decimate_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_array_lengths_decimate_by()
+ * @see f_array_lengths_decimate_by()
  */
-extern void test__f_type_array_array_lengths_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_array_lengths_decimate_by__works(void **state);
 
 #endif // _TEST__F_type_array__array_lengths_decimate_by
index 92f43662b4b86ce4cef6eea4f1efd74736c47e1c..0ea8d0539d93d9aec00ff9eb96b9b6e2ab4b0691 100644 (file)
@@ -5,23 +5,15 @@
 extern "C" {
 #endif
 
-void test__f_type_array_array_lengths_decrease_by__works(void **state) {
+void test__f_type_array_array_lengths_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_array_lengths_t data = f_array_lengths_t_initialize;
 
   {
-    const f_status_t status = f_array_lengths_resize(length, &data);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_array_lengths_decrease_by(length, &data);
+    const f_status_t status = f_array_lengths_decrease_by(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
@@ -29,15 +21,23 @@ void test__f_type_array_array_lengths_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_array_lengths_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_array_lengths_decrease_by__works(void **state) {
 
   const int length = 5;
   f_array_lengths_t data = f_array_lengths_t_initialize;
 
   {
-    const f_status_t status = f_array_lengths_decrease_by(length, 0);
+    const f_status_t status = f_array_lengths_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_array_lengths_decrease_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index 131b6d9cc844d63ede36e5707a8c9b67a83dd925..cb533dd68be779e4234713cfd43b4d72947f9af6 100644 (file)
 #define _TEST__F_type_array__array_lengths_decrease_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_array_lengths_decrease_by()
+ * @see f_array_lengths_decrease_by()
  */
-extern void test__f_type_array_array_lengths_decrease_by__works(void **state);
+extern void test__f_type_array_array_lengths_decrease_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_array_lengths_decrease_by()
+ * @see f_array_lengths_decrease_by()
  */
-extern void test__f_type_array_array_lengths_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_array_lengths_decrease_by__works(void **state);
 
 #endif // _TEST__F_type_array__array_lengths_decrease_by
index 5b88f60266cb70581efa6f9a5edc6f629da8d94e..02f2385e8126f7ff93434fb7ea502c4e9e3ad467 100644 (file)
@@ -5,27 +5,17 @@
 extern "C" {
 #endif
 
-void test__f_type_array_array_lengths_increase__works(void **state) {
+void test__f_type_array_array_lengths_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_array_lengths_t data = f_array_lengths_t_initialize;
 
   {
-    const f_status_t status = f_array_lengths_resize(length, &data);
+    const f_status_t status = f_array_lengths_increase(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_array_lengths_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);
+    assert_int_equal(data.size, 0);
   }
 
   free((void *) data.array);
@@ -55,17 +45,27 @@ void test__f_type_array_array_lengths_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_array_lengths_increase__parameter_checking(void **state) {
+void test__f_type_array_array_lengths_increase__works(void **state) {
 
   const int length = 5;
   f_array_lengths_t data = f_array_lengths_t_initialize;
 
   {
-    const f_status_t status = f_array_lengths_increase(length, 0);
+    const f_status_t status = f_array_lengths_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    data.used = length;
+
+    const f_status_t status = f_array_lengths_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);
index bf89633b28836f2eb9b4b65be253034da95daec3..667f9771c135e96bf8552e38d80c6e926937d6db 100644 (file)
 #define _TEST__F_type_array__array_lengths_increase
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_array_lengths_increase()
+ * @see f_array_lengths_increase()
  */
-extern void test__f_type_array_array_lengths_increase__works(void **state);
+extern void test__f_type_array_array_lengths_increase__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_array_lengths_increase()
+ * @see f_array_lengths_increase()
  */
 extern void test__f_type_array_array_lengths_increase__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_array_lengths_increase()
+ * @see f_array_lengths_increase()
  */
-extern void test__f_type_array_array_lengths_increase__parameter_checking(void **state);
+extern void test__f_type_array_array_lengths_increase__works(void **state);
 
 #endif // _TEST__F_type_array__array_lengths_increase
index bb83dce597ff6414296a3f81d174434132b6883b..6ffff45e66d03893e62e172337a80a634b3415ec 100644 (file)
@@ -5,6 +5,22 @@
 extern "C" {
 #endif
 
+void test__f_type_array_array_lengths_increase_by__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_array_lengths_t data = f_array_lengths_t_initialize;
+
+  {
+    const f_status_t status = f_array_lengths_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_type_array_array_lengths_increase_by__works(void **state) {
 
   const int length = 5;
@@ -31,22 +47,6 @@ void test__f_type_array_array_lengths_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_array_lengths_increase_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_array_lengths_t data = f_array_lengths_t_initialize;
-
-  {
-    const f_status_t status = f_array_lengths_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);
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 820cfa38b08a3d809a5836c34a9e95d01b2a1993..9f9daafef915d8e5fbc4feab2be3e16ce46e47da 100644 (file)
 #define _TEST__F_type_array__array_lengths_increase_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_array_lengths_increase_by()
+ * @see f_array_lengths_increase_by()
  */
-extern void test__f_type_array_array_lengths_increase_by__works(void **state);
+extern void test__f_type_array_array_lengths_increase_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_array_lengths_increase_by()
+ * @see f_array_lengths_increase_by()
  */
-extern void test__f_type_array_array_lengths_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_array_lengths_increase_by__works(void **state);
 
 #endif // _TEST__F_type_array__array_lengths_increase_by
index 1c655c4cedf86ac804337e698cf245dcc55a17ee..37232c24d2296083405d9861e32704aca61c37bb 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_array_lengths_resize__works(void **state) {
+void test__f_type_array_array_lengths_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_array_lengths_t data = f_array_lengths_t_initialize;
 
   {
-    const f_status_t status = f_array_lengths_resize(length, &data);
+    const f_status_t status = f_array_lengths_resize(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_array_lengths_resize__parameter_checking(void **state) {
+void test__f_type_array_array_lengths_resize__works(void **state) {
 
   const int length = 5;
   f_array_lengths_t data = f_array_lengths_t_initialize;
 
   {
-    const f_status_t status = f_array_lengths_resize(length, 0);
+    const f_status_t status = f_array_lengths_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index 648b40fa53e7f10682832f8111df364206ffc1b8..51453f3abd5a15ea37246a6a033bd76e8252a606 100644 (file)
 #define _TEST__F_type_array__array_lengths_resize
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_array_lengths_resize()
+ * @see f_array_lengths_resize()
  */
-extern void test__f_type_array_array_lengths_resize__works(void **state);
+extern void test__f_type_array_array_lengths_resize__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_array_lengths_resize()
+ * @see f_array_lengths_resize()
  */
-extern void test__f_type_array_array_lengths_resize__parameter_checking(void **state);
+extern void test__f_type_array_array_lengths_resize__works(void **state);
 
 #endif // _TEST__F_type_array__array_lengths_resize
index a691c7eb57b70c834981028ee00352acb9d6e39f..3b1733b4963b1126c48189cd71470ffa285c447f 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_array_lengthss_adjust__works(void **state) {
+void test__f_type_array_array_lengthss_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_array_lengthss_t data = f_array_lengthss_t_initialize;
 
   {
-    const f_status_t status = f_array_lengthss_adjust(length, &data);
+    const f_status_t status = f_array_lengthss_adjust(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_array_lengthss_adjust__parameter_checking(void **state) {
+void test__f_type_array_array_lengthss_adjust__works(void **state) {
 
   const int length = 5;
   f_array_lengthss_t data = f_array_lengthss_t_initialize;
 
   {
-    const f_status_t status = f_array_lengthss_adjust(length, 0);
+    const f_status_t status = f_array_lengthss_adjust(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index 49ac75a8c9d6f5441fac52206e78d30a982cced1..306ba246d094a9816c5e79525722dbe899e50083 100644 (file)
 #define _TEST__F_type_array__array_lengthss_adjust
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_array_lengthss_adjust()
+ * @see f_array_lengthss_adjust()
  */
-extern void test__f_type_array_array_lengthss_adjust__works(void **state);
+extern void test__f_type_array_array_lengthss_adjust__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_array_lengthss_adjust()
+ * @see f_array_lengthss_adjust()
  */
-extern void test__f_type_array_array_lengthss_adjust__parameter_checking(void **state);
+extern void test__f_type_array_array_lengthss_adjust__works(void **state);
 
 #endif // _TEST__F_type_array__array_lengthss_adjust
index 5235bc15e9eae2e4d23da505e1ed10b1670e5130..d3cf215d1b3e3d3594902ebabe1238e88a4d98de 100644 (file)
@@ -5,7 +5,18 @@
 extern "C" {
 #endif
 
-void test__f_type_array_array_lengthss_append__works(void **state) {
+void test__f_type_array_array_lengthss_append__parameter_checking(void **state) {
+
+  const f_array_lengths_t data = f_array_lengths_t_initialize;
+
+  {
+    const f_status_t status = f_array_lengthss_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_array_lengthss_append__returns_data_not(void **state) {
 
   const int length = 5;
   f_array_lengths_t source = f_array_lengths_t_initialize;
@@ -19,32 +30,19 @@ void test__f_type_array_array_lengthss_append__works(void **state) {
     assert_int_equal(source.size, length);
   }
 
-  for (; source.used < length; ++source.used) {
-    source.array[source.used] = source.used + 1;
-  } // for
-
   {
     const f_status_t status = f_array_lengthss_append(source, &destination);
 
-    assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, 1);
-    assert_int_equal(destination.array[0].used, source.used);
-    assert_int_equal(destination.array[0].size, source.used);
-
-    for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
-      assert_int_equal(destination.array[0].array[i], i + 1);
-    } // for
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
   }
 
-  for (f_array_length_t i = 0; i < destination.used; ++i) {
-    free((void *) destination.array[i].array);
-  } // for
-
   free((void *) source.array);
-  free((void *) destination.array);
 }
 
-void test__f_type_array_array_lengthss_append__returns_data_not(void **state) {
+void test__f_type_array_array_lengthss_append__works(void **state) {
 
   const int length = 5;
   f_array_lengths_t source = f_array_lengths_t_initialize;
@@ -58,27 +56,29 @@ void test__f_type_array_array_lengthss_append__returns_data_not(void **state) {
     assert_int_equal(source.size, length);
   }
 
+  for (; source.used < length; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
+
   {
     const f_status_t status = f_array_lengthss_append(source, &destination);
 
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
-  }
-
-  free((void *) source.array);
-}
-
-void test__f_type_array_array_lengthss_append__parameter_checking(void **state) {
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0].used, source.used);
+    assert_int_equal(destination.array[0].size, source.used);
 
-  const f_array_lengths_t data = f_array_lengths_t_initialize;
+    for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
+      assert_int_equal(destination.array[0].array[i], i + 1);
+    } // for
+  }
 
-  {
-    const f_status_t status = f_array_lengthss_append(data, 0);
+  for (f_array_length_t i = 0; i < destination.used; ++i) {
+    free((void *) destination.array[i].array);
+  } // for
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
+  free((void *) source.array);
+  free((void *) destination.array);
 }
 
 #ifdef __cplusplus
index 26855d6fa82fa5c4e4a0be1ce04f1bd6e4d085fb..b562cb3c7a39bce03120b1b336c671e9e1b7cfc9 100644 (file)
 #define _TEST__F_type_array__array_lengthss_append
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_array_lengthss_append()
+ * @see f_array_lengthss_append()
  */
-extern void test__f_type_array_array_lengthss_append__works(void **state);
+extern void test__f_type_array_array_lengthss_append__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_array_lengthss_append()
+ * @see f_array_lengthss_append()
  */
 extern void test__f_type_array_array_lengthss_append__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_array_lengthss_append()
+ * @see f_array_lengthss_append()
  */
-extern void test__f_type_array_array_lengthss_append__parameter_checking(void **state);
+extern void test__f_type_array_array_lengthss_append__works(void **state);
 
 #endif // _TEST__F_type_array__array_lengthss_append
index 213257b6423ed2d9926394c9e37deadefef293b5..08e089d3ca6f309c98f8d85a0d8d5475b8e2021a 100644 (file)
@@ -5,6 +5,43 @@
 extern "C" {
 #endif
 
+void test__f_type_array_array_lengthss_append_all__parameter_checking(void **state) {
+
+  const f_array_lengthss_t data = f_array_lengthss_t_initialize;
+
+  {
+    const f_status_t status = f_array_lengthss_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_array_lengthss_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_array_lengthss_t source = f_array_lengthss_t_initialize;
+  f_array_lengthss_t destination = f_array_lengthss_t_initialize;
+
+  {
+    const f_status_t status = f_array_lengthss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_array_lengthss_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
 void test__f_type_array_array_lengthss_append_all__works(void **state) {
 
   const int length = 5;
@@ -63,43 +100,6 @@ void test__f_type_array_array_lengthss_append_all__works(void **state) {
   free((void *) destination.array);
 }
 
-void test__f_type_array_array_lengthss_append_all__returns_data_not(void **state) {
-
-  const int length = 5;
-  f_array_lengthss_t source = f_array_lengthss_t_initialize;
-  f_array_lengthss_t destination = f_array_lengthss_t_initialize;
-
-  {
-    const f_status_t status = f_array_lengthss_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  {
-    const f_status_t status = f_array_lengthss_append_all(source, &destination);
-
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
-  }
-
-  free((void *) source.array);
-}
-
-void test__f_type_array_array_lengthss_append_all__parameter_checking(void **state) {
-
-  const f_array_lengthss_t data = f_array_lengthss_t_initialize;
-
-  {
-    const f_status_t status = f_array_lengthss_append_all(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 497d99c174f8fce662a9fc33facd26c4e41c69f1..22241133b550752fabea5717c0cd155ec4c0d32a 100644 (file)
 #define _TEST__F_type_array__array_lengthss_append_all
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_array_lengthss_append_all()
+ * @see f_array_lengthss_append_all()
  */
-extern void test__f_type_array_array_lengthss_append_all__works(void **state);
+extern void test__f_type_array_array_lengthss_append_all__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_array_lengthss_append_all()
+ * @see f_array_lengthss_append_all()
  */
 extern void test__f_type_array_array_lengthss_append_all__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_array_lengthss_append_all()
+ * @see f_array_lengthss_append_all()
  */
-extern void test__f_type_array_array_lengthss_append_all__parameter_checking(void **state);
+extern void test__f_type_array_array_lengthss_append_all__works(void **state);
 
 #endif // _TEST__F_type_array__array_lengthss_append_all
index 911307f31ffac4ce039e4be710fa308226f988e1..b98d6f69eaf7ec4e6ad04d87822f0fc26f449c80 100644 (file)
@@ -5,12 +5,28 @@
 extern "C" {
 #endif
 
-void test__f_type_array_array_lengthss_decimate_by__works(void **state) {
+void test__f_type_array_array_lengthss_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_array_lengthss_t data = f_array_lengths_t_initialize;
 
   {
+    const f_status_t status = f_array_lengthss_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_type_array_array_lengthss_decimate_by__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_array_lengthss_t data = f_array_lengthss_t_initialize;
+
+  {
     const f_status_t status = f_array_lengthss_resize(length, &data);
 
     assert_int_equal(status, F_none);
@@ -19,25 +35,33 @@ void test__f_type_array_array_lengthss_decimate_by__works(void **state) {
   }
 
   {
-    const f_status_t status = f_array_lengthss_decimate_by(length, &data);
+    const f_status_t status = f_array_lengthss_decimate_by(0, &data);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_data_not);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
-void test__f_type_array_array_lengthss_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_array_lengthss_decimate_by__works(void **state) {
 
   const int length = 5;
   f_array_lengthss_t data = f_array_lengths_t_initialize;
 
   {
-    const f_status_t status = f_array_lengthss_decimate_by(length, 0);
+    const f_status_t status = f_array_lengthss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_array_lengthss_decimate_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index b4248034a22916ab7edfbb7b071195814f495a1d..fd3dc6e49ee4498310c624b3dd6d7cb6720a5908 100644 (file)
 #define _TEST__F_type_array__array_lengthss_decimate_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_array_lengthss_decimate_by()
+ * @see f_array_lengthss_decimate_by()
  */
-extern void test__f_type_array_array_lengthss_decimate_by__works(void **state);
+extern void test__f_type_array_array_lengthss_decimate_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
  * @see f_type_array_array_lengthss_decimate_by()
  */
-extern void test__f_type_array_array_lengthss_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_array_lengthss_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_array_lengthss_decimate_by()
+ */
+extern void test__f_type_array_array_lengthss_decimate_by__works(void **state);
 
 #endif // _TEST__F_type_array__array_lengthss_decimate_by
index 0a092ad39b8c5f2db192f4e2cb62b8e41c5372cf..349cc1f164167914ffe1dd8d80cb25dd5ec1bced 100644 (file)
@@ -5,12 +5,28 @@
 extern "C" {
 #endif
 
-void test__f_type_array_array_lengthss_decrease_by__works(void **state) {
+void test__f_type_array_array_lengthss_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_array_lengthss_t data = f_array_lengths_t_initialize;
 
   {
+    const f_status_t status = f_array_lengthss_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_type_array_array_lengthss_decrease_by__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_array_lengthss_t data = f_array_lengthss_t_initialize;
+
+  {
     const f_status_t status = f_array_lengthss_resize(length, &data);
 
     assert_int_equal(status, F_none);
@@ -19,25 +35,33 @@ void test__f_type_array_array_lengthss_decrease_by__works(void **state) {
   }
 
   {
-    const f_status_t status = f_array_lengthss_decrease_by(length, &data);
+    const f_status_t status = f_array_lengthss_decrease_by(0, &data);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_data_not);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
-void test__f_type_array_array_lengthss_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_array_lengthss_decrease_by__works(void **state) {
 
   const int length = 5;
   f_array_lengthss_t data = f_array_lengths_t_initialize;
 
   {
-    const f_status_t status = f_array_lengthss_decrease_by(length, 0);
+    const f_status_t status = f_array_lengthss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_array_lengthss_decrease_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index 75c840d29fc588fc581a2e487120e840dea8df5e..88c814b0ef48fa23b54ebe660b77d117cef3c281 100644 (file)
 #define _TEST__F_type_array__array_lengthss_decrease_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_array_lengthss_decrease_by()
+ * @see f_array_lengthss_decrease_by()
  */
-extern void test__f_type_array_array_lengthss_decrease_by__works(void **state);
+extern void test__f_type_array_array_lengthss_decrease_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_array_lengthss_decrease_by()
+ * @see f_array_lengthss_decrease_by()
  */
-extern void test__f_type_array_array_lengthss_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_array_lengthss_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_array_lengthss_decrease_by()
+ */
+extern void test__f_type_array_array_lengthss_decrease_by__works(void **state);
 
 #endif // _TEST__F_type_array__array_lengthss_decrease_by
index d5ada76cd1face0fe0fd59a008e3e330943c9ed1..08be366daab144d0a2ec4f2f6ca82db0f05dda85 100644 (file)
@@ -5,27 +5,17 @@
 extern "C" {
 #endif
 
-void test__f_type_array_array_lengthss_increase__works(void **state) {
+void test__f_type_array_array_lengthss_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_array_lengthss_t data = f_array_lengths_t_initialize;
 
   {
-    const f_status_t status = f_array_lengthss_resize(length, &data);
+    const f_status_t status = f_array_lengthss_increase(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_array_lengthss_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);
+    assert_int_equal(data.size, 0);
   }
 
   free((void *) data.array);
@@ -55,17 +45,27 @@ void test__f_type_array_array_lengthss_increase__returns_data_not(void **state)
   free((void *) data.array);
 }
 
-void test__f_type_array_array_lengthss_increase__parameter_checking(void **state) {
+void test__f_type_array_array_lengthss_increase__works(void **state) {
 
   const int length = 5;
   f_array_lengthss_t data = f_array_lengths_t_initialize;
 
   {
-    const f_status_t status = f_array_lengthss_increase(length, 0);
+    const f_status_t status = f_array_lengthss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    data.used = length;
+
+    const f_status_t status = f_array_lengthss_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);
index 6788793001a8275515962da3b0f2c11877c2d4d7..df78d8f4166471bba7ac99a30ff83e158a2fb6b1 100644 (file)
 #define _TEST__F_type_array__array_lengthss_increase
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_array_lengthss_increase()
+ * @see f_array_lengthss_increase()
  */
-extern void test__f_type_array_array_lengthss_increase__works(void **state);
+extern void test__f_type_array_array_lengthss_increase__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_array_lengthss_increase()
+ * @see f_array_lengthss_increase()
  */
 extern void test__f_type_array_array_lengthss_increase__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_array_lengthss_increase()
+ * @see f_array_lengthss_increase()
  */
-extern void test__f_type_array_array_lengthss_increase__parameter_checking(void **state);
+extern void test__f_type_array_array_lengthss_increase__works(void **state);
 
 #endif // _TEST__F_type_array__array_lengthss_increase
index 5bbbbf17dce249a83c150bbd300a150863c8a7d0..fca240b032a9b0e8efe1e0532c7851352f0b12a1 100644 (file)
@@ -5,12 +5,28 @@
 extern "C" {
 #endif
 
-void test__f_type_array_array_lengthss_increase_by__works(void **state) {
+void test__f_type_array_array_lengthss_increase_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_array_lengthss_t data = f_array_lengths_t_initialize;
 
   {
+    const f_status_t status = f_array_lengthss_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_type_array_array_lengthss_increase_by__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_array_lengthss_t data = f_array_lengthss_t_initialize;
+
+  {
     const f_status_t status = f_array_lengthss_resize(length, &data);
 
     assert_int_equal(status, F_none);
@@ -19,32 +35,48 @@ void test__f_type_array_array_lengthss_increase_by__works(void **state) {
   }
 
   {
-    data.used = length;
+    const f_status_t status = f_array_lengthss_increase_by(0, &data);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
 
+  {
     const f_status_t status = f_array_lengthss_increase_by(length, &data);
 
-    assert_int_equal(status, F_none);
-    assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
   }
 
   free((void *) data.array);
 }
 
-void test__f_type_array_array_lengthss_increase_by__parameter_checking(void **state) {
+void test__f_type_array_array_lengthss_increase_by__works(void **state) {
 
   const int length = 5;
   f_array_lengthss_t data = f_array_lengths_t_initialize;
 
   {
-    const f_status_t status = f_array_lengthss_increase_by(length, 0);
+    const f_status_t status = f_array_lengthss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  {
+    data.used = length;
+
+    const f_status_t status = f_array_lengthss_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
index 789f8e12b33cb7352abdd448b31625f6bffecd20..cead637565eea60b42b13689c301c2ce5ddb9610 100644 (file)
 #define _TEST__F_type_array__array_lengthss_increase_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_array_lengthss_increase_by()
+ * @see f_array_lengthss_increase_by()
  */
-extern void test__f_type_array_array_lengthss_increase_by__works(void **state);
+extern void test__f_type_array_array_lengthss_increase_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_array_lengthss_increase_by()
+ * @see f_array_lengthss_increase_by()
  */
-extern void test__f_type_array_array_lengthss_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_array_lengthss_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_array_lengthss_increase_by()
+ */
+extern void test__f_type_array_array_lengthss_increase_by__works(void **state);
 
 #endif // _TEST__F_type_array__array_lengthss_increase_by
index a2d030f7bb55c0df114ef4e741155c60beb340c4..2e8fdc87f4c45cebeff06ff51509413793fa625d 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_array_lengthss_resize__works(void **state) {
+void test__f_type_array_array_lengthss_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_array_lengthss_t data = f_array_lengthss_t_initialize;
 
   {
-    const f_status_t status = f_array_lengthss_resize(length, &data);
+    const f_status_t status = f_array_lengthss_resize(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_array_lengthss_resize__parameter_checking(void **state) {
+void test__f_type_array_array_lengthss_resize__works(void **state) {
 
   const int length = 5;
   f_array_lengthss_t data = f_array_lengthss_t_initialize;
 
   {
-    const f_status_t status = f_array_lengthss_resize(length, 0);
+    const f_status_t status = f_array_lengthss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index 0011f327618e579660beadf2887ede9b229a6c65..5d7ab806ae8e7de7eb46613e891ceb230e9a5357 100644 (file)
 #define _TEST__F_type_array__array_lengthss_resize
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_array_lengthss_resize()
+ * @see f_array_lengthss_resize()
  */
-extern void test__f_type_array_array_lengthss_resize__works(void **state);
+extern void test__f_type_array_array_lengthss_resize__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_array_lengthss_resize()
+ * @see f_array_lengthss_resize()
  */
-extern void test__f_type_array_array_lengthss_resize__parameter_checking(void **state);
+extern void test__f_type_array_array_lengthss_resize__works(void **state);
 
 #endif // _TEST__F_type_array__array_lengthss_resize
index 4dbf3a40194fb93cb4b064ac3ead2ee7eeaf77c8..fc8809eaa582bff9516e1e960f3056b26ae60e3e 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_cells_adjust__works(void **state) {
+void test__f_type_array_cells_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_cells_t data = f_cells_t_initialize;
 
   {
-    const f_status_t status = f_cells_adjust(length, &data);
+    const f_status_t status = f_cells_adjust(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_cells_adjust__parameter_checking(void **state) {
+void test__f_type_array_cells_adjust__works(void **state) {
 
   const int length = 5;
   f_cells_t data = f_cells_t_initialize;
 
   {
-    const f_status_t status = f_cells_adjust(length, 0);
+    const f_status_t status = f_cells_adjust(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index 53d4c6344252327bc7aaed0c9c908de24c084292..f908d42009bbc5b932571b312a0fc456de9b8cd2 100644 (file)
 #define _TEST__F_type_array__cells_adjust
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_cells_adjust()
+ * @see f_cells_adjust()
  */
-extern void test__f_type_array_cells_adjust__works(void **state);
+extern void test__f_type_array_cells_adjust__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_cells_adjust()
+ * @see f_cells_adjust()
  */
-extern void test__f_type_array_cells_adjust__parameter_checking(void **state);
+extern void test__f_type_array_cells_adjust__works(void **state);
 
 #endif // _TEST__F_type_array__cells_adjust
index 195145612df8de08b043516e09df61736eb1ecfc..d0afa08cd7462dc33877dcd79ab8ddb849646ba0 100644 (file)
@@ -5,6 +5,17 @@
 extern "C" {
 #endif
 
+void test__f_type_array_cells_append__parameter_checking(void **state) {
+
+  const f_cell_t data = f_cell_t_initialize;
+
+  {
+    const f_status_t status = f_cells_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
 void test__f_type_array_cells_append__works(void **state) {
 
   const f_cell_t source = { .row = 1, .column = 2 };
@@ -22,17 +33,6 @@ void test__f_type_array_cells_append__works(void **state) {
   free((void *) destination.array);
 }
 
-void test__f_type_array_cells_append__parameter_checking(void **state) {
-
-  const f_cell_t data = f_cell_t_initialize;
-
-  {
-    const f_status_t status = f_cells_append(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index ba16169cb8b40562b948d4e0298c118dcf0ea848..f80d2badf24725b5df382fd17cdd91e27ff62055 100644 (file)
 #define _TEST__F_type_array__cells_append
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_cells_append()
+ * @see f_cells_append()
  */
-extern void test__f_type_array_cells_append__works(void **state);
+extern void test__f_type_array_cells_append__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_cells_append()
+ * @see f_cells_append()
  */
-extern void test__f_type_array_cells_append__parameter_checking(void **state);
+extern void test__f_type_array_cells_append__works(void **state);
 
 #endif // _TEST__F_type_array__cells_append
index 071c2b10ec37c4f666d8ed10bf72be442de68ccc..322ff81f3b9819180ee52537c2e8ac605423e09c 100644 (file)
@@ -5,15 +5,23 @@
 extern "C" {
 #endif
 
-void test__f_type_array_cells_append_all__works(void **state) {
+void test__f_type_array_cells_append_all__parameter_checking(void **state) {
+
+  const f_cells_t data = f_cells_t_initialize;
+
+  {
+    const f_status_t status = f_cells_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_cells_append_all__returns_data_not(void **state) {
 
   const int length = 5;
   f_cells_t source = f_cells_t_initialize;
   f_cells_t destination = f_cells_t_initialize;
 
-  const f_cell_t cell_0 = { .row = 1, .column = 2 };
-  const f_cell_t cell_1 = { .row = 3, .column = 4 };
-
   {
     const f_status_t status = f_cells_resize(length, &source);
 
@@ -22,33 +30,27 @@ void test__f_type_array_cells_append_all__works(void **state) {
     assert_int_equal(source.size, length);
   }
 
-  memcpy(&source.array[source.used++], (void *) &cell_0, sizeof(f_cell_t));
-  memcpy(&source.array[source.used++], (void *) &cell_1, sizeof(f_cell_t));
-
   {
     const f_status_t status = f_cells_append_all(source, &destination);
 
-    assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
-
-    assert_int_equal(destination.array[0].row, cell_0.row);
-    assert_int_equal(destination.array[0].column, cell_0.column);
-
-    assert_int_equal(destination.array[1].row, cell_1.row);
-    assert_int_equal(destination.array[1].column, cell_1.column);
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
   }
 
   free((void *) source.array);
-  free((void *) destination.array);
 }
 
-void test__f_type_array_cells_append_all__returns_data_not(void **state) {
+void test__f_type_array_cells_append_all__works(void **state) {
 
   const int length = 5;
   f_cells_t source = f_cells_t_initialize;
   f_cells_t destination = f_cells_t_initialize;
 
+  const f_cell_t cell_0 = { .row = 1, .column = 2 };
+  const f_cell_t cell_1 = { .row = 3, .column = 4 };
+
   {
     const f_status_t status = f_cells_resize(length, &source);
 
@@ -57,27 +59,25 @@ void test__f_type_array_cells_append_all__returns_data_not(void **state) {
     assert_int_equal(source.size, length);
   }
 
+  memcpy(&source.array[source.used++], (void *) &cell_0, sizeof(f_cell_t));
+  memcpy(&source.array[source.used++], (void *) &cell_1, sizeof(f_cell_t));
+
   {
     const f_status_t status = f_cells_append_all(source, &destination);
 
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
-  }
-
-  free((void *) source.array);
-}
-
-void test__f_type_array_cells_append_all__parameter_checking(void **state) {
-
-  const f_cells_t data = f_cells_t_initialize;
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
 
-  {
-    const f_status_t status = f_cells_append_all(data, 0);
+    assert_int_equal(destination.array[0].row, cell_0.row);
+    assert_int_equal(destination.array[0].column, cell_0.column);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(destination.array[1].row, cell_1.row);
+    assert_int_equal(destination.array[1].column, cell_1.column);
   }
+
+  free((void *) source.array);
+  free((void *) destination.array);
 }
 
 #ifdef __cplusplus
index 31cd2591326250b95c34921f9db00d0e3f184746..b4ecbe76496677d76296ee8b98c678c1260b3f85 100644 (file)
 #define _TEST__F_type_array__cells_append_all
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_cells_append_all()
+ * @see f_cells_append_all()
  */
-extern void test__f_type_array_cells_append_all__works(void **state);
+extern void test__f_type_array_cells_append_all__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_cells_append_all()
+ * @see f_cells_append_all()
  */
 extern void test__f_type_array_cells_append_all__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_cells_append_all()
+ * @see f_cells_append_all()
  */
-extern void test__f_type_array_cells_append_all__parameter_checking(void **state);
+extern void test__f_type_array_cells_append_all__works(void **state);
 
 #endif // _TEST__F_type_array__cells_append_all
index a9bf7b06d355b367a4d71b6c8aa38e2859046937..45cf6e9798879df56161cb1e892862a2fe082072 100644 (file)
@@ -5,23 +5,15 @@
 extern "C" {
 #endif
 
-void test__f_type_array_cells_decimate_by__works(void **state) {
+void test__f_type_array_cells_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_cells_t data = f_cells_t_initialize;
 
   {
-    const f_status_t status = f_cells_resize(length, &data);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_cells_decimate_by(length, &data);
+    const f_status_t status = f_cells_decimate_by(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
@@ -29,15 +21,23 @@ void test__f_type_array_cells_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_cells_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_cells_decimate_by__works(void **state) {
 
   const int length = 5;
   f_cells_t data = f_cells_t_initialize;
 
   {
-    const f_status_t status = f_cells_decimate_by(length, 0);
+    const f_status_t status = f_cells_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_cells_decimate_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index b689fff2ab5a620fb1392d72e6a74ad966f3fd59..a3abba22a65a8869e8876bcca9449ac1bf2bcde8 100644 (file)
 #define _TEST__F_type_array__cells_decimate_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_cells_decimate_by()
+ * @see f_cells_decimate_by()
  */
-extern void test__f_type_array_cells_decimate_by__works(void **state);
+extern void test__f_type_array_cells_decimate_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_cells_decimate_by()
+ * @see f_cells_decimate_by()
  */
-extern void test__f_type_array_cells_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_cells_decimate_by__works(void **state);
 
 #endif // _TEST__F_type_array__cells_decimate_by
index bd44d1b3042f258b7cad8a8546f9ce9addb69e67..7cd12b15ce023b324e37e91a477bb5d0f27c43e6 100644 (file)
@@ -5,23 +5,15 @@
 extern "C" {
 #endif
 
-void test__f_type_array_cells_decrease_by__works(void **state) {
+void test__f_type_array_cells_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_cells_t data = f_cells_t_initialize;
 
   {
-    const f_status_t status = f_cells_resize(length, &data);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_cells_decrease_by(length, &data);
+    const f_status_t status = f_cells_decrease_by(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
@@ -29,15 +21,23 @@ void test__f_type_array_cells_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_cells_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_cells_decrease_by__works(void **state) {
 
   const int length = 5;
   f_cells_t data = f_cells_t_initialize;
 
   {
-    const f_status_t status = f_cells_decrease_by(length, 0);
+    const f_status_t status = f_cells_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_cells_decrease_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index 09d89d339d089edf781f710bc2acce9995c98b1f..71c3e23770fd9035acc46991d879ba80266b0982 100644 (file)
 #define _TEST__F_type_array__cells_decrease_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_cells_decrease_by()
+ * @see f_cells_decrease_by()
  */
-extern void test__f_type_array_cells_decrease_by__works(void **state);
+extern void test__f_type_array_cells_decrease_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_cells_decrease_by()
+ * @see f_cells_decrease_by()
  */
-extern void test__f_type_array_cells_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_cells_decrease_by__works(void **state);
 
 #endif // _TEST__F_type_array__cells_decrease_by
index 7842295d694d1736437b6e87e02c206f2f327ed9..ef18ec2a8b7745e7b3be6a3574a08d378bce2a20 100644 (file)
@@ -5,27 +5,17 @@
 extern "C" {
 #endif
 
-void test__f_type_array_cells_increase__works(void **state) {
+void test__f_type_array_cells_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_cells_t data = f_cells_t_initialize;
 
   {
-    const f_status_t status = f_cells_resize(length, &data);
+    const f_status_t status = f_cells_increase(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_cells_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);
+    assert_int_equal(data.size, 0);
   }
 
   free((void *) data.array);
@@ -55,17 +45,27 @@ void test__f_type_array_cells_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_cells_increase__parameter_checking(void **state) {
+void test__f_type_array_cells_increase__works(void **state) {
 
   const int length = 5;
   f_cells_t data = f_cells_t_initialize;
 
   {
-    const f_status_t status = f_cells_increase(length, 0);
+    const f_status_t status = f_cells_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    data.used = length;
+
+    const f_status_t status = f_cells_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);
index 81964f4e3ddf3c57c67b356889fff61f802736af..80623ff9978499c34d2a4cda7604a8e822e12da6 100644 (file)
 #define _TEST__F_type_array__cells_increase
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_cells_increase()
+ * @see f_cells_increase()
  */
-extern void test__f_type_array_cells_increase__works(void **state);
+extern void test__f_type_array_cells_increase__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_cells_increase()
+ * @see f_cells_increase()
  */
 extern void test__f_type_array_cells_increase__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_cells_increase()
+ * @see f_cells_increase()
  */
-extern void test__f_type_array_cells_increase__parameter_checking(void **state);
+extern void test__f_type_array_cells_increase__works(void **state);
 
 #endif // _TEST__F_type_array__cells_increase
index ed71d469d821f3748410097fab7c405932792825..debeb96db72e0dcd25543fd1ed488d77f0ac0682 100644 (file)
@@ -5,6 +5,22 @@
 extern "C" {
 #endif
 
+void test__f_type_array_cells_increase_by__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_cells_t data = f_cells_t_initialize;
+
+  {
+    const f_status_t status = f_cells_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_type_array_cells_increase_by__works(void **state) {
 
   const int length = 5;
@@ -31,22 +47,6 @@ void test__f_type_array_cells_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_cells_increase_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_cells_t data = f_cells_t_initialize;
-
-  {
-    const f_status_t status = f_cells_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);
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index f3daa78175fd51d7716e41196bc9bacaab30922d..896175e43174d6122270fc07d184a1160366b1cd 100644 (file)
 #define _TEST__F_type_array__cells_increase_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_cells_increase_by()
+ * @see f_cells_increase_by()
  */
-extern void test__f_type_array_cells_increase_by__works(void **state);
+extern void test__f_type_array_cells_increase_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_cells_increase_by()
+ * @see f_cells_increase_by()
  */
-extern void test__f_type_array_cells_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_cells_increase_by__works(void **state);
 
 #endif // _TEST__F_type_array__cells_increase_by
index 35e6699c1302804892f1991516e2f48ae62aed38..3ef50cea15ac298e4aee4e9d64e937fde683c23d 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_cells_resize__works(void **state) {
+void test__f_type_array_cells_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_cells_t data = f_cells_t_initialize;
 
   {
-    const f_status_t status = f_cells_resize(length, &data);
+    const f_status_t status = f_cells_resize(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_cells_resize__parameter_checking(void **state) {
+void test__f_type_array_cells_resize__works(void **state) {
 
   const int length = 5;
   f_cells_t data = f_cells_t_initialize;
 
   {
-    const f_status_t status = f_cells_resize(length, 0);
+    const f_status_t status = f_cells_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index b89bdf8a7c87b9254641980871dd68b0a9be8ad6..44be5c32eb703bddee539b6b5a90deddefa3ffb5 100644 (file)
 #define _TEST__F_type_array__cells_resize
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_cells_resize()
+ * @see f_cells_resize()
  */
-extern void test__f_type_array_cells_resize__works(void **state);
+extern void test__f_type_array_cells_resize__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_cells_resize()
+ * @see f_cells_resize()
  */
-extern void test__f_type_array_cells_resize__parameter_checking(void **state);
+extern void test__f_type_array_cells_resize__works(void **state);
 
 #endif // _TEST__F_type_array__cells_resize
index b44fcf28eaf5c84a600a479ceabd75f48a2f78d2..2eb1c8ffa1bb14b772a874c5b54a3bd5a37b0373 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_cellss_adjust__works(void **state) {
+void test__f_type_array_cellss_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_cellss_t data = f_cellss_t_initialize;
 
   {
-    const f_status_t status = f_cellss_adjust(length, &data);
+    const f_status_t status = f_cellss_adjust(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_cellss_adjust__parameter_checking(void **state) {
+void test__f_type_array_cellss_adjust__works(void **state) {
 
   const int length = 5;
   f_cellss_t data = f_cellss_t_initialize;
 
   {
-    const f_status_t status = f_cellss_adjust(length, 0);
+    const f_status_t status = f_cellss_adjust(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index b4d07e758707f581c2c3a2a01227c553af001cd5..dc126940e486141e342725fb0e308113103775a7 100644 (file)
 #define _TEST__F_type_array__cellss_adjust
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_cellss_adjust()
+ * @see f_cellss_adjust()
  */
-extern void test__f_type_array_cellss_adjust__works(void **state);
+extern void test__f_type_array_cellss_adjust__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_cellss_adjust()
+ * @see f_cellss_adjust()
  */
-extern void test__f_type_array_cellss_adjust__parameter_checking(void **state);
+extern void test__f_type_array_cellss_adjust__works(void **state);
 
 #endif // _TEST__F_type_array__cellss_adjust
index 9cbefbd7e54de2e364ea7d74ff7b478c0e16b572..444dfec3102ea582263460278d7788b72865ce18 100644 (file)
@@ -5,6 +5,43 @@
 extern "C" {
 #endif
 
+void test__f_type_array_cellss_append__parameter_checking(void **state) {
+
+  f_cells_t data = f_cells_t_initialize;
+
+  {
+    const f_status_t status = f_cellss_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_cellss_append__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_cells_t source = f_cellss_t_initialize;
+  f_cellss_t destination = f_cellss_t_initialize;
+
+  {
+    const f_status_t status = f_cells_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_cellss_append(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
 void test__f_type_array_cellss_append__works(void **state) {
 
   const int length = 5;
@@ -48,43 +85,6 @@ void test__f_type_array_cellss_append__works(void **state) {
   free((void *) destination.array);
 }
 
-void test__f_type_array_cellss_append__returns_data_not(void **state) {
-
-  const int length = 5;
-  f_cells_t source = f_cellss_t_initialize;
-  f_cellss_t destination = f_cellss_t_initialize;
-
-  {
-    const f_status_t status = f_cells_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  {
-    const f_status_t status = f_cellss_append(source, &destination);
-
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
-  }
-
-  free((void *) source.array);
-}
-
-void test__f_type_array_cellss_append__parameter_checking(void **state) {
-
-  f_cells_t data = f_cells_t_initialize;
-
-  {
-    const f_status_t status = f_cellss_append(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index cc487251de3c85f2efca8631e16e2ff5174d8158..7244b407170b8c42ae5c782d9d812c2490477648 100644 (file)
 #define _TEST__F_type_array__cellss_append
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_cellss_append()
+ * @see f_cellss_append()
  */
-extern void test__f_type_array_cellss_append__works(void **state);
+extern void test__f_type_array_cellss_append__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_cellss_append()
+ * @see f_cellss_append()
  */
 extern void test__f_type_array_cellss_append__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_cellss_append()
+ * @see f_cellss_append()
  */
-extern void test__f_type_array_cellss_append__parameter_checking(void **state);
+extern void test__f_type_array_cellss_append__works(void **state);
 
 #endif // _TEST__F_type_array__cellss_append
index b7a193259776f129dc61ea800a8bfdb5c49aaa7f..8ffe29740fa6973bb1c4f30deec4988a660806ee 100644 (file)
@@ -5,6 +5,43 @@
 extern "C" {
 #endif
 
+void test__f_type_array_cellss_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_cellss_t source = f_cellss_t_initialize;
+  f_cellss_t destination = f_cellss_t_initialize;
+
+  {
+    const f_status_t status = f_cellss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_cellss_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_type_array_cellss_append_all__parameter_checking(void **state) {
+
+  const f_cellss_t data = f_cellss_t_initialize;
+
+  {
+    const f_status_t status = f_cellss_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
 void test__f_type_array_cellss_append_all__works(void **state) {
 
   const int length = 5;
@@ -67,43 +104,6 @@ void test__f_type_array_cellss_append_all__works(void **state) {
   free((void *) destination.array);
 }
 
-void test__f_type_array_cellss_append_all__returns_data_not(void **state) {
-
-  const int length = 5;
-  f_cellss_t source = f_cellss_t_initialize;
-  f_cellss_t destination = f_cellss_t_initialize;
-
-  {
-    const f_status_t status = f_cellss_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  {
-    const f_status_t status = f_cellss_append_all(source, &destination);
-
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
-  }
-
-  free((void *) source.array);
-}
-
-void test__f_type_array_cellss_append_all__parameter_checking(void **state) {
-
-  const f_cellss_t data = f_cellss_t_initialize;
-
-  {
-    const f_status_t status = f_cellss_append_all(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 2721cddef9dcbf6a86ff27fb42f62a312a0163f5..4422b6f016e8f068a9ccf32ae11c001112f71a15 100644 (file)
 #define _TEST__F_type_array__cellss_append_all
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_cellss_append_all()
+ * @see f_cellss_append_all()
  */
-extern void test__f_type_array_cellss_append_all__works(void **state);
+extern void test__f_type_array_cellss_append_all__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_cellss_append_all()
+ * @see f_cellss_append_all()
  */
 extern void test__f_type_array_cellss_append_all__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_cellss_append_all()
+ * @see f_cellss_append_all()
  */
-extern void test__f_type_array_cellss_append_all__parameter_checking(void **state);
+extern void test__f_type_array_cellss_append_all__works(void **state);
 
 #endif // _TEST__F_type_array__cellss_append_all
index abc400c21f41e735f45358c02f6b7fb436894ed4..12aebeddfd116fc9297c5f9b902c356e2e5d2cec 100644 (file)
@@ -5,12 +5,28 @@
 extern "C" {
 #endif
 
-void test__f_type_array_cellss_decimate_by__works(void **state) {
+void test__f_type_array_cellss_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_cellss_t data = f_cells_t_initialize;
 
   {
+    const f_status_t status = f_cellss_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_type_array_cellss_decimate_by__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_cellss_t data = f_cellss_t_initialize;
+
+  {
     const f_status_t status = f_cellss_resize(length, &data);
 
     assert_int_equal(status, F_none);
@@ -19,25 +35,33 @@ void test__f_type_array_cellss_decimate_by__works(void **state) {
   }
 
   {
-    const f_status_t status = f_cellss_decimate_by(length, &data);
+    const f_status_t status = f_cellss_decimate_by(0, &data);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_data_not);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
-void test__f_type_array_cellss_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_cellss_decimate_by__works(void **state) {
 
   const int length = 5;
   f_cellss_t data = f_cells_t_initialize;
 
   {
-    const f_status_t status = f_cellss_decimate_by(length, 0);
+    const f_status_t status = f_cellss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_cellss_decimate_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index 3f43825281a8a6c98fe16abcb2d7d1ce10a697d7..a0ea73d4e9438e3bfc8eb7c9f033274495889ee3 100644 (file)
 #define _TEST__F_type_array__cellss_decimate_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_cellss_decimate_by()
+ * @see f_cellss_decimate_by()
  */
-extern void test__f_type_array_cellss_decimate_by__works(void **state);
+extern void test__f_type_array_cellss_decimate_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
  * @see f_type_array_cellss_decimate_by()
  */
-extern void test__f_type_array_cellss_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_cellss_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_cellss_decimate_by()
+ */
+extern void test__f_type_array_cellss_decimate_by__works(void **state);
 
 #endif // _TEST__F_type_array__cellss_decimate_by
index 8fe429d4a275f53733de8b484cebf3d346ee7524..ae118f0ae0416510b56ddc6b58871618c0406df7 100644 (file)
@@ -5,12 +5,28 @@
 extern "C" {
 #endif
 
-void test__f_type_array_cellss_decrease_by__works(void **state) {
+void test__f_type_array_cellss_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_cellss_t data = f_cells_t_initialize;
 
   {
+    const f_status_t status = f_cellss_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_type_array_cellss_decrease_by__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_cellss_t data = f_cellss_t_initialize;
+
+  {
     const f_status_t status = f_cellss_resize(length, &data);
 
     assert_int_equal(status, F_none);
@@ -19,25 +35,33 @@ void test__f_type_array_cellss_decrease_by__works(void **state) {
   }
 
   {
-    const f_status_t status = f_cellss_decrease_by(length, &data);
+    const f_status_t status = f_cellss_decrease_by(0, &data);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_data_not);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
-void test__f_type_array_cellss_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_cellss_decrease_by__works(void **state) {
 
   const int length = 5;
   f_cellss_t data = f_cells_t_initialize;
 
   {
-    const f_status_t status = f_cellss_decrease_by(length, 0);
+    const f_status_t status = f_cellss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_cellss_decrease_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index 9b5e4b07a7ad56a269e51d8ae2c4da638030be58..ead2366ef587f2ffab84f3745263fa5fdc6d1a72 100644 (file)
 #define _TEST__F_type_array__cellss_decrease_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_cellss_decrease_by()
+ * @see f_cellss_decrease_by()
  */
-extern void test__f_type_array_cellss_decrease_by__works(void **state);
+extern void test__f_type_array_cellss_decrease_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_cellss_decrease_by()
+ * @see f_cellss_decrease_by()
  */
-extern void test__f_type_array_cellss_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_cellss_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_cellss_decrease_by()
+ */
+extern void test__f_type_array_cellss_decrease_by__works(void **state);
 
 #endif // _TEST__F_type_array__cellss_decrease_by
index 577bd627b2c9fce92ed87879a48249ce002efcae..bba4c27f9732ab607711f63e288590b7f95be7de 100644 (file)
@@ -5,27 +5,17 @@
 extern "C" {
 #endif
 
-void test__f_type_array_cellss_increase__works(void **state) {
+void test__f_type_array_cellss_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_cellss_t data = f_cells_t_initialize;
 
   {
-    const f_status_t status = f_cellss_resize(length, &data);
+    const f_status_t status = f_cellss_increase(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_cellss_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);
+    assert_int_equal(data.size, 0);
   }
 
   free((void *) data.array);
@@ -55,17 +45,27 @@ void test__f_type_array_cellss_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_cellss_increase__parameter_checking(void **state) {
+void test__f_type_array_cellss_increase__works(void **state) {
 
   const int length = 5;
   f_cellss_t data = f_cells_t_initialize;
 
   {
-    const f_status_t status = f_cellss_increase(length, 0);
+    const f_status_t status = f_cellss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    data.used = length;
+
+    const f_status_t status = f_cellss_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);
index 74ca065c7cfd8115d17c7382d481e4bec3d02801..c0c14b7666e705c9a133d648813cccd4ced41baa 100644 (file)
 #define _TEST__F_type_array__cellss_increase
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_cellss_increase()
+ * @see f_cellss_increase()
  */
-extern void test__f_type_array_cellss_increase__works(void **state);
+extern void test__f_type_array_cellss_increase__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_cellss_increase()
+ * @see f_cellss_increase()
  */
 extern void test__f_type_array_cellss_increase__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_cellss_increase()
+ * @see f_cellss_increase()
  */
-extern void test__f_type_array_cellss_increase__parameter_checking(void **state);
+extern void test__f_type_array_cellss_increase__works(void **state);
 
 #endif // _TEST__F_type_array__cellss_increase
index 07e7c3707a31dac4225e694a6980186da352373f..2a866d050aafe9dda3427f49d92e96ff202b12a4 100644 (file)
@@ -5,12 +5,28 @@
 extern "C" {
 #endif
 
-void test__f_type_array_cellss_increase_by__works(void **state) {
+void test__f_type_array_cellss_increase_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_cellss_t data = f_cells_t_initialize;
 
   {
+    const f_status_t status = f_cellss_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_type_array_cellss_increase_by__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_cellss_t data = f_cellss_t_initialize;
+
+  {
     const f_status_t status = f_cellss_resize(length, &data);
 
     assert_int_equal(status, F_none);
@@ -19,32 +35,72 @@ void test__f_type_array_cellss_increase_by__works(void **state) {
   }
 
   {
-    data.used = length;
+    const f_status_t status = f_cellss_increase_by(0, &data);
 
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
     const f_status_t status = f_cellss_increase_by(length, &data);
 
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  free((void *) data.array);
+}
+
+void test__f_type_array_cell_decrease_by__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_cellss_t data = f_cellss_t_initialize;
+
+  {
+    const f_status_t status = f_cellss_resize(length, &data);
+
     assert_int_equal(status, F_none);
-    assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_cellss_decrease_by(0, &data);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
   }
 
   free((void *) data.array);
 }
 
-void test__f_type_array_cellss_increase_by__parameter_checking(void **state) {
+void test__f_type_array_cellss_increase_by__works(void **state) {
 
   const int length = 5;
   f_cellss_t data = f_cells_t_initialize;
 
   {
-    const f_status_t status = f_cellss_increase_by(length, 0);
+    const f_status_t status = f_cellss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  {
+    data.used = length;
+
+    const f_status_t status = f_cellss_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
index 9152f1dca685ea5048304f036e6a909c9ac277f5..e226bc9f1f56a012dec6fdf37eb045ff28e72aeb 100644 (file)
 #define _TEST__F_type_array__cellss_increase_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_cellss_increase_by()
+ * @see f_cellss_increase_by()
  */
-extern void test__f_type_array_cellss_increase_by__works(void **state);
+extern void test__f_type_array_cellss_increase_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_cellss_increase_by()
+ * @see f_cellss_increase_by()
  */
-extern void test__f_type_array_cellss_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_cellss_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_cellss_increase_by()
+ */
+extern void test__f_type_array_cellss_increase_by__works(void **state);
 
 #endif // _TEST__F_type_array__cellss_increase_by
index 79fb875208471ea71a690884a3fb2a85d4d6703c..41d81326d2ffebdb31ae5a651bd66080062b4e15 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_cellss_resize__works(void **state) {
+void test__f_type_array_cellss_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_cellss_t data = f_cellss_t_initialize;
 
   {
-    const f_status_t status = f_cellss_resize(length, &data);
+    const f_status_t status = f_cellss_resize(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_cellss_resize__parameter_checking(void **state) {
+void test__f_type_array_cellss_resize__works(void **state) {
 
   const int length = 5;
   f_cellss_t data = f_cellss_t_initialize;
 
   {
-    const f_status_t status = f_cellss_resize(length, 0);
+    const f_status_t status = f_cellss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index a0977f0c3d6e7c57246c5380f8c6b3f74fc6ebad..c5356f1c0ae3a649efdbf9cfda671d8bc9550ea2 100644 (file)
 #define _TEST__F_type_array__cellss_resize
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_cellss_resize()
+ * @see f_cellss_resize()
  */
-extern void test__f_type_array_cellss_resize__works(void **state);
+extern void test__f_type_array_cellss_resize__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_cellss_resize()
+ * @see f_cellss_resize()
  */
-extern void test__f_type_array_cellss_resize__parameter_checking(void **state);
+extern void test__f_type_array_cellss_resize__works(void **state);
 
 #endif // _TEST__F_type_array__cellss_resize
index 658031ed19f7d73eae2a734b23667bcdcb4bd92c..62e20eb214ad0f7b234a0db2e24a10392abeb57c 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_fll_ids_adjust__works(void **state) {
+void test__f_type_array_fll_ids_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_fll_ids_t data = f_fll_ids_t_initialize;
 
   {
-    const f_status_t status = f_fll_ids_adjust(length, &data);
+    const f_status_t status = f_fll_ids_adjust(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_fll_ids_adjust__parameter_checking(void **state) {
+void test__f_type_array_fll_ids_adjust__works(void **state) {
 
   const int length = 5;
   f_fll_ids_t data = f_fll_ids_t_initialize;
 
   {
-    const f_status_t status = f_fll_ids_adjust(length, 0);
+    const f_status_t status = f_fll_ids_adjust(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index 486be6fefe7f441bca0e50b6407598804481d9a7..93f69b34ef8c33a5641ede3b44f8f0c4d6718709 100644 (file)
 #define _TEST__F_type_array__fll_ids_adjust
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_fll_ids_adjust()
+ * @see f_fll_ids_adjust()
  */
-extern void test__f_type_array_fll_ids_adjust__works(void **state);
+extern void test__f_type_array_fll_ids_adjust__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_fll_ids_adjust()
+ * @see f_fll_ids_adjust()
  */
-extern void test__f_type_array_fll_ids_adjust__parameter_checking(void **state);
+extern void test__f_type_array_fll_ids_adjust__works(void **state);
 
 #endif // _TEST__F_type_array__fll_ids_adjust
index 880420302dbf40db33095682204cd7b69b23c187..d0905dbdf917f25c287c9681a861de6c7f5433a1 100644 (file)
@@ -5,6 +5,17 @@
 extern "C" {
 #endif
 
+void test__f_type_array_fll_ids_append__parameter_checking(void **state) {
+
+  const f_fll_id_t data = f_fll_id_t_initialize;
+
+  {
+    const f_status_t status = f_fll_ids_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
 void test__f_type_array_fll_ids_append__works(void **state) {
 
   const f_fll_id_t source = { .name = "test", .type = 1, .used = 4 };
@@ -23,17 +34,6 @@ void test__f_type_array_fll_ids_append__works(void **state) {
   free((void *) destination.array);
 }
 
-void test__f_type_array_fll_ids_append__parameter_checking(void **state) {
-
-  const f_fll_id_t data = f_fll_id_t_initialize;
-
-  {
-    const f_status_t status = f_fll_ids_append(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index a665436d9d30444441163738fd43c714e3bc7cb9..01fac847d874f557a6de93e94d3d95e678c3bb7f 100644 (file)
 #define _TEST__F_type_array__fll_ids_append
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_fll_ids_append()
+ * @see f_fll_ids_append()
  */
-extern void test__f_type_array_fll_ids_append__works(void **state);
+extern void test__f_type_array_fll_ids_append__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_fll_ids_append()
+ * @see f_fll_ids_append()
  */
-extern void test__f_type_array_fll_ids_append__parameter_checking(void **state);
+extern void test__f_type_array_fll_ids_append__works(void **state);
 
 #endif // _TEST__F_type_array__fll_ids_append
index 1b12eb0efeb50d3964a52bbf75ffa1c2d10a2c0c..c087020b99adfce3a8f5f70df52096c389f7b297 100644 (file)
@@ -5,15 +5,23 @@
 extern "C" {
 #endif
 
-void test__f_type_array_fll_ids_append_all__works(void **state) {
+void test__f_type_array_fll_ids_append_all__parameter_checking(void **state) {
+
+  const f_fll_ids_t data = f_fll_ids_t_initialize;
+
+  {
+    const f_status_t status = f_fll_ids_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_fll_ids_append_all__returns_data_not(void **state) {
 
   const int length = 5;
   f_fll_ids_t source = f_fll_ids_t_initialize;
   f_fll_ids_t destination = f_fll_ids_t_initialize;
 
-  const f_fll_id_t fll_id_0 = { .name = "test", .type = 1, .used = 4 };
-  const f_fll_id_t fll_id_1 = { .name = "other", .type = 2, .used = 5 };
-
   {
     const f_status_t status = f_fll_ids_resize(length, &source);
 
@@ -22,35 +30,27 @@ void test__f_type_array_fll_ids_append_all__works(void **state) {
     assert_int_equal(source.size, length);
   }
 
-  memcpy(&source.array[source.used++], (void *) &fll_id_0, sizeof(f_fll_id_t));
-  memcpy(&source.array[source.used++], (void *) &fll_id_1, sizeof(f_fll_id_t));
-
   {
     const f_status_t status = f_fll_ids_append_all(source, &destination);
 
-    assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
-
-    assert_string_equal(destination.array[0].name, fll_id_0.name);
-    assert_int_equal(destination.array[0].type, fll_id_0.type);
-    assert_int_equal(destination.array[0].used, fll_id_0.used);
-
-    assert_string_equal(destination.array[1].name, fll_id_1.name);
-    assert_int_equal(destination.array[1].type, fll_id_1.type);
-    assert_int_equal(destination.array[1].used, fll_id_1.used);
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
   }
 
   free((void *) source.array);
-  free((void *) destination.array);
 }
 
-void test__f_type_array_fll_ids_append_all__returns_data_not(void **state) {
+void test__f_type_array_fll_ids_append_all__works(void **state) {
 
   const int length = 5;
   f_fll_ids_t source = f_fll_ids_t_initialize;
   f_fll_ids_t destination = f_fll_ids_t_initialize;
 
+  const f_fll_id_t fll_id_0 = { .name = "test", .type = 1, .used = 4 };
+  const f_fll_id_t fll_id_1 = { .name = "other", .type = 2, .used = 5 };
+
   {
     const f_status_t status = f_fll_ids_resize(length, &source);
 
@@ -59,27 +59,27 @@ void test__f_type_array_fll_ids_append_all__returns_data_not(void **state) {
     assert_int_equal(source.size, length);
   }
 
+  memcpy(&source.array[source.used++], (void *) &fll_id_0, sizeof(f_fll_id_t));
+  memcpy(&source.array[source.used++], (void *) &fll_id_1, sizeof(f_fll_id_t));
+
   {
     const f_status_t status = f_fll_ids_append_all(source, &destination);
 
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
-  }
-
-  free((void *) source.array);
-}
-
-void test__f_type_array_fll_ids_append_all__parameter_checking(void **state) {
-
-  const f_fll_ids_t data = f_fll_ids_t_initialize;
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
 
-  {
-    const f_status_t status = f_fll_ids_append_all(data, 0);
+    assert_string_equal(destination.array[0].name, fll_id_0.name);
+    assert_int_equal(destination.array[0].type, fll_id_0.type);
+    assert_int_equal(destination.array[0].used, fll_id_0.used);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_string_equal(destination.array[1].name, fll_id_1.name);
+    assert_int_equal(destination.array[1].type, fll_id_1.type);
+    assert_int_equal(destination.array[1].used, fll_id_1.used);
   }
+
+  free((void *) source.array);
+  free((void *) destination.array);
 }
 
 #ifdef __cplusplus
index 4093df151b71044b4d3ccd3eda786d2b54fcdb29..a719d829cf6c58bfcf3ba01cefd58d889b7c7823 100644 (file)
 #define _TEST__F_type_array__fll_ids_append_all
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_fll_ids_append_all()
+ * @see f_fll_ids_append_all()
  */
-extern void test__f_type_array_fll_ids_append_all__works(void **state);
+extern void test__f_type_array_fll_ids_append_all__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_fll_ids_append_all()
+ * @see f_fll_ids_append_all()
  */
 extern void test__f_type_array_fll_ids_append_all__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_fll_ids_append_all()
+ * @see f_fll_ids_append_all()
  */
-extern void test__f_type_array_fll_ids_append_all__parameter_checking(void **state);
+extern void test__f_type_array_fll_ids_append_all__works(void **state);
 
 #endif // _TEST__F_type_array__fll_ids_append_all
index fa796a4622ebf77bef8df70f0de9964ea9e3d8b4..fdc51380a7052783f58f184dd7c0b8e404f6252f 100644 (file)
@@ -5,23 +5,15 @@
 extern "C" {
 #endif
 
-void test__f_type_array_fll_ids_decimate_by__works(void **state) {
+void test__f_type_array_fll_ids_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_fll_ids_t data = f_fll_ids_t_initialize;
 
   {
-    const f_status_t status = f_fll_ids_resize(length, &data);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_fll_ids_decimate_by(length, &data);
+    const f_status_t status = f_fll_ids_decimate_by(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
@@ -29,15 +21,23 @@ void test__f_type_array_fll_ids_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_fll_ids_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_fll_ids_decimate_by__works(void **state) {
 
   const int length = 5;
   f_fll_ids_t data = f_fll_ids_t_initialize;
 
   {
-    const f_status_t status = f_fll_ids_decimate_by(length, 0);
+    const f_status_t status = f_fll_ids_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_fll_ids_decimate_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index cd4471d2e9f0865f3200badb67981c8a191c052e..81a721fe80084f0cd68e8c8ab691e9604bebcecd 100644 (file)
 #define _TEST__F_type_array__fll_ids_decimate_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_fll_ids_decimate_by()
+ * @see f_fll_ids_decimate_by()
  */
-extern void test__f_type_array_fll_ids_decimate_by__works(void **state);
+extern void test__f_type_array_fll_ids_decimate_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_fll_ids_decimate_by()
+ * @see f_fll_ids_decimate_by()
  */
-extern void test__f_type_array_fll_ids_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_fll_ids_decimate_by__works(void **state);
 
 #endif // _TEST__F_type_array__fll_ids_decimate_by
index a60e139364f2abd3c1e41651ffabd173593d0adc..a55df2d16c7ac696fc3cd13aaa8cda21e46f7bd4 100644 (file)
@@ -5,23 +5,15 @@
 extern "C" {
 #endif
 
-void test__f_type_array_fll_ids_decrease_by__works(void **state) {
+void test__f_type_array_fll_ids_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_fll_ids_t data = f_fll_ids_t_initialize;
 
   {
-    const f_status_t status = f_fll_ids_resize(length, &data);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_fll_ids_decrease_by(length, &data);
+    const f_status_t status = f_fll_ids_decrease_by(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
@@ -29,15 +21,23 @@ void test__f_type_array_fll_ids_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_fll_ids_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_fll_ids_decrease_by__works(void **state) {
 
   const int length = 5;
   f_fll_ids_t data = f_fll_ids_t_initialize;
 
   {
-    const f_status_t status = f_fll_ids_decrease_by(length, 0);
+    const f_status_t status = f_fll_ids_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_fll_ids_decrease_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index 9506bcad4c4c08373a9fc66b243d84fcbcda4e96..568cd13971711e8ea51ecfa854c8f3026296c377 100644 (file)
 #define _TEST__F_type_array__fll_ids_decrease_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_fll_ids_decrease_by()
+ * @see f_fll_ids_decrease_by()
  */
-extern void test__f_type_array_fll_ids_decrease_by__works(void **state);
+extern void test__f_type_array_fll_ids_decrease_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_fll_ids_decrease_by()
+ * @see f_fll_ids_decrease_by()
  */
-extern void test__f_type_array_fll_ids_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_fll_ids_decrease_by__works(void **state);
 
 #endif // _TEST__F_type_array__fll_ids_decrease_by
index a359f318d605148d70fdd40fa8ba9579abd38e07..d49fda55763e5cd05cc0938f1c5f0f6805b54838 100644 (file)
@@ -5,27 +5,17 @@
 extern "C" {
 #endif
 
-void test__f_type_array_fll_ids_increase__works(void **state) {
+void test__f_type_array_fll_ids_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_fll_ids_t data = f_fll_ids_t_initialize;
 
   {
-    const f_status_t status = f_fll_ids_resize(length, &data);
+    const f_status_t status = f_fll_ids_increase(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_fll_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);
+    assert_int_equal(data.size, 0);
   }
 
   free((void *) data.array);
@@ -55,17 +45,27 @@ void test__f_type_array_fll_ids_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_fll_ids_increase__parameter_checking(void **state) {
+void test__f_type_array_fll_ids_increase__works(void **state) {
 
   const int length = 5;
   f_fll_ids_t data = f_fll_ids_t_initialize;
 
   {
-    const f_status_t status = f_fll_ids_increase(length, 0);
+    const f_status_t status = f_fll_ids_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    data.used = length;
+
+    const f_status_t status = f_fll_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);
index f5e8d8760892def52916f8f1c466b144244abab9..6748abb142d4665ad9e932c5a8f7d7a8d1486b55 100644 (file)
 #define _TEST__F_type_array__fll_ids_increase
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_fll_ids_increase()
+ * @see f_fll_ids_increase()
  */
-extern void test__f_type_array_fll_ids_increase__works(void **state);
+extern void test__f_type_array_fll_ids_increase__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_fll_ids_increase()
+ * @see f_fll_ids_increase()
  */
 extern void test__f_type_array_fll_ids_increase__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_fll_ids_increase()
+ * @see f_fll_ids_increase()
  */
-extern void test__f_type_array_fll_ids_increase__parameter_checking(void **state);
+extern void test__f_type_array_fll_ids_increase__works(void **state);
 
 #endif // _TEST__F_type_array__fll_ids_increase
index e3b60b6be39d5422b37665d5ec12274f4d3997b1..9faef8973fc1edbb2f6be88203bc46fb8923166d 100644 (file)
@@ -5,6 +5,22 @@
 extern "C" {
 #endif
 
+void test__f_type_array_fll_ids_increase_by__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_fll_ids_t data = f_fll_ids_t_initialize;
+
+  {
+    const f_status_t status = f_fll_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_type_array_fll_ids_increase_by__works(void **state) {
 
   const int length = 5;
@@ -31,22 +47,6 @@ void test__f_type_array_fll_ids_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_fll_ids_increase_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_fll_ids_t data = f_fll_ids_t_initialize;
-
-  {
-    const f_status_t status = f_fll_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);
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 159d816f608fa25e375c054d7f8ab769f96ba4c9..c60ae68769e66d80c40734d0ea24cf827a91196d 100644 (file)
 #define _TEST__F_type_array__fll_ids_increase_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_fll_ids_increase_by()
+ * @see f_fll_ids_increase_by()
  */
-extern void test__f_type_array_fll_ids_increase_by__works(void **state);
+extern void test__f_type_array_fll_ids_increase_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_fll_ids_increase_by()
+ * @see f_fll_ids_increase_by()
  */
-extern void test__f_type_array_fll_ids_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_fll_ids_increase_by__works(void **state);
 
 #endif // _TEST__F_type_array__fll_ids_increase_by
index a5b56ed1f76663914cdc4b243ba224a092cc9d1a..519a625f24fbce5dff25e5e7c1edfb43254b0ce8 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_fll_ids_resize__works(void **state) {
+void test__f_type_array_fll_ids_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_fll_ids_t data = f_fll_ids_t_initialize;
 
   {
-    const f_status_t status = f_fll_ids_resize(length, &data);
+    const f_status_t status = f_fll_ids_resize(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_fll_ids_resize__parameter_checking(void **state) {
+void test__f_type_array_fll_ids_resize__works(void **state) {
 
   const int length = 5;
   f_fll_ids_t data = f_fll_ids_t_initialize;
 
   {
-    const f_status_t status = f_fll_ids_resize(length, 0);
+    const f_status_t status = f_fll_ids_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index 7ae4f8408a369b856b8c335c99a7f7d9e7df967a..619b2e14b494942826e7dd073899ca60264255ae 100644 (file)
 #define _TEST__F_type_array__fll_ids_resize
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_fll_ids_resize()
+ * @see f_fll_ids_resize()
  */
-extern void test__f_type_array_fll_ids_resize__works(void **state);
+extern void test__f_type_array_fll_ids_resize__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_fll_ids_resize()
+ * @see f_fll_ids_resize()
  */
-extern void test__f_type_array_fll_ids_resize__parameter_checking(void **state);
+extern void test__f_type_array_fll_ids_resize__works(void **state);
 
 #endif // _TEST__F_type_array__fll_ids_resize
index 979b56da9cc17780de37002e9d318b60d12ae7cc..fe2d8ecfbaadab7c391542a72ad96e055b41465b 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_fll_idss_adjust__works(void **state) {
+void test__f_type_array_fll_idss_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_fll_idss_t data = f_fll_idss_t_initialize;
 
   {
-    const f_status_t status = f_fll_idss_adjust(length, &data);
+    const f_status_t status = f_fll_idss_adjust(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_fll_idss_adjust__parameter_checking(void **state) {
+void test__f_type_array_fll_idss_adjust__works(void **state) {
 
   const int length = 5;
   f_fll_idss_t data = f_fll_idss_t_initialize;
 
   {
-    const f_status_t status = f_fll_idss_adjust(length, 0);
+    const f_status_t status = f_fll_idss_adjust(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index 6dfdf9536c5194e19ab8f46ba5be4775d4cfbe0d..8cd03e0ae8394d89dba74d2d79510625be8e6451 100644 (file)
 #define _TEST__F_type_array__fll_idss_adjust
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_fll_idss_adjust()
+ * @see f_fll_idss_adjust()
  */
-extern void test__f_type_array_fll_idss_adjust__works(void **state);
+extern void test__f_type_array_fll_idss_adjust__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_fll_idss_adjust()
+ * @see f_fll_idss_adjust()
  */
-extern void test__f_type_array_fll_idss_adjust__parameter_checking(void **state);
+extern void test__f_type_array_fll_idss_adjust__works(void **state);
 
 #endif // _TEST__F_type_array__fll_idss_adjust
index a08c604047d668b07338e037f12411a943c8b5b8..6f86af9367a76598380332e3d5868e2e600cea98 100644 (file)
@@ -5,6 +5,43 @@
 extern "C" {
 #endif
 
+void test__f_type_array_fll_idss_append__parameter_checking(void **state) {
+
+  f_fll_ids_t data = f_fll_ids_t_initialize;
+
+  {
+    const f_status_t status = f_fll_idss_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_fll_idss_append__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_fll_ids_t source = f_fll_idss_t_initialize;
+  f_fll_idss_t destination = f_fll_idss_t_initialize;
+
+  {
+    const f_status_t status = f_fll_ids_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_fll_idss_append(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
 void test__f_type_array_fll_idss_append__works(void **state) {
 
   const int length = 5;
@@ -49,43 +86,6 @@ void test__f_type_array_fll_idss_append__works(void **state) {
   free((void *) destination.array);
 }
 
-void test__f_type_array_fll_idss_append__returns_data_not(void **state) {
-
-  const int length = 5;
-  f_fll_ids_t source = f_fll_idss_t_initialize;
-  f_fll_idss_t destination = f_fll_idss_t_initialize;
-
-  {
-    const f_status_t status = f_fll_ids_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  {
-    const f_status_t status = f_fll_idss_append(source, &destination);
-
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
-  }
-
-  free((void *) source.array);
-}
-
-void test__f_type_array_fll_idss_append__parameter_checking(void **state) {
-
-  f_fll_ids_t data = f_fll_ids_t_initialize;
-
-  {
-    const f_status_t status = f_fll_idss_append(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 9cbc569fbe7c881eea967e299198434cef0dd72e..3c6d390e5daf5c8cea02eaf34beb33551abbef95 100644 (file)
 #define _TEST__F_type_array__fll_idss_append
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_fll_idss_append()
+ * @see f_fll_idss_append()
  */
-extern void test__f_type_array_fll_idss_append__works(void **state);
+extern void test__f_type_array_fll_idss_append__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_fll_idss_append()
+ * @see f_fll_idss_append()
  */
 extern void test__f_type_array_fll_idss_append__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_fll_idss_append()
+ * @see f_fll_idss_append()
  */
-extern void test__f_type_array_fll_idss_append__parameter_checking(void **state);
+extern void test__f_type_array_fll_idss_append__works(void **state);
 
 #endif // _TEST__F_type_array__fll_idss_append
index 774d9c71671c1aec0afaa15ecc42428a618ee9e4..868bdce9b02c5fe2709a06fe201eb32301c519fd 100644 (file)
@@ -5,6 +5,43 @@
 extern "C" {
 #endif
 
+void test__f_type_array_fll_idss_append_all__parameter_checking(void **state) {
+
+  const f_fll_idss_t data = f_fll_idss_t_initialize;
+
+  {
+    const f_status_t status = f_fll_idss_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_fll_idss_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_fll_idss_t source = f_fll_idss_t_initialize;
+  f_fll_idss_t destination = f_fll_idss_t_initialize;
+
+  {
+    const f_status_t status = f_fll_idss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_fll_idss_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
 void test__f_type_array_fll_idss_append_all__works(void **state) {
 
   const int length = 5;
@@ -69,43 +106,6 @@ void test__f_type_array_fll_idss_append_all__works(void **state) {
   free((void *) destination.array);
 }
 
-void test__f_type_array_fll_idss_append_all__returns_data_not(void **state) {
-
-  const int length = 5;
-  f_fll_idss_t source = f_fll_idss_t_initialize;
-  f_fll_idss_t destination = f_fll_idss_t_initialize;
-
-  {
-    const f_status_t status = f_fll_idss_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  {
-    const f_status_t status = f_fll_idss_append_all(source, &destination);
-
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
-  }
-
-  free((void *) source.array);
-}
-
-void test__f_type_array_fll_idss_append_all__parameter_checking(void **state) {
-
-  const f_fll_idss_t data = f_fll_idss_t_initialize;
-
-  {
-    const f_status_t status = f_fll_idss_append_all(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index baa023d9027561e6656bdd49638387cf30193019..2bd8ad63d5213023ef70eeee8612763ad1f1186d 100644 (file)
 #define _TEST__F_type_array__fll_idss_append_all
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_fll_idss_append_all()
+ * @see f_fll_idss_append_all()
  */
-extern void test__f_type_array_fll_idss_append_all__works(void **state);
+extern void test__f_type_array_fll_idss_append_all__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_fll_idss_append_all()
+ * @see f_fll_idss_append_all()
  */
 extern void test__f_type_array_fll_idss_append_all__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_fll_idss_append_all()
+ * @see f_fll_idss_append_all()
  */
-extern void test__f_type_array_fll_idss_append_all__parameter_checking(void **state);
+extern void test__f_type_array_fll_idss_append_all__works(void **state);
 
 #endif // _TEST__F_type_array__fll_idss_append_all
index 168f7d428f13fd11b0aba9875124b2475ca8f733..14a0083e1f05c3a9ff05579fbef14814576fc6af 100644 (file)
@@ -5,12 +5,28 @@
 extern "C" {
 #endif
 
-void test__f_type_array_fll_idss_decimate_by__works(void **state) {
+void test__f_type_array_fll_idss_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_fll_idss_t data = f_fll_ids_t_initialize;
 
   {
+    const f_status_t status = f_fll_idss_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_type_array_fll_idss_decimate_by__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_fll_idss_t data = f_fll_idss_t_initialize;
+
+  {
     const f_status_t status = f_fll_idss_resize(length, &data);
 
     assert_int_equal(status, F_none);
@@ -19,25 +35,33 @@ void test__f_type_array_fll_idss_decimate_by__works(void **state) {
   }
 
   {
-    const f_status_t status = f_fll_idss_decimate_by(length, &data);
+    const f_status_t status = f_fll_idss_decimate_by(0, &data);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_data_not);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
-void test__f_type_array_fll_idss_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_fll_idss_decimate_by__works(void **state) {
 
   const int length = 5;
   f_fll_idss_t data = f_fll_ids_t_initialize;
 
   {
-    const f_status_t status = f_fll_idss_decimate_by(length, 0);
+    const f_status_t status = f_fll_idss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_fll_idss_decimate_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index c4edbe32503f38a350ac5c73a19ebc0e66b68b6e..004145e5bf1db22892bd1f72a5c420e1cd7a4410 100644 (file)
 #define _TEST__F_type_array__fll_idss_decimate_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_fll_idss_decimate_by()
+ * @see f_fll_idss_decimate_by()
  */
-extern void test__f_type_array_fll_idss_decimate_by__works(void **state);
+extern void test__f_type_array_fll_idss_decimate_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
  * @see f_type_array_fll_idss_decimate_by()
  */
-extern void test__f_type_array_fll_idss_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_fll_idss_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fll_idss_decimate_by()
+ */
+extern void test__f_type_array_fll_idss_decimate_by__works(void **state);
 
 #endif // _TEST__F_type_array__fll_idss_decimate_by
index 3f7f826672149059517d1ed35e8a811cd0ac4035..bd7a7d5fe1b31855437025e951f9727644eb1188 100644 (file)
@@ -5,12 +5,28 @@
 extern "C" {
 #endif
 
-void test__f_type_array_fll_idss_decrease_by__works(void **state) {
+void test__f_type_array_fll_idss_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_fll_idss_t data = f_fll_ids_t_initialize;
 
   {
+    const f_status_t status = f_fll_idss_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_type_array_fll_idss_decrease_by__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_fll_idss_t data = f_fll_idss_t_initialize;
+
+  {
     const f_status_t status = f_fll_idss_resize(length, &data);
 
     assert_int_equal(status, F_none);
@@ -19,25 +35,33 @@ void test__f_type_array_fll_idss_decrease_by__works(void **state) {
   }
 
   {
-    const f_status_t status = f_fll_idss_decrease_by(length, &data);
+    const f_status_t status = f_fll_idss_decrease_by(0, &data);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_data_not);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
-void test__f_type_array_fll_idss_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_fll_idss_decrease_by__works(void **state) {
 
   const int length = 5;
   f_fll_idss_t data = f_fll_ids_t_initialize;
 
   {
-    const f_status_t status = f_fll_idss_decrease_by(length, 0);
+    const f_status_t status = f_fll_idss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_fll_idss_decrease_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index 35a43c333f5096c04e746bafd9a7a67aae239fd5..ccca0acc7e3ee525c912fa4bfa6819f3c760a156 100644 (file)
 #define _TEST__F_type_array__fll_idss_decrease_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_fll_idss_decrease_by()
+ * @see f_fll_idss_decrease_by()
  */
-extern void test__f_type_array_fll_idss_decrease_by__works(void **state);
+extern void test__f_type_array_fll_idss_decrease_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_fll_idss_decrease_by()
+ * @see f_fll_idss_decrease_by()
  */
-extern void test__f_type_array_fll_idss_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_fll_idss_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fll_idss_decrease_by()
+ */
+extern void test__f_type_array_fll_idss_decrease_by__works(void **state);
 
 #endif // _TEST__F_type_array__fll_idss_decrease_by
index d7e5a57a84dc429afd0163173ae39a84df4de418..a6ac66860d524cee52aad2cf65c853e956d9295e 100644 (file)
@@ -5,27 +5,17 @@
 extern "C" {
 #endif
 
-void test__f_type_array_fll_idss_increase__works(void **state) {
+void test__f_type_array_fll_idss_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_fll_idss_t data = f_fll_ids_t_initialize;
 
   {
-    const f_status_t status = f_fll_idss_resize(length, &data);
+    const f_status_t status = f_fll_idss_increase(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_fll_idss_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);
+    assert_int_equal(data.size, 0);
   }
 
   free((void *) data.array);
@@ -55,17 +45,27 @@ void test__f_type_array_fll_idss_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_fll_idss_increase__parameter_checking(void **state) {
+void test__f_type_array_fll_idss_increase__works(void **state) {
 
   const int length = 5;
   f_fll_idss_t data = f_fll_ids_t_initialize;
 
   {
-    const f_status_t status = f_fll_idss_increase(length, 0);
+    const f_status_t status = f_fll_idss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    data.used = length;
+
+    const f_status_t status = f_fll_idss_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);
index 358ba3e86047942f8d04185d2bf2089c4f8e8376..50b431c1be2f9e5a640998ac6757184c1c6c220c 100644 (file)
 #define _TEST__F_type_array__fll_idss_increase
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_fll_idss_increase()
+ * @see f_fll_idss_increase()
  */
-extern void test__f_type_array_fll_idss_increase__works(void **state);
+extern void test__f_type_array_fll_idss_increase__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_fll_idss_increase()
+ * @see f_fll_idss_increase()
  */
 extern void test__f_type_array_fll_idss_increase__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_fll_idss_increase()
+ * @see f_fll_idss_increase()
  */
-extern void test__f_type_array_fll_idss_increase__parameter_checking(void **state);
+extern void test__f_type_array_fll_idss_increase__works(void **state);
 
 #endif // _TEST__F_type_array__fll_idss_increase
index 05ba92e35713c7bca8c693be1d85aa73dc766f8a..523a85258c4d45153d81ceaa4c936e96003f500f 100644 (file)
@@ -5,12 +5,28 @@
 extern "C" {
 #endif
 
-void test__f_type_array_fll_idss_increase_by__works(void **state) {
+void test__f_type_array_fll_idss_increase_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_fll_idss_t data = f_fll_ids_t_initialize;
 
   {
+    const f_status_t status = f_fll_idss_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_type_array_fll_idss_increase_by__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_fll_idss_t data = f_fll_idss_t_initialize;
+
+  {
     const f_status_t status = f_fll_idss_resize(length, &data);
 
     assert_int_equal(status, F_none);
@@ -19,32 +35,48 @@ void test__f_type_array_fll_idss_increase_by__works(void **state) {
   }
 
   {
-    data.used = length;
+    const f_status_t status = f_fll_idss_increase_by(0, &data);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
 
+  {
     const f_status_t status = f_fll_idss_increase_by(length, &data);
 
-    assert_int_equal(status, F_none);
-    assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
   }
 
   free((void *) data.array);
 }
 
-void test__f_type_array_fll_idss_increase_by__parameter_checking(void **state) {
+void test__f_type_array_fll_idss_increase_by__works(void **state) {
 
   const int length = 5;
   f_fll_idss_t data = f_fll_ids_t_initialize;
 
   {
-    const f_status_t status = f_fll_idss_increase_by(length, 0);
+    const f_status_t status = f_fll_idss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  {
+    data.used = length;
+
+    const f_status_t status = f_fll_idss_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
index cf8687e95b63d37055141acdc884b4095de93688..e97fe418ddbc937e71f64fb0d831c2bcb91c986d 100644 (file)
 #define _TEST__F_type_array__fll_idss_increase_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_fll_idss_increase_by()
+ * @see f_fll_idss_increase_by()
  */
-extern void test__f_type_array_fll_idss_increase_by__works(void **state);
+extern void test__f_type_array_fll_idss_increase_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_fll_idss_increase_by()
+ * @see f_fll_idss_increase_by()
  */
-extern void test__f_type_array_fll_idss_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_fll_idss_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fll_idss_increase_by()
+ */
+extern void test__f_type_array_fll_idss_increase_by__works(void **state);
 
 #endif // _TEST__F_type_array__fll_idss_increase_by
index e0891ee1dfbfe3060af8cca5f06f0d328aaec591..5b031af400a39f27adaa91ab4cf7991f20b4f348 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_fll_idss_resize__works(void **state) {
+void test__f_type_array_fll_idss_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_fll_idss_t data = f_fll_idss_t_initialize;
 
   {
-    const f_status_t status = f_fll_idss_resize(length, &data);
+    const f_status_t status = f_fll_idss_resize(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_fll_idss_resize__parameter_checking(void **state) {
+void test__f_type_array_fll_idss_resize__works(void **state) {
 
   const int length = 5;
   f_fll_idss_t data = f_fll_idss_t_initialize;
 
   {
-    const f_status_t status = f_fll_idss_resize(length, 0);
+    const f_status_t status = f_fll_idss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index 42840151f3da1e4deb670957c4d9f0382a5e02c0..5c2ca18f59576647ade9147b8966772e23bbd714 100644 (file)
 #define _TEST__F_type_array__fll_idss_resize
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_fll_idss_resize()
+ * @see f_fll_idss_resize()
  */
-extern void test__f_type_array_fll_idss_resize__works(void **state);
+extern void test__f_type_array_fll_idss_resize__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_fll_idss_resize()
+ * @see f_fll_idss_resize()
  */
-extern void test__f_type_array_fll_idss_resize__parameter_checking(void **state);
+extern void test__f_type_array_fll_idss_resize__works(void **state);
 
 #endif // _TEST__F_type_array__fll_idss_resize
index 3463b16b5a21bc479f9bd981926db61c4fffff7d..eb2f97d4c76c1f27874c745f235c2371d588fa11 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int128s_adjust__works(void **state) {
+void test__f_type_array_int128s_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_int128s_t data = f_int128s_t_initialize;
 
   {
-    const f_status_t status = f_int128s_adjust(length, &data);
+    const f_status_t status = f_int128s_adjust(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_int128s_adjust__parameter_checking(void **state) {
+void test__f_type_array_int128s_adjust__works(void **state) {
 
   const int length = 5;
   f_int128s_t data = f_int128s_t_initialize;
 
   {
-    const f_status_t status = f_int128s_adjust(length, 0);
+    const f_status_t status = f_int128s_adjust(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index 467b522249c8c6d783aaff8bc1e218db51ffbca2..8d86069fe28f31d2302c2e3d66a6a1518dbb403c 100644 (file)
 #define _TEST__F_type_array__int128s_adjust
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int128s_adjust()
+ * @see f_int128s_adjust()
  */
-extern void test__f_type_array_int128s_adjust__works(void **state);
+extern void test__f_type_array_int128s_adjust__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int128s_adjust()
+ * @see f_int128s_adjust()
  */
-extern void test__f_type_array_int128s_adjust__parameter_checking(void **state);
+extern void test__f_type_array_int128s_adjust__works(void **state);
 
 #endif // _TEST__F_type_array__int128s_adjust
index b90596457115edbfb0de1221895cee0bdb79ce06..239ecb649889d6fb058d4857656611584e6d0c4b 100644 (file)
@@ -5,6 +5,17 @@
 extern "C" {
 #endif
 
+void test__f_type_array_int128s_append__parameter_checking(void **state) {
+
+  const int128_t data = 0;
+
+  {
+    const f_status_t status = f_int128s_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
 void test__f_type_array_int128s_append__works(void **state) {
 
   const int128_t source = 3;
@@ -21,17 +32,6 @@ void test__f_type_array_int128s_append__works(void **state) {
   free((void *) destination.array);
 }
 
-void test__f_type_array_int128s_append__parameter_checking(void **state) {
-
-  const uint128_t data = 0;
-
-  {
-    const f_status_t status = f_int128s_append(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 0ad1cba9e24abafd32a81baa343c6d1db1d05a91..96725243dcb974fb0ce5f117676788b415f072d8 100644 (file)
 #define _TEST__F_type_array__int128s_append
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int128s_append()
+ * @see f_int128s_append()
  */
-extern void test__f_type_array_int128s_append__works(void **state);
+extern void test__f_type_array_int128s_append__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int128s_append()
+ * @see f_int128s_append()
  */
-extern void test__f_type_array_int128s_append__parameter_checking(void **state);
+extern void test__f_type_array_int128s_append__works(void **state);
 
 #endif // _TEST__F_type_array__int128s_append
index 281f2077a2f6491f2c817731c247a0b64208e453..6bc5aa0d754403eafc997e98ff268a2b34ba6b7b 100644 (file)
@@ -5,10 +5,20 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int128s_append_all__works(void **state) {
+void test__f_type_array_int128s_append_all__parameter_checking(void **state) {
+
+  const f_int128s_t data = f_int128s_t_initialize;
+
+  {
+    const f_status_t status = f_int128s_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_int128s_append_all__returns_data_not(void **state) {
 
   const int length = 5;
-  const int length_used = 2;
   f_int128s_t source = f_int128s_t_initialize;
   f_int128s_t destination = f_int128s_t_initialize;
 
@@ -20,29 +30,22 @@ void test__f_type_array_int128s_append_all__works(void **state) {
     assert_int_equal(source.size, length);
   }
 
-  for (; source.used < length_used; ++source.used) {
-    source.array[source.used] = source.used + 1;
-  } // for
-
   {
     const f_status_t status = f_int128s_append_all(source, &destination);
 
-    assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
-
-    for (f_array_length_t i = 0; i < source.used; ++i) {
-      assert_int_equal(destination.array[i], i + 1);
-    } // for
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
   }
 
   free((void *) source.array);
-  free((void *) destination.array);
 }
 
-void test__f_type_array_int128s_append_all__returns_data_not(void **state) {
+void test__f_type_array_int128s_append_all__works(void **state) {
 
   const int length = 5;
+  const int length_used = 2;
   f_int128s_t source = f_int128s_t_initialize;
   f_int128s_t destination = f_int128s_t_initialize;
 
@@ -54,27 +57,24 @@ void test__f_type_array_int128s_append_all__returns_data_not(void **state) {
     assert_int_equal(source.size, length);
   }
 
+  for (; source.used < length_used; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
+
   {
     const f_status_t status = f_int128s_append_all(source, &destination);
 
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < source.used; ++i) {
+      assert_int_equal(destination.array[i], i + 1);
+    } // for
   }
 
   free((void *) source.array);
-}
-
-void test__f_type_array_int128s_append_all__parameter_checking(void **state) {
-
-  const f_int128s_t data = f_int128s_t_initialize;
-
-  {
-    const f_status_t status = f_int128s_append_all(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
+  free((void *) destination.array);
 }
 
 #ifdef __cplusplus
index a63f610cceb5c84f092dc4388490e8878994c6f0..17e6a573b4494449d2d26ee14ccab2feba711189 100644 (file)
 #define _TEST__F_type_array__int128s_append_all
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int128s_append_all()
+ * @see f_int128s_append_all()
  */
-extern void test__f_type_array_int128s_append_all__works(void **state);
+extern void test__f_type_array_int128s_append_all__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_int128s_append_all()
+ * @see f_int128s_append_all()
  */
 extern void test__f_type_array_int128s_append_all__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int128s_append_all()
+ * @see f_int128s_append_all()
  */
-extern void test__f_type_array_int128s_append_all__parameter_checking(void **state);
+extern void test__f_type_array_int128s_append_all__works(void **state);
 
 #endif // _TEST__F_type_array__int128s_append_all
index f9276b00c5545c0698a003bb9298feb669bb9c3c..3d4ed91360f69d69329731b8a8830f512a9d578f 100644 (file)
@@ -5,23 +5,15 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int128s_decimate_by__works(void **state) {
+void test__f_type_array_int128s_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_int128s_t data = f_int128s_t_initialize;
 
   {
-    const f_status_t status = f_int128s_resize(length, &data);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_int128s_decimate_by(length, &data);
+    const f_status_t status = f_int128s_decimate_by(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
@@ -29,15 +21,23 @@ void test__f_type_array_int128s_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_int128s_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_int128s_decimate_by__works(void **state) {
 
   const int length = 5;
   f_int128s_t data = f_int128s_t_initialize;
 
   {
-    const f_status_t status = f_int128s_decimate_by(length, 0);
+    const f_status_t status = f_int128s_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_int128s_decimate_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index 27c95e5b2e8b09ab865b2c004d4cd2176ea3a77d..62689ba691a9915bee6f8bcca28f3e697bb6a139 100644 (file)
 #define _TEST__F_type_array__int128s_decimate_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int128s_decimate_by()
+ * @see f_int128s_decimate_by()
  */
-extern void test__f_type_array_int128s_decimate_by__works(void **state);
+extern void test__f_type_array_int128s_decimate_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int128s_decimate_by()
+ * @see f_int128s_decimate_by()
  */
-extern void test__f_type_array_int128s_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_int128s_decimate_by__works(void **state);
 
 #endif // _TEST__F_type_array__int128s_decimate_by
index af81902b4721b82a0aeb6bdb0a939e2870d5eaed..bc7831ba74707636ecc4e0b97183fe19b28c242c 100644 (file)
@@ -5,23 +5,15 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int128s_decrease_by__works(void **state) {
+void test__f_type_array_int128s_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_int128s_t data = f_int128s_t_initialize;
 
   {
-    const f_status_t status = f_int128s_resize(length, &data);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_int128s_decrease_by(length, &data);
+    const f_status_t status = f_int128s_decrease_by(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
@@ -29,15 +21,23 @@ void test__f_type_array_int128s_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_int128s_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_int128s_decrease_by__works(void **state) {
 
   const int length = 5;
   f_int128s_t data = f_int128s_t_initialize;
 
   {
-    const f_status_t status = f_int128s_decrease_by(length, 0);
+    const f_status_t status = f_int128s_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_int128s_decrease_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index 614d3b554b19a29a0f286374bb4176a62ec7cc55..3dd881a595d23f7be1accfce02502c4ac1f06acb 100644 (file)
 #define _TEST__F_type_array__int128s_decrease_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int128s_decrease_by()
+ * @see f_int128s_decrease_by()
  */
-extern void test__f_type_array_int128s_decrease_by__works(void **state);
+extern void test__f_type_array_int128s_decrease_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int128s_decrease_by()
+ * @see f_int128s_decrease_by()
  */
-extern void test__f_type_array_int128s_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_int128s_decrease_by__works(void **state);
 
 #endif // _TEST__F_type_array__int128s_decrease_by
index 35aa7add77e3cda3b00394979461ba11b63bf629..9a4e4254e8628c8058bf0ec3fd5d55759d616556 100644 (file)
@@ -5,27 +5,17 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int128s_increase__works(void **state) {
+void test__f_type_array_int128s_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_int128s_t data = f_int128s_t_initialize;
 
   {
-    const f_status_t status = f_int128s_resize(length, &data);
+    const f_status_t status = f_int128s_increase(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_int128s_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);
+    assert_int_equal(data.size, 0);
   }
 
   free((void *) data.array);
@@ -55,17 +45,27 @@ void test__f_type_array_int128s_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int128s_increase__parameter_checking(void **state) {
+void test__f_type_array_int128s_increase__works(void **state) {
 
   const int length = 5;
   f_int128s_t data = f_int128s_t_initialize;
 
   {
-    const f_status_t status = f_int128s_increase(length, 0);
+    const f_status_t status = f_int128s_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    data.used = length;
+
+    const f_status_t status = f_int128s_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);
index daf6bdba0ba752f986ec0f5ca5482f92effdbe1d..cb7cce330fab523b35509630e45d07acb641bcc5 100644 (file)
 #define _TEST__F_type_array__int128s_increase
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int128s_increase()
+ * @see f_int128s_increase()
  */
-extern void test__f_type_array_int128s_increase__works(void **state);
+extern void test__f_type_array_int128s_increase__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_int128s_increase()
+ * @see f_int128s_increase()
  */
 extern void test__f_type_array_int128s_increase__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int128s_increase()
+ * @see f_int128s_increase()
  */
-extern void test__f_type_array_int128s_increase__parameter_checking(void **state);
+extern void test__f_type_array_int128s_increase__works(void **state);
 
 #endif // _TEST__F_type_array__int128s_increase
index 37583da8a427afad69469131f0419a5e9e176c50..059d196bbc61fd6056f37c65039c0c414d4b84fc 100644 (file)
@@ -5,6 +5,22 @@
 extern "C" {
 #endif
 
+void test__f_type_array_int128s_increase_by__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_int128s_t data = f_int128s_t_initialize;
+
+  {
+    const f_status_t status = f_int128s_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_type_array_int128s_increase_by__works(void **state) {
 
   const int length = 5;
@@ -31,22 +47,6 @@ void test__f_type_array_int128s_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int128s_increase_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_int128s_t data = f_int128s_t_initialize;
-
-  {
-    const f_status_t status = f_int128s_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);
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index b1c35bf917be52bb6a8978f5567107ae35bbe611..77c8b26d2dd470910f7bac8adfdc24cab0e7a859 100644 (file)
 #define _TEST__F_type_array__int128s_increase_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int128s_increase_by()
+ * @see f_int128s_increase_by()
  */
-extern void test__f_type_array_int128s_increase_by__works(void **state);
+extern void test__f_type_array_int128s_increase_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int128s_increase_by()
+ * @see f_int128s_increase_by()
  */
-extern void test__f_type_array_int128s_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_int128s_increase_by__works(void **state);
 
 #endif // _TEST__F_type_array__int128s_increase_by
index 19b6c1367258fa218cdb436ae20a157bcf329b29..092258de2184321c95a49ba33cfc436ed09969a6 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int128s_resize__works(void **state) {
+void test__f_type_array_int128s_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_int128s_t data = f_int128s_t_initialize;
 
   {
-    const f_status_t status = f_int128s_resize(length, &data);
+    const f_status_t status = f_int128s_resize(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_int128s_resize__parameter_checking(void **state) {
+void test__f_type_array_int128s_resize__works(void **state) {
 
   const int length = 5;
   f_int128s_t data = f_int128s_t_initialize;
 
   {
-    const f_status_t status = f_int128s_resize(length, 0);
+    const f_status_t status = f_int128s_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index 4d4c60dcd1888ccf6628978f2be7642fa87d3a37..211b6d5486d1b2d06e842370edfe136630b0cda2 100644 (file)
 #define _TEST__F_type_array__int128s_resize
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int128s_resize()
+ * @see f_int128s_resize()
  */
-extern void test__f_type_array_int128s_resize__works(void **state);
+extern void test__f_type_array_int128s_resize__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int128s_resize()
+ * @see f_int128s_resize()
  */
-extern void test__f_type_array_int128s_resize__parameter_checking(void **state);
+extern void test__f_type_array_int128s_resize__works(void **state);
 
 #endif // _TEST__F_type_array__int128s_resize
index 7bdd2832c1a1b4e54c342ab54ec68caf9d14c8b0..7ad575ab28ea890e66892666e9fb6b9a2c27dd33 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int128ss_adjust__works(void **state) {
+void test__f_type_array_int128ss_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_int128ss_t data = f_int128ss_t_initialize;
 
   {
-    const f_status_t status = f_int128ss_adjust(length, &data);
+    const f_status_t status = f_int128ss_adjust(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_int128ss_adjust__parameter_checking(void **state) {
+void test__f_type_array_int128ss_adjust__works(void **state) {
 
   const int length = 5;
   f_int128ss_t data = f_int128ss_t_initialize;
 
   {
-    const f_status_t status = f_int128ss_adjust(length, 0);
+    const f_status_t status = f_int128ss_adjust(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index 21c0fa84805eaf409b3feb8153d538d5ed5a04f2..3f90bfe3d64027e040cd9babad311f52a05f348e 100644 (file)
 #define _TEST__F_type_array__int128ss_adjust
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int128ss_adjust()
+ * @see f_int128ss_adjust()
  */
-extern void test__f_type_array_int128ss_adjust__works(void **state);
+extern void test__f_type_array_int128ss_adjust__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int128ss_adjust()
+ * @see f_int128ss_adjust()
  */
-extern void test__f_type_array_int128ss_adjust__parameter_checking(void **state);
+extern void test__f_type_array_int128ss_adjust__works(void **state);
 
 #endif // _TEST__F_type_array__int128ss_adjust
index c67b66d78a1452dc9d035c0213da60dbdcc6893d..47f6e330bcf68a7b52966cabe4f5f5f89e2481ab 100644 (file)
@@ -5,7 +5,18 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int128ss_append__works(void **state) {
+void test__f_type_array_int128ss_append__parameter_checking(void **state) {
+
+  f_int128s_t data = f_int128s_t_initialize;
+
+  {
+    const f_status_t status = f_int128ss_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_int128ss_append__returns_data_not(void **state) {
 
   const int length = 5;
   f_int128s_t source = f_int128s_t_initialize;
@@ -19,32 +30,19 @@ void test__f_type_array_int128ss_append__works(void **state) {
     assert_int_equal(source.size, length);
   }
 
-  for (; source.used < length; ++source.used) {
-    source.array[source.used] = source.used + 1;
-  } // for
-
   {
     const f_status_t status = f_int128ss_append(source, &destination);
 
-    assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, 1);
-    assert_int_equal(destination.array[0].used, source.used);
-    assert_int_equal(destination.array[0].size, source.used);
-
-    for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
-      assert_int_equal(destination.array[0].array[i], i + 1);
-    } // for
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
   }
 
-  for (f_array_length_t i = 0; i < destination.used; ++i) {
-    free((void *) destination.array[i].array);
-  } // for
-
   free((void *) source.array);
-  free((void *) destination.array);
 }
 
-void test__f_type_array_int128ss_append__returns_data_not(void **state) {
+void test__f_type_array_int128ss_append__works(void **state) {
 
   const int length = 5;
   f_int128s_t source = f_int128s_t_initialize;
@@ -58,27 +56,29 @@ void test__f_type_array_int128ss_append__returns_data_not(void **state) {
     assert_int_equal(source.size, length);
   }
 
+  for (; source.used < length; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
+
   {
     const f_status_t status = f_int128ss_append(source, &destination);
 
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
-  }
-
-  free((void *) source.array);
-}
-
-void test__f_type_array_int128ss_append__parameter_checking(void **state) {
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0].used, source.used);
+    assert_int_equal(destination.array[0].size, source.used);
 
-  f_int128s_t data = f_int128s_t_initialize;
+    for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
+      assert_int_equal(destination.array[0].array[i], i + 1);
+    } // for
+  }
 
-  {
-    const f_status_t status = f_int128ss_append(data, 0);
+  for (f_array_length_t i = 0; i < destination.used; ++i) {
+    free((void *) destination.array[i].array);
+  } // for
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
+  free((void *) source.array);
+  free((void *) destination.array);
 }
 
 #ifdef __cplusplus
index e27c02588e7f1e723ef0d27540191050cbb03427..3196ce413d3102ef85bf03d90712cb39ca61e728 100644 (file)
 #define _TEST__F_type_array__int128ss_append
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int128ss_append()
+ * @see f_int128ss_append()
  */
-extern void test__f_type_array_int128ss_append__works(void **state);
+extern void test__f_type_array_int128ss_append__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_int128ss_append()
+ * @see f_int128ss_append()
  */
 extern void test__f_type_array_int128ss_append__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int128ss_append()
+ * @see f_int128ss_append()
  */
-extern void test__f_type_array_int128ss_append__parameter_checking(void **state);
+extern void test__f_type_array_int128ss_append__works(void **state);
 
 #endif // _TEST__F_type_array__int128ss_append
index 26f33bc96bab3dce7e5e762edfa846b2f26405e1..f793a63537624ea2ac9a1bdb7c6a63e9c0ad1b39 100644 (file)
@@ -5,6 +5,43 @@
 extern "C" {
 #endif
 
+void test__f_type_array_int128ss_append_all__parameter_checking(void **state) {
+
+  const f_int128ss_t data = f_int128ss_t_initialize;
+
+  {
+    const f_status_t status = f_int128ss_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_int128ss_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_int128ss_t source = f_int128ss_t_initialize;
+  f_int128ss_t destination = f_int128ss_t_initialize;
+
+  {
+    const f_status_t status = f_int128ss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_int128ss_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
 void test__f_type_array_int128ss_append_all__works(void **state) {
 
   const int length = 5;
@@ -63,43 +100,6 @@ void test__f_type_array_int128ss_append_all__works(void **state) {
   free((void *) destination.array);
 }
 
-void test__f_type_array_int128ss_append_all__returns_data_not(void **state) {
-
-  const int length = 5;
-  f_int128ss_t source = f_int128ss_t_initialize;
-  f_int128ss_t destination = f_int128ss_t_initialize;
-
-  {
-    const f_status_t status = f_int128ss_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  {
-    const f_status_t status = f_int128ss_append_all(source, &destination);
-
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
-  }
-
-  free((void *) source.array);
-}
-
-void test__f_type_array_int128ss_append_all__parameter_checking(void **state) {
-
-  const f_int128ss_t data = f_int128ss_t_initialize;
-
-  {
-    const f_status_t status = f_int128ss_append_all(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 8c0339f22233e49635ac5aa23aedf4f7aba1fd3c..94a98744ddaf9996123b7d9d651134abb7c0c8f6 100644 (file)
 #define _TEST__F_type_array__int128ss_append_all
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int128ss_append_all()
+ * @see f_int128ss_append_all()
  */
-extern void test__f_type_array_int128ss_append_all__works(void **state);
+extern void test__f_type_array_int128ss_append_all__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_int128ss_append_all()
+ * @see f_int128ss_append_all()
  */
 extern void test__f_type_array_int128ss_append_all__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int128ss_append_all()
+ * @see f_int128ss_append_all()
  */
-extern void test__f_type_array_int128ss_append_all__parameter_checking(void **state);
+extern void test__f_type_array_int128ss_append_all__works(void **state);
 
 #endif // _TEST__F_type_array__int128ss_append_all
index 1a6c370a2be9e7b65b1697ffb91b6a60bbe67f80..e46fc9e26f0e14cab3e3ab64ca3731139599b217 100644 (file)
@@ -5,10 +5,26 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int128ss_decimate_by__works(void **state) {
+void test__f_type_array_int128ss_decimate_by__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_int128ss_t data = f_int128ss_t_initialize;
+
+  {
+    const f_status_t status = f_int128ss_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_type_array_int128ss_decimate_by__returns_data_not(void **state) {
 
   const int length = 5;
-  f_int128ss_t data = f_int128s_t_initialize;
+  f_int128ss_t data = f_int128ss_t_initialize;
 
   {
     const f_status_t status = f_int128ss_resize(length, &data);
@@ -19,25 +35,33 @@ void test__f_type_array_int128ss_decimate_by__works(void **state) {
   }
 
   {
-    const f_status_t status = f_int128ss_decimate_by(length, &data);
+    const f_status_t status = f_int128ss_decimate_by(0, &data);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_data_not);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
-void test__f_type_array_int128ss_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_int128ss_decimate_by__works(void **state) {
 
   const int length = 5;
-  f_int128ss_t data = f_int128s_t_initialize;
+  f_int128ss_t data = f_int128ss_t_initialize;
 
   {
-    const f_status_t status = f_int128ss_decimate_by(length, 0);
+    const f_status_t status = f_int128ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_int128ss_decimate_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index b4a36479cefe2fdf9ac5a39b12bae39cc935b92e..ebd4ad5151a6b7e4cb0713a6fb9dd7820b554de4 100644 (file)
 #define _TEST__F_type_array__int128ss_decimate_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int128ss_decimate_by()
+ * @see f_int128ss_decimate_by()
  */
-extern void test__f_type_array_int128ss_decimate_by__works(void **state);
+extern void test__f_type_array_int128ss_decimate_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
  * @see f_type_array_int128ss_decimate_by()
  */
-extern void test__f_type_array_int128ss_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_int128ss_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int128ss_decimate_by()
+ */
+extern void test__f_type_array_int128ss_decimate_by__works(void **state);
 
 #endif // _TEST__F_type_array__int128ss_decimate_by
index a8ac1f498498a3147021c0c83281d4fde4e2931c..62b909e32e5070076b75d3d2b6864b67ca078dc6 100644 (file)
@@ -5,10 +5,26 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int128ss_decrease_by__works(void **state) {
+void test__f_type_array_int128ss_decrease_by__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_int128ss_t data = f_int128ss_t_initialize;
+
+  {
+    const f_status_t status = f_int128ss_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_type_array_int128ss_decrease_by__returns_data_not(void **state) {
 
   const int length = 5;
-  f_int128ss_t data = f_int128s_t_initialize;
+  f_int128ss_t data = f_int128ss_t_initialize;
 
   {
     const f_status_t status = f_int128ss_resize(length, &data);
@@ -19,25 +35,33 @@ void test__f_type_array_int128ss_decrease_by__works(void **state) {
   }
 
   {
-    const f_status_t status = f_int128ss_decrease_by(length, &data);
+    const f_status_t status = f_int128ss_decrease_by(0, &data);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_data_not);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
-void test__f_type_array_int128ss_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_int128ss_decrease_by__works(void **state) {
 
   const int length = 5;
-  f_int128ss_t data = f_int128s_t_initialize;
+  f_int128ss_t data = f_int128ss_t_initialize;
 
   {
-    const f_status_t status = f_int128ss_decrease_by(length, 0);
+    const f_status_t status = f_int128ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_int128ss_decrease_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index f7f4da9c2c59f8328212d12da688417291e32e87..324a4b2f136f57475f14d8a6af2e12e7b7c0eb94 100644 (file)
 #define _TEST__F_type_array__int128ss_decrease_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int128ss_decrease_by()
+ * @see f_int128ss_decrease_by()
  */
-extern void test__f_type_array_int128ss_decrease_by__works(void **state);
+extern void test__f_type_array_int128ss_decrease_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_int128ss_decrease_by()
+ * @see f_int128ss_decrease_by()
  */
-extern void test__f_type_array_int128ss_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_int128ss_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int128ss_decrease_by()
+ */
+extern void test__f_type_array_int128ss_decrease_by__works(void **state);
 
 #endif // _TEST__F_type_array__int128ss_decrease_by
index d0cfcc1cc435f48748c6df2a92cb25380d068463..048b4617fbe13a2c65742d87006f7fc5169843da 100644 (file)
@@ -5,27 +5,17 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int128ss_increase__works(void **state) {
+void test__f_type_array_int128ss_increase__parameter_checking(void **state) {
 
   const int length = 5;
-  f_int128ss_t data = f_int128s_t_initialize;
+  f_int128ss_t data = f_int128ss_t_initialize;
 
   {
-    const f_status_t status = f_int128ss_resize(length, &data);
+    const f_status_t status = f_int128ss_increase(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_int128ss_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);
+    assert_int_equal(data.size, 0);
   }
 
   free((void *) data.array);
@@ -34,7 +24,7 @@ void test__f_type_array_int128ss_increase__works(void **state) {
 void test__f_type_array_int128ss_increase__returns_data_not(void **state) {
 
   const int length = 5;
-  f_int128ss_t data = f_int128s_t_initialize;
+  f_int128ss_t data = f_int128ss_t_initialize;
 
   {
     const f_status_t status = f_int128ss_resize(length, &data);
@@ -55,17 +45,27 @@ void test__f_type_array_int128ss_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int128ss_increase__parameter_checking(void **state) {
+void test__f_type_array_int128ss_increase__works(void **state) {
 
   const int length = 5;
-  f_int128ss_t data = f_int128s_t_initialize;
+  f_int128ss_t data = f_int128ss_t_initialize;
 
   {
-    const f_status_t status = f_int128ss_increase(length, 0);
+    const f_status_t status = f_int128ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    data.used = length;
+
+    const f_status_t status = f_int128ss_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);
index 5751599335b27f415931f377136e2395cb2f08d6..3972fc75fe251846cc631f1bce655cd5868ad010 100644 (file)
 #define _TEST__F_type_array__int128ss_increase
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int128ss_increase()
+ * @see f_int128ss_increase()
  */
-extern void test__f_type_array_int128ss_increase__works(void **state);
+extern void test__f_type_array_int128ss_increase__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_int128ss_increase()
+ * @see f_int128ss_increase()
  */
 extern void test__f_type_array_int128ss_increase__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int128ss_increase()
+ * @see f_int128ss_increase()
  */
-extern void test__f_type_array_int128ss_increase__parameter_checking(void **state);
+extern void test__f_type_array_int128ss_increase__works(void **state);
 
 #endif // _TEST__F_type_array__int128ss_increase
index 8588735ac279f3f1309764b55c14e6dd3e913627..f8da9195c3b42e5a2dc595e1797b7b92dab86f7a 100644 (file)
@@ -5,10 +5,26 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int128ss_increase_by__works(void **state) {
+void test__f_type_array_int128ss_increase_by__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_int128ss_t data = f_int128ss_t_initialize;
+
+  {
+    const f_status_t status = f_int128ss_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_type_array_int128ss_increase_by__returns_data_not(void **state) {
 
   const int length = 5;
-  f_int128ss_t data = f_int128s_t_initialize;
+  f_int128ss_t data = f_int128ss_t_initialize;
 
   {
     const f_status_t status = f_int128ss_resize(length, &data);
@@ -19,32 +35,48 @@ void test__f_type_array_int128ss_increase_by__works(void **state) {
   }
 
   {
-    data.used = length;
+    const f_status_t status = f_int128ss_increase_by(0, &data);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
 
+  {
     const f_status_t status = f_int128ss_increase_by(length, &data);
 
-    assert_int_equal(status, F_none);
-    assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
   }
 
   free((void *) data.array);
 }
 
-void test__f_type_array_int128ss_increase_by__parameter_checking(void **state) {
+void test__f_type_array_int128ss_increase_by__works(void **state) {
 
   const int length = 5;
-  f_int128ss_t data = f_int128s_t_initialize;
+  f_int128ss_t data = f_int128ss_t_initialize;
 
   {
-    const f_status_t status = f_int128ss_increase_by(length, 0);
+    const f_status_t status = f_int128ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  {
+    data.used = length;
+
+    const f_status_t status = f_int128ss_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
index dbb6090a9c8c8dc235975382716bd018bd6e565e..6f2af95204058c4ae3916e696fd816cc1aa09d14 100644 (file)
 #define _TEST__F_type_array__int128ss_increase_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int128ss_increase_by()
+ * @see f_int128ss_increase_by()
  */
-extern void test__f_type_array_int128ss_increase_by__works(void **state);
+extern void test__f_type_array_int128ss_increase_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_int128ss_increase_by()
+ * @see f_int128ss_increase_by()
  */
-extern void test__f_type_array_int128ss_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_int128ss_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int128ss_increase_by()
+ */
+extern void test__f_type_array_int128ss_increase_by__works(void **state);
 
 #endif // _TEST__F_type_array__int128ss_increase_by
index 72eaa3fe1f215c0007af86438bc45ee3f02771ad..cabbb02cc43ee93f48d67058efb02b49e2beb148 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int128ss_resize__works(void **state) {
+void test__f_type_array_int128ss_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_int128ss_t data = f_int128ss_t_initialize;
 
   {
-    const f_status_t status = f_int128ss_resize(length, &data);
+    const f_status_t status = f_int128ss_resize(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_int128ss_resize__parameter_checking(void **state) {
+void test__f_type_array_int128ss_resize__works(void **state) {
 
   const int length = 5;
   f_int128ss_t data = f_int128ss_t_initialize;
 
   {
-    const f_status_t status = f_int128ss_resize(length, 0);
+    const f_status_t status = f_int128ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index 821daa23a6c05f7588e78b8b80e0a78d86266fce..24a5ae2037bb6bc017e07e51d4d89667496b1a6e 100644 (file)
 #define _TEST__F_type_array__int128ss_resize
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int128ss_resize()
+ * @see f_int128ss_resize()
  */
-extern void test__f_type_array_int128ss_resize__works(void **state);
+extern void test__f_type_array_int128ss_resize__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int128ss_resize()
+ * @see f_int128ss_resize()
  */
-extern void test__f_type_array_int128ss_resize__parameter_checking(void **state);
+extern void test__f_type_array_int128ss_resize__works(void **state);
 
 #endif // _TEST__F_type_array__int128ss_resize
index 3f0931e89eba712a4b0a5bb9b4eafc717717f25f..3c4f2796ed9f43aefb29ed59253015f34850fa67 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int16s_adjust__works(void **state) {
+void test__f_type_array_int16s_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_int16s_t data = f_int16s_t_initialize;
 
   {
-    const f_status_t status = f_int16s_adjust(length, &data);
+    const f_status_t status = f_int16s_adjust(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_int16s_adjust__parameter_checking(void **state) {
+void test__f_type_array_int16s_adjust__works(void **state) {
 
   const int length = 5;
   f_int16s_t data = f_int16s_t_initialize;
 
   {
-    const f_status_t status = f_int16s_adjust(length, 0);
+    const f_status_t status = f_int16s_adjust(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index 9376cd3f9eed11e5f8e53cf291d8329a06f99f71..086ffc739c987d55f39abc8becfc5890796983d0 100644 (file)
 #define _TEST__F_type_array__int16s_adjust
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int16s_adjust()
+ * @see f_int16s_adjust()
  */
-extern void test__f_type_array_int16s_adjust__works(void **state);
+extern void test__f_type_array_int16s_adjust__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int16s_adjust()
+ * @see f_int16s_adjust()
  */
-extern void test__f_type_array_int16s_adjust__parameter_checking(void **state);
+extern void test__f_type_array_int16s_adjust__works(void **state);
 
 #endif // _TEST__F_type_array__int16s_adjust
index 163f197b9c193d9db245b7609f2a449adb909ccc..205719672918cd93bf03500944cce452ae042797 100644 (file)
@@ -5,9 +5,20 @@
 extern "C" {
 #endif
 
+void test__f_type_array_int16s_append__parameter_checking(void **state) {
+
+  const int16_t data = 0;
+
+  {
+    const f_status_t status = f_int16s_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
 void test__f_type_array_int16s_append__works(void **state) {
 
-  const uint16_t source = 3;
+  const int16_t source = 3;
   f_int16s_t destination = f_int16s_t_initialize;
 
   {
@@ -21,17 +32,6 @@ void test__f_type_array_int16s_append__works(void **state) {
   free((void *) destination.array);
 }
 
-void test__f_type_array_int16s_append__parameter_checking(void **state) {
-
-  const uint16_t data = 0;
-
-  {
-    const f_status_t status = f_int16s_append(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 173530c15c9de12e5842d69a58c1d1ce142e200e..7b4a60165f61cf5f65b98ec73235b6ed08b0f495 100644 (file)
 #define _TEST__F_type_array__int16s_append
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int16s_append()
+ * @see f_int16s_append()
  */
-extern void test__f_type_array_int16s_append__works(void **state);
+extern void test__f_type_array_int16s_append__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int16s_append()
+ * @see f_int16s_append()
  */
-extern void test__f_type_array_int16s_append__parameter_checking(void **state);
+extern void test__f_type_array_int16s_append__works(void **state);
 
 #endif // _TEST__F_type_array__int16s_append
index 19506b0fb28ad8a07922ac3dff6025d9ed796389..dd2ad4d377a770297d9454966e70637d343409dd 100644 (file)
@@ -5,10 +5,20 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int16s_append_all__works(void **state) {
+void test__f_type_array_int16s_append_all__parameter_checking(void **state) {
+
+  const f_int16s_t data = f_int16s_t_initialize;
+
+  {
+    const f_status_t status = f_int16s_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_int16s_append_all__returns_data_not(void **state) {
 
   const int length = 5;
-  const int length_used = 2;
   f_int16s_t source = f_int16s_t_initialize;
   f_int16s_t destination = f_int16s_t_initialize;
 
@@ -20,29 +30,22 @@ void test__f_type_array_int16s_append_all__works(void **state) {
     assert_int_equal(source.size, length);
   }
 
-  for (; source.used < length_used; ++source.used) {
-    source.array[source.used] = source.used + 1;
-  } // for
-
   {
     const f_status_t status = f_int16s_append_all(source, &destination);
 
-    assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
-
-    for (f_array_length_t i = 0; i < source.used; ++i) {
-      assert_int_equal(destination.array[i], i + 1);
-    } // for
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
   }
 
   free((void *) source.array);
-  free((void *) destination.array);
 }
 
-void test__f_type_array_int16s_append_all__returns_data_not(void **state) {
+void test__f_type_array_int16s_append_all__works(void **state) {
 
   const int length = 5;
+  const int length_used = 2;
   f_int16s_t source = f_int16s_t_initialize;
   f_int16s_t destination = f_int16s_t_initialize;
 
@@ -54,27 +57,24 @@ void test__f_type_array_int16s_append_all__returns_data_not(void **state) {
     assert_int_equal(source.size, length);
   }
 
+  for (; source.used < length_used; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
+
   {
     const f_status_t status = f_int16s_append_all(source, &destination);
 
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < source.used; ++i) {
+      assert_int_equal(destination.array[i], i + 1);
+    } // for
   }
 
   free((void *) source.array);
-}
-
-void test__f_type_array_int16s_append_all__parameter_checking(void **state) {
-
-  const f_int16s_t data = f_int16s_t_initialize;
-
-  {
-    const f_status_t status = f_int16s_append_all(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
+  free((void *) destination.array);
 }
 
 #ifdef __cplusplus
index 2a4637cfb2f6fe889432754b0c68539030fb43b4..fb15fffbf32e67cca960e50532e1a0a97773c38f 100644 (file)
 #define _TEST__F_type_array__int16s_append_all
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int16s_append_all()
+ * @see f_int16s_append_all()
  */
-extern void test__f_type_array_int16s_append_all__works(void **state);
+extern void test__f_type_array_int16s_append_all__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_int16s_append_all()
+ * @see f_int16s_append_all()
  */
 extern void test__f_type_array_int16s_append_all__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int16s_append_all()
+ * @see f_int16s_append_all()
  */
-extern void test__f_type_array_int16s_append_all__parameter_checking(void **state);
+extern void test__f_type_array_int16s_append_all__works(void **state);
 
 #endif // _TEST__F_type_array__int16s_append_all
index 9fff75ddf68c45b556982ec27189d6432a35b3f5..fc67c906aa1ffb6b97443f85c5dedb0a0fec9f7b 100644 (file)
@@ -5,23 +5,15 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int16s_decimate_by__works(void **state) {
+void test__f_type_array_int16s_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_int16s_t data = f_int16s_t_initialize;
 
   {
-    const f_status_t status = f_int16s_resize(length, &data);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_int16s_decimate_by(length, &data);
+    const f_status_t status = f_int16s_decimate_by(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
@@ -29,15 +21,23 @@ void test__f_type_array_int16s_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_int16s_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_int16s_decimate_by__works(void **state) {
 
   const int length = 5;
   f_int16s_t data = f_int16s_t_initialize;
 
   {
-    const f_status_t status = f_int16s_decimate_by(length, 0);
+    const f_status_t status = f_int16s_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_int16s_decimate_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index f77b1aed20f2a56daf74f019e02b5dd7873bd5b8..4341b060bc44db331142f276d3e38eb91337d0af 100644 (file)
 #define _TEST__F_type_array__int16s_decimate_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int16s_decimate_by()
+ * @see f_int16s_decimate_by()
  */
-extern void test__f_type_array_int16s_decimate_by__works(void **state);
+extern void test__f_type_array_int16s_decimate_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int16s_decimate_by()
+ * @see f_int16s_decimate_by()
  */
-extern void test__f_type_array_int16s_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_int16s_decimate_by__works(void **state);
 
 #endif // _TEST__F_type_array__int16s_decimate_by
index 3d30dc178e02ad13dc93e159b9b115ecd5e624a8..b4ac659894451030b1a9a55539759d5f597ef140 100644 (file)
@@ -5,23 +5,15 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int16s_decrease_by__works(void **state) {
+void test__f_type_array_int16s_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_int16s_t data = f_int16s_t_initialize;
 
   {
-    const f_status_t status = f_int16s_resize(length, &data);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_int16s_decrease_by(length, &data);
+    const f_status_t status = f_int16s_decrease_by(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
@@ -29,15 +21,23 @@ void test__f_type_array_int16s_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_int16s_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_int16s_decrease_by__works(void **state) {
 
   const int length = 5;
   f_int16s_t data = f_int16s_t_initialize;
 
   {
-    const f_status_t status = f_int16s_decrease_by(length, 0);
+    const f_status_t status = f_int16s_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_int16s_decrease_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index b7a215d8e6fd3f6733510b723e46fdf4366cb78a..695b227c5ec06e52a6a511a78ee4d2b550f5c5ab 100644 (file)
 #define _TEST__F_type_array__int16s_decrease_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int16s_decrease_by()
+ * @see f_int16s_decrease_by()
  */
-extern void test__f_type_array_int16s_decrease_by__works(void **state);
+extern void test__f_type_array_int16s_decrease_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int16s_decrease_by()
+ * @see f_int16s_decrease_by()
  */
-extern void test__f_type_array_int16s_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_int16s_decrease_by__works(void **state);
 
 #endif // _TEST__F_type_array__int16s_decrease_by
index 0d7fe4b64bddeffbf29909414fe4e6b5b10a1505..a10f868656a688d55bcc090d0e5a381185c5077b 100644 (file)
@@ -5,27 +5,17 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int16s_increase__works(void **state) {
+void test__f_type_array_int16s_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_int16s_t data = f_int16s_t_initialize;
 
   {
-    const f_status_t status = f_int16s_resize(length, &data);
+    const f_status_t status = f_int16s_increase(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_int16s_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);
+    assert_int_equal(data.size, 0);
   }
 
   free((void *) data.array);
@@ -55,17 +45,27 @@ void test__f_type_array_int16s_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int16s_increase__parameter_checking(void **state) {
+void test__f_type_array_int16s_increase__works(void **state) {
 
   const int length = 5;
   f_int16s_t data = f_int16s_t_initialize;
 
   {
-    const f_status_t status = f_int16s_increase(length, 0);
+    const f_status_t status = f_int16s_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    data.used = length;
+
+    const f_status_t status = f_int16s_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);
index 8a9c1cba5abe4ff4f05216280e206293157d4d0e..9ffab14155a977066d9af69189d4ca29ea64b149 100644 (file)
 #define _TEST__F_type_array__int16s_increase
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int16s_increase()
+ * @see f_int16s_increase()
  */
-extern void test__f_type_array_int16s_increase__works(void **state);
+extern void test__f_type_array_int16s_increase__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_int16s_increase()
+ * @see f_int16s_increase()
  */
 extern void test__f_type_array_int16s_increase__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int16s_increase()
+ * @see f_int16s_increase()
  */
-extern void test__f_type_array_int16s_increase__parameter_checking(void **state);
+extern void test__f_type_array_int16s_increase__works(void **state);
 
 #endif // _TEST__F_type_array__int16s_increase
index 2f717aeb03bc3ddef4b472b733088b8ae2220b81..e33b5a4a3360d39674e14ff8abf1027b3858fb7e 100644 (file)
@@ -5,6 +5,22 @@
 extern "C" {
 #endif
 
+void test__f_type_array_int16s_increase_by__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_int16s_t data = f_int16s_t_initialize;
+
+  {
+    const f_status_t status = f_int16s_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_type_array_int16s_increase_by__works(void **state) {
 
   const int length = 5;
@@ -31,22 +47,6 @@ void test__f_type_array_int16s_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int16s_increase_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_int16s_t data = f_int16s_t_initialize;
-
-  {
-    const f_status_t status = f_int16s_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);
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 37e7b4d7539ee4940b0be45b91bd6684a87edd41..575753fc6a69d41292f7702255be8cb29a077503 100644 (file)
 #define _TEST__F_type_array__int16s_increase_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int16s_increase_by()
+ * @see f_int16s_increase_by()
  */
-extern void test__f_type_array_int16s_increase_by__works(void **state);
+extern void test__f_type_array_int16s_increase_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int16s_increase_by()
+ * @see f_int16s_increase_by()
  */
-extern void test__f_type_array_int16s_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_int16s_increase_by__works(void **state);
 
 #endif // _TEST__F_type_array__int16s_increase_by
index c632a9ea45f25800434c01f560ade5c12b3ea033..9b5c14b98445cfae93ae4ae1019151f11a7b9a69 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int16s_resize__works(void **state) {
+void test__f_type_array_int16s_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_int16s_t data = f_int16s_t_initialize;
 
   {
-    const f_status_t status = f_int16s_resize(length, &data);
+    const f_status_t status = f_int16s_resize(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_int16s_resize__parameter_checking(void **state) {
+void test__f_type_array_int16s_resize__works(void **state) {
 
   const int length = 5;
   f_int16s_t data = f_int16s_t_initialize;
 
   {
-    const f_status_t status = f_int16s_resize(length, 0);
+    const f_status_t status = f_int16s_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index 5f2933e5376029c22b3f4bb2c603a7c3592cc1f4..8fea4d6365fd6f4bcd8717376f83d9cf4534855c 100644 (file)
 #define _TEST__F_type_array__int16s_resize
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int16s_resize()
+ * @see f_int16s_resize()
  */
-extern void test__f_type_array_int16s_resize__works(void **state);
+extern void test__f_type_array_int16s_resize__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int16s_resize()
+ * @see f_int16s_resize()
  */
-extern void test__f_type_array_int16s_resize__parameter_checking(void **state);
+extern void test__f_type_array_int16s_resize__works(void **state);
 
 #endif // _TEST__F_type_array__int16s_resize
index 3055b173827b4595ce26cf4b9cf1a43d3937d81c..336011bf6358ace18be9a6f23aaa4a06f2d4b837 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int16ss_adjust__works(void **state) {
+void test__f_type_array_int16ss_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_int16ss_t data = f_int16ss_t_initialize;
 
   {
-    const f_status_t status = f_int16ss_adjust(length, &data);
+    const f_status_t status = f_int16ss_adjust(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_int16ss_adjust__parameter_checking(void **state) {
+void test__f_type_array_int16ss_adjust__works(void **state) {
 
   const int length = 5;
   f_int16ss_t data = f_int16ss_t_initialize;
 
   {
-    const f_status_t status = f_int16ss_adjust(length, 0);
+    const f_status_t status = f_int16ss_adjust(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index c2412551f10482b713bcc97d62df4e52d74b75f8..d7df5512690697519c32d3a93647ab8f4e11d010 100644 (file)
 #define _TEST__F_type_array__int16ss_adjust
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int16ss_adjust()
+ * @see f_int16ss_adjust()
  */
-extern void test__f_type_array_int16ss_adjust__works(void **state);
+extern void test__f_type_array_int16ss_adjust__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int16ss_adjust()
+ * @see f_int16ss_adjust()
  */
-extern void test__f_type_array_int16ss_adjust__parameter_checking(void **state);
+extern void test__f_type_array_int16ss_adjust__works(void **state);
 
 #endif // _TEST__F_type_array__int16ss_adjust
index 36ee09d0065087196cc39ab8ca5da3961ba58afa..15eada470ac8b6c3f1ddb40776da9bcb39fb7c7a 100644 (file)
@@ -5,7 +5,18 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int16ss_append__works(void **state) {
+void test__f_type_array_int16ss_append__parameter_checking(void **state) {
+
+  f_int16s_t data = f_int16s_t_initialize;
+
+  {
+    const f_status_t status = f_int16ss_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_int16ss_append__returns_data_not(void **state) {
 
   const int length = 5;
   f_int16s_t source = f_int16s_t_initialize;
@@ -19,32 +30,19 @@ void test__f_type_array_int16ss_append__works(void **state) {
     assert_int_equal(source.size, length);
   }
 
-  for (; source.used < length; ++source.used) {
-    source.array[source.used] = source.used + 1;
-  } // for
-
   {
     const f_status_t status = f_int16ss_append(source, &destination);
 
-    assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, 1);
-    assert_int_equal(destination.array[0].used, source.used);
-    assert_int_equal(destination.array[0].size, source.used);
-
-    for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
-      assert_int_equal(destination.array[0].array[i], i + 1);
-    } // for
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
   }
 
-  for (f_array_length_t i = 0; i < destination.used; ++i) {
-    free((void *) destination.array[i].array);
-  } // for
-
   free((void *) source.array);
-  free((void *) destination.array);
 }
 
-void test__f_type_array_int16ss_append__returns_data_not(void **state) {
+void test__f_type_array_int16ss_append__works(void **state) {
 
   const int length = 5;
   f_int16s_t source = f_int16s_t_initialize;
@@ -58,27 +56,29 @@ void test__f_type_array_int16ss_append__returns_data_not(void **state) {
     assert_int_equal(source.size, length);
   }
 
+  for (; source.used < length; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
+
   {
     const f_status_t status = f_int16ss_append(source, &destination);
 
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
-  }
-
-  free((void *) source.array);
-}
-
-void test__f_type_array_int16ss_append__parameter_checking(void **state) {
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0].used, source.used);
+    assert_int_equal(destination.array[0].size, source.used);
 
-  f_int16s_t data = f_int16s_t_initialize;
+    for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
+      assert_int_equal(destination.array[0].array[i], i + 1);
+    } // for
+  }
 
-  {
-    const f_status_t status = f_int16ss_append(data, 0);
+  for (f_array_length_t i = 0; i < destination.used; ++i) {
+    free((void *) destination.array[i].array);
+  } // for
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
+  free((void *) source.array);
+  free((void *) destination.array);
 }
 
 #ifdef __cplusplus
index 7bab07fa0cab4d601c778f195bfa88aaad172c64..1947eca0daa12dce406817feb137b8e8ef40bca5 100644 (file)
 #define _TEST__F_type_array__int16ss_append
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int16ss_append()
+ * @see f_int16ss_append()
  */
-extern void test__f_type_array_int16ss_append__works(void **state);
+extern void test__f_type_array_int16ss_append__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_int16ss_append()
+ * @see f_int16ss_append()
  */
 extern void test__f_type_array_int16ss_append__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int16ss_append()
+ * @see f_int16ss_append()
  */
-extern void test__f_type_array_int16ss_append__parameter_checking(void **state);
+extern void test__f_type_array_int16ss_append__works(void **state);
 
 #endif // _TEST__F_type_array__int16ss_append
index 08d312316298a30281af949c6d4eb7df14f65336..272af4b9da3c61c7d1e6dfbd191ed5bb0b25b078 100644 (file)
@@ -5,6 +5,43 @@
 extern "C" {
 #endif
 
+void test__f_type_array_int16ss_append_all__parameter_checking(void **state) {
+
+  const f_int16ss_t data = f_int16ss_t_initialize;
+
+  {
+    const f_status_t status = f_int16ss_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_int16ss_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_int16ss_t source = f_int16ss_t_initialize;
+  f_int16ss_t destination = f_int16ss_t_initialize;
+
+  {
+    const f_status_t status = f_int16ss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_int16ss_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
 void test__f_type_array_int16ss_append_all__works(void **state) {
 
   const int length = 5;
@@ -63,43 +100,6 @@ void test__f_type_array_int16ss_append_all__works(void **state) {
   free((void *) destination.array);
 }
 
-void test__f_type_array_int16ss_append_all__returns_data_not(void **state) {
-
-  const int length = 5;
-  f_int16ss_t source = f_int16ss_t_initialize;
-  f_int16ss_t destination = f_int16ss_t_initialize;
-
-  {
-    const f_status_t status = f_int16ss_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  {
-    const f_status_t status = f_int16ss_append_all(source, &destination);
-
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
-  }
-
-  free((void *) source.array);
-}
-
-void test__f_type_array_int16ss_append_all__parameter_checking(void **state) {
-
-  const f_int16ss_t data = f_int16ss_t_initialize;
-
-  {
-    const f_status_t status = f_int16ss_append_all(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 8d9fe34ee77964bf39e818215de354744cd97a53..09870376e54587fedb4102fc036639849183033f 100644 (file)
 #define _TEST__F_type_array__int16ss_append_all
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int16ss_append_all()
+ * @see f_int16ss_append_all()
  */
-extern void test__f_type_array_int16ss_append_all__works(void **state);
+extern void test__f_type_array_int16ss_append_all__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_int16ss_append_all()
+ * @see f_int16ss_append_all()
  */
 extern void test__f_type_array_int16ss_append_all__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int16ss_append_all()
+ * @see f_int16ss_append_all()
  */
-extern void test__f_type_array_int16ss_append_all__parameter_checking(void **state);
+extern void test__f_type_array_int16ss_append_all__works(void **state);
 
 #endif // _TEST__F_type_array__int16ss_append_all
index fd7040ebca8cee643eacf9c01f421f7ee12b0ba1..94f8c520046a0decae13f37732e0cd5f658f750b 100644 (file)
@@ -5,10 +5,26 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int16ss_decimate_by__works(void **state) {
+void test__f_type_array_int16ss_decimate_by__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_int16ss_t data = f_int16ss_t_initialize;
+
+  {
+    const f_status_t status = f_int16ss_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_type_array_int16ss_decimate_by__returns_data_not(void **state) {
 
   const int length = 5;
-  f_int16ss_t data = f_int16s_t_initialize;
+  f_int16ss_t data = f_int16ss_t_initialize;
 
   {
     const f_status_t status = f_int16ss_resize(length, &data);
@@ -19,25 +35,33 @@ void test__f_type_array_int16ss_decimate_by__works(void **state) {
   }
 
   {
-    const f_status_t status = f_int16ss_decimate_by(length, &data);
+    const f_status_t status = f_int16ss_decimate_by(0, &data);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_data_not);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
-void test__f_type_array_int16ss_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_int16ss_decimate_by__works(void **state) {
 
   const int length = 5;
-  f_int16ss_t data = f_int16s_t_initialize;
+  f_int16ss_t data = f_int16ss_t_initialize;
 
   {
-    const f_status_t status = f_int16ss_decimate_by(length, 0);
+    const f_status_t status = f_int16ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_int16ss_decimate_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index 2bd7c2f9dca5a4c0579f99c811248dc606e95c8e..2fd1103a42c8b0421380f8dd8dc485c81a9e59c3 100644 (file)
 #define _TEST__F_type_array__int16ss_decimate_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int16ss_decimate_by()
+ * @see f_int16ss_decimate_by()
  */
-extern void test__f_type_array_int16ss_decimate_by__works(void **state);
+extern void test__f_type_array_int16ss_decimate_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
  * @see f_type_array_int16ss_decimate_by()
  */
-extern void test__f_type_array_int16ss_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_int16ss_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int16ss_decimate_by()
+ */
+extern void test__f_type_array_int16ss_decimate_by__works(void **state);
 
 #endif // _TEST__F_type_array__int16ss_decimate_by
index ed3a4548e3d2c30bd1eac2c6b966ade4c015cbd5..e733e00ac7a22f56d679ab322ba730f3225be921 100644 (file)
@@ -5,10 +5,26 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int16ss_decrease_by__works(void **state) {
+void test__f_type_array_int16ss_decrease_by__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_int16ss_t data = f_int16ss_t_initialize;
+
+  {
+    const f_status_t status = f_int16ss_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_type_array_int16ss_decrease_by__returns_data_not(void **state) {
 
   const int length = 5;
-  f_int16ss_t data = f_int16s_t_initialize;
+  f_int16ss_t data = f_int16ss_t_initialize;
 
   {
     const f_status_t status = f_int16ss_resize(length, &data);
@@ -19,25 +35,33 @@ void test__f_type_array_int16ss_decrease_by__works(void **state) {
   }
 
   {
-    const f_status_t status = f_int16ss_decrease_by(length, &data);
+    const f_status_t status = f_int16ss_decrease_by(0, &data);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_data_not);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
-void test__f_type_array_int16ss_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_int16ss_decrease_by__works(void **state) {
 
   const int length = 5;
-  f_int16ss_t data = f_int16s_t_initialize;
+  f_int16ss_t data = f_int16ss_t_initialize;
 
   {
-    const f_status_t status = f_int16ss_decrease_by(length, 0);
+    const f_status_t status = f_int16ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_int16ss_decrease_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index f5d687a1e9f29f98d30ce7b3cfd6bad741d266d5..e63f6db414e05f3e75defed20208d0b5956e2799 100644 (file)
 #define _TEST__F_type_array__int16ss_decrease_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int16ss_decrease_by()
+ * @see f_int16ss_decrease_by()
  */
-extern void test__f_type_array_int16ss_decrease_by__works(void **state);
+extern void test__f_type_array_int16ss_decrease_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_int16ss_decrease_by()
+ * @see f_int16ss_decrease_by()
  */
-extern void test__f_type_array_int16ss_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_int16ss_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int16ss_decrease_by()
+ */
+extern void test__f_type_array_int16ss_decrease_by__works(void **state);
 
 #endif // _TEST__F_type_array__int16ss_decrease_by
index f1d8273d453870a3257a88d813869b799de9dc82..a9b2ea96f28c6006c626b2861775fe1626134877 100644 (file)
@@ -5,27 +5,17 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int16ss_increase__works(void **state) {
+void test__f_type_array_int16ss_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_int16ss_t data = f_int16s_t_initialize;
 
   {
-    const f_status_t status = f_int16ss_resize(length, &data);
+    const f_status_t status = f_int16ss_increase(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_int16ss_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);
+    assert_int_equal(data.size, 0);
   }
 
   free((void *) data.array);
@@ -34,7 +24,7 @@ void test__f_type_array_int16ss_increase__works(void **state) {
 void test__f_type_array_int16ss_increase__returns_data_not(void **state) {
 
   const int length = 5;
-  f_int16ss_t data = f_int16s_t_initialize;
+  f_int16ss_t data = f_int16ss_t_initialize;
 
   {
     const f_status_t status = f_int16ss_resize(length, &data);
@@ -55,17 +45,27 @@ void test__f_type_array_int16ss_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int16ss_increase__parameter_checking(void **state) {
+void test__f_type_array_int16ss_increase__works(void **state) {
 
   const int length = 5;
-  f_int16ss_t data = f_int16s_t_initialize;
+  f_int16ss_t data = f_int16ss_t_initialize;
 
   {
-    const f_status_t status = f_int16ss_increase(length, 0);
+    const f_status_t status = f_int16ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    data.used = length;
+
+    const f_status_t status = f_int16ss_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);
index c0b275d4e2e48482bd1f529cf517bacf69357686..9824f00674eadcf05bdd655a7a7e55eeb419c648 100644 (file)
 #define _TEST__F_type_array__int16ss_increase
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int16ss_increase()
+ * @see f_int16ss_increase()
  */
-extern void test__f_type_array_int16ss_increase__works(void **state);
+extern void test__f_type_array_int16ss_increase__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_int16ss_increase()
+ * @see f_int16ss_increase()
  */
 extern void test__f_type_array_int16ss_increase__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int16ss_increase()
+ * @see f_int16ss_increase()
  */
-extern void test__f_type_array_int16ss_increase__parameter_checking(void **state);
+extern void test__f_type_array_int16ss_increase__works(void **state);
 
 #endif // _TEST__F_type_array__int16ss_increase
index cbb4a2901a98de9eb60a84f0b16c4d2e84122b76..290ac70c74f584042c8c02373c366d56d320ff15 100644 (file)
@@ -5,10 +5,26 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int16ss_increase_by__works(void **state) {
+void test__f_type_array_int16ss_increase_by__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_int16ss_t data = f_int16ss_t_initialize;
+
+  {
+    const f_status_t status = f_int16ss_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_type_array_int16ss_increase_by__returns_data_not(void **state) {
 
   const int length = 5;
-  f_int16ss_t data = f_int16s_t_initialize;
+  f_int16ss_t data = f_int16ss_t_initialize;
 
   {
     const f_status_t status = f_int16ss_resize(length, &data);
@@ -19,32 +35,72 @@ void test__f_type_array_int16ss_increase_by__works(void **state) {
   }
 
   {
-    data.used = length;
+    const f_status_t status = f_int16ss_increase_by(0, &data);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
 
+  {
     const f_status_t status = f_int16ss_increase_by(length, &data);
 
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  free((void *) data.array);
+}
+
+void test__f_type_array_array_length_decrease_by__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_array_lengthss_t data = f_array_lengthss_t_initialize;
+
+  {
+    const f_status_t status = f_array_lengthss_resize(length, &data);
+
     assert_int_equal(status, F_none);
-    assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_array_lengthss_decrease_by(0, &data);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
   }
 
   free((void *) data.array);
 }
 
-void test__f_type_array_int16ss_increase_by__parameter_checking(void **state) {
+void test__f_type_array_int16ss_increase_by__works(void **state) {
 
   const int length = 5;
-  f_int16ss_t data = f_int16s_t_initialize;
+  f_int16ss_t data = f_int16ss_t_initialize;
 
   {
-    const f_status_t status = f_int16ss_increase_by(length, 0);
+    const f_status_t status = f_int16ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  {
+    data.used = length;
+
+    const f_status_t status = f_int16ss_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
index 78956ec6bb85eddc550a7479b786c741ff1fc41a..854d907024efeaf2d984ee2aae80f1c80efd08d5 100644 (file)
 #define _TEST__F_type_array__int16ss_increase_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int16ss_increase_by()
+ * @see f_int16ss_increase_by()
  */
-extern void test__f_type_array_int16ss_increase_by__works(void **state);
+extern void test__f_type_array_int16ss_increase_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_int16ss_increase_by()
+ * @see f_int16ss_increase_by()
  */
-extern void test__f_type_array_int16ss_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_int16ss_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int16ss_increase_by()
+ */
+extern void test__f_type_array_int16ss_increase_by__works(void **state);
 
 #endif // _TEST__F_type_array__int16ss_increase_by
index 7a4e8925d85eb8b7991a4a56ea24a1d3e577b562..c5ce865263ed9f2e50a142f0430a74d83f11dd06 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int16ss_resize__works(void **state) {
+void test__f_type_array_int16ss_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_int16ss_t data = f_int16ss_t_initialize;
 
   {
-    const f_status_t status = f_int16ss_resize(length, &data);
+    const f_status_t status = f_int16ss_resize(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_int16ss_resize__parameter_checking(void **state) {
+void test__f_type_array_int16ss_resize__works(void **state) {
 
   const int length = 5;
   f_int16ss_t data = f_int16ss_t_initialize;
 
   {
-    const f_status_t status = f_int16ss_resize(length, 0);
+    const f_status_t status = f_int16ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index 6f962b705004bac91c9d2674075031f1e4d248f0..3c2d839c4e335528704bf5436439977dcd08a033 100644 (file)
 #define _TEST__F_type_array__int16ss_resize
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int16ss_resize()
+ * @see f_int16ss_resize()
  */
-extern void test__f_type_array_int16ss_resize__works(void **state);
+extern void test__f_type_array_int16ss_resize__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int16ss_resize()
+ * @see f_int16ss_resize()
  */
-extern void test__f_type_array_int16ss_resize__parameter_checking(void **state);
+extern void test__f_type_array_int16ss_resize__works(void **state);
 
 #endif // _TEST__F_type_array__int16ss_resize
index 8aafe65edac36e82f4ba350cadabf1992c6b93cd..7f0012e145fd3e7daae48c91a597556006b11feb 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int32s_adjust__works(void **state) {
+void test__f_type_array_int32s_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_int32s_t data = f_int32s_t_initialize;
 
   {
-    const f_status_t status = f_int32s_adjust(length, &data);
+    const f_status_t status = f_int32s_adjust(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_int32s_adjust__parameter_checking(void **state) {
+void test__f_type_array_int32s_adjust__works(void **state) {
 
   const int length = 5;
   f_int32s_t data = f_int32s_t_initialize;
 
   {
-    const f_status_t status = f_int32s_adjust(length, 0);
+    const f_status_t status = f_int32s_adjust(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index 913daa8cc9df2d98181b3c29e60dcb16ad88db66..e731821365d8ae60e44ef9757ab67c9dae3e6d2f 100644 (file)
 #define _TEST__F_type_array__int32s_adjust
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int32s_adjust()
+ * @see f_int32s_adjust()
  */
-extern void test__f_type_array_int32s_adjust__works(void **state);
+extern void test__f_type_array_int32s_adjust__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int32s_adjust()
+ * @see f_int32s_adjust()
  */
-extern void test__f_type_array_int32s_adjust__parameter_checking(void **state);
+extern void test__f_type_array_int32s_adjust__works(void **state);
 
 #endif // _TEST__F_type_array__int32s_adjust
index c384176b785f32f245d5a72072e5eae7e819a106..9cd73cfd184e93bef2e6efee3214aac8c1880c69 100644 (file)
@@ -5,6 +5,17 @@
 extern "C" {
 #endif
 
+void test__f_type_array_int32s_append__parameter_checking(void **state) {
+
+  const int32_t data = 0;
+
+  {
+    const f_status_t status = f_int32s_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
 void test__f_type_array_int32s_append__works(void **state) {
 
   const int32_t source = 3;
@@ -21,17 +32,6 @@ void test__f_type_array_int32s_append__works(void **state) {
   free((void *) destination.array);
 }
 
-void test__f_type_array_int32s_append__parameter_checking(void **state) {
-
-  const uint32_t data = 0;
-
-  {
-    const f_status_t status = f_int32s_append(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 4c22e28c4be5a55bb16374c03a86acff9fce7de9..dd22e011b1bcfee28f22693c8a65e7de0c42d95d 100644 (file)
 #define _TEST__F_type_array__int32s_append
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int32s_append()
+ * @see f_int32s_append()
  */
-extern void test__f_type_array_int32s_append__works(void **state);
+extern void test__f_type_array_int32s_append__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int32s_append()
+ * @see f_int32s_append()
  */
-extern void test__f_type_array_int32s_append__parameter_checking(void **state);
+extern void test__f_type_array_int32s_append__works(void **state);
 
 #endif // _TEST__F_type_array__int32s_append
index dc8bfbce7d87c2925286da3e68abcae1859fed74..6801fba88297aecddd5809f8b30b99ad95d2df51 100644 (file)
@@ -5,10 +5,20 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int32s_append_all__works(void **state) {
+void test__f_type_array_int32s_append_all__parameter_checking(void **state) {
+
+  const f_int32s_t data = f_int32s_t_initialize;
+
+  {
+    const f_status_t status = f_int32s_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_int32s_append_all__returns_data_not(void **state) {
 
   const int length = 5;
-  const int length_used = 2;
   f_int32s_t source = f_int32s_t_initialize;
   f_int32s_t destination = f_int32s_t_initialize;
 
@@ -20,29 +30,22 @@ void test__f_type_array_int32s_append_all__works(void **state) {
     assert_int_equal(source.size, length);
   }
 
-  for (; source.used < length_used; ++source.used) {
-    source.array[source.used] = source.used + 1;
-  } // for
-
   {
     const f_status_t status = f_int32s_append_all(source, &destination);
 
-    assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
-
-    for (f_array_length_t i = 0; i < source.used; ++i) {
-      assert_int_equal(destination.array[i], i + 1);
-    } // for
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
   }
 
   free((void *) source.array);
-  free((void *) destination.array);
 }
 
-void test__f_type_array_int32s_append_all__returns_data_not(void **state) {
+void test__f_type_array_int32s_append_all__works(void **state) {
 
   const int length = 5;
+  const int length_used = 2;
   f_int32s_t source = f_int32s_t_initialize;
   f_int32s_t destination = f_int32s_t_initialize;
 
@@ -54,27 +57,24 @@ void test__f_type_array_int32s_append_all__returns_data_not(void **state) {
     assert_int_equal(source.size, length);
   }
 
+  for (; source.used < length_used; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
+
   {
     const f_status_t status = f_int32s_append_all(source, &destination);
 
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < source.used; ++i) {
+      assert_int_equal(destination.array[i], i + 1);
+    } // for
   }
 
   free((void *) source.array);
-}
-
-void test__f_type_array_int32s_append_all__parameter_checking(void **state) {
-
-  const f_int32s_t data = f_int32s_t_initialize;
-
-  {
-    const f_status_t status = f_int32s_append_all(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
+  free((void *) destination.array);
 }
 
 #ifdef __cplusplus
index ed79d51ba3e8fc4c01385ecaec4793e96f1adfc6..d45982d7a10c3ac018bced6025335cb32328f0d0 100644 (file)
 #define _TEST__F_type_array__int32s_append_all
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int32s_append_all()
+ * @see f_int32s_append_all()
  */
-extern void test__f_type_array_int32s_append_all__works(void **state);
+extern void test__f_type_array_int32s_append_all__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_int32s_append_all()
+ * @see f_int32s_append_all()
  */
 extern void test__f_type_array_int32s_append_all__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int32s_append_all()
+ * @see f_int32s_append_all()
  */
-extern void test__f_type_array_int32s_append_all__parameter_checking(void **state);
+extern void test__f_type_array_int32s_append_all__works(void **state);
 
 #endif // _TEST__F_type_array__int32s_append_all
index d6b5032d83f8213019f9df2c2287e9ca7357969c..c7ad47911c879f983dd2a918d5b132035b09e574 100644 (file)
@@ -5,23 +5,15 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int32s_decimate_by__works(void **state) {
+void test__f_type_array_int32s_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_int32s_t data = f_int32s_t_initialize;
 
   {
-    const f_status_t status = f_int32s_resize(length, &data);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_int32s_decimate_by(length, &data);
+    const f_status_t status = f_int32s_decimate_by(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
@@ -29,15 +21,23 @@ void test__f_type_array_int32s_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_int32s_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_int32s_decimate_by__works(void **state) {
 
   const int length = 5;
   f_int32s_t data = f_int32s_t_initialize;
 
   {
-    const f_status_t status = f_int32s_decimate_by(length, 0);
+    const f_status_t status = f_int32s_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_int32s_decimate_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index ee9a6af92d83aa8326e5c1fb6abf939e1864a4d6..f6e6e0d09131f7c374798529e65b6a7e370c1a05 100644 (file)
 #define _TEST__F_type_array__int32s_decimate_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int32s_decimate_by()
+ * @see f_int32s_decimate_by()
  */
-extern void test__f_type_array_int32s_decimate_by__works(void **state);
+extern void test__f_type_array_int32s_decimate_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int32s_decimate_by()
+ * @see f_int32s_decimate_by()
  */
-extern void test__f_type_array_int32s_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_int32s_decimate_by__works(void **state);
 
 #endif // _TEST__F_type_array__int32s_decimate_by
index 71279a42b8b4ea59c32b7c50e10a1355fb05a751..0eec161426270f547d86836885cfacf60f222f42 100644 (file)
@@ -5,23 +5,15 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int32s_decrease_by__works(void **state) {
+void test__f_type_array_int32s_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_int32s_t data = f_int32s_t_initialize;
 
   {
-    const f_status_t status = f_int32s_resize(length, &data);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_int32s_decrease_by(length, &data);
+    const f_status_t status = f_int32s_decrease_by(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
@@ -29,15 +21,23 @@ void test__f_type_array_int32s_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_int32s_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_int32s_decrease_by__works(void **state) {
 
   const int length = 5;
   f_int32s_t data = f_int32s_t_initialize;
 
   {
-    const f_status_t status = f_int32s_decrease_by(length, 0);
+    const f_status_t status = f_int32s_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_int32s_decrease_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index ed428af5055d49cd8e3be8ba28c207389c5db2d1..93be3e1e0a5d2999c80aeb568bb4c040bea279f2 100644 (file)
 #define _TEST__F_type_array__int32s_decrease_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int32s_decrease_by()
+ * @see f_int32s_decrease_by()
  */
-extern void test__f_type_array_int32s_decrease_by__works(void **state);
+extern void test__f_type_array_int32s_decrease_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int32s_decrease_by()
+ * @see f_int32s_decrease_by()
  */
-extern void test__f_type_array_int32s_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_int32s_decrease_by__works(void **state);
 
 #endif // _TEST__F_type_array__int32s_decrease_by
index a6d40221d45e43c2369bddd194a44c71db33f87f..a21f42bfcb049d206bc68ce6111d1cf12bfbcb8d 100644 (file)
@@ -5,27 +5,17 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int32s_increase__works(void **state) {
+void test__f_type_array_int32s_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_int32s_t data = f_int32s_t_initialize;
 
   {
-    const f_status_t status = f_int32s_resize(length, &data);
+    const f_status_t status = f_int32s_increase(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_int32s_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);
+    assert_int_equal(data.size, 0);
   }
 
   free((void *) data.array);
@@ -55,17 +45,27 @@ void test__f_type_array_int32s_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int32s_increase__parameter_checking(void **state) {
+void test__f_type_array_int32s_increase__works(void **state) {
 
   const int length = 5;
   f_int32s_t data = f_int32s_t_initialize;
 
   {
-    const f_status_t status = f_int32s_increase(length, 0);
+    const f_status_t status = f_int32s_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    data.used = length;
+
+    const f_status_t status = f_int32s_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);
index 7fe8cf58a18efabc42916ec8b1ecadf312f17d41..95ca4c5a73ee515420b24af942039384305c168a 100644 (file)
 #define _TEST__F_type_array__int32s_increase
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int32s_increase()
+ * @see f_int32s_increase()
  */
-extern void test__f_type_array_int32s_increase__works(void **state);
+extern void test__f_type_array_int32s_increase__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_int32s_increase()
+ * @see f_int32s_increase()
  */
 extern void test__f_type_array_int32s_increase__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int32s_increase()
+ * @see f_int32s_increase()
  */
-extern void test__f_type_array_int32s_increase__parameter_checking(void **state);
+extern void test__f_type_array_int32s_increase__works(void **state);
 
 #endif // _TEST__F_type_array__int32s_increase
index c89ce82d71629533be5c8c4c7baa2f53864f6ebd..2f609afecd74df92720798099ec03e86d93c4bf8 100644 (file)
@@ -5,6 +5,22 @@
 extern "C" {
 #endif
 
+void test__f_type_array_int32s_increase_by__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_int32s_t data = f_int32s_t_initialize;
+
+  {
+    const f_status_t status = f_int32s_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_type_array_int32s_increase_by__works(void **state) {
 
   const int length = 5;
@@ -31,22 +47,6 @@ void test__f_type_array_int32s_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int32s_increase_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_int32s_t data = f_int32s_t_initialize;
-
-  {
-    const f_status_t status = f_int32s_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);
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 8be454eb72ccb367f5d6c0e324e79c1976b6c6b3..0f7ea165fa6c5cde6c82b6c94b603d8b29e7fe72 100644 (file)
 #define _TEST__F_type_array__int32s_increase_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int32s_increase_by()
+ * @see f_int32s_increase_by()
  */
-extern void test__f_type_array_int32s_increase_by__works(void **state);
+extern void test__f_type_array_int32s_increase_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int32s_increase_by()
+ * @see f_int32s_increase_by()
  */
-extern void test__f_type_array_int32s_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_int32s_increase_by__works(void **state);
 
 #endif // _TEST__F_type_array__int32s_increase_by
index fdc0204a83a06ae628b993a58f884c1d2ac30ec2..eca19f6e3d5ebd85b4deaae0ddc680990bffd2b6 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int32s_resize__works(void **state) {
+void test__f_type_array_int32s_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_int32s_t data = f_int32s_t_initialize;
 
   {
-    const f_status_t status = f_int32s_resize(length, &data);
+    const f_status_t status = f_int32s_resize(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_int32s_resize__parameter_checking(void **state) {
+void test__f_type_array_int32s_resize__works(void **state) {
 
   const int length = 5;
   f_int32s_t data = f_int32s_t_initialize;
 
   {
-    const f_status_t status = f_int32s_resize(length, 0);
+    const f_status_t status = f_int32s_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index 82f054e11257ea4a96896cf68543e1dc5c60f510..a878c6b43cf9afa0fe1ce4f500e1f79a453f0707 100644 (file)
 #define _TEST__F_type_array__int32s_resize
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int32s_resize()
+ * @see f_int32s_resize()
  */
-extern void test__f_type_array_int32s_resize__works(void **state);
+extern void test__f_type_array_int32s_resize__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int32s_resize()
+ * @see f_int32s_resize()
  */
-extern void test__f_type_array_int32s_resize__parameter_checking(void **state);
+extern void test__f_type_array_int32s_resize__works(void **state);
 
 #endif // _TEST__F_type_array__int32s_resize
index a973a03614438366ade706f094a512fbddacd470..33de3919f3a5d1dbce9a8c47fa6cada65dd1bee8 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int32ss_adjust__works(void **state) {
+void test__f_type_array_int32ss_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_int32ss_t data = f_int32ss_t_initialize;
 
   {
-    const f_status_t status = f_int32ss_adjust(length, &data);
+    const f_status_t status = f_int32ss_adjust(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_int32ss_adjust__parameter_checking(void **state) {
+void test__f_type_array_int32ss_adjust__works(void **state) {
 
   const int length = 5;
   f_int32ss_t data = f_int32ss_t_initialize;
 
   {
-    const f_status_t status = f_int32ss_adjust(length, 0);
+    const f_status_t status = f_int32ss_adjust(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index a105b7bcba270006fd6a5b4b3dc4553eddbd7096..782bbf242e3928686e28dd6b94a92f361c6c5908 100644 (file)
 #define _TEST__F_type_array__int32ss_adjust
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int32ss_adjust()
+ * @see f_int32ss_adjust()
  */
-extern void test__f_type_array_int32ss_adjust__works(void **state);
+extern void test__f_type_array_int32ss_adjust__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int32ss_adjust()
+ * @see f_int32ss_adjust()
  */
-extern void test__f_type_array_int32ss_adjust__parameter_checking(void **state);
+extern void test__f_type_array_int32ss_adjust__works(void **state);
 
 #endif // _TEST__F_type_array__int32ss_adjust
index b4d67f967afdedcaea537b31ecf313613a5fe43b..6f1696bad37d31991133f958d15ef3a4d7984e7a 100644 (file)
@@ -5,7 +5,18 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int32ss_append__works(void **state) {
+void test__f_type_array_int32ss_append__parameter_checking(void **state) {
+
+  f_int32s_t data = f_int32s_t_initialize;
+
+  {
+    const f_status_t status = f_int32ss_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_int32ss_append__returns_data_not(void **state) {
 
   const int length = 5;
   f_int32s_t source = f_int32s_t_initialize;
@@ -19,32 +30,19 @@ void test__f_type_array_int32ss_append__works(void **state) {
     assert_int_equal(source.size, length);
   }
 
-  for (; source.used < length; ++source.used) {
-    source.array[source.used] = source.used + 1;
-  } // for
-
   {
     const f_status_t status = f_int32ss_append(source, &destination);
 
-    assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, 1);
-    assert_int_equal(destination.array[0].used, source.used);
-    assert_int_equal(destination.array[0].size, source.used);
-
-    for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
-      assert_int_equal(destination.array[0].array[i], i + 1);
-    } // for
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
   }
 
-  for (f_array_length_t i = 0; i < destination.used; ++i) {
-    free((void *) destination.array[i].array);
-  } // for
-
   free((void *) source.array);
-  free((void *) destination.array);
 }
 
-void test__f_type_array_int32ss_append__returns_data_not(void **state) {
+void test__f_type_array_int32ss_append__works(void **state) {
 
   const int length = 5;
   f_int32s_t source = f_int32s_t_initialize;
@@ -58,27 +56,29 @@ void test__f_type_array_int32ss_append__returns_data_not(void **state) {
     assert_int_equal(source.size, length);
   }
 
+  for (; source.used < length; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
+
   {
     const f_status_t status = f_int32ss_append(source, &destination);
 
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
-  }
-
-  free((void *) source.array);
-}
-
-void test__f_type_array_int32ss_append__parameter_checking(void **state) {
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0].used, source.used);
+    assert_int_equal(destination.array[0].size, source.used);
 
-  f_int32s_t data = f_int32s_t_initialize;
+    for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
+      assert_int_equal(destination.array[0].array[i], i + 1);
+    } // for
+  }
 
-  {
-    const f_status_t status = f_int32ss_append(data, 0);
+  for (f_array_length_t i = 0; i < destination.used; ++i) {
+    free((void *) destination.array[i].array);
+  } // for
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
+  free((void *) source.array);
+  free((void *) destination.array);
 }
 
 #ifdef __cplusplus
index 5d56e68ab1a892a56caf056a370dd9667dd3cd42..4358695f1854a2d814da4675906ef1ba650ee722 100644 (file)
 #define _TEST__F_type_array__int32ss_append
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int32ss_append()
+ * @see f_int32ss_append()
  */
-extern void test__f_type_array_int32ss_append__works(void **state);
+extern void test__f_type_array_int32ss_append__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_int32ss_append()
+ * @see f_int32ss_append()
  */
 extern void test__f_type_array_int32ss_append__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int32ss_append()
+ * @see f_int32ss_append()
  */
-extern void test__f_type_array_int32ss_append__parameter_checking(void **state);
+extern void test__f_type_array_int32ss_append__works(void **state);
 
 #endif // _TEST__F_type_array__int32ss_append
index c002afaaafb5b1007a1853e80ec112fc099b9a35..f7a5201ea3b97e4fdcf3d55921b2248f38007ae2 100644 (file)
@@ -5,6 +5,43 @@
 extern "C" {
 #endif
 
+void test__f_type_array_int32ss_append_all__parameter_checking(void **state) {
+
+  const f_int32ss_t data = f_int32ss_t_initialize;
+
+  {
+    const f_status_t status = f_int32ss_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_int32ss_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_int32ss_t source = f_int32ss_t_initialize;
+  f_int32ss_t destination = f_int32ss_t_initialize;
+
+  {
+    const f_status_t status = f_int32ss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_int32ss_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
 void test__f_type_array_int32ss_append_all__works(void **state) {
 
   const int length = 5;
@@ -63,43 +100,6 @@ void test__f_type_array_int32ss_append_all__works(void **state) {
   free((void *) destination.array);
 }
 
-void test__f_type_array_int32ss_append_all__returns_data_not(void **state) {
-
-  const int length = 5;
-  f_int32ss_t source = f_int32ss_t_initialize;
-  f_int32ss_t destination = f_int32ss_t_initialize;
-
-  {
-    const f_status_t status = f_int32ss_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  {
-    const f_status_t status = f_int32ss_append_all(source, &destination);
-
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
-  }
-
-  free((void *) source.array);
-}
-
-void test__f_type_array_int32ss_append_all__parameter_checking(void **state) {
-
-  const f_int32ss_t data = f_int32ss_t_initialize;
-
-  {
-    const f_status_t status = f_int32ss_append_all(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 8aaeae7ac60e112c5e0fdfd680d2d0d656317155..66b63aa1d06c3ff2fad387b3cec89d2f06d97c42 100644 (file)
 #define _TEST__F_type_array__int32ss_append_all
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int32ss_append_all()
+ * @see f_int32ss_append_all()
  */
-extern void test__f_type_array_int32ss_append_all__works(void **state);
+extern void test__f_type_array_int32ss_append_all__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_int32ss_append_all()
+ * @see f_int32ss_append_all()
  */
 extern void test__f_type_array_int32ss_append_all__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int32ss_append_all()
+ * @see f_int32ss_append_all()
  */
-extern void test__f_type_array_int32ss_append_all__parameter_checking(void **state);
+extern void test__f_type_array_int32ss_append_all__works(void **state);
 
 #endif // _TEST__F_type_array__int32ss_append_all
index 0fdb7e553b0a4901823fd88af40a4c6544df3033..2b16cc73faff8ce55800b75c504f378788df7e0b 100644 (file)
@@ -5,10 +5,26 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int32ss_decimate_by__works(void **state) {
+void test__f_type_array_int32ss_decimate_by__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_int32ss_t data = f_int32ss_t_initialize;
+
+  {
+    const f_status_t status = f_int32ss_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_type_array_int32ss_decimate_by__returns_data_not(void **state) {
 
   const int length = 5;
-  f_int32ss_t data = f_int32s_t_initialize;
+  f_int32ss_t data = f_int32ss_t_initialize;
 
   {
     const f_status_t status = f_int32ss_resize(length, &data);
@@ -19,25 +35,33 @@ void test__f_type_array_int32ss_decimate_by__works(void **state) {
   }
 
   {
-    const f_status_t status = f_int32ss_decimate_by(length, &data);
+    const f_status_t status = f_int32ss_decimate_by(0, &data);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_data_not);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
-void test__f_type_array_int32ss_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_int32ss_decimate_by__works(void **state) {
 
   const int length = 5;
-  f_int32ss_t data = f_int32s_t_initialize;
+  f_int32ss_t data = f_int32ss_t_initialize;
 
   {
-    const f_status_t status = f_int32ss_decimate_by(length, 0);
+    const f_status_t status = f_int32ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_int32ss_decimate_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index 2fc576de988855f4d86fe21e710564423d7f6dec..ac363c4f07f2115a162a76e27c1821cf184b65da 100644 (file)
 #define _TEST__F_type_array__int32ss_decimate_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int32ss_decimate_by()
+ * @see f_int32ss_decimate_by()
  */
-extern void test__f_type_array_int32ss_decimate_by__works(void **state);
+extern void test__f_type_array_int32ss_decimate_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
  * @see f_type_array_int32ss_decimate_by()
  */
-extern void test__f_type_array_int32ss_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_int32ss_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int32ss_decimate_by()
+ */
+extern void test__f_type_array_int32ss_decimate_by__works(void **state);
 
 #endif // _TEST__F_type_array__int32ss_decimate_by
index 99a08265dd08b01fde92a0fb401584e2b84d0cd7..575bd125d282d0ec03bc4651cbbf4e902477a3e8 100644 (file)
@@ -5,10 +5,26 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int32ss_decrease_by__works(void **state) {
+void test__f_type_array_int32ss_decrease_by__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_int32ss_t data = f_int32ss_t_initialize;
+
+  {
+    const f_status_t status = f_int32ss_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_type_array_int32ss_decrease_by__returns_data_not(void **state) {
 
   const int length = 5;
-  f_int32ss_t data = f_int32s_t_initialize;
+  f_int32ss_t data = f_int32ss_t_initialize;
 
   {
     const f_status_t status = f_int32ss_resize(length, &data);
@@ -19,25 +35,33 @@ void test__f_type_array_int32ss_decrease_by__works(void **state) {
   }
 
   {
-    const f_status_t status = f_int32ss_decrease_by(length, &data);
+    const f_status_t status = f_int32ss_decrease_by(0, &data);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_data_not);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
-void test__f_type_array_int32ss_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_int32ss_decrease_by__works(void **state) {
 
   const int length = 5;
-  f_int32ss_t data = f_int32s_t_initialize;
+  f_int32ss_t data = f_int32ss_t_initialize;
 
   {
-    const f_status_t status = f_int32ss_decrease_by(length, 0);
+    const f_status_t status = f_int32ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_int32ss_decrease_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index 9fa824773b9bf4cab2cffdf5c1e99400f2f497fa..186c1da5dbaa91cdbb73222f17afe3d1758fca06 100644 (file)
 #define _TEST__F_type_array__int32ss_decrease_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int32ss_decrease_by()
+ * @see f_int32ss_decrease_by()
  */
-extern void test__f_type_array_int32ss_decrease_by__works(void **state);
+extern void test__f_type_array_int32ss_decrease_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_int32ss_decrease_by()
+ * @see f_int32ss_decrease_by()
  */
-extern void test__f_type_array_int32ss_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_int32ss_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int32ss_decrease_by()
+ */
+extern void test__f_type_array_int32ss_decrease_by__works(void **state);
 
 #endif // _TEST__F_type_array__int32ss_decrease_by
index a3160a470c7099f0c7f23848b5245cac4def0950..cf6c38109a75f7a66ba2e4c3c137b7b82ea12fed 100644 (file)
@@ -5,27 +5,17 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int32ss_increase__works(void **state) {
+void test__f_type_array_int32ss_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_int32ss_t data = f_int32s_t_initialize;
 
   {
-    const f_status_t status = f_int32ss_resize(length, &data);
+    const f_status_t status = f_int32ss_increase(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_int32ss_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);
+    assert_int_equal(data.size, 0);
   }
 
   free((void *) data.array);
@@ -34,7 +24,7 @@ void test__f_type_array_int32ss_increase__works(void **state) {
 void test__f_type_array_int32ss_increase__returns_data_not(void **state) {
 
   const int length = 5;
-  f_int32ss_t data = f_int32s_t_initialize;
+  f_int32ss_t data = f_int32ss_t_initialize;
 
   {
     const f_status_t status = f_int32ss_resize(length, &data);
@@ -55,17 +45,27 @@ void test__f_type_array_int32ss_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int32ss_increase__parameter_checking(void **state) {
+void test__f_type_array_int32ss_increase__works(void **state) {
 
   const int length = 5;
-  f_int32ss_t data = f_int32s_t_initialize;
+  f_int32ss_t data = f_int32ss_t_initialize;
 
   {
-    const f_status_t status = f_int32ss_increase(length, 0);
+    const f_status_t status = f_int32ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    data.used = length;
+
+    const f_status_t status = f_int32ss_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);
index ae844df2df9b3e43369b67b6d66e32a30cb68021..38440e7114985465c1ec7dc56897e5efe349b416 100644 (file)
 #define _TEST__F_type_array__int32ss_increase
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int32ss_increase()
+ * @see f_int32ss_increase()
  */
-extern void test__f_type_array_int32ss_increase__works(void **state);
+extern void test__f_type_array_int32ss_increase__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_int32ss_increase()
+ * @see f_int32ss_increase()
  */
 extern void test__f_type_array_int32ss_increase__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int32ss_increase()
+ * @see f_int32ss_increase()
  */
-extern void test__f_type_array_int32ss_increase__parameter_checking(void **state);
+extern void test__f_type_array_int32ss_increase__works(void **state);
 
 #endif // _TEST__F_type_array__int32ss_increase
index 47f49fddb1272f56a6fbbff71eb7672555a1116e..ac607fae7dbb165bc563db7bd94743a752ba9b1a 100644 (file)
@@ -5,10 +5,26 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int32ss_increase_by__works(void **state) {
+void test__f_type_array_int32ss_increase_by__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_int32ss_t data = f_int32ss_t_initialize;
+
+  {
+    const f_status_t status = f_int32ss_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_type_array_int32ss_increase_by__returns_data_not(void **state) {
 
   const int length = 5;
-  f_int32ss_t data = f_int32s_t_initialize;
+  f_int32ss_t data = f_int32ss_t_initialize;
 
   {
     const f_status_t status = f_int32ss_resize(length, &data);
@@ -19,32 +35,48 @@ void test__f_type_array_int32ss_increase_by__works(void **state) {
   }
 
   {
-    data.used = length;
+    const f_status_t status = f_int32ss_increase_by(0, &data);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
 
+  {
     const f_status_t status = f_int32ss_increase_by(length, &data);
 
-    assert_int_equal(status, F_none);
-    assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
   }
 
   free((void *) data.array);
 }
 
-void test__f_type_array_int32ss_increase_by__parameter_checking(void **state) {
+void test__f_type_array_int32ss_increase_by__works(void **state) {
 
   const int length = 5;
-  f_int32ss_t data = f_int32s_t_initialize;
+  f_int32ss_t data = f_int32ss_t_initialize;
 
   {
-    const f_status_t status = f_int32ss_increase_by(length, 0);
+    const f_status_t status = f_int32ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  {
+    data.used = length;
+
+    const f_status_t status = f_int32ss_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
index e2ec6e57e58ae081850bc348f1d85a115234ac6a..f89d2d1f933391ed0ce05bbfa72115f515ddf028 100644 (file)
 #define _TEST__F_type_array__int32ss_increase_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int32ss_increase_by()
+ * @see f_int32ss_increase_by()
  */
-extern void test__f_type_array_int32ss_increase_by__works(void **state);
+extern void test__f_type_array_int32ss_increase_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_int32ss_increase_by()
+ * @see f_int32ss_increase_by()
  */
-extern void test__f_type_array_int32ss_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_int32ss_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int32ss_increase_by()
+ */
+extern void test__f_type_array_int32ss_increase_by__works(void **state);
 
 #endif // _TEST__F_type_array__int32ss_increase_by
index c53d81e549982c1dbc99e18d06dc6a9ee3a161c6..64b38cfbb8f29169daf95ac14e102b93d1528f7b 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int32ss_resize__works(void **state) {
+void test__f_type_array_int32ss_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_int32ss_t data = f_int32ss_t_initialize;
 
   {
-    const f_status_t status = f_int32ss_resize(length, &data);
+    const f_status_t status = f_int32ss_resize(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_int32ss_resize__parameter_checking(void **state) {
+void test__f_type_array_int32ss_resize__works(void **state) {
 
   const int length = 5;
   f_int32ss_t data = f_int32ss_t_initialize;
 
   {
-    const f_status_t status = f_int32ss_resize(length, 0);
+    const f_status_t status = f_int32ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index 32e26a829b9e807d40f636fae266cf96eb8751cf..1a5aa0736cfac87e3c14b1eb1d7372c446c5efd7 100644 (file)
 #define _TEST__F_type_array__int32ss_resize
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int32ss_resize()
+ * @see f_int32ss_resize()
  */
-extern void test__f_type_array_int32ss_resize__works(void **state);
+extern void test__f_type_array_int32ss_resize__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int32ss_resize()
+ * @see f_int32ss_resize()
  */
-extern void test__f_type_array_int32ss_resize__parameter_checking(void **state);
+extern void test__f_type_array_int32ss_resize__works(void **state);
 
 #endif // _TEST__F_type_array__int32ss_resize
index 252565b07bd5cbd0684d181a4befea96bbad3bbb..5e0237e1d2fd7afb1fddbfbff2c4129d2f0684f4 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int64s_adjust__works(void **state) {
+void test__f_type_array_int64s_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_int64s_t data = f_int64s_t_initialize;
 
   {
-    const f_status_t status = f_int64s_adjust(length, &data);
+    const f_status_t status = f_int64s_adjust(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_int64s_adjust__parameter_checking(void **state) {
+void test__f_type_array_int64s_adjust__works(void **state) {
 
   const int length = 5;
   f_int64s_t data = f_int64s_t_initialize;
 
   {
-    const f_status_t status = f_int64s_adjust(length, 0);
+    const f_status_t status = f_int64s_adjust(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index fca10f459a50acb4b7936f46ec579e3692668c24..e9b25fa68d56b306e991b6b1a9c2a0fd880346c3 100644 (file)
 #define _TEST__F_type_array__int64s_adjust
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int64s_adjust()
+ * @see f_int64s_adjust()
  */
-extern void test__f_type_array_int64s_adjust__works(void **state);
+extern void test__f_type_array_int64s_adjust__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int64s_adjust()
+ * @see f_int64s_adjust()
  */
-extern void test__f_type_array_int64s_adjust__parameter_checking(void **state);
+extern void test__f_type_array_int64s_adjust__works(void **state);
 
 #endif // _TEST__F_type_array__int64s_adjust
index 2515eeb303431180dd313c8d7361e78cd5fb582f..0600e9d91543a130506abc0febec29dc726b884d 100644 (file)
@@ -5,6 +5,17 @@
 extern "C" {
 #endif
 
+void test__f_type_array_int64s_append__parameter_checking(void **state) {
+
+  const int64_t data = 0;
+
+  {
+    const f_status_t status = f_int64s_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
 void test__f_type_array_int64s_append__works(void **state) {
 
   const int64_t source = 3;
@@ -21,17 +32,6 @@ void test__f_type_array_int64s_append__works(void **state) {
   free((void *) destination.array);
 }
 
-void test__f_type_array_int64s_append__parameter_checking(void **state) {
-
-  const uint64_t data = 0;
-
-  {
-    const f_status_t status = f_int64s_append(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 050b258d0eac19945cfa4a64860071f915dd838c..73de0dc803f2a603ac8014c12a07590b72a301a4 100644 (file)
 #define _TEST__F_type_array__int64s_append
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int64s_append()
+ * @see f_int64s_append()
  */
-extern void test__f_type_array_int64s_append__works(void **state);
+extern void test__f_type_array_int64s_append__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int64s_append()
+ * @see f_int64s_append()
  */
-extern void test__f_type_array_int64s_append__parameter_checking(void **state);
+extern void test__f_type_array_int64s_append__works(void **state);
 
 #endif // _TEST__F_type_array__int64s_append
index dae1f313e754e8e485895129693231609e209032..90183c999ce8b883e61d6bb12f67a4eeebe1e686 100644 (file)
@@ -5,10 +5,20 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int64s_append_all__works(void **state) {
+void test__f_type_array_int64s_append_all__parameter_checking(void **state) {
+
+  const f_int64s_t data = f_int64s_t_initialize;
+
+  {
+    const f_status_t status = f_int64s_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_int64s_append_all__returns_data_not(void **state) {
 
   const int length = 5;
-  const int length_used = 2;
   f_int64s_t source = f_int64s_t_initialize;
   f_int64s_t destination = f_int64s_t_initialize;
 
@@ -20,29 +30,22 @@ void test__f_type_array_int64s_append_all__works(void **state) {
     assert_int_equal(source.size, length);
   }
 
-  for (; source.used < length_used; ++source.used) {
-    source.array[source.used] = source.used + 1;
-  } // for
-
   {
     const f_status_t status = f_int64s_append_all(source, &destination);
 
-    assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
-
-    for (f_array_length_t i = 0; i < source.used; ++i) {
-      assert_int_equal(destination.array[i], i + 1);
-    } // for
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
   }
 
   free((void *) source.array);
-  free((void *) destination.array);
 }
 
-void test__f_type_array_int64s_append_all__returns_data_not(void **state) {
+void test__f_type_array_int64s_append_all__works(void **state) {
 
   const int length = 5;
+  const int length_used = 2;
   f_int64s_t source = f_int64s_t_initialize;
   f_int64s_t destination = f_int64s_t_initialize;
 
@@ -54,27 +57,24 @@ void test__f_type_array_int64s_append_all__returns_data_not(void **state) {
     assert_int_equal(source.size, length);
   }
 
+  for (; source.used < length_used; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
+
   {
     const f_status_t status = f_int64s_append_all(source, &destination);
 
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < source.used; ++i) {
+      assert_int_equal(destination.array[i], i + 1);
+    } // for
   }
 
   free((void *) source.array);
-}
-
-void test__f_type_array_int64s_append_all__parameter_checking(void **state) {
-
-  const f_int64s_t data = f_int64s_t_initialize;
-
-  {
-    const f_status_t status = f_int64s_append_all(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
+  free((void *) destination.array);
 }
 
 #ifdef __cplusplus
index ae20d0cd1461c6ce1a1a193108afb8d25262da0f..3171f1cc78c85e76770ffc09fdc121bb0246ed54 100644 (file)
 #define _TEST__F_type_array__int64s_append_all
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int64s_append_all()
+ * @see f_int64s_append_all()
  */
-extern void test__f_type_array_int64s_append_all__works(void **state);
+extern void test__f_type_array_int64s_append_all__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_int64s_append_all()
+ * @see f_int64s_append_all()
  */
 extern void test__f_type_array_int64s_append_all__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int64s_append_all()
+ * @see f_int64s_append_all()
  */
-extern void test__f_type_array_int64s_append_all__parameter_checking(void **state);
+extern void test__f_type_array_int64s_append_all__works(void **state);
 
 #endif // _TEST__F_type_array__int64s_append_all
index 18cb0f7aacf92d80a55c2b987f54dce663c850e9..a5be8d892df05e56015b2080fc011c88f861d521 100644 (file)
@@ -5,23 +5,15 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int64s_decimate_by__works(void **state) {
+void test__f_type_array_int64s_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_int64s_t data = f_int64s_t_initialize;
 
   {
-    const f_status_t status = f_int64s_resize(length, &data);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_int64s_decimate_by(length, &data);
+    const f_status_t status = f_int64s_decimate_by(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
@@ -29,15 +21,23 @@ void test__f_type_array_int64s_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_int64s_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_int64s_decimate_by__works(void **state) {
 
   const int length = 5;
   f_int64s_t data = f_int64s_t_initialize;
 
   {
-    const f_status_t status = f_int64s_decimate_by(length, 0);
+    const f_status_t status = f_int64s_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_int64s_decimate_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index 3cd695b6bec82b4f86ba29476a03f7b1536f2931..feeb67da04f19c981a3425236dd8e351d8f81011 100644 (file)
 #define _TEST__F_type_array__int64s_decimate_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int64s_decimate_by()
+ * @see f_int64s_decimate_by()
  */
-extern void test__f_type_array_int64s_decimate_by__works(void **state);
+extern void test__f_type_array_int64s_decimate_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int64s_decimate_by()
+ * @see f_int64s_decimate_by()
  */
-extern void test__f_type_array_int64s_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_int64s_decimate_by__works(void **state);
 
 #endif // _TEST__F_type_array__int64s_decimate_by
index 93d4de8a6c55baefd29b3699d01e69e5b5fd8366..581f31ec1b8c527a0162cfdd741f00b6b1dca9fc 100644 (file)
@@ -5,23 +5,15 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int64s_decrease_by__works(void **state) {
+void test__f_type_array_int64s_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_int64s_t data = f_int64s_t_initialize;
 
   {
-    const f_status_t status = f_int64s_resize(length, &data);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_int64s_decrease_by(length, &data);
+    const f_status_t status = f_int64s_decrease_by(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
@@ -29,15 +21,23 @@ void test__f_type_array_int64s_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_int64s_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_int64s_decrease_by__works(void **state) {
 
   const int length = 5;
   f_int64s_t data = f_int64s_t_initialize;
 
   {
-    const f_status_t status = f_int64s_decrease_by(length, 0);
+    const f_status_t status = f_int64s_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_int64s_decrease_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index 9f7fcdc0f7eaa32b1dd95d614141a212b64b0c74..4c3511cc8b7c0b4b04dedc65ffa9a7a7e2a0f715 100644 (file)
 #define _TEST__F_type_array__int64s_decrease_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int64s_decrease_by()
+ * @see f_int64s_decrease_by()
  */
-extern void test__f_type_array_int64s_decrease_by__works(void **state);
+extern void test__f_type_array_int64s_decrease_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int64s_decrease_by()
+ * @see f_int64s_decrease_by()
  */
-extern void test__f_type_array_int64s_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_int64s_decrease_by__works(void **state);
 
 #endif // _TEST__F_type_array__int64s_decrease_by
index 2aaf4f5d184b6ed5d782d22019b441801cd7e1f3..bd4cab60d98dfad1bb20762c9bf8c48d4a1deda2 100644 (file)
@@ -5,27 +5,17 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int64s_increase__works(void **state) {
+void test__f_type_array_int64s_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_int64s_t data = f_int64s_t_initialize;
 
   {
-    const f_status_t status = f_int64s_resize(length, &data);
+    const f_status_t status = f_int64s_increase(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_int64s_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);
+    assert_int_equal(data.size, 0);
   }
 
   free((void *) data.array);
@@ -55,17 +45,27 @@ void test__f_type_array_int64s_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int64s_increase__parameter_checking(void **state) {
+void test__f_type_array_int64s_increase__works(void **state) {
 
   const int length = 5;
   f_int64s_t data = f_int64s_t_initialize;
 
   {
-    const f_status_t status = f_int64s_increase(length, 0);
+    const f_status_t status = f_int64s_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    data.used = length;
+
+    const f_status_t status = f_int64s_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);
index ec62ee03146f4dec04d36585628898877ed9410d..be94a2b42e5d4901b37c3eb439255c50071beff9 100644 (file)
 #define _TEST__F_type_array__int64s_increase
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int64s_increase()
+ * @see f_int64s_increase()
  */
-extern void test__f_type_array_int64s_increase__works(void **state);
+extern void test__f_type_array_int64s_increase__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_int64s_increase()
+ * @see f_int64s_increase()
  */
 extern void test__f_type_array_int64s_increase__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int64s_increase()
+ * @see f_int64s_increase()
  */
-extern void test__f_type_array_int64s_increase__parameter_checking(void **state);
+extern void test__f_type_array_int64s_increase__works(void **state);
 
 #endif // _TEST__F_type_array__int64s_increase
index 77493005409c96a176dd4fc5660e291af4c28ed7..2ce8ad6221a5e4ab45b6934fac7fa8c33468dc2a 100644 (file)
@@ -5,6 +5,22 @@
 extern "C" {
 #endif
 
+void test__f_type_array_int64s_increase_by__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_int64s_t data = f_int64s_t_initialize;
+
+  {
+    const f_status_t status = f_int64s_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_type_array_int64s_increase_by__works(void **state) {
 
   const int length = 5;
@@ -31,22 +47,6 @@ void test__f_type_array_int64s_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int64s_increase_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_int64s_t data = f_int64s_t_initialize;
-
-  {
-    const f_status_t status = f_int64s_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);
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index f8bd91a3e1902a3b59496e2ea15686610ba455f2..fa02badb9f3262ff013cb98bd1abb96520584880 100644 (file)
 #define _TEST__F_type_array__int64s_increase_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int64s_increase_by()
+ * @see f_int64s_increase_by()
  */
-extern void test__f_type_array_int64s_increase_by__works(void **state);
+extern void test__f_type_array_int64s_increase_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int64s_increase_by()
+ * @see f_int64s_increase_by()
  */
-extern void test__f_type_array_int64s_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_int64s_increase_by__works(void **state);
 
 #endif // _TEST__F_type_array__int64s_increase_by
index f2cf58d1b4307e5387b170d0d790451cdd87200f..1286b86f545429c1b733fbb0fa04f4020bcd99e4 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int64s_resize__works(void **state) {
+void test__f_type_array_int64s_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_int64s_t data = f_int64s_t_initialize;
 
   {
-    const f_status_t status = f_int64s_resize(length, &data);
+    const f_status_t status = f_int64s_resize(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_int64s_resize__parameter_checking(void **state) {
+void test__f_type_array_int64s_resize__works(void **state) {
 
   const int length = 5;
   f_int64s_t data = f_int64s_t_initialize;
 
   {
-    const f_status_t status = f_int64s_resize(length, 0);
+    const f_status_t status = f_int64s_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index 7de48761d67d9e675b4f1dbf205999bfbf38bbac..e4b5604c8db0e4cf2bed0dca667412d452e3861f 100644 (file)
 #define _TEST__F_type_array__int64s_resize
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int64s_resize()
+ * @see f_int64s_resize()
  */
-extern void test__f_type_array_int64s_resize__works(void **state);
+extern void test__f_type_array_int64s_resize__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int64s_resize()
+ * @see f_int64s_resize()
  */
-extern void test__f_type_array_int64s_resize__parameter_checking(void **state);
+extern void test__f_type_array_int64s_resize__works(void **state);
 
 #endif // _TEST__F_type_array__int64s_resize
index 5bb533e85e45175547a07b3084c526e9282717f4..92a11fa3eadd04cdfef69973ca23c85840f5bcb6 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int64ss_adjust__works(void **state) {
+void test__f_type_array_int64ss_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_int64ss_t data = f_int64ss_t_initialize;
 
   {
-    const f_status_t status = f_int64ss_adjust(length, &data);
+    const f_status_t status = f_int64ss_adjust(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_int64ss_adjust__parameter_checking(void **state) {
+void test__f_type_array_int64ss_adjust__works(void **state) {
 
   const int length = 5;
   f_int64ss_t data = f_int64ss_t_initialize;
 
   {
-    const f_status_t status = f_int64ss_adjust(length, 0);
+    const f_status_t status = f_int64ss_adjust(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index af3236440cfa77b3809a646fe5e051433b658282..8b269268f450e7440f359be6398a1032dcccabd8 100644 (file)
 #define _TEST__F_type_array__int64ss_adjust
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int64ss_adjust()
+ * @see f_int64ss_adjust()
  */
-extern void test__f_type_array_int64ss_adjust__works(void **state);
+extern void test__f_type_array_int64ss_adjust__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int64ss_adjust()
+ * @see f_int64ss_adjust()
  */
-extern void test__f_type_array_int64ss_adjust__parameter_checking(void **state);
+extern void test__f_type_array_int64ss_adjust__works(void **state);
 
 #endif // _TEST__F_type_array__int64ss_adjust
index f0bba2e0e4d2f974ee65d5deddceaba116562a9d..c69dc5a5a3e61ce204b996839004859f230d3107 100644 (file)
@@ -5,7 +5,18 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int64ss_append__works(void **state) {
+void test__f_type_array_int64ss_append__parameter_checking(void **state) {
+
+  f_int64s_t data = f_int64s_t_initialize;
+
+  {
+    const f_status_t status = f_int64ss_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_int64ss_append__returns_data_not(void **state) {
 
   const int length = 5;
   f_int64s_t source = f_int64s_t_initialize;
@@ -19,32 +30,19 @@ void test__f_type_array_int64ss_append__works(void **state) {
     assert_int_equal(source.size, length);
   }
 
-  for (; source.used < length; ++source.used) {
-    source.array[source.used] = source.used + 1;
-  } // for
-
   {
     const f_status_t status = f_int64ss_append(source, &destination);
 
-    assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, 1);
-    assert_int_equal(destination.array[0].used, source.used);
-    assert_int_equal(destination.array[0].size, source.used);
-
-    for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
-      assert_int_equal(destination.array[0].array[i], i + 1);
-    } // for
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
   }
 
-  for (f_array_length_t i = 0; i < destination.used; ++i) {
-    free((void *) destination.array[i].array);
-  } // for
-
   free((void *) source.array);
-  free((void *) destination.array);
 }
 
-void test__f_type_array_int64ss_append__returns_data_not(void **state) {
+void test__f_type_array_int64ss_append__works(void **state) {
 
   const int length = 5;
   f_int64s_t source = f_int64s_t_initialize;
@@ -58,27 +56,29 @@ void test__f_type_array_int64ss_append__returns_data_not(void **state) {
     assert_int_equal(source.size, length);
   }
 
+  for (; source.used < length; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
+
   {
     const f_status_t status = f_int64ss_append(source, &destination);
 
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
-  }
-
-  free((void *) source.array);
-}
-
-void test__f_type_array_int64ss_append__parameter_checking(void **state) {
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0].used, source.used);
+    assert_int_equal(destination.array[0].size, source.used);
 
-  f_int64s_t data = f_int64s_t_initialize;
+    for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
+      assert_int_equal(destination.array[0].array[i], i + 1);
+    } // for
+  }
 
-  {
-    const f_status_t status = f_int64ss_append(data, 0);
+  for (f_array_length_t i = 0; i < destination.used; ++i) {
+    free((void *) destination.array[i].array);
+  } // for
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
+  free((void *) source.array);
+  free((void *) destination.array);
 }
 
 #ifdef __cplusplus
index 69065b9b5a8d711bbd23e91a35ee33c18e1ae6d3..d60a6e93b9070da555cee75d0f1c7c6d9e10e727 100644 (file)
 #define _TEST__F_type_array__int64ss_append
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int64ss_append()
+ * @see f_int64ss_append()
  */
-extern void test__f_type_array_int64ss_append__works(void **state);
+extern void test__f_type_array_int64ss_append__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_int64ss_append()
+ * @see f_int64ss_append()
  */
 extern void test__f_type_array_int64ss_append__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int64ss_append()
+ * @see f_int64ss_append()
  */
-extern void test__f_type_array_int64ss_append__parameter_checking(void **state);
+extern void test__f_type_array_int64ss_append__works(void **state);
 
 #endif // _TEST__F_type_array__int64ss_append
index bd4b6672d73e96306a8b1a0b80c3a5036d3e7adc..f2f53e6b3e464fc4bfca9f5f936fe36b21cdb91a 100644 (file)
@@ -5,6 +5,43 @@
 extern "C" {
 #endif
 
+void test__f_type_array_int64ss_append_all__parameter_checking(void **state) {
+
+  const f_int64ss_t data = f_int64ss_t_initialize;
+
+  {
+    const f_status_t status = f_int64ss_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_int64ss_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_int64ss_t source = f_int64ss_t_initialize;
+  f_int64ss_t destination = f_int64ss_t_initialize;
+
+  {
+    const f_status_t status = f_int64ss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_int64ss_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
 void test__f_type_array_int64ss_append_all__works(void **state) {
 
   const int length = 5;
@@ -63,43 +100,6 @@ void test__f_type_array_int64ss_append_all__works(void **state) {
   free((void *) destination.array);
 }
 
-void test__f_type_array_int64ss_append_all__returns_data_not(void **state) {
-
-  const int length = 5;
-  f_int64ss_t source = f_int64ss_t_initialize;
-  f_int64ss_t destination = f_int64ss_t_initialize;
-
-  {
-    const f_status_t status = f_int64ss_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  {
-    const f_status_t status = f_int64ss_append_all(source, &destination);
-
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
-  }
-
-  free((void *) source.array);
-}
-
-void test__f_type_array_int64ss_append_all__parameter_checking(void **state) {
-
-  const f_int64ss_t data = f_int64ss_t_initialize;
-
-  {
-    const f_status_t status = f_int64ss_append_all(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 6052ec529dc0ae044a4632b87b4aab87686ac909..abc9284c16719bd70b464a21d3a2a72e1c748907 100644 (file)
 #define _TEST__F_type_array__int64ss_append_all
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int64ss_append_all()
+ * @see f_int64ss_append_all()
  */
-extern void test__f_type_array_int64ss_append_all__works(void **state);
+extern void test__f_type_array_int64ss_append_all__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_int64ss_append_all()
+ * @see f_int64ss_append_all()
  */
 extern void test__f_type_array_int64ss_append_all__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int64ss_append_all()
+ * @see f_int64ss_append_all()
  */
-extern void test__f_type_array_int64ss_append_all__parameter_checking(void **state);
+extern void test__f_type_array_int64ss_append_all__works(void **state);
 
 #endif // _TEST__F_type_array__int64ss_append_all
index 03567e8e9736f3c4a9659cd7a83a77ae5ce74d4e..cf0e34d995a614d006282055a776a4c79b310f7a 100644 (file)
@@ -5,10 +5,26 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int64ss_decimate_by__works(void **state) {
+void test__f_type_array_int64ss_decimate_by__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_int64ss_t data = f_int64ss_t_initialize;
+
+  {
+    const f_status_t status = f_int64ss_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_type_array_int64ss_decimate_by__returns_data_not(void **state) {
 
   const int length = 5;
-  f_int64ss_t data = f_int64s_t_initialize;
+  f_int64ss_t data = f_int64ss_t_initialize;
 
   {
     const f_status_t status = f_int64ss_resize(length, &data);
@@ -19,25 +35,33 @@ void test__f_type_array_int64ss_decimate_by__works(void **state) {
   }
 
   {
-    const f_status_t status = f_int64ss_decimate_by(length, &data);
+    const f_status_t status = f_int64ss_decimate_by(0, &data);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_data_not);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
-void test__f_type_array_int64ss_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_int64ss_decimate_by__works(void **state) {
 
   const int length = 5;
-  f_int64ss_t data = f_int64s_t_initialize;
+  f_int64ss_t data = f_int64ss_t_initialize;
 
   {
-    const f_status_t status = f_int64ss_decimate_by(length, 0);
+    const f_status_t status = f_int64ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_int64ss_decimate_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index a813fff39ea91e6917ffab6a06df16810b43818d..00445e73c50e75eea2513ef2bdf6bbf13f4e3ec6 100644 (file)
 #define _TEST__F_type_array__int64ss_decimate_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int64ss_decimate_by()
+ * @see f_int64ss_decimate_by()
  */
-extern void test__f_type_array_int64ss_decimate_by__works(void **state);
+extern void test__f_type_array_int64ss_decimate_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
  * @see f_type_array_int64ss_decimate_by()
  */
-extern void test__f_type_array_int64ss_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_int64ss_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int64ss_decimate_by()
+ */
+extern void test__f_type_array_int64ss_decimate_by__works(void **state);
 
 #endif // _TEST__F_type_array__int64ss_decimate_by
index f2909c013e8e871c8e788149a74e8b34cb1e8305..d93f5e2f78339658376e2dfa26740e4c2b2a60af 100644 (file)
@@ -5,10 +5,26 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int64ss_decrease_by__works(void **state) {
+void test__f_type_array_int64ss_decrease_by__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_int64ss_t data = f_int64ss_t_initialize;
+
+  {
+    const f_status_t status = f_int64ss_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_type_array_int64ss_decrease_by__returns_data_not(void **state) {
 
   const int length = 5;
-  f_int64ss_t data = f_int64s_t_initialize;
+  f_int64ss_t data = f_int64ss_t_initialize;
 
   {
     const f_status_t status = f_int64ss_resize(length, &data);
@@ -19,25 +35,33 @@ void test__f_type_array_int64ss_decrease_by__works(void **state) {
   }
 
   {
-    const f_status_t status = f_int64ss_decrease_by(length, &data);
+    const f_status_t status = f_int64ss_decrease_by(0, &data);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_data_not);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
-void test__f_type_array_int64ss_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_int64ss_decrease_by__works(void **state) {
 
   const int length = 5;
-  f_int64ss_t data = f_int64s_t_initialize;
+  f_int64ss_t data = f_int64ss_t_initialize;
 
   {
-    const f_status_t status = f_int64ss_decrease_by(length, 0);
+    const f_status_t status = f_int64ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_int64ss_decrease_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index 966ce27ca2b13c5f10acd6b65d5baba219c04224..b3186818831ae3870dc7953559c126ed8bd2125d 100644 (file)
 #define _TEST__F_type_array__int64ss_decrease_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int64ss_decrease_by()
+ * @see f_int64ss_decrease_by()
  */
-extern void test__f_type_array_int64ss_decrease_by__works(void **state);
+extern void test__f_type_array_int64ss_decrease_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_int64ss_decrease_by()
+ * @see f_int64ss_decrease_by()
  */
-extern void test__f_type_array_int64ss_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_int64ss_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int64ss_decrease_by()
+ */
+extern void test__f_type_array_int64ss_decrease_by__works(void **state);
 
 #endif // _TEST__F_type_array__int64ss_decrease_by
index b0e705438f92eb10c3d9f0c2f1173d3a579f9f27..f2521343ffcd2b1763aaf02b5101d39059d71b60 100644 (file)
@@ -5,27 +5,17 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int64ss_increase__works(void **state) {
+void test__f_type_array_int64ss_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_int64ss_t data = f_int64s_t_initialize;
 
   {
-    const f_status_t status = f_int64ss_resize(length, &data);
+    const f_status_t status = f_int64ss_increase(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_int64ss_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);
+    assert_int_equal(data.size, 0);
   }
 
   free((void *) data.array);
@@ -34,7 +24,7 @@ void test__f_type_array_int64ss_increase__works(void **state) {
 void test__f_type_array_int64ss_increase__returns_data_not(void **state) {
 
   const int length = 5;
-  f_int64ss_t data = f_int64s_t_initialize;
+  f_int64ss_t data = f_int64ss_t_initialize;
 
   {
     const f_status_t status = f_int64ss_resize(length, &data);
@@ -55,17 +45,27 @@ void test__f_type_array_int64ss_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int64ss_increase__parameter_checking(void **state) {
+void test__f_type_array_int64ss_increase__works(void **state) {
 
   const int length = 5;
-  f_int64ss_t data = f_int64s_t_initialize;
+  f_int64ss_t data = f_int64ss_t_initialize;
 
   {
-    const f_status_t status = f_int64ss_increase(length, 0);
+    const f_status_t status = f_int64ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    data.used = length;
+
+    const f_status_t status = f_int64ss_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);
index 2549016eb9d5821b3641fee05197ad8d178e02c3..a1e802a9bacb757fbddd7a24137ad2a3c18e72b1 100644 (file)
 #define _TEST__F_type_array__int64ss_increase
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int64ss_increase()
+ * @see f_int64ss_increase()
  */
-extern void test__f_type_array_int64ss_increase__works(void **state);
+extern void test__f_type_array_int64ss_increase__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_int64ss_increase()
+ * @see f_int64ss_increase()
  */
 extern void test__f_type_array_int64ss_increase__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int64ss_increase()
+ * @see f_int64ss_increase()
  */
-extern void test__f_type_array_int64ss_increase__parameter_checking(void **state);
+extern void test__f_type_array_int64ss_increase__works(void **state);
 
 #endif // _TEST__F_type_array__int64ss_increase
index 206def8520806e59b3ea939190e9cc8fbb9147df..27238ba8160cf537ecdf9d7d17eb6c3a88c4de22 100644 (file)
@@ -5,10 +5,26 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int64ss_increase_by__works(void **state) {
+void test__f_type_array_int64ss_increase_by__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_int64ss_t data = f_int64ss_t_initialize;
+
+  {
+    const f_status_t status = f_int64ss_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_type_array_int64ss_increase_by__returns_data_not(void **state) {
 
   const int length = 5;
-  f_int64ss_t data = f_int64s_t_initialize;
+  f_int64ss_t data = f_int64ss_t_initialize;
 
   {
     const f_status_t status = f_int64ss_resize(length, &data);
@@ -19,32 +35,48 @@ void test__f_type_array_int64ss_increase_by__works(void **state) {
   }
 
   {
-    data.used = length;
+    const f_status_t status = f_int64ss_increase_by(0, &data);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
 
+  {
     const f_status_t status = f_int64ss_increase_by(length, &data);
 
-    assert_int_equal(status, F_none);
-    assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
   }
 
   free((void *) data.array);
 }
 
-void test__f_type_array_int64ss_increase_by__parameter_checking(void **state) {
+void test__f_type_array_int64ss_increase_by__works(void **state) {
 
   const int length = 5;
-  f_int64ss_t data = f_int64s_t_initialize;
+  f_int64ss_t data = f_int64ss_t_initialize;
 
   {
-    const f_status_t status = f_int64ss_increase_by(length, 0);
+    const f_status_t status = f_int64ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  {
+    data.used = length;
+
+    const f_status_t status = f_int64ss_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
index 689f6586f2a6fbcf669d47785df32d2364666823..62fe6111e78baf7308a3b704e6eadbdc3316b105 100644 (file)
 #define _TEST__F_type_array__int64ss_increase_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int64ss_increase_by()
+ * @see f_int64ss_increase_by()
  */
-extern void test__f_type_array_int64ss_increase_by__works(void **state);
+extern void test__f_type_array_int64ss_increase_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_int64ss_increase_by()
+ * @see f_int64ss_increase_by()
  */
-extern void test__f_type_array_int64ss_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_int64ss_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int64ss_increase_by()
+ */
+extern void test__f_type_array_int64ss_increase_by__works(void **state);
 
 #endif // _TEST__F_type_array__int64ss_increase_by
index cceffafa84566da90ad6e39e922213c5a1789ae5..65b19ea4622f76d7ced7d3fc9eac5ea295c92aca 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int64ss_resize__works(void **state) {
+void test__f_type_array_int64ss_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_int64ss_t data = f_int64ss_t_initialize;
 
   {
-    const f_status_t status = f_int64ss_resize(length, &data);
+    const f_status_t status = f_int64ss_resize(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_int64ss_resize__parameter_checking(void **state) {
+void test__f_type_array_int64ss_resize__works(void **state) {
 
   const int length = 5;
   f_int64ss_t data = f_int64ss_t_initialize;
 
   {
-    const f_status_t status = f_int64ss_resize(length, 0);
+    const f_status_t status = f_int64ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index 4d8570239fd79e22e0c9f457fc80254d72cf8697..16eaef93db02694919bcb90410b5bc77fbf10548 100644 (file)
 #define _TEST__F_type_array__int64ss_resize
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int64ss_resize()
+ * @see f_int64ss_resize()
  */
-extern void test__f_type_array_int64ss_resize__works(void **state);
+extern void test__f_type_array_int64ss_resize__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int64ss_resize()
+ * @see f_int64ss_resize()
  */
-extern void test__f_type_array_int64ss_resize__parameter_checking(void **state);
+extern void test__f_type_array_int64ss_resize__works(void **state);
 
 #endif // _TEST__F_type_array__int64ss_resize
index f857eb0e0a0c674761317af3ff52c280ca396a0d..ff4db0190b869c0ca596e3b6a6a59c17ace074e6 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int8s_adjust__works(void **state) {
+void test__f_type_array_int8s_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_int8s_t data = f_int8s_t_initialize;
 
   {
-    const f_status_t status = f_int8s_adjust(length, &data);
+    const f_status_t status = f_int8s_adjust(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_int8s_adjust__parameter_checking(void **state) {
+void test__f_type_array_int8s_adjust__works(void **state) {
 
   const int length = 5;
   f_int8s_t data = f_int8s_t_initialize;
 
   {
-    const f_status_t status = f_int8s_adjust(length, 0);
+    const f_status_t status = f_int8s_adjust(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index 6fea315bb012ea562ddab417a61d1f89f309c22c..cd772f56bba7717c791c3f37a5c93eb27a15e790 100644 (file)
 #define _TEST__F_type_array__int8s_adjust
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int8s_adjust()
+ * @see f_int8s_adjust()
  */
-extern void test__f_type_array_int8s_adjust__works(void **state);
+extern void test__f_type_array_int8s_adjust__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int8s_adjust()
+ * @see f_int8s_adjust()
  */
-extern void test__f_type_array_int8s_adjust__parameter_checking(void **state);
+extern void test__f_type_array_int8s_adjust__works(void **state);
 
 #endif // _TEST__F_type_array__int8s_adjust
index 8412a3e209c5493e12297a43035f74dace409259..1eef1eaf756ac27f565d8ee617a1c25801fc478d 100644 (file)
@@ -5,6 +5,17 @@
 extern "C" {
 #endif
 
+void test__f_type_array_int8s_append__parameter_checking(void **state) {
+
+  const int8_t data = 0;
+
+  {
+    const f_status_t status = f_int8s_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
 void test__f_type_array_int8s_append__works(void **state) {
 
   const int8_t source = 3;
@@ -21,17 +32,6 @@ void test__f_type_array_int8s_append__works(void **state) {
   free((void *) destination.array);
 }
 
-void test__f_type_array_int8s_append__parameter_checking(void **state) {
-
-  const uint8_t data = 0;
-
-  {
-    const f_status_t status = f_int8s_append(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 221938dd18de6eaeb8d9efa68e4474fa1353f65a..fd718cd199ff209b8564369cd7d836f09c3ee3b2 100644 (file)
 #define _TEST__F_type_array__int8s_append
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int8s_append()
+ * @see f_int8s_append()
  */
-extern void test__f_type_array_int8s_append__works(void **state);
+extern void test__f_type_array_int8s_append__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int8s_append()
+ * @see f_int8s_append()
  */
-extern void test__f_type_array_int8s_append__parameter_checking(void **state);
+extern void test__f_type_array_int8s_append__works(void **state);
 
 #endif // _TEST__F_type_array__int8s_append
index 79279e3aacd8cb4f795c08957910076498f96640..1246f593097d89f380cb1e76e2760e45b69115c8 100644 (file)
@@ -5,10 +5,20 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int8s_append_all__works(void **state) {
+void test__f_type_array_int8s_append_all__parameter_checking(void **state) {
+
+  const f_int8s_t data = f_int8s_t_initialize;
+
+  {
+    const f_status_t status = f_int8s_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_int8s_append_all__returns_data_not(void **state) {
 
   const int length = 5;
-  const int length_used = 2;
   f_int8s_t source = f_int8s_t_initialize;
   f_int8s_t destination = f_int8s_t_initialize;
 
@@ -20,29 +30,22 @@ void test__f_type_array_int8s_append_all__works(void **state) {
     assert_int_equal(source.size, length);
   }
 
-  for (; source.used < length_used; ++source.used) {
-    source.array[source.used] = source.used + 1;
-  } // for
-
   {
     const f_status_t status = f_int8s_append_all(source, &destination);
 
-    assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
-
-    for (f_array_length_t i = 0; i < source.used; ++i) {
-      assert_int_equal(destination.array[i], i + 1);
-    } // for
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
   }
 
   free((void *) source.array);
-  free((void *) destination.array);
 }
 
-void test__f_type_array_int8s_append_all__returns_data_not(void **state) {
+void test__f_type_array_int8s_append_all__works(void **state) {
 
   const int length = 5;
+  const int length_used = 2;
   f_int8s_t source = f_int8s_t_initialize;
   f_int8s_t destination = f_int8s_t_initialize;
 
@@ -54,27 +57,24 @@ void test__f_type_array_int8s_append_all__returns_data_not(void **state) {
     assert_int_equal(source.size, length);
   }
 
+  for (; source.used < length_used; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
+
   {
     const f_status_t status = f_int8s_append_all(source, &destination);
 
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < source.used; ++i) {
+      assert_int_equal(destination.array[i], i + 1);
+    } // for
   }
 
   free((void *) source.array);
-}
-
-void test__f_type_array_int8s_append_all__parameter_checking(void **state) {
-
-  const f_int8s_t data = f_int8s_t_initialize;
-
-  {
-    const f_status_t status = f_int8s_append_all(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
+  free((void *) destination.array);
 }
 
 #ifdef __cplusplus
index 28e46c8c63585513fc1591a9d625010bf342ff66..ce99af9fced27110a154226a9e9bf4c02134820d 100644 (file)
 #define _TEST__F_type_array__int8s_append_all
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int8s_append_all()
+ * @see f_int8s_append_all()
  */
-extern void test__f_type_array_int8s_append_all__works(void **state);
+extern void test__f_type_array_int8s_append_all__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_int8s_append_all()
+ * @see f_int8s_append_all()
  */
 extern void test__f_type_array_int8s_append_all__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int8s_append_all()
+ * @see f_int8s_append_all()
  */
-extern void test__f_type_array_int8s_append_all__parameter_checking(void **state);
+extern void test__f_type_array_int8s_append_all__works(void **state);
 
 #endif // _TEST__F_type_array__int8s_append_all
index 388ed4957291c4c7e07c3a43bd655bef3190347c..19cd308531d448885b892aa987ef67eb0efa4632 100644 (file)
@@ -5,23 +5,15 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int8s_decimate_by__works(void **state) {
+void test__f_type_array_int8s_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_int8s_t data = f_int8s_t_initialize;
 
   {
-    const f_status_t status = f_int8s_resize(length, &data);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_int8s_decimate_by(length, &data);
+    const f_status_t status = f_int8s_decimate_by(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
@@ -29,15 +21,23 @@ void test__f_type_array_int8s_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_int8s_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_int8s_decimate_by__works(void **state) {
 
   const int length = 5;
   f_int8s_t data = f_int8s_t_initialize;
 
   {
-    const f_status_t status = f_int8s_decimate_by(length, 0);
+    const f_status_t status = f_int8s_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_int8s_decimate_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index 269b5d777d93fae59d5410861afd73f607ca28be..a73804b1ed89b34d8277238550631f3927d05563 100644 (file)
 #define _TEST__F_type_array__int8s_decimate_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int8s_decimate_by()
+ * @see f_int8s_decimate_by()
  */
-extern void test__f_type_array_int8s_decimate_by__works(void **state);
+extern void test__f_type_array_int8s_decimate_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int8s_decimate_by()
+ * @see f_int8s_decimate_by()
  */
-extern void test__f_type_array_int8s_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_int8s_decimate_by__works(void **state);
 
 #endif // _TEST__F_type_array__int8s_decimate_by
index e5cfb1e2e7f049d0e6a820f568d7ff26f20a9e07..1565014721175359fe64377b3ffdd2617dacb326 100644 (file)
@@ -5,23 +5,15 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int8s_decrease_by__works(void **state) {
+void test__f_type_array_int8s_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_int8s_t data = f_int8s_t_initialize;
 
   {
-    const f_status_t status = f_int8s_resize(length, &data);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_int8s_decrease_by(length, &data);
+    const f_status_t status = f_int8s_decrease_by(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
@@ -29,15 +21,23 @@ void test__f_type_array_int8s_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_int8s_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_int8s_decrease_by__works(void **state) {
 
   const int length = 5;
   f_int8s_t data = f_int8s_t_initialize;
 
   {
-    const f_status_t status = f_int8s_decrease_by(length, 0);
+    const f_status_t status = f_int8s_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_int8s_decrease_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index 61b3b8401c5c51053483824def0331c1bda7ee14..edba0a3582371fe670ae9db5a409bdcbc5837761 100644 (file)
 #define _TEST__F_type_array__int8s_decrease_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int8s_decrease_by()
+ * @see f_int8s_decrease_by()
  */
-extern void test__f_type_array_int8s_decrease_by__works(void **state);
+extern void test__f_type_array_int8s_decrease_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int8s_decrease_by()
+ * @see f_int8s_decrease_by()
  */
-extern void test__f_type_array_int8s_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_int8s_decrease_by__works(void **state);
 
 #endif // _TEST__F_type_array__int8s_decrease_by
index 37d9220ab8706c35b0b5b0bf9dfab752b5caed66..b79827a61932fb17da68538e56674e7bf1f8fff9 100644 (file)
@@ -5,27 +5,17 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int8s_increase__works(void **state) {
+void test__f_type_array_int8s_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_int8s_t data = f_int8s_t_initialize;
 
   {
-    const f_status_t status = f_int8s_resize(length, &data);
+    const f_status_t status = f_int8s_increase(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_int8s_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);
+    assert_int_equal(data.size, 0);
   }
 
   free((void *) data.array);
@@ -55,17 +45,27 @@ void test__f_type_array_int8s_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int8s_increase__parameter_checking(void **state) {
+void test__f_type_array_int8s_increase__works(void **state) {
 
   const int length = 5;
   f_int8s_t data = f_int8s_t_initialize;
 
   {
-    const f_status_t status = f_int8s_increase(length, 0);
+    const f_status_t status = f_int8s_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    data.used = length;
+
+    const f_status_t status = f_int8s_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);
index 99012eada6976287438d45fce119deacd8340b9a..0842e98e2066ff6f66540db5ba1640be9d5fbe59 100644 (file)
 #define _TEST__F_type_array__int8s_increase
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int8s_increase()
+ * @see f_int8s_increase()
  */
-extern void test__f_type_array_int8s_increase__works(void **state);
+extern void test__f_type_array_int8s_increase__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_int8s_increase()
+ * @see f_int8s_increase()
  */
 extern void test__f_type_array_int8s_increase__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int8s_increase()
+ * @see f_int8s_increase()
  */
-extern void test__f_type_array_int8s_increase__parameter_checking(void **state);
+extern void test__f_type_array_int8s_increase__works(void **state);
 
 #endif // _TEST__F_type_array__int8s_increase
index d847d5220e3cdb097af9beb655918848744f631a..6b022216a2eeb207421460376f155acc2fd84b60 100644 (file)
@@ -5,6 +5,22 @@
 extern "C" {
 #endif
 
+void test__f_type_array_int8s_increase_by__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_int8s_t data = f_int8s_t_initialize;
+
+  {
+    const f_status_t status = f_int8s_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_type_array_int8s_increase_by__works(void **state) {
 
   const int length = 5;
@@ -31,22 +47,6 @@ void test__f_type_array_int8s_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int8s_increase_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_int8s_t data = f_int8s_t_initialize;
-
-  {
-    const f_status_t status = f_int8s_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);
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 0b903acc09cf8299b3d391d79d062eb1bea72aad..9934fed7cc8db7c1c528fc1d2f9a2a1e0d178553 100644 (file)
 #define _TEST__F_type_array__int8s_increase_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int8s_increase_by()
+ * @see f_int8s_increase_by()
  */
-extern void test__f_type_array_int8s_increase_by__works(void **state);
+extern void test__f_type_array_int8s_increase_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int8s_increase_by()
+ * @see f_int8s_increase_by()
  */
-extern void test__f_type_array_int8s_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_int8s_increase_by__works(void **state);
 
 #endif // _TEST__F_type_array__int8s_increase_by
index c367b73699164b236d24cfea06618ade009378d1..c6ec662fef9dad6424840c88ab88757c07bc7f7e 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int8s_resize__works(void **state) {
+void test__f_type_array_int8s_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_int8s_t data = f_int8s_t_initialize;
 
   {
-    const f_status_t status = f_int8s_resize(length, &data);
+    const f_status_t status = f_int8s_resize(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_int8s_resize__parameter_checking(void **state) {
+void test__f_type_array_int8s_resize__works(void **state) {
 
   const int length = 5;
   f_int8s_t data = f_int8s_t_initialize;
 
   {
-    const f_status_t status = f_int8s_resize(length, 0);
+    const f_status_t status = f_int8s_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index bf0e9ce72f889fbb5cc9bc89cf74f7d86593465c..175dfdb2f1f71903b5edebb58a7bd9b1471c3c77 100644 (file)
 #define _TEST__F_type_array__int8s_resize
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int8s_resize()
+ * @see f_int8s_resize()
  */
-extern void test__f_type_array_int8s_resize__works(void **state);
+extern void test__f_type_array_int8s_resize__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int8s_resize()
+ * @see f_int8s_resize()
  */
-extern void test__f_type_array_int8s_resize__parameter_checking(void **state);
+extern void test__f_type_array_int8s_resize__works(void **state);
 
 #endif // _TEST__F_type_array__int8s_resize
index d230abd2d85b47ce5d6504028264e5872456c172..bbba3cd610ed804eccf992c5cf5815418eb313fc 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int8ss_adjust__works(void **state) {
+void test__f_type_array_int8ss_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_int8ss_t data = f_int8ss_t_initialize;
 
   {
-    const f_status_t status = f_int8ss_adjust(length, &data);
+    const f_status_t status = f_int8ss_adjust(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_int8ss_adjust__parameter_checking(void **state) {
+void test__f_type_array_int8ss_adjust__works(void **state) {
 
   const int length = 5;
   f_int8ss_t data = f_int8ss_t_initialize;
 
   {
-    const f_status_t status = f_int8ss_adjust(length, 0);
+    const f_status_t status = f_int8ss_adjust(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index 6e982b8c516b1662c1ff119f00f978cfd3f8da1a..7829380e0d5d5336a5e64d24a2525234cfb35c6d 100644 (file)
 #define _TEST__F_type_array__int8ss_adjust
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int8ss_adjust()
+ * @see f_int8ss_adjust()
  */
-extern void test__f_type_array_int8ss_adjust__works(void **state);
+extern void test__f_type_array_int8ss_adjust__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int8ss_adjust()
+ * @see f_int8ss_adjust()
  */
-extern void test__f_type_array_int8ss_adjust__parameter_checking(void **state);
+extern void test__f_type_array_int8ss_adjust__works(void **state);
 
 #endif // _TEST__F_type_array__int8ss_adjust
index 5372566f1ebdc8fe73fab7a52ccc3a2e3ab5351d..f97a83b141c78530b0cd339f7655865a6733a4eb 100644 (file)
@@ -5,7 +5,18 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int8ss_append__works(void **state) {
+void test__f_type_array_int8ss_append__parameter_checking(void **state) {
+
+  f_int8s_t data = f_int8s_t_initialize;
+
+  {
+    const f_status_t status = f_int8ss_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_int8ss_append__returns_data_not(void **state) {
 
   const int length = 5;
   f_int8s_t source = f_int8s_t_initialize;
@@ -19,32 +30,19 @@ void test__f_type_array_int8ss_append__works(void **state) {
     assert_int_equal(source.size, length);
   }
 
-  for (; source.used < length; ++source.used) {
-    source.array[source.used] = source.used + 1;
-  } // for
-
   {
     const f_status_t status = f_int8ss_append(source, &destination);
 
-    assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, 1);
-    assert_int_equal(destination.array[0].used, source.used);
-    assert_int_equal(destination.array[0].size, source.used);
-
-    for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
-      assert_int_equal(destination.array[0].array[i], i + 1);
-    } // for
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
   }
 
-  for (f_array_length_t i = 0; i < destination.used; ++i) {
-    free((void *) destination.array[i].array);
-  } // for
-
   free((void *) source.array);
-  free((void *) destination.array);
 }
 
-void test__f_type_array_int8ss_append__returns_data_not(void **state) {
+void test__f_type_array_int8ss_append__works(void **state) {
 
   const int length = 5;
   f_int8s_t source = f_int8s_t_initialize;
@@ -58,27 +56,29 @@ void test__f_type_array_int8ss_append__returns_data_not(void **state) {
     assert_int_equal(source.size, length);
   }
 
+  for (; source.used < length; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
+
   {
     const f_status_t status = f_int8ss_append(source, &destination);
 
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
-  }
-
-  free((void *) source.array);
-}
-
-void test__f_type_array_int8ss_append__parameter_checking(void **state) {
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0].used, source.used);
+    assert_int_equal(destination.array[0].size, source.used);
 
-  f_int8s_t data = f_int8s_t_initialize;
+    for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
+      assert_int_equal(destination.array[0].array[i], i + 1);
+    } // for
+  }
 
-  {
-    const f_status_t status = f_int8ss_append(data, 0);
+  for (f_array_length_t i = 0; i < destination.used; ++i) {
+    free((void *) destination.array[i].array);
+  } // for
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
+  free((void *) source.array);
+  free((void *) destination.array);
 }
 
 #ifdef __cplusplus
index 57a27abf953bca101491558422a018cc0c0d0017..10734ea8652e5ec8e5d6aa7763dfb36e26622564 100644 (file)
 #define _TEST__F_type_array__int8ss_append
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int8ss_append()
+ * @see f_int8ss_append()
  */
-extern void test__f_type_array_int8ss_append__works(void **state);
+extern void test__f_type_array_int8ss_append__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_int8ss_append()
+ * @see f_int8ss_append()
  */
 extern void test__f_type_array_int8ss_append__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int8ss_append()
+ * @see f_int8ss_append()
  */
-extern void test__f_type_array_int8ss_append__parameter_checking(void **state);
+extern void test__f_type_array_int8ss_append__works(void **state);
 
 #endif // _TEST__F_type_array__int8ss_append
index 6aeb35f3aa388e1b46d6c200def754873b1ab6ec..ea4b2db3ebd926ffb8eabb489c66023b74347032 100644 (file)
@@ -5,6 +5,43 @@
 extern "C" {
 #endif
 
+void test__f_type_array_int8ss_append_all__parameter_checking(void **state) {
+
+  const f_int8ss_t data = f_int8ss_t_initialize;
+
+  {
+    const f_status_t status = f_int8ss_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_int8ss_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_int8ss_t source = f_int8ss_t_initialize;
+  f_int8ss_t destination = f_int8ss_t_initialize;
+
+  {
+    const f_status_t status = f_int8ss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_int8ss_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
 void test__f_type_array_int8ss_append_all__works(void **state) {
 
   const int length = 5;
@@ -63,43 +100,6 @@ void test__f_type_array_int8ss_append_all__works(void **state) {
   free((void *) destination.array);
 }
 
-void test__f_type_array_int8ss_append_all__returns_data_not(void **state) {
-
-  const int length = 5;
-  f_int8ss_t source = f_int8ss_t_initialize;
-  f_int8ss_t destination = f_int8ss_t_initialize;
-
-  {
-    const f_status_t status = f_int8ss_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  {
-    const f_status_t status = f_int8ss_append_all(source, &destination);
-
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
-  }
-
-  free((void *) source.array);
-}
-
-void test__f_type_array_int8ss_append_all__parameter_checking(void **state) {
-
-  const f_int8ss_t data = f_int8ss_t_initialize;
-
-  {
-    const f_status_t status = f_int8ss_append_all(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 2ce922d3f0fb777fa3010449ac5c36bbe6208b90..5cd3b49a427fc9ced24f13f512ed8fa95d13822d 100644 (file)
 #define _TEST__F_type_array__int8ss_append_all
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int8ss_append_all()
+ * @see f_int8ss_append_all()
  */
-extern void test__f_type_array_int8ss_append_all__works(void **state);
+extern void test__f_type_array_int8ss_append_all__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_int8ss_append_all()
+ * @see f_int8ss_append_all()
  */
 extern void test__f_type_array_int8ss_append_all__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int8ss_append_all()
+ * @see f_int8ss_append_all()
  */
-extern void test__f_type_array_int8ss_append_all__parameter_checking(void **state);
+extern void test__f_type_array_int8ss_append_all__works(void **state);
 
 #endif // _TEST__F_type_array__int8ss_append_all
index 373da634334866bdd02a2c3f8a1722d23ccb78bb..048822334a7c59f0a404910a80f96a356086bff1 100644 (file)
@@ -5,10 +5,26 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int8ss_decimate_by__works(void **state) {
+void test__f_type_array_int8ss_decimate_by__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_int8ss_t data = f_int8ss_t_initialize;
+
+  {
+    const f_status_t status = f_int8ss_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_type_array_int8ss_decimate_by__returns_data_not(void **state) {
 
   const int length = 5;
-  f_int8ss_t data = f_int8s_t_initialize;
+  f_int8ss_t data = f_int8ss_t_initialize;
 
   {
     const f_status_t status = f_int8ss_resize(length, &data);
@@ -19,25 +35,33 @@ void test__f_type_array_int8ss_decimate_by__works(void **state) {
   }
 
   {
-    const f_status_t status = f_int8ss_decimate_by(length, &data);
+    const f_status_t status = f_int8ss_decimate_by(0, &data);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_data_not);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
-void test__f_type_array_int8ss_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_int8ss_decimate_by__works(void **state) {
 
   const int length = 5;
-  f_int8ss_t data = f_int8s_t_initialize;
+  f_int8ss_t data = f_int8ss_t_initialize;
 
   {
-    const f_status_t status = f_int8ss_decimate_by(length, 0);
+    const f_status_t status = f_int8ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_int8ss_decimate_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index aba84119cf6521694a3ed0f9620ad0a3c601962b..a1a415fd5a043a48cd1ba7d3347f0bf3a70ea6cb 100644 (file)
 #define _TEST__F_type_array__int8ss_decimate_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int8ss_decimate_by()
+ * @see f_int8ss_decimate_by()
  */
-extern void test__f_type_array_int8ss_decimate_by__works(void **state);
+extern void test__f_type_array_int8ss_decimate_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
  * @see f_type_array_int8ss_decimate_by()
  */
-extern void test__f_type_array_int8ss_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_int8ss_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int8ss_decimate_by()
+ */
+extern void test__f_type_array_int8ss_decimate_by__works(void **state);
 
 #endif // _TEST__F_type_array__int8ss_decimate_by
index 67e3342cb32a0bc399c62ad7c84b15f38da2db08..d6dc68e3321d4e69b4b657f189ae43d0b8dbe56d 100644 (file)
@@ -5,10 +5,26 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int8ss_decrease_by__works(void **state) {
+void test__f_type_array_int8ss_decrease_by__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_int8ss_t data = f_int8ss_t_initialize;
+
+  {
+    const f_status_t status = f_int8ss_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_type_array_int8ss_decrease_by__returns_data_not(void **state) {
 
   const int length = 5;
-  f_int8ss_t data = f_int8s_t_initialize;
+  f_int8ss_t data = f_int8ss_t_initialize;
 
   {
     const f_status_t status = f_int8ss_resize(length, &data);
@@ -19,25 +35,33 @@ void test__f_type_array_int8ss_decrease_by__works(void **state) {
   }
 
   {
-    const f_status_t status = f_int8ss_decrease_by(length, &data);
+    const f_status_t status = f_int8ss_decrease_by(0, &data);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_data_not);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
-void test__f_type_array_int8ss_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_int8ss_decrease_by__works(void **state) {
 
   const int length = 5;
-  f_int8ss_t data = f_int8s_t_initialize;
+  f_int8ss_t data = f_int8ss_t_initialize;
 
   {
-    const f_status_t status = f_int8ss_decrease_by(length, 0);
+    const f_status_t status = f_int8ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_int8ss_decrease_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index 2925c2465ed8a241c361d4ece473a64cde1ff6ce..a216a857f733fee6417f01a5870011bc1d3cccd2 100644 (file)
 #define _TEST__F_type_array__int8ss_decrease_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int8ss_decrease_by()
+ * @see f_int8ss_decrease_by()
  */
-extern void test__f_type_array_int8ss_decrease_by__works(void **state);
+extern void test__f_type_array_int8ss_decrease_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_int8ss_decrease_by()
+ * @see f_int8ss_decrease_by()
  */
-extern void test__f_type_array_int8ss_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_int8ss_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int8ss_decrease_by()
+ */
+extern void test__f_type_array_int8ss_decrease_by__works(void **state);
 
 #endif // _TEST__F_type_array__int8ss_decrease_by
index 39445e040176d5dea26f13b216987aeffd7e8ef9..0cc0c5038c13c4dad105f087b62a1cc8005c7de1 100644 (file)
@@ -5,27 +5,17 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int8ss_increase__works(void **state) {
+void test__f_type_array_int8ss_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_int8ss_t data = f_int8s_t_initialize;
 
   {
-    const f_status_t status = f_int8ss_resize(length, &data);
+    const f_status_t status = f_int8ss_increase(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_int8ss_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);
+    assert_int_equal(data.size, 0);
   }
 
   free((void *) data.array);
@@ -34,7 +24,7 @@ void test__f_type_array_int8ss_increase__works(void **state) {
 void test__f_type_array_int8ss_increase__returns_data_not(void **state) {
 
   const int length = 5;
-  f_int8ss_t data = f_int8s_t_initialize;
+  f_int8ss_t data = f_int8ss_t_initialize;
 
   {
     const f_status_t status = f_int8ss_resize(length, &data);
@@ -55,17 +45,27 @@ void test__f_type_array_int8ss_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int8ss_increase__parameter_checking(void **state) {
+void test__f_type_array_int8ss_increase__works(void **state) {
 
   const int length = 5;
-  f_int8ss_t data = f_int8s_t_initialize;
+  f_int8ss_t data = f_int8ss_t_initialize;
 
   {
-    const f_status_t status = f_int8ss_increase(length, 0);
+    const f_status_t status = f_int8ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    data.used = length;
+
+    const f_status_t status = f_int8ss_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);
index 1d18bb67b16609e53a5cd3b67e12080aa620a366..4f496a9e6f1f71198bfdd42b69b90f50acb764cf 100644 (file)
 #define _TEST__F_type_array__int8ss_increase
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int8ss_increase()
+ * @see f_int8ss_increase()
  */
-extern void test__f_type_array_int8ss_increase__works(void **state);
+extern void test__f_type_array_int8ss_increase__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_int8ss_increase()
+ * @see f_int8ss_increase()
  */
 extern void test__f_type_array_int8ss_increase__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int8ss_increase()
+ * @see f_int8ss_increase()
  */
-extern void test__f_type_array_int8ss_increase__parameter_checking(void **state);
+extern void test__f_type_array_int8ss_increase__works(void **state);
 
 #endif // _TEST__F_type_array__int8ss_increase
index dc4f64ee67c6dd400bb45f9489fecfbe3a4563fe..f37b14b78c221d0ff2332536edd1f0534b34cd6e 100644 (file)
@@ -5,10 +5,26 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int8ss_increase_by__works(void **state) {
+void test__f_type_array_int8ss_increase_by__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_int8ss_t data = f_int8ss_t_initialize;
+
+  {
+    const f_status_t status = f_int8ss_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_type_array_int8ss_increase_by__returns_data_not(void **state) {
 
   const int length = 5;
-  f_int8ss_t data = f_int8s_t_initialize;
+  f_int8ss_t data = f_int8ss_t_initialize;
 
   {
     const f_status_t status = f_int8ss_resize(length, &data);
@@ -19,32 +35,48 @@ void test__f_type_array_int8ss_increase_by__works(void **state) {
   }
 
   {
-    data.used = length;
+    const f_status_t status = f_int8ss_increase_by(0, &data);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
 
+  {
     const f_status_t status = f_int8ss_increase_by(length, &data);
 
-    assert_int_equal(status, F_none);
-    assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
   }
 
   free((void *) data.array);
 }
 
-void test__f_type_array_int8ss_increase_by__parameter_checking(void **state) {
+void test__f_type_array_int8ss_increase_by__works(void **state) {
 
   const int length = 5;
-  f_int8ss_t data = f_int8s_t_initialize;
+  f_int8ss_t data = f_int8ss_t_initialize;
 
   {
-    const f_status_t status = f_int8ss_increase_by(length, 0);
+    const f_status_t status = f_int8ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  {
+    data.used = length;
+
+    const f_status_t status = f_int8ss_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
index 1c807193702ee2c849521bc06e6b33d0d77ff650..0975deacfae25cb4526cba1e8758ac069a5deb82 100644 (file)
 #define _TEST__F_type_array__int8ss_increase_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int8ss_increase_by()
+ * @see f_int8ss_increase_by()
  */
-extern void test__f_type_array_int8ss_increase_by__works(void **state);
+extern void test__f_type_array_int8ss_increase_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_int8ss_increase_by()
+ * @see f_int8ss_increase_by()
  */
-extern void test__f_type_array_int8ss_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_int8ss_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int8ss_increase_by()
+ */
+extern void test__f_type_array_int8ss_increase_by__works(void **state);
 
 #endif // _TEST__F_type_array__int8ss_increase_by
index 49b9f42a921c344249a659b158fb0db50c2d8878..b3ef69cfab54ae74c5e3a1df74bcc25bfdd5639b 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_int8ss_resize__works(void **state) {
+void test__f_type_array_int8ss_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_int8ss_t data = f_int8ss_t_initialize;
 
   {
-    const f_status_t status = f_int8ss_resize(length, &data);
+    const f_status_t status = f_int8ss_resize(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_int8ss_resize__parameter_checking(void **state) {
+void test__f_type_array_int8ss_resize__works(void **state) {
 
   const int length = 5;
   f_int8ss_t data = f_int8ss_t_initialize;
 
   {
-    const f_status_t status = f_int8ss_resize(length, 0);
+    const f_status_t status = f_int8ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index 42dda375bfd59d9f66cfcc85636ccc03f54ecd2b..ba5ab366f46150b166e574942b36ba8ce34cd8f5 100644 (file)
 #define _TEST__F_type_array__int8ss_resize
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_int8ss_resize()
+ * @see f_int8ss_resize()
  */
-extern void test__f_type_array_int8ss_resize__works(void **state);
+extern void test__f_type_array_int8ss_resize__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_int8ss_resize()
+ * @see f_int8ss_resize()
  */
-extern void test__f_type_array_int8ss_resize__parameter_checking(void **state);
+extern void test__f_type_array_int8ss_resize__works(void **state);
 
 #endif // _TEST__F_type_array__int8ss_resize
index 4337c9935eaff88f90ad89eaada0e6fb77c3a655..3ec472769983c0505646efd08c2d123e0959d6d7 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_states_adjust__works(void **state) {
+void test__f_type_array_states_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_states_t data = f_states_t_initialize;
 
   {
-    const f_status_t status = f_states_adjust(length, &data);
+    const f_status_t status = f_states_adjust(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_states_adjust__parameter_checking(void **state) {
+void test__f_type_array_states_adjust__works(void **state) {
 
   const int length = 5;
   f_states_t data = f_states_t_initialize;
 
   {
-    const f_status_t status = f_states_adjust(length, 0);
+    const f_status_t status = f_states_adjust(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index dbc993a872f5ff510abaf5bcc9e5a8e69caea5fc..33e083f342a42c46808513c10dfb9390a968e69c 100644 (file)
 #define _TEST__F_type_array__states_adjust
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_states_adjust()
+ * @see f_states_adjust()
  */
-extern void test__f_type_array_states_adjust__works(void **state);
+extern void test__f_type_array_states_adjust__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_states_adjust()
+ * @see f_states_adjust()
  */
-extern void test__f_type_array_states_adjust__parameter_checking(void **state);
+extern void test__f_type_array_states_adjust__works(void **state);
 
 #endif // _TEST__F_type_array__states_adjust
index e142cfa94a652e821968e116e588b815d6fa95b1..11d2fe4fe8b9cc96c5e0e2c9b58c011d76c1f4f8 100644 (file)
@@ -5,6 +5,17 @@
 extern "C" {
 #endif
 
+void test__f_type_array_states_append__parameter_checking(void **state) {
+
+  const f_state_t data = f_state_t_initialize;
+
+  {
+    const f_status_t status = f_states_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
 void test__f_type_array_states_append__works(void **state) {
 
   int fake_1 = 1;
@@ -31,17 +42,6 @@ void test__f_type_array_states_append__works(void **state) {
   free((void *) destination.array);
 }
 
-void test__f_type_array_states_append__parameter_checking(void **state) {
-
-  const f_state_t data = f_state_t_initialize;
-
-  {
-    const f_status_t status = f_states_append(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 43d227d61b81aee118625918ad8ccb30e2119bd7..57c23ab7697a65f2523d6929541a30209cac3e04 100644 (file)
 #define _TEST__F_type_array__states_append
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_states_append()
+ * @see f_states_append()
  */
-extern void test__f_type_array_states_append__works(void **state);
+extern void test__f_type_array_states_append__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_states_append()
+ * @see f_states_append()
  */
-extern void test__f_type_array_states_append__parameter_checking(void **state);
+extern void test__f_type_array_states_append__works(void **state);
 
 #endif // _TEST__F_type_array__states_append
index 0c7938ca3c61637ab04e178620d884ae0066344b..9616d75191a580b8d1cc6b04cffc2029e2006fa8 100644 (file)
@@ -5,6 +5,43 @@
 extern "C" {
 #endif
 
+void test__f_type_array_states_append_all__parameter_checking(void **state) {
+
+  const f_states_t data = f_states_t_initialize;
+
+  {
+    const f_status_t status = f_states_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_states_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_states_t source = f_states_t_initialize;
+  f_states_t destination = f_states_t_initialize;
+
+  {
+    const f_status_t status = f_states_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_states_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
 void test__f_type_array_states_append_all__works(void **state) {
 
   const int length = 5;
@@ -53,43 +90,6 @@ void test__f_type_array_states_append_all__works(void **state) {
   free((void *) destination.array);
 }
 
-void test__f_type_array_states_append_all__returns_data_not(void **state) {
-
-  const int length = 5;
-  f_states_t source = f_states_t_initialize;
-  f_states_t destination = f_states_t_initialize;
-
-  {
-    const f_status_t status = f_states_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  {
-    const f_status_t status = f_states_append_all(source, &destination);
-
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
-  }
-
-  free((void *) source.array);
-}
-
-void test__f_type_array_states_append_all__parameter_checking(void **state) {
-
-  const f_states_t data = f_states_t_initialize;
-
-  {
-    const f_status_t status = f_states_append_all(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index a1f2babcce9cb03644d94ccdbeb0605c9660ea55..68cb6a55bb91b73cee360a161989871a1b299d0f 100644 (file)
 #define _TEST__F_type_array__states_append_all
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_states_append_all()
+ * @see f_states_append_all()
  */
-extern void test__f_type_array_states_append_all__works(void **state);
+extern void test__f_type_array_states_append_all__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_states_append_all()
+ * @see f_states_append_all()
  */
 extern void test__f_type_array_states_append_all__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_states_append_all()
+ * @see f_states_append_all()
  */
-extern void test__f_type_array_states_append_all__parameter_checking(void **state);
+extern void test__f_type_array_states_append_all__works(void **state);
 
 #endif // _TEST__F_type_array__states_append_all
index 0594ff3efd95f02cccf43e79204633b81bd6efa7..e74f0b72f173588c1f6caca6779ed0c8c1b53327 100644 (file)
@@ -5,23 +5,15 @@
 extern "C" {
 #endif
 
-void test__f_type_array_states_decimate_by__works(void **state) {
+void test__f_type_array_states_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_states_t data = f_states_t_initialize;
 
   {
-    const f_status_t status = f_states_resize(length, &data);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_states_decimate_by(length, &data);
+    const f_status_t status = f_states_decimate_by(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
@@ -29,15 +21,23 @@ void test__f_type_array_states_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_states_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_states_decimate_by__works(void **state) {
 
   const int length = 5;
   f_states_t data = f_states_t_initialize;
 
   {
-    const f_status_t status = f_states_decimate_by(length, 0);
+    const f_status_t status = f_states_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_states_decimate_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index a12f3ce1a9904faaee05196d7ecde7e9a17a18e0..7c983cd81830b4d92019dbd2723dd03eb1e20067 100644 (file)
 #define _TEST__F_type_array__states_decimate_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_states_decimate_by()
+ * @see f_states_decimate_by()
  */
-extern void test__f_type_array_states_decimate_by__works(void **state);
+extern void test__f_type_array_states_decimate_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_states_decimate_by()
+ * @see f_states_decimate_by()
  */
-extern void test__f_type_array_states_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_states_decimate_by__works(void **state);
 
 #endif // _TEST__F_type_array__states_decimate_by
index 69f02f385c4a8aef23dde3f86abb327fc9f1f8cc..1b15b17c49cb6ac7ec0c0ecb7a3a5cbc37d1abf8 100644 (file)
@@ -5,23 +5,15 @@
 extern "C" {
 #endif
 
-void test__f_type_array_states_decrease_by__works(void **state) {
+void test__f_type_array_states_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_states_t data = f_states_t_initialize;
 
   {
-    const f_status_t status = f_states_resize(length, &data);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_states_decrease_by(length, &data);
+    const f_status_t status = f_states_decrease_by(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
@@ -29,15 +21,23 @@ void test__f_type_array_states_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_states_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_states_decrease_by__works(void **state) {
 
   const int length = 5;
   f_states_t data = f_states_t_initialize;
 
   {
-    const f_status_t status = f_states_decrease_by(length, 0);
+    const f_status_t status = f_states_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_states_decrease_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index 6b0e7da0d58a89ae733064499eada0a436bd354c..d79921a6105e5b34adfd512bfcd14e52de782709 100644 (file)
 #define _TEST__F_type_array__states_decrease_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_states_decrease_by()
+ * @see f_states_decrease_by()
  */
-extern void test__f_type_array_states_decrease_by__works(void **state);
+extern void test__f_type_array_states_decrease_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_states_decrease_by()
+ * @see f_states_decrease_by()
  */
-extern void test__f_type_array_states_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_states_decrease_by__works(void **state);
 
 #endif // _TEST__F_type_array__states_decrease_by
index 36bd2cb50f448a34a348587e3571b3542155c64f..cacd401da8d5c40d3b229f5ee4767d5115376738 100644 (file)
@@ -5,27 +5,17 @@
 extern "C" {
 #endif
 
-void test__f_type_array_states_increase__works(void **state) {
+void test__f_type_array_states_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_states_t data = f_states_t_initialize;
 
   {
-    const f_status_t status = f_states_resize(length, &data);
+    const f_status_t status = f_states_increase(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_states_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);
+    assert_int_equal(data.size, 0);
   }
 
   free((void *) data.array);
@@ -55,17 +45,27 @@ void test__f_type_array_states_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_states_increase__parameter_checking(void **state) {
+void test__f_type_array_states_increase__works(void **state) {
 
   const int length = 5;
   f_states_t data = f_states_t_initialize;
 
   {
-    const f_status_t status = f_states_increase(length, 0);
+    const f_status_t status = f_states_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    data.used = length;
+
+    const f_status_t status = f_states_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);
index f3443ab0f0eded65ccacc1d1169b94a4c98c2a87..d82fa0a2e677e8de06de383e4d08eb6b00f8c87c 100644 (file)
 #define _TEST__F_type_array__states_increase
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_states_increase()
+ * @see f_states_increase()
  */
-extern void test__f_type_array_states_increase__works(void **state);
+extern void test__f_type_array_states_increase__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_states_increase()
+ * @see f_states_increase()
  */
 extern void test__f_type_array_states_increase__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_states_increase()
+ * @see f_states_increase()
  */
-extern void test__f_type_array_states_increase__parameter_checking(void **state);
+extern void test__f_type_array_states_increase__works(void **state);
 
 #endif // _TEST__F_type_array__states_increase
index 7fa61bd74c1a2f4367620fb74f84c526f54109bd..3cfc0b928425ee6975d6c86c6ba53591f6ab6e1e 100644 (file)
@@ -5,6 +5,22 @@
 extern "C" {
 #endif
 
+void test__f_type_array_states_increase_by__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_states_t data = f_states_t_initialize;
+
+  {
+    const f_status_t status = f_states_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_type_array_states_increase_by__works(void **state) {
 
   const int length = 5;
@@ -31,22 +47,6 @@ void test__f_type_array_states_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_states_increase_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_states_t data = f_states_t_initialize;
-
-  {
-    const f_status_t status = f_states_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);
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index e78e99eb3273d18358a002578c83f3106e1d9796..1b1011ff6532ffe059122c2d7262abc86057c388 100644 (file)
 #define _TEST__F_type_array__states_increase_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_states_increase_by()
+ * @see f_states_increase_by()
  */
-extern void test__f_type_array_states_increase_by__works(void **state);
+extern void test__f_type_array_states_increase_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_states_increase_by()
+ * @see f_states_increase_by()
  */
-extern void test__f_type_array_states_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_states_increase_by__works(void **state);
 
 #endif // _TEST__F_type_array__states_increase_by
index ada5a9bcfe5f20ff1315d2b6ce59066b05361d67..3751188dd356227a858ebf376cbe8bdce4e6b4c4 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_states_resize__works(void **state) {
+void test__f_type_array_states_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_states_t data = f_states_t_initialize;
 
   {
-    const f_status_t status = f_states_resize(length, &data);
+    const f_status_t status = f_states_resize(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_states_resize__parameter_checking(void **state) {
+void test__f_type_array_states_resize__works(void **state) {
 
   const int length = 5;
   f_states_t data = f_states_t_initialize;
 
   {
-    const f_status_t status = f_states_resize(length, 0);
+    const f_status_t status = f_states_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index 79e7979a3d915cd2c17966a641734ad71dd89090..5a86821cd5d1df9960fb2557741904055017f686 100644 (file)
 #define _TEST__F_type_array__states_resize
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_states_resize()
+ * @see f_states_resize()
  */
-extern void test__f_type_array_states_resize__works(void **state);
+extern void test__f_type_array_states_resize__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_states_resize()
+ * @see f_states_resize()
  */
-extern void test__f_type_array_states_resize__parameter_checking(void **state);
+extern void test__f_type_array_states_resize__works(void **state);
 
 #endif // _TEST__F_type_array__states_resize
index 61b28e3b9b3cf8fde08e40ae42ebbbb64f5434b0..883bd1d6e12f89cff07bea4ff2ee0fe6d1fe418d 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_statess_adjust__works(void **state) {
+void test__f_type_array_statess_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_statess_t data = f_statess_t_initialize;
 
   {
-    const f_status_t status = f_statess_adjust(length, &data);
+    const f_status_t status = f_statess_adjust(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_statess_adjust__parameter_checking(void **state) {
+void test__f_type_array_statess_adjust__works(void **state) {
 
   const int length = 5;
   f_statess_t data = f_statess_t_initialize;
 
   {
-    const f_status_t status = f_statess_adjust(length, 0);
+    const f_status_t status = f_statess_adjust(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index 5cb604e0f23b9606a2c134dac32893596a906b46..0fa2318f871f82751fe79cc9eb9d7e933011922b 100644 (file)
 #define _TEST__F_type_array__statess_adjust
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_statess_adjust()
+ * @see f_statess_adjust()
  */
-extern void test__f_type_array_statess_adjust__works(void **state);
+extern void test__f_type_array_statess_adjust__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_statess_adjust()
+ * @see f_statess_adjust()
  */
-extern void test__f_type_array_statess_adjust__parameter_checking(void **state);
+extern void test__f_type_array_statess_adjust__works(void **state);
 
 #endif // _TEST__F_type_array__statess_adjust
index 2f471e3dcb6c5605dce07d9810e70a09d01bbd5f..600d61a3a200f92975808b705e6ff5dd5891e69f 100644 (file)
@@ -5,6 +5,43 @@
 extern "C" {
 #endif
 
+void test__f_type_array_statess_append__parameter_checking(void **state) {
+
+  f_states_t data = f_states_t_initialize;
+
+  {
+    const f_status_t status = f_statess_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_statess_append__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_states_t source = f_states_t_initialize;
+  f_statess_t destination = f_statess_t_initialize;
+
+  {
+    const f_status_t status = f_states_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_statess_append(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
 void test__f_type_array_statess_append__works(void **state) {
 
   const int length = 5;
@@ -57,43 +94,6 @@ void test__f_type_array_statess_append__works(void **state) {
   free((void *) destination.array);
 }
 
-void test__f_type_array_statess_append__returns_data_not(void **state) {
-
-  const int length = 5;
-  f_states_t source = f_states_t_initialize;
-  f_statess_t destination = f_statess_t_initialize;
-
-  {
-    const f_status_t status = f_states_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  {
-    const f_status_t status = f_statess_append(source, &destination);
-
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
-  }
-
-  free((void *) source.array);
-}
-
-void test__f_type_array_statess_append__parameter_checking(void **state) {
-
-  f_states_t data = f_states_t_initialize;
-
-  {
-    const f_status_t status = f_statess_append(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 54f6bf4f4ac7b4d8e7b4f71e67a06d5a9d0aaef8..655f57376064f630e4451f960bcc0c188dd8e221 100644 (file)
 #define _TEST__F_type_array__statess_append
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_statess_append()
+ * @see f_statess_append()
  */
-extern void test__f_type_array_statess_append__works(void **state);
+extern void test__f_type_array_statess_append__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_statess_append()
+ * @see f_statess_append()
  */
 extern void test__f_type_array_statess_append__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_statess_append()
+ * @see f_statess_append()
  */
-extern void test__f_type_array_statess_append__parameter_checking(void **state);
+extern void test__f_type_array_statess_append__works(void **state);
 
 #endif // _TEST__F_type_array__statess_append
index 91463562e945e36f224ac26b054a63aacd3d8ecb..d78b522930ce142e042a8e62de3434106bbab800 100644 (file)
@@ -5,6 +5,43 @@
 extern "C" {
 #endif
 
+void test__f_type_array_statess_append_all__parameter_checking(void **state) {
+
+  const f_statess_t data = f_statess_t_initialize;
+
+  {
+    const f_status_t status = f_statess_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_statess_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_statess_t source = f_statess_t_initialize;
+  f_statess_t destination = f_statess_t_initialize;
+
+  {
+    const f_status_t status = f_statess_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_statess_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
 void test__f_type_array_statess_append_all__works(void **state) {
 
   const int length = 5;
@@ -77,43 +114,6 @@ void test__f_type_array_statess_append_all__works(void **state) {
   free((void *) destination.array);
 }
 
-void test__f_type_array_statess_append_all__returns_data_not(void **state) {
-
-  const int length = 5;
-  f_statess_t source = f_statess_t_initialize;
-  f_statess_t destination = f_statess_t_initialize;
-
-  {
-    const f_status_t status = f_statess_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  {
-    const f_status_t status = f_statess_append_all(source, &destination);
-
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
-  }
-
-  free((void *) source.array);
-}
-
-void test__f_type_array_statess_append_all__parameter_checking(void **state) {
-
-  const f_statess_t data = f_statess_t_initialize;
-
-  {
-    const f_status_t status = f_statess_append_all(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index b8a72ead04a454865bf951cb7ede9e53eee465bf..b57c1f0ff964acaccee2483e4abe4995d11a1df9 100644 (file)
 #define _TEST__F_type_array__statess_append_all
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_statess_append_all()
+ * @see f_statess_append_all()
  */
-extern void test__f_type_array_statess_append_all__works(void **state);
+extern void test__f_type_array_statess_append_all__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_statess_append_all()
+ * @see f_statess_append_all()
  */
 extern void test__f_type_array_statess_append_all__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_statess_append_all()
+ * @see f_statess_append_all()
  */
-extern void test__f_type_array_statess_append_all__parameter_checking(void **state);
+extern void test__f_type_array_statess_append_all__works(void **state);
 
 #endif // _TEST__F_type_array__statess_append_all
index 037550296e0ce63ef7321787ecf5b29992d35289..911c7e4da7002777af6abf18146b6ee9fab75b09 100644 (file)
@@ -5,12 +5,28 @@
 extern "C" {
 #endif
 
-void test__f_type_array_statess_decimate_by__works(void **state) {
+void test__f_type_array_statess_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_statess_t data = f_states_t_initialize;
 
   {
+    const f_status_t status = f_statess_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_type_array_statess_decimate_by__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_statess_t data = f_statess_t_initialize;
+
+  {
     const f_status_t status = f_statess_resize(length, &data);
 
     assert_int_equal(status, F_none);
@@ -19,25 +35,33 @@ void test__f_type_array_statess_decimate_by__works(void **state) {
   }
 
   {
-    const f_status_t status = f_statess_decimate_by(length, &data);
+    const f_status_t status = f_statess_decimate_by(0, &data);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_data_not);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
-void test__f_type_array_statess_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_statess_decimate_by__works(void **state) {
 
   const int length = 5;
   f_statess_t data = f_states_t_initialize;
 
   {
-    const f_status_t status = f_statess_decimate_by(length, 0);
+    const f_status_t status = f_statess_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_statess_decimate_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index dae8b9df995014dabdfbe75416cb379bd192cb7a..d8c960c91867619817eb575908437536e5e50233 100644 (file)
 #define _TEST__F_type_array__statess_decimate_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_statess_decimate_by()
+ * @see f_statess_decimate_by()
  */
-extern void test__f_type_array_statess_decimate_by__works(void **state);
+extern void test__f_type_array_statess_decimate_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
  * @see f_type_array_statess_decimate_by()
  */
-extern void test__f_type_array_statess_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_statess_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_statess_decimate_by()
+ */
+extern void test__f_type_array_statess_decimate_by__works(void **state);
 
 #endif // _TEST__F_type_array__statess_decimate_by
index 753ff19b750a940b9c66da73a0b0607ecf43a789..4990d95d6b0cf627b0aeff0e94031801353e680f 100644 (file)
@@ -5,12 +5,28 @@
 extern "C" {
 #endif
 
-void test__f_type_array_statess_decrease_by__works(void **state) {
+void test__f_type_array_statess_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_statess_t data = f_states_t_initialize;
 
   {
+    const f_status_t status = f_statess_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_type_array_statess_decrease_by__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_statess_t data = f_statess_t_initialize;
+
+  {
     const f_status_t status = f_statess_resize(length, &data);
 
     assert_int_equal(status, F_none);
@@ -19,25 +35,33 @@ void test__f_type_array_statess_decrease_by__works(void **state) {
   }
 
   {
-    const f_status_t status = f_statess_decrease_by(length, &data);
+    const f_status_t status = f_statess_decrease_by(0, &data);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_data_not);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
-void test__f_type_array_statess_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_statess_decrease_by__works(void **state) {
 
   const int length = 5;
   f_statess_t data = f_states_t_initialize;
 
   {
-    const f_status_t status = f_statess_decrease_by(length, 0);
+    const f_status_t status = f_statess_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_statess_decrease_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index b855d49f4b09661c029ca9c0d6f568a2aa68af79..f8b062293850e8c095362357df7774fe9083b13e 100644 (file)
 #define _TEST__F_type_array__statess_decrease_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_statess_decrease_by()
+ * @see f_statess_decrease_by()
  */
-extern void test__f_type_array_statess_decrease_by__works(void **state);
+extern void test__f_type_array_statess_decrease_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_statess_decrease_by()
+ * @see f_statess_decrease_by()
  */
-extern void test__f_type_array_statess_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_statess_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_statess_decrease_by()
+ */
+extern void test__f_type_array_statess_decrease_by__works(void **state);
 
 #endif // _TEST__F_type_array__statess_decrease_by
index 367d9a5ac37cb5d8761bf79a85b907034ab0f66c..e187d564eda5c57a06526059438bea53aa798415 100644 (file)
@@ -5,27 +5,17 @@
 extern "C" {
 #endif
 
-void test__f_type_array_statess_increase__works(void **state) {
+void test__f_type_array_statess_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_statess_t data = f_states_t_initialize;
 
   {
-    const f_status_t status = f_statess_resize(length, &data);
+    const f_status_t status = f_statess_increase(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_statess_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);
+    assert_int_equal(data.size, 0);
   }
 
   free((void *) data.array);
@@ -55,17 +45,27 @@ void test__f_type_array_statess_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_statess_increase__parameter_checking(void **state) {
+void test__f_type_array_statess_increase__works(void **state) {
 
   const int length = 5;
   f_statess_t data = f_states_t_initialize;
 
   {
-    const f_status_t status = f_statess_increase(length, 0);
+    const f_status_t status = f_statess_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    data.used = length;
+
+    const f_status_t status = f_statess_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);
index d015d5d0c75aaba0b8b1c3790bc1d27aff6e768b..1758a79561d4625aadcef34de3c9fb9601fee084 100644 (file)
 #define _TEST__F_type_array__statess_increase
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_statess_increase()
+ * @see f_statess_increase()
  */
-extern void test__f_type_array_statess_increase__works(void **state);
+extern void test__f_type_array_statess_increase__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_statess_increase()
+ * @see f_statess_increase()
  */
 extern void test__f_type_array_statess_increase__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_statess_increase()
+ * @see f_statess_increase()
  */
-extern void test__f_type_array_statess_increase__parameter_checking(void **state);
+extern void test__f_type_array_statess_increase__works(void **state);
 
 #endif // _TEST__F_type_array__statess_increase
index 77070d2d72a7abd71054bcc5a39c057c9cbd116b..57251b075bfee421d92e587dfff5e129168d81f8 100644 (file)
@@ -5,12 +5,28 @@
 extern "C" {
 #endif
 
-void test__f_type_array_statess_increase_by__works(void **state) {
+void test__f_type_array_statess_increase_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_statess_t data = f_states_t_initialize;
 
   {
+    const f_status_t status = f_statess_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_type_array_statess_increase_by__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_statess_t data = f_statess_t_initialize;
+
+  {
     const f_status_t status = f_statess_resize(length, &data);
 
     assert_int_equal(status, F_none);
@@ -19,32 +35,48 @@ void test__f_type_array_statess_increase_by__works(void **state) {
   }
 
   {
-    data.used = length;
+    const f_status_t status = f_statess_increase_by(0, &data);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
 
+  {
     const f_status_t status = f_statess_increase_by(length, &data);
 
-    assert_int_equal(status, F_none);
-    assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
   }
 
   free((void *) data.array);
 }
 
-void test__f_type_array_statess_increase_by__parameter_checking(void **state) {
+void test__f_type_array_statess_increase_by__works(void **state) {
 
   const int length = 5;
   f_statess_t data = f_states_t_initialize;
 
   {
-    const f_status_t status = f_statess_increase_by(length, 0);
+    const f_status_t status = f_statess_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  {
+    data.used = length;
+
+    const f_status_t status = f_statess_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
index a93ffba97fdb8bdc573b8728acfdec00c5649f2c..13d0608f6f3af21f696ce0960ef1db017880d648 100644 (file)
 #define _TEST__F_type_array__statess_increase_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_statess_increase_by()
+ * @see f_statess_increase_by()
  */
-extern void test__f_type_array_statess_increase_by__works(void **state);
+extern void test__f_type_array_statess_increase_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_statess_increase_by()
+ * @see f_statess_increase_by()
  */
-extern void test__f_type_array_statess_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_statess_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_statess_increase_by()
+ */
+extern void test__f_type_array_statess_increase_by__works(void **state);
 
 #endif // _TEST__F_type_array__statess_increase_by
index a953b9467fe358ef8bcd841f2a93ee029f8f3ba9..b30e2a06d92474e884e1a827653ddeeb32a002d2 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_statess_resize__works(void **state) {
+void test__f_type_array_statess_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_statess_t data = f_statess_t_initialize;
 
   {
-    const f_status_t status = f_statess_resize(length, &data);
+    const f_status_t status = f_statess_resize(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_statess_resize__parameter_checking(void **state) {
+void test__f_type_array_statess_resize__works(void **state) {
 
   const int length = 5;
   f_statess_t data = f_statess_t_initialize;
 
   {
-    const f_status_t status = f_statess_resize(length, 0);
+    const f_status_t status = f_statess_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index 448f6d832228370e3e00407d0f3420ce5f546222..17d6e4022806501cb67a0073d9f28a2b0de516bb 100644 (file)
 #define _TEST__F_type_array__statess_resize
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_statess_resize()
+ * @see f_statess_resize()
  */
-extern void test__f_type_array_statess_resize__works(void **state);
+extern void test__f_type_array_statess_resize__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_statess_resize()
+ * @see f_statess_resize()
  */
-extern void test__f_type_array_statess_resize__parameter_checking(void **state);
+extern void test__f_type_array_statess_resize__works(void **state);
 
 #endif // _TEST__F_type_array__statess_resize
index ba7dcc6bf674ce1651c6c326f367ab6997199ba3..0862cf679fd59422945538491e880728d17b9941 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_statuss_adjust__works(void **state) {
+void test__f_type_array_statuss_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_statuss_t data = f_statuss_t_initialize;
 
   {
-    const f_status_t status = f_statuss_adjust(length, &data);
+    const f_status_t status = f_statuss_adjust(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_statuss_adjust__parameter_checking(void **state) {
+void test__f_type_array_statuss_adjust__works(void **state) {
 
   const int length = 5;
   f_statuss_t data = f_statuss_t_initialize;
 
   {
-    const f_status_t status = f_statuss_adjust(length, 0);
+    const f_status_t status = f_statuss_adjust(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index 24e5d53d0474ef0bfc84ebb58f115209f9d76661..e28e5d6b534fcbff8b40a70664bd9b3daa9ab4f2 100644 (file)
 #define _TEST__F_type_array__statuss_adjust
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_statuss_adjust()
+ * @see f_statuss_adjust()
  */
-extern void test__f_type_array_statuss_adjust__works(void **state);
+extern void test__f_type_array_statuss_adjust__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_statuss_adjust()
+ * @see f_statuss_adjust()
  */
-extern void test__f_type_array_statuss_adjust__parameter_checking(void **state);
+extern void test__f_type_array_statuss_adjust__works(void **state);
 
 #endif // _TEST__F_type_array__statuss_adjust
index fb8d905061aa701d9d872c86d266879fdd83dff8..454ebaa3adfe010742bb6a23802ea69314e84923 100644 (file)
@@ -5,6 +5,17 @@
 extern "C" {
 #endif
 
+void test__f_type_array_statuss_append__parameter_checking(void **state) {
+
+  const f_status_t data = f_status_t_initialize;
+
+  {
+    const f_status_t status = f_statuss_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
 void test__f_type_array_statuss_append__works(void **state) {
 
   const f_status_t source = 3;
@@ -21,17 +32,6 @@ void test__f_type_array_statuss_append__works(void **state) {
   free((void *) destination.array);
 }
 
-void test__f_type_array_statuss_append__parameter_checking(void **state) {
-
-  const f_status_t data = f_status_t_initialize;
-
-  {
-    const f_status_t status = f_statuss_append(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 6fb277f10f52e01d6ffe619b09c5fcaa2490bf72..48a5dc9a6e2af7ae0e67ecfec9280b3aea7dc151 100644 (file)
 #define _TEST__F_type_array__statuss_append
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_statuss_append()
+ * @see f_statuss_append()
  */
-extern void test__f_type_array_statuss_append__works(void **state);
+extern void test__f_type_array_statuss_append__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_statuss_append()
+ * @see f_statuss_append()
  */
-extern void test__f_type_array_statuss_append__parameter_checking(void **state);
+extern void test__f_type_array_statuss_append__works(void **state);
 
 #endif // _TEST__F_type_array__statuss_append
index 07b1a060c2dafe2c0e7e21ba122f39a4f8d0fcda..19e6fe1e7123805033f678cc928422599b210807 100644 (file)
@@ -5,10 +5,20 @@
 extern "C" {
 #endif
 
-void test__f_type_array_statuss_append_all__works(void **state) {
+void test__f_type_array_statuss_append_all__parameter_checking(void **state) {
+
+  const f_statuss_t data = f_statuss_t_initialize;
+
+  {
+    const f_status_t status = f_statuss_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_statuss_append_all__returns_data_not(void **state) {
 
   const int length = 5;
-  const int length_used = 2;
   f_statuss_t source = f_statuss_t_initialize;
   f_statuss_t destination = f_statuss_t_initialize;
 
@@ -20,29 +30,22 @@ void test__f_type_array_statuss_append_all__works(void **state) {
     assert_int_equal(source.size, length);
   }
 
-  for (; source.used < length_used; ++source.used) {
-    source.array[source.used] = source.used + 1;
-  } // for
-
   {
     const f_status_t status = f_statuss_append_all(source, &destination);
 
-    assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
-
-    for (f_array_length_t i = 0; i < source.used; ++i) {
-      assert_int_equal(destination.array[i], i + 1);
-    } // for
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
   }
 
   free((void *) source.array);
-  free((void *) destination.array);
 }
 
-void test__f_type_array_statuss_append_all__returns_data_not(void **state) {
+void test__f_type_array_statuss_append_all__works(void **state) {
 
   const int length = 5;
+  const int length_used = 2;
   f_statuss_t source = f_statuss_t_initialize;
   f_statuss_t destination = f_statuss_t_initialize;
 
@@ -54,27 +57,24 @@ void test__f_type_array_statuss_append_all__returns_data_not(void **state) {
     assert_int_equal(source.size, length);
   }
 
+  for (; source.used < length_used; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
+
   {
     const f_status_t status = f_statuss_append_all(source, &destination);
 
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < source.used; ++i) {
+      assert_int_equal(destination.array[i], i + 1);
+    } // for
   }
 
   free((void *) source.array);
-}
-
-void test__f_type_array_statuss_append_all__parameter_checking(void **state) {
-
-  const f_statuss_t data = f_statuss_t_initialize;
-
-  {
-    const f_status_t status = f_statuss_append_all(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
+  free((void *) destination.array);
 }
 
 #ifdef __cplusplus
index c870109d3114b8ad5101f6d7a05283ee32963eae..509bdee5e290b5465ee9487d6ee0b97427b03a41 100644 (file)
 #define _TEST__F_type_array__statuss_append_all
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_statuss_append_all()
+ * @see f_statuss_append_all()
  */
-extern void test__f_type_array_statuss_append_all__works(void **state);
+extern void test__f_type_array_statuss_append_all__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_statuss_append_all()
+ * @see f_statuss_append_all()
  */
 extern void test__f_type_array_statuss_append_all__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_statuss_append_all()
+ * @see f_statuss_append_all()
  */
-extern void test__f_type_array_statuss_append_all__parameter_checking(void **state);
+extern void test__f_type_array_statuss_append_all__works(void **state);
 
 #endif // _TEST__F_type_array__statuss_append_all
index 962080cd834e1b4400dfeaf4d0d728ee22ae7e33..479f12925895d79084f07871f666cf47bb2d9eb2 100644 (file)
@@ -5,23 +5,15 @@
 extern "C" {
 #endif
 
-void test__f_type_array_statuss_decimate_by__works(void **state) {
+void test__f_type_array_statuss_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_statuss_t data = f_statuss_t_initialize;
 
   {
-    const f_status_t status = f_statuss_resize(length, &data);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_statuss_decimate_by(length, &data);
+    const f_status_t status = f_statuss_decimate_by(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
@@ -29,15 +21,23 @@ void test__f_type_array_statuss_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_statuss_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_statuss_decimate_by__works(void **state) {
 
   const int length = 5;
   f_statuss_t data = f_statuss_t_initialize;
 
   {
-    const f_status_t status = f_statuss_decimate_by(length, 0);
+    const f_status_t status = f_statuss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_statuss_decimate_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index cd317d30d96a51147c6c12954fef027bfb00f18c..f999d0cb7c2378846f076b915c73e823d38e4dc9 100644 (file)
 #define _TEST__F_type_array__statuss_decimate_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_statuss_decimate_by()
+ * @see f_statuss_decimate_by()
  */
-extern void test__f_type_array_statuss_decimate_by__works(void **state);
+extern void test__f_type_array_statuss_decimate_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_statuss_decimate_by()
+ * @see f_statuss_decimate_by()
  */
-extern void test__f_type_array_statuss_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_statuss_decimate_by__works(void **state);
 
 #endif // _TEST__F_type_array__statuss_decimate_by
index 24bcde4b1f2e953de21d568bf336cb2b3a4cad92..1c92e8db3216b5e72d3b2032942272316b4bc292 100644 (file)
@@ -5,23 +5,15 @@
 extern "C" {
 #endif
 
-void test__f_type_array_statuss_decrease_by__works(void **state) {
+void test__f_type_array_statuss_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_statuss_t data = f_statuss_t_initialize;
 
   {
-    const f_status_t status = f_statuss_resize(length, &data);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_statuss_decrease_by(length, &data);
+    const f_status_t status = f_statuss_decrease_by(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
@@ -29,15 +21,23 @@ void test__f_type_array_statuss_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_statuss_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_statuss_decrease_by__works(void **state) {
 
   const int length = 5;
   f_statuss_t data = f_statuss_t_initialize;
 
   {
-    const f_status_t status = f_statuss_decrease_by(length, 0);
+    const f_status_t status = f_statuss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_statuss_decrease_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index 52aef547ef0c8ccff2bcea4e6529776335e6beb3..523c47c0b3785147ce62d6492c02e665b09176b4 100644 (file)
 #define _TEST__F_type_array__statuss_decrease_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_statuss_decrease_by()
+ * @see f_statuss_decrease_by()
  */
-extern void test__f_type_array_statuss_decrease_by__works(void **state);
+extern void test__f_type_array_statuss_decrease_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_statuss_decrease_by()
+ * @see f_statuss_decrease_by()
  */
-extern void test__f_type_array_statuss_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_statuss_decrease_by__works(void **state);
 
 #endif // _TEST__F_type_array__statuss_decrease_by
index 5d68d7a07197f35845ded58f5778b3fb35ce1535..a07eb6c9eb1623f96872835bb997637499ea7878 100644 (file)
@@ -5,27 +5,17 @@
 extern "C" {
 #endif
 
-void test__f_type_array_statuss_increase__works(void **state) {
+void test__f_type_array_statuss_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_statuss_t data = f_statuss_t_initialize;
 
   {
-    const f_status_t status = f_statuss_resize(length, &data);
+    const f_status_t status = f_statuss_increase(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_statuss_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);
+    assert_int_equal(data.size, 0);
   }
 
   free((void *) data.array);
@@ -55,17 +45,27 @@ void test__f_type_array_statuss_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_statuss_increase__parameter_checking(void **state) {
+void test__f_type_array_statuss_increase__works(void **state) {
 
   const int length = 5;
   f_statuss_t data = f_statuss_t_initialize;
 
   {
-    const f_status_t status = f_statuss_increase(length, 0);
+    const f_status_t status = f_statuss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    data.used = length;
+
+    const f_status_t status = f_statuss_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);
index 65a9252e20ffde8567843bc982ad6e83a20858bc..79e9302a2ee90d1a64ff7a8217d4d7005bff9c85 100644 (file)
 #define _TEST__F_type_array__statuss_increase
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_statuss_increase()
+ * @see f_statuss_increase()
  */
-extern void test__f_type_array_statuss_increase__works(void **state);
+extern void test__f_type_array_statuss_increase__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_statuss_increase()
+ * @see f_statuss_increase()
  */
 extern void test__f_type_array_statuss_increase__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_statuss_increase()
+ * @see f_statuss_increase()
  */
-extern void test__f_type_array_statuss_increase__parameter_checking(void **state);
+extern void test__f_type_array_statuss_increase__works(void **state);
 
 #endif // _TEST__F_type_array__statuss_increase
index f828eaa829b03af7e598eaf71627ad30786503e0..5cc7bd6b4012e59776cda2d972ed70f99bc31185 100644 (file)
@@ -5,6 +5,23 @@
 extern "C" {
 #endif
 
+
+void test__f_type_array_statuss_increase_by__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_statuss_t data = f_statuss_t_initialize;
+
+  {
+    const f_status_t status = f_statuss_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_type_array_statuss_increase_by__works(void **state) {
 
   const int length = 5;
@@ -31,22 +48,6 @@ void test__f_type_array_statuss_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_statuss_increase_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_statuss_t data = f_statuss_t_initialize;
-
-  {
-    const f_status_t status = f_statuss_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);
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index bdf0fb1c2a698a2762acf0d5c23eab4e6b4b1113..0bed9391d4f3560a11e3ec52a57f0cb584b6ff48 100644 (file)
 #define _TEST__F_type_array__statuss_increase_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_statuss_increase_by()
+ * @see f_statuss_increase_by()
  */
-extern void test__f_type_array_statuss_increase_by__works(void **state);
+extern void test__f_type_array_statuss_increase_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_statuss_increase_by()
+ * @see f_statuss_increase_by()
  */
-extern void test__f_type_array_statuss_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_statuss_increase_by__works(void **state);
 
 #endif // _TEST__F_type_array__statuss_increase_by
index 2ecb2a4c612a000fc518550b26196e05cce6f4a1..94d097d62e51b20d439e84b5f34866ee414b830f 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_statuss_resize__works(void **state) {
+void test__f_type_array_statuss_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_statuss_t data = f_statuss_t_initialize;
 
   {
-    const f_status_t status = f_statuss_resize(length, &data);
+    const f_status_t status = f_statuss_resize(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_statuss_resize__parameter_checking(void **state) {
+void test__f_type_array_statuss_resize__works(void **state) {
 
   const int length = 5;
   f_statuss_t data = f_statuss_t_initialize;
 
   {
-    const f_status_t status = f_statuss_resize(length, 0);
+    const f_status_t status = f_statuss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index 4ce51812a91b274168566febb70c13227de1a259..7a884aec23849d138637c9f134e3dcaf39daaf89 100644 (file)
 #define _TEST__F_type_array__statuss_resize
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_statuss_resize()
+ * @see f_statuss_resize()
  */
-extern void test__f_type_array_statuss_resize__works(void **state);
+extern void test__f_type_array_statuss_resize__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_statuss_resize()
+ * @see f_statuss_resize()
  */
-extern void test__f_type_array_statuss_resize__parameter_checking(void **state);
+extern void test__f_type_array_statuss_resize__works(void **state);
 
 #endif // _TEST__F_type_array__statuss_resize
index d715069858aefbe654e62af24ed9494cf8f06acc..80c78991d44caccec7957e6432ddbdd1fccf4cb6 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_statusss_adjust__works(void **state) {
+void test__f_type_array_statusss_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_statusss_t data = f_statusss_t_initialize;
 
   {
-    const f_status_t status = f_statusss_adjust(length, &data);
+    const f_status_t status = f_statusss_adjust(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_statusss_adjust__parameter_checking(void **state) {
+void test__f_type_array_statusss_adjust__works(void **state) {
 
   const int length = 5;
   f_statusss_t data = f_statusss_t_initialize;
 
   {
-    const f_status_t status = f_statusss_adjust(length, 0);
+    const f_status_t status = f_statusss_adjust(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index 2e7f4e8ebd532fc56ed2a8a84cd3b9b40eee07e4..b57ba175fbc18722eeaa101a371d7378479a98e5 100644 (file)
 #define _TEST__F_type_array__statusss_adjust
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_statusss_adjust()
+ * @see f_statusss_adjust()
  */
-extern void test__f_type_array_statusss_adjust__works(void **state);
+extern void test__f_type_array_statusss_adjust__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_statusss_adjust()
+ * @see f_statusss_adjust()
  */
-extern void test__f_type_array_statusss_adjust__parameter_checking(void **state);
+extern void test__f_type_array_statusss_adjust__works(void **state);
 
 #endif // _TEST__F_type_array__statusss_adjust
index a0ddc4278d83ea4b3417fdc0878ae23567051238..a713c2c5b3e6bc66f2790f7d21ea0b4cf0526bb2 100644 (file)
@@ -5,7 +5,18 @@
 extern "C" {
 #endif
 
-void test__f_type_array_statusss_append__works(void **state) {
+void test__f_type_array_statusss_append__parameter_checking(void **state) {
+
+  f_statuss_t data = f_statuss_t_initialize;
+
+  {
+    const f_status_t status = f_statusss_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_statusss_append__returns_data_not(void **state) {
 
   const int length = 5;
   f_statuss_t source = f_statuss_t_initialize;
@@ -19,32 +30,19 @@ void test__f_type_array_statusss_append__works(void **state) {
     assert_int_equal(source.size, length);
   }
 
-  for (; source.used < length; ++source.used) {
-    source.array[source.used] = source.used + 1;
-  } // for
-
   {
     const f_status_t status = f_statusss_append(source, &destination);
 
-    assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, 1);
-    assert_int_equal(destination.array[0].used, source.used);
-    assert_int_equal(destination.array[0].size, source.used);
-
-    for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
-      assert_int_equal(destination.array[0].array[i], i + 1);
-    } // for
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
   }
 
-  for (f_array_length_t i = 0; i < destination.used; ++i) {
-    free((void *) destination.array[i].array);
-  } // for
-
   free((void *) source.array);
-  free((void *) destination.array);
 }
 
-void test__f_type_array_statusss_append__returns_data_not(void **state) {
+void test__f_type_array_statusss_append__works(void **state) {
 
   const int length = 5;
   f_statuss_t source = f_statuss_t_initialize;
@@ -58,27 +56,29 @@ void test__f_type_array_statusss_append__returns_data_not(void **state) {
     assert_int_equal(source.size, length);
   }
 
+  for (; source.used < length; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
+
   {
     const f_status_t status = f_statusss_append(source, &destination);
 
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
-  }
-
-  free((void *) source.array);
-}
-
-void test__f_type_array_statusss_append__parameter_checking(void **state) {
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0].used, source.used);
+    assert_int_equal(destination.array[0].size, source.used);
 
-  f_statuss_t data = f_statuss_t_initialize;
+    for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
+      assert_int_equal(destination.array[0].array[i], i + 1);
+    } // for
+  }
 
-  {
-    const f_status_t status = f_statusss_append(data, 0);
+  for (f_array_length_t i = 0; i < destination.used; ++i) {
+    free((void *) destination.array[i].array);
+  } // for
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
+  free((void *) source.array);
+  free((void *) destination.array);
 }
 
 #ifdef __cplusplus
index 89b921e9a9020684f9ced17671cfaf82bbbbd4e7..e7e8782e37a372a576f27e3e4037487dd1a9570c 100644 (file)
 #define _TEST__F_type_array__statusss_append
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_statusss_append()
+ * @see f_statusss_append()
  */
-extern void test__f_type_array_statusss_append__works(void **state);
+extern void test__f_type_array_statusss_append__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_statusss_append()
+ * @see f_statusss_append()
  */
 extern void test__f_type_array_statusss_append__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_statusss_append()
+ * @see f_statusss_append()
  */
-extern void test__f_type_array_statusss_append__parameter_checking(void **state);
+extern void test__f_type_array_statusss_append__works(void **state);
 
 #endif // _TEST__F_type_array__statusss_append
index b0b13a1ebdc57be980450417333a279a3fd36d8b..213074ad47af8461c2b3705164cf2a03e0ac7aa4 100644 (file)
@@ -5,6 +5,43 @@
 extern "C" {
 #endif
 
+void test__f_type_array_statusss_append_all__parameter_checking(void **state) {
+
+  const f_statusss_t data = f_statusss_t_initialize;
+
+  {
+    const f_status_t status = f_statusss_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_statusss_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_statusss_t source = f_statusss_t_initialize;
+  f_statusss_t destination = f_statusss_t_initialize;
+
+  {
+    const f_status_t status = f_statusss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_statusss_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
 void test__f_type_array_statusss_append_all__works(void **state) {
 
   const int length = 5;
@@ -63,43 +100,6 @@ void test__f_type_array_statusss_append_all__works(void **state) {
   free((void *) destination.array);
 }
 
-void test__f_type_array_statusss_append_all__returns_data_not(void **state) {
-
-  const int length = 5;
-  f_statusss_t source = f_statusss_t_initialize;
-  f_statusss_t destination = f_statusss_t_initialize;
-
-  {
-    const f_status_t status = f_statusss_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  {
-    const f_status_t status = f_statusss_append_all(source, &destination);
-
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
-  }
-
-  free((void *) source.array);
-}
-
-void test__f_type_array_statusss_append_all__parameter_checking(void **state) {
-
-  const f_statusss_t data = f_statusss_t_initialize;
-
-  {
-    const f_status_t status = f_statusss_append_all(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 54ac1cff72d1069eb7108da16303d3b76fe915bd..bcbcd205d21ed96feb3d65bd301fe6571f41d350 100644 (file)
 #define _TEST__F_type_array__statusss_append_all
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_statusss_append_all()
+ * @see f_statusss_append_all()
  */
-extern void test__f_type_array_statusss_append_all__works(void **state);
+extern void test__f_type_array_statusss_append_all__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_statusss_append_all()
+ * @see f_statusss_append_all()
  */
 extern void test__f_type_array_statusss_append_all__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_statusss_append_all()
+ * @see f_statusss_append_all()
  */
-extern void test__f_type_array_statusss_append_all__parameter_checking(void **state);
+extern void test__f_type_array_statusss_append_all__works(void **state);
 
 #endif // _TEST__F_type_array__statusss_append_all
index 8a7b0411d1c6b3e2e7c8e59065cc30eabb0f4114..7265fd4cd132815e01a420e5d06677b180445a80 100644 (file)
@@ -5,12 +5,28 @@
 extern "C" {
 #endif
 
-void test__f_type_array_statusss_decimate_by__works(void **state) {
+void test__f_type_array_statusss_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_statusss_t data = f_statuss_t_initialize;
 
   {
+    const f_status_t status = f_statusss_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_type_array_statusss_decimate_by__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_statusss_t data = f_statusss_t_initialize;
+
+  {
     const f_status_t status = f_statusss_resize(length, &data);
 
     assert_int_equal(status, F_none);
@@ -19,25 +35,33 @@ void test__f_type_array_statusss_decimate_by__works(void **state) {
   }
 
   {
-    const f_status_t status = f_statusss_decimate_by(length, &data);
+    const f_status_t status = f_statusss_decimate_by(0, &data);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_data_not);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
-void test__f_type_array_statusss_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_statusss_decimate_by__works(void **state) {
 
   const int length = 5;
   f_statusss_t data = f_statuss_t_initialize;
 
   {
-    const f_status_t status = f_statusss_decimate_by(length, 0);
+    const f_status_t status = f_statusss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_statusss_decimate_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index 79428b90da9c7110e51b9a8fccfbd38be44cd560..41fb24dbae72d3b7f6a59cf98de23b50341097c2 100644 (file)
 #define _TEST__F_type_array__statusss_decimate_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_statusss_decimate_by()
+ * @see f_statusss_decimate_by()
  */
-extern void test__f_type_array_statusss_decimate_by__works(void **state);
+extern void test__f_type_array_statusss_decimate_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
  * @see f_type_array_statusss_decimate_by()
  */
-extern void test__f_type_array_statusss_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_statusss_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_statusss_decimate_by()
+ */
+extern void test__f_type_array_statusss_decimate_by__works(void **state);
 
 #endif // _TEST__F_type_array__statusss_decimate_by
index 19b69cebc88b3857f5b09678248e2bf96d11373f..43e408cb8a7127299eac1934ff568b80ad2faedc 100644 (file)
@@ -5,12 +5,28 @@
 extern "C" {
 #endif
 
-void test__f_type_array_statusss_decrease_by__works(void **state) {
+void test__f_type_array_statusss_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_statusss_t data = f_statuss_t_initialize;
 
   {
+    const f_status_t status = f_statusss_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_type_array_statusss_decrease_by__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_statusss_t data = f_statusss_t_initialize;
+
+  {
     const f_status_t status = f_statusss_resize(length, &data);
 
     assert_int_equal(status, F_none);
@@ -19,25 +35,33 @@ void test__f_type_array_statusss_decrease_by__works(void **state) {
   }
 
   {
-    const f_status_t status = f_statusss_decrease_by(length, &data);
+    const f_status_t status = f_statusss_decrease_by(0, &data);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_data_not);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
-void test__f_type_array_statusss_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_statusss_decrease_by__works(void **state) {
 
   const int length = 5;
   f_statusss_t data = f_statuss_t_initialize;
 
   {
-    const f_status_t status = f_statusss_decrease_by(length, 0);
+    const f_status_t status = f_statusss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_statusss_decrease_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index e780d3ffa68c9f1e2f48be5144235d7c1e5d6ddb..987d77108dc5b5159c61cc9ad3b43b0c29a7a380 100644 (file)
 #define _TEST__F_type_array__statusss_decrease_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_statusss_decrease_by()
+ * @see f_statusss_decrease_by()
  */
-extern void test__f_type_array_statusss_decrease_by__works(void **state);
+extern void test__f_type_array_statusss_decrease_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_statusss_decrease_by()
+ * @see f_statusss_decrease_by()
  */
-extern void test__f_type_array_statusss_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_statusss_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_statusss_decrease_by()
+ */
+extern void test__f_type_array_statusss_decrease_by__works(void **state);
 
 #endif // _TEST__F_type_array__statusss_decrease_by
index b0476ae49ec007c99881ebb9ead8f59611c1bbd0..ec29f02337c39c9a61840abfe98bad3a7d4ff5b5 100644 (file)
@@ -5,27 +5,17 @@
 extern "C" {
 #endif
 
-void test__f_type_array_statusss_increase__works(void **state) {
+void test__f_type_array_statusss_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_statusss_t data = f_statuss_t_initialize;
 
   {
-    const f_status_t status = f_statusss_resize(length, &data);
+    const f_status_t status = f_statusss_increase(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_statusss_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);
+    assert_int_equal(data.size, 0);
   }
 
   free((void *) data.array);
@@ -55,17 +45,27 @@ void test__f_type_array_statusss_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_statusss_increase__parameter_checking(void **state) {
+void test__f_type_array_statusss_increase__works(void **state) {
 
   const int length = 5;
   f_statusss_t data = f_statuss_t_initialize;
 
   {
-    const f_status_t status = f_statusss_increase(length, 0);
+    const f_status_t status = f_statusss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    data.used = length;
+
+    const f_status_t status = f_statusss_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);
index 18a1cabd13d4c529df86fabfcb1e94dffc0517bb..3c925eebb9022f17ac4d39f5eaa81278d46d7e70 100644 (file)
 #define _TEST__F_type_array__statusss_increase
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_statusss_increase()
+ * @see f_statusss_increase()
  */
-extern void test__f_type_array_statusss_increase__works(void **state);
+extern void test__f_type_array_statusss_increase__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_statusss_increase()
+ * @see f_statusss_increase()
  */
 extern void test__f_type_array_statusss_increase__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_statusss_increase()
+ * @see f_statusss_increase()
  */
-extern void test__f_type_array_statusss_increase__parameter_checking(void **state);
+extern void test__f_type_array_statusss_increase__works(void **state);
 
 #endif // _TEST__F_type_array__statusss_increase
index 0e980331d37449257cbaa3108e7647fa2baabd5d..5a12068272ac406c232bef4a9971def2dd5a7efe 100644 (file)
@@ -5,12 +5,28 @@
 extern "C" {
 #endif
 
-void test__f_type_array_statusss_increase_by__works(void **state) {
+void test__f_type_array_statusss_increase_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_statusss_t data = f_statuss_t_initialize;
 
   {
+    const f_status_t status = f_statusss_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_type_array_statusss_increase_by__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_statusss_t data = f_statusss_t_initialize;
+
+  {
     const f_status_t status = f_statusss_resize(length, &data);
 
     assert_int_equal(status, F_none);
@@ -19,32 +35,48 @@ void test__f_type_array_statusss_increase_by__works(void **state) {
   }
 
   {
-    data.used = length;
+    const f_status_t status = f_statusss_increase_by(0, &data);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
 
+  {
     const f_status_t status = f_statusss_increase_by(length, &data);
 
-    assert_int_equal(status, F_none);
-    assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
   }
 
   free((void *) data.array);
 }
 
-void test__f_type_array_statusss_increase_by__parameter_checking(void **state) {
+void test__f_type_array_statusss_increase_by__works(void **state) {
 
   const int length = 5;
   f_statusss_t data = f_statuss_t_initialize;
 
   {
-    const f_status_t status = f_statusss_increase_by(length, 0);
+    const f_status_t status = f_statusss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  {
+    data.used = length;
+
+    const f_status_t status = f_statusss_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
index 203c72adae85cf362f0388fe6ece6e7d42dde6f3..da2d85d8f4b19170cddab08157bf141dd27bedeb 100644 (file)
 #define _TEST__F_type_array__statusss_increase_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_statusss_increase_by()
+ * @see f_statusss_increase_by()
  */
-extern void test__f_type_array_statusss_increase_by__works(void **state);
+extern void test__f_type_array_statusss_increase_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_statusss_increase_by()
+ * @see f_statusss_increase_by()
  */
-extern void test__f_type_array_statusss_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_statusss_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_statusss_increase_by()
+ */
+extern void test__f_type_array_statusss_increase_by__works(void **state);
 
 #endif // _TEST__F_type_array__statusss_increase_by
index b3ecfda6425d16020fa6bb2a6af63e0df6f25ce8..39aa72d6fa5fd539116520ecd4af60b998c2a766 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_statusss_resize__works(void **state) {
+void test__f_type_array_statusss_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_statusss_t data = f_statusss_t_initialize;
 
   {
-    const f_status_t status = f_statusss_resize(length, &data);
+    const f_status_t status = f_statusss_resize(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_statusss_resize__parameter_checking(void **state) {
+void test__f_type_array_statusss_resize__works(void **state) {
 
   const int length = 5;
   f_statusss_t data = f_statusss_t_initialize;
 
   {
-    const f_status_t status = f_statusss_resize(length, 0);
+    const f_status_t status = f_statusss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index e95a2dee754509ad37377f9dd8085484b8694f97..d76761c8c993e3770d2248e1e8e400e9676472f8 100644 (file)
 #define _TEST__F_type_array__statusss_resize
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_statusss_resize()
+ * @see f_statusss_resize()
  */
-extern void test__f_type_array_statusss_resize__works(void **state);
+extern void test__f_type_array_statusss_resize__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_statusss_resize()
+ * @see f_statusss_resize()
  */
-extern void test__f_type_array_statusss_resize__parameter_checking(void **state);
+extern void test__f_type_array_statusss_resize__works(void **state);
 
 #endif // _TEST__F_type_array__statusss_resize
index 37025d71fd04c14fe79a69ab003e79c57fc26ff4..ffe29377089fd18d1cc7a6486908dcad494ff498 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint128s_adjust__works(void **state) {
+void test__f_type_array_uint128s_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint128s_t data = f_uint128s_t_initialize;
 
   {
-    const f_status_t status = f_uint128s_adjust(length, &data);
+    const f_status_t status = f_uint128s_adjust(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_uint128s_adjust__parameter_checking(void **state) {
+void test__f_type_array_uint128s_adjust__works(void **state) {
 
   const int length = 5;
   f_uint128s_t data = f_uint128s_t_initialize;
 
   {
-    const f_status_t status = f_uint128s_adjust(length, 0);
+    const f_status_t status = f_uint128s_adjust(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index 6315a5dc4bc6a8de68295471408eb0c5d7713c1e..251a1d40f3998bc29e6aa140fd2641cb43ee2b1e 100644 (file)
 #define _TEST__F_type_array__uint128s_adjust
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint128s_adjust()
+ * @see f_uint128s_adjust()
  */
-extern void test__f_type_array_uint128s_adjust__works(void **state);
+extern void test__f_type_array_uint128s_adjust__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint128s_adjust()
+ * @see f_uint128s_adjust()
  */
-extern void test__f_type_array_uint128s_adjust__parameter_checking(void **state);
+extern void test__f_type_array_uint128s_adjust__works(void **state);
 
 #endif // _TEST__F_type_array__uint128s_adjust
index 516e45077dc50b922280a4a8c2bab555d2bc7029..e460075952f9cd26d323cc61ad95af9fa292673b 100644 (file)
@@ -5,6 +5,17 @@
 extern "C" {
 #endif
 
+void test__f_type_array_uint128s_append__parameter_checking(void **state) {
+
+  const uint128_t data = 0;
+
+  {
+    const f_status_t status = f_uint128s_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
 void test__f_type_array_uint128s_append__works(void **state) {
 
   const uint128_t source = 3;
@@ -21,17 +32,6 @@ void test__f_type_array_uint128s_append__works(void **state) {
   free((void *) destination.array);
 }
 
-void test__f_type_array_uint128s_append__parameter_checking(void **state) {
-
-  const uint128_t data = 0;
-
-  {
-    const f_status_t status = f_uint128s_append(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 93ccaf10a90d1145e269e68c3a4a371defaae478..1580565c6450e0dca6973edc3be77e11a7843039 100644 (file)
 #define _TEST__F_type_array__uint128s_append
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint128s_append()
+ * @see f_uint128s_append()
  */
-extern void test__f_type_array_uint128s_append__works(void **state);
+extern void test__f_type_array_uint128s_append__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint128s_append()
+ * @see f_uint128s_append()
  */
-extern void test__f_type_array_uint128s_append__parameter_checking(void **state);
+extern void test__f_type_array_uint128s_append__works(void **state);
 
 #endif // _TEST__F_type_array__uint128s_append
index afbad49bc0172c5cbadfbafeecf13527475a4d08..65226e5dd401f8e605e940bbb3e99475bce6df18 100644 (file)
@@ -5,10 +5,20 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint128s_append_all__works(void **state) {
+void test__f_type_array_uint128s_append_all__parameter_checking(void **state) {
+
+  const f_uint128s_t data = f_uint128s_t_initialize;
+
+  {
+    const f_status_t status = f_uint128s_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_uint128s_append_all__returns_data_not(void **state) {
 
   const int length = 5;
-  const int length_used = 2;
   f_uint128s_t source = f_uint128s_t_initialize;
   f_uint128s_t destination = f_uint128s_t_initialize;
 
@@ -20,29 +30,22 @@ void test__f_type_array_uint128s_append_all__works(void **state) {
     assert_int_equal(source.size, length);
   }
 
-  for (; source.used < length_used; ++source.used) {
-    source.array[source.used] = source.used + 1;
-  } // for
-
   {
     const f_status_t status = f_uint128s_append_all(source, &destination);
 
-    assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
-
-    for (f_array_length_t i = 0; i < source.used; ++i) {
-      assert_int_equal(destination.array[i], i + 1);
-    } // for
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
   }
 
   free((void *) source.array);
-  free((void *) destination.array);
 }
 
-void test__f_type_array_uint128s_append_all__returns_data_not(void **state) {
+void test__f_type_array_uint128s_append_all__works(void **state) {
 
   const int length = 5;
+  const int length_used = 2;
   f_uint128s_t source = f_uint128s_t_initialize;
   f_uint128s_t destination = f_uint128s_t_initialize;
 
@@ -54,27 +57,24 @@ void test__f_type_array_uint128s_append_all__returns_data_not(void **state) {
     assert_int_equal(source.size, length);
   }
 
+  for (; source.used < length_used; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
+
   {
     const f_status_t status = f_uint128s_append_all(source, &destination);
 
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < source.used; ++i) {
+      assert_int_equal(destination.array[i], i + 1);
+    } // for
   }
 
   free((void *) source.array);
-}
-
-void test__f_type_array_uint128s_append_all__parameter_checking(void **state) {
-
-  const f_uint128s_t data = f_uint128s_t_initialize;
-
-  {
-    const f_status_t status = f_uint128s_append_all(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
+  free((void *) destination.array);
 }
 
 #ifdef __cplusplus
index 40d61c78cf72dedde567917f875040a9e38eb9a5..8fcbcf7b5e68fde1f8e89df1ec77c94fe7197833 100644 (file)
 #define _TEST__F_type_array__uint128s_append_all
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint128s_append_all()
+ * @see f_uint128s_append_all()
  */
-extern void test__f_type_array_uint128s_append_all__works(void **state);
+extern void test__f_type_array_uint128s_append_all__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_uint128s_append_all()
+ * @see f_uint128s_append_all()
  */
 extern void test__f_type_array_uint128s_append_all__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint128s_append_all()
+ * @see f_uint128s_append_all()
  */
-extern void test__f_type_array_uint128s_append_all__parameter_checking(void **state);
+extern void test__f_type_array_uint128s_append_all__works(void **state);
 
 #endif // _TEST__F_type_array__uint128s_append_all
index d082f439fea760fd7da5aa6974702795e9f047b2..256d110e821f3029a2da97434bff0f1a652d7caf 100644 (file)
@@ -5,23 +5,15 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint128s_decimate_by__works(void **state) {
+void test__f_type_array_uint128s_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint128s_t data = f_uint128s_t_initialize;
 
   {
-    const f_status_t status = f_uint128s_resize(length, &data);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_uint128s_decimate_by(length, &data);
+    const f_status_t status = f_uint128s_decimate_by(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
@@ -29,15 +21,23 @@ void test__f_type_array_uint128s_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_uint128s_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_uint128s_decimate_by__works(void **state) {
 
   const int length = 5;
   f_uint128s_t data = f_uint128s_t_initialize;
 
   {
-    const f_status_t status = f_uint128s_decimate_by(length, 0);
+    const f_status_t status = f_uint128s_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_uint128s_decimate_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index a4f4356c4c5637ca9aa8639a8a59b095666744ed..bccbadadc4f0a0376742345afff4aed4fe178d69 100644 (file)
 #define _TEST__F_type_array__uint128s_decimate_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint128s_decimate_by()
+ * @see f_uint128s_decimate_by()
  */
-extern void test__f_type_array_uint128s_decimate_by__works(void **state);
+extern void test__f_type_array_uint128s_decimate_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint128s_decimate_by()
+ * @see f_uint128s_decimate_by()
  */
-extern void test__f_type_array_uint128s_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_uint128s_decimate_by__works(void **state);
 
 #endif // _TEST__F_type_array__uint128s_decimate_by
index 1d6b42ed45fdc0e0b5b1b7533afd9803f9d3d5c1..a6322721efe3a33ce3e7c5bc68ba27b71d5ed1ce 100644 (file)
@@ -5,23 +5,15 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint128s_decrease_by__works(void **state) {
+void test__f_type_array_uint128s_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint128s_t data = f_uint128s_t_initialize;
 
   {
-    const f_status_t status = f_uint128s_resize(length, &data);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_uint128s_decrease_by(length, &data);
+    const f_status_t status = f_uint128s_decrease_by(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
@@ -29,15 +21,23 @@ void test__f_type_array_uint128s_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_uint128s_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_uint128s_decrease_by__works(void **state) {
 
   const int length = 5;
   f_uint128s_t data = f_uint128s_t_initialize;
 
   {
-    const f_status_t status = f_uint128s_decrease_by(length, 0);
+    const f_status_t status = f_uint128s_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_uint128s_decrease_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index 9c21df093c3cd65424174e843dd49339f8e72a65..a3e3b81ab7f29a59d5eedaff5ffdabd52ebc5699 100644 (file)
 #define _TEST__F_type_array__uint128s_decrease_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint128s_decrease_by()
+ * @see f_uint128s_decrease_by()
  */
-extern void test__f_type_array_uint128s_decrease_by__works(void **state);
+extern void test__f_type_array_uint128s_decrease_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint128s_decrease_by()
+ * @see f_uint128s_decrease_by()
  */
-extern void test__f_type_array_uint128s_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_uint128s_decrease_by__works(void **state);
 
 #endif // _TEST__F_type_array__uint128s_decrease_by
index 5a8143f495d9eeff9c4f4b7caefdb1e3290a346c..8987e3618dfd964355c156f36743cc3ca98b348c 100644 (file)
@@ -5,27 +5,17 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint128s_increase__works(void **state) {
+void test__f_type_array_uint128s_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint128s_t data = f_uint128s_t_initialize;
 
   {
-    const f_status_t status = f_uint128s_resize(length, &data);
+    const f_status_t status = f_uint128s_increase(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_uint128s_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);
+    assert_int_equal(data.size, 0);
   }
 
   free((void *) data.array);
@@ -55,17 +45,27 @@ void test__f_type_array_uint128s_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint128s_increase__parameter_checking(void **state) {
+void test__f_type_array_uint128s_increase__works(void **state) {
 
   const int length = 5;
   f_uint128s_t data = f_uint128s_t_initialize;
 
   {
-    const f_status_t status = f_uint128s_increase(length, 0);
+    const f_status_t status = f_uint128s_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    data.used = length;
+
+    const f_status_t status = f_uint128s_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);
index 94e707935d7181604cdffc12eac087fc600d08aa..600a18a1b9a2002e86e004e56420766615387a48 100644 (file)
 #define _TEST__F_type_array__uint128s_increase
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint128s_increase()
+ * @see f_uint128s_increase()
  */
-extern void test__f_type_array_uint128s_increase__works(void **state);
+extern void test__f_type_array_uint128s_increase__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_uint128s_increase()
+ * @see f_uint128s_increase()
  */
 extern void test__f_type_array_uint128s_increase__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint128s_increase()
+ * @see f_uint128s_increase()
  */
-extern void test__f_type_array_uint128s_increase__parameter_checking(void **state);
+extern void test__f_type_array_uint128s_increase__works(void **state);
 
 #endif // _TEST__F_type_array__uint128s_increase
index 0cd3697001129a38c74ddcdb152e616434ef19b3..8a3424d7290aede11789b5194f42d989ea00928c 100644 (file)
@@ -5,6 +5,22 @@
 extern "C" {
 #endif
 
+void test__f_type_array_uint128s_increase_by__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_uint128s_t data = f_uint128s_t_initialize;
+
+  {
+    const f_status_t status = f_uint128s_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_type_array_uint128s_increase_by__works(void **state) {
 
   const int length = 5;
@@ -31,22 +47,6 @@ void test__f_type_array_uint128s_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint128s_increase_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_uint128s_t data = f_uint128s_t_initialize;
-
-  {
-    const f_status_t status = f_uint128s_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);
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 90317acbdc9f2e96749bb97667ac3023fd045903..9200183f914d482c961a9b21d7388a12a5a02a5c 100644 (file)
 #define _TEST__F_type_array__uint128s_increase_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint128s_increase_by()
+ * @see f_uint128s_increase_by()
  */
-extern void test__f_type_array_uint128s_increase_by__works(void **state);
+extern void test__f_type_array_uint128s_increase_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint128s_increase_by()
+ * @see f_uint128s_increase_by()
  */
-extern void test__f_type_array_uint128s_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_uint128s_increase_by__works(void **state);
 
 #endif // _TEST__F_type_array__uint128s_increase_by
index 65dcf2971a901626119edc6f7effa32160f61fad..b9bac74823bd01195365696f677f60de16f8c03a 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint128s_resize__works(void **state) {
+void test__f_type_array_uint128s_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint128s_t data = f_uint128s_t_initialize;
 
   {
-    const f_status_t status = f_uint128s_resize(length, &data);
+    const f_status_t status = f_uint128s_resize(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_uint128s_resize__parameter_checking(void **state) {
+void test__f_type_array_uint128s_resize__works(void **state) {
 
   const int length = 5;
   f_uint128s_t data = f_uint128s_t_initialize;
 
   {
-    const f_status_t status = f_uint128s_resize(length, 0);
+    const f_status_t status = f_uint128s_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index e21448d6884a05cd155e71f0455640ccb45d9e22..50cf77afd65cf1d754e4fb4d34a953ad71cebef6 100644 (file)
 #define _TEST__F_type_array__uint128s_resize
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint128s_resize()
+ * @see f_uint128s_resize()
  */
-extern void test__f_type_array_uint128s_resize__works(void **state);
+extern void test__f_type_array_uint128s_resize__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint128s_resize()
+ * @see f_uint128s_resize()
  */
-extern void test__f_type_array_uint128s_resize__parameter_checking(void **state);
+extern void test__f_type_array_uint128s_resize__works(void **state);
 
 #endif // _TEST__F_type_array__uint128s_resize
index 224e6354208f38240be2a3a38475be2c93f8386a..d42630b3bcfefe45fb434e35f2214e259a512e0b 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint128ss_adjust__works(void **state) {
+void test__f_type_array_uint128ss_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint128ss_t data = f_uint128ss_t_initialize;
 
   {
-    const f_status_t status = f_uint128ss_adjust(length, &data);
+    const f_status_t status = f_uint128ss_adjust(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_uint128ss_adjust__parameter_checking(void **state) {
+void test__f_type_array_uint128ss_adjust__works(void **state) {
 
   const int length = 5;
   f_uint128ss_t data = f_uint128ss_t_initialize;
 
   {
-    const f_status_t status = f_uint128ss_adjust(length, 0);
+    const f_status_t status = f_uint128ss_adjust(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index 3a0bcde0212ebda01368241f6a184832a8b5ddb4..75f000a1f6105b7d894e3fc88a0645bdb8b63e56 100644 (file)
 #define _TEST__F_type_array__uint128ss_adjust
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint128ss_adjust()
+ * @see f_uint128ss_adjust()
  */
-extern void test__f_type_array_uint128ss_adjust__works(void **state);
+extern void test__f_type_array_uint128ss_adjust__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint128ss_adjust()
+ * @see f_uint128ss_adjust()
  */
-extern void test__f_type_array_uint128ss_adjust__parameter_checking(void **state);
+extern void test__f_type_array_uint128ss_adjust__works(void **state);
 
 #endif // _TEST__F_type_array__uint128ss_adjust
index 50ba45dc791f2991e5d8fb6e0d72c4a4fd3a245c..3887a2258617a8f770f69749cc773ee132eca665 100644 (file)
@@ -5,7 +5,18 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint128ss_append__works(void **state) {
+void test__f_type_array_uint128ss_append__parameter_checking(void **state) {
+
+  f_uint128s_t data = f_uint128s_t_initialize;
+
+  {
+    const f_status_t status = f_uint128ss_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_uint128ss_append__returns_data_not(void **state) {
 
   const int length = 5;
   f_uint128s_t source = f_uint128s_t_initialize;
@@ -19,32 +30,19 @@ void test__f_type_array_uint128ss_append__works(void **state) {
     assert_int_equal(source.size, length);
   }
 
-  for (; source.used < length; ++source.used) {
-    source.array[source.used] = source.used + 1;
-  } // for
-
   {
     const f_status_t status = f_uint128ss_append(source, &destination);
 
-    assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, 1);
-    assert_int_equal(destination.array[0].used, source.used);
-    assert_int_equal(destination.array[0].size, source.used);
-
-    for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
-      assert_int_equal(destination.array[0].array[i], i + 1);
-    } // for
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
   }
 
-  for (f_array_length_t i = 0; i < destination.used; ++i) {
-    free((void *) destination.array[i].array);
-  } // for
-
   free((void *) source.array);
-  free((void *) destination.array);
 }
 
-void test__f_type_array_uint128ss_append__returns_data_not(void **state) {
+void test__f_type_array_uint128ss_append__works(void **state) {
 
   const int length = 5;
   f_uint128s_t source = f_uint128s_t_initialize;
@@ -58,27 +56,29 @@ void test__f_type_array_uint128ss_append__returns_data_not(void **state) {
     assert_int_equal(source.size, length);
   }
 
+  for (; source.used < length; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
+
   {
     const f_status_t status = f_uint128ss_append(source, &destination);
 
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
-  }
-
-  free((void *) source.array);
-}
-
-void test__f_type_array_uint128ss_append__parameter_checking(void **state) {
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0].used, source.used);
+    assert_int_equal(destination.array[0].size, source.used);
 
-  f_uint128s_t data = f_uint128s_t_initialize;
+    for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
+      assert_int_equal(destination.array[0].array[i], i + 1);
+    } // for
+  }
 
-  {
-    const f_status_t status = f_uint128ss_append(data, 0);
+  for (f_array_length_t i = 0; i < destination.used; ++i) {
+    free((void *) destination.array[i].array);
+  } // for
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
+  free((void *) source.array);
+  free((void *) destination.array);
 }
 
 #ifdef __cplusplus
index d019beb4315e60329739a13932efba324702a747..2a0af89d6d34809493340d2a8940ef156806ef46 100644 (file)
 #define _TEST__F_type_array__uint128ss_append
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint128ss_append()
+ * @see f_uint128ss_append()
  */
-extern void test__f_type_array_uint128ss_append__works(void **state);
+extern void test__f_type_array_uint128ss_append__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_uint128ss_append()
+ * @see f_uint128ss_append()
  */
 extern void test__f_type_array_uint128ss_append__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint128ss_append()
+ * @see f_uint128ss_append()
  */
-extern void test__f_type_array_uint128ss_append__parameter_checking(void **state);
+extern void test__f_type_array_uint128ss_append__works(void **state);
 
 #endif // _TEST__F_type_array__uint128ss_append
index a3ca3c07f5bef40c97c0cce18e90b03abd962143..7db15469bb791bfb11b13f6a44414ba2dc5d86ba 100644 (file)
@@ -5,6 +5,43 @@
 extern "C" {
 #endif
 
+void test__f_type_array_uint128ss_append_all__parameter_checking(void **state) {
+
+  const f_uint128ss_t data = f_uint128ss_t_initialize;
+
+  {
+    const f_status_t status = f_uint128ss_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_uint128ss_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_uint128ss_t source = f_uint128ss_t_initialize;
+  f_uint128ss_t destination = f_uint128ss_t_initialize;
+
+  {
+    const f_status_t status = f_uint128ss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_uint128ss_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
 void test__f_type_array_uint128ss_append_all__works(void **state) {
 
   const int length = 5;
@@ -63,43 +100,6 @@ void test__f_type_array_uint128ss_append_all__works(void **state) {
   free((void *) destination.array);
 }
 
-void test__f_type_array_uint128ss_append_all__returns_data_not(void **state) {
-
-  const int length = 5;
-  f_uint128ss_t source = f_uint128ss_t_initialize;
-  f_uint128ss_t destination = f_uint128ss_t_initialize;
-
-  {
-    const f_status_t status = f_uint128ss_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  {
-    const f_status_t status = f_uint128ss_append_all(source, &destination);
-
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
-  }
-
-  free((void *) source.array);
-}
-
-void test__f_type_array_uint128ss_append_all__parameter_checking(void **state) {
-
-  const f_uint128ss_t data = f_uint128ss_t_initialize;
-
-  {
-    const f_status_t status = f_uint128ss_append_all(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 0b10466016bf40ce979862a8508260c605f43062..f727d4c7dbeae134177b8ac4ef1c76aca3ea1c60 100644 (file)
 #define _TEST__F_type_array__uint128ss_append_all
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint128ss_append_all()
+ * @see f_uint128ss_append_all()
  */
-extern void test__f_type_array_uint128ss_append_all__works(void **state);
+extern void test__f_type_array_uint128ss_append_all__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_uint128ss_append_all()
+ * @see f_uint128ss_append_all()
  */
 extern void test__f_type_array_uint128ss_append_all__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint128ss_append_all()
+ * @see f_uint128ss_append_all()
  */
-extern void test__f_type_array_uint128ss_append_all__parameter_checking(void **state);
+extern void test__f_type_array_uint128ss_append_all__works(void **state);
 
 #endif // _TEST__F_type_array__uint128ss_append_all
index c5f8994f415cb3e492e19813ee7c50d8b4aefba1..71e42e27d5fe307be8bc1c6d29d4a7e52733b3d9 100644 (file)
@@ -5,12 +5,28 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint128ss_decimate_by__works(void **state) {
+void test__f_type_array_uint128ss_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint128ss_t data = f_uint128s_t_initialize;
 
   {
+    const f_status_t status = f_uint128ss_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_type_array_uint128ss_decimate_by__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_uint128ss_t data = f_uint128ss_t_initialize;
+
+  {
     const f_status_t status = f_uint128ss_resize(length, &data);
 
     assert_int_equal(status, F_none);
@@ -19,25 +35,33 @@ void test__f_type_array_uint128ss_decimate_by__works(void **state) {
   }
 
   {
-    const f_status_t status = f_uint128ss_decimate_by(length, &data);
+    const f_status_t status = f_uint128ss_decimate_by(0, &data);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_data_not);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
-void test__f_type_array_uint128ss_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_uint128ss_decimate_by__works(void **state) {
 
   const int length = 5;
   f_uint128ss_t data = f_uint128s_t_initialize;
 
   {
-    const f_status_t status = f_uint128ss_decimate_by(length, 0);
+    const f_status_t status = f_uint128ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_uint128ss_decimate_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index 763184e5678aaf98fdf2da1d97ed619a3cfa0527..67ed15a70f5ba491edacd354cc9c9e878eda5bc3 100644 (file)
 #define _TEST__F_type_array__uint128ss_decimate_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint128ss_decimate_by()
+ * @see f_uint128ss_decimate_by()
  */
-extern void test__f_type_array_uint128ss_decimate_by__works(void **state);
+extern void test__f_type_array_uint128ss_decimate_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
  * @see f_type_array_uint128ss_decimate_by()
  */
-extern void test__f_type_array_uint128ss_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_uint128ss_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint128ss_decimate_by()
+ */
+extern void test__f_type_array_uint128ss_decimate_by__works(void **state);
 
 #endif // _TEST__F_type_array__uint128ss_decimate_by
index e8d7ee58e113b84494733d8702bedbcdbe820282..59f7298c9ffdc36be261f19b99e7ab1dfcd86a52 100644 (file)
@@ -5,12 +5,28 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint128ss_decrease_by__works(void **state) {
+void test__f_type_array_uint128ss_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint128ss_t data = f_uint128s_t_initialize;
 
   {
+    const f_status_t status = f_uint128ss_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_type_array_uint128ss_decrease_by__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_uint128ss_t data = f_uint128ss_t_initialize;
+
+  {
     const f_status_t status = f_uint128ss_resize(length, &data);
 
     assert_int_equal(status, F_none);
@@ -19,25 +35,33 @@ void test__f_type_array_uint128ss_decrease_by__works(void **state) {
   }
 
   {
-    const f_status_t status = f_uint128ss_decrease_by(length, &data);
+    const f_status_t status = f_uint128ss_decrease_by(0, &data);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_data_not);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
-void test__f_type_array_uint128ss_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_uint128ss_decrease_by__works(void **state) {
 
   const int length = 5;
   f_uint128ss_t data = f_uint128s_t_initialize;
 
   {
-    const f_status_t status = f_uint128ss_decrease_by(length, 0);
+    const f_status_t status = f_uint128ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_uint128ss_decrease_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index f6787bcc3a2a09ec468db1e7ac21664257421d6b..2ebace3264f2b4c2dd7bd60a6b4be4400185b79a 100644 (file)
 #define _TEST__F_type_array__uint128ss_decrease_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint128ss_decrease_by()
+ * @see f_uint128ss_decrease_by()
  */
-extern void test__f_type_array_uint128ss_decrease_by__works(void **state);
+extern void test__f_type_array_uint128ss_decrease_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_uint128ss_decrease_by()
+ * @see f_uint128ss_decrease_by()
  */
-extern void test__f_type_array_uint128ss_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_uint128ss_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint128ss_decrease_by()
+ */
+extern void test__f_type_array_uint128ss_decrease_by__works(void **state);
 
 #endif // _TEST__F_type_array__uint128ss_decrease_by
index 85cb58e8d8764bcabb655de37783027f185a36e7..cc5daad2506854104ff450c1fbba7e28f2f3697f 100644 (file)
@@ -5,27 +5,17 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint128ss_increase__works(void **state) {
+void test__f_type_array_uint128ss_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint128ss_t data = f_uint128s_t_initialize;
 
   {
-    const f_status_t status = f_uint128ss_resize(length, &data);
+    const f_status_t status = f_uint128ss_increase(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_uint128ss_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);
+    assert_int_equal(data.size, 0);
   }
 
   free((void *) data.array);
@@ -55,17 +45,27 @@ void test__f_type_array_uint128ss_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint128ss_increase__parameter_checking(void **state) {
+void test__f_type_array_uint128ss_increase__works(void **state) {
 
   const int length = 5;
   f_uint128ss_t data = f_uint128s_t_initialize;
 
   {
-    const f_status_t status = f_uint128ss_increase(length, 0);
+    const f_status_t status = f_uint128ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    data.used = length;
+
+    const f_status_t status = f_uint128ss_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);
index 98a2cce8a6a00c6353660ffcd0126115db4e33e5..b564164148b773d823c5f3da829f90f292e1305a 100644 (file)
 #define _TEST__F_type_array__uint128ss_increase
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint128ss_increase()
+ * @see f_uint128ss_increase()
  */
-extern void test__f_type_array_uint128ss_increase__works(void **state);
+extern void test__f_type_array_uint128ss_increase__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_uint128ss_increase()
+ * @see f_uint128ss_increase()
  */
 extern void test__f_type_array_uint128ss_increase__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint128ss_increase()
+ * @see f_uint128ss_increase()
  */
-extern void test__f_type_array_uint128ss_increase__parameter_checking(void **state);
+extern void test__f_type_array_uint128ss_increase__works(void **state);
 
 #endif // _TEST__F_type_array__uint128ss_increase
index 90ee4a9dfb57953e702b744be05fe97d25bf2ab1..af14f4a11b6958d401f52cc7ea41a5cba277c818 100644 (file)
@@ -5,12 +5,28 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint128ss_increase_by__works(void **state) {
+void test__f_type_array_uint128ss_increase_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint128ss_t data = f_uint128s_t_initialize;
 
   {
+    const f_status_t status = f_uint128ss_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_type_array_uint128ss_increase_by__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_uint128ss_t data = f_uint128ss_t_initialize;
+
+  {
     const f_status_t status = f_uint128ss_resize(length, &data);
 
     assert_int_equal(status, F_none);
@@ -19,32 +35,48 @@ void test__f_type_array_uint128ss_increase_by__works(void **state) {
   }
 
   {
-    data.used = length;
+    const f_status_t status = f_uint128ss_increase_by(0, &data);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
 
+  {
     const f_status_t status = f_uint128ss_increase_by(length, &data);
 
-    assert_int_equal(status, F_none);
-    assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
   }
 
   free((void *) data.array);
 }
 
-void test__f_type_array_uint128ss_increase_by__parameter_checking(void **state) {
+void test__f_type_array_uint128ss_increase_by__works(void **state) {
 
   const int length = 5;
   f_uint128ss_t data = f_uint128s_t_initialize;
 
   {
-    const f_status_t status = f_uint128ss_increase_by(length, 0);
+    const f_status_t status = f_uint128ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  {
+    data.used = length;
+
+    const f_status_t status = f_uint128ss_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
index c1950d8b9f80a69c1a73c6ec906ec2f81baeebb7..c49f80275d74b6ff87195c98029d2ca4315ed318 100644 (file)
 #define _TEST__F_type_array__uint128ss_increase_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint128ss_increase_by()
+ * @see f_uint128ss_increase_by()
  */
-extern void test__f_type_array_uint128ss_increase_by__works(void **state);
+extern void test__f_type_array_uint128ss_increase_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_uint128ss_increase_by()
+ * @see f_uint128ss_increase_by()
  */
-extern void test__f_type_array_uint128ss_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_uint128ss_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint128ss_increase_by()
+ */
+extern void test__f_type_array_uint128ss_increase_by__works(void **state);
 
 #endif // _TEST__F_type_array__uint128ss_increase_by
index b4999f123b0963b1a86de680151e8e9da8189338..52a3c4aba76287caf692d8f5fb023a7c3e645ec4 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint128ss_resize__works(void **state) {
+void test__f_type_array_uint128ss_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint128ss_t data = f_uint128ss_t_initialize;
 
   {
-    const f_status_t status = f_uint128ss_resize(length, &data);
+    const f_status_t status = f_uint128ss_resize(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_uint128ss_resize__parameter_checking(void **state) {
+void test__f_type_array_uint128ss_resize__works(void **state) {
 
   const int length = 5;
   f_uint128ss_t data = f_uint128ss_t_initialize;
 
   {
-    const f_status_t status = f_uint128ss_resize(length, 0);
+    const f_status_t status = f_uint128ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index be44630df4cb43896155b06df56b4b7a57ffdef1..30ad6978987811b19021fbc82af9ce7abbde634e 100644 (file)
 #define _TEST__F_type_array__uint128ss_resize
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint128ss_resize()
+ * @see f_uint128ss_resize()
  */
-extern void test__f_type_array_uint128ss_resize__works(void **state);
+extern void test__f_type_array_uint128ss_resize__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint128ss_resize()
+ * @see f_uint128ss_resize()
  */
-extern void test__f_type_array_uint128ss_resize__parameter_checking(void **state);
+extern void test__f_type_array_uint128ss_resize__works(void **state);
 
 #endif // _TEST__F_type_array__uint128ss_resize
index e5845d17362a38b159dc75a1f079541c09b0609b..c9c6b449f32a5114623a19800de61f1bbe230057 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint16s_adjust__works(void **state) {
+void test__f_type_array_uint16s_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint16s_t data = f_uint16s_t_initialize;
 
   {
-    const f_status_t status = f_uint16s_adjust(length, &data);
+    const f_status_t status = f_uint16s_adjust(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_uint16s_adjust__parameter_checking(void **state) {
+void test__f_type_array_uint16s_adjust__works(void **state) {
 
   const int length = 5;
   f_uint16s_t data = f_uint16s_t_initialize;
 
   {
-    const f_status_t status = f_uint16s_adjust(length, 0);
+    const f_status_t status = f_uint16s_adjust(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index ba5c21f7bfa65b53668f6bac924a35276cb53c16..41d34185123637c36cbe35b6f059a1607babdac1 100644 (file)
 #define _TEST__F_type_array__uint16s_adjust
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint16s_adjust()
+ * @see f_uint16s_adjust()
  */
-extern void test__f_type_array_uint16s_adjust__works(void **state);
+extern void test__f_type_array_uint16s_adjust__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint16s_adjust()
+ * @see f_uint16s_adjust()
  */
-extern void test__f_type_array_uint16s_adjust__parameter_checking(void **state);
+extern void test__f_type_array_uint16s_adjust__works(void **state);
 
 #endif // _TEST__F_type_array__uint16s_adjust
index 62f6a654381f87336476c76b8d5fcafc27f18e38..0fc42918423c413dec4749698fe7f6c8ceeee746 100644 (file)
@@ -5,6 +5,17 @@
 extern "C" {
 #endif
 
+void test__f_type_array_uint16s_append__parameter_checking(void **state) {
+
+  const uint16_t data = 0;
+
+  {
+    const f_status_t status = f_uint16s_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
 void test__f_type_array_uint16s_append__works(void **state) {
 
   const uint16_t source = 3;
@@ -21,17 +32,6 @@ void test__f_type_array_uint16s_append__works(void **state) {
   free((void *) destination.array);
 }
 
-void test__f_type_array_uint16s_append__parameter_checking(void **state) {
-
-  const uint16_t data = 0;
-
-  {
-    const f_status_t status = f_uint16s_append(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 3a111c66d022cd2edd1c5b1b3f7aed6b097f70c3..46aa1c831a290ce737a88568ea270716c788fa06 100644 (file)
 #define _TEST__F_type_array__uint16s_append
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint16s_append()
+ * @see f_uint16s_append()
  */
-extern void test__f_type_array_uint16s_append__works(void **state);
+extern void test__f_type_array_uint16s_append__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint16s_append()
+ * @see f_uint16s_append()
  */
-extern void test__f_type_array_uint16s_append__parameter_checking(void **state);
+extern void test__f_type_array_uint16s_append__works(void **state);
 
 #endif // _TEST__F_type_array__uint16s_append
index 519411b2d8706afa41f21de33cc25e589fff33d0..a6d63397c517435ab754eaedcca24de796bf109e 100644 (file)
@@ -5,10 +5,20 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint16s_append_all__works(void **state) {
+void test__f_type_array_uint16s_append_all__parameter_checking(void **state) {
+
+  const f_uint16s_t data = f_uint16s_t_initialize;
+
+  {
+    const f_status_t status = f_uint16s_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_uint16s_append_all__returns_data_not(void **state) {
 
   const int length = 5;
-  const int length_used = 2;
   f_uint16s_t source = f_uint16s_t_initialize;
   f_uint16s_t destination = f_uint16s_t_initialize;
 
@@ -20,29 +30,22 @@ void test__f_type_array_uint16s_append_all__works(void **state) {
     assert_int_equal(source.size, length);
   }
 
-  for (; source.used < length_used; ++source.used) {
-    source.array[source.used] = source.used + 1;
-  } // for
-
   {
     const f_status_t status = f_uint16s_append_all(source, &destination);
 
-    assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
-
-    for (f_array_length_t i = 0; i < source.used; ++i) {
-      assert_int_equal(destination.array[i], i + 1);
-    } // for
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
   }
 
   free((void *) source.array);
-  free((void *) destination.array);
 }
 
-void test__f_type_array_uint16s_append_all__returns_data_not(void **state) {
+void test__f_type_array_uint16s_append_all__works(void **state) {
 
   const int length = 5;
+  const int length_used = 2;
   f_uint16s_t source = f_uint16s_t_initialize;
   f_uint16s_t destination = f_uint16s_t_initialize;
 
@@ -54,27 +57,24 @@ void test__f_type_array_uint16s_append_all__returns_data_not(void **state) {
     assert_int_equal(source.size, length);
   }
 
+  for (; source.used < length_used; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
+
   {
     const f_status_t status = f_uint16s_append_all(source, &destination);
 
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < source.used; ++i) {
+      assert_int_equal(destination.array[i], i + 1);
+    } // for
   }
 
   free((void *) source.array);
-}
-
-void test__f_type_array_uint16s_append_all__parameter_checking(void **state) {
-
-  const f_uint16s_t data = f_uint16s_t_initialize;
-
-  {
-    const f_status_t status = f_uint16s_append_all(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
+  free((void *) destination.array);
 }
 
 #ifdef __cplusplus
index db4a986b774d49d268553a6e108b1bafcc19afcc..b61b3d247c875759a155fc17263848fe47f40849 100644 (file)
 #define _TEST__F_type_array__uint16s_append_all
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint16s_append_all()
+ * @see f_uint16s_append_all()
  */
-extern void test__f_type_array_uint16s_append_all__works(void **state);
+extern void test__f_type_array_uint16s_append_all__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_uint16s_append_all()
+ * @see f_uint16s_append_all()
  */
 extern void test__f_type_array_uint16s_append_all__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint16s_append_all()
+ * @see f_uint16s_append_all()
  */
-extern void test__f_type_array_uint16s_append_all__parameter_checking(void **state);
+extern void test__f_type_array_uint16s_append_all__works(void **state);
 
 #endif // _TEST__F_type_array__uint16s_append_all
index 6dbfbd33312f6841be15caba4347948c9cfc3a98..7a9020b53fbd236e1a9e24ca4619b07a59a0b788 100644 (file)
@@ -5,23 +5,15 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint16s_decimate_by__works(void **state) {
+void test__f_type_array_uint16s_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint16s_t data = f_uint16s_t_initialize;
 
   {
-    const f_status_t status = f_uint16s_resize(length, &data);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_uint16s_decimate_by(length, &data);
+    const f_status_t status = f_uint16s_decimate_by(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
@@ -29,15 +21,23 @@ void test__f_type_array_uint16s_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_uint16s_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_uint16s_decimate_by__works(void **state) {
 
   const int length = 5;
   f_uint16s_t data = f_uint16s_t_initialize;
 
   {
-    const f_status_t status = f_uint16s_decimate_by(length, 0);
+    const f_status_t status = f_uint16s_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_uint16s_decimate_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index 1a76948667e62853903f4e794de21ba7457efe20..90ab5fd3e531e06de9dd7b80487f8e0329c37309 100644 (file)
 #define _TEST__F_type_array__uint16s_decimate_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint16s_decimate_by()
+ * @see f_uint16s_decimate_by()
  */
-extern void test__f_type_array_uint16s_decimate_by__works(void **state);
+extern void test__f_type_array_uint16s_decimate_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint16s_decimate_by()
+ * @see f_uint16s_decimate_by()
  */
-extern void test__f_type_array_uint16s_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_uint16s_decimate_by__works(void **state);
 
 #endif // _TEST__F_type_array__uint16s_decimate_by
index bc68694e1f64e7147e78dfe6b5837b9e7ab92f0e..00979b4be82b3afbdaabdadf44fd0d5456362357 100644 (file)
@@ -5,23 +5,15 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint16s_decrease_by__works(void **state) {
+void test__f_type_array_uint16s_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint16s_t data = f_uint16s_t_initialize;
 
   {
-    const f_status_t status = f_uint16s_resize(length, &data);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_uint16s_decrease_by(length, &data);
+    const f_status_t status = f_uint16s_decrease_by(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
@@ -29,15 +21,23 @@ void test__f_type_array_uint16s_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_uint16s_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_uint16s_decrease_by__works(void **state) {
 
   const int length = 5;
   f_uint16s_t data = f_uint16s_t_initialize;
 
   {
-    const f_status_t status = f_uint16s_decrease_by(length, 0);
+    const f_status_t status = f_uint16s_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_uint16s_decrease_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index 144eda0ba824e03f15e131e624fbdea1996f3e9a..c2ab789e5a2b278b8f133d90d25c55d404af4339 100644 (file)
 #define _TEST__F_type_array__uint16s_decrease_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint16s_decrease_by()
+ * @see f_uint16s_decrease_by()
  */
-extern void test__f_type_array_uint16s_decrease_by__works(void **state);
+extern void test__f_type_array_uint16s_decrease_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint16s_decrease_by()
+ * @see f_uint16s_decrease_by()
  */
-extern void test__f_type_array_uint16s_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_uint16s_decrease_by__works(void **state);
 
 #endif // _TEST__F_type_array__uint16s_decrease_by
index 065a40afa5630d24edb29795608e1faaa38576b9..95342c8ff0d3667a7ce460dc9fe0235821f91fbc 100644 (file)
@@ -5,27 +5,17 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint16s_increase__works(void **state) {
+void test__f_type_array_uint16s_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint16s_t data = f_uint16s_t_initialize;
 
   {
-    const f_status_t status = f_uint16s_resize(length, &data);
+    const f_status_t status = f_uint16s_increase(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_uint16s_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);
+    assert_int_equal(data.size, 0);
   }
 
   free((void *) data.array);
@@ -55,17 +45,27 @@ void test__f_type_array_uint16s_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint16s_increase__parameter_checking(void **state) {
+void test__f_type_array_uint16s_increase__works(void **state) {
 
   const int length = 5;
   f_uint16s_t data = f_uint16s_t_initialize;
 
   {
-    const f_status_t status = f_uint16s_increase(length, 0);
+    const f_status_t status = f_uint16s_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    data.used = length;
+
+    const f_status_t status = f_uint16s_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);
index a754c56c450bb059125c6a562a8f9c2956a3a197..0c6612e0a3e2476fbe1f870638eaef225959d862 100644 (file)
 #define _TEST__F_type_array__uint16s_increase
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint16s_increase()
+ * @see f_uint16s_increase()
  */
-extern void test__f_type_array_uint16s_increase__works(void **state);
+extern void test__f_type_array_uint16s_increase__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_uint16s_increase()
+ * @see f_uint16s_increase()
  */
 extern void test__f_type_array_uint16s_increase__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint16s_increase()
+ * @see f_uint16s_increase()
  */
-extern void test__f_type_array_uint16s_increase__parameter_checking(void **state);
+extern void test__f_type_array_uint16s_increase__works(void **state);
 
 #endif // _TEST__F_type_array__uint16s_increase
index ca07bdc927159735057e262cff509f889b51b7b5..1784d066240d6f444bbf2a98cea09cd196d5e8ba 100644 (file)
@@ -5,6 +5,22 @@
 extern "C" {
 #endif
 
+void test__f_type_array_uint16s_increase_by__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_uint16s_t data = f_uint16s_t_initialize;
+
+  {
+    const f_status_t status = f_uint16s_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_type_array_uint16s_increase_by__works(void **state) {
 
   const int length = 5;
@@ -31,22 +47,6 @@ void test__f_type_array_uint16s_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint16s_increase_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_uint16s_t data = f_uint16s_t_initialize;
-
-  {
-    const f_status_t status = f_uint16s_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);
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 61a7e0f1a53b4f89aed5c8477243e92147ff2c20..5d7f3e2d7e7ea8fde2590ffabca617a277bd1862 100644 (file)
 #define _TEST__F_type_array__uint16s_increase_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint16s_increase_by()
+ * @see f_uint16s_increase_by()
  */
-extern void test__f_type_array_uint16s_increase_by__works(void **state);
+extern void test__f_type_array_uint16s_increase_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint16s_increase_by()
+ * @see f_uint16s_increase_by()
  */
-extern void test__f_type_array_uint16s_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_uint16s_increase_by__works(void **state);
 
 #endif // _TEST__F_type_array__uint16s_increase_by
index 5357df0b936ac8e6864d6018a9a19e7ecd62ff79..048ff5eaf547a65ed4887237366a11e011895f30 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint16s_resize__works(void **state) {
+void test__f_type_array_uint16s_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint16s_t data = f_uint16s_t_initialize;
 
   {
-    const f_status_t status = f_uint16s_resize(length, &data);
+    const f_status_t status = f_uint16s_resize(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_uint16s_resize__parameter_checking(void **state) {
+void test__f_type_array_uint16s_resize__works(void **state) {
 
   const int length = 5;
   f_uint16s_t data = f_uint16s_t_initialize;
 
   {
-    const f_status_t status = f_uint16s_resize(length, 0);
+    const f_status_t status = f_uint16s_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index d34513e67ada3835f17c213d72b91abd664ba9df..a545df415ad4b59a972f674131ef8fb2616c55c8 100644 (file)
 #define _TEST__F_type_array__uint16s_resize
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint16s_resize()
+ * @see f_uint16s_resize()
  */
-extern void test__f_type_array_uint16s_resize__works(void **state);
+extern void test__f_type_array_uint16s_resize__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint16s_resize()
+ * @see f_uint16s_resize()
  */
-extern void test__f_type_array_uint16s_resize__parameter_checking(void **state);
+extern void test__f_type_array_uint16s_resize__works(void **state);
 
 #endif // _TEST__F_type_array__uint16s_resize
index 58dce85dddd33896e5f10da7fb3a59c9aa55e8c9..c1c2285fe0f67b2b81dd83ff28952af165762c2a 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint16ss_adjust__works(void **state) {
+void test__f_type_array_uint16ss_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint16ss_t data = f_uint16ss_t_initialize;
 
   {
-    const f_status_t status = f_uint16ss_adjust(length, &data);
+    const f_status_t status = f_uint16ss_adjust(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_uint16ss_adjust__parameter_checking(void **state) {
+void test__f_type_array_uint16ss_adjust__works(void **state) {
 
   const int length = 5;
   f_uint16ss_t data = f_uint16ss_t_initialize;
 
   {
-    const f_status_t status = f_uint16ss_adjust(length, 0);
+    const f_status_t status = f_uint16ss_adjust(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index 427d558b73e427480d6d33f34f6b84e73c3c202d..e27a25ab118e96ba935e29c8d0601684201bfe8c 100644 (file)
 #define _TEST__F_type_array__uint16ss_adjust
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint16ss_adjust()
+ * @see f_uint16ss_adjust()
  */
-extern void test__f_type_array_uint16ss_adjust__works(void **state);
+extern void test__f_type_array_uint16ss_adjust__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint16ss_adjust()
+ * @see f_uint16ss_adjust()
  */
-extern void test__f_type_array_uint16ss_adjust__parameter_checking(void **state);
+extern void test__f_type_array_uint16ss_adjust__works(void **state);
 
 #endif // _TEST__F_type_array__uint16ss_adjust
index a89594f5f6d0da75f5224921e27b799f7853655e..e10b0ea85e6cbdbebaf6b38de286afcdb69b343b 100644 (file)
@@ -5,7 +5,18 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint16ss_append__works(void **state) {
+void test__f_type_array_uint16ss_append__parameter_checking(void **state) {
+
+  f_uint16s_t data = f_uint16s_t_initialize;
+
+  {
+    const f_status_t status = f_uint16ss_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_uint16ss_append__returns_data_not(void **state) {
 
   const int length = 5;
   f_uint16s_t source = f_uint16s_t_initialize;
@@ -19,32 +30,19 @@ void test__f_type_array_uint16ss_append__works(void **state) {
     assert_int_equal(source.size, length);
   }
 
-  for (; source.used < length; ++source.used) {
-    source.array[source.used] = source.used + 1;
-  } // for
-
   {
     const f_status_t status = f_uint16ss_append(source, &destination);
 
-    assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, 1);
-    assert_int_equal(destination.array[0].used, source.used);
-    assert_int_equal(destination.array[0].size, source.used);
-
-    for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
-      assert_int_equal(destination.array[0].array[i], i + 1);
-    } // for
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
   }
 
-  for (f_array_length_t i = 0; i < destination.used; ++i) {
-    free((void *) destination.array[i].array);
-  } // for
-
   free((void *) source.array);
-  free((void *) destination.array);
 }
 
-void test__f_type_array_uint16ss_append__returns_data_not(void **state) {
+void test__f_type_array_uint16ss_append__works(void **state) {
 
   const int length = 5;
   f_uint16s_t source = f_uint16s_t_initialize;
@@ -58,27 +56,29 @@ void test__f_type_array_uint16ss_append__returns_data_not(void **state) {
     assert_int_equal(source.size, length);
   }
 
+  for (; source.used < length; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
+
   {
     const f_status_t status = f_uint16ss_append(source, &destination);
 
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
-  }
-
-  free((void *) source.array);
-}
-
-void test__f_type_array_uint16ss_append__parameter_checking(void **state) {
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0].used, source.used);
+    assert_int_equal(destination.array[0].size, source.used);
 
-  f_uint16s_t data = f_uint16s_t_initialize;
+    for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
+      assert_int_equal(destination.array[0].array[i], i + 1);
+    } // for
+  }
 
-  {
-    const f_status_t status = f_uint16ss_append(data, 0);
+  for (f_array_length_t i = 0; i < destination.used; ++i) {
+    free((void *) destination.array[i].array);
+  } // for
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
+  free((void *) source.array);
+  free((void *) destination.array);
 }
 
 #ifdef __cplusplus
index 3ddc590b345576ab10a084a6b4bd6c583a893178..c9daf1c7cd8e1536304ae93e67aeaac01663f198 100644 (file)
 #define _TEST__F_type_array__uint16ss_append
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint16ss_append()
+ * @see f_uint16ss_append()
  */
-extern void test__f_type_array_uint16ss_append__works(void **state);
+extern void test__f_type_array_uint16ss_append__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_uint16ss_append()
+ * @see f_uint16ss_append()
  */
 extern void test__f_type_array_uint16ss_append__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint16ss_append()
+ * @see f_uint16ss_append()
  */
-extern void test__f_type_array_uint16ss_append__parameter_checking(void **state);
+extern void test__f_type_array_uint16ss_append__works(void **state);
 
 #endif // _TEST__F_type_array__uint16ss_append
index 4f1f37c38b4a5f553ef567cbabeaed3b2e704ebb..7480db036a612cf1cda3199a9b870ae5e4d3fc5e 100644 (file)
@@ -5,6 +5,43 @@
 extern "C" {
 #endif
 
+void test__f_type_array_uint16ss_append_all__parameter_checking(void **state) {
+
+  const f_uint16ss_t data = f_uint16ss_t_initialize;
+
+  {
+    const f_status_t status = f_uint16ss_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_uint16ss_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_uint16ss_t source = f_uint16ss_t_initialize;
+  f_uint16ss_t destination = f_uint16ss_t_initialize;
+
+  {
+    const f_status_t status = f_uint16ss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_uint16ss_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
 void test__f_type_array_uint16ss_append_all__works(void **state) {
 
   const int length = 5;
@@ -63,43 +100,6 @@ void test__f_type_array_uint16ss_append_all__works(void **state) {
   free((void *) destination.array);
 }
 
-void test__f_type_array_uint16ss_append_all__returns_data_not(void **state) {
-
-  const int length = 5;
-  f_uint16ss_t source = f_uint16ss_t_initialize;
-  f_uint16ss_t destination = f_uint16ss_t_initialize;
-
-  {
-    const f_status_t status = f_uint16ss_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  {
-    const f_status_t status = f_uint16ss_append_all(source, &destination);
-
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
-  }
-
-  free((void *) source.array);
-}
-
-void test__f_type_array_uint16ss_append_all__parameter_checking(void **state) {
-
-  const f_uint16ss_t data = f_uint16ss_t_initialize;
-
-  {
-    const f_status_t status = f_uint16ss_append_all(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 204816999c0b6f960c37de7424fe7e1bdcfce78c..0453a7f41791eaec48d523b0ead3bb3123398cbd 100644 (file)
 #define _TEST__F_type_array__uint16ss_append_all
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint16ss_append_all()
+ * @see f_uint16ss_append_all()
  */
-extern void test__f_type_array_uint16ss_append_all__works(void **state);
+extern void test__f_type_array_uint16ss_append_all__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_uint16ss_append_all()
+ * @see f_uint16ss_append_all()
  */
 extern void test__f_type_array_uint16ss_append_all__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint16ss_append_all()
+ * @see f_uint16ss_append_all()
  */
-extern void test__f_type_array_uint16ss_append_all__parameter_checking(void **state);
+extern void test__f_type_array_uint16ss_append_all__works(void **state);
 
 #endif // _TEST__F_type_array__uint16ss_append_all
index f02ea0d2ffdc082c78d36abf16fd28e446947213..bc1bf20241f07a2c0cf5b7abd3f39f79d9d695a2 100644 (file)
@@ -5,12 +5,28 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint16ss_decimate_by__works(void **state) {
+void test__f_type_array_uint16ss_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint16ss_t data = f_uint16s_t_initialize;
 
   {
+    const f_status_t status = f_uint16ss_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_type_array_uint16ss_decimate_by__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_uint16ss_t data = f_uint16ss_t_initialize;
+
+  {
     const f_status_t status = f_uint16ss_resize(length, &data);
 
     assert_int_equal(status, F_none);
@@ -19,25 +35,33 @@ void test__f_type_array_uint16ss_decimate_by__works(void **state) {
   }
 
   {
-    const f_status_t status = f_uint16ss_decimate_by(length, &data);
+    const f_status_t status = f_uint16ss_decimate_by(0, &data);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_data_not);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
-void test__f_type_array_uint16ss_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_uint16ss_decimate_by__works(void **state) {
 
   const int length = 5;
   f_uint16ss_t data = f_uint16s_t_initialize;
 
   {
-    const f_status_t status = f_uint16ss_decimate_by(length, 0);
+    const f_status_t status = f_uint16ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_uint16ss_decimate_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index 08b335dbf31ed568e38955a61308a8ea9376b2c2..5802d7e404f121a2a4231dfbbb67a17dc15d3000 100644 (file)
 #define _TEST__F_type_array__uint16ss_decimate_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint16ss_decimate_by()
+ * @see f_uint16ss_decimate_by()
  */
-extern void test__f_type_array_uint16ss_decimate_by__works(void **state);
+extern void test__f_type_array_uint16ss_decimate_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
  * @see f_type_array_uint16ss_decimate_by()
  */
-extern void test__f_type_array_uint16ss_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_uint16ss_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint16ss_decimate_by()
+ */
+extern void test__f_type_array_uint16ss_decimate_by__works(void **state);
 
 #endif // _TEST__F_type_array__uint16ss_decimate_by
index 4a547abfe28b072fe85467d776c3070a33e1a435..2b9c9550fe44ef1a3ce1a65729a6f2ddc850b064 100644 (file)
@@ -5,12 +5,28 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint16ss_decrease_by__works(void **state) {
+void test__f_type_array_uint16ss_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint16ss_t data = f_uint16s_t_initialize;
 
   {
+    const f_status_t status = f_uint16ss_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_type_array_uint16ss_decrease_by__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_uint16ss_t data = f_uint16ss_t_initialize;
+
+  {
     const f_status_t status = f_uint16ss_resize(length, &data);
 
     assert_int_equal(status, F_none);
@@ -19,25 +35,33 @@ void test__f_type_array_uint16ss_decrease_by__works(void **state) {
   }
 
   {
-    const f_status_t status = f_uint16ss_decrease_by(length, &data);
+    const f_status_t status = f_uint16ss_decrease_by(0, &data);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_data_not);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
-void test__f_type_array_uint16ss_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_uint16ss_decrease_by__works(void **state) {
 
   const int length = 5;
   f_uint16ss_t data = f_uint16s_t_initialize;
 
   {
-    const f_status_t status = f_uint16ss_decrease_by(length, 0);
+    const f_status_t status = f_uint16ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_uint16ss_decrease_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index e9c46e3967ec7b364a493a0a3da940128dabf910..c30671dd8df955c19bbcc14950e5b04f4aaef91f 100644 (file)
 #define _TEST__F_type_array__uint16ss_decrease_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint16ss_decrease_by()
+ * @see f_uint16ss_decrease_by()
  */
-extern void test__f_type_array_uint16ss_decrease_by__works(void **state);
+extern void test__f_type_array_uint16ss_decrease_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_uint16ss_decrease_by()
+ * @see f_uint16ss_decrease_by()
  */
-extern void test__f_type_array_uint16ss_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_uint16ss_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint16ss_decrease_by()
+ */
+extern void test__f_type_array_uint16ss_decrease_by__works(void **state);
 
 #endif // _TEST__F_type_array__uint16ss_decrease_by
index b47b0d22cec4db9a3d531ffa576c237e7daae07a..8808da3aa0cbeb18327f3639cb00fdce953efe22 100644 (file)
@@ -5,27 +5,17 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint16ss_increase__works(void **state) {
+void test__f_type_array_uint16ss_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint16ss_t data = f_uint16s_t_initialize;
 
   {
-    const f_status_t status = f_uint16ss_resize(length, &data);
+    const f_status_t status = f_uint16ss_increase(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_uint16ss_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);
+    assert_int_equal(data.size, 0);
   }
 
   free((void *) data.array);
@@ -55,17 +45,27 @@ void test__f_type_array_uint16ss_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint16ss_increase__parameter_checking(void **state) {
+void test__f_type_array_uint16ss_increase__works(void **state) {
 
   const int length = 5;
   f_uint16ss_t data = f_uint16s_t_initialize;
 
   {
-    const f_status_t status = f_uint16ss_increase(length, 0);
+    const f_status_t status = f_uint16ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    data.used = length;
+
+    const f_status_t status = f_uint16ss_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);
index df1cbf28545e7c492051ee75ff517e0d698ea2aa..c464faefb487fc7092ca1c4b73a692449938d5f4 100644 (file)
 #define _TEST__F_type_array__uint16ss_increase
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint16ss_increase()
+ * @see f_uint16ss_increase()
  */
-extern void test__f_type_array_uint16ss_increase__works(void **state);
+extern void test__f_type_array_uint16ss_increase__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_uint16ss_increase()
+ * @see f_uint16ss_increase()
  */
 extern void test__f_type_array_uint16ss_increase__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint16ss_increase()
+ * @see f_uint16ss_increase()
  */
-extern void test__f_type_array_uint16ss_increase__parameter_checking(void **state);
+extern void test__f_type_array_uint16ss_increase__works(void **state);
 
 #endif // _TEST__F_type_array__uint16ss_increase
index 4ad84b62d4c744b6fba54eecc83e9fd51b198db1..79b0900284bca31c8fe6137863a82613ab7e5db6 100644 (file)
@@ -5,12 +5,28 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint16ss_increase_by__works(void **state) {
+void test__f_type_array_uint16ss_increase_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint16ss_t data = f_uint16s_t_initialize;
 
   {
+    const f_status_t status = f_uint16ss_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_type_array_uint16ss_increase_by__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_uint16ss_t data = f_uint16ss_t_initialize;
+
+  {
     const f_status_t status = f_uint16ss_resize(length, &data);
 
     assert_int_equal(status, F_none);
@@ -19,32 +35,48 @@ void test__f_type_array_uint16ss_increase_by__works(void **state) {
   }
 
   {
-    data.used = length;
+    const f_status_t status = f_uint16ss_increase_by(0, &data);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
 
+  {
     const f_status_t status = f_uint16ss_increase_by(length, &data);
 
-    assert_int_equal(status, F_none);
-    assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
   }
 
   free((void *) data.array);
 }
 
-void test__f_type_array_uint16ss_increase_by__parameter_checking(void **state) {
+void test__f_type_array_uint16ss_increase_by__works(void **state) {
 
   const int length = 5;
   f_uint16ss_t data = f_uint16s_t_initialize;
 
   {
-    const f_status_t status = f_uint16ss_increase_by(length, 0);
+    const f_status_t status = f_uint16ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  {
+    data.used = length;
+
+    const f_status_t status = f_uint16ss_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
index 54cc5a3a6c899902c41c4c12f65a7a66ebd4ff62..4aa8fa9bfcc9f27facffc0dd97da4f7666145f82 100644 (file)
 #define _TEST__F_type_array__uint16ss_increase_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint16ss_increase_by()
+ * @see f_uint16ss_increase_by()
  */
-extern void test__f_type_array_uint16ss_increase_by__works(void **state);
+extern void test__f_type_array_uint16ss_increase_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_uint16ss_increase_by()
+ * @see f_uint16ss_increase_by()
  */
-extern void test__f_type_array_uint16ss_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_uint16ss_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint16ss_increase_by()
+ */
+extern void test__f_type_array_uint16ss_increase_by__works(void **state);
 
 #endif // _TEST__F_type_array__uint16ss_increase_by
index 4936f1b5a8e6292049729e164c1c7b0b10ed193c..b087228c08e4915e06df32e91f3484850834da17 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint16ss_resize__works(void **state) {
+void test__f_type_array_uint16ss_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint16ss_t data = f_uint16ss_t_initialize;
 
   {
-    const f_status_t status = f_uint16ss_resize(length, &data);
+    const f_status_t status = f_uint16ss_resize(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_uint16ss_resize__parameter_checking(void **state) {
+void test__f_type_array_uint16ss_resize__works(void **state) {
 
   const int length = 5;
   f_uint16ss_t data = f_uint16ss_t_initialize;
 
   {
-    const f_status_t status = f_uint16ss_resize(length, 0);
+    const f_status_t status = f_uint16ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index 5f1af71ee77d8a236fec64edcd3564e6f6c98377..4f4a2aec909e45ddde1822fb5ef4696c39f95dba 100644 (file)
 #define _TEST__F_type_array__uint16ss_resize
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint16ss_resize()
+ * @see f_uint16ss_resize()
  */
-extern void test__f_type_array_uint16ss_resize__works(void **state);
+extern void test__f_type_array_uint16ss_resize__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint16ss_resize()
+ * @see f_uint16ss_resize()
  */
-extern void test__f_type_array_uint16ss_resize__parameter_checking(void **state);
+extern void test__f_type_array_uint16ss_resize__works(void **state);
 
 #endif // _TEST__F_type_array__uint16ss_resize
index 70af09099530af8e079b426034fb38056f69628d..2e732dbf9f197aa4b186b0ee3dd834217e7c9241 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint32s_adjust__works(void **state) {
+void test__f_type_array_uint32s_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint32s_t data = f_uint32s_t_initialize;
 
   {
-    const f_status_t status = f_uint32s_adjust(length, &data);
+    const f_status_t status = f_uint32s_adjust(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_uint32s_adjust__parameter_checking(void **state) {
+void test__f_type_array_uint32s_adjust__works(void **state) {
 
   const int length = 5;
   f_uint32s_t data = f_uint32s_t_initialize;
 
   {
-    const f_status_t status = f_uint32s_adjust(length, 0);
+    const f_status_t status = f_uint32s_adjust(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index 4b85870327be30e9c2099fbaaeb41041b4e97302..a3f4cd05223bf1537e617e88ed16adf594d0bf49 100644 (file)
 #define _TEST__F_type_array__uint32s_adjust
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint32s_adjust()
+ * @see f_uint32s_adjust()
  */
-extern void test__f_type_array_uint32s_adjust__works(void **state);
+extern void test__f_type_array_uint32s_adjust__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint32s_adjust()
+ * @see f_uint32s_adjust()
  */
-extern void test__f_type_array_uint32s_adjust__parameter_checking(void **state);
+extern void test__f_type_array_uint32s_adjust__works(void **state);
 
 #endif // _TEST__F_type_array__uint32s_adjust
index 723abf7630d820a87c0d20f6220f149e5ad50e7d..718879010de5964ce365edffd12f695b8816c31d 100644 (file)
@@ -5,6 +5,17 @@
 extern "C" {
 #endif
 
+void test__f_type_array_uint32s_append__parameter_checking(void **state) {
+
+  const uint32_t data = 0;
+
+  {
+    const f_status_t status = f_uint32s_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
 void test__f_type_array_uint32s_append__works(void **state) {
 
   const uint32_t source = 3;
@@ -21,17 +32,6 @@ void test__f_type_array_uint32s_append__works(void **state) {
   free((void *) destination.array);
 }
 
-void test__f_type_array_uint32s_append__parameter_checking(void **state) {
-
-  const uint32_t data = 0;
-
-  {
-    const f_status_t status = f_uint32s_append(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 884e11e4e9603f95658d7e2bb4e35b32fa9a3743..d8b5808a832fca0244ecd00854e1ad550a7918de 100644 (file)
@@ -9,19 +9,19 @@
  */
 #ifndef _TEST__F_type_array__uint32s_append
 #define _TEST__F_type_array__uint32s_append
-
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint32s_append()
+ * @see f_uint32s_append()
  */
-extern void test__f_type_array_uint32s_append__works(void **state);
+extern void test__f_type_array_uint32s_append__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint32s_append()
+ * @see f_uint32s_append()
  */
-extern void test__f_type_array_uint32s_append__parameter_checking(void **state);
+extern void test__f_type_array_uint32s_append__works(void **state);
+
 
 #endif // _TEST__F_type_array__uint32s_append
index 43529a0da1332ed1c0bdb84ebaefd52952c5938f..1caea4ee24205b290da18e7bb67a58cf6f6ba332 100644 (file)
@@ -5,10 +5,20 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint32s_append_all__works(void **state) {
+void test__f_type_array_uint32s_append_all__parameter_checking(void **state) {
+
+  const f_uint32s_t data = f_uint32s_t_initialize;
+
+  {
+    const f_status_t status = f_uint32s_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_uint32s_append_all__returns_data_not(void **state) {
 
   const int length = 5;
-  const int length_used = 2;
   f_uint32s_t source = f_uint32s_t_initialize;
   f_uint32s_t destination = f_uint32s_t_initialize;
 
@@ -20,29 +30,22 @@ void test__f_type_array_uint32s_append_all__works(void **state) {
     assert_int_equal(source.size, length);
   }
 
-  for (; source.used < length_used; ++source.used) {
-    source.array[source.used] = source.used + 1;
-  } // for
-
   {
     const f_status_t status = f_uint32s_append_all(source, &destination);
 
-    assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
-
-    for (f_array_length_t i = 0; i < source.used; ++i) {
-      assert_int_equal(destination.array[i], i + 1);
-    } // for
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
   }
 
   free((void *) source.array);
-  free((void *) destination.array);
 }
 
-void test__f_type_array_uint32s_append_all__returns_data_not(void **state) {
+void test__f_type_array_uint32s_append_all__works(void **state) {
 
   const int length = 5;
+  const int length_used = 2;
   f_uint32s_t source = f_uint32s_t_initialize;
   f_uint32s_t destination = f_uint32s_t_initialize;
 
@@ -54,27 +57,24 @@ void test__f_type_array_uint32s_append_all__returns_data_not(void **state) {
     assert_int_equal(source.size, length);
   }
 
+  for (; source.used < length_used; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
+
   {
     const f_status_t status = f_uint32s_append_all(source, &destination);
 
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < source.used; ++i) {
+      assert_int_equal(destination.array[i], i + 1);
+    } // for
   }
 
   free((void *) source.array);
-}
-
-void test__f_type_array_uint32s_append_all__parameter_checking(void **state) {
-
-  const f_uint32s_t data = f_uint32s_t_initialize;
-
-  {
-    const f_status_t status = f_uint32s_append_all(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
+  free((void *) destination.array);
 }
 
 #ifdef __cplusplus
index 521e499d7a79131edef3c818118f95bcbe7263d6..a4f91817b8a7114f0e17a4eba7563eb4b4f92bc8 100644 (file)
 #define _TEST__F_type_array__uint32s_append_all
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint32s_append_all()
+ * @see f_uint32s_append_all()
  */
-extern void test__f_type_array_uint32s_append_all__works(void **state);
+extern void test__f_type_array_uint32s_append_all__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_uint32s_append_all()
+ * @see f_uint32s_append_all()
  */
 extern void test__f_type_array_uint32s_append_all__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint32s_append_all()
+ * @see f_uint32s_append_all()
  */
-extern void test__f_type_array_uint32s_append_all__parameter_checking(void **state);
+extern void test__f_type_array_uint32s_append_all__works(void **state);
 
 #endif // _TEST__F_type_array__uint32s_append_all
index 950d1b012795d930a65417d4a01446d55a7f6a1f..5fc0dc40af222b5b11d280aa523848d69058e652 100644 (file)
@@ -5,23 +5,15 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint32s_decimate_by__works(void **state) {
+void test__f_type_array_uint32s_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint32s_t data = f_uint32s_t_initialize;
 
   {
-    const f_status_t status = f_uint32s_resize(length, &data);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_uint32s_decimate_by(length, &data);
+    const f_status_t status = f_uint32s_decimate_by(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
@@ -29,15 +21,23 @@ void test__f_type_array_uint32s_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_uint32s_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_uint32s_decimate_by__works(void **state) {
 
   const int length = 5;
   f_uint32s_t data = f_uint32s_t_initialize;
 
   {
-    const f_status_t status = f_uint32s_decimate_by(length, 0);
+    const f_status_t status = f_uint32s_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_uint32s_decimate_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index f549ca6cc8fd26314f733c7ad13e11144680c215..e76bc6058d9c70025dcc315486316c4077904df6 100644 (file)
 #define _TEST__F_type_array__uint32s_decimate_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint32s_decimate_by()
+ * @see f_uint32s_decimate_by()
  */
-extern void test__f_type_array_uint32s_decimate_by__works(void **state);
+extern void test__f_type_array_uint32s_decimate_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint32s_decimate_by()
+ * @see f_uint32s_decimate_by()
  */
-extern void test__f_type_array_uint32s_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_uint32s_decimate_by__works(void **state);
 
 #endif // _TEST__F_type_array__uint32s_decimate_by
index 392052b3e66d3311f7702857e230c50830760715..207d384abd4b80fcaad33e18db9b39d58e3d5356 100644 (file)
@@ -5,23 +5,15 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint32s_decrease_by__works(void **state) {
+void test__f_type_array_uint32s_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint32s_t data = f_uint32s_t_initialize;
 
   {
-    const f_status_t status = f_uint32s_resize(length, &data);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_uint32s_decrease_by(length, &data);
+    const f_status_t status = f_uint32s_decrease_by(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
@@ -29,15 +21,23 @@ void test__f_type_array_uint32s_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_uint32s_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_uint32s_decrease_by__works(void **state) {
 
   const int length = 5;
   f_uint32s_t data = f_uint32s_t_initialize;
 
   {
-    const f_status_t status = f_uint32s_decrease_by(length, 0);
+    const f_status_t status = f_uint32s_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_uint32s_decrease_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index 35f03bba2fb9e83716a3205662049d4538a00bee..bf74dcb304c3f5c9dc701df94cba6a1ae75aa7c7 100644 (file)
 #define _TEST__F_type_array__uint32s_decrease_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint32s_decrease_by()
+ * @see f_uint32s_decrease_by()
  */
-extern void test__f_type_array_uint32s_decrease_by__works(void **state);
+extern void test__f_type_array_uint32s_decrease_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint32s_decrease_by()
+ * @see f_uint32s_decrease_by()
  */
-extern void test__f_type_array_uint32s_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_uint32s_decrease_by__works(void **state);
 
 #endif // _TEST__F_type_array__uint32s_decrease_by
index d77df7fcbfcc288ca6f58ab7203a01f582ef49ab..378ae00eb3b17fca09add7bacf5a1feeb2516134 100644 (file)
@@ -5,27 +5,17 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint32s_increase__works(void **state) {
+void test__f_type_array_uint32s_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint32s_t data = f_uint32s_t_initialize;
 
   {
-    const f_status_t status = f_uint32s_resize(length, &data);
+    const f_status_t status = f_uint32s_increase(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_uint32s_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);
+    assert_int_equal(data.size, 0);
   }
 
   free((void *) data.array);
@@ -55,17 +45,27 @@ void test__f_type_array_uint32s_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint32s_increase__parameter_checking(void **state) {
+void test__f_type_array_uint32s_increase__works(void **state) {
 
   const int length = 5;
   f_uint32s_t data = f_uint32s_t_initialize;
 
   {
-    const f_status_t status = f_uint32s_increase(length, 0);
+    const f_status_t status = f_uint32s_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    data.used = length;
+
+    const f_status_t status = f_uint32s_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);
index e0db8f355fb3cb6451a32aa861a55dcce87e1432..059cb0546f5df460560f160b123633d7b7e096f1 100644 (file)
 #define _TEST__F_type_array__uint32s_increase
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint32s_increase()
+ * @see f_uint32s_increase()
  */
-extern void test__f_type_array_uint32s_increase__works(void **state);
+extern void test__f_type_array_uint32s_increase__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_uint32s_increase()
+ * @see f_uint32s_increase()
  */
 extern void test__f_type_array_uint32s_increase__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint32s_increase()
+ * @see f_uint32s_increase()
  */
-extern void test__f_type_array_uint32s_increase__parameter_checking(void **state);
+extern void test__f_type_array_uint32s_increase__works(void **state);
 
 #endif // _TEST__F_type_array__uint32s_increase
index f165f0411e0bb21f9e1cf7d9c94a204bfe57c138..8d42d04e5f5953635516c21d59859e7c62ba62b2 100644 (file)
@@ -5,6 +5,22 @@
 extern "C" {
 #endif
 
+void test__f_type_array_uint32s_increase_by__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_uint32s_t data = f_uint32s_t_initialize;
+
+  {
+    const f_status_t status = f_uint32s_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_type_array_uint32s_increase_by__works(void **state) {
 
   const int length = 5;
@@ -31,22 +47,6 @@ void test__f_type_array_uint32s_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint32s_increase_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_uint32s_t data = f_uint32s_t_initialize;
-
-  {
-    const f_status_t status = f_uint32s_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);
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 6afbf5d7052aa6393376a51cafde16aafbbfc142..9b6dd4532485ef84203bd8e44c1342edb4c34b23 100644 (file)
 #define _TEST__F_type_array__uint32s_increase_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint32s_increase_by()
+ * @see f_uint32s_increase_by()
  */
-extern void test__f_type_array_uint32s_increase_by__works(void **state);
+extern void test__f_type_array_uint32s_increase_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint32s_increase_by()
+ * @see f_uint32s_increase_by()
  */
-extern void test__f_type_array_uint32s_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_uint32s_increase_by__works(void **state);
 
 #endif // _TEST__F_type_array__uint32s_increase_by
index 4006ef2a9b3fcf0a9cc96f19c8bcdd2b722b2aa0..54d8457e7df5f00cc5575c41268c54208c9eeddd 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint32s_resize__works(void **state) {
+void test__f_type_array_uint32s_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint32s_t data = f_uint32s_t_initialize;
 
   {
-    const f_status_t status = f_uint32s_resize(length, &data);
+    const f_status_t status = f_uint32s_resize(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_uint32s_resize__parameter_checking(void **state) {
+void test__f_type_array_uint32s_resize__works(void **state) {
 
   const int length = 5;
   f_uint32s_t data = f_uint32s_t_initialize;
 
   {
-    const f_status_t status = f_uint32s_resize(length, 0);
+    const f_status_t status = f_uint32s_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index 26a116d378509ddba9f46c4866e4b6b6e4f6e0f2..6d1377dd7beaef752403f0b3c736efcca785a931 100644 (file)
 #define _TEST__F_type_array__uint32s_resize
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint32s_resize()
+ * @see f_uint32s_resize()
  */
-extern void test__f_type_array_uint32s_resize__works(void **state);
+extern void test__f_type_array_uint32s_resize__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint32s_resize()
+ * @see f_uint32s_resize()
  */
-extern void test__f_type_array_uint32s_resize__parameter_checking(void **state);
+extern void test__f_type_array_uint32s_resize__works(void **state);
 
 #endif // _TEST__F_type_array__uint32s_resize
index d1808091bba2f777a216ba2dea17d239ee9a0d39..89bf16c93ccae50cf2d4a6bc5d46fcbf8a0542ab 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint32ss_adjust__works(void **state) {
+void test__f_type_array_uint32ss_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint32ss_t data = f_uint32ss_t_initialize;
 
   {
-    const f_status_t status = f_uint32ss_adjust(length, &data);
+    const f_status_t status = f_uint32ss_adjust(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_uint32ss_adjust__parameter_checking(void **state) {
+void test__f_type_array_uint32ss_adjust__works(void **state) {
 
   const int length = 5;
   f_uint32ss_t data = f_uint32ss_t_initialize;
 
   {
-    const f_status_t status = f_uint32ss_adjust(length, 0);
+    const f_status_t status = f_uint32ss_adjust(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index 5d27154dea3b5a48096cd47fc8c67f52f0dd68cf..875a950d68ef81a86da4855b863e181999177640 100644 (file)
 #define _TEST__F_type_array__uint32ss_adjust
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint32ss_adjust()
+ * @see f_uint32ss_adjust()
  */
-extern void test__f_type_array_uint32ss_adjust__works(void **state);
+extern void test__f_type_array_uint32ss_adjust__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint32ss_adjust()
+ * @see f_uint32ss_adjust()
  */
-extern void test__f_type_array_uint32ss_adjust__parameter_checking(void **state);
+extern void test__f_type_array_uint32ss_adjust__works(void **state);
 
 #endif // _TEST__F_type_array__uint32ss_adjust
index 32cd338063dd8cf6dd3ecd1d7dce15016860dbd1..c88d473331abc1e7fa1ac4ecf5ed96533d6e607e 100644 (file)
@@ -5,7 +5,18 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint32ss_append__works(void **state) {
+void test__f_type_array_uint32ss_append__parameter_checking(void **state) {
+
+  f_uint32s_t data = f_uint32s_t_initialize;
+
+  {
+    const f_status_t status = f_uint32ss_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_uint32ss_append__returns_data_not(void **state) {
 
   const int length = 5;
   f_uint32s_t source = f_uint32s_t_initialize;
@@ -19,32 +30,19 @@ void test__f_type_array_uint32ss_append__works(void **state) {
     assert_int_equal(source.size, length);
   }
 
-  for (; source.used < length; ++source.used) {
-    source.array[source.used] = source.used + 1;
-  } // for
-
   {
     const f_status_t status = f_uint32ss_append(source, &destination);
 
-    assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, 1);
-    assert_int_equal(destination.array[0].used, source.used);
-    assert_int_equal(destination.array[0].size, source.used);
-
-    for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
-      assert_int_equal(destination.array[0].array[i], i + 1);
-    } // for
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
   }
 
-  for (f_array_length_t i = 0; i < destination.used; ++i) {
-    free((void *) destination.array[i].array);
-  } // for
-
   free((void *) source.array);
-  free((void *) destination.array);
 }
 
-void test__f_type_array_uint32ss_append__returns_data_not(void **state) {
+void test__f_type_array_uint32ss_append__works(void **state) {
 
   const int length = 5;
   f_uint32s_t source = f_uint32s_t_initialize;
@@ -58,27 +56,29 @@ void test__f_type_array_uint32ss_append__returns_data_not(void **state) {
     assert_int_equal(source.size, length);
   }
 
+  for (; source.used < length; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
+
   {
     const f_status_t status = f_uint32ss_append(source, &destination);
 
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
-  }
-
-  free((void *) source.array);
-}
-
-void test__f_type_array_uint32ss_append__parameter_checking(void **state) {
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0].used, source.used);
+    assert_int_equal(destination.array[0].size, source.used);
 
-  f_uint32s_t data = f_uint32s_t_initialize;
+    for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
+      assert_int_equal(destination.array[0].array[i], i + 1);
+    } // for
+  }
 
-  {
-    const f_status_t status = f_uint32ss_append(data, 0);
+  for (f_array_length_t i = 0; i < destination.used; ++i) {
+    free((void *) destination.array[i].array);
+  } // for
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
+  free((void *) source.array);
+  free((void *) destination.array);
 }
 
 #ifdef __cplusplus
index fd2cf401f72d6af0efba3f590d2c13ad5e68f17d..58480ad67b2f58ed615717c6fe001da88e6e19bc 100644 (file)
 #define _TEST__F_type_array__uint32ss_append
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint32ss_append()
+ * @see f_uint32ss_append()
  */
-extern void test__f_type_array_uint32ss_append__works(void **state);
+extern void test__f_type_array_uint32ss_append__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_uint32ss_append()
+ * @see f_uint32ss_append()
  */
 extern void test__f_type_array_uint32ss_append__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint32ss_append()
+ * @see f_uint32ss_append()
  */
-extern void test__f_type_array_uint32ss_append__parameter_checking(void **state);
+extern void test__f_type_array_uint32ss_append__works(void **state);
 
 #endif // _TEST__F_type_array__uint32ss_append
index 032593afaf67e31f6a320c379c0b29d452b2a845..41b482f75249463280a86a5e8940d6164c23f8d5 100644 (file)
@@ -5,6 +5,43 @@
 extern "C" {
 #endif
 
+void test__f_type_array_uint32ss_append_all__parameter_checking(void **state) {
+
+  const f_uint32ss_t data = f_uint32ss_t_initialize;
+
+  {
+    const f_status_t status = f_uint32ss_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_uint32ss_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_uint32ss_t source = f_uint32ss_t_initialize;
+  f_uint32ss_t destination = f_uint32ss_t_initialize;
+
+  {
+    const f_status_t status = f_uint32ss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_uint32ss_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
 void test__f_type_array_uint32ss_append_all__works(void **state) {
 
   const int length = 5;
@@ -63,43 +100,6 @@ void test__f_type_array_uint32ss_append_all__works(void **state) {
   free((void *) destination.array);
 }
 
-void test__f_type_array_uint32ss_append_all__returns_data_not(void **state) {
-
-  const int length = 5;
-  f_uint32ss_t source = f_uint32ss_t_initialize;
-  f_uint32ss_t destination = f_uint32ss_t_initialize;
-
-  {
-    const f_status_t status = f_uint32ss_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  {
-    const f_status_t status = f_uint32ss_append_all(source, &destination);
-
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
-  }
-
-  free((void *) source.array);
-}
-
-void test__f_type_array_uint32ss_append_all__parameter_checking(void **state) {
-
-  const f_uint32ss_t data = f_uint32ss_t_initialize;
-
-  {
-    const f_status_t status = f_uint32ss_append_all(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 8ca0605127c16d13d0222682d52840a4a1f4391e..0135f4a62fa936afef70a4dd4883e1303659109b 100644 (file)
 #define _TEST__F_type_array__uint32ss_append_all
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint32ss_append_all()
+ * @see f_uint32ss_append_all()
  */
-extern void test__f_type_array_uint32ss_append_all__works(void **state);
+extern void test__f_type_array_uint32ss_append_all__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_uint32ss_append_all()
+ * @see f_uint32ss_append_all()
  */
 extern void test__f_type_array_uint32ss_append_all__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint32ss_append_all()
+ * @see f_uint32ss_append_all()
  */
-extern void test__f_type_array_uint32ss_append_all__parameter_checking(void **state);
+extern void test__f_type_array_uint32ss_append_all__works(void **state);
 
 #endif // _TEST__F_type_array__uint32ss_append_all
index d941d027a2256ce275bc6e14e298331b53f6001c..5219c964f1ce53f707f9d0a2264b8f8a4a8dec38 100644 (file)
@@ -5,12 +5,28 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint32ss_decimate_by__works(void **state) {
+void test__f_type_array_uint32ss_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint32ss_t data = f_uint32s_t_initialize;
 
   {
+    const f_status_t status = f_uint32ss_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_type_array_uint32ss_decimate_by__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_uint32ss_t data = f_uint32ss_t_initialize;
+
+  {
     const f_status_t status = f_uint32ss_resize(length, &data);
 
     assert_int_equal(status, F_none);
@@ -19,25 +35,33 @@ void test__f_type_array_uint32ss_decimate_by__works(void **state) {
   }
 
   {
-    const f_status_t status = f_uint32ss_decimate_by(length, &data);
+    const f_status_t status = f_uint32ss_decimate_by(0, &data);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_data_not);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
-void test__f_type_array_uint32ss_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_uint32ss_decimate_by__works(void **state) {
 
   const int length = 5;
   f_uint32ss_t data = f_uint32s_t_initialize;
 
   {
-    const f_status_t status = f_uint32ss_decimate_by(length, 0);
+    const f_status_t status = f_uint32ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_uint32ss_decimate_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index 50380ba119fa8fd69baf53fb59efe167c382d851..79551298738ac57c9fb9487b8cc75b574ac212f2 100644 (file)
 #define _TEST__F_type_array__uint32ss_decimate_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint32ss_decimate_by()
+ * @see f_uint32ss_decimate_by()
  */
-extern void test__f_type_array_uint32ss_decimate_by__works(void **state);
+extern void test__f_type_array_uint32ss_decimate_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
  * @see f_type_array_uint32ss_decimate_by()
  */
-extern void test__f_type_array_uint32ss_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_uint32ss_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint32ss_decimate_by()
+ */
+extern void test__f_type_array_uint32ss_decimate_by__works(void **state);
 
 #endif // _TEST__F_type_array__uint32ss_decimate_by
index f7fd55030b1ce59f82c30b0d97e30bab835a75c0..27512737f9b091e45e255df461b781c9bf7f0590 100644 (file)
@@ -5,12 +5,28 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint32ss_decrease_by__works(void **state) {
+void test__f_type_array_uint32ss_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint32ss_t data = f_uint32s_t_initialize;
 
   {
+    const f_status_t status = f_uint32ss_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_type_array_uint32ss_decrease_by__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_uint32ss_t data = f_uint32ss_t_initialize;
+
+  {
     const f_status_t status = f_uint32ss_resize(length, &data);
 
     assert_int_equal(status, F_none);
@@ -19,25 +35,33 @@ void test__f_type_array_uint32ss_decrease_by__works(void **state) {
   }
 
   {
-    const f_status_t status = f_uint32ss_decrease_by(length, &data);
+    const f_status_t status = f_uint32ss_decrease_by(0, &data);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_data_not);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
-void test__f_type_array_uint32ss_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_uint32ss_decrease_by__works(void **state) {
 
   const int length = 5;
   f_uint32ss_t data = f_uint32s_t_initialize;
 
   {
-    const f_status_t status = f_uint32ss_decrease_by(length, 0);
+    const f_status_t status = f_uint32ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_uint32ss_decrease_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index 695a5c9d42224c7c183d6f4301caabbb9abc9036..ae170aa474d3fab8e99ccf8b40466090de177c23 100644 (file)
 #define _TEST__F_type_array__uint32ss_decrease_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint32ss_decrease_by()
+ * @see f_uint32ss_decrease_by()
  */
-extern void test__f_type_array_uint32ss_decrease_by__works(void **state);
+extern void test__f_type_array_uint32ss_decrease_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_uint32ss_decrease_by()
+ * @see f_uint32ss_decrease_by()
  */
-extern void test__f_type_array_uint32ss_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_uint32ss_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint32ss_decrease_by()
+ */
+extern void test__f_type_array_uint32ss_decrease_by__works(void **state);
 
 #endif // _TEST__F_type_array__uint32ss_decrease_by
index 432b3621ce037d9e33fdfe00846c7b05966f4e22..344012ec72660d8da53c6083b95cd7a3243658e1 100644 (file)
@@ -5,27 +5,17 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint32ss_increase__works(void **state) {
+void test__f_type_array_uint32ss_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint32ss_t data = f_uint32s_t_initialize;
 
   {
-    const f_status_t status = f_uint32ss_resize(length, &data);
+    const f_status_t status = f_uint32ss_increase(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_uint32ss_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);
+    assert_int_equal(data.size, 0);
   }
 
   free((void *) data.array);
@@ -55,17 +45,27 @@ void test__f_type_array_uint32ss_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint32ss_increase__parameter_checking(void **state) {
+void test__f_type_array_uint32ss_increase__works(void **state) {
 
   const int length = 5;
   f_uint32ss_t data = f_uint32s_t_initialize;
 
   {
-    const f_status_t status = f_uint32ss_increase(length, 0);
+    const f_status_t status = f_uint32ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    data.used = length;
+
+    const f_status_t status = f_uint32ss_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);
index 18beac0dabf77ae9ccb258c197e0389b3565eb5f..754a1babe15e3c9cdb428120bf6060e9901d960a 100644 (file)
 #define _TEST__F_type_array__uint32ss_increase
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint32ss_increase()
+ * @see f_uint32ss_increase()
  */
-extern void test__f_type_array_uint32ss_increase__works(void **state);
+extern void test__f_type_array_uint32ss_increase__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_uint32ss_increase()
+ * @see f_uint32ss_increase()
  */
 extern void test__f_type_array_uint32ss_increase__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint32ss_increase()
+ * @see f_uint32ss_increase()
  */
-extern void test__f_type_array_uint32ss_increase__parameter_checking(void **state);
+extern void test__f_type_array_uint32ss_increase__works(void **state);
 
 #endif // _TEST__F_type_array__uint32ss_increase
index 07000c3653b6f1895fe95617e363469a450309a5..449e2b242e3237dc54f5025638e8a73209b72546 100644 (file)
@@ -5,12 +5,28 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint32ss_increase_by__works(void **state) {
+void test__f_type_array_uint32ss_increase_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint32ss_t data = f_uint32s_t_initialize;
 
   {
+    const f_status_t status = f_uint32ss_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_type_array_uint32ss_increase_by__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_uint32ss_t data = f_uint32ss_t_initialize;
+
+  {
     const f_status_t status = f_uint32ss_resize(length, &data);
 
     assert_int_equal(status, F_none);
@@ -19,32 +35,48 @@ void test__f_type_array_uint32ss_increase_by__works(void **state) {
   }
 
   {
-    data.used = length;
+    const f_status_t status = f_uint32ss_increase_by(0, &data);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
 
+  {
     const f_status_t status = f_uint32ss_increase_by(length, &data);
 
-    assert_int_equal(status, F_none);
-    assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
   }
 
   free((void *) data.array);
 }
 
-void test__f_type_array_uint32ss_increase_by__parameter_checking(void **state) {
+void test__f_type_array_uint32ss_increase_by__works(void **state) {
 
   const int length = 5;
   f_uint32ss_t data = f_uint32s_t_initialize;
 
   {
-    const f_status_t status = f_uint32ss_increase_by(length, 0);
+    const f_status_t status = f_uint32ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  {
+    data.used = length;
+
+    const f_status_t status = f_uint32ss_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
index c05511d79741b7fc43262d80b995c3f07e014a38..cfbe2c5b6b52fbf584e72621c6e2a9a3a5cd6a5f 100644 (file)
 #define _TEST__F_type_array__uint32ss_increase_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint32ss_increase_by()
+ * @see f_uint32ss_increase_by()
  */
-extern void test__f_type_array_uint32ss_increase_by__works(void **state);
+extern void test__f_type_array_uint32ss_increase_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_uint32ss_increase_by()
+ * @see f_uint32ss_increase_by()
  */
-extern void test__f_type_array_uint32ss_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_uint32ss_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint32ss_increase_by()
+ */
+extern void test__f_type_array_uint32ss_increase_by__works(void **state);
 
 #endif // _TEST__F_type_array__uint32ss_increase_by
index 16b522ecdf58696ba6b9700c34aa6b72859c43fc..27209a41571e66c47e0117b12e1f476e8a66a313 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint32ss_resize__works(void **state) {
+void test__f_type_array_uint32ss_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint32ss_t data = f_uint32ss_t_initialize;
 
   {
-    const f_status_t status = f_uint32ss_resize(length, &data);
+    const f_status_t status = f_uint32ss_resize(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_uint32ss_resize__parameter_checking(void **state) {
+void test__f_type_array_uint32ss_resize__works(void **state) {
 
   const int length = 5;
   f_uint32ss_t data = f_uint32ss_t_initialize;
 
   {
-    const f_status_t status = f_uint32ss_resize(length, 0);
+    const f_status_t status = f_uint32ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index fd1ed4c5aedc8471747d2399232f5d3f68a50c94..e5e6c9f69fe0d1f23e0a3e204568ae8703bfd2c6 100644 (file)
 #define _TEST__F_type_array__uint32ss_resize
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint32ss_resize()
+ * @see f_uint32ss_resize()
  */
-extern void test__f_type_array_uint32ss_resize__works(void **state);
+extern void test__f_type_array_uint32ss_resize__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint32ss_resize()
+ * @see f_uint32ss_resize()
  */
-extern void test__f_type_array_uint32ss_resize__parameter_checking(void **state);
+extern void test__f_type_array_uint32ss_resize__works(void **state);
 
 #endif // _TEST__F_type_array__uint32ss_resize
index 4336952012a4c5d21d0103e6653ae7c39b9efa85..fd65031fe0e324887576bb9958d9dde27ccb5199 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint64s_adjust__works(void **state) {
+void test__f_type_array_uint64s_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint64s_t data = f_uint64s_t_initialize;
 
   {
-    const f_status_t status = f_uint64s_adjust(length, &data);
+    const f_status_t status = f_uint64s_adjust(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_uint64s_adjust__parameter_checking(void **state) {
+void test__f_type_array_uint64s_adjust__works(void **state) {
 
   const int length = 5;
   f_uint64s_t data = f_uint64s_t_initialize;
 
   {
-    const f_status_t status = f_uint64s_adjust(length, 0);
+    const f_status_t status = f_uint64s_adjust(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index 90f6b3454fedb2ffa97721cf90910b0a17ee5600..1a262845a9f8a4ead575e57e280275a1f0ed0260 100644 (file)
 #define _TEST__F_type_array__uint64s_adjust
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint64s_adjust()
+ * @see f_uint64s_adjust()
  */
-extern void test__f_type_array_uint64s_adjust__works(void **state);
+extern void test__f_type_array_uint64s_adjust__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint64s_adjust()
+ * @see f_uint64s_adjust()
  */
-extern void test__f_type_array_uint64s_adjust__parameter_checking(void **state);
+extern void test__f_type_array_uint64s_adjust__works(void **state);
 
 #endif // _TEST__F_type_array__uint64s_adjust
index 243e2307ed67b451b978b04a27fdf83c445b08b1..a4490fbd9746aca07a9896526ba62b2cd5a625b1 100644 (file)
@@ -5,6 +5,17 @@
 extern "C" {
 #endif
 
+void test__f_type_array_uint64s_append__parameter_checking(void **state) {
+
+  const uint64_t data = 0;
+
+  {
+    const f_status_t status = f_uint64s_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
 void test__f_type_array_uint64s_append__works(void **state) {
 
   const uint64_t source = 3;
@@ -21,17 +32,6 @@ void test__f_type_array_uint64s_append__works(void **state) {
   free((void *) destination.array);
 }
 
-void test__f_type_array_uint64s_append__parameter_checking(void **state) {
-
-  const uint64_t data = 0;
-
-  {
-    const f_status_t status = f_uint64s_append(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 2cc3a26b9997560dbfcf29daf1e2c50826d483c6..d91285459df58bdec371e07ea98789613f253c52 100644 (file)
 #define _TEST__F_type_array__uint64s_append
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint64s_append()
+ * @see f_uint64s_append()
  */
-extern void test__f_type_array_uint64s_append__works(void **state);
+extern void test__f_type_array_uint64s_append__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint64s_append()
+ * @see f_uint64s_append()
  */
-extern void test__f_type_array_uint64s_append__parameter_checking(void **state);
+extern void test__f_type_array_uint64s_append__works(void **state);
 
 #endif // _TEST__F_type_array__uint64s_append
index 7b8902c710f7c63c73ad07eb1b857d866cfd664a..33db407d3d5494ce030e70f0f4381ede97c3c2b8 100644 (file)
@@ -5,10 +5,20 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint64s_append_all__works(void **state) {
+void test__f_type_array_uint64s_append_all__parameter_checking(void **state) {
+
+  const f_uint64s_t data = f_uint64s_t_initialize;
+
+  {
+    const f_status_t status = f_uint64s_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_uint64s_append_all__returns_data_not(void **state) {
 
   const int length = 5;
-  const int length_used = 2;
   f_uint64s_t source = f_uint64s_t_initialize;
   f_uint64s_t destination = f_uint64s_t_initialize;
 
@@ -20,29 +30,22 @@ void test__f_type_array_uint64s_append_all__works(void **state) {
     assert_int_equal(source.size, length);
   }
 
-  for (; source.used < length_used; ++source.used) {
-    source.array[source.used] = source.used + 1;
-  } // for
-
   {
     const f_status_t status = f_uint64s_append_all(source, &destination);
 
-    assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
-
-    for (f_array_length_t i = 0; i < source.used; ++i) {
-      assert_int_equal(destination.array[i], i + 1);
-    } // for
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
   }
 
   free((void *) source.array);
-  free((void *) destination.array);
 }
 
-void test__f_type_array_uint64s_append_all__returns_data_not(void **state) {
+void test__f_type_array_uint64s_append_all__works(void **state) {
 
   const int length = 5;
+  const int length_used = 2;
   f_uint64s_t source = f_uint64s_t_initialize;
   f_uint64s_t destination = f_uint64s_t_initialize;
 
@@ -54,27 +57,24 @@ void test__f_type_array_uint64s_append_all__returns_data_not(void **state) {
     assert_int_equal(source.size, length);
   }
 
+  for (; source.used < length_used; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
+
   {
     const f_status_t status = f_uint64s_append_all(source, &destination);
 
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < source.used; ++i) {
+      assert_int_equal(destination.array[i], i + 1);
+    } // for
   }
 
   free((void *) source.array);
-}
-
-void test__f_type_array_uint64s_append_all__parameter_checking(void **state) {
-
-  const f_uint64s_t data = f_uint64s_t_initialize;
-
-  {
-    const f_status_t status = f_uint64s_append_all(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
+  free((void *) destination.array);
 }
 
 #ifdef __cplusplus
index 0a43b5109395ffd92b88d03c6c29cd0265c1b043..677529d35e3fffd8fc758d2d5d99c986d79cc9a3 100644 (file)
 #define _TEST__F_type_array__uint64s_append_all
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint64s_append_all()
+ * @see f_uint64s_append_all()
  */
-extern void test__f_type_array_uint64s_append_all__works(void **state);
+extern void test__f_type_array_uint64s_append_all__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_uint64s_append_all()
+ * @see f_uint64s_append_all()
  */
 extern void test__f_type_array_uint64s_append_all__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint64s_append_all()
+ * @see f_uint64s_append_all()
  */
-extern void test__f_type_array_uint64s_append_all__parameter_checking(void **state);
+extern void test__f_type_array_uint64s_append_all__works(void **state);
 
 #endif // _TEST__F_type_array__uint64s_append_all
index f2e2f707477bd72a3e8b34881afdb96f84b75268..03532923ac235718daf9f41fb60fe9f3adb8a950 100644 (file)
@@ -5,23 +5,15 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint64s_decimate_by__works(void **state) {
+void test__f_type_array_uint64s_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint64s_t data = f_uint64s_t_initialize;
 
   {
-    const f_status_t status = f_uint64s_resize(length, &data);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_uint64s_decimate_by(length, &data);
+    const f_status_t status = f_uint64s_decimate_by(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
@@ -29,15 +21,23 @@ void test__f_type_array_uint64s_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_uint64s_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_uint64s_decimate_by__works(void **state) {
 
   const int length = 5;
   f_uint64s_t data = f_uint64s_t_initialize;
 
   {
-    const f_status_t status = f_uint64s_decimate_by(length, 0);
+    const f_status_t status = f_uint64s_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_uint64s_decimate_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index 46c9b0152172817bd52e991364a56412c4654eab..6ab6f114ed921c28f938bacbb13d3ccdd644290b 100644 (file)
 #define _TEST__F_type_array__uint64s_decimate_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint64s_decimate_by()
+ * @see f_uint64s_decimate_by()
  */
-extern void test__f_type_array_uint64s_decimate_by__works(void **state);
+extern void test__f_type_array_uint64s_decimate_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint64s_decimate_by()
+ * @see f_uint64s_decimate_by()
  */
-extern void test__f_type_array_uint64s_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_uint64s_decimate_by__works(void **state);
 
 #endif // _TEST__F_type_array__uint64s_decimate_by
index 09d1858115fceee0cece97b3837bbd0572255cd1..35d7845d0a722183cfc4d7032948ce892565a984 100644 (file)
@@ -5,23 +5,15 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint64s_decrease_by__works(void **state) {
+void test__f_type_array_uint64s_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint64s_t data = f_uint64s_t_initialize;
 
   {
-    const f_status_t status = f_uint64s_resize(length, &data);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_uint64s_decrease_by(length, &data);
+    const f_status_t status = f_uint64s_decrease_by(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
@@ -29,15 +21,23 @@ void test__f_type_array_uint64s_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_uint64s_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_uint64s_decrease_by__works(void **state) {
 
   const int length = 5;
   f_uint64s_t data = f_uint64s_t_initialize;
 
   {
-    const f_status_t status = f_uint64s_decrease_by(length, 0);
+    const f_status_t status = f_uint64s_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_uint64s_decrease_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index 69cdf74b40521422526c18abf8a189e96896fed6..c862c30d75a6ce005707f31876b72df1754e55e6 100644 (file)
 #define _TEST__F_type_array__uint64s_decrease_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint64s_decrease_by()
+ * @see f_uint64s_decrease_by()
  */
-extern void test__f_type_array_uint64s_decrease_by__works(void **state);
+extern void test__f_type_array_uint64s_decrease_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint64s_decrease_by()
+ * @see f_uint64s_decrease_by()
  */
-extern void test__f_type_array_uint64s_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_uint64s_decrease_by__works(void **state);
 
 #endif // _TEST__F_type_array__uint64s_decrease_by
index 5f4e3d09d886d74de68f12f4a1ae508a803ae4b6..1a48211f75cd68700332f7c25f7985f758f3991c 100644 (file)
@@ -5,27 +5,17 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint64s_increase__works(void **state) {
+void test__f_type_array_uint64s_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint64s_t data = f_uint64s_t_initialize;
 
   {
-    const f_status_t status = f_uint64s_resize(length, &data);
+    const f_status_t status = f_uint64s_increase(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_uint64s_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);
+    assert_int_equal(data.size, 0);
   }
 
   free((void *) data.array);
@@ -55,17 +45,27 @@ void test__f_type_array_uint64s_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint64s_increase__parameter_checking(void **state) {
+void test__f_type_array_uint64s_increase__works(void **state) {
 
   const int length = 5;
   f_uint64s_t data = f_uint64s_t_initialize;
 
   {
-    const f_status_t status = f_uint64s_increase(length, 0);
+    const f_status_t status = f_uint64s_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    data.used = length;
+
+    const f_status_t status = f_uint64s_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);
index 76a95f800d63cdded1ae242615a2900f1427f909..633728036602dd22c0fcf9f01d12c3f2c82bede4 100644 (file)
 #define _TEST__F_type_array__uint64s_increase
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint64s_increase()
+ * @see f_uint64s_increase()
  */
-extern void test__f_type_array_uint64s_increase__works(void **state);
+extern void test__f_type_array_uint64s_increase__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_uint64s_increase()
+ * @see f_uint64s_increase()
  */
 extern void test__f_type_array_uint64s_increase__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint64s_increase()
+ * @see f_uint64s_increase()
  */
-extern void test__f_type_array_uint64s_increase__parameter_checking(void **state);
+extern void test__f_type_array_uint64s_increase__works(void **state);
 
 #endif // _TEST__F_type_array__uint64s_increase
index 89c33b06f5ed2665f30565f30aa547526a6d22e3..f3ef9ea1aeb272f39c906865597b915d16528e94 100644 (file)
@@ -5,6 +5,22 @@
 extern "C" {
 #endif
 
+void test__f_type_array_uint64s_increase_by__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_uint64s_t data = f_uint64s_t_initialize;
+
+  {
+    const f_status_t status = f_uint64s_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_type_array_uint64s_increase_by__works(void **state) {
 
   const int length = 5;
@@ -31,22 +47,6 @@ void test__f_type_array_uint64s_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint64s_increase_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_uint64s_t data = f_uint64s_t_initialize;
-
-  {
-    const f_status_t status = f_uint64s_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);
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index e0395215a0431e3f0e5a8f2bd59deb0822e61b74..60e4e77b0a960acb8383aae66a027d0d3b843fcc 100644 (file)
 #define _TEST__F_type_array__uint64s_increase_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint64s_increase_by()
+ * @see f_uint64s_increase_by()
  */
-extern void test__f_type_array_uint64s_increase_by__works(void **state);
+extern void test__f_type_array_uint64s_increase_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint64s_increase_by()
+ * @see f_uint64s_increase_by()
  */
-extern void test__f_type_array_uint64s_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_uint64s_increase_by__works(void **state);
 
 #endif // _TEST__F_type_array__uint64s_increase_by
index 53e459a6f390e7d54c3ae81219f0a5d873838068..ee4873999cb96448fe67555793bfa75bef214862 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint64s_resize__works(void **state) {
+void test__f_type_array_uint64s_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint64s_t data = f_uint64s_t_initialize;
 
   {
-    const f_status_t status = f_uint64s_resize(length, &data);
+    const f_status_t status = f_uint64s_resize(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_uint64s_resize__parameter_checking(void **state) {
+void test__f_type_array_uint64s_resize__works(void **state) {
 
   const int length = 5;
   f_uint64s_t data = f_uint64s_t_initialize;
 
   {
-    const f_status_t status = f_uint64s_resize(length, 0);
+    const f_status_t status = f_uint64s_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index f28ff4b883f8fbbed212f6a553e6f70757cd5bd8..405b16e5b17a58035c74338d16307b71c35831ff 100644 (file)
 #define _TEST__F_type_array__uint64s_resize
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint64s_resize()
+ * @see f_uint64s_resize()
  */
-extern void test__f_type_array_uint64s_resize__works(void **state);
+extern void test__f_type_array_uint64s_resize__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint64s_resize()
+ * @see f_uint64s_resize()
  */
-extern void test__f_type_array_uint64s_resize__parameter_checking(void **state);
+extern void test__f_type_array_uint64s_resize__works(void **state);
 
 #endif // _TEST__F_type_array__uint64s_resize
index a069aa3a6189385c233fddad61ef0082a9ea6a1e..162a7b789f7c8c6cecd5cb57f6b93c9c89546f66 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint64ss_adjust__works(void **state) {
+void test__f_type_array_uint64ss_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint64ss_t data = f_uint64ss_t_initialize;
 
   {
-    const f_status_t status = f_uint64ss_adjust(length, &data);
+    const f_status_t status = f_uint64ss_adjust(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_uint64ss_adjust__parameter_checking(void **state) {
+void test__f_type_array_uint64ss_adjust__works(void **state) {
 
   const int length = 5;
   f_uint64ss_t data = f_uint64ss_t_initialize;
 
   {
-    const f_status_t status = f_uint64ss_adjust(length, 0);
+    const f_status_t status = f_uint64ss_adjust(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index 66269a7590e843ac248f43706a0a2e724ffd2421..80705b21223a213dae40c9fa3f0fcd15aaadc8aa 100644 (file)
 #define _TEST__F_type_array__uint64ss_adjust
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint64ss_adjust()
+ * @see f_uint64ss_adjust()
  */
-extern void test__f_type_array_uint64ss_adjust__works(void **state);
+extern void test__f_type_array_uint64ss_adjust__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint64ss_adjust()
+ * @see f_uint64ss_adjust()
  */
-extern void test__f_type_array_uint64ss_adjust__parameter_checking(void **state);
+extern void test__f_type_array_uint64ss_adjust__works(void **state);
 
 #endif // _TEST__F_type_array__uint64ss_adjust
index 1e5448435e5fd0c45df070f246a752a95b317e9f..80a085cc534989f87a1c8c814dc8f1c912a96af3 100644 (file)
@@ -5,7 +5,18 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint64ss_append__works(void **state) {
+void test__f_type_array_uint64ss_append__parameter_checking(void **state) {
+
+  f_uint64s_t data = f_uint64s_t_initialize;
+
+  {
+    const f_status_t status = f_uint64ss_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_uint64ss_append__returns_data_not(void **state) {
 
   const int length = 5;
   f_uint64s_t source = f_uint64s_t_initialize;
@@ -19,32 +30,19 @@ void test__f_type_array_uint64ss_append__works(void **state) {
     assert_int_equal(source.size, length);
   }
 
-  for (; source.used < length; ++source.used) {
-    source.array[source.used] = source.used + 1;
-  } // for
-
   {
     const f_status_t status = f_uint64ss_append(source, &destination);
 
-    assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, 1);
-    assert_int_equal(destination.array[0].used, source.used);
-    assert_int_equal(destination.array[0].size, source.used);
-
-    for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
-      assert_int_equal(destination.array[0].array[i], i + 1);
-    } // for
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
   }
 
-  for (f_array_length_t i = 0; i < destination.used; ++i) {
-    free((void *) destination.array[i].array);
-  } // for
-
   free((void *) source.array);
-  free((void *) destination.array);
 }
 
-void test__f_type_array_uint64ss_append__returns_data_not(void **state) {
+void test__f_type_array_uint64ss_append__works(void **state) {
 
   const int length = 5;
   f_uint64s_t source = f_uint64s_t_initialize;
@@ -58,27 +56,29 @@ void test__f_type_array_uint64ss_append__returns_data_not(void **state) {
     assert_int_equal(source.size, length);
   }
 
+  for (; source.used < length; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
+
   {
     const f_status_t status = f_uint64ss_append(source, &destination);
 
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
-  }
-
-  free((void *) source.array);
-}
-
-void test__f_type_array_uint64ss_append__parameter_checking(void **state) {
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0].used, source.used);
+    assert_int_equal(destination.array[0].size, source.used);
 
-  f_uint64s_t data = f_uint64s_t_initialize;
+    for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
+      assert_int_equal(destination.array[0].array[i], i + 1);
+    } // for
+  }
 
-  {
-    const f_status_t status = f_uint64ss_append(data, 0);
+  for (f_array_length_t i = 0; i < destination.used; ++i) {
+    free((void *) destination.array[i].array);
+  } // for
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
+  free((void *) source.array);
+  free((void *) destination.array);
 }
 
 #ifdef __cplusplus
index 071d13a5dcbbd5f4c23778a9e180673aceb0ff4d..f10b1cb496aee7b7a029308ba3c960b78f49b8e0 100644 (file)
 #define _TEST__F_type_array__uint64ss_append
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint64ss_append()
+ * @see f_uint64ss_append()
  */
-extern void test__f_type_array_uint64ss_append__works(void **state);
+extern void test__f_type_array_uint64ss_append__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_uint64ss_append()
+ * @see f_uint64ss_append()
  */
 extern void test__f_type_array_uint64ss_append__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint64ss_append()
+ * @see f_uint64ss_append()
  */
-extern void test__f_type_array_uint64ss_append__parameter_checking(void **state);
+extern void test__f_type_array_uint64ss_append__works(void **state);
 
 #endif // _TEST__F_type_array__uint64ss_append
index 80edb1f4320d06b16e932a4f19900bd6d77598c4..242c8e50d5faea4183bea2145e28a1a82d24117b 100644 (file)
@@ -5,6 +5,43 @@
 extern "C" {
 #endif
 
+void test__f_type_array_uint64ss_append_all__parameter_checking(void **state) {
+
+  const f_uint64ss_t data = f_uint64ss_t_initialize;
+
+  {
+    const f_status_t status = f_uint64ss_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_uint64ss_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_uint64ss_t source = f_uint64ss_t_initialize;
+  f_uint64ss_t destination = f_uint64ss_t_initialize;
+
+  {
+    const f_status_t status = f_uint64ss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_uint64ss_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
 void test__f_type_array_uint64ss_append_all__works(void **state) {
 
   const int length = 5;
@@ -63,43 +100,6 @@ void test__f_type_array_uint64ss_append_all__works(void **state) {
   free((void *) destination.array);
 }
 
-void test__f_type_array_uint64ss_append_all__returns_data_not(void **state) {
-
-  const int length = 5;
-  f_uint64ss_t source = f_uint64ss_t_initialize;
-  f_uint64ss_t destination = f_uint64ss_t_initialize;
-
-  {
-    const f_status_t status = f_uint64ss_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  {
-    const f_status_t status = f_uint64ss_append_all(source, &destination);
-
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
-  }
-
-  free((void *) source.array);
-}
-
-void test__f_type_array_uint64ss_append_all__parameter_checking(void **state) {
-
-  const f_uint64ss_t data = f_uint64ss_t_initialize;
-
-  {
-    const f_status_t status = f_uint64ss_append_all(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 0bc11ed345a55ed4244e3573fb1669a486e160dd..9ea4309f0d23f98c4fb3ffef3d37aa33c9a570da 100644 (file)
 #define _TEST__F_type_array__uint64ss_append_all
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint64ss_append_all()
+ * @see f_uint64ss_append_all()
  */
-extern void test__f_type_array_uint64ss_append_all__works(void **state);
+extern void test__f_type_array_uint64ss_append_all__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_uint64ss_append_all()
+ * @see f_uint64ss_append_all()
  */
 extern void test__f_type_array_uint64ss_append_all__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint64ss_append_all()
+ * @see f_uint64ss_append_all()
  */
-extern void test__f_type_array_uint64ss_append_all__parameter_checking(void **state);
+extern void test__f_type_array_uint64ss_append_all__works(void **state);
 
 #endif // _TEST__F_type_array__uint64ss_append_all
index 53edea25dd36a7ab8bc4f90875f06278620eb285..889e2b9c4aa5182cc2ef12bc05a9d5bd6e4253d8 100644 (file)
@@ -5,12 +5,28 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint64ss_decimate_by__works(void **state) {
+void test__f_type_array_uint64ss_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint64ss_t data = f_uint64s_t_initialize;
 
   {
+    const f_status_t status = f_uint64ss_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_type_array_uint64ss_decimate_by__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_uint64ss_t data = f_uint64ss_t_initialize;
+
+  {
     const f_status_t status = f_uint64ss_resize(length, &data);
 
     assert_int_equal(status, F_none);
@@ -19,25 +35,33 @@ void test__f_type_array_uint64ss_decimate_by__works(void **state) {
   }
 
   {
-    const f_status_t status = f_uint64ss_decimate_by(length, &data);
+    const f_status_t status = f_uint64ss_decimate_by(0, &data);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_data_not);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
-void test__f_type_array_uint64ss_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_uint64ss_decimate_by__works(void **state) {
 
   const int length = 5;
   f_uint64ss_t data = f_uint64s_t_initialize;
 
   {
-    const f_status_t status = f_uint64ss_decimate_by(length, 0);
+    const f_status_t status = f_uint64ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_uint64ss_decimate_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index 97a969e2794b09fc643c8d2c91d5c5ac03b7ce87..1be9c0c89439b9277bc294506cc2e3227def67a8 100644 (file)
 #define _TEST__F_type_array__uint64ss_decimate_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint64ss_decimate_by()
+ * @see f_uint64ss_decimate_by()
  */
-extern void test__f_type_array_uint64ss_decimate_by__works(void **state);
+extern void test__f_type_array_uint64ss_decimate_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
  * @see f_type_array_uint64ss_decimate_by()
  */
-extern void test__f_type_array_uint64ss_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_uint64ss_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint64ss_decimate_by()
+ */
+extern void test__f_type_array_uint64ss_decimate_by__works(void **state);
 
 #endif // _TEST__F_type_array__uint64ss_decimate_by
index a5d8132cf2ba7daeccf61294457a1b34783607e6..0240f3d4085f79c5c9e1b1f4e7488f88cd5d4d3c 100644 (file)
@@ -5,12 +5,28 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint64ss_decrease_by__works(void **state) {
+void test__f_type_array_uint64ss_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint64ss_t data = f_uint64s_t_initialize;
 
   {
+    const f_status_t status = f_uint64ss_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_type_array_uint64ss_decrease_by__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_uint64ss_t data = f_uint64ss_t_initialize;
+
+  {
     const f_status_t status = f_uint64ss_resize(length, &data);
 
     assert_int_equal(status, F_none);
@@ -19,25 +35,33 @@ void test__f_type_array_uint64ss_decrease_by__works(void **state) {
   }
 
   {
-    const f_status_t status = f_uint64ss_decrease_by(length, &data);
+    const f_status_t status = f_uint64ss_decrease_by(0, &data);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_data_not);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
-void test__f_type_array_uint64ss_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_uint64ss_decrease_by__works(void **state) {
 
   const int length = 5;
   f_uint64ss_t data = f_uint64s_t_initialize;
 
   {
-    const f_status_t status = f_uint64ss_decrease_by(length, 0);
+    const f_status_t status = f_uint64ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_uint64ss_decrease_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index 9927a943809543a3957682f2bcf69db354a47394..83a317025530cde228c0e57ebaffedea457ff453 100644 (file)
 #define _TEST__F_type_array__uint64ss_decrease_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint64ss_decrease_by()
+ * @see f_uint64ss_decrease_by()
  */
-extern void test__f_type_array_uint64ss_decrease_by__works(void **state);
+extern void test__f_type_array_uint64ss_decrease_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_uint64ss_decrease_by()
+ * @see f_uint64ss_decrease_by()
  */
-extern void test__f_type_array_uint64ss_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_uint64ss_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint64ss_decrease_by()
+ */
+extern void test__f_type_array_uint64ss_decrease_by__works(void **state);
 
 #endif // _TEST__F_type_array__uint64ss_decrease_by
index 8338db8f4bcc23070e4534ce5fd00ecb566a1765..622dd67758e46d2eaa4eaa3b54310a7b7e7e710a 100644 (file)
@@ -5,27 +5,17 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint64ss_increase__works(void **state) {
+void test__f_type_array_uint64ss_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint64ss_t data = f_uint64s_t_initialize;
 
   {
-    const f_status_t status = f_uint64ss_resize(length, &data);
+    const f_status_t status = f_uint64ss_increase(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_uint64ss_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);
+    assert_int_equal(data.size, 0);
   }
 
   free((void *) data.array);
@@ -55,17 +45,27 @@ void test__f_type_array_uint64ss_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint64ss_increase__parameter_checking(void **state) {
+void test__f_type_array_uint64ss_increase__works(void **state) {
 
   const int length = 5;
   f_uint64ss_t data = f_uint64s_t_initialize;
 
   {
-    const f_status_t status = f_uint64ss_increase(length, 0);
+    const f_status_t status = f_uint64ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    data.used = length;
+
+    const f_status_t status = f_uint64ss_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);
index ad9671be57a35790ee9b78132448433f30af5781..35f50ebb10bdb60ef1f13b208ead87e0453d3568 100644 (file)
 #define _TEST__F_type_array__uint64ss_increase
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint64ss_increase()
+ * @see f_uint64ss_increase()
  */
-extern void test__f_type_array_uint64ss_increase__works(void **state);
+extern void test__f_type_array_uint64ss_increase__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_uint64ss_increase()
+ * @see f_uint64ss_increase()
  */
 extern void test__f_type_array_uint64ss_increase__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint64ss_increase()
+ * @see f_uint64ss_increase()
  */
-extern void test__f_type_array_uint64ss_increase__parameter_checking(void **state);
+extern void test__f_type_array_uint64ss_increase__works(void **state);
 
 #endif // _TEST__F_type_array__uint64ss_increase
index ae5192f7a46957868e4444787d1b47c9ccd392d9..d6e0bc5ab902201e3508f4da588f50451a21b5a2 100644 (file)
@@ -5,12 +5,28 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint64ss_increase_by__works(void **state) {
+void test__f_type_array_uint64ss_increase_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint64ss_t data = f_uint64s_t_initialize;
 
   {
+    const f_status_t status = f_uint64ss_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_type_array_uint64ss_increase_by__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_uint64ss_t data = f_uint64ss_t_initialize;
+
+  {
     const f_status_t status = f_uint64ss_resize(length, &data);
 
     assert_int_equal(status, F_none);
@@ -19,32 +35,48 @@ void test__f_type_array_uint64ss_increase_by__works(void **state) {
   }
 
   {
-    data.used = length;
+    const f_status_t status = f_uint64ss_increase_by(0, &data);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
 
+  {
     const f_status_t status = f_uint64ss_increase_by(length, &data);
 
-    assert_int_equal(status, F_none);
-    assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
   }
 
   free((void *) data.array);
 }
 
-void test__f_type_array_uint64ss_increase_by__parameter_checking(void **state) {
+void test__f_type_array_uint64ss_increase_by__works(void **state) {
 
   const int length = 5;
   f_uint64ss_t data = f_uint64s_t_initialize;
 
   {
-    const f_status_t status = f_uint64ss_increase_by(length, 0);
+    const f_status_t status = f_uint64ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  {
+    data.used = length;
+
+    const f_status_t status = f_uint64ss_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
index 31732689769dbf26e5b28ef80b59e93c82c902d3..6c275a31fe831ada471a6e038324666c553f5da9 100644 (file)
 #define _TEST__F_type_array__uint64ss_increase_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint64ss_increase_by()
+ * @see f_uint64ss_increase_by()
  */
-extern void test__f_type_array_uint64ss_increase_by__works(void **state);
+extern void test__f_type_array_uint64ss_increase_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_uint64ss_increase_by()
+ * @see f_uint64ss_increase_by()
  */
-extern void test__f_type_array_uint64ss_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_uint64ss_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint64ss_increase_by()
+ */
+extern void test__f_type_array_uint64ss_increase_by__works(void **state);
 
 #endif // _TEST__F_type_array__uint64ss_increase_by
index c471785b2e7f1925749e57c8f940e582909db04d..f08eb18bf9c5c982a8217406e30d3d5b7b291875 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint64ss_resize__works(void **state) {
+void test__f_type_array_uint64ss_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint64ss_t data = f_uint64ss_t_initialize;
 
   {
-    const f_status_t status = f_uint64ss_resize(length, &data);
+    const f_status_t status = f_uint64ss_resize(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_uint64ss_resize__parameter_checking(void **state) {
+void test__f_type_array_uint64ss_resize__works(void **state) {
 
   const int length = 5;
   f_uint64ss_t data = f_uint64ss_t_initialize;
 
   {
-    const f_status_t status = f_uint64ss_resize(length, 0);
+    const f_status_t status = f_uint64ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index acd18bc4af4ac8eb508b6136cbcf623ca3352f5f..9d67a216aa0a2aaf4da98b8747befe5e7a00c8a9 100644 (file)
 #define _TEST__F_type_array__uint64ss_resize
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint64ss_resize()
+ * @see f_uint64ss_resize()
  */
-extern void test__f_type_array_uint64ss_resize__works(void **state);
+extern void test__f_type_array_uint64ss_resize__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint64ss_resize()
+ * @see f_uint64ss_resize()
  */
-extern void test__f_type_array_uint64ss_resize__parameter_checking(void **state);
+extern void test__f_type_array_uint64ss_resize__works(void **state);
 
 #endif // _TEST__F_type_array__uint64ss_resize
index 33440e2e6179b82797094a1dbce707e302b0a5fe..3817a51eaf87e3edd25bd3362f96e7b8d53475a2 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint8s_adjust__works(void **state) {
+void test__f_type_array_uint8s_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint8s_t data = f_uint8s_t_initialize;
 
   {
-    const f_status_t status = f_uint8s_adjust(length, &data);
+    const f_status_t status = f_uint8s_adjust(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_uint8s_adjust__parameter_checking(void **state) {
+void test__f_type_array_uint8s_adjust__works(void **state) {
 
   const int length = 5;
   f_uint8s_t data = f_uint8s_t_initialize;
 
   {
-    const f_status_t status = f_uint8s_adjust(length, 0);
+    const f_status_t status = f_uint8s_adjust(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index d5afab2d6cf4f16468e952e88fdfb73fa629a027..bcdfa7616302480e8c8586a6c378b488426b93fa 100644 (file)
 #define _TEST__F_type_array__uint8s_adjust
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint8s_adjust()
+ * @see f_uint8s_adjust()
  */
-extern void test__f_type_array_uint8s_adjust__works(void **state);
+extern void test__f_type_array_uint8s_adjust__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint8s_adjust()
+ * @see f_uint8s_adjust()
  */
-extern void test__f_type_array_uint8s_adjust__parameter_checking(void **state);
+extern void test__f_type_array_uint8s_adjust__works(void **state);
 
 #endif // _TEST__F_type_array__uint8s_adjust
index d039c4784bb0d72d8a567284d732a21743105c5c..caca1cc61376a0da0db4f31e21f247f11db184c2 100644 (file)
@@ -5,6 +5,17 @@
 extern "C" {
 #endif
 
+void test__f_type_array_uint8s_append__parameter_checking(void **state) {
+
+  const uint8_t data = 0;
+
+  {
+    const f_status_t status = f_uint8s_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
 void test__f_type_array_uint8s_append__works(void **state) {
 
   const uint8_t source = 3;
@@ -21,17 +32,6 @@ void test__f_type_array_uint8s_append__works(void **state) {
   free((void *) destination.array);
 }
 
-void test__f_type_array_uint8s_append__parameter_checking(void **state) {
-
-  const uint8_t data = 0;
-
-  {
-    const f_status_t status = f_uint8s_append(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 02968f7b72a356141b63143028326ce236c7daf5..5a933e3906513557d2bf0011d9dfdce7eb38af84 100644 (file)
 #define _TEST__F_type_array__uint8s_append
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint8s_append()
+ * @see f_uint8s_append()
  */
-extern void test__f_type_array_uint8s_append__works(void **state);
+extern void test__f_type_array_uint8s_append__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint8s_append()
+ * @see f_uint8s_append()
  */
-extern void test__f_type_array_uint8s_append__parameter_checking(void **state);
+extern void test__f_type_array_uint8s_append__works(void **state);
 
 #endif // _TEST__F_type_array__uint8s_append
index a94ae535d37a1b38e20412afbdfce1b16d87dc02..2922008156c9c25468ef7a0c1a15da7576e29fbb 100644 (file)
@@ -5,10 +5,20 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint8s_append_all__works(void **state) {
+void test__f_type_array_uint8s_append_all__parameter_checking(void **state) {
+
+  const f_uint8s_t data = f_uint8s_t_initialize;
+
+  {
+    const f_status_t status = f_uint8s_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_uint8s_append_all__returns_data_not(void **state) {
 
   const int length = 5;
-  const int length_used = 2;
   f_uint8s_t source = f_uint8s_t_initialize;
   f_uint8s_t destination = f_uint8s_t_initialize;
 
@@ -20,29 +30,22 @@ void test__f_type_array_uint8s_append_all__works(void **state) {
     assert_int_equal(source.size, length);
   }
 
-  for (; source.used < length_used; ++source.used) {
-    source.array[source.used] = source.used + 1;
-  } // for
-
   {
     const f_status_t status = f_uint8s_append_all(source, &destination);
 
-    assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
-
-    for (f_array_length_t i = 0; i < source.used; ++i) {
-      assert_int_equal(destination.array[i], i + 1);
-    } // for
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
   }
 
   free((void *) source.array);
-  free((void *) destination.array);
 }
 
-void test__f_type_array_uint8s_append_all__returns_data_not(void **state) {
+void test__f_type_array_uint8s_append_all__works(void **state) {
 
   const int length = 5;
+  const int length_used = 2;
   f_uint8s_t source = f_uint8s_t_initialize;
   f_uint8s_t destination = f_uint8s_t_initialize;
 
@@ -54,27 +57,24 @@ void test__f_type_array_uint8s_append_all__returns_data_not(void **state) {
     assert_int_equal(source.size, length);
   }
 
+  for (; source.used < length_used; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
+
   {
     const f_status_t status = f_uint8s_append_all(source, &destination);
 
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < source.used; ++i) {
+      assert_int_equal(destination.array[i], i + 1);
+    } // for
   }
 
   free((void *) source.array);
-}
-
-void test__f_type_array_uint8s_append_all__parameter_checking(void **state) {
-
-  const f_uint8s_t data = f_uint8s_t_initialize;
-
-  {
-    const f_status_t status = f_uint8s_append_all(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
+  free((void *) destination.array);
 }
 
 #ifdef __cplusplus
index 039bf1f61e089a812d86ba1e3d39000f99a4b3ef..88654ec8f741b23c8afc5fdca2c531d82581c270 100644 (file)
 #define _TEST__F_type_array__uint8s_append_all
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint8s_append_all()
+ * @see f_uint8s_append_all()
  */
-extern void test__f_type_array_uint8s_append_all__works(void **state);
+extern void test__f_type_array_uint8s_append_all__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_uint8s_append_all()
+ * @see f_uint8s_append_all()
  */
 extern void test__f_type_array_uint8s_append_all__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint8s_append_all()
+ * @see f_uint8s_append_all()
  */
-extern void test__f_type_array_uint8s_append_all__parameter_checking(void **state);
+extern void test__f_type_array_uint8s_append_all__works(void **state);
 
 #endif // _TEST__F_type_array__uint8s_append_all
index 40ceac019ea8c024db9d7978a19dcab3bef5edc7..2d3a21a9c0661f3222cd4c2ef807c1101e709dc9 100644 (file)
@@ -5,23 +5,15 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint8s_decimate_by__works(void **state) {
+void test__f_type_array_uint8s_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint8s_t data = f_uint8s_t_initialize;
 
   {
-    const f_status_t status = f_uint8s_resize(length, &data);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_uint8s_decimate_by(length, &data);
+    const f_status_t status = f_uint8s_decimate_by(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
@@ -29,15 +21,23 @@ void test__f_type_array_uint8s_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_uint8s_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_uint8s_decimate_by__works(void **state) {
 
   const int length = 5;
   f_uint8s_t data = f_uint8s_t_initialize;
 
   {
-    const f_status_t status = f_uint8s_decimate_by(length, 0);
+    const f_status_t status = f_uint8s_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_uint8s_decimate_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index fe4247b6d4d23247dae7550352904dc720f56e21..709cec41aab26c82140f766ea4ad9a58a51a96e1 100644 (file)
 #define _TEST__F_type_array__uint8s_decimate_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint8s_decimate_by()
+ * @see f_uint8s_decimate_by()
  */
-extern void test__f_type_array_uint8s_decimate_by__works(void **state);
+extern void test__f_type_array_uint8s_decimate_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint8s_decimate_by()
+ * @see f_uint8s_decimate_by()
  */
-extern void test__f_type_array_uint8s_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_uint8s_decimate_by__works(void **state);
 
 #endif // _TEST__F_type_array__uint8s_decimate_by
index a2baa1bf7e90f196bc01e6d0736a9f7d2e8969ea..7b12e59586dd10a8be7815b4a8cd5085e7b02c6c 100644 (file)
@@ -5,23 +5,15 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint8s_decrease_by__works(void **state) {
+void test__f_type_array_uint8s_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint8s_t data = f_uint8s_t_initialize;
 
   {
-    const f_status_t status = f_uint8s_resize(length, &data);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    const f_status_t status = f_uint8s_decrease_by(length, &data);
+    const f_status_t status = f_uint8s_decrease_by(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
@@ -29,15 +21,23 @@ void test__f_type_array_uint8s_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_uint8s_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_uint8s_decrease_by__works(void **state) {
 
   const int length = 5;
   f_uint8s_t data = f_uint8s_t_initialize;
 
   {
-    const f_status_t status = f_uint8s_decrease_by(length, 0);
+    const f_status_t status = f_uint8s_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_uint8s_decrease_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index 6157173ced3c2f61693348adfccdc7d9683b8e7e..c73f24e57b8d95c3df9190daf24422db8cdc7f3b 100644 (file)
 #define _TEST__F_type_array__uint8s_decrease_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint8s_decrease_by()
+ * @see f_uint8s_decrease_by()
  */
-extern void test__f_type_array_uint8s_decrease_by__works(void **state);
+extern void test__f_type_array_uint8s_decrease_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint8s_decrease_by()
+ * @see f_uint8s_decrease_by()
  */
-extern void test__f_type_array_uint8s_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_uint8s_decrease_by__works(void **state);
 
 #endif // _TEST__F_type_array__uint8s_decrease_by
index 690bbaf4dcb9c9cb015d45a7df726cf02ee75e9c..b5b8ccb139fdb2fcfa147a252de169884811b8d8 100644 (file)
@@ -5,27 +5,17 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint8s_increase__works(void **state) {
+void test__f_type_array_uint8s_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint8s_t data = f_uint8s_t_initialize;
 
   {
-    const f_status_t status = f_uint8s_resize(length, &data);
+    const f_status_t status = f_uint8s_increase(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_uint8s_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);
+    assert_int_equal(data.size, 0);
   }
 
   free((void *) data.array);
@@ -55,17 +45,27 @@ void test__f_type_array_uint8s_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint8s_increase__parameter_checking(void **state) {
+void test__f_type_array_uint8s_increase__works(void **state) {
 
   const int length = 5;
   f_uint8s_t data = f_uint8s_t_initialize;
 
   {
-    const f_status_t status = f_uint8s_increase(length, 0);
+    const f_status_t status = f_uint8s_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    data.used = length;
+
+    const f_status_t status = f_uint8s_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);
index 77be5544431a38519666249cbf0dc1c6149f0d28..99ff20b751b2805a650e74b06a0250664f9aca1b 100644 (file)
 #define _TEST__F_type_array__uint8s_increase
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint8s_increase()
+ * @see f_uint8s_increase()
  */
-extern void test__f_type_array_uint8s_increase__works(void **state);
+extern void test__f_type_array_uint8s_increase__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_uint8s_increase()
+ * @see f_uint8s_increase()
  */
 extern void test__f_type_array_uint8s_increase__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint8s_increase()
+ * @see f_uint8s_increase()
  */
-extern void test__f_type_array_uint8s_increase__parameter_checking(void **state);
+extern void test__f_type_array_uint8s_increase__works(void **state);
 
 #endif // _TEST__F_type_array__uint8s_increase
index f507bd1e8d31fd70a7d1fdeccedab17c5e891f07..98a32b2a477f9a18f702602c4ce92ab7948ec152 100644 (file)
@@ -5,6 +5,22 @@
 extern "C" {
 #endif
 
+
+void test__f_type_array_uint8s_increase_by__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_uint8s_t data = f_uint8s_t_initialize;
+
+  {
+    const f_status_t status = f_uint8s_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_type_array_uint8s_increase_by__works(void **state) {
 
   const int length = 5;
@@ -31,22 +47,6 @@ void test__f_type_array_uint8s_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint8s_increase_by__parameter_checking(void **state) {
-
-  const int length = 5;
-  f_uint8s_t data = f_uint8s_t_initialize;
-
-  {
-    const f_status_t status = f_uint8s_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);
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 7c8206f8c8c2c779a781933accac57ffcbf2280e..7ac98ebe67bbb39808b4e2cf5965acf0743fae21 100644 (file)
 #define _TEST__F_type_array__uint8s_increase_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint8s_increase_by()
+ * @see f_uint8s_increase_by()
  */
-extern void test__f_type_array_uint8s_increase_by__works(void **state);
+extern void test__f_type_array_uint8s_increase_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint8s_increase_by()
+ * @see f_uint8s_increase_by()
  */
-extern void test__f_type_array_uint8s_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_uint8s_increase_by__works(void **state);
 
 #endif // _TEST__F_type_array__uint8s_increase_by
index 83b457a6999805c6e5715ff2761b48ad7180171e..5c2d172a8744802d35df21b363338a14a9753bce 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint8s_resize__works(void **state) {
+void test__f_type_array_uint8s_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint8s_t data = f_uint8s_t_initialize;
 
   {
-    const f_status_t status = f_uint8s_resize(length, &data);
+    const f_status_t status = f_uint8s_resize(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_uint8s_resize__parameter_checking(void **state) {
+void test__f_type_array_uint8s_resize__works(void **state) {
 
   const int length = 5;
   f_uint8s_t data = f_uint8s_t_initialize;
 
   {
-    const f_status_t status = f_uint8s_resize(length, 0);
+    const f_status_t status = f_uint8s_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index 8f258e3d31b6ad9105f519f99fbf14f7723aa68b..53997a650a969cddc378e6d17939c63fee99435f 100644 (file)
 #define _TEST__F_type_array__uint8s_resize
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint8s_resize()
+ * @see f_uint8s_resize()
  */
-extern void test__f_type_array_uint8s_resize__works(void **state);
+extern void test__f_type_array_uint8s_resize__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint8s_resize()
+ * @see f_uint8s_resize()
  */
-extern void test__f_type_array_uint8s_resize__parameter_checking(void **state);
+extern void test__f_type_array_uint8s_resize__works(void **state);
 
 #endif // _TEST__F_type_array__uint8s_resize
index ec3eed98f5019415aef9e464a630fa073acdbc39..45ace00cda6fe402110ef1af982b3bf6bb0b95b2 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint8ss_adjust__works(void **state) {
+void test__f_type_array_uint8ss_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint8ss_t data = f_uint8ss_t_initialize;
 
   {
-    const f_status_t status = f_uint8ss_adjust(length, &data);
+    const f_status_t status = f_uint8ss_adjust(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_uint8ss_adjust__parameter_checking(void **state) {
+void test__f_type_array_uint8ss_adjust__works(void **state) {
 
   const int length = 5;
   f_uint8ss_t data = f_uint8ss_t_initialize;
 
   {
-    const f_status_t status = f_uint8ss_adjust(length, 0);
+    const f_status_t status = f_uint8ss_adjust(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index b6d8dfb32cb0f00fb95eed9ca53b6dd91913ebc3..7fc1ba8506fcc4a0609fde30ffc2405e2322ac62 100644 (file)
 #define _TEST__F_type_array__uint8ss_adjust
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint8ss_adjust()
+ * @see f_uint8ss_adjust()
  */
-extern void test__f_type_array_uint8ss_adjust__works(void **state);
+extern void test__f_type_array_uint8ss_adjust__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint8ss_adjust()
+ * @see f_uint8ss_adjust()
  */
-extern void test__f_type_array_uint8ss_adjust__parameter_checking(void **state);
+extern void test__f_type_array_uint8ss_adjust__works(void **state);
 
 #endif // _TEST__F_type_array__uint8ss_adjust
index 650d761a53dd505f4856329d2bfc0ddac44a4d77..1db489ab3e24b54a647cc84f92a78262a60048c5 100644 (file)
@@ -5,7 +5,18 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint8ss_append__works(void **state) {
+void test__f_type_array_uint8ss_append__parameter_checking(void **state) {
+
+  f_uint8s_t data = f_uint8s_t_initialize;
+
+  {
+    const f_status_t status = f_uint8ss_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_uint8ss_append__returns_data_not(void **state) {
 
   const int length = 5;
   f_uint8s_t source = f_uint8s_t_initialize;
@@ -19,32 +30,19 @@ void test__f_type_array_uint8ss_append__works(void **state) {
     assert_int_equal(source.size, length);
   }
 
-  for (; source.used < length; ++source.used) {
-    source.array[source.used] = source.used + 1;
-  } // for
-
   {
     const f_status_t status = f_uint8ss_append(source, &destination);
 
-    assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, 1);
-    assert_int_equal(destination.array[0].used, source.used);
-    assert_int_equal(destination.array[0].size, source.used);
-
-    for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
-      assert_int_equal(destination.array[0].array[i], i + 1);
-    } // for
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
   }
 
-  for (f_array_length_t i = 0; i < destination.used; ++i) {
-    free((void *) destination.array[i].array);
-  } // for
-
   free((void *) source.array);
-  free((void *) destination.array);
 }
 
-void test__f_type_array_uint8ss_append__returns_data_not(void **state) {
+void test__f_type_array_uint8ss_append__works(void **state) {
 
   const int length = 5;
   f_uint8s_t source = f_uint8s_t_initialize;
@@ -58,27 +56,29 @@ void test__f_type_array_uint8ss_append__returns_data_not(void **state) {
     assert_int_equal(source.size, length);
   }
 
+  for (; source.used < length; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
+
   {
     const f_status_t status = f_uint8ss_append(source, &destination);
 
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
-  }
-
-  free((void *) source.array);
-}
-
-void test__f_type_array_uint8ss_append__parameter_checking(void **state) {
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0].used, source.used);
+    assert_int_equal(destination.array[0].size, source.used);
 
-  f_uint8s_t data = f_uint8s_t_initialize;
+    for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
+      assert_int_equal(destination.array[0].array[i], i + 1);
+    } // for
+  }
 
-  {
-    const f_status_t status = f_uint8ss_append(data, 0);
+  for (f_array_length_t i = 0; i < destination.used; ++i) {
+    free((void *) destination.array[i].array);
+  } // for
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
+  free((void *) source.array);
+  free((void *) destination.array);
 }
 
 #ifdef __cplusplus
index c7f66334fdc1ff03d4457a2de30b35ea08006f22..0514099e3f4548ddab31618e10cbf821b88857ed 100644 (file)
 #define _TEST__F_type_array__uint8ss_append
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint8ss_append()
+ * @see f_uint8ss_append()
  */
-extern void test__f_type_array_uint8ss_append__works(void **state);
+extern void test__f_type_array_uint8ss_append__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_uint8ss_append()
+ * @see f_uint8ss_append()
  */
 extern void test__f_type_array_uint8ss_append__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint8ss_append()
+ * @see f_uint8ss_append()
  */
-extern void test__f_type_array_uint8ss_append__parameter_checking(void **state);
+extern void test__f_type_array_uint8ss_append__works(void **state);
 
 #endif // _TEST__F_type_array__uint8ss_append
index 5a4d14df3c1eeab804c685e28cc0671651674a0a..ba702019318982a456dad6b1d4f9676ac111e16f 100644 (file)
@@ -5,6 +5,43 @@
 extern "C" {
 #endif
 
+void test__f_type_array_uint8ss_append_all__parameter_checking(void **state) {
+
+  const f_uint8ss_t data = f_uint8ss_t_initialize;
+
+  {
+    const f_status_t status = f_uint8ss_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+void test__f_type_array_uint8ss_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_uint8ss_t source = f_uint8ss_t_initialize;
+  f_uint8ss_t destination = f_uint8ss_t_initialize;
+
+  {
+    const f_status_t status = f_uint8ss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_uint8ss_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
 void test__f_type_array_uint8ss_append_all__works(void **state) {
 
   const int length = 5;
@@ -63,43 +100,6 @@ void test__f_type_array_uint8ss_append_all__works(void **state) {
   free((void *) destination.array);
 }
 
-void test__f_type_array_uint8ss_append_all__returns_data_not(void **state) {
-
-  const int length = 5;
-  f_uint8ss_t source = f_uint8ss_t_initialize;
-  f_uint8ss_t destination = f_uint8ss_t_initialize;
-
-  {
-    const f_status_t status = f_uint8ss_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  {
-    const f_status_t status = f_uint8ss_append_all(source, &destination);
-
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
-  }
-
-  free((void *) source.array);
-}
-
-void test__f_type_array_uint8ss_append_all__parameter_checking(void **state) {
-
-  const f_uint8ss_t data = f_uint8ss_t_initialize;
-
-  {
-    const f_status_t status = f_uint8ss_append_all(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
-}
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 8ec2cb0c1fce9cf5d7abdef0074ee5d01123abdc..f22a9693b821198aaca38f600ea135fdefe2941f 100644 (file)
 #define _TEST__F_type_array__uint8ss_append_all
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint8ss_append_all()
+ * @see f_uint8ss_append_all()
  */
-extern void test__f_type_array_uint8ss_append_all__works(void **state);
+extern void test__f_type_array_uint8ss_append_all__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_uint8ss_append_all()
+ * @see f_uint8ss_append_all()
  */
 extern void test__f_type_array_uint8ss_append_all__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint8ss_append_all()
+ * @see f_uint8ss_append_all()
  */
-extern void test__f_type_array_uint8ss_append_all__parameter_checking(void **state);
+extern void test__f_type_array_uint8ss_append_all__works(void **state);
 
 #endif // _TEST__F_type_array__uint8ss_append_all
index b9cca5db9a394fc29ac4ab7d2e16b2e3500ac3cd..271c780990c1c059e8723bf0c64735027bed4389 100644 (file)
@@ -5,12 +5,28 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint8ss_decimate_by__works(void **state) {
+void test__f_type_array_uint8ss_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint8ss_t data = f_uint8s_t_initialize;
 
   {
+    const f_status_t status = f_uint8ss_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_type_array_uint8ss_decimate_by__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_uint8ss_t data = f_uint8ss_t_initialize;
+
+  {
     const f_status_t status = f_uint8ss_resize(length, &data);
 
     assert_int_equal(status, F_none);
@@ -19,25 +35,33 @@ void test__f_type_array_uint8ss_decimate_by__works(void **state) {
   }
 
   {
-    const f_status_t status = f_uint8ss_decimate_by(length, &data);
+    const f_status_t status = f_uint8ss_decimate_by(0, &data);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_data_not);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
-void test__f_type_array_uint8ss_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_uint8ss_decimate_by__works(void **state) {
 
   const int length = 5;
   f_uint8ss_t data = f_uint8s_t_initialize;
 
   {
-    const f_status_t status = f_uint8ss_decimate_by(length, 0);
+    const f_status_t status = f_uint8ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_uint8ss_decimate_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index f92c2940503f82780291847e37e9901c84dabbc2..524ee084478a55f1c0d6ff270db016bd3f23b708 100644 (file)
 #define _TEST__F_type_array__uint8ss_decimate_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint8ss_decimate_by()
+ * @see f_uint8ss_decimate_by()
  */
-extern void test__f_type_array_uint8ss_decimate_by__works(void **state);
+extern void test__f_type_array_uint8ss_decimate_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
  * @see f_type_array_uint8ss_decimate_by()
  */
-extern void test__f_type_array_uint8ss_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_uint8ss_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint8ss_decimate_by()
+ */
+extern void test__f_type_array_uint8ss_decimate_by__works(void **state);
 
 #endif // _TEST__F_type_array__uint8ss_decimate_by
index 61a91cb51d89e74cabfa054c48e97df9d1c1ecf8..8ec58153b8feb41e3f426d82ae5a4d46d4127196 100644 (file)
@@ -5,12 +5,28 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint8ss_decrease_by__works(void **state) {
+void test__f_type_array_uint8ss_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint8ss_t data = f_uint8s_t_initialize;
 
   {
+    const f_status_t status = f_uint8ss_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_type_array_uint8ss_decrease_by__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_uint8ss_t data = f_uint8ss_t_initialize;
+
+  {
     const f_status_t status = f_uint8ss_resize(length, &data);
 
     assert_int_equal(status, F_none);
@@ -19,25 +35,33 @@ void test__f_type_array_uint8ss_decrease_by__works(void **state) {
   }
 
   {
-    const f_status_t status = f_uint8ss_decrease_by(length, &data);
+    const f_status_t status = f_uint8ss_decrease_by(0, &data);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_data_not);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
-void test__f_type_array_uint8ss_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_uint8ss_decrease_by__works(void **state) {
 
   const int length = 5;
   f_uint8ss_t data = f_uint8s_t_initialize;
 
   {
-    const f_status_t status = f_uint8ss_decrease_by(length, 0);
+    const f_status_t status = f_uint8ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_uint8ss_decrease_by(length, &data);
+
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
     assert_int_equal(data.size, 0);
   }
index d78af8dc82602ca8f4f868b54bcd9c38488f9ee0..6ce469785aef2ffca88478b6bab3fd2762cf37c4 100644 (file)
 #define _TEST__F_type_array__uint8ss_decrease_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint8ss_decrease_by()
+ * @see f_uint8ss_decrease_by()
  */
-extern void test__f_type_array_uint8ss_decrease_by__works(void **state);
+extern void test__f_type_array_uint8ss_decrease_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_uint8ss_decrease_by()
+ * @see f_uint8ss_decrease_by()
  */
-extern void test__f_type_array_uint8ss_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_uint8ss_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint8ss_decrease_by()
+ */
+extern void test__f_type_array_uint8ss_decrease_by__works(void **state);
 
 #endif // _TEST__F_type_array__uint8ss_decrease_by
index 99f761228573d30a705a91051932c23b4d0463d9..5775dd4c9edb4c14c6049286a62d5436fd405936 100644 (file)
@@ -5,27 +5,17 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint8ss_increase__works(void **state) {
+void test__f_type_array_uint8ss_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint8ss_t data = f_uint8s_t_initialize;
 
   {
-    const f_status_t status = f_uint8ss_resize(length, &data);
+    const f_status_t status = f_uint8ss_increase(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
-  }
-
-  {
-    data.used = length;
-
-    const f_status_t status = f_uint8ss_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);
+    assert_int_equal(data.size, 0);
   }
 
   free((void *) data.array);
@@ -55,17 +45,27 @@ void test__f_type_array_uint8ss_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint8ss_increase__parameter_checking(void **state) {
+void test__f_type_array_uint8ss_increase__works(void **state) {
 
   const int length = 5;
   f_uint8ss_t data = f_uint8s_t_initialize;
 
   {
-    const f_status_t status = f_uint8ss_increase(length, 0);
+    const f_status_t status = f_uint8ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    data.used = length;
+
+    const f_status_t status = f_uint8ss_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);
index a82b67d4ef2294c8bf1ed8843ba10309d1ca75fb..867027656b56ccf4bc155e7fe279686ee7c0390e 100644 (file)
 #define _TEST__F_type_array__uint8ss_increase
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint8ss_increase()
+ * @see f_uint8ss_increase()
  */
-extern void test__f_type_array_uint8ss_increase__works(void **state);
+extern void test__f_type_array_uint8ss_increase__parameter_checking(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_uint8ss_increase()
+ * @see f_uint8ss_increase()
  */
 extern void test__f_type_array_uint8ss_increase__returns_data_not(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint8ss_increase()
+ * @see f_uint8ss_increase()
  */
-extern void test__f_type_array_uint8ss_increase__parameter_checking(void **state);
+extern void test__f_type_array_uint8ss_increase__works(void **state);
 
 #endif // _TEST__F_type_array__uint8ss_increase
index 2d6e55c1ccaa8ec133e5157029f85e6f58b56c4c..93481c766fde4195e298c0db682d597c48617d48 100644 (file)
@@ -5,12 +5,28 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint8ss_increase_by__works(void **state) {
+void test__f_type_array_uint8ss_increase_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint8ss_t data = f_uint8s_t_initialize;
 
   {
+    const f_status_t status = f_uint8ss_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_type_array_uint8ss_increase_by__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_uint8ss_t data = f_uint8ss_t_initialize;
+
+  {
     const f_status_t status = f_uint8ss_resize(length, &data);
 
     assert_int_equal(status, F_none);
@@ -19,32 +35,48 @@ void test__f_type_array_uint8ss_increase_by__works(void **state) {
   }
 
   {
-    data.used = length;
+    const f_status_t status = f_uint8ss_increase_by(0, &data);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
 
+  {
     const f_status_t status = f_uint8ss_increase_by(length, &data);
 
-    assert_int_equal(status, F_none);
-    assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
   }
 
   free((void *) data.array);
 }
 
-void test__f_type_array_uint8ss_increase_by__parameter_checking(void **state) {
+void test__f_type_array_uint8ss_increase_by__works(void **state) {
 
   const int length = 5;
   f_uint8ss_t data = f_uint8s_t_initialize;
 
   {
-    const f_status_t status = f_uint8ss_increase_by(length, 0);
+    const f_status_t status = f_uint8ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  {
+    data.used = length;
+
+    const f_status_t status = f_uint8ss_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
index e0bc0ecf5ba744875c1bdc621f26633c6f4e2966..1f4db6892b98a6b942e7b25b3790e372a8ce226c 100644 (file)
 #define _TEST__F_type_array__uint8ss_increase_by
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint8ss_increase_by()
+ * @see f_uint8ss_increase_by()
  */
-extern void test__f_type_array_uint8ss_increase_by__works(void **state);
+extern void test__f_type_array_uint8ss_increase_by__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
  *
- * @see f_type_array_uint8ss_increase_by()
+ * @see f_uint8ss_increase_by()
  */
-extern void test__f_type_array_uint8ss_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_uint8ss_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint8ss_increase_by()
+ */
+extern void test__f_type_array_uint8ss_increase_by__works(void **state);
 
 #endif // _TEST__F_type_array__uint8ss_increase_by
index 251db7571cb81dfde6bbca2d8bf4e2df1512bfe9..667b3fe8a9afc3d77ad17730a224d442f6171fdc 100644 (file)
@@ -5,36 +5,36 @@
 extern "C" {
 #endif
 
-void test__f_type_array_uint8ss_resize__works(void **state) {
+void test__f_type_array_uint8ss_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint8ss_t data = f_uint8ss_t_initialize;
 
   {
-    const f_status_t status = f_uint8ss_resize(length, &data);
+    const f_status_t status = f_uint8ss_resize(length, 0);
 
-    assert_int_equal(status, F_none);
+    assert_int_equal(status, F_status_set_error(F_parameter));
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, length);
+    assert_int_equal(data.size, 0);
   }
 
-  free((void *) data.array);
+  assert_null(data.array);
 }
 
-void test__f_type_array_uint8ss_resize__parameter_checking(void **state) {
+void test__f_type_array_uint8ss_resize__works(void **state) {
 
   const int length = 5;
   f_uint8ss_t data = f_uint8ss_t_initialize;
 
   {
-    const f_status_t status = f_uint8ss_resize(length, 0);
+    const f_status_t status = f_uint8ss_resize(length, &data);
 
-    assert_int_equal(status, F_status_set_error(F_parameter));
+    assert_int_equal(status, F_none);
     assert_int_equal(data.used, 0);
-    assert_int_equal(data.size, 0);
+    assert_int_equal(data.size, length);
   }
 
-  assert_null(data.array);
+  free((void *) data.array);
 }
 
 #ifdef __cplusplus
index 69a47186635209fca1112c28a22f13114e659067..6710c176fcb80832e0b1a49b94dce21f37ff816a 100644 (file)
 #define _TEST__F_type_array__uint8ss_resize
 
 /**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
  *
- * @see f_type_array_uint8ss_resize()
+ * @see f_uint8ss_resize()
  */
-extern void test__f_type_array_uint8ss_resize__works(void **state);
+extern void test__f_type_array_uint8ss_resize__parameter_checking(void **state);
 
 /**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
  *
- * @see f_type_array_uint8ss_resize()
+ * @see f_uint8ss_resize()
  */
-extern void test__f_type_array_uint8ss_resize__parameter_checking(void **state);
+extern void test__f_type_array_uint8ss_resize__works(void **state);
 
 #endif // _TEST__F_type_array__uint8ss_resize
index fded1e5948fd85ba22f453eac3dfb2833b2fdec7..15ee245177163386691ae618c7046f79821c4df4 100644 (file)
@@ -20,345 +20,375 @@ int main(void) {
     cmocka_unit_test(test__f_type_array_array_lengths_adjust__works),
     cmocka_unit_test(test__f_type_array_array_lengths_append__works),
     cmocka_unit_test(test__f_type_array_array_lengths_append_all__works),
-    cmocka_unit_test(test__f_type_array_array_lengths_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_array_lengths_decimate_by__works),
     cmocka_unit_test(test__f_type_array_array_lengths_decrease_by__works),
     cmocka_unit_test(test__f_type_array_array_lengths_increase__works),
-    cmocka_unit_test(test__f_type_array_array_lengths_increase__returns_data_not),
     cmocka_unit_test(test__f_type_array_array_lengths_increase_by__works),
     cmocka_unit_test(test__f_type_array_array_lengths_resize__works),
 
+    cmocka_unit_test(test__f_type_array_array_lengthss_append__returns_data_not),
+    cmocka_unit_test(test__f_type_array_array_lengthss_append_all__returns_data_not),
+    cmocka_unit_test(test__f_type_array_array_lengthss_decimate_by__returns_data_not),
+    cmocka_unit_test(test__f_type_array_array_lengthss_decrease_by__returns_data_not),
+    cmocka_unit_test(test__f_type_array_array_lengthss_increase__returns_data_not),
+    cmocka_unit_test(test__f_type_array_array_lengthss_increase_by__returns_data_not),
+
     cmocka_unit_test(test__f_type_array_array_lengthss_adjust__works),
     cmocka_unit_test(test__f_type_array_array_lengthss_append__works),
-    cmocka_unit_test(test__f_type_array_array_lengthss_append__returns_data_not),
     cmocka_unit_test(test__f_type_array_array_lengthss_append_all__works),
-    cmocka_unit_test(test__f_type_array_array_lengthss_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_array_lengthss_decimate_by__works),
     cmocka_unit_test(test__f_type_array_array_lengthss_decrease_by__works),
     cmocka_unit_test(test__f_type_array_array_lengthss_increase__works),
-    cmocka_unit_test(test__f_type_array_array_lengthss_increase__returns_data_not),
     cmocka_unit_test(test__f_type_array_array_lengthss_increase_by__works),
     cmocka_unit_test(test__f_type_array_array_lengthss_resize__works),
 
     cmocka_unit_test(test__f_type_array_cells_adjust__works),
     cmocka_unit_test(test__f_type_array_cells_append__works),
     cmocka_unit_test(test__f_type_array_cells_append_all__works),
-    cmocka_unit_test(test__f_type_array_cells_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_cells_decimate_by__works),
     cmocka_unit_test(test__f_type_array_cells_decrease_by__works),
     cmocka_unit_test(test__f_type_array_cells_increase__works),
-    cmocka_unit_test(test__f_type_array_cells_increase__returns_data_not),
     cmocka_unit_test(test__f_type_array_cells_increase_by__works),
     cmocka_unit_test(test__f_type_array_cells_resize__works),
 
+    cmocka_unit_test(test__f_type_array_cellss_append__returns_data_not),
+    cmocka_unit_test(test__f_type_array_cellss_append_all__returns_data_not),
+    cmocka_unit_test(test__f_type_array_cellss_decimate_by__returns_data_not),
+    cmocka_unit_test(test__f_type_array_cellss_decrease_by__returns_data_not),
+    cmocka_unit_test(test__f_type_array_cellss_increase__returns_data_not),
+    cmocka_unit_test(test__f_type_array_cellss_increase_by__returns_data_not),
+
     cmocka_unit_test(test__f_type_array_cellss_adjust__works),
     cmocka_unit_test(test__f_type_array_cellss_append__works),
-    cmocka_unit_test(test__f_type_array_cellss_append__returns_data_not),
     cmocka_unit_test(test__f_type_array_cellss_append_all__works),
-    cmocka_unit_test(test__f_type_array_cellss_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_cellss_decimate_by__works),
     cmocka_unit_test(test__f_type_array_cellss_decrease_by__works),
     cmocka_unit_test(test__f_type_array_cellss_increase__works),
-    cmocka_unit_test(test__f_type_array_cellss_increase__returns_data_not),
     cmocka_unit_test(test__f_type_array_cellss_increase_by__works),
     cmocka_unit_test(test__f_type_array_cellss_resize__works),
 
     cmocka_unit_test(test__f_type_array_fll_ids_adjust__works),
     cmocka_unit_test(test__f_type_array_fll_ids_append__works),
     cmocka_unit_test(test__f_type_array_fll_ids_append_all__works),
-    cmocka_unit_test(test__f_type_array_fll_ids_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_fll_ids_decimate_by__works),
     cmocka_unit_test(test__f_type_array_fll_ids_decrease_by__works),
     cmocka_unit_test(test__f_type_array_fll_ids_increase__works),
-    cmocka_unit_test(test__f_type_array_fll_ids_increase__returns_data_not),
     cmocka_unit_test(test__f_type_array_fll_ids_increase_by__works),
     cmocka_unit_test(test__f_type_array_fll_ids_resize__works),
 
+    cmocka_unit_test(test__f_type_array_fll_idss_append__returns_data_not),
+    cmocka_unit_test(test__f_type_array_fll_idss_append_all__returns_data_not),
+    cmocka_unit_test(test__f_type_array_fll_idss_decimate_by__returns_data_not),
+    cmocka_unit_test(test__f_type_array_fll_idss_decrease_by__returns_data_not),
+    cmocka_unit_test(test__f_type_array_fll_idss_increase__returns_data_not),
+    cmocka_unit_test(test__f_type_array_fll_idss_increase_by__returns_data_not),
+
     cmocka_unit_test(test__f_type_array_fll_idss_adjust__works),
     cmocka_unit_test(test__f_type_array_fll_idss_append__works),
-    cmocka_unit_test(test__f_type_array_fll_idss_append__returns_data_not),
     cmocka_unit_test(test__f_type_array_fll_idss_append_all__works),
-    cmocka_unit_test(test__f_type_array_fll_idss_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_fll_idss_decimate_by__works),
     cmocka_unit_test(test__f_type_array_fll_idss_decrease_by__works),
     cmocka_unit_test(test__f_type_array_fll_idss_increase__works),
-    cmocka_unit_test(test__f_type_array_fll_idss_increase__returns_data_not),
     cmocka_unit_test(test__f_type_array_fll_idss_increase_by__works),
     cmocka_unit_test(test__f_type_array_fll_idss_resize__works),
 
     cmocka_unit_test(test__f_type_array_int8s_adjust__works),
     cmocka_unit_test(test__f_type_array_int8s_append__works),
     cmocka_unit_test(test__f_type_array_int8s_append_all__works),
-    cmocka_unit_test(test__f_type_array_int8s_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_int8s_decimate_by__works),
     cmocka_unit_test(test__f_type_array_int8s_decrease_by__works),
     cmocka_unit_test(test__f_type_array_int8s_increase__works),
-    cmocka_unit_test(test__f_type_array_int8s_increase__returns_data_not),
     cmocka_unit_test(test__f_type_array_int8s_increase_by__works),
     cmocka_unit_test(test__f_type_array_int8s_resize__works),
 
+    cmocka_unit_test(test__f_type_array_int8ss_append__returns_data_not),
+    cmocka_unit_test(test__f_type_array_int8ss_append_all__returns_data_not),
+    cmocka_unit_test(test__f_type_array_int8ss_decimate_by__returns_data_not),
+    cmocka_unit_test(test__f_type_array_int8ss_decrease_by__returns_data_not),
+    cmocka_unit_test(test__f_type_array_int8ss_increase__returns_data_not),
+    cmocka_unit_test(test__f_type_array_int8ss_increase_by__returns_data_not),
+
     cmocka_unit_test(test__f_type_array_int8ss_adjust__works),
     cmocka_unit_test(test__f_type_array_int8ss_append__works),
-    cmocka_unit_test(test__f_type_array_int8ss_append__returns_data_not),
     cmocka_unit_test(test__f_type_array_int8ss_append_all__works),
-    cmocka_unit_test(test__f_type_array_int8ss_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_int8ss_decimate_by__works),
     cmocka_unit_test(test__f_type_array_int8ss_decrease_by__works),
     cmocka_unit_test(test__f_type_array_int8ss_increase__works),
-    cmocka_unit_test(test__f_type_array_int8ss_increase__returns_data_not),
     cmocka_unit_test(test__f_type_array_int8ss_increase_by__works),
     cmocka_unit_test(test__f_type_array_int8ss_resize__works),
 
     cmocka_unit_test(test__f_type_array_int16s_adjust__works),
     cmocka_unit_test(test__f_type_array_int16s_append__works),
     cmocka_unit_test(test__f_type_array_int16s_append_all__works),
-    cmocka_unit_test(test__f_type_array_int16s_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_int16s_decimate_by__works),
     cmocka_unit_test(test__f_type_array_int16s_decrease_by__works),
     cmocka_unit_test(test__f_type_array_int16s_increase__works),
-    cmocka_unit_test(test__f_type_array_int16s_increase__returns_data_not),
     cmocka_unit_test(test__f_type_array_int16s_increase_by__works),
     cmocka_unit_test(test__f_type_array_int16s_resize__works),
 
+    cmocka_unit_test(test__f_type_array_int16ss_append__returns_data_not),
+    cmocka_unit_test(test__f_type_array_int16ss_append_all__returns_data_not),
+    cmocka_unit_test(test__f_type_array_int16ss_decimate_by__returns_data_not),
+    cmocka_unit_test(test__f_type_array_int16ss_decrease_by__returns_data_not),
+    cmocka_unit_test(test__f_type_array_int16ss_increase__returns_data_not),
+    cmocka_unit_test(test__f_type_array_int16ss_increase_by__returns_data_not),
+
     cmocka_unit_test(test__f_type_array_int16ss_adjust__works),
     cmocka_unit_test(test__f_type_array_int16ss_append__works),
-    cmocka_unit_test(test__f_type_array_int16ss_append__returns_data_not),
     cmocka_unit_test(test__f_type_array_int16ss_append_all__works),
-    cmocka_unit_test(test__f_type_array_int16ss_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_int16ss_decimate_by__works),
     cmocka_unit_test(test__f_type_array_int16ss_decrease_by__works),
     cmocka_unit_test(test__f_type_array_int16ss_increase__works),
-    cmocka_unit_test(test__f_type_array_int16ss_increase__returns_data_not),
     cmocka_unit_test(test__f_type_array_int16ss_increase_by__works),
     cmocka_unit_test(test__f_type_array_int16ss_resize__works),
 
     cmocka_unit_test(test__f_type_array_int32s_adjust__works),
     cmocka_unit_test(test__f_type_array_int32s_append__works),
     cmocka_unit_test(test__f_type_array_int32s_append_all__works),
-    cmocka_unit_test(test__f_type_array_int32s_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_int32s_decimate_by__works),
     cmocka_unit_test(test__f_type_array_int32s_decrease_by__works),
     cmocka_unit_test(test__f_type_array_int32s_increase__works),
-    cmocka_unit_test(test__f_type_array_int32s_increase__returns_data_not),
     cmocka_unit_test(test__f_type_array_int32s_increase_by__works),
     cmocka_unit_test(test__f_type_array_int32s_resize__works),
 
+    cmocka_unit_test(test__f_type_array_int32ss_append__returns_data_not),
+    cmocka_unit_test(test__f_type_array_int32ss_append_all__returns_data_not),
+    cmocka_unit_test(test__f_type_array_int32ss_decimate_by__returns_data_not),
+    cmocka_unit_test(test__f_type_array_int32ss_decrease_by__returns_data_not),
+    cmocka_unit_test(test__f_type_array_int32ss_increase__returns_data_not),
+    cmocka_unit_test(test__f_type_array_int32ss_increase_by__returns_data_not),
+
     cmocka_unit_test(test__f_type_array_int32ss_adjust__works),
     cmocka_unit_test(test__f_type_array_int32ss_append__works),
-    cmocka_unit_test(test__f_type_array_int32ss_append__returns_data_not),
     cmocka_unit_test(test__f_type_array_int32ss_append_all__works),
-    cmocka_unit_test(test__f_type_array_int32ss_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_int32ss_decimate_by__works),
     cmocka_unit_test(test__f_type_array_int32ss_decrease_by__works),
     cmocka_unit_test(test__f_type_array_int32ss_increase__works),
-    cmocka_unit_test(test__f_type_array_int32ss_increase__returns_data_not),
     cmocka_unit_test(test__f_type_array_int32ss_increase_by__works),
     cmocka_unit_test(test__f_type_array_int32ss_resize__works),
 
     cmocka_unit_test(test__f_type_array_int64s_adjust__works),
     cmocka_unit_test(test__f_type_array_int64s_append__works),
     cmocka_unit_test(test__f_type_array_int64s_append_all__works),
-    cmocka_unit_test(test__f_type_array_int64s_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_int64s_decimate_by__works),
     cmocka_unit_test(test__f_type_array_int64s_decrease_by__works),
     cmocka_unit_test(test__f_type_array_int64s_increase__works),
-    cmocka_unit_test(test__f_type_array_int64s_increase__returns_data_not),
     cmocka_unit_test(test__f_type_array_int64s_increase_by__works),
     cmocka_unit_test(test__f_type_array_int64s_resize__works),
 
+    cmocka_unit_test(test__f_type_array_int64ss_append__returns_data_not),
+    cmocka_unit_test(test__f_type_array_int64ss_append_all__returns_data_not),
+    cmocka_unit_test(test__f_type_array_int64ss_decimate_by__returns_data_not),
+    cmocka_unit_test(test__f_type_array_int64ss_decrease_by__returns_data_not),
+    cmocka_unit_test(test__f_type_array_int64ss_increase__returns_data_not),
+    cmocka_unit_test(test__f_type_array_int64ss_increase_by__returns_data_not),
+
     cmocka_unit_test(test__f_type_array_int64ss_adjust__works),
     cmocka_unit_test(test__f_type_array_int64ss_append__works),
-    cmocka_unit_test(test__f_type_array_int64ss_append__returns_data_not),
     cmocka_unit_test(test__f_type_array_int64ss_append_all__works),
-    cmocka_unit_test(test__f_type_array_int64ss_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_int64ss_decimate_by__works),
     cmocka_unit_test(test__f_type_array_int64ss_decrease_by__works),
     cmocka_unit_test(test__f_type_array_int64ss_increase__works),
-    cmocka_unit_test(test__f_type_array_int64ss_increase__returns_data_not),
     cmocka_unit_test(test__f_type_array_int64ss_increase_by__works),
     cmocka_unit_test(test__f_type_array_int64ss_resize__works),
 
     cmocka_unit_test(test__f_type_array_int128s_adjust__works),
     cmocka_unit_test(test__f_type_array_int128s_append__works),
     cmocka_unit_test(test__f_type_array_int128s_append_all__works),
-    cmocka_unit_test(test__f_type_array_int128s_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_int128s_decimate_by__works),
     cmocka_unit_test(test__f_type_array_int128s_decrease_by__works),
     cmocka_unit_test(test__f_type_array_int128s_increase__works),
-    cmocka_unit_test(test__f_type_array_int128s_increase__returns_data_not),
     cmocka_unit_test(test__f_type_array_int128s_increase_by__works),
     cmocka_unit_test(test__f_type_array_int128s_resize__works),
 
+    cmocka_unit_test(test__f_type_array_int128ss_append__returns_data_not),
+    cmocka_unit_test(test__f_type_array_int128ss_append_all__returns_data_not),
+    cmocka_unit_test(test__f_type_array_int128ss_decimate_by__returns_data_not),
+    cmocka_unit_test(test__f_type_array_int128ss_decrease_by__returns_data_not),
+    cmocka_unit_test(test__f_type_array_int128ss_increase__returns_data_not),
+    cmocka_unit_test(test__f_type_array_int128ss_increase_by__returns_data_not),
+
     cmocka_unit_test(test__f_type_array_int128ss_adjust__works),
     cmocka_unit_test(test__f_type_array_int128ss_append__works),
-    cmocka_unit_test(test__f_type_array_int128ss_append__returns_data_not),
     cmocka_unit_test(test__f_type_array_int128ss_append_all__works),
-    cmocka_unit_test(test__f_type_array_int128ss_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_int128ss_decimate_by__works),
     cmocka_unit_test(test__f_type_array_int128ss_decrease_by__works),
     cmocka_unit_test(test__f_type_array_int128ss_increase__works),
-    cmocka_unit_test(test__f_type_array_int128ss_increase__returns_data_not),
     cmocka_unit_test(test__f_type_array_int128ss_increase_by__works),
     cmocka_unit_test(test__f_type_array_int128ss_resize__works),
 
     cmocka_unit_test(test__f_type_array_states_adjust__works),
     cmocka_unit_test(test__f_type_array_states_append__works),
     cmocka_unit_test(test__f_type_array_states_append_all__works),
-    cmocka_unit_test(test__f_type_array_states_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_states_decimate_by__works),
     cmocka_unit_test(test__f_type_array_states_decrease_by__works),
     cmocka_unit_test(test__f_type_array_states_increase__works),
-    cmocka_unit_test(test__f_type_array_states_increase__returns_data_not),
     cmocka_unit_test(test__f_type_array_states_increase_by__works),
     cmocka_unit_test(test__f_type_array_states_resize__works),
 
+    cmocka_unit_test(test__f_type_array_statess_append__returns_data_not),
+    cmocka_unit_test(test__f_type_array_statess_append_all__returns_data_not),
+    cmocka_unit_test(test__f_type_array_statess_decimate_by__returns_data_not),
+    cmocka_unit_test(test__f_type_array_statess_decrease_by__returns_data_not),
+    cmocka_unit_test(test__f_type_array_statess_increase__returns_data_not),
+    cmocka_unit_test(test__f_type_array_statess_increase_by__returns_data_not),
+
     cmocka_unit_test(test__f_type_array_statess_adjust__works),
     cmocka_unit_test(test__f_type_array_statess_append__works),
-    cmocka_unit_test(test__f_type_array_statess_append__returns_data_not),
     cmocka_unit_test(test__f_type_array_statess_append_all__works),
-    cmocka_unit_test(test__f_type_array_statess_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_statess_decimate_by__works),
     cmocka_unit_test(test__f_type_array_statess_decrease_by__works),
     cmocka_unit_test(test__f_type_array_statess_increase__works),
-    cmocka_unit_test(test__f_type_array_statess_increase__returns_data_not),
     cmocka_unit_test(test__f_type_array_statess_increase_by__works),
     cmocka_unit_test(test__f_type_array_statess_resize__works),
 
     cmocka_unit_test(test__f_type_array_statuss_adjust__works),
     cmocka_unit_test(test__f_type_array_statuss_append__works),
     cmocka_unit_test(test__f_type_array_statuss_append_all__works),
-    cmocka_unit_test(test__f_type_array_statuss_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_statuss_decimate_by__works),
     cmocka_unit_test(test__f_type_array_statuss_decrease_by__works),
     cmocka_unit_test(test__f_type_array_statuss_increase__works),
-    cmocka_unit_test(test__f_type_array_statuss_increase__returns_data_not),
     cmocka_unit_test(test__f_type_array_statuss_increase_by__works),
     cmocka_unit_test(test__f_type_array_statuss_resize__works),
 
+    cmocka_unit_test(test__f_type_array_statusss_append__returns_data_not),
+    cmocka_unit_test(test__f_type_array_statusss_append_all__returns_data_not),
+    cmocka_unit_test(test__f_type_array_statusss_decimate_by__returns_data_not),
+    cmocka_unit_test(test__f_type_array_statusss_decrease_by__returns_data_not),
+    cmocka_unit_test(test__f_type_array_statusss_increase__returns_data_not),
+    cmocka_unit_test(test__f_type_array_statusss_increase_by__returns_data_not),
+
     cmocka_unit_test(test__f_type_array_statusss_adjust__works),
     cmocka_unit_test(test__f_type_array_statusss_append__works),
-    cmocka_unit_test(test__f_type_array_statusss_append__returns_data_not),
     cmocka_unit_test(test__f_type_array_statusss_append_all__works),
-    cmocka_unit_test(test__f_type_array_statusss_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_statusss_decimate_by__works),
     cmocka_unit_test(test__f_type_array_statusss_decrease_by__works),
     cmocka_unit_test(test__f_type_array_statusss_increase__works),
-    cmocka_unit_test(test__f_type_array_statusss_increase__returns_data_not),
     cmocka_unit_test(test__f_type_array_statusss_increase_by__works),
     cmocka_unit_test(test__f_type_array_statusss_resize__works),
 
     cmocka_unit_test(test__f_type_array_uint8s_adjust__works),
     cmocka_unit_test(test__f_type_array_uint8s_append__works),
     cmocka_unit_test(test__f_type_array_uint8s_append_all__works),
-    cmocka_unit_test(test__f_type_array_uint8s_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_uint8s_decimate_by__works),
     cmocka_unit_test(test__f_type_array_uint8s_decrease_by__works),
     cmocka_unit_test(test__f_type_array_uint8s_increase__works),
-    cmocka_unit_test(test__f_type_array_uint8s_increase__returns_data_not),
     cmocka_unit_test(test__f_type_array_uint8s_increase_by__works),
     cmocka_unit_test(test__f_type_array_uint8s_resize__works),
 
+    cmocka_unit_test(test__f_type_array_uint8ss_append__returns_data_not),
+    cmocka_unit_test(test__f_type_array_uint8ss_append_all__returns_data_not),
+    cmocka_unit_test(test__f_type_array_uint8ss_decimate_by__returns_data_not),
+    cmocka_unit_test(test__f_type_array_uint8ss_decrease_by__returns_data_not),
+    cmocka_unit_test(test__f_type_array_uint8ss_increase__returns_data_not),
+    cmocka_unit_test(test__f_type_array_uint8ss_increase_by__returns_data_not),
+
     cmocka_unit_test(test__f_type_array_uint8ss_adjust__works),
     cmocka_unit_test(test__f_type_array_uint8ss_append__works),
-    cmocka_unit_test(test__f_type_array_uint8ss_append__returns_data_not),
     cmocka_unit_test(test__f_type_array_uint8ss_append_all__works),
-    cmocka_unit_test(test__f_type_array_uint8ss_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_uint8ss_decimate_by__works),
     cmocka_unit_test(test__f_type_array_uint8ss_decrease_by__works),
     cmocka_unit_test(test__f_type_array_uint8ss_increase__works),
-    cmocka_unit_test(test__f_type_array_uint8ss_increase__returns_data_not),
     cmocka_unit_test(test__f_type_array_uint8ss_increase_by__works),
     cmocka_unit_test(test__f_type_array_uint8ss_resize__works),
 
     cmocka_unit_test(test__f_type_array_uint16s_adjust__works),
     cmocka_unit_test(test__f_type_array_uint16s_append__works),
     cmocka_unit_test(test__f_type_array_uint16s_append_all__works),
-    cmocka_unit_test(test__f_type_array_uint16s_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_uint16s_decimate_by__works),
     cmocka_unit_test(test__f_type_array_uint16s_decrease_by__works),
     cmocka_unit_test(test__f_type_array_uint16s_increase__works),
-    cmocka_unit_test(test__f_type_array_uint16s_increase__returns_data_not),
     cmocka_unit_test(test__f_type_array_uint16s_increase_by__works),
     cmocka_unit_test(test__f_type_array_uint16s_resize__works),
 
+    cmocka_unit_test(test__f_type_array_uint16ss_append__returns_data_not),
+    cmocka_unit_test(test__f_type_array_uint16ss_append_all__returns_data_not),
+    cmocka_unit_test(test__f_type_array_uint16ss_decimate_by__returns_data_not),
+    cmocka_unit_test(test__f_type_array_uint16ss_decrease_by__returns_data_not),
+    cmocka_unit_test(test__f_type_array_uint16ss_increase__returns_data_not),
+    cmocka_unit_test(test__f_type_array_uint16ss_increase_by__returns_data_not),
+
     cmocka_unit_test(test__f_type_array_uint16ss_adjust__works),
     cmocka_unit_test(test__f_type_array_uint16ss_append__works),
-    cmocka_unit_test(test__f_type_array_uint16ss_append__returns_data_not),
     cmocka_unit_test(test__f_type_array_uint16ss_append_all__works),
-    cmocka_unit_test(test__f_type_array_uint16ss_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_uint16ss_decimate_by__works),
     cmocka_unit_test(test__f_type_array_uint16ss_decrease_by__works),
     cmocka_unit_test(test__f_type_array_uint16ss_increase__works),
-    cmocka_unit_test(test__f_type_array_uint16ss_increase__returns_data_not),
     cmocka_unit_test(test__f_type_array_uint16ss_increase_by__works),
     cmocka_unit_test(test__f_type_array_uint16ss_resize__works),
 
     cmocka_unit_test(test__f_type_array_uint32s_adjust__works),
     cmocka_unit_test(test__f_type_array_uint32s_append__works),
     cmocka_unit_test(test__f_type_array_uint32s_append_all__works),
-    cmocka_unit_test(test__f_type_array_uint32s_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_uint32s_decimate_by__works),
     cmocka_unit_test(test__f_type_array_uint32s_decrease_by__works),
     cmocka_unit_test(test__f_type_array_uint32s_increase__works),
-    cmocka_unit_test(test__f_type_array_uint32s_increase__returns_data_not),
     cmocka_unit_test(test__f_type_array_uint32s_increase_by__works),
     cmocka_unit_test(test__f_type_array_uint32s_resize__works),
 
+    cmocka_unit_test(test__f_type_array_uint32ss_append__returns_data_not),
+    cmocka_unit_test(test__f_type_array_uint32ss_append_all__returns_data_not),
+    cmocka_unit_test(test__f_type_array_uint32ss_decimate_by__returns_data_not),
+    cmocka_unit_test(test__f_type_array_uint32ss_decrease_by__returns_data_not),
+    cmocka_unit_test(test__f_type_array_uint32ss_increase__returns_data_not),
+    cmocka_unit_test(test__f_type_array_uint32ss_increase_by__returns_data_not),
+
     cmocka_unit_test(test__f_type_array_uint32ss_adjust__works),
     cmocka_unit_test(test__f_type_array_uint32ss_append__works),
-    cmocka_unit_test(test__f_type_array_uint32ss_append__returns_data_not),
     cmocka_unit_test(test__f_type_array_uint32ss_append_all__works),
-    cmocka_unit_test(test__f_type_array_uint32ss_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_uint32ss_decimate_by__works),
     cmocka_unit_test(test__f_type_array_uint32ss_decrease_by__works),
     cmocka_unit_test(test__f_type_array_uint32ss_increase__works),
-    cmocka_unit_test(test__f_type_array_uint32ss_increase__returns_data_not),
     cmocka_unit_test(test__f_type_array_uint32ss_increase_by__works),
     cmocka_unit_test(test__f_type_array_uint32ss_resize__works),
 
     cmocka_unit_test(test__f_type_array_uint64s_adjust__works),
     cmocka_unit_test(test__f_type_array_uint64s_append__works),
     cmocka_unit_test(test__f_type_array_uint64s_append_all__works),
-    cmocka_unit_test(test__f_type_array_uint64s_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_uint64s_decimate_by__works),
     cmocka_unit_test(test__f_type_array_uint64s_decrease_by__works),
     cmocka_unit_test(test__f_type_array_uint64s_increase__works),
-    cmocka_unit_test(test__f_type_array_uint64s_increase__returns_data_not),
     cmocka_unit_test(test__f_type_array_uint64s_increase_by__works),
     cmocka_unit_test(test__f_type_array_uint64s_resize__works),
 
+    cmocka_unit_test(test__f_type_array_uint64ss_append__returns_data_not),
+    cmocka_unit_test(test__f_type_array_uint64ss_append_all__returns_data_not),
+    cmocka_unit_test(test__f_type_array_uint64ss_decimate_by__returns_data_not),
+    cmocka_unit_test(test__f_type_array_uint64ss_decrease_by__returns_data_not),
+    cmocka_unit_test(test__f_type_array_uint64ss_increase__returns_data_not),
+    cmocka_unit_test(test__f_type_array_uint64ss_increase_by__returns_data_not),
+
     cmocka_unit_test(test__f_type_array_uint64ss_adjust__works),
     cmocka_unit_test(test__f_type_array_uint64ss_append__works),
-    cmocka_unit_test(test__f_type_array_uint64ss_append__returns_data_not),
     cmocka_unit_test(test__f_type_array_uint64ss_append_all__works),
-    cmocka_unit_test(test__f_type_array_uint64ss_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_uint64ss_decimate_by__works),
     cmocka_unit_test(test__f_type_array_uint64ss_decrease_by__works),
     cmocka_unit_test(test__f_type_array_uint64ss_increase__works),
-    cmocka_unit_test(test__f_type_array_uint64ss_increase__returns_data_not),
     cmocka_unit_test(test__f_type_array_uint64ss_increase_by__works),
     cmocka_unit_test(test__f_type_array_uint64ss_resize__works),
 
     cmocka_unit_test(test__f_type_array_uint128s_adjust__works),
     cmocka_unit_test(test__f_type_array_uint128s_append__works),
     cmocka_unit_test(test__f_type_array_uint128s_append_all__works),
-    cmocka_unit_test(test__f_type_array_uint128s_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_uint128s_decimate_by__works),
     cmocka_unit_test(test__f_type_array_uint128s_decrease_by__works),
     cmocka_unit_test(test__f_type_array_uint128s_increase__works),
-    cmocka_unit_test(test__f_type_array_uint128s_increase__returns_data_not),
     cmocka_unit_test(test__f_type_array_uint128s_increase_by__works),
     cmocka_unit_test(test__f_type_array_uint128s_resize__works),
 
+    cmocka_unit_test(test__f_type_array_uint128ss_append__returns_data_not),
+    cmocka_unit_test(test__f_type_array_uint128ss_append_all__returns_data_not),
+    cmocka_unit_test(test__f_type_array_uint128ss_decimate_by__returns_data_not),
+    cmocka_unit_test(test__f_type_array_uint128ss_decrease_by__returns_data_not),
+    cmocka_unit_test(test__f_type_array_uint128ss_increase__returns_data_not),
+    cmocka_unit_test(test__f_type_array_uint128ss_increase_by__returns_data_not),
+
     cmocka_unit_test(test__f_type_array_uint128ss_adjust__works),
     cmocka_unit_test(test__f_type_array_uint128ss_append__works),
-    cmocka_unit_test(test__f_type_array_uint128ss_append__returns_data_not),
     cmocka_unit_test(test__f_type_array_uint128ss_append_all__works),
-    cmocka_unit_test(test__f_type_array_uint128ss_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_uint128ss_decimate_by__works),
     cmocka_unit_test(test__f_type_array_uint128ss_decrease_by__works),
     cmocka_unit_test(test__f_type_array_uint128ss_increase__works),
-    cmocka_unit_test(test__f_type_array_uint128ss_increase__returns_data_not),
     cmocka_unit_test(test__f_type_array_uint128ss_increase_by__works),
     cmocka_unit_test(test__f_type_array_uint128ss_resize__works),