]> Kevux Git Server - fll/commitdiff
Progress: Continue re-designing of the memory logic, mostly getting tests back in...
authorKevin Day <thekevinday@gmail.com>
Thu, 17 Aug 2023 03:48:37 +0000 (22:48 -0500)
committerKevin Day <thekevinday@gmail.com>
Thu, 17 Aug 2023 03:48:37 +0000 (22:48 -0500)
Get the tests working.
Some of the tests I am not mocking the allocation and performing the real allocation actions.
This allows for the unit test to also test memory if run with valgrind.
I did this after getting much of the work done and so I ended up not consistently doing this on all of the "works" tests.
Generally, the tests for functions with the double 's' have the actual memory allocations.

251 files changed:
build/stand_alone/fake.config.h
build/stand_alone/fake.settings
level_0/f_account/tests/unit/c/mock-account.h
level_0/f_account/tests/unit/c/test-account-ss_delete_callback.c
level_0/f_account/tests/unit/c/test-account-ss_destroy_callback.c
level_0/f_account/tests/unit/c/test-account.c
level_0/f_directory/c/directory/listing.h
level_0/f_directory/c/directory/recurse_do.h
level_0/f_directory/c/directory/status.h
level_0/f_directory/data/build/settings-mocks
level_0/f_directory/data/build/settings-tests
level_0/f_directory/tests/unit/c/mock-directory.c
level_0/f_directory/tests/unit/c/mock-directory.h
level_0/f_directory/tests/unit/c/test-directory-listings_delete_callback.c
level_0/f_directory/tests/unit/c/test-directory-listings_destroy_callback.c
level_0/f_directory/tests/unit/c/test-directory-listingss_delete_callback.c [new file with mode: 0644]
level_0/f_directory/tests/unit/c/test-directory-listingss_delete_callback.h [new file with mode: 0644]
level_0/f_directory/tests/unit/c/test-directory-listingss_destroy_callback.c [new file with mode: 0644]
level_0/f_directory/tests/unit/c/test-directory-listingss_destroy_callback.h [new file with mode: 0644]
level_0/f_directory/tests/unit/c/test-directory-recurse_doss_delete_callback.c [new file with mode: 0644]
level_0/f_directory/tests/unit/c/test-directory-recurse_doss_delete_callback.h [new file with mode: 0644]
level_0/f_directory/tests/unit/c/test-directory-recurse_doss_destroy_callback.c [new file with mode: 0644]
level_0/f_directory/tests/unit/c/test-directory-recurse_doss_destroy_callback.h [new file with mode: 0644]
level_0/f_directory/tests/unit/c/test-directory-statusss_delete_callback.c [new file with mode: 0644]
level_0/f_directory/tests/unit/c/test-directory-statusss_delete_callback.h [new file with mode: 0644]
level_0/f_directory/tests/unit/c/test-directory-statusss_destroy_callback.c [new file with mode: 0644]
level_0/f_directory/tests/unit/c/test-directory-statusss_destroy_callback.h [new file with mode: 0644]
level_0/f_directory/tests/unit/c/test-directory.c
level_0/f_directory/tests/unit/c/test-directory.h
level_0/f_fss/c/fss/item.h
level_0/f_fss/c/fss/named.h
level_0/f_fss/c/fss/nest.c
level_0/f_fss/c/fss/nest.h
level_0/f_fss/c/fss/set.h
level_0/f_fss/c/fss/set_quote.h
level_0/f_fss/c/fss/simple_packet.c
level_0/f_fss/c/fss/simple_packet.h
level_0/f_fss/data/build/settings-mocks
level_0/f_fss/data/build/settings-tests
level_0/f_fss/data/build/testfile
level_0/f_fss/tests/unit/c/mock-fss.c
level_0/f_fss/tests/unit/c/mock-fss.h
level_0/f_fss/tests/unit/c/test-fss-items_delete_callback.c
level_0/f_fss/tests/unit/c/test-fss-items_delete_callback.h
level_0/f_fss/tests/unit/c/test-fss-items_destroy_callback.c
level_0/f_fss/tests/unit/c/test-fss-items_destroy_callback.h
level_0/f_fss/tests/unit/c/test-fss-itemss_delete_callback.c [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-itemss_delete_callback.h [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-itemss_destroy_callback.c [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-itemss_destroy_callback.h [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-nameds_delete_callback.c [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-nameds_delete_callback.h [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-nameds_destroy_callback.c [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-nameds_destroy_callback.h [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-namedss_delete_callback.c [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-namedss_delete_callback.h [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-namedss_destroy_callback.c [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-namedss_destroy_callback.h [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-nests_delete_callback.c [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-nests_delete_callback.h [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-nests_destroy_callback.c [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-nests_destroy_callback.h [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-nestss_delete_callback.c [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-nestss_delete_callback.h [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-nestss_destroy_callback.c [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-nestss_destroy_callback.h [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-set_quotes_delete_callback.c [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-set_quotes_delete_callback.h [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-set_quotes_destroy_callback.c [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-set_quotes_destroy_callback.h [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-set_quotess_delete_callback.c [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-set_quotess_delete_callback.h [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-set_quotess_destroy_callback.c [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-set_quotess_destroy_callback.h [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-sets_delete_callback.c [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-sets_delete_callback.h [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-sets_destroy_callback.c [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-sets_destroy_callback.h [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-setss_delete_callback.c [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-setss_delete_callback.h [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-setss_destroy_callback.c [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-setss_destroy_callback.h [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-simple_packets_delete_callback.c [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-simple_packets_delete_callback.h [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-simple_packets_destroy_callback.c [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-simple_packets_destroy_callback.h [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-simple_packetss_delete_callback.c [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-simple_packetss_delete_callback.h [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-simple_packetss_destroy_callback.c [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss-simple_packetss_destroy_callback.h [new file with mode: 0644]
level_0/f_fss/tests/unit/c/test-fss.c
level_0/f_fss/tests/unit/c/test-fss.h
level_0/f_iki/data/build/settings-tests
level_0/f_iki/tests/unit/c/mock-iki.c
level_0/f_iki/tests/unit/c/mock-iki.h
level_0/f_iki/tests/unit/c/test-iki-datas_delete_callback.c
level_0/f_iki/tests/unit/c/test-iki-datas_destroy_callback.c
level_0/f_iki/tests/unit/c/test-iki-datass_delete_callback.c [new file with mode: 0644]
level_0/f_iki/tests/unit/c/test-iki-datass_delete_callback.h [new file with mode: 0644]
level_0/f_iki/tests/unit/c/test-iki-datass_destroy_callback.c [new file with mode: 0644]
level_0/f_iki/tests/unit/c/test-iki-datass_destroy_callback.h [new file with mode: 0644]
level_0/f_iki/tests/unit/c/test-iki.c
level_0/f_iki/tests/unit/c/test-iki.h
level_0/f_memory/c/memory/arrayss.c [deleted file]
level_0/f_memory/c/memory/arrayss.h [deleted file]
level_0/f_memory/data/build/settings
level_0/f_memory/data/build/settings-tests
level_0/f_memory/tests/unit/c/test-memory.c
level_0/f_memory/tests/unit/c/test-memory.h
level_0/f_type_array/data/build/settings-mocks
level_0/f_type_array/data/build/settings-tests
level_0/f_type_array/tests/unit/c/mock-type_array.c
level_0/f_type_array/tests/unit/c/mock-type_array.h
level_0/f_type_array/tests/unit/c/test-type_array-cells_delete_callback.c [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-cells_delete_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-cells_destroy_callback.c [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-cells_destroy_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-cellss_delete_callback.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-cellss_delete_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-cellss_destroy_callback.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-cellss_destroy_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-files_delete_callback.c [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-files_delete_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-files_destroy_callback.c [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-files_destroy_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-filess_delete_callback.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-filess_delete_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-filess_destroy_callback.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-filess_destroy_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_delete_callback.c [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_delete_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_destroy_callback.c [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_destroy_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_delete_callback.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_delete_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_destroy_callback.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_destroy_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int128s_delete_callback.c [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-int128s_delete_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-int128s_destroy_callback.c [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-int128s_destroy_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-int128ss_delete_callback.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int128ss_delete_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int128ss_destroy_callback.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int128ss_destroy_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int16s_delete_callback.c [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-int16s_delete_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-int16s_destroy_callback.c [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-int16s_destroy_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-int16ss_delete_callback.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int16ss_delete_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int16ss_destroy_callback.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int16ss_destroy_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int32s_delete_callback.c [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-int32s_delete_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-int32s_destroy_callback.c [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-int32s_destroy_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-int32ss_delete_callback.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int32ss_delete_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int32ss_destroy_callback.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int32ss_destroy_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int64s_delete_callback.c [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-int64s_delete_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-int64s_destroy_callback.c [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-int64s_destroy_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-int64ss_delete_callback.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int64ss_delete_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int64ss_destroy_callback.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int64ss_destroy_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int8s_delete_callback.c [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-int8s_delete_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-int8s_destroy_callback.c [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-int8s_destroy_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-int8ss_delete_callback.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int8ss_delete_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int8ss_destroy_callback.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int8ss_destroy_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-number_unsigneds_delete_callback.c [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-number_unsigneds_delete_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-number_unsigneds_destroy_callback.c [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-number_unsigneds_destroy_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-number_unsignedss_delete_callback.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-number_unsignedss_delete_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-number_unsignedss_destroy_callback.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-number_unsignedss_destroy_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-polls_delete_callback.c [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-polls_delete_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-polls_destroy_callback.c [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-polls_destroy_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-pollss_delete_callback.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-pollss_delete_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-pollss_destroy_callback.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-pollss_destroy_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-states_delete_callback.c [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-states_delete_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-states_destroy_callback.c [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-states_destroy_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-statess_delete_callback.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-statess_delete_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-statess_destroy_callback.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-statess_destroy_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-statuss_delete_callback.c [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-statuss_delete_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-statuss_destroy_callback.c [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-statuss_destroy_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-statusss_delete_callback.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-statusss_delete_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-statusss_destroy_callback.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-statusss_destroy_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint128s_delete_callback.c [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-uint128s_delete_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-uint128s_destroy_callback.c [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-uint128s_destroy_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_delete_callback.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_delete_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_destroy_callback.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_destroy_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint16s_delete_callback.c [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-uint16s_delete_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-uint16s_destroy_callback.c [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-uint16s_destroy_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_delete_callback.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_delete_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_destroy_callback.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_destroy_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint32s_delete_callback.c [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-uint32s_delete_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-uint32s_destroy_callback.c [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-uint32s_destroy_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_delete_callback.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_delete_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_destroy_callback.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_destroy_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint64s_delete_callback.c [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-uint64s_delete_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-uint64s_destroy_callback.c [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-uint64s_destroy_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_delete_callback.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_delete_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_destroy_callback.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_destroy_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint8s_delete_callback.c [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-uint8s_delete_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-uint8s_destroy_callback.c [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-uint8s_destroy_callback.h [deleted file]
level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_delete_callback.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_delete_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_destroy_callback.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_destroy_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array.c
level_0/f_type_array/tests/unit/c/test-type_array.h

index bb5bd8f86e35a28e6a41b4d7390de2f7eead9945..94da1ba590fd462cb21d7bad0ee0745c32801373 100644 (file)
 #define _di_f_account_group_name_by_id_
 //#define _di_f_account_id_by_name_
 #define _di_f_account_name_by_id_
-#define _di_f_accounts_destroy_callback_
+#define _di_f_accounts_append_
+#define _di_f_accounts_append_all_
 #define _di_f_accounts_delete_callback_
+#define _di_f_accounts_destroy_callback_
+#define _di_f_accountss_append_all_
+#define _di_f_accountss_delete_callback_
+#define _di_f_accountss_destroy_callback_
 #define _di_f_accountss_t_
 #define _di_f_accounts_t_
 //#define _di_f_account_t_
@@ -70,8 +75,8 @@
 #define _di_f_capability_to_name_
 #define _di_f_capability_to_text_
 #define _di_f_capability_user_set_
-#define _di_f_cells_destroy_callback_
-#define _di_f_cells_delete_callback_
+#define _di_f_cellss_delete_callback_
+#define _di_f_cellss_destroy_callback_
 #define _di_f_cellss_t_
 #define _di_f_cells_t_
 #define _di_f_cell_t_
 #define _di_f_directory_list_
 //#define _di_f_directory_listing_delete_
 #define _di_f_directory_listing_destroy_
-//#define _di_f_directory_listing_t_
+#define _di_f_directory_listings_delete_callback_
+#define _di_f_directory_listings_destroy_callback_
+#define _di_f_directory_listingss_delete_callback_
+#define _di_f_directory_listingss_destroy_callback_
+#define _di_f_directory_listingss_t_
 #define _di_f_directory_listings_t_
+//#define _di_f_directory_listing_t_
 //#define _di_f_directory_max_d_
 #define _di_f_directory_mode_
 //#define _di_f_directory_open_
 //#define _di_f_directory_recurse_do_delete_
 #define _di_f_directory_recurse_do_destroy_
 //#define _di_f_directory_recurse_do_flag_e_
+#define _di_f_directory_recurse_dos_delete_callback_
+#define _di_f_directory_recurse_dos_destroy_callback_
+#define _di_f_directory_recurse_doss_delete_callback_
+#define _di_f_directory_recurse_doss_destroy_callback_
+#define _di_f_directory_recurse_doss_t_
+#define _di_f_directory_recurse_dos_t_
 //#define _di_f_directory_recurse_do_t_
-#define _di_f_directory_recurses_do_t_
 //#define _di_f_directory_remove_
 //#define _di_f_directory_remove_custom_
 #define _di_f_directory_s_
-#define _di_f_directory_listings_destroy_callback_
-#define _di_f_directory_listings_delete_callback_
-#define _di_f_directory_recurses_destroy_callback_
-#define _di_f_directory_recurses_delete_callback_
 #define _di_f_directory_status_delete_
 #define _di_f_directory_status_destroy_
-#define _di_f_directory_statuss_destroy_callback_
 #define _di_f_directory_statuss_delete_callback_
+#define _di_f_directory_statuss_destroy_callback_
+#define _di_f_directory_statusss_delete_callback_
+#define _di_f_directory_statusss_destroy_callback_
+#define _di_f_directory_statusss_t_
 //#define _di_f_directory_statuss_t_
 //#define _di_f_directory_status_t_
 //#define _di_f_directory_touch_
 //#define _di_f_file_rename_
 #define _di_f_file_rename_at_
 //#define _di_f_file_role_change_
-#define _di_f_file_role_change_at_
-#define _di_f_files_destroy_callback_
+//#define _di_f_file_role_change_at_
 #define _di_f_file_seek_
 #define _di_f_file_seeks_d_
 #define _di_f_file_select_
 //#define _di_f_file_size_
 #define _di_f_file_size_at_
 #define _di_f_file_size_by_id_
-#define _di_f_files_delete_callback_
+#define _di_f_filess_delete_callback_
+#define _di_f_filess_destroy_callback_
 #define _di_f_filess_t_
 #define _di_f_files_t_
 //#define _di_f_file_stat_
 #define _di_f_file_write_range_
 #define _di_f_file_write_until
 #define _di_f_file_write_until_
-#define _di_f_fll_ids_destroy_callback_
 #define _di_f_fll_ids_delete_callback_
+#define _di_f_fll_ids_destroy_callback_
+#define _di_f_fll_idss_delete_callback_
+#define _di_f_fll_idss_destroy_callback_
 #define _di_f_fll_idss_t_
 #define _di_f_fll_ids_t_
 #define _di_f_fll_id_t_
 //#define _di_f_fss_is_graph_
 //#define _di_f_fss_is_space_
 //#define _di_f_fss_is_zero_width_
+#define _di_f_fss_item_delete_
+#define _di_f_fss_item_destroy_
 #define _di_f_fss_items_adjust_
 #define _di_f_fss_items_decimate_by_
 #define _di_f_fss_items_decrease_by_
-#define _di_f_fss_items_increase_
-#define _di_f_fss_items_increase_by_
+#define _di_f_fss_items_delete_callback_
+#define _di_f_fss_items_destroy_callback_
 #define _di_f_fss_items_resize_
+#define _di_f_fss_itemss_delete_callback_
+#define _di_f_fss_itemss_destroy_callback_
+#define _di_f_fss_itemss_t_
 #define _di_f_fss_items_t_
-#define _di_f_fss_item_t_
-#define _di_f_fss_named_adjust_
-#define _di_f_fss_named_decimate_by_
-#define _di_f_fss_named_decrease_by_
+//#define _di_f_fss_item_t_
+#define _di_f_fss_named_delete_
+#define _di_f_fss_named_destroy_
 #define _di_f_fss_named_increase_
 #define _di_f_fss_named_increase_by_
-#define _di_f_fss_named_resize_
 #define _di_f_fss_nameds_adjust_
 #define _di_f_fss_nameds_decimate_by_
 #define _di_f_fss_nameds_decrease_by_
-#define _di_f_fss_nameds_increase_
-#define _di_f_fss_nameds_increase_by_
-//#define _di_f_fss_nameds_resize_
+//#define _di_f_fss_nameds_delete_callback_
+#define _di_f_fss_nameds_destroy_callback_
+#define _di_f_fss_nameds_resize_
+#define _di_f_fss_namedss_delete_callback_
+#define _di_f_fss_namedss_destroy_callback_
+#define _di_f_fss_namedss_t_
 //#define _di_f_fss_nameds_t_
 //#define _di_f_fss_named_t_
 #define _di_f_fss_nest_adjust_
 #define _di_f_fss_nest_decimate_by_
 #define _di_f_fss_nest_decrease_by_
-#define _di_f_fss_nest_increase_
-#define _di_f_fss_nest_increase_by_
+#define _di_f_fss_nest_delete_
+#define _di_f_fss_nest_destroy_
 #define _di_f_fss_nest_resize_
 #define _di_f_fss_nests_adjust_
 #define _di_f_fss_nests_decimate_by_
 #define _di_f_fss_nests_decrease_by_
+#define _di_f_fss_nests_delete_callback_
+#define _di_f_fss_nests_destroy_callback_
 #define _di_f_fss_nests_increase_
 #define _di_f_fss_nests_increase_by_
 #define _di_f_fss_nests_resize_
+#define _di_f_fss_nestss_delete_callback_
+#define _di_f_fss_nestss_destroy_callback_
+#define _di_f_fss_nestss_t_
 #define _di_f_fss_nests_t_
 #define _di_f_fss_nest_t_
 #define _di_f_fss_payload_s_
 #define _di_f_fss_set_adjust_
 #define _di_f_fss_set_decimate_by_
 #define _di_f_fss_set_decrease_by_
+//#define _di_f_fss_set_delete_
+#define _di_f_fss_set_destroy_
 #define _di_f_fss_set_increase_
 #define _di_f_fss_set_increase_by_
 #define _di_f_fss_set_quote_adjust_
 #define _di_f_fss_set_quote_decimate_by_
 #define _di_f_fss_set_quote_decrease_by_
+#define _di_f_fss_set_quote_delete_
+#define _di_f_fss_set_quote_destroy_
 #define _di_f_fss_set_quote_increase_
 #define _di_f_fss_set_quote_increase_by_
 #define _di_f_fss_set_quote_resize_
 #define _di_f_fss_set_quotes_adjust_
 #define _di_f_fss_set_quotes_decimate_by_
 #define _di_f_fss_set_quotes_decrease_by_
-#define _di_f_fss_set_quotes_increase_
-#define _di_f_fss_set_quotes_increase_by_
+#define _di_f_fss_set_quotes_delete_callback_
+#define _di_f_fss_set_quotes_destroy_callback_
 #define _di_f_fss_set_quotes_resize_
+#define _di_f_fss_set_quotess_delete_callback_
+#define _di_f_fss_set_quotess_destroy_callback_
+#define _di_f_fss_set_quotess_t_
 #define _di_f_fss_set_quotes_t_
 #define _di_f_fss_set_quote_t_
-//#define _di_f_fss_set_resize_
+#define _di_f_fss_set_resize_
 #define _di_f_fss_sets_adjust_
 #define _di_f_fss_sets_decimate_by_
 #define _di_f_fss_sets_decrease_by_
-#define _di_f_fss_sets_increase_
-#define _di_f_fss_sets_increase_by_
+#define _di_f_fss_sets_delete_callback_
+#define _di_f_fss_sets_destroy_callback_
 #define _di_f_fss_sets_resize_
+#define _di_f_fss_setss_delete_callback_
+#define _di_f_fss_sets_sdestroy_callback_
+#define _di_f_fss_setss_destroy_callback_
+#define _di_f_fss_setss_t_
 #define _di_f_fss_sets_t_
 //#define _di_f_fss_set_t_
 #define _di_f_fss_simple_packet_d_
 #define _di_f_fss_simple_packet_delete_
 #define _di_f_fss_simple_packet_destroy_
 #define _di_f_fss_simple_packet_identify_
-#define _di_f_fss_simple_packet_ranges_adjust_
 #define _di_f_fss_simple_packet_ranges_append_
 #define _di_f_fss_simple_packet_ranges_append_all_
-#define _di_f_fss_simple_packet_ranges_decimate_by_
-#define _di_f_fss_simple_packet_ranges_decrease_by_
-#define _di_f_fss_simple_packet_ranges_increase_
-#define _di_f_fss_simple_packet_ranges_increase_by_
-#define _di_f_fss_simple_packet_ranges_resize_
 #define _di_f_fss_simple_packet_rangess_adjust_
 #define _di_f_fss_simple_packet_rangess_append_
 #define _di_f_fss_simple_packet_rangess_append_all_
 #define _di_f_fss_simple_packet_rangess_decimate_by_
 #define _di_f_fss_simple_packet_rangess_decrease_by_
-#define _di_f_fss_simple_packet_rangess_increase_
-#define _di_f_fss_simple_packet_rangess_increase_by_
 #define _di_f_fss_simple_packet_rangess_resize_
 #define _di_f_fss_simple_packet_rangess_t_
 #define _di_f_fss_simple_packet_ranges_t_
 #define _di_f_fss_simple_packets_append_all_
 #define _di_f_fss_simple_packets_decimate_by_
 #define _di_f_fss_simple_packets_decrease_by_
-#define _di_f_fss_simple_packets_increase_
-#define _di_f_fss_simple_packets_increase_by_
+#define _di_f_fss_simple_packets_delete_callback_
+#define _di_f_fss_simple_packets_destroy_callback_
 #define _di_f_fss_simple_packets_resize_
 #define _di_f_fss_simple_packetss_adjust_
 #define _di_f_fss_simple_packetss_append_
 #define _di_f_fss_simple_packetss_append_all_
 #define _di_f_fss_simple_packetss_decimate_by_
 #define _di_f_fss_simple_packetss_decrease_by_
-#define _di_f_fss_simple_packetss_increase_
-#define _di_f_fss_simple_packetss_increase_by_
+#define _di_f_fss_simple_packetss_delete_callback_
+#define _di_f_fss_simple_packetss_destroy_callback_
 #define _di_f_fss_simple_packetss_resize_
 #define _di_f_fss_simple_packetss_t_
 #define _di_f_fss_simple_packets_t_
 #define _di_f_iki_content_partial_is_
 //#define _di_f_iki_data_delete_
 #define _di_f_iki_data_destroy_
-#define _di_f_iki_datas_destroy_callback_
 #define _di_f_iki_datas_append_
 #define _di_f_iki_datas_append_all_
 #define _di_f_iki_datas_delete_callback_
+#define _di_f_iki_datas_destroy_callback_
 #define _di_f_iki_datass_append_
 #define _di_f_iki_datass_append_all_
+#define _di_f_iki_datass_delete_callback_
+#define _di_f_iki_datass_destroy_callback_
 #define _di_f_iki_datass_t_
 #define _di_f_iki_datas_t_
 //#define _di_f_iki_data_t_
 //#define _di_f_iki_vocabulary_0002_define_s_
 //#define _di_f_iki_vocabulary_0002_parameter_s_
 //#define _di_f_iki_vocabulary_0002_s_
-#define _di_f_int128s_destroy_callback_
-#define _di_f_int128s_delete_callback_
+#define _di_f_int128ss_delete_callback_
+#define _di_f_int128ss_destroy_callback_
 #define _di_f_int128ss_t_
 #define _di_f_int128s_t_
 //#define _di_f_int128_t_
-#define _di_f_int16s_destroy_callback_
-#define _di_f_int16s_delete_callback_
+#define _di_f_int16ss_delete_callback_
+#define _di_f_int16ss_destroy_callback_
 #define _di_f_int16ss_t_
 #define _di_f_int16s_t_
-#define _di_f_int32s_destroy_callback_
-#define _di_f_int32s_delete_callback_
+#define _di_f_int32ss_delete_callback_
+#define _di_f_int32ss_destroy_callback_
 #define _di_f_int32ss_t_
 //#define _di_f_int32s_t_
-#define _di_f_int64s_destroy_callback_
-#define _di_f_int64s_delete_callback_
+#define _di_f_int64ss_delete_callback_
+#define _di_f_int64ss_destroy_callback_
 #define _di_f_int64ss_t_
 #define _di_f_int64s_t_
-#define _di_f_int8s_destroy_callback_
-#define _di_f_int8s_delete_callback_
+#define _di_f_int8ss_delete_callback_
+#define _di_f_int8ss_destroy_callback_
 #define _di_f_int8ss_t_
 #define _di_f_int8s_t_
 //#define _di_fl_control_group_apply_
 #define _di_f_network_to_host_long_
 #define _di_f_network_to_host_short_
 #define _di_f_network_to_ip_string_
-#define _di_f_number_unsigneds_destroy_callback_
-#define _di_f_number_unsigneds_delete_callback_
+#define _di_f_number_unsignedss_delete_callback_
+#define _di_f_number_unsignedss_destroy_callback_
 #define _di_f_number_unsignedss_t_
 //#define _di_f_number_unsigneds_t_
 #define _di_f_parse_dynamic_partial_fll_identify_
 //#define _di_f_pipe_input_exists_
 #define _di_f_pipe_output_exists_
 //#define _di_f_poll_e_
-#define _di_f_polls_destroy_callback_
-#define _di_f_polls_delete_callback_
+#define _di_f_pollss_delete_callback_
+#define _di_f_pollss_destroy_callback_
 #define _di_f_pollss_t_
 #define _di_f_polls_t_
 //#define _di_f_poll_t_
 #define _di_f_socket_write_
 #define _di_f_socket_write_message_
 #define _di_f_socket_write_stream_
-#define _di_f_states_destroy_callback_
-#define _di_f_states_delete_callback_
+#define _di_f_statess_delete_callback_
+#define _di_f_statess_destroy_callback_
 #define _di_f_statess_t_
 #define _di_f_states_t_
 //#define _di_f_state_t_
 //#define _di_f_status_number_e_
 //#define _di_f_status_process_e_
 //#define _di_f_status_return_e_
-#define _di_f_statuss_destroy_callback_
 //#define _di_f_status_signal_e_
 //#define _di_f_status_socket_e_
-#define _di_f_statuss_delete_callback_
+#define _di_f_statusss_delete_callback_
+#define _di_f_statusss_destroy_callback_
 #define _di_f_statusss_t_
 #define _di_f_statuss_t_
 //#define _di_f_status_t_
 #define _di_f_thread_attribute_scheduler_policy_set_
 #define _di_f_thread_attribute_scope_get_
 #define _di_f_thread_attribute_scope_set_
-#define _di_f_thread_attributes_destroy_callback_
 #define _di_f_thread_attributes_delete_callback_
+#define _di_f_thread_attributes_destroy_callback_
+#define _di_f_thread_attributess_delete_callback_
+#define _di_f_thread_attributess_destroy_callback_
 #define _di_f_thread_attributes_t_
 #define _di_f_thread_attribute_stack_get_
 #define _di_f_thread_attribute_stack_set_
 //#define _di_f_thread_attribute_t_
 #define _di_f_thread_barrier_attribute_create_
 #define _di_f_thread_barrier_attribute_delete_
+#define _di_f_thread_barrier_attributes_delete_callback_
+#define _di_f_thread_barrier_attributes_destroy_callback_
 #define _di_f_thread_barrier_attribute_shared_get_
 #define _di_f_thread_barrier_attribute_shared_set_
-#define _di_f_thread_barrier_attributes_destroy_callback_
-#define _di_f_thread_barrier_attributes_delete_callback_
+#define _di_f_thread_barrier_attributess_delete_callback_
+#define _di_f_thread_barrier_attributess_destroy_callback_
 #define _di_f_thread_barrier_attributes_t_
 #define _di_f_thread_barrier_attribute_t_
 #define _di_f_thread_barrier_create_
 #define _di_f_thread_barrier_delete_
-#define _di_f_thread_barriers_destroy_callback_
 #define _di_f_thread_barriers_delete_callback_
+#define _di_f_thread_barriers_destroy_callback_
+#define _di_f_thread_barrierss_delete_callback_
+#define _di_f_thread_barrierss_destroy_callback_
 #define _di_f_thread_barriers_t_
 #define _di_f_thread_barrier_t_
 #define _di_f_thread_barrier_wait_
 #define _di_f_thread_condition_attribute_clock_set_
 #define _di_f_thread_condition_attribute_create_
 #define _di_f_thread_condition_attribute_delete_
+#define _di_f_thread_condition_attributes_delete_callback_
+#define _di_f_thread_condition_attributes_destroy_callback_
 #define _di_f_thread_condition_attribute_shared_get_
 #define _di_f_thread_condition_attribute_shared_set_
-#define _di_f_thread_condition_attributes_destroy_callback_
-#define _di_f_thread_condition_attributes_delete_callback_
+#define _di_f_thread_condition_attributess_delete_callback_
+#define _di_f_thread_condition_attributess_destroy_callback_
 #define _di_f_thread_condition_attributes_t_
 #define _di_f_thread_condition_attribute_t_
 #define _di_f_thread_condition_create_
 #define _di_f_thread_condition_delete_
+#define _di_f_thread_conditions_delete_callback_
+#define _di_f_thread_conditions_destroy_callback_
 #define _di_f_thread_condition_signal_
 #define _di_f_thread_condition_signal_all_
-#define _di_f_thread_conditions_destroy_callback_
-#define _di_f_thread_conditions_delete_callback_
+#define _di_f_thread_conditionss_delete_callback_
+#define _di_f_thread_conditionss_destroy_callback_
 #define _di_f_thread_conditions_t_
 #define _di_f_thread_condition_t_
 #define _di_f_thread_condition_wait_
 #define _di_f_thread_key_create_
 #define _di_f_thread_key_delete_
 #define _di_f_thread_key_get_
-#define _di_f_thread_key_set_
-#define _di_f_thread_keys_destroy_callback_
 #define _di_f_thread_keys_delete_callback_
+#define _di_f_thread_keys_destroy_callback_
+#define _di_f_thread_key_set_
+#define _di_f_thread_keyss_delete_callback_
+#define _di_f_thread_keyss_destroy_callback_
 #define _di_f_thread_keys_t_
 #define _di_f_thread_key_t_
-#define _di_f_thread_lock_attribute_destroy_callback_
 #define _di_f_thread_lock_attribute_create_
 #define _di_f_thread_lock_attribute_delete_
-#define _di_f_thread_lock_attribute_delete_callback_
+#define _di_f_thread_lock_attributes_delete_callback_
+#define _di_f_thread_lock_attributes_destroy_callback_
 #define _di_f_thread_lock_attribute_shared_get_
 #define _di_f_thread_lock_attribute_shared_set_
-#define _di_f_thread_lock_attributes_destroy_callback_
-#define _di_f_thread_lock_attributes_delete_callback_
+#define _di_f_thread_lock_attributess_delete_callback_
+#define _di_f_thread_lock_attributess_destroy_callback_
 #define _di_f_thread_lock_attributes_t_
 #define _di_f_thread_lock_attribute_t_
 #define _di_f_thread_lock_create_
 #define _di_f_thread_lock_read_
 #define _di_f_thread_lock_read_timed_
 #define _di_f_thread_lock_read_try_
-#define _di_f_thread_locks_destroy_callback_
 #define _di_f_thread_locks_delete_callback_
+#define _di_f_thread_locks_destroy_callback_
+#define _di_f_thread_lockss_delete_callback_
+#define _di_f_thread_lockss_destroy_callback_
 #define _di_f_thread_locks_t_
 #define _di_f_thread_lock_t_
 #define _di_f_thread_lock_write_
 #define _di_f_thread_lock_write_timed_
 #define _di_f_thread_lock_write_try_
-#define _di_f_thread_mutex_attribute_destroy_callback_
 #define _di_f_thread_mutex_attribute_create_
 #define _di_f_thread_mutex_attribute_delete_
 #define _di_f_thread_mutex_attribute_priority_ceiling_get_
 #define _di_f_thread_mutex_attribute_priority_ceiling_set_
 #define _di_f_thread_mutex_attribute_protocol_get_
 #define _di_f_thread_mutex_attribute_protocol_set_
-#define _di_f_thread_mutex_attribute_delete_callback_
+#define _di_f_thread_mutex_attributes_delete_callback_
+#define _di_f_thread_mutex_attributes_destroy_callback_
 #define _di_f_thread_mutex_attribute_shared_get_
 #define _di_f_thread_mutex_attribute_shared_set_
-#define _di_f_thread_mutex_attributes_destroy_callback_
-#define _di_f_thread_mutex_attributes_delete_callback_
+#define _di_f_thread_mutex_attributess_delete_callback_
+#define _di_f_thread_mutex_attributess_destroy_callback_
 #define _di_f_thread_mutex_attributes_t_
 #define _di_f_thread_mutex_attribute_t_
 #define _di_f_thread_mutex_attribute_type_get_
 #define _di_f_thread_mutex_lock_try_
 #define _di_f_thread_mutex_priority_ceiling_get_
 #define _di_f_thread_mutex_priority_ceiling_set_
-#define _di_f_thread_mutexs_destroy_callback_
 #define _di_f_thread_mutexs_delete_callback_
+#define _di_f_thread_mutexs_destroy_callback_
+#define _di_f_thread_mutexss_delete_callback_
+#define _di_f_thread_mutexss_destroy_callback_
 #define _di_f_thread_mutexs_t_
 #define _di_f_thread_mutex_t_
 #define _di_f_thread_mutex_unlock_
 #define _di_f_thread_semaphore_lock_
 #define _di_f_thread_semaphore_lock_timed_
 #define _di_f_thread_semaphore_lock_try_
-#define _di_f_thread_semaphores_destroy_callback_
 #define _di_f_thread_semaphores_delete_callback_
+#define _di_f_thread_semaphores_destroy_callback_
+#define _di_f_thread_semaphoress_delete_callback_
+#define _di_f_thread_semaphoress_destroy_callback_
 #define _di_f_thread_semaphores_t_
 #define _di_f_thread_semaphore_t_
 #define _di_f_thread_semaphore_unlock_
 #define _di_f_thread_semaphore_value_get_
-#define _di_f_thread_sets_destroy_callback_
 #define _di_f_thread_sets_delete_callback_
+#define _di_f_thread_sets_destroy_callback_
+#define _di_f_thread_setss_delete_callback_
+#define _di_f_thread_setss_destroy_callback_
 #define _di_f_thread_sets_t_
 #define _di_f_thread_set_t_
 //#define _di_f_thread_signal_mask_
 #define _di_f_thread_spin_delete_
 #define _di_f_thread_spin_lock_
 #define _di_f_thread_spin_lock_try_
-#define _di_f_thread_spins_destroy_callback_
 #define _di_f_thread_spins_delete_callback_
+#define _di_f_thread_spins_destroy_callback_
+#define _di_f_thread_spinss_delete_callback_
+#define _di_f_thread_spinss_destroy_callback_
 #define _di_f_thread_spins_t_
 #define _di_f_thread_spin_t_
 #define _di_f_thread_spin_unlock_
 //#define _di_f_type_file_flag_d_
 //#define _di_f_type_number_64_t_
 //#define _di_f_type_sizes_d_
-#define _di_f_uint128s_destroy_callback_
-#define _di_f_uint128s_delete_callback_
+#define _di_f_uint128ss_delete_callback_
+#define _di_f_uint128ss_destroy_callback_
 #define _di_f_uint128ss_t_
 #define _di_f_uint128s_t_
 //#define _di_f_uint128_t_
-#define _di_f_uint16s_destroy_callback_
-#define _di_f_uint16s_delete_callback_
+#define _di_f_uint16ss_delete_callback_
+#define _di_f_uint16ss_destroy_callback_
 #define _di_f_uint16ss_t_
 //#define _di_f_uint16s_t_
-#define _di_f_uint32s_destroy_callback_
-#define _di_f_uint32s_delete_callback_
+#define _di_f_uint32ss_delete_callback_
+#define _di_f_uint32ss_destroy_callback_
 #define _di_f_uint32ss_t_
 #define _di_f_uint32s_t_
-#define _di_f_uint64s_destroy_callback_
-#define _di_f_uint64s_delete_callback_
+#define _di_f_uint64ss_delete_callback_
+#define _di_f_uint64ss_destroy_callback_
 #define _di_f_uint64ss_t_
 #define _di_f_uint64s_t_
-#define _di_f_uint8s_destroy_callback_
-//#define _di_f_uint8s_delete_callback_
+//#define _di_f_uint8ss_delete_callback_
+#define _di_f_uint8ss_destroy_callback_
 //#define _di_f_uint8ss_t_
 //#define _di_f_uint8s_t_
 #define _di_f_utf_buffer_decrement_
index f8dc5704648728d47f652f4206ef68b200237ac6..1eff6c1a43910e1c3141fe329f4e42e3f2fde3e8 100644 (file)
@@ -38,7 +38,8 @@ build_sources_program fll/level_0/compare.c fll/level_0/compare/utf.c fll/level_
 build_sources_program fll/level_0/console.c fll/level_0/console/common.c fll/level_0/private-console.c
 build_sources_program fll/level_0/control_group.c fll/level_0/control_group/common.c
 build_sources_program fll/level_0/conversion.c fll/level_0/private-conversion.c fll/level_0/conversion/common.c
-build_sources_program fll/level_0/directory.c fll/level_0/directory/common.c fll/level_0/directory/type.c fll/level_0/private-directory.c
+build_sources_library fll/level_0/directory.c fll/level_0/directory/common.c fll/level_0/directory/listing.c fll/level_0/directory/recurse_do.c fll/level_0/directory/status.c
+build_sources_library fll/level_0/private-directory.c
 build_sources_program fll/level_0/environment.c
 build_sources_program fll/level_0/execute.c
 build_sources_program fll/level_0/file.c fll/level_0/private-file.c fll/level_0/file/common.c fll/level_0/file/stream.c
index 529f2291dc5ca7df8c388d158a9df76593ea644d..df2b6b99ec8da7c4df7bf48647432605ded17bca 100644 (file)
@@ -33,11 +33,13 @@ extern int mock_unwrap_f_memory;
 
 extern f_status_t __real_f_memory_array_adjust(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size);
 extern f_status_t __real_f_memory_array_resize(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size);
+
 extern f_status_t __real_f_string_dynamic_adjust(const f_number_unsigned_t length, f_string_dynamic_t * const structure);
 extern f_status_t __real_f_string_dynamic_resize(const f_number_unsigned_t length, f_string_dynamic_t * const structure);
 
 extern f_status_t __wrap_f_memory_array_adjust(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size);
 extern f_status_t __wrap_f_memory_array_resize(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size);
+
 extern f_status_t __wrap_f_string_dynamic_adjust(const f_number_unsigned_t length, f_string_dynamic_t * const structure);
 extern f_status_t __wrap_f_string_dynamic_resize(const f_number_unsigned_t length, f_string_dynamic_t * const structure);
 
index 2042edab50e8914e3c174d51321837d71592b20a..c209be751f044051258ef5724494b25722457797 100644 (file)
@@ -13,13 +13,13 @@ void test__f_accountss_delete_callback__fails(void **state) {
   f_account_t data = f_account_t_initialize;
   f_account_t data_array[] = { data };
   f_accounts_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_accounts_t datass_array[] = { datas };
+  f_accounts_t datas_array[] = { datas };
 
   {
     will_return(__wrap_f_string_dynamic_resize, true);
     will_return(__wrap_f_string_dynamic_resize, F_status_set_error(F_failure));
 
-    const f_status_t status = f_accountss_delete_callback(0, 1, (void *) datass_array);
+    const f_status_t status = f_accountss_delete_callback(0, 1, (void *) datas_array);
 
     assert_int_equal(status, F_status_set_error(F_failure));
   }
@@ -31,7 +31,7 @@ void test__f_accountss_delete_callback__fails(void **state) {
     will_return(__wrap_f_string_dynamic_resize, true);
     will_return(__wrap_f_string_dynamic_resize, F_status_set_error(F_failure));
 
-    const f_status_t status = f_accountss_delete_callback(0, 1, (void *) datass_array);
+    const f_status_t status = f_accountss_delete_callback(0, 1, (void *) datas_array);
 
     assert_int_equal(status, F_status_set_error(F_failure));
   }
@@ -46,7 +46,7 @@ void test__f_accountss_delete_callback__fails(void **state) {
     will_return(__wrap_f_string_dynamic_resize, true);
     will_return(__wrap_f_string_dynamic_resize, F_status_set_error(F_failure));
 
-    const f_status_t status = f_accountss_delete_callback(0, 1, (void *) datass_array);
+    const f_status_t status = f_accountss_delete_callback(0, 1, (void *) datas_array);
 
     assert_int_equal(status, F_status_set_error(F_failure));
   }
@@ -64,7 +64,7 @@ void test__f_accountss_delete_callback__fails(void **state) {
     will_return(__wrap_f_string_dynamic_resize, true);
     will_return(__wrap_f_string_dynamic_resize, F_status_set_error(F_failure));
 
-    const f_status_t status = f_accountss_delete_callback(0, 1, (void *) datass_array);
+    const f_status_t status = f_accountss_delete_callback(0, 1, (void *) datas_array);
 
     assert_int_equal(status, F_status_set_error(F_failure));
   }
@@ -85,7 +85,7 @@ void test__f_accountss_delete_callback__fails(void **state) {
     will_return(__wrap_f_string_dynamic_resize, true);
     will_return(__wrap_f_string_dynamic_resize, F_status_set_error(F_failure));
 
-    const f_status_t status = f_accountss_delete_callback(0, 1, (void *) datass_array);
+    const f_status_t status = f_accountss_delete_callback(0, 1, (void *) datas_array);
 
     assert_int_equal(status, F_status_set_error(F_failure));
   }
@@ -109,7 +109,7 @@ void test__f_accountss_delete_callback__fails(void **state) {
     will_return(__wrap_f_memory_array_resize, true);
     will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
 
-    const f_status_t status = f_accountss_delete_callback(0, 1, (void *) datass_array);
+    const f_status_t status = f_accountss_delete_callback(0, 1, (void *) datas_array);
 
     assert_int_equal(status, F_status_set_error(F_failure));
   }
index 1c398a9399501ee6192f4d44e3fa86d265466df1..10748102e50a084c4b0d105b9a35bcb0dd06f84a 100644 (file)
@@ -13,13 +13,13 @@ void test__f_accountss_destroy_callback__fails(void **state) {
   f_account_t data = f_account_t_initialize;
   f_account_t data_array[] = { data };
   f_accounts_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_accounts_t datass_array[] = { datas };
+  f_accounts_t datas_array[] = { datas };
 
   {
     will_return(__wrap_f_string_dynamic_adjust, true);
     will_return(__wrap_f_string_dynamic_adjust, F_status_set_error(F_failure));
 
-    const f_status_t status = f_accountss_destroy_callback(0, 1, (void *) datass_array);
+    const f_status_t status = f_accountss_destroy_callback(0, 1, (void *) datas_array);
 
     assert_int_equal(status, F_status_set_error(F_failure));
   }
@@ -31,7 +31,7 @@ void test__f_accountss_destroy_callback__fails(void **state) {
     will_return(__wrap_f_string_dynamic_adjust, true);
     will_return(__wrap_f_string_dynamic_adjust, F_status_set_error(F_failure));
 
-    const f_status_t status = f_accountss_destroy_callback(0, 1, (void *) datass_array);
+    const f_status_t status = f_accountss_destroy_callback(0, 1, (void *) datas_array);
 
     assert_int_equal(status, F_status_set_error(F_failure));
   }
@@ -46,7 +46,7 @@ void test__f_accountss_destroy_callback__fails(void **state) {
     will_return(__wrap_f_string_dynamic_adjust, true);
     will_return(__wrap_f_string_dynamic_adjust, F_status_set_error(F_failure));
 
-    const f_status_t status = f_accountss_destroy_callback(0, 1, (void *) datass_array);
+    const f_status_t status = f_accountss_destroy_callback(0, 1, (void *) datas_array);
 
     assert_int_equal(status, F_status_set_error(F_failure));
   }
@@ -64,7 +64,7 @@ void test__f_accountss_destroy_callback__fails(void **state) {
     will_return(__wrap_f_string_dynamic_adjust, true);
     will_return(__wrap_f_string_dynamic_adjust, F_status_set_error(F_failure));
 
-    const f_status_t status = f_accountss_destroy_callback(0, 1, (void *) datass_array);
+    const f_status_t status = f_accountss_destroy_callback(0, 1, (void *) datas_array);
 
     assert_int_equal(status, F_status_set_error(F_failure));
   }
@@ -85,7 +85,7 @@ void test__f_accountss_destroy_callback__fails(void **state) {
     will_return(__wrap_f_string_dynamic_adjust, true);
     will_return(__wrap_f_string_dynamic_adjust, F_status_set_error(F_failure));
 
-    const f_status_t status = f_accountss_destroy_callback(0, 1, (void *) datass_array);
+    const f_status_t status = f_accountss_destroy_callback(0, 1, (void *) datas_array);
 
     assert_int_equal(status, F_status_set_error(F_failure));
   }
@@ -109,7 +109,7 @@ void test__f_accountss_destroy_callback__fails(void **state) {
     will_return(__wrap_f_memory_array_adjust, true);
     will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
 
-    const f_status_t status = f_accountss_destroy_callback(0, 1, (void *) datass_array);
+    const f_status_t status = f_accountss_destroy_callback(0, 1, (void *) datas_array);
 
     assert_int_equal(status, F_status_set_error(F_failure));
   }
index ed6bb9a7c685b5e3b0cb6b57bccdb3a77d86cba4..7af0e57f0f209ff83696737f4f6138891efa0797 100644 (file)
@@ -53,7 +53,7 @@ int main(void) {
     cmocka_unit_test(test__f_accountss_destroy_callback__fails),
 
     cmocka_unit_test(test__f_accountss_delete_callback__works),
-    //cmocka_unit_test(test__f_accountss_destroy_callback__works),
+    cmocka_unit_test(test__f_accountss_destroy_callback__works),
 
     #ifndef _di_level_0_parameter_checking_
       cmocka_unit_test(test__f_account_by_id__parameter_checking),
@@ -65,7 +65,6 @@ int main(void) {
 
       // f_accounts_delete_callback() doesn't use parameter checking.
       // f_accounts_destroy_callback() doesn't use parameter checking.
-
       // f_accountss_delete_callback() doesn't use parameter checking.
       // f_accountss_destroy_callback() doesn't use parameter checking.
     #endif // _di_level_0_parameter_checking_
index e9ffea4b8cbac4aacd83c6973a5e12eef332837f..c5d7f1d571be5d0de5ef25fb2664e81bfc392bf5 100644 (file)
@@ -70,7 +70,7 @@ extern "C" {
  * An array of directory listing.
  *
  * Properties:
- *   - array: An array of directory status.
+ *   - array: An array of directory listing.
  *   - size:  Total amount of allocated space.
  *   - used:  Total number of allocated spaces used.
  */
@@ -90,6 +90,29 @@ extern "C" {
 #endif // _di_f_directory_listings_t_
 
 /**
+ * An array of an array of directory listing.
+ *
+ * Properties:
+ *   - array: An array of an array of directory listing.
+ *   - size:  Total amount of allocated space.
+ *   - used:  Total number of allocated spaces used.
+ */
+#ifndef _di_f_directory_listingss_t_
+  typedef struct {
+    f_directory_listings_t *array;
+    f_number_unsigned_t size;
+    f_number_unsigned_t used;
+  } f_directory_listingss_t;
+
+  #define f_directory_listingss_t_initialize { 0, 0, 0 }
+
+  #define macro_f_directory_listingss_t_initialize_1(content, size, used) { array, size, used }
+  #define macro_f_directory_listingss_t_initialize_2(array, length) { array, length, length }
+
+  #define macro_f_directory_listingss_t_clear(structures) macro_f_memory_structures_clear(structures)
+#endif // _di_f_directory_listingss_t_
+
+/**
  * Delete all arrays within the listing.
  *
  * @param listing
index c6e98d9c0eeaed07cd2c39170dc349f18cc76d25..36c0ac1bb3cb2b94b4dce92e774251f205ed9cf6 100644 (file)
@@ -118,10 +118,10 @@ extern "C" {
 #endif // _di_f_directory_recurse_do_t_
 
 /**
- * An array of directory recurse.
+ * An array of directory recursion information.
  *
  * Properties:
- *   - array: An array of directory status.
+ *   - array: An array of directory recursion information.
  *   - size:  Total amount of allocated space.
  *   - used:  Total number of allocated spaces used.
  */
@@ -141,6 +141,29 @@ extern "C" {
 #endif // _di_f_directory_recurse_dos_t_
 
 /**
+ * An array of an array of directory recursion information.
+ *
+ * Properties:
+ *   - array: An array of directory recursion information.
+ *   - size:  Total amount of allocated space.
+ *   - used:  Total number of allocated spaces used.
+ */
+#ifndef _di_f_directory_recurse_doss_t_
+  typedef struct {
+    f_directory_recurse_dos_t *array;
+    f_number_unsigned_t size;
+    f_number_unsigned_t used;
+  } f_directory_recurse_doss_t;
+
+  #define f_directory_recurse_doss_t_initialize { 0, 0, 0 }
+
+  #define macro_f_directory_recurse_doss_t_initialize_1(content, size, used) { array, size, used }
+  #define macro_f_directory_recurse_doss_t_initialize_2(array, length) { array, length, length }
+
+  #define macro_f_directory_recurse_doss_t_clear(structures) macro_f_memory_structures_clear(structures)
+#endif // _di_f_directory_recurse_doss_t_
+
+/**
  * Delete all non-pointer based dynamic arrays within the recurse.
  *
  * @param recurse
index 18e55ff80934db51ccff49d4c565b91249051527..65af472b28ddc08727b653620150f814c476635b 100644 (file)
@@ -65,6 +65,29 @@ extern "C" {
 #endif // _di_f_directory_statuss_t_
 
 /**
+ * An array of an array of directory status.
+ *
+ * Properties:
+ *   - array: An array of an array of directory status.
+ *   - size:  Total amount of allocated space.
+ *   - used:  Total number of allocated spaces used.
+ */
+#ifndef _di_f_directory_statusss_t_
+  typedef struct {
+    f_directory_statuss_t *array;
+    f_number_unsigned_t size;
+    f_number_unsigned_t used;
+  } f_directory_statusss_t;
+
+  #define f_directory_statusss_t_initialize { 0, 0, 0 }
+
+  #define macro_f_directory_statusss_t_initialize_1(content, size, used) { array, size, used }
+  #define macro_f_directory_statusss_t_initialize_2(array, length) { array, length, length }
+
+  #define macro_f_directory_statusss_t_clear(structures) macro_f_memory_structures_clear(structures)
+#endif // _di_f_directory_statusss_t_
+
+/**
  * A callback intended to be passed to f_memory_arrays_resize() for an f_directory_statuss_t structure.
  *
  * This is only called when shrinking the array and generally should perform deallocations.
index 5a72c3295479e660bade04a7b269ac0d2917592f..285772d9ee08560060f691800bc70449f2e05c66 100644 (file)
@@ -63,6 +63,8 @@ flags-coverage --coverage -fprofile-abs-path -fprofile-dir=build/coverage/
 flags_library -fPIC
 
 # Inject mocks.
+flags -Wl,--wrap=f_memory_array_adjust
+flags -Wl,--wrap=f_memory_array_resize
 flags -Wl,--wrap=f_string_dynamic_adjust
 flags -Wl,--wrap=f_string_dynamic_resize
 flags -Wl,--wrap=f_string_dynamics_adjust
index a60e9ea64996242120957c66df8f2a4743d1082c..49eba7ae18600b0d2d49376a60fee652baca33be 100644 (file)
@@ -26,9 +26,9 @@ build_libraries -lc -lcmocka
 build_libraries-individual -lf_memory -lf_string -lf_directory
 
 build_sources_program test-directory.c test-directory-create.c test-directory-create_at.c test-directory-exists.c test-directory-exists_at.c test-directory-is.c test-directory-is_at.c test-directory-list.c test-directory-open.c test-directory-open_at.c test-directory-remove.c test-directory-remove_custom.c test-directory-touch.c test-directory-touch_at.c
-build_sources_program test-directory-listings_destroy_callback.c test-directory-listings_delete_callback.c
-build_sources_program test-directory-recurse_dos_destroy_callback.c test-directory-recurse_dos_delete_callback.c
-build_sources_program test-directory-statuss_destroy_callback.c test-directory-statuss_delete_callback.c
+build_sources_program test-directory-listings_destroy_callback.c test-directory-listings_delete_callback.c test-directory-listingss_destroy_callback.c test-directory-listingss_delete_callback.c
+build_sources_program test-directory-recurse_dos_destroy_callback.c test-directory-recurse_dos_delete_callback.c test-directory-recurse_doss_destroy_callback.c test-directory-recurse_doss_delete_callback.c
+build_sources_program test-directory-statuss_destroy_callback.c test-directory-statuss_delete_callback.c test-directory-statusss_destroy_callback.c test-directory-statusss_delete_callback.c
 
 build_script no
 build_shared yes
index 01efdd63c3f185e4ff49cb6137ba9fc6c92c1de6..fa8be2dca1c1f3a2064ba050ad9f115fab4db578 100644 (file)
@@ -5,6 +5,41 @@ extern "C" {
 #endif
 
 int mock_unwrap = 0;
+int mock_unwrap_f_memory = 1;
+
+f_status_t __wrap_f_memory_array_adjust(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size) {
+
+  if (mock_unwrap_f_memory) {
+    return __real_f_memory_array_adjust(length, width, array, used, size);
+  }
+
+  if (!array || !used || !size) return F_status_set_error(F_parameter_not);
+
+  const bool failure = mock_type(bool);
+
+  if (failure) return mock_type(f_status_t);
+
+  *size = length;
+
+  return mock_type(f_status_t);
+}
+
+f_status_t __wrap_f_memory_array_resize(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size) {
+
+  if (mock_unwrap_f_memory) {
+    return __real_f_memory_array_resize(length, width, array, used, size);
+  }
+
+  if (!array || !used || !size) return F_status_set_error(F_parameter_not);
+
+  const bool failure = mock_type(bool);
+
+  if (failure) return mock_type(f_status_t);
+
+  *size = length;
+
+  return mock_type(f_status_t);
+}
 
 f_status_t __wrap_f_string_dynamic_adjust(const f_number_unsigned_t length, f_string_dynamic_t * const structure) {
 
index 15f15624293fb550cb3c68ffa4ed652a3b80b588..867140163d8a359b8be2f0cf407657d7b56ce73f 100644 (file)
@@ -29,12 +29,19 @@ extern "C" {
 const static int mock_errno_generic = 32767;
 
 extern int mock_unwrap;
+extern int mock_unwrap_f_memory;
+
+extern f_status_t __real_f_memory_array_adjust(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size);
+extern f_status_t __real_f_memory_array_resize(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size);
 
 extern f_status_t __real_f_string_dynamic_adjust(const f_number_unsigned_t length, f_string_dynamic_t * const structure);
 extern f_status_t __real_f_string_dynamic_resize(const f_number_unsigned_t length, f_string_dynamic_t * const structure);
 extern f_status_t __real_f_string_dynamics_adjust(const f_number_unsigned_t length, f_string_dynamics_t * const structure);
 extern f_status_t __real_f_string_dynamics_resize(const f_number_unsigned_t length, f_string_dynamics_t * const structure);
 
+extern f_status_t __wrap_f_memory_array_adjust(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size);
+extern f_status_t __wrap_f_memory_array_resize(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size);
+
 extern f_status_t __wrap_f_string_dynamic_adjust(const f_number_unsigned_t length, f_string_dynamic_t * const structure);
 extern f_status_t __wrap_f_string_dynamic_resize(const f_number_unsigned_t length, f_string_dynamic_t * const structure);
 extern f_status_t __wrap_f_string_dynamics_adjust(const f_number_unsigned_t length, f_string_dynamics_t * const structure);
index c9b5c57cabafb789df15f4fa1c7ce89de1350d07..0a5007c1723fc10960c6537b72e40c3a3e9aed13 100644 (file)
@@ -12,13 +12,13 @@ void test__f_directory_listings_delete_callback__fails(void **state) {
   f_directory_listing_t data = f_directory_listing_t_initialize;
   f_directory_listing_t data_array[] = { data };
   f_directory_listings_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_directory_listings_t datass_array[] = { datas };
+  f_directory_listings_t datas_array[] = { datas };
 
   {
     will_return(__wrap_f_string_dynamics_resize, true);
     will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
 
-    const f_status_t status = f_directory_listings_delete_callback(0, 1, (void *) datass_array);
+    const f_status_t status = f_directory_listings_delete_callback(0, 1, (void *) datas_array);
 
     assert_int_equal(status, F_status_set_error(F_failure));
   }
@@ -30,7 +30,7 @@ void test__f_directory_listings_delete_callback__fails(void **state) {
     will_return(__wrap_f_string_dynamics_resize, true);
     will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
 
-    const f_status_t status = f_directory_listings_delete_callback(0, 1, (void *) datass_array);
+    const f_status_t status = f_directory_listings_delete_callback(0, 1, (void *) datas_array);
 
     assert_int_equal(status, F_status_set_error(F_failure));
   }
@@ -45,7 +45,7 @@ void test__f_directory_listings_delete_callback__fails(void **state) {
     will_return(__wrap_f_string_dynamics_resize, true);
     will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
 
-    const f_status_t status = f_directory_listings_delete_callback(0, 1, (void *) datass_array);
+    const f_status_t status = f_directory_listings_delete_callback(0, 1, (void *) datas_array);
 
     assert_int_equal(status, F_status_set_error(F_failure));
   }
@@ -63,7 +63,7 @@ void test__f_directory_listings_delete_callback__fails(void **state) {
     will_return(__wrap_f_string_dynamics_resize, true);
     will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
 
-    const f_status_t status = f_directory_listings_delete_callback(0, 1, (void *) datass_array);
+    const f_status_t status = f_directory_listings_delete_callback(0, 1, (void *) datas_array);
 
     assert_int_equal(status, F_status_set_error(F_failure));
   }
@@ -84,7 +84,7 @@ void test__f_directory_listings_delete_callback__fails(void **state) {
     will_return(__wrap_f_string_dynamics_resize, true);
     will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
 
-    const f_status_t status = f_directory_listings_delete_callback(0, 1, (void *) datass_array);
+    const f_status_t status = f_directory_listings_delete_callback(0, 1, (void *) datas_array);
 
     assert_int_equal(status, F_status_set_error(F_failure));
   }
@@ -108,7 +108,7 @@ void test__f_directory_listings_delete_callback__fails(void **state) {
     will_return(__wrap_f_string_dynamics_resize, true);
     will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
 
-    const f_status_t status = f_directory_listings_delete_callback(0, 1, (void *) datass_array);
+    const f_status_t status = f_directory_listings_delete_callback(0, 1, (void *) datas_array);
 
     assert_int_equal(status, F_status_set_error(F_failure));
   }
@@ -135,7 +135,7 @@ void test__f_directory_listings_delete_callback__fails(void **state) {
     will_return(__wrap_f_string_dynamics_resize, true);
     will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
 
-    const f_status_t status = f_directory_listings_delete_callback(0, 1, (void *) datass_array);
+    const f_status_t status = f_directory_listings_delete_callback(0, 1, (void *) datas_array);
 
     assert_int_equal(status, F_status_set_error(F_failure));
   }
@@ -165,7 +165,7 @@ void test__f_directory_listings_delete_callback__fails(void **state) {
     will_return(__wrap_f_string_dynamics_resize, true);
     will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
 
-    const f_status_t status = f_directory_listings_delete_callback(0, 1, (void *) datass_array);
+    const f_status_t status = f_directory_listings_delete_callback(0, 1, (void *) datas_array);
 
     assert_int_equal(status, F_status_set_error(F_failure));
   }
@@ -178,7 +178,7 @@ void test__f_directory_listings_delete_callback__works(void **state) {
   f_directory_listing_t data = f_directory_listing_t_initialize;
   f_directory_listing_t data_array[] = { data };
   f_directory_listings_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_directory_listings_t datass_array[] = { datas };
+  f_directory_listings_t datas_array[] = { datas };
   const f_number_unsigned_t length = 1;
 
   {
@@ -206,7 +206,7 @@ void test__f_directory_listings_delete_callback__works(void **state) {
     will_return(__wrap_f_string_dynamics_resize, false);
     will_return(__wrap_f_string_dynamics_resize, F_none);
 
-    const f_status_t status = f_directory_listings_delete_callback(0, length, (void *) datass_array);
+    const f_status_t status = f_directory_listings_delete_callback(0, length, (void *) datas_array);
 
     assert_int_equal(status, F_none);
   }
index 007c43c7d8a78e3211a55b3b0708a2e6ed59d70e..8bf485958b19df16ee83d4c872796dbd52033271 100644 (file)
@@ -12,13 +12,13 @@ void test__f_directory_listings_destroy_callback__fails(void **state) {
   f_directory_listing_t data = f_directory_listing_t_initialize;
   f_directory_listing_t data_array[] = { data };
   f_directory_listings_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_directory_listings_t datass_array[] = { datas };
+  f_directory_listings_t datas_array[] = { datas };
 
   {
     will_return(__wrap_f_string_dynamics_adjust, true);
     will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
 
-    const f_status_t status = f_directory_listings_destroy_callback(0, 1, (void *) datass_array);
+    const f_status_t status = f_directory_listings_destroy_callback(0, 1, (void *) datas_array);
 
     assert_int_equal(status, F_status_set_error(F_failure));
   }
@@ -30,7 +30,7 @@ void test__f_directory_listings_destroy_callback__fails(void **state) {
     will_return(__wrap_f_string_dynamics_adjust, true);
     will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
 
-    const f_status_t status = f_directory_listings_destroy_callback(0, 1, (void *) datass_array);
+    const f_status_t status = f_directory_listings_destroy_callback(0, 1, (void *) datas_array);
 
     assert_int_equal(status, F_status_set_error(F_failure));
   }
@@ -45,7 +45,7 @@ void test__f_directory_listings_destroy_callback__fails(void **state) {
     will_return(__wrap_f_string_dynamics_adjust, true);
     will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
 
-    const f_status_t status = f_directory_listings_destroy_callback(0, 1, (void *) datass_array);
+    const f_status_t status = f_directory_listings_destroy_callback(0, 1, (void *) datas_array);
 
     assert_int_equal(status, F_status_set_error(F_failure));
   }
@@ -63,7 +63,7 @@ void test__f_directory_listings_destroy_callback__fails(void **state) {
     will_return(__wrap_f_string_dynamics_adjust, true);
     will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
 
-    const f_status_t status = f_directory_listings_destroy_callback(0, 1, (void *) datass_array);
+    const f_status_t status = f_directory_listings_destroy_callback(0, 1, (void *) datas_array);
 
     assert_int_equal(status, F_status_set_error(F_failure));
   }
@@ -84,7 +84,7 @@ void test__f_directory_listings_destroy_callback__fails(void **state) {
     will_return(__wrap_f_string_dynamics_adjust, true);
     will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
 
-    const f_status_t status = f_directory_listings_destroy_callback(0, 1, (void *) datass_array);
+    const f_status_t status = f_directory_listings_destroy_callback(0, 1, (void *) datas_array);
 
     assert_int_equal(status, F_status_set_error(F_failure));
   }
@@ -108,7 +108,7 @@ void test__f_directory_listings_destroy_callback__fails(void **state) {
     will_return(__wrap_f_string_dynamics_adjust, true);
     will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
 
-    const f_status_t status = f_directory_listings_destroy_callback(0, 1, (void *) datass_array);
+    const f_status_t status = f_directory_listings_destroy_callback(0, 1, (void *) datas_array);
 
     assert_int_equal(status, F_status_set_error(F_failure));
   }
@@ -135,7 +135,7 @@ void test__f_directory_listings_destroy_callback__fails(void **state) {
     will_return(__wrap_f_string_dynamics_adjust, true);
     will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
 
-    const f_status_t status = f_directory_listings_destroy_callback(0, 1, (void *) datass_array);
+    const f_status_t status = f_directory_listings_destroy_callback(0, 1, (void *) datas_array);
 
     assert_int_equal(status, F_status_set_error(F_failure));
   }
@@ -165,7 +165,7 @@ void test__f_directory_listings_destroy_callback__fails(void **state) {
     will_return(__wrap_f_string_dynamics_adjust, true);
     will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
 
-    const f_status_t status = f_directory_listings_destroy_callback(0, 1, (void *) datass_array);
+    const f_status_t status = f_directory_listings_destroy_callback(0, 1, (void *) datas_array);
 
     assert_int_equal(status, F_status_set_error(F_failure));
   }
@@ -178,7 +178,7 @@ void test__f_directory_listings_destroy_callback__works(void **state) {
   f_directory_listing_t data = f_directory_listing_t_initialize;
   f_directory_listing_t data_array[] = { data };
   f_directory_listings_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_directory_listings_t datass_array[] = { datas };
+  f_directory_listings_t datas_array[] = { datas };
   const f_number_unsigned_t length = 1;
 
   {
@@ -206,7 +206,7 @@ void test__f_directory_listings_destroy_callback__works(void **state) {
     will_return(__wrap_f_string_dynamics_adjust, false);
     will_return(__wrap_f_string_dynamics_adjust, F_none);
 
-    const f_status_t status = f_directory_listings_destroy_callback(0, length, (void *) datass_array);
+    const f_status_t status = f_directory_listings_destroy_callback(0, length, (void *) datas_array);
 
     assert_int_equal(status, F_none);
   }
diff --git a/level_0/f_directory/tests/unit/c/test-directory-listingss_delete_callback.c b/level_0/f_directory/tests/unit/c/test-directory-listingss_delete_callback.c
new file mode 100644 (file)
index 0000000..0ad401e
--- /dev/null
@@ -0,0 +1,261 @@
+#include "test-directory.h"
+#include "test-directory-listingss_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_directory_listingss_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_directory_listing_t data = f_directory_listing_t_initialize;
+  f_directory_listing_t data_array[] = { data };
+  f_directory_listings_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_directory_listings_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_string_dynamics_resize, true);
+    will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_listingss_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, true);
+    will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_listingss_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, true);
+    will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_listingss_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, true);
+    will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_listingss_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, true);
+    will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_listingss_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, true);
+    will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_listingss_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, true);
+    will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_listingss_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, true);
+    will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_listingss_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_listingss_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_directory_listingss_delete_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_directory_listingss_t datass = f_directory_listingss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_directory_listings_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_resize(1, sizeof(f_directory_listing_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+
+    status = f_string_dynamics_resize(1, &datass.array[0].array[0].block);
+    assert_int_equal(status, F_none);
+
+    status = f_string_dynamics_resize(1, &datass.array[0].array[0].character);
+    assert_int_equal(status, F_none);
+
+    status = f_string_dynamics_resize(1, &datass.array[0].array[0].directory);
+    assert_int_equal(status, F_none);
+
+    status = f_string_dynamics_resize(1, &datass.array[0].array[0].regular);
+    assert_int_equal(status, F_none);
+
+    status = f_string_dynamics_resize(1, &datass.array[0].array[0].link);
+    assert_int_equal(status, F_none);
+
+    status = f_string_dynamics_resize(1, &datass.array[0].array[0].fifo);
+    assert_int_equal(status, F_none);
+
+    status = f_string_dynamics_resize(1, &datass.array[0].array[0].socket);
+    assert_int_equal(status, F_none);
+
+    status = f_string_dynamics_resize(1, &datass.array[0].array[0].unknown);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_directory_listingss_delete_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_directory/tests/unit/c/test-directory-listingss_delete_callback.h b/level_0/f_directory/tests/unit/c/test-directory-listingss_delete_callback.h
new file mode 100644 (file)
index 0000000..3b03a85
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Directory
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_directory__listingss_delete_callback
+#define _TEST__F_directory__listingss_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_directory_listingss_delete_callback()
+ */
+extern void test__f_directory_listingss_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_directory_listingss_delete_callback()
+ */
+extern void test__f_directory_listingss_delete_callback__works(void **state);
+
+#endif // _TEST__F_directory__listingss_delete_callback
diff --git a/level_0/f_directory/tests/unit/c/test-directory-listingss_destroy_callback.c b/level_0/f_directory/tests/unit/c/test-directory-listingss_destroy_callback.c
new file mode 100644 (file)
index 0000000..2aa5368
--- /dev/null
@@ -0,0 +1,261 @@
+#include "test-directory.h"
+#include "test-directory-listingss_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_directory_listingss_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_directory_listing_t data = f_directory_listing_t_initialize;
+  f_directory_listing_t data_array[] = { data };
+  f_directory_listings_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_directory_listings_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_string_dynamics_adjust, true);
+    will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_listingss_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, true);
+    will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_listingss_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, true);
+    will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_listingss_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, true);
+    will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_listingss_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, true);
+    will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_listingss_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, true);
+    will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_listingss_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, true);
+    will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_listingss_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, true);
+    will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_listingss_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_listingss_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_directory_listingss_destroy_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_directory_listingss_t datass = f_directory_listingss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_adjust(length, sizeof(f_directory_listings_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_resize(1, sizeof(f_directory_listing_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+
+    status = f_string_dynamics_adjust(1, &datass.array[0].array[0].block);
+    assert_int_equal(status, F_none);
+
+    status = f_string_dynamics_adjust(1, &datass.array[0].array[0].character);
+    assert_int_equal(status, F_none);
+
+    status = f_string_dynamics_adjust(1, &datass.array[0].array[0].directory);
+    assert_int_equal(status, F_none);
+
+    status = f_string_dynamics_adjust(1, &datass.array[0].array[0].regular);
+    assert_int_equal(status, F_none);
+
+    status = f_string_dynamics_adjust(1, &datass.array[0].array[0].link);
+    assert_int_equal(status, F_none);
+
+    status = f_string_dynamics_adjust(1, &datass.array[0].array[0].fifo);
+    assert_int_equal(status, F_none);
+
+    status = f_string_dynamics_adjust(1, &datass.array[0].array[0].socket);
+    assert_int_equal(status, F_none);
+
+    status = f_string_dynamics_adjust(1, &datass.array[0].array[0].unknown);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_directory_listingss_destroy_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_directory/tests/unit/c/test-directory-listingss_destroy_callback.h b/level_0/f_directory/tests/unit/c/test-directory-listingss_destroy_callback.h
new file mode 100644 (file)
index 0000000..ef59cc7
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Directory
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_directory__listingss_destroy_callback
+#define _TEST__F_directory__listingss_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_directory_listingss_destroy_callback()
+ */
+extern void test__f_directory_listingss_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_directory_listingss_destroy_callback()
+ */
+extern void test__f_directory_listingss_destroy_callback__works(void **state);
+
+#endif // _TEST__F_directory__listingss_destroy_callback
diff --git a/level_0/f_directory/tests/unit/c/test-directory-recurse_doss_delete_callback.c b/level_0/f_directory/tests/unit/c/test-directory-recurse_doss_delete_callback.c
new file mode 100644 (file)
index 0000000..be47516
--- /dev/null
@@ -0,0 +1,342 @@
+#include "test-directory.h"
+#include "test-directory-recurse_doss_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_directory_recurse_doss_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_directory_recurse_do_t data = f_directory_recurse_do_t_initialize;
+  f_directory_recurse_do_t data_array[] = { data };
+  f_directory_recurse_dos_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_directory_recurse_dos_t datass_array[] = { datas };
+
+  {
+    will_return(__wrap_f_string_dynamic_resize, true);
+    will_return(__wrap_f_string_dynamic_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_recurse_doss_delete_callback(0, 1, (void *) datass_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_dynamic_resize, false);
+    will_return(__wrap_f_string_dynamic_resize, F_none);
+
+    will_return(__wrap_f_string_dynamic_resize, true);
+    will_return(__wrap_f_string_dynamic_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_recurse_doss_delete_callback(0, 1, (void *) datass_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_dynamic_resize, false);
+    will_return(__wrap_f_string_dynamic_resize, F_none);
+
+    will_return(__wrap_f_string_dynamic_resize, false);
+    will_return(__wrap_f_string_dynamic_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, true);
+    will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_recurse_doss_delete_callback(0, 1, (void *) datass_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_dynamic_resize, false);
+    will_return(__wrap_f_string_dynamic_resize, F_none);
+
+    will_return(__wrap_f_string_dynamic_resize, false);
+    will_return(__wrap_f_string_dynamic_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, true);
+    will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_recurse_doss_delete_callback(0, 1, (void *) datass_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_dynamic_resize, false);
+    will_return(__wrap_f_string_dynamic_resize, F_none);
+
+    will_return(__wrap_f_string_dynamic_resize, false);
+    will_return(__wrap_f_string_dynamic_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, true);
+    will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_recurse_doss_delete_callback(0, 1, (void *) datass_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_dynamic_resize, false);
+    will_return(__wrap_f_string_dynamic_resize, F_none);
+
+    will_return(__wrap_f_string_dynamic_resize, false);
+    will_return(__wrap_f_string_dynamic_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, true);
+    will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_recurse_doss_delete_callback(0, 1, (void *) datass_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_dynamic_resize, false);
+    will_return(__wrap_f_string_dynamic_resize, F_none);
+
+    will_return(__wrap_f_string_dynamic_resize, false);
+    will_return(__wrap_f_string_dynamic_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, true);
+    will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_recurse_doss_delete_callback(0, 1, (void *) datass_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_dynamic_resize, false);
+    will_return(__wrap_f_string_dynamic_resize, F_none);
+
+    will_return(__wrap_f_string_dynamic_resize, false);
+    will_return(__wrap_f_string_dynamic_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, true);
+    will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_recurse_doss_delete_callback(0, 1, (void *) datass_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_dynamic_resize, false);
+    will_return(__wrap_f_string_dynamic_resize, F_none);
+
+    will_return(__wrap_f_string_dynamic_resize, false);
+    will_return(__wrap_f_string_dynamic_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, true);
+    will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_recurse_doss_delete_callback(0, 1, (void *) datass_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_dynamic_resize, false);
+    will_return(__wrap_f_string_dynamic_resize, F_none);
+
+    will_return(__wrap_f_string_dynamic_resize, false);
+    will_return(__wrap_f_string_dynamic_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, true);
+    will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_recurse_doss_delete_callback(0, 1, (void *) datass_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_dynamic_resize, false);
+    will_return(__wrap_f_string_dynamic_resize, F_none);
+
+    will_return(__wrap_f_string_dynamic_resize, false);
+    will_return(__wrap_f_string_dynamic_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_string_dynamics_resize, false);
+    will_return(__wrap_f_string_dynamics_resize, F_none);
+
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_recurse_doss_delete_callback(0, 1, (void *) datass_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_directory_recurse_doss_delete_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_directory_recurse_doss_t datass = f_directory_recurse_doss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_directory_recurse_dos_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_resize(1, sizeof(f_directory_recurse_do_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+
+    status = f_string_dynamic_resize(1, &datass.array[0].array[0].path);
+    assert_int_equal(status, F_none);
+
+    status = f_string_dynamic_resize(1, &datass.array[0].array[0].path_cache);
+    assert_int_equal(status, F_none);
+
+    status = f_string_dynamics_resize(1, &datass.array[0].array[0].listing.block);
+    assert_int_equal(status, F_none);
+
+    status = f_string_dynamics_resize(1, &datass.array[0].array[0].listing.character);
+    assert_int_equal(status, F_none);
+
+    status = f_string_dynamics_resize(1, &datass.array[0].array[0].listing.directory);
+    assert_int_equal(status, F_none);
+
+    status = f_string_dynamics_resize(1, &datass.array[0].array[0].listing.regular);
+    assert_int_equal(status, F_none);
+
+    status = f_string_dynamics_resize(1, &datass.array[0].array[0].listing.link);
+    assert_int_equal(status, F_none);
+
+    status = f_string_dynamics_resize(1, &datass.array[0].array[0].listing.fifo);
+    assert_int_equal(status, F_none);
+
+    status = f_string_dynamics_resize(1, &datass.array[0].array[0].listing.socket);
+    assert_int_equal(status, F_none);
+
+    status = f_string_dynamics_resize(1, &datass.array[0].array[0].listing.unknown);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_directory_recurse_doss_delete_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_directory/tests/unit/c/test-directory-recurse_doss_delete_callback.h b/level_0/f_directory/tests/unit/c/test-directory-recurse_doss_delete_callback.h
new file mode 100644 (file)
index 0000000..b5f8a5e
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Directory
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_directory__recurse_doss_delete_callback
+#define _TEST__F_directory__recurse_doss_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_directory_recurse_doss_delete_callback()
+ */
+extern void test__f_directory_recurse_doss_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_directory_recurse_doss_delete_callback()
+ */
+extern void test__f_directory_recurse_doss_delete_callback__works(void **state);
+
+#endif // _TEST__F_directory__recurse_doss_delete_callback
diff --git a/level_0/f_directory/tests/unit/c/test-directory-recurse_doss_destroy_callback.c b/level_0/f_directory/tests/unit/c/test-directory-recurse_doss_destroy_callback.c
new file mode 100644 (file)
index 0000000..3e3fd88
--- /dev/null
@@ -0,0 +1,342 @@
+#include "test-directory.h"
+#include "test-directory-recurse_doss_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_directory_recurse_doss_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_directory_recurse_do_t data = f_directory_recurse_do_t_initialize;
+  f_directory_recurse_do_t data_array[] = { data };
+  f_directory_recurse_dos_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_directory_recurse_dos_t datass_array[] = { datas };
+
+  {
+    will_return(__wrap_f_string_dynamic_adjust, true);
+    will_return(__wrap_f_string_dynamic_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_recurse_doss_destroy_callback(0, 1, (void *) datass_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_dynamic_adjust, false);
+    will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamic_adjust, true);
+    will_return(__wrap_f_string_dynamic_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_recurse_doss_destroy_callback(0, 1, (void *) datass_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_dynamic_adjust, false);
+    will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamic_adjust, false);
+    will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, true);
+    will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_recurse_doss_destroy_callback(0, 1, (void *) datass_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_dynamic_adjust, false);
+    will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamic_adjust, false);
+    will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, true);
+    will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_recurse_doss_destroy_callback(0, 1, (void *) datass_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_dynamic_adjust, false);
+    will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamic_adjust, false);
+    will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, true);
+    will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_recurse_doss_destroy_callback(0, 1, (void *) datass_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_dynamic_adjust, false);
+    will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamic_adjust, false);
+    will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, true);
+    will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_recurse_doss_destroy_callback(0, 1, (void *) datass_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_dynamic_adjust, false);
+    will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamic_adjust, false);
+    will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, true);
+    will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_recurse_doss_destroy_callback(0, 1, (void *) datass_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_dynamic_adjust, false);
+    will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamic_adjust, false);
+    will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, true);
+    will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_recurse_doss_destroy_callback(0, 1, (void *) datass_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_dynamic_adjust, false);
+    will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamic_adjust, false);
+    will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, true);
+    will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_recurse_doss_destroy_callback(0, 1, (void *) datass_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_dynamic_adjust, false);
+    will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamic_adjust, false);
+    will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, true);
+    will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_recurse_doss_destroy_callback(0, 1, (void *) datass_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_dynamic_adjust, false);
+    will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamic_adjust, false);
+    will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_string_dynamics_adjust, false);
+    will_return(__wrap_f_string_dynamics_adjust, F_none);
+
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_recurse_doss_destroy_callback(0, 1, (void *) datass_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_directory_recurse_doss_destroy_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_directory_recurse_doss_t datass = f_directory_recurse_doss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_adjust(length, sizeof(f_directory_recurse_dos_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_adjust(1, sizeof(f_directory_recurse_do_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+
+    status = f_string_dynamic_adjust(1, &datass.array[0].array[0].path);
+    assert_int_equal(status, F_none);
+
+    status = f_string_dynamic_adjust(1, &datass.array[0].array[0].path_cache);
+    assert_int_equal(status, F_none);
+
+    status = f_string_dynamics_adjust(1, &datass.array[0].array[0].listing.block);
+    assert_int_equal(status, F_none);
+
+    status = f_string_dynamics_adjust(1, &datass.array[0].array[0].listing.character);
+    assert_int_equal(status, F_none);
+
+    status = f_string_dynamics_adjust(1, &datass.array[0].array[0].listing.directory);
+    assert_int_equal(status, F_none);
+
+    status = f_string_dynamics_adjust(1, &datass.array[0].array[0].listing.regular);
+    assert_int_equal(status, F_none);
+
+    status = f_string_dynamics_adjust(1, &datass.array[0].array[0].listing.link);
+    assert_int_equal(status, F_none);
+
+    status = f_string_dynamics_adjust(1, &datass.array[0].array[0].listing.fifo);
+    assert_int_equal(status, F_none);
+
+    status = f_string_dynamics_adjust(1, &datass.array[0].array[0].listing.socket);
+    assert_int_equal(status, F_none);
+
+    status = f_string_dynamics_adjust(1, &datass.array[0].array[0].listing.unknown);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_directory_recurse_doss_destroy_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_directory/tests/unit/c/test-directory-recurse_doss_destroy_callback.h b/level_0/f_directory/tests/unit/c/test-directory-recurse_doss_destroy_callback.h
new file mode 100644 (file)
index 0000000..af2d76f
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Directory
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_directory__recurse_doss_destroy_callback
+#define _TEST__F_directory__recurse_doss_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_directory_recurse_doss_destroy_callback()
+ */
+extern void test__f_directory_recurse_doss_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_directory_recurse_doss_destroy_callback()
+ */
+extern void test__f_directory_recurse_doss_destroy_callback__works(void **state);
+
+#endif // _TEST__F_directory__recurse_doss_destroy_callback
diff --git a/level_0/f_directory/tests/unit/c/test-directory-statusss_delete_callback.c b/level_0/f_directory/tests/unit/c/test-directory-statusss_delete_callback.c
new file mode 100644 (file)
index 0000000..2082685
--- /dev/null
@@ -0,0 +1,72 @@
+#include "test-directory.h"
+#include "test-directory-statusss_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_directory_statusss_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_directory_status_t data = f_directory_status_t_initialize;
+  f_directory_status_t data_array[] = { data };
+  f_directory_statuss_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_directory_statuss_t datass_array[] = { datas };
+
+  {
+    will_return(__wrap_f_string_dynamic_resize, true);
+    will_return(__wrap_f_string_dynamic_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_statusss_delete_callback(0, 1, (void *) datass_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_dynamic_resize, false);
+    will_return(__wrap_f_string_dynamic_resize, F_none);
+
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_statusss_delete_callback(0, 1, (void *) datass_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_directory_statusss_delete_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_directory_statusss_t datass = f_directory_statusss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_directory_statuss_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_resize(1, sizeof(f_directory_status_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+
+    status = f_string_dynamic_resize(1, &datass.array[0].array[0].path);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_directory_statusss_delete_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_directory/tests/unit/c/test-directory-statusss_delete_callback.h b/level_0/f_directory/tests/unit/c/test-directory-statusss_delete_callback.h
new file mode 100644 (file)
index 0000000..e518d24
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Directory
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_directory__statusss_delete_callback
+#define _TEST__F_directory__statusss_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_directory_statusss_delete_callback()
+ */
+extern void test__f_directory_statusss_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_directory_statusss_delete_callback()
+ */
+extern void test__f_directory_statusss_delete_callback__works(void **state);
+
+#endif // _TEST__F_directory__statusss_delete_callback
diff --git a/level_0/f_directory/tests/unit/c/test-directory-statusss_destroy_callback.c b/level_0/f_directory/tests/unit/c/test-directory-statusss_destroy_callback.c
new file mode 100644 (file)
index 0000000..b660722
--- /dev/null
@@ -0,0 +1,72 @@
+#include "test-directory.h"
+#include "test-directory-statusss_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_directory_statusss_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_directory_status_t data = f_directory_status_t_initialize;
+  f_directory_status_t data_array[] = { data };
+  f_directory_statuss_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_directory_statuss_t datass_array[] = { datas };
+
+  {
+    will_return(__wrap_f_string_dynamic_adjust, true);
+    will_return(__wrap_f_string_dynamic_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_statusss_destroy_callback(0, 1, (void *) datass_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_dynamic_adjust, false);
+    will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_directory_statusss_destroy_callback(0, 1, (void *) datass_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_directory_statusss_destroy_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_directory_statusss_t datass = f_directory_statusss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_adjust(length, sizeof(f_directory_statuss_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_adjust(1, sizeof(f_directory_status_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+
+    status = f_string_dynamic_adjust(1, &datass.array[0].array[0].path);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_directory_statusss_destroy_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_directory/tests/unit/c/test-directory-statusss_destroy_callback.h b/level_0/f_directory/tests/unit/c/test-directory-statusss_destroy_callback.h
new file mode 100644 (file)
index 0000000..38ef90d
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Directory
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_directory__statusss_destroy_callback
+#define _TEST__F_directory__statusss_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_directory_statusss_destroy_callback()
+ */
+extern void test__f_directory_statusss_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_directory_statusss_destroy_callback()
+ */
+extern void test__f_directory_statusss_destroy_callback__works(void **state);
+
+#endif // _TEST__F_directory__statusss_destroy_callback
index f0aaaa9676626ec4f7931e91c756af473901e9e4..7b992e989967894e16c3a18f114f9b1da1fc17e8 100644 (file)
@@ -70,21 +70,33 @@ int main(void) {
 
     cmocka_unit_test(test__f_directory_listings_destroy_callback__fails),
     cmocka_unit_test(test__f_directory_listings_delete_callback__fails),
+    cmocka_unit_test(test__f_directory_listingss_destroy_callback__fails),
+    cmocka_unit_test(test__f_directory_listingss_delete_callback__fails),
 
     cmocka_unit_test(test__f_directory_listings_destroy_callback__works),
     cmocka_unit_test(test__f_directory_listings_delete_callback__works),
+    cmocka_unit_test(test__f_directory_listingss_destroy_callback__works),
+    cmocka_unit_test(test__f_directory_listingss_delete_callback__works),
 
     cmocka_unit_test(test__f_directory_recurse_dos_destroy_callback__fails),
     cmocka_unit_test(test__f_directory_recurse_dos_delete_callback__fails),
+    cmocka_unit_test(test__f_directory_recurse_doss_destroy_callback__fails),
+    cmocka_unit_test(test__f_directory_recurse_doss_delete_callback__fails),
 
     cmocka_unit_test(test__f_directory_recurse_dos_destroy_callback__works),
     cmocka_unit_test(test__f_directory_recurse_dos_delete_callback__works),
+    cmocka_unit_test(test__f_directory_recurse_doss_destroy_callback__works),
+    cmocka_unit_test(test__f_directory_recurse_doss_delete_callback__works),
 
     cmocka_unit_test(test__f_directory_statuss_destroy_callback__fails),
     cmocka_unit_test(test__f_directory_statuss_delete_callback__fails),
+    cmocka_unit_test(test__f_directory_statusss_destroy_callback__fails),
+    cmocka_unit_test(test__f_directory_statusss_delete_callback__fails),
 
     cmocka_unit_test(test__f_directory_statuss_destroy_callback__works),
     cmocka_unit_test(test__f_directory_statuss_delete_callback__works),
+    cmocka_unit_test(test__f_directory_statusss_destroy_callback__works),
+    cmocka_unit_test(test__f_directory_statusss_delete_callback__works),
 
     cmocka_unit_test(test__f_directory_touch__fails),
     cmocka_unit_test(test__f_directory_touch__returns_data_not),
@@ -106,10 +118,21 @@ int main(void) {
       cmocka_unit_test(test__f_directory_open_at__parameter_checking),
       cmocka_unit_test(test__f_directory_remove__parameter_checking),
       cmocka_unit_test(test__f_directory_remove_custom__parameter_checking),
-      // f_directory_statuss_destroy_callback() doesn't use parameter checking.
-      // f_directory_statuss_delete_callback() doesn't use parameter checking.
       // f_directory_touch() doesn't use parameter checking.
       // f_directory_touch_at() doesn't use parameter checking.
+
+      // f_directory_listings_destroy_callback() doesn't use parameter checking.
+      // f_directory_listings_delete_callback() doesn't use parameter checking.
+      // f_directory_listingss_destroy_callback() doesn't use parameter checking.
+      // f_directory_listingss_delete_callback() doesn't use parameter checking.
+      // f_directory_recurse_dos_destroy_callback() doesn't use parameter checking.
+      // f_directory_recurse_dos_delete_callback() doesn't use parameter checking.
+      // f_directory_recurse_doss_destroy_callback() doesn't use parameter checking.
+      // f_directory_recurse_doss_delete_callback() doesn't use parameter checking.
+      // f_directory_statuss_destroy_callback() doesn't use parameter checking.
+      // f_directory_statuss_delete_callback() doesn't use parameter checking.
+      // f_directory_statusss_destroy_callback() doesn't use parameter checking.
+      // f_directory_statusss_delete_callback() doesn't use parameter checking.
     #endif // _di_level_0_parameter_checking_
   };
 
index 196169f1767cafd9939ddf652d1ec6542c711787..6bedc799572d00f8f2dc59c606308b70be146beb 100644 (file)
 #include "test-directory-remove_custom.h"
 #include "test-directory-listings_destroy_callback.h"
 #include "test-directory-listings_delete_callback.h"
+#include "test-directory-listingss_destroy_callback.h"
+#include "test-directory-listingss_delete_callback.h"
 #include "test-directory-recurse_dos_destroy_callback.h"
 #include "test-directory-recurse_dos_delete_callback.h"
+#include "test-directory-recurse_doss_destroy_callback.h"
+#include "test-directory-recurse_doss_delete_callback.h"
 #include "test-directory-statuss_destroy_callback.h"
 #include "test-directory-statuss_delete_callback.h"
+#include "test-directory-statusss_destroy_callback.h"
+#include "test-directory-statusss_delete_callback.h"
 #include "test-directory-touch.h"
 #include "test-directory-touch_at.h"
 
index a1f397d15b650332f99220175d25ac7caab0b51d..e699ae0494f48a74690b5eab775621d04bc33884 100644 (file)
@@ -75,7 +75,7 @@ extern "C" {
  *   }
  *
  * Properties:
- *   - array: The array of object, their associated content, and their associated parent.
+ *   - array: The array of fss_items.
  *   - size:  Total amount of allocated space.
  *   - used:  Total number of allocated spaces used.
  */
@@ -94,6 +94,28 @@ extern "C" {
 #endif // _di_f_fss_items_t_
 
 /**
+ * This holds an array of an array of fss_items.
+ *
+ * Properties:
+ *   - array: The array of an array of fss_items.
+ *   - size:  Total amount of allocated space.
+ *   - used:  Total number of allocated spaces used.
+ */
+#ifndef _di_f_fss_itemss_t_
+  typedef struct {
+    f_fss_items_t *array;
+
+    f_number_unsigned_t size;
+    f_number_unsigned_t used;
+  } f_fss_itemss_t;
+
+  #define f_fss_itemss_t_initialize { 0, 0, 0 }
+
+  #define macro_f_fss_itemss_t_initialize_1(array, size, used) { array, size, used }
+  #define macro_f_fss_itemss_t_initialize_2(array, length)     { array, length, length }
+#endif // _di_f_fss_itemss_t_
+
+/**
  * Delete an item.
  *
  * @param item
index 66cd709d0cea792114a25f4486a4437704ac38d2..957b6ecc9e6a884d0d938c157330abc5e2bbbe76 100644 (file)
@@ -73,6 +73,30 @@ extern "C" {
 #endif // _di_f_fss_nameds_t_
 
 /**
+ * This holds an array of an array of f_fss_nameds_t.
+ *
+ * Properties:
+ *   - array: An array an array of of f_fss_nameds_t.
+ *   - size:  Total amount of allocated space.
+ *   - used:  Total number of allocated spaces used.
+ */
+#ifndef _di_f_fss_namedss_t_
+  typedef struct {
+    f_fss_nameds_t *array;
+
+    f_number_unsigned_t size;
+    f_number_unsigned_t used;
+  } f_fss_namedss_t;
+
+  #define f_fss_namedss_t_initialize { 0, 0, 0 }
+
+  #define macro_f_fss_namedss_t_initialize_1(array, size, used) { array, size, used }
+  #define macro_f_fss_namedss_t_initialize_2(array, length) { array, length, length }
+
+  #define macro_f_fss_namedss_t_clear(nameds) macro_f_memory_structures_clear(nameds)
+#endif // _di_f_fss_namedss_t_
+
+/**
  * Delete a named.
  *
  * @param named
index 50b0ef6255b6a5f332e02d390cc50e26f64473e1..cbb771588391c397a2610e077b4305b2062b8a4d 100644 (file)
@@ -90,6 +90,11 @@ extern "C" {
             if (F_status_is_error(status)) return status;
           }
         } // for
+
+        if (array[i].size) {
+          status = f_memory_array_resize(0, sizeof(f_fss_items_t), (void **) &array[i].depth, &array[i].used, &array[i].size);
+          if (F_status_is_error(status)) return status;
+        }
       } // for
     }
 
@@ -125,6 +130,11 @@ extern "C" {
             if (F_status_is_error(status)) return status;
           }
         } // for
+
+        if (array[i].size) {
+          status = f_memory_array_adjust(0, sizeof(f_fss_items_t), (void **) &array[i].depth, &array[i].used, &array[i].size);
+          if (F_status_is_error(status)) return status;
+        }
       } // for
     }
 
@@ -159,6 +169,11 @@ extern "C" {
               if (F_status_is_error(status)) return status;
             }
           } // for
+
+          if (array[i].array[j].size) {
+            status = f_memory_array_resize(0, sizeof(f_fss_items_t), (void **) &array[i].array[j].depth, &array[i].array[j].used, &array[i].array[j].size);
+            if (F_status_is_error(status)) return status;
+          }
         } // for
 
         if (array[i].size) {
@@ -203,6 +218,11 @@ extern "C" {
               if (F_status_is_error(status)) return status;
             }
           } // for
+
+          if (array[i].array[j].size) {
+            status = f_memory_array_adjust(0, sizeof(f_fss_items_t), (void **) &array[i].array[j].depth, &array[i].array[j].used, &array[i].array[j].size);
+            if (F_status_is_error(status)) return status;
+          }
         } // for
 
         if (array[i].size) {
index 1e5cd0e788e24867f85aaa6248c30708d2283cee..449944f688084ec0257b9cddcf0fad32a979dbfc 100644 (file)
@@ -69,6 +69,30 @@ extern "C" {
 #endif // _di_f_fss_nests_t_
 
 /**
+ * This holds an array of an array of f_fss_nests_t.
+ *
+ * Properties:
+ *   - array: An array of an array of f_fss_nests_t.
+ *   - size:  Total amount of allocated space.
+ *   - used:  Total number of allocated spaces used.
+ */
+#ifndef _di_f_fss_nestss_t_
+  typedef struct {
+    f_fss_nests_t *array;
+
+    f_number_unsigned_t size;
+    f_number_unsigned_t used;
+  } f_fss_nestss_t;
+
+  #define f_fss_nestss_t_initialize { 0, 0, 0 }
+
+  #define macro_f_fss_nestss_t_initialize_1(array, size, used) { array, size, used }
+  #define macro_f_fss_nestss_t_initialize_2(array, length)     { array, length, length }
+
+  #define macro_f_fss_nestss_t_clear(nests) macro_f_memory_structures_clear(nests)
+#endif // _di_f_fss_nestss_t_
+
+/**
  * Delete a nest.
  *
  * @param nest
index 44af1f79bd0d4d04248d44161a0a6af4348455e2..fcd868960aa0e65fcea4e4d8bc383805b6a23d50 100644 (file)
@@ -66,6 +66,30 @@ extern "C" {
 #endif // _di_f_fss_sets_t_
 
 /**
+ * This holds an array of an array of f_fss_sets_t.
+ *
+ * Properties:
+ *   - array: An array of an array of f_fss_sets_t.
+ *   - size:  Total amount of allocated space.
+ *   - used:  Total number of allocated spaces used.
+ */
+#ifndef _di_f_fss_setss_t_
+  typedef struct {
+    f_fss_sets_t *array;
+
+    f_number_unsigned_t size;
+    f_number_unsigned_t used;
+  } f_fss_setss_t;
+
+  #define f_fss_setss_t_initialize { 0, 0, 0 }
+
+  #define macro_f_fss_setss_t_initialize_1(array, size, used) { array, size, used }
+  #define macro_f_fss_setss_t_initialize_2(array, length) { array, length, length }
+
+  #define macro_f_fss_setss_t_clear(sets) macro_f_memory_structures_clear(sets)
+#endif // _di_f_fss_setss_t_
+
+/**
  * Delete a set.
  *
  * @param set
index bc22eddc3a99a9f6c7fc24010618c8b35a914bde..2ba808fc3ff39203149ca1f14be562062dd60e95 100644 (file)
@@ -73,6 +73,30 @@ extern "C" {
 #endif // _di_f_fss_set_quotes_t_
 
 /**
+ * This holds an array of an array of f_fss_set_quotes_t.
+ *
+ * Properties:
+ *   - array: An array of an array of f_fss_set_quotes_t.
+ *   - size:  Total amount of allocated space.
+ *   - used:  Total number of allocated spaces used.
+ */
+#ifndef _di_f_fss_set_quotess_t_
+  typedef struct {
+    f_fss_set_quotes_t *array;
+
+    f_number_unsigned_t size;
+    f_number_unsigned_t used;
+  } f_fss_set_quotess_t;
+
+  #define f_fss_set_quotess_t_initialize { 0, 0, 0 }
+
+  #define macro_f_fss_set_quotess_t_initialize_1(array, size, used) { array, size, used }
+  #define macro_f_fss_set_quotess_t_initialize_2(array, length)     { array, length, length }
+
+  #define macro_f_fss_set_quotess_t_clear(set_quotes) macro_f_memory_structures_clear(set_quotes)
+#endif // _di_f_fss_set_quotess_t_
+
+/**
  * Delete a quote set.
  *
  * @param set_quote
@@ -83,15 +107,15 @@ extern "C" {
  *
  *   F_parameter (with error bit) if a parameter is invalid.
  *
+ *   Errors (with error bit) from: f_memory_array_resize().
+ *   Errors (with error bit) from: f_memory_arrays_resize().
  *   Errors (with error bit) from: f_string_ranges_resize().
  *   Errors (with error bit) from: f_string_rangess_resize().
- *   Errors (with error bit) from: f_uint8s_resize().
- *   Errors (with error bit) from: f_uint8ss_resize().
  *
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
  * @see f_string_ranges_resize()
  * @see f_string_rangess_resize()
- * @see f_uint8s_resize()
- * @see f_uint8ss_resize()
  */
 #ifndef _di_f_fss_set_quote_delete_
   extern f_status_t f_fss_set_quote_delete(f_fss_set_quote_t * const set_quote);
@@ -108,15 +132,15 @@ extern "C" {
  *
  *   F_parameter (with error bit) if a parameter is invalid.
  *
+ *   Errors (with error bit) from: f_memory_array_adjust().
+ *   Errors (with error bit) from: f_memory_arrays_adjust().
  *   Errors (with error bit) from: f_string_ranges_adjust().
  *   Errors (with error bit) from: f_string_rangess_adjust().
- *   Errors (with error bit) from: f_uint8s_adjust().
- *   Errors (with error bit) from: f_uint8ss_adjust().
  *
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
  * @see f_string_ranges_adjust()
  * @see f_string_rangess_adjust()
- * @see f_uint8s_adjust()
- * @see f_uint8ss_adjust()
  */
 #ifndef _di_f_fss_set_quote_destroy_
   extern f_status_t f_fss_set_quote_destroy(f_fss_set_quote_t * const set_quote);
@@ -142,16 +166,15 @@ extern "C" {
  *
  *   F_parameter (with error bit) if a parameter is invalid.
  *
+ *   Errors (with error bit) from: f_memory_array_resize().
+ *   Errors (with error bit) from: f_memory_arrays_resize().
  *   Errors (with error bit) from: f_string_ranges_resize().
  *   Errors (with error bit) from: f_string_rangess_resize().
  *
- *   Errors (with error bit) from: f_uint8s_resize().
- *   Errors (with error bit) from: f_uint8ss_resize().
- *
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
  * @see f_string_ranges_resize()
  * @see f_string_rangess_resize()
- * @see f_uint8s_resize()
- * @see f_uint8ss_resize()
  */
 #ifndef _di_f_fss_set_quotes_delete_callback_
   extern f_status_t f_fss_set_quotes_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
@@ -177,16 +200,15 @@ extern "C" {
  *
  *   F_parameter (with error bit) if a parameter is invalid.
  *
+ *   Errors (with error bit) from: f_memory_array_adjust().
+ *   Errors (with error bit) from: f_memory_arrays_adjust().
  *   Errors (with error bit) from: f_string_ranges_adjust().
  *   Errors (with error bit) from: f_string_rangess_adjust().
  *
- *   Errors (with error bit) from: f_uint8s_adjust().
- *   Errors (with error bit) from: f_uint8ss_adjust().
- *
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
  * @see f_string_ranges_adjust()
  * @see f_string_rangess_adjust()
- * @see f_uint8s_adjust()
- * @see f_uint8ss_adjust()
  */
 #ifndef _di_f_fss_set_quotes_destroy_callback_
   extern f_status_t f_fss_set_quotes_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
@@ -212,16 +234,15 @@ extern "C" {
  *
  *   F_parameter (with error bit) if a parameter is invalid.
  *
+ *   Errors (with error bit) from: f_memory_array_resize().
+ *   Errors (with error bit) from: f_memory_arrays_resize().
  *   Errors (with error bit) from: f_string_ranges_resize().
  *   Errors (with error bit) from: f_string_rangess_resize().
  *
- *   Errors (with error bit) from: f_uint8s_resize().
- *   Errors (with error bit) from: f_uint8ss_resize().
- *
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
  * @see f_string_ranges_resize()
  * @see f_string_rangess_resize()
- * @see f_uint8s_resize()
- * @see f_uint8ss_resize()
  */
 #ifndef _di_f_fss_set_quotess_delete_callback_
   extern f_status_t f_fss_set_quotess_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
@@ -247,16 +268,15 @@ extern "C" {
  *
  *   F_parameter (with error bit) if a parameter is invalid.
  *
+ *   Errors (with error bit) from: f_memory_array_adjust().
+ *   Errors (with error bit) from: f_memory_arrays_adjust().
  *   Errors (with error bit) from: f_string_ranges_adjust().
  *   Errors (with error bit) from: f_string_rangess_adjust().
  *
- *   Errors (with error bit) from: f_uint8s_adjust().
- *   Errors (with error bit) from: f_uint8ss_adjust().
- *
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
  * @see f_string_ranges_adjust()
  * @see f_string_rangess_adjust()
- * @see f_uint8s_adjust()
- * @see f_uint8ss_adjust()
  */
 #ifndef _di_f_fss_set_quotess_destroy_callback_
   extern f_status_t f_fss_set_quotess_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
index 0d016b34d2374e8d7f856f856501827c601108a3..52bbdfb15e1f766ebb7b7ad41a5d8ff86c42b615 100644 (file)
@@ -165,7 +165,7 @@ extern "C" {
         } // for
 
         if (array[i].size) {
-          status = f_memory_array_resize(0, sizeof(f_fss_simple_packet_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+          status = f_memory_array_adjust(0, sizeof(f_fss_simple_packet_t), (void **) &array[i].array, &array[i].used, &array[i].size);
           if (F_status_is_error(status)) return status;
         }
       } // for
index 0d25a4b427871640d37d487e618b02bce3474ebe..f9aa0624c2ed252f26f07793ed74e8419a4a4e8f 100644 (file)
@@ -169,10 +169,10 @@ extern "C" {
 #endif // _di_f_fss_simple_packet_ranges_t_
 
 /**
- * This holds an array of f_fss_simple_packet_ranges_t.
+ * This holds an array of an array of f_fss_simple_packet_range_t.
  *
  * Properties:
- *   - array: An array of f_fss_simple_packet_ranges_t.
+ *   - array: An array of an array of f_fss_simple_packet_range_t.
  *   - size:  Total amount of allocated space.
  *   - used:  Total number of allocated spaces used.
  */
index d97f4defd931c7333ab8ae56b7a618512728a59e..eb8d51a3488b8f651ae2c0b79228941171fda1f9 100644 (file)
@@ -61,3 +61,13 @@ flags-coverage --coverage -fprofile-abs-path -fprofile-dir=build/coverage/
 flags_library -fPIC
 
 # Inject mocks.
+flags -Wl,--wrap=f_memory_array_adjust
+flags -Wl,--wrap=f_memory_array_resize
+flags -Wl,--wrap=f_memory_arrays_adjust
+flags -Wl,--wrap=f_memory_arrays_resize
+flags -Wl,--wrap=f_string_dynamic_adjust
+flags -Wl,--wrap=f_string_dynamic_resize
+flags -Wl,--wrap=f_string_ranges_adjust
+flags -Wl,--wrap=f_string_ranges_resize
+flags -Wl,--wrap=f_string_rangess_adjust
+flags -Wl,--wrap=f_string_rangess_resize
index 2ebed50d556408d7d1e0bb53c70d441bb81b5c9e..dd57ac0c8894dd3acc6c6929fb3784c6eba7ca6d 100644 (file)
@@ -27,16 +27,12 @@ build_libraries-individual -lf_memory -lf_string -lf_type_array -lf_utf -lf_fss
 
 build_sources_program test-fss-apply_delimit.c test-fss-apply_delimit_range.c test-fss-count_lines.c test-fss-count_lines_range.c test-fss-fail_utf.c test-fss-fail_utf_to_false.c test-fss-is_combining.c test-fss-is_graph.c test-fss-is_space.c test-fss-is_zero_width.c test-fss-seek_to_eol.c test-fss-skip_past_delimit.c test-fss-skip_past_space.c
 
-#build_sources_program test-fss-items_destroy_callback.c test-fss-items_delete_callback.c
-#build_sources_program test-fss-named_destroy_callback.c test-fss-named_delete_callback.c
-#build_sources_program test-fss-nameds_destroy_callback.c test-fss-nameds_delete_callback.c
-#build_sources_program test-fss-nest_destroy_callback.c test-fss-nest_delete_callback.c
-#build_sources_program test-fss-nests_destroy_callback.c test-fss-nests_delete_callback.c
-#build_sources_program test-fss-set_destroy_callback.c test-fss-set_delete_callback.c
-#build_sources_program test-fss-set_quote_destroy_callback.c test-fss-set_quote_delete_callback.c
-#build_sources_program test-fss-set_quotes_destroy_callback.c test-fss-set_quotes_delete_callback.c
-#build_sources_program test-fss-sets_destroy_callback.c test-fss-sets_delete_callback.c
-#build_sources_program test-fss-simple_packet_ranges_destroy_callback.c test-fss-simple_packet_ranges_delete_callback.c
+build_sources_program test-fss-items_destroy_callback.c test-fss-items_delete_callback.c test-fss-itemss_destroy_callback.c test-fss-itemss_delete_callback.c
+build_sources_program test-fss-nameds_destroy_callback.c test-fss-nameds_delete_callback.c test-fss-namedss_destroy_callback.c test-fss-namedss_delete_callback.c
+build_sources_program test-fss-nests_destroy_callback.c test-fss-nests_delete_callback.c test-fss-nestss_destroy_callback.c test-fss-nestss_delete_callback.c
+build_sources_program test-fss-sets_destroy_callback.c test-fss-sets_delete_callback.c test-fss-setss_destroy_callback.c test-fss-setss_delete_callback.c
+build_sources_program test-fss-set_quotes_destroy_callback.c test-fss-set_quotes_delete_callback.c test-fss-set_quotess_destroy_callback.c test-fss-set_quotess_delete_callback.c
+build_sources_program test-fss-simple_packets_destroy_callback.c test-fss-simple_packets_delete_callback.c test-fss-simple_packetss_destroy_callback.c test-fss-simple_packetss_delete_callback.c
 
 build_sources_program test-fss.c
 
index f89f2848db615d12ead8dca64dd932184502d403..8ff371860e21903d184a1492ac7ff8efa6130590 100644 (file)
@@ -18,7 +18,7 @@ settings:
   #define CMOCKA_XML_FILE ./out.xml
 
 main:
-  build settings individual test
+  build settings-mocks individual test
   build settings-tests individual test
 
   operate build_path
index bbdd90810036507dd4414068b41b19214c2476ef..1cc41d64831d80124d7bfc37b523e269853e42cb 100644 (file)
 extern "C" {
 #endif
 
-/*int __wrap_getgrgid_r(uid_t uid, struct group *grp, char *buf, size_t buflen, struct group **result) {
+int mock_unwrap = 0;
+int mock_unwrap_f_memory = 1;
+
+f_status_t __wrap_f_memory_array_adjust(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size) {
+
+  if (mock_unwrap_f_memory) {
+    return __real_f_memory_array_adjust(length, width, array, used, size);
+  }
+
+  if (!array || !used || !size) return F_status_set_error(F_parameter_not);
+
+  const bool failure = mock_type(bool);
+
+  if (failure) return mock_type(f_status_t);
+
+  *size = length;
+
+  return mock_type(f_status_t);
+}
+
+f_status_t __wrap_f_memory_array_resize(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size) {
+
+  if (mock_unwrap_f_memory) {
+    return __real_f_memory_array_resize(length, width, array, used, size);
+  }
+
+  if (!array || !used || !size) return F_status_set_error(F_parameter_not);
+
+  const bool failure = mock_type(bool);
+
+  if (failure) return mock_type(f_status_t);
+
+  *size = length;
+
+  return mock_type(f_status_t);
+}
+
+f_status_t __wrap_f_memory_arrays_adjust(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size, f_status_t (*callback)(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array)) {
+
+  if (mock_unwrap_f_memory) {
+    return __real_f_memory_arrays_resize(length, width, array, used, size, callback);
+  }
+
+  if (!array || !used || !size || !callback) return F_status_set_error(F_parameter_not);
 
   const bool failure = mock_type(bool);
 
-  if (failure) {
-    errno = mock_type(int);
+  if (failure) return mock_type(f_status_t);
+
+  *size = length;
+
+  return mock_type(f_status_t);
+}
 
-    return 1;
+f_status_t __wrap_f_memory_arrays_resize(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size, f_status_t (*callback)(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array)) {
+
+  if (mock_unwrap_f_memory) {
+    return __real_f_memory_arrays_resize(length, width, array, used, size, callback);
   }
 
-  *grp = *mock_type(struct group *);
-  *result = mock_type(struct group *);
+  if (!array || !used || !size || !callback) return F_status_set_error(F_parameter_not);
+
+  const bool failure = mock_type(bool);
+
+  if (failure) return mock_type(f_status_t);
+
+  *size = length;
+
+  return mock_type(f_status_t);
+}
+
+f_status_t __wrap_f_string_dynamic_adjust(const f_number_unsigned_t length, f_string_dynamic_t * const structure) {
+
+  if (mock_unwrap) {
+    return __real_f_string_dynamic_adjust(length, structure);
+  }
+
+  if (!structure) return F_status_set_error(F_parameter_not);
+
+  const bool failure = mock_type(bool);
+
+  if (failure) return mock_type(f_status_t);
+
+  structure->size = length;
+
+  return mock_type(f_status_t);
+}
+
+f_status_t __wrap_f_string_dynamic_resize(const f_number_unsigned_t length, f_string_dynamic_t * const structure) {
+
+  if (mock_unwrap) {
+    return __real_f_string_dynamic_resize(length, structure);
+  }
+
+  if (!structure) return F_status_set_error(F_parameter_not);
+
+  const bool failure = mock_type(bool);
+
+  if (failure) return mock_type(f_status_t);
+
+  structure->size = length;
+
+  return mock_type(f_status_t);
+}
+
+f_status_t __wrap_f_string_ranges_adjust(const f_number_unsigned_t length, f_string_ranges_t * const structure) {
+
+  if (mock_unwrap) {
+    return __real_f_string_ranges_adjust(length, structure);
+  }
+
+  if (!structure) return F_status_set_error(F_parameter_not);
+
+  const bool failure = mock_type(bool);
+
+  if (failure) return mock_type(f_status_t);
+
+  structure->size = length;
+
+  return mock_type(f_status_t);
+}
+
+f_status_t __wrap_f_string_ranges_resize(const f_number_unsigned_t length, f_string_ranges_t * const structure) {
+
+  if (mock_unwrap) {
+    return __real_f_string_ranges_resize(length, structure);
+  }
+
+  if (!structure) return F_status_set_error(F_parameter_not);
+
+  const bool failure = mock_type(bool);
+
+  if (failure) return mock_type(f_status_t);
+
+  structure->size = length;
+
+  return mock_type(f_status_t);
+}
+
+f_status_t __wrap_f_string_rangess_adjust(const f_number_unsigned_t length, f_string_ranges_t * const structure) {
+
+  if (mock_unwrap) {
+    return __real_f_string_rangess_adjust(length, structure);
+  }
+
+  if (!structure) return F_status_set_error(F_parameter_not);
+
+  const bool failure = mock_type(bool);
+
+  if (failure) return mock_type(f_status_t);
+
+  structure->size = length;
+
+  return mock_type(f_status_t);
+}
+
+f_status_t __wrap_f_string_rangess_resize(const f_number_unsigned_t length, f_string_ranges_t * const structure) {
+
+  if (mock_unwrap) {
+    return __real_f_string_rangess_resize(length, structure);
+  }
+
+  if (!structure) return F_status_set_error(F_parameter_not);
+
+  const bool failure = mock_type(bool);
+
+  if (failure) return mock_type(f_status_t);
+
+  structure->size = length;
 
-  return 0;
-}*/
+  return mock_type(f_status_t);
+}
 
 #ifdef __cplusplus
 } // extern "C"
index 53e02a52a17d9dc6b37e12e15118a6085a5aaffd..ade2dcd4a2f6ef261fdddc6a3a4988467dc5db37 100644 (file)
@@ -28,6 +28,33 @@ extern "C" {
 
 const static int mock_errno_generic = 32767;
 
+extern int mock_unwrap;
+extern int mock_unwrap_f_memory;
+
+extern f_status_t __real_f_memory_array_adjust(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size);
+extern f_status_t __real_f_memory_array_resize(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size);
+extern f_status_t __real_f_memory_arrays_adjust(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size, f_status_t (*callback)(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array));
+extern f_status_t __real_f_memory_arrays_resize(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size, f_status_t (*callback)(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array));
+
+extern f_status_t __real_f_string_dynamic_adjust(const f_number_unsigned_t length, f_string_dynamic_t * const structure);
+extern f_status_t __real_f_string_dynamic_resize(const f_number_unsigned_t length, f_string_dynamic_t * const structure);
+extern f_status_t __real_f_string_ranges_adjust(const f_number_unsigned_t length, f_string_ranges_t * const structure);
+extern f_status_t __real_f_string_ranges_resize(const f_number_unsigned_t length, f_string_ranges_t * const structure);
+extern f_status_t __real_f_string_rangess_adjust(const f_number_unsigned_t length, f_string_ranges_t * const structure);
+extern f_status_t __real_f_string_rangess_resize(const f_number_unsigned_t length, f_string_ranges_t * const structure);
+
+extern f_status_t __wrap_f_memory_array_adjust(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size);
+extern f_status_t __wrap_f_memory_array_resize(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size);
+extern f_status_t __wrap_f_memory_arrays_adjust(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size, f_status_t (*callback)(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array));
+extern f_status_t __wrap_f_memory_arrays_resize(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size, f_status_t (*callback)(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array));
+
+extern f_status_t __wrap_f_string_dynamic_adjust(const f_number_unsigned_t length, f_string_dynamic_t * const structure);
+extern f_status_t __wrap_f_string_dynamic_resize(const f_number_unsigned_t length, f_string_dynamic_t * const structure);
+extern f_status_t __wrap_f_string_ranges_adjust(const f_number_unsigned_t length, f_string_ranges_t * const structure);
+extern f_status_t __wrap_f_string_ranges_resize(const f_number_unsigned_t length, f_string_ranges_t * const structure);
+extern f_status_t __wrap_f_string_rangess_adjust(const f_number_unsigned_t length, f_string_ranges_t * const structure);
+extern f_status_t __wrap_f_string_rangess_resize(const f_number_unsigned_t length, f_string_ranges_t * const structure);
+
 //extern long __wrap_sysconf(int name);
 
 #ifdef __cplusplus
index 7374955fd69a809e8804857b88f6422a5fa931b6..a025dc1f5e7161fc12b66f65d387dcf0b977fa55 100644 (file)
@@ -1,5 +1,5 @@
-#include "test-directory.h"
-#include "test-directory-listings_delete_callback.h"
+#include "test-fss.h"
+#include "test-fss-items_delete_callback.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -8,164 +8,18 @@ extern "C" {
 void test__f_fss_items_delete_callback__fails(void **state) {
 
   mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
 
   f_fss_item_t data = f_fss_item_t_initialize;
   f_fss_item_t data_array[] = { data };
   f_fss_items_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_fss_items_t datass_array[] = { datas };
+  f_fss_items_t datas_array[] = { datas };
 
   {
-    will_return(__wrap_f_string_dynamics_resize, true);
-    will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
+    will_return(__wrap_f_string_ranges_resize, true);
+    will_return(__wrap_f_string_ranges_resize, F_status_set_error(F_failure));
 
-    const f_status_t status = f_fss_items_delete_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-
-  {
-    will_return(__wrap_f_string_dynamics_resize, false);
-    will_return(__wrap_f_string_dynamics_resize, F_none);
-
-    will_return(__wrap_f_string_dynamics_resize, true);
-    will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
-
-    const f_status_t status = f_fss_items_delete_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-
-  {
-    will_return(__wrap_f_string_dynamics_resize, false);
-    will_return(__wrap_f_string_dynamics_resize, F_none);
-
-    will_return(__wrap_f_string_dynamics_resize, false);
-    will_return(__wrap_f_string_dynamics_resize, F_none);
-
-    will_return(__wrap_f_string_dynamics_resize, true);
-    will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
-
-    const f_status_t status = f_fss_items_delete_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-
-  {
-    will_return(__wrap_f_string_dynamics_resize, false);
-    will_return(__wrap_f_string_dynamics_resize, F_none);
-
-    will_return(__wrap_f_string_dynamics_resize, false);
-    will_return(__wrap_f_string_dynamics_resize, F_none);
-
-    will_return(__wrap_f_string_dynamics_resize, false);
-    will_return(__wrap_f_string_dynamics_resize, F_none);
-
-    will_return(__wrap_f_string_dynamics_resize, true);
-    will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
-
-    const f_status_t status = f_fss_items_delete_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-
-  {
-    will_return(__wrap_f_string_dynamics_resize, false);
-    will_return(__wrap_f_string_dynamics_resize, F_none);
-
-    will_return(__wrap_f_string_dynamics_resize, false);
-    will_return(__wrap_f_string_dynamics_resize, F_none);
-
-    will_return(__wrap_f_string_dynamics_resize, false);
-    will_return(__wrap_f_string_dynamics_resize, F_none);
-
-    will_return(__wrap_f_string_dynamics_resize, false);
-    will_return(__wrap_f_string_dynamics_resize, F_none);
-
-    will_return(__wrap_f_string_dynamics_resize, true);
-    will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
-
-    const f_status_t status = f_fss_items_delete_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-
-  {
-    will_return(__wrap_f_string_dynamics_resize, false);
-    will_return(__wrap_f_string_dynamics_resize, F_none);
-
-    will_return(__wrap_f_string_dynamics_resize, false);
-    will_return(__wrap_f_string_dynamics_resize, F_none);
-
-    will_return(__wrap_f_string_dynamics_resize, false);
-    will_return(__wrap_f_string_dynamics_resize, F_none);
-
-    will_return(__wrap_f_string_dynamics_resize, false);
-    will_return(__wrap_f_string_dynamics_resize, F_none);
-
-    will_return(__wrap_f_string_dynamics_resize, false);
-    will_return(__wrap_f_string_dynamics_resize, F_none);
-
-    will_return(__wrap_f_string_dynamics_resize, true);
-    will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
-
-    const f_status_t status = f_fss_items_delete_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-
-  {
-    will_return(__wrap_f_string_dynamics_resize, false);
-    will_return(__wrap_f_string_dynamics_resize, F_none);
-
-    will_return(__wrap_f_string_dynamics_resize, false);
-    will_return(__wrap_f_string_dynamics_resize, F_none);
-
-    will_return(__wrap_f_string_dynamics_resize, false);
-    will_return(__wrap_f_string_dynamics_resize, F_none);
-
-    will_return(__wrap_f_string_dynamics_resize, false);
-    will_return(__wrap_f_string_dynamics_resize, F_none);
-
-    will_return(__wrap_f_string_dynamics_resize, false);
-    will_return(__wrap_f_string_dynamics_resize, F_none);
-
-    will_return(__wrap_f_string_dynamics_resize, false);
-    will_return(__wrap_f_string_dynamics_resize, F_none);
-
-    will_return(__wrap_f_string_dynamics_resize, true);
-    will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
-
-    const f_status_t status = f_fss_items_delete_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-
-  {
-    will_return(__wrap_f_string_dynamics_resize, false);
-    will_return(__wrap_f_string_dynamics_resize, F_none);
-
-    will_return(__wrap_f_string_dynamics_resize, false);
-    will_return(__wrap_f_string_dynamics_resize, F_none);
-
-    will_return(__wrap_f_string_dynamics_resize, false);
-    will_return(__wrap_f_string_dynamics_resize, F_none);
-
-    will_return(__wrap_f_string_dynamics_resize, false);
-    will_return(__wrap_f_string_dynamics_resize, F_none);
-
-    will_return(__wrap_f_string_dynamics_resize, false);
-    will_return(__wrap_f_string_dynamics_resize, F_none);
-
-    will_return(__wrap_f_string_dynamics_resize, false);
-    will_return(__wrap_f_string_dynamics_resize, F_none);
-
-    will_return(__wrap_f_string_dynamics_resize, false);
-    will_return(__wrap_f_string_dynamics_resize, F_none);
-
-    will_return(__wrap_f_string_dynamics_resize, true);
-    will_return(__wrap_f_string_dynamics_resize, F_status_set_error(F_failure));
-
-    const f_status_t status = f_fss_items_delete_callback(0, 1, (void *) datass_array);
+    const f_status_t status = f_fss_items_delete_callback(0, 1, (void *) datas_array);
 
     assert_int_equal(status, F_status_set_error(F_failure));
   }
@@ -174,39 +28,19 @@ void test__f_fss_items_delete_callback__fails(void **state) {
 void test__f_fss_items_delete_callback__works(void **state) {
 
   mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
 
   f_fss_item_t data = f_fss_item_t_initialize;
   f_fss_item_t data_array[] = { data };
   f_fss_items_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_fss_items_t datass_array[] = { datas };
+  f_fss_items_t datas_array[] = { datas };
   const f_number_unsigned_t length = 1;
 
   {
-    will_return(__wrap_f_string_dynamics_resize, false);
-    will_return(__wrap_f_string_dynamics_resize, F_none);
-
-    will_return(__wrap_f_string_dynamics_resize, false);
-    will_return(__wrap_f_string_dynamics_resize, F_none);
-
-    will_return(__wrap_f_string_dynamics_resize, false);
-    will_return(__wrap_f_string_dynamics_resize, F_none);
-
-    will_return(__wrap_f_string_dynamics_resize, false);
-    will_return(__wrap_f_string_dynamics_resize, F_none);
-
-    will_return(__wrap_f_string_dynamics_resize, false);
-    will_return(__wrap_f_string_dynamics_resize, F_none);
-
-    will_return(__wrap_f_string_dynamics_resize, false);
-    will_return(__wrap_f_string_dynamics_resize, F_none);
-
-    will_return(__wrap_f_string_dynamics_resize, false);
-    will_return(__wrap_f_string_dynamics_resize, F_none);
-
-    will_return(__wrap_f_string_dynamics_resize, false);
-    will_return(__wrap_f_string_dynamics_resize, F_none);
+    will_return(__wrap_f_string_ranges_resize, false);
+    will_return(__wrap_f_string_ranges_resize, F_none);
 
-    const f_status_t status = f_fss_items_delete_callback(0, length, (void *) datass_array);
+    const f_status_t status = f_fss_items_delete_callback(0, length, (void *) datas_array);
 
     assert_int_equal(status, F_none);
   }
index 19726356b148bd393f24780f0bdc6a23e99c3bf9..29f1a0d5d2659ba74412ba5f45b033e29d8dee66 100644 (file)
@@ -7,8 +7,8 @@
  *
  * Test the array types in the type project.
  */
-#ifndef _TEST__F_fss__listings_delete_callback
-#define _TEST__F_fss__listings_delete_callback
+#ifndef _TEST__F_fss__items_delete_callback
+#define _TEST__F_fss__items_delete_callback
 
 /**
  * Test that the function fails.
@@ -24,4 +24,4 @@ extern void test__f_fss_items_delete_callback__fails(void **state);
  */
 extern void test__f_fss_items_delete_callback__works(void **state);
 
-#endif // _TEST__F_fss__listings_delete_callback
+#endif // _TEST__F_fss__items_delete_callback
index 39d03b9da208ea8ecab9a18117f1dcb5eb67dc44..2bd88287cef5f17a6d9c45c58f4d31b3e715d0bd 100644 (file)
@@ -1,5 +1,5 @@
-#include "test-directory.h"
-#include "test-directory-listings_destroy_callback.h"
+#include "test-fss.h"
+#include "test-fss-items_destroy_callback.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -8,164 +8,18 @@ extern "C" {
 void test__f_fss_items_destroy_callback__fails(void **state) {
 
   mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
 
   f_fss_item_t data = f_fss_item_t_initialize;
   f_fss_item_t data_array[] = { data };
   f_fss_items_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_fss_items_t datass_array[] = { datas };
+  f_fss_items_t datas_array[] = { datas };
 
   {
-    will_return(__wrap_f_string_dynamics_adjust, true);
-    will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
+    will_return(__wrap_f_string_ranges_adjust, true);
+    will_return(__wrap_f_string_ranges_adjust, F_status_set_error(F_failure));
 
-    const f_status_t status = f_fss_items_destroy_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-
-  {
-    will_return(__wrap_f_string_dynamics_adjust, false);
-    will_return(__wrap_f_string_dynamics_adjust, F_none);
-
-    will_return(__wrap_f_string_dynamics_adjust, true);
-    will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
-
-    const f_status_t status = f_fss_items_destroy_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-
-  {
-    will_return(__wrap_f_string_dynamics_adjust, false);
-    will_return(__wrap_f_string_dynamics_adjust, F_none);
-
-    will_return(__wrap_f_string_dynamics_adjust, false);
-    will_return(__wrap_f_string_dynamics_adjust, F_none);
-
-    will_return(__wrap_f_string_dynamics_adjust, true);
-    will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
-
-    const f_status_t status = f_fss_items_destroy_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-
-  {
-    will_return(__wrap_f_string_dynamics_adjust, false);
-    will_return(__wrap_f_string_dynamics_adjust, F_none);
-
-    will_return(__wrap_f_string_dynamics_adjust, false);
-    will_return(__wrap_f_string_dynamics_adjust, F_none);
-
-    will_return(__wrap_f_string_dynamics_adjust, false);
-    will_return(__wrap_f_string_dynamics_adjust, F_none);
-
-    will_return(__wrap_f_string_dynamics_adjust, true);
-    will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
-
-    const f_status_t status = f_fss_items_destroy_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-
-  {
-    will_return(__wrap_f_string_dynamics_adjust, false);
-    will_return(__wrap_f_string_dynamics_adjust, F_none);
-
-    will_return(__wrap_f_string_dynamics_adjust, false);
-    will_return(__wrap_f_string_dynamics_adjust, F_none);
-
-    will_return(__wrap_f_string_dynamics_adjust, false);
-    will_return(__wrap_f_string_dynamics_adjust, F_none);
-
-    will_return(__wrap_f_string_dynamics_adjust, false);
-    will_return(__wrap_f_string_dynamics_adjust, F_none);
-
-    will_return(__wrap_f_string_dynamics_adjust, true);
-    will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
-
-    const f_status_t status = f_fss_items_destroy_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-
-  {
-    will_return(__wrap_f_string_dynamics_adjust, false);
-    will_return(__wrap_f_string_dynamics_adjust, F_none);
-
-    will_return(__wrap_f_string_dynamics_adjust, false);
-    will_return(__wrap_f_string_dynamics_adjust, F_none);
-
-    will_return(__wrap_f_string_dynamics_adjust, false);
-    will_return(__wrap_f_string_dynamics_adjust, F_none);
-
-    will_return(__wrap_f_string_dynamics_adjust, false);
-    will_return(__wrap_f_string_dynamics_adjust, F_none);
-
-    will_return(__wrap_f_string_dynamics_adjust, false);
-    will_return(__wrap_f_string_dynamics_adjust, F_none);
-
-    will_return(__wrap_f_string_dynamics_adjust, true);
-    will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
-
-    const f_status_t status = f_fss_items_destroy_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-
-  {
-    will_return(__wrap_f_string_dynamics_adjust, false);
-    will_return(__wrap_f_string_dynamics_adjust, F_none);
-
-    will_return(__wrap_f_string_dynamics_adjust, false);
-    will_return(__wrap_f_string_dynamics_adjust, F_none);
-
-    will_return(__wrap_f_string_dynamics_adjust, false);
-    will_return(__wrap_f_string_dynamics_adjust, F_none);
-
-    will_return(__wrap_f_string_dynamics_adjust, false);
-    will_return(__wrap_f_string_dynamics_adjust, F_none);
-
-    will_return(__wrap_f_string_dynamics_adjust, false);
-    will_return(__wrap_f_string_dynamics_adjust, F_none);
-
-    will_return(__wrap_f_string_dynamics_adjust, false);
-    will_return(__wrap_f_string_dynamics_adjust, F_none);
-
-    will_return(__wrap_f_string_dynamics_adjust, true);
-    will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
-
-    const f_status_t status = f_fss_items_destroy_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-
-  {
-    will_return(__wrap_f_string_dynamics_adjust, false);
-    will_return(__wrap_f_string_dynamics_adjust, F_none);
-
-    will_return(__wrap_f_string_dynamics_adjust, false);
-    will_return(__wrap_f_string_dynamics_adjust, F_none);
-
-    will_return(__wrap_f_string_dynamics_adjust, false);
-    will_return(__wrap_f_string_dynamics_adjust, F_none);
-
-    will_return(__wrap_f_string_dynamics_adjust, false);
-    will_return(__wrap_f_string_dynamics_adjust, F_none);
-
-    will_return(__wrap_f_string_dynamics_adjust, false);
-    will_return(__wrap_f_string_dynamics_adjust, F_none);
-
-    will_return(__wrap_f_string_dynamics_adjust, false);
-    will_return(__wrap_f_string_dynamics_adjust, F_none);
-
-    will_return(__wrap_f_string_dynamics_adjust, false);
-    will_return(__wrap_f_string_dynamics_adjust, F_none);
-
-    will_return(__wrap_f_string_dynamics_adjust, true);
-    will_return(__wrap_f_string_dynamics_adjust, F_status_set_error(F_failure));
-
-    const f_status_t status = f_fss_items_destroy_callback(0, 1, (void *) datass_array);
+    const f_status_t status = f_fss_items_destroy_callback(0, 1, (void *) datas_array);
 
     assert_int_equal(status, F_status_set_error(F_failure));
   }
@@ -174,39 +28,19 @@ void test__f_fss_items_destroy_callback__fails(void **state) {
 void test__f_fss_items_destroy_callback__works(void **state) {
 
   mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
 
   f_fss_item_t data = f_fss_item_t_initialize;
   f_fss_item_t data_array[] = { data };
   f_fss_items_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_fss_items_t datass_array[] = { datas };
+  f_fss_items_t datas_array[] = { datas };
   const f_number_unsigned_t length = 1;
 
   {
-    will_return(__wrap_f_string_dynamics_adjust, false);
-    will_return(__wrap_f_string_dynamics_adjust, F_none);
-
-    will_return(__wrap_f_string_dynamics_adjust, false);
-    will_return(__wrap_f_string_dynamics_adjust, F_none);
-
-    will_return(__wrap_f_string_dynamics_adjust, false);
-    will_return(__wrap_f_string_dynamics_adjust, F_none);
-
-    will_return(__wrap_f_string_dynamics_adjust, false);
-    will_return(__wrap_f_string_dynamics_adjust, F_none);
-
-    will_return(__wrap_f_string_dynamics_adjust, false);
-    will_return(__wrap_f_string_dynamics_adjust, F_none);
-
-    will_return(__wrap_f_string_dynamics_adjust, false);
-    will_return(__wrap_f_string_dynamics_adjust, F_none);
-
-    will_return(__wrap_f_string_dynamics_adjust, false);
-    will_return(__wrap_f_string_dynamics_adjust, F_none);
-
-    will_return(__wrap_f_string_dynamics_adjust, false);
-    will_return(__wrap_f_string_dynamics_adjust, F_none);
+    will_return(__wrap_f_string_ranges_adjust, false);
+    will_return(__wrap_f_string_ranges_adjust, F_none);
 
-    const f_status_t status = f_fss_items_destroy_callback(0, length, (void *) datass_array);
+    const f_status_t status = f_fss_items_destroy_callback(0, length, (void *) datas_array);
 
     assert_int_equal(status, F_none);
   }
index 637dc10ada86581be863653a0eb0d6f5f0d9bc0b..d492d9b54e7e64d726ef00b0876f3c37f0fca7d0 100644 (file)
@@ -7,8 +7,8 @@
  *
  * Test the array types in the type project.
  */
-#ifndef _TEST__F_fss__listings_destroy_callback
-#define _TEST__F_fss__listings_destroy_callback
+#ifndef _TEST__F_fss__items_destroy_callback
+#define _TEST__F_fss__items_destroy_callback
 
 /**
  * Test that the function fails.
@@ -24,4 +24,4 @@ extern void test__f_fss_items_destroy_callback__fails(void **state);
  */
 extern void test__f_fss_items_destroy_callback__works(void **state);
 
-#endif // _TEST__F_fss__listings_destroy_callback
+#endif // _TEST__F_fss__items_destroy_callback
diff --git a/level_0/f_fss/tests/unit/c/test-fss-itemss_delete_callback.c b/level_0/f_fss/tests/unit/c/test-fss-itemss_delete_callback.c
new file mode 100644 (file)
index 0000000..129340b
--- /dev/null
@@ -0,0 +1,72 @@
+#include "test-fss.h"
+#include "test-fss-itemss_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_itemss_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_item_t data = f_fss_item_t_initialize;
+  f_fss_item_t data_array[] = { data };
+  f_fss_items_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_fss_items_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_string_ranges_resize, true);
+    will_return(__wrap_f_string_ranges_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_itemss_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_ranges_resize, false);
+    will_return(__wrap_f_string_ranges_resize, F_none);
+
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_itemss_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_fss_itemss_delete_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_fss_itemss_t datass = f_fss_itemss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_fss_items_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_resize(1, sizeof(f_fss_item_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+
+    status = f_string_ranges_resize(1, &datass.array[0].array[0].content);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_fss_itemss_delete_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_fss/tests/unit/c/test-fss-itemss_delete_callback.h b/level_0/f_fss/tests/unit/c/test-fss-itemss_delete_callback.h
new file mode 100644 (file)
index 0000000..b534c28
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_fss__itemss_delete_callback
+#define _TEST__F_fss__itemss_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_fss_itemss_delete_callback()
+ */
+extern void test__f_fss_itemss_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_itemss_delete_callback()
+ */
+extern void test__f_fss_itemss_delete_callback__works(void **state);
+
+#endif // _TEST__F_fss__itemss_delete_callback
diff --git a/level_0/f_fss/tests/unit/c/test-fss-itemss_destroy_callback.c b/level_0/f_fss/tests/unit/c/test-fss-itemss_destroy_callback.c
new file mode 100644 (file)
index 0000000..969558c
--- /dev/null
@@ -0,0 +1,72 @@
+#include "test-fss.h"
+#include "test-fss-itemss_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_itemss_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_item_t data = f_fss_item_t_initialize;
+  f_fss_item_t data_array[] = { data };
+  f_fss_items_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_fss_items_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_string_ranges_adjust, true);
+    will_return(__wrap_f_string_ranges_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_itemss_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_ranges_adjust, false);
+    will_return(__wrap_f_string_ranges_adjust, F_none);
+
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_itemss_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_fss_itemss_destroy_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_fss_itemss_t datass = f_fss_itemss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_adjust(length, sizeof(f_fss_items_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_adjust(1, sizeof(f_fss_item_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+
+    status = f_string_ranges_adjust(1, &datass.array[0].array[0].content);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_fss_itemss_destroy_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_fss/tests/unit/c/test-fss-itemss_destroy_callback.h b/level_0/f_fss/tests/unit/c/test-fss-itemss_destroy_callback.h
new file mode 100644 (file)
index 0000000..47811c7
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_fss__itemss_destroy_callback
+#define _TEST__F_fss__itemss_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_fss_itemss_destroy_callback()
+ */
+extern void test__f_fss_itemss_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_itemss_destroy_callback()
+ */
+extern void test__f_fss_itemss_destroy_callback__works(void **state);
+
+#endif // _TEST__F_fss__itemss_destroy_callback
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nameds_delete_callback.c b/level_0/f_fss/tests/unit/c/test-fss-nameds_delete_callback.c
new file mode 100644 (file)
index 0000000..64403f2
--- /dev/null
@@ -0,0 +1,84 @@
+#include "test-fss.h"
+#include "test-fss-nameds_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_nameds_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_named_t data = f_fss_named_t_initialize;
+  f_fss_named_t data_array[] = { data };
+  f_fss_nameds_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_fss_nameds_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_string_ranges_resize, true);
+    will_return(__wrap_f_string_ranges_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_nameds_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_ranges_resize, false);
+    will_return(__wrap_f_string_ranges_resize, F_none);
+
+    will_return(__wrap_f_string_rangess_resize, true);
+    will_return(__wrap_f_string_rangess_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_nameds_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_ranges_resize, false);
+    will_return(__wrap_f_string_ranges_resize, F_none);
+
+    will_return(__wrap_f_string_rangess_resize, false);
+    will_return(__wrap_f_string_rangess_resize, F_none);
+
+    will_return(__wrap_f_memory_arrays_resize, true);
+    will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_nameds_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_fss_nameds_delete_callback__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_named_t data = f_fss_named_t_initialize;
+  f_fss_named_t data_array[] = { data };
+  f_fss_nameds_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_fss_nameds_t datas_array[] = { datas };
+  const f_number_unsigned_t length = 1;
+
+  {
+    will_return(__wrap_f_string_ranges_resize, false);
+    will_return(__wrap_f_string_ranges_resize, F_none);
+
+    will_return(__wrap_f_string_rangess_resize, false);
+    will_return(__wrap_f_string_rangess_resize, F_none);
+
+    will_return(__wrap_f_memory_arrays_resize, false);
+    will_return(__wrap_f_memory_arrays_resize, F_none);
+
+    const f_status_t status = f_fss_nameds_delete_callback(0, length, (void *) datas_array);
+
+    assert_int_equal(status, F_none);
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nameds_delete_callback.h b/level_0/f_fss/tests/unit/c/test-fss-nameds_delete_callback.h
new file mode 100644 (file)
index 0000000..4d7eb5a
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_fss__nameds_delete_callback
+#define _TEST__F_fss__nameds_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_fss_nameds_delete_callback()
+ */
+extern void test__f_fss_nameds_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_nameds_delete_callback()
+ */
+extern void test__f_fss_nameds_delete_callback__works(void **state);
+
+#endif // _TEST__F_fss__nameds_delete_callback
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nameds_destroy_callback.c b/level_0/f_fss/tests/unit/c/test-fss-nameds_destroy_callback.c
new file mode 100644 (file)
index 0000000..54e5412
--- /dev/null
@@ -0,0 +1,84 @@
+#include "test-fss.h"
+#include "test-fss-nameds_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_nameds_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_named_t data = f_fss_named_t_initialize;
+  f_fss_named_t data_array[] = { data };
+  f_fss_nameds_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_fss_nameds_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_string_ranges_adjust, true);
+    will_return(__wrap_f_string_ranges_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_nameds_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_ranges_adjust, false);
+    will_return(__wrap_f_string_ranges_adjust, F_none);
+
+    will_return(__wrap_f_string_rangess_adjust, true);
+    will_return(__wrap_f_string_rangess_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_nameds_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_ranges_adjust, false);
+    will_return(__wrap_f_string_ranges_adjust, F_none);
+
+    will_return(__wrap_f_string_rangess_adjust, false);
+    will_return(__wrap_f_string_rangess_adjust, F_none);
+
+    will_return(__wrap_f_memory_arrays_adjust, true);
+    will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_nameds_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_fss_nameds_destroy_callback__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_named_t data = f_fss_named_t_initialize;
+  f_fss_named_t data_array[] = { data };
+  f_fss_nameds_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_fss_nameds_t datas_array[] = { datas };
+  const f_number_unsigned_t length = 1;
+
+  {
+    will_return(__wrap_f_string_ranges_adjust, false);
+    will_return(__wrap_f_string_ranges_adjust, F_none);
+
+    will_return(__wrap_f_string_rangess_adjust, false);
+    will_return(__wrap_f_string_rangess_adjust, F_none);
+
+    will_return(__wrap_f_memory_arrays_adjust, false);
+    will_return(__wrap_f_memory_arrays_adjust, F_none);
+
+    const f_status_t status = f_fss_nameds_destroy_callback(0, length, (void *) datas_array);
+
+    assert_int_equal(status, F_none);
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nameds_destroy_callback.h b/level_0/f_fss/tests/unit/c/test-fss-nameds_destroy_callback.h
new file mode 100644 (file)
index 0000000..52c5c50
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_fss__nameds_destroy_callback
+#define _TEST__F_fss__nameds_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_fss_nameds_destroy_callback()
+ */
+extern void test__f_fss_nameds_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_nameds_destroy_callback()
+ */
+extern void test__f_fss_nameds_destroy_callback__works(void **state);
+
+#endif // _TEST__F_fss__nameds_destroy_callback
diff --git a/level_0/f_fss/tests/unit/c/test-fss-namedss_delete_callback.c b/level_0/f_fss/tests/unit/c/test-fss-namedss_delete_callback.c
new file mode 100644 (file)
index 0000000..0afab83
--- /dev/null
@@ -0,0 +1,96 @@
+#include "test-fss.h"
+#include "test-fss-namedss_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_namedss_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_named_t data = f_fss_named_t_initialize;
+  f_fss_named_t data_array[] = { data };
+  f_fss_nameds_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_fss_nameds_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_string_ranges_resize, true);
+    will_return(__wrap_f_string_ranges_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_namedss_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_ranges_resize, false);
+    will_return(__wrap_f_string_ranges_resize, F_none);
+
+    will_return(__wrap_f_string_rangess_resize, true);
+    will_return(__wrap_f_string_rangess_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_namedss_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_ranges_resize, false);
+    will_return(__wrap_f_string_ranges_resize, F_none);
+
+    will_return(__wrap_f_string_rangess_resize, false);
+    will_return(__wrap_f_string_rangess_resize, F_none);
+
+    will_return(__wrap_f_memory_arrays_resize, true);
+    will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_namedss_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_fss_namedss_delete_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_fss_namedss_t datass = f_fss_namedss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_fss_nameds_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_resize(1, sizeof(f_fss_named_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+
+    status = f_string_ranges_resize(1, &datass.array[0].array[0].objects);
+    assert_int_equal(status, F_none);
+
+    status = f_string_rangess_resize(1, &datass.array[0].array[0].contents);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_arrays_resize(1, sizeof(f_uint8s_t), (void **) &datass.array[0].array[0].quotess.array, &datass.array[0].array[0].quotess.used, &datass.array[0].array[0].quotess.size, &f_uint8ss_delete_callback);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_resize(1, sizeof(uint8_t), (void **) &datass.array[0].array[0].quotess.array[0].array, &datass.array[0].array[0].quotess.array[0].used, &datass.array[0].array[0].quotess.array[0].size);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_fss_namedss_delete_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_fss/tests/unit/c/test-fss-namedss_delete_callback.h b/level_0/f_fss/tests/unit/c/test-fss-namedss_delete_callback.h
new file mode 100644 (file)
index 0000000..ba1e5f6
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_fss__namedss_delete_callback
+#define _TEST__F_fss__namedss_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_fss_namedss_delete_callback()
+ */
+extern void test__f_fss_namedss_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_namedss_delete_callback()
+ */
+extern void test__f_fss_namedss_delete_callback__works(void **state);
+
+#endif // _TEST__F_fss__namedss_delete_callback
diff --git a/level_0/f_fss/tests/unit/c/test-fss-namedss_destroy_callback.c b/level_0/f_fss/tests/unit/c/test-fss-namedss_destroy_callback.c
new file mode 100644 (file)
index 0000000..e6ce2ee
--- /dev/null
@@ -0,0 +1,96 @@
+#include "test-fss.h"
+#include "test-fss-namedss_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_namedss_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_named_t data = f_fss_named_t_initialize;
+  f_fss_named_t data_array[] = { data };
+  f_fss_nameds_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_fss_nameds_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_string_ranges_adjust, true);
+    will_return(__wrap_f_string_ranges_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_namedss_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_ranges_adjust, false);
+    will_return(__wrap_f_string_ranges_adjust, F_none);
+
+    will_return(__wrap_f_string_rangess_adjust, true);
+    will_return(__wrap_f_string_rangess_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_namedss_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_ranges_adjust, false);
+    will_return(__wrap_f_string_ranges_adjust, F_none);
+
+    will_return(__wrap_f_string_rangess_adjust, false);
+    will_return(__wrap_f_string_rangess_adjust, F_none);
+
+    will_return(__wrap_f_memory_arrays_adjust, true);
+    will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_namedss_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_fss_namedss_destroy_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_fss_namedss_t datass = f_fss_namedss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_adjust(length, sizeof(f_fss_nameds_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_adjust(1, sizeof(f_fss_named_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+
+    status = f_string_ranges_adjust(1, &datass.array[0].array[0].objects);
+    assert_int_equal(status, F_none);
+
+    status = f_string_rangess_adjust(1, &datass.array[0].array[0].contents);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_arrays_adjust(1, sizeof(f_uint8s_t), (void **) &datass.array[0].array[0].quotess.array, &datass.array[0].array[0].quotess.used, &datass.array[0].array[0].quotess.size, &f_uint8ss_delete_callback);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_adjust(1, sizeof(uint8_t), (void **) &datass.array[0].array[0].quotess.array[0].array, &datass.array[0].array[0].quotess.array[0].used, &datass.array[0].array[0].quotess.array[0].size);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_fss_namedss_destroy_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_fss/tests/unit/c/test-fss-namedss_destroy_callback.h b/level_0/f_fss/tests/unit/c/test-fss-namedss_destroy_callback.h
new file mode 100644 (file)
index 0000000..bde4720
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_fss__namedss_destroy_callback
+#define _TEST__F_fss__namedss_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_fss_namedss_destroy_callback()
+ */
+extern void test__f_fss_namedss_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_namedss_destroy_callback()
+ */
+extern void test__f_fss_namedss_destroy_callback__works(void **state);
+
+#endif // _TEST__F_fss__namedss_destroy_callback
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nests_delete_callback.c b/level_0/f_fss/tests/unit/c/test-fss-nests_delete_callback.c
new file mode 100644 (file)
index 0000000..659c0f3
--- /dev/null
@@ -0,0 +1,88 @@
+#include "test-fss.h"
+#include "test-fss-nests_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_nests_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_item_t item = f_fss_item_t_initialize;
+  f_fss_item_t item_array[] = { item };
+  f_fss_items_t items = { .array = item_array, .used = 1, .size = 1 };
+  f_fss_items_t items_array[] = { items };
+  f_fss_nest_t data = { .depth = items_array, .used = 1, .size = 1 };
+  f_fss_nest_t data_array[] = { data };
+
+  {
+    will_return(__wrap_f_string_ranges_resize, true);
+    will_return(__wrap_f_string_ranges_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_nests_delete_callback(0, 1, (void *) data_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_ranges_resize, false);
+    will_return(__wrap_f_string_ranges_resize, F_none);
+
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_nests_delete_callback(0, 1, (void *) data_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_ranges_resize, false);
+    will_return(__wrap_f_string_ranges_resize, F_none);
+
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_none);
+
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_nests_delete_callback(0, 1, (void *) data_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_fss_nests_delete_callback__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_item_t item = f_fss_item_t_initialize;
+  f_fss_item_t item_array[] = { item };
+  f_fss_items_t items = { .array = item_array, .used = 1, .size = 1 };
+  f_fss_items_t items_array[] = { items };
+  f_fss_nest_t data = { .depth = items_array, .used = 1, .size = 1 };
+  f_fss_nest_t data_array[] = { data };
+  const f_number_unsigned_t length = 1;
+
+  {
+    will_return(__wrap_f_string_ranges_resize, false);
+    will_return(__wrap_f_string_ranges_resize, F_none);
+
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_none);
+
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_none);
+
+    const f_status_t status = f_fss_nests_delete_callback(0, length, (void *) data_array);
+
+    assert_int_equal(status, F_none);
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nests_delete_callback.h b/level_0/f_fss/tests/unit/c/test-fss-nests_delete_callback.h
new file mode 100644 (file)
index 0000000..8c18256
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_fss__nests_delete_callback
+#define _TEST__F_fss__nests_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_fss_nests_delete_callback()
+ */
+extern void test__f_fss_nests_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_nests_delete_callback()
+ */
+extern void test__f_fss_nests_delete_callback__works(void **state);
+
+#endif // _TEST__F_fss__nests_delete_callback
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nests_destroy_callback.c b/level_0/f_fss/tests/unit/c/test-fss-nests_destroy_callback.c
new file mode 100644 (file)
index 0000000..a8e8a86
--- /dev/null
@@ -0,0 +1,88 @@
+#include "test-fss.h"
+#include "test-fss-nests_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_nests_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_item_t item = f_fss_item_t_initialize;
+  f_fss_item_t item_array[] = { item };
+  f_fss_items_t items = { .array = item_array, .used = 1, .size = 1 };
+  f_fss_items_t items_array[] = { items };
+  f_fss_nest_t data = { .depth = items_array, .used = 1, .size = 1 };
+  f_fss_nest_t data_array[] = { data };
+
+  {
+    will_return(__wrap_f_string_ranges_adjust, true);
+    will_return(__wrap_f_string_ranges_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_nests_destroy_callback(0, 1, (void *) data_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_ranges_adjust, false);
+    will_return(__wrap_f_string_ranges_adjust, F_none);
+
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_nests_destroy_callback(0, 1, (void *) data_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_ranges_adjust, false);
+    will_return(__wrap_f_string_ranges_adjust, F_none);
+
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_none);
+
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_nests_destroy_callback(0, 1, (void *) data_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_fss_nests_destroy_callback__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_item_t item = f_fss_item_t_initialize;
+  f_fss_item_t item_array[] = { item };
+  f_fss_items_t items = { .array = item_array, .used = 1, .size = 1 };
+  f_fss_items_t items_array[] = { items };
+  f_fss_nest_t data = { .depth = items_array, .used = 1, .size = 1 };
+  f_fss_nest_t data_array[] = { data };
+  const f_number_unsigned_t length = 1;
+
+  {
+    will_return(__wrap_f_string_ranges_adjust, false);
+    will_return(__wrap_f_string_ranges_adjust, F_none);
+
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_none);
+
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_none);
+
+    const f_status_t status = f_fss_nests_destroy_callback(0, length, (void *) data_array);
+
+    assert_int_equal(status, F_none);
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nests_destroy_callback.h b/level_0/f_fss/tests/unit/c/test-fss-nests_destroy_callback.h
new file mode 100644 (file)
index 0000000..297c3ae
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_fss__nests_destroy_callback
+#define _TEST__F_fss__nests_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_fss_nests_destroy_callback()
+ */
+extern void test__f_fss_nests_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_nests_destroy_callback()
+ */
+extern void test__f_fss_nests_destroy_callback__works(void **state);
+
+#endif // _TEST__F_fss__nests_destroy_callback
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nestss_delete_callback.c b/level_0/f_fss/tests/unit/c/test-fss-nestss_delete_callback.c
new file mode 100644 (file)
index 0000000..6ede591
--- /dev/null
@@ -0,0 +1,82 @@
+#include "test-fss.h"
+#include "test-fss-nestss_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_nestss_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_item_t item = f_fss_item_t_initialize;
+  f_fss_item_t item_array[] = { item };
+  f_fss_items_t items = { .array = item_array, .used = 1, .size = 1 };
+  f_fss_items_t items_array[] = { items };
+  f_fss_nest_t data = { .depth = items_array, .used = 1, .size = 1 };
+  f_fss_nest_t data_array[] = { data };
+  f_fss_nests_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_fss_nests_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_string_ranges_resize, true);
+    will_return(__wrap_f_string_ranges_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_nestss_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_ranges_resize, false);
+    will_return(__wrap_f_string_ranges_resize, F_none);
+
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_nestss_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_fss_nestss_delete_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_fss_nestss_t datass = f_fss_nestss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_fss_nests_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_resize(1, sizeof(f_fss_nest_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_resize(1, sizeof(f_fss_items_t), (void **) &datass.array[0].array[0].depth, &datass.array[0].array[0].used, &datass.array[0].array[0].size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_resize(1, sizeof(f_fss_item_t), (void **) &datass.array[0].array[0].depth[0].array, &datass.array[0].array[0].depth[0].used, &datass.array[0].array[0].depth[0].size);
+    assert_int_equal(status, F_none);
+
+    status = f_string_ranges_resize(1, &datass.array[0].array[0].depth[0].array[0].content);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_fss_nestss_delete_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nestss_delete_callback.h b/level_0/f_fss/tests/unit/c/test-fss-nestss_delete_callback.h
new file mode 100644 (file)
index 0000000..9163439
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_fss__nestss_delete_callback
+#define _TEST__F_fss__nestss_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_fss_nestss_delete_callback()
+ */
+extern void test__f_fss_nestss_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_nestss_delete_callback()
+ */
+extern void test__f_fss_nestss_delete_callback__works(void **state);
+
+#endif // _TEST__F_fss__nestss_delete_callback
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nestss_destroy_callback.c b/level_0/f_fss/tests/unit/c/test-fss-nestss_destroy_callback.c
new file mode 100644 (file)
index 0000000..2f91f06
--- /dev/null
@@ -0,0 +1,82 @@
+#include "test-fss.h"
+#include "test-fss-nestss_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_nestss_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_item_t item = f_fss_item_t_initialize;
+  f_fss_item_t item_array[] = { item };
+  f_fss_items_t items = { .array = item_array, .used = 1, .size = 1 };
+  f_fss_items_t items_array[] = { items };
+  f_fss_nest_t data = { .depth = items_array, .used = 1, .size = 1 };
+  f_fss_nest_t data_array[] = { data };
+  f_fss_nests_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_fss_nests_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_string_ranges_adjust, true);
+    will_return(__wrap_f_string_ranges_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_nestss_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_ranges_adjust, false);
+    will_return(__wrap_f_string_ranges_adjust, F_none);
+
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_nestss_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_fss_nestss_destroy_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_fss_nestss_t datass = f_fss_nestss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_adjust(length, sizeof(f_fss_nests_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_adjust(1, sizeof(f_fss_nest_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_adjust(1, sizeof(f_fss_items_t), (void **) &datass.array[0].array[0].depth, &datass.array[0].array[0].used, &datass.array[0].array[0].size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_adjust(1, sizeof(f_fss_item_t), (void **) &datass.array[0].array[0].depth[0].array, &datass.array[0].array[0].depth[0].used, &datass.array[0].array[0].depth[0].size);
+    assert_int_equal(status, F_none);
+
+    status = f_string_ranges_adjust(1, &datass.array[0].array[0].depth[0].array[0].content);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_fss_nestss_destroy_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_fss/tests/unit/c/test-fss-nestss_destroy_callback.h b/level_0/f_fss/tests/unit/c/test-fss-nestss_destroy_callback.h
new file mode 100644 (file)
index 0000000..93c1863
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_fss__nestss_destroy_callback
+#define _TEST__F_fss__nestss_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_fss_nestss_destroy_callback()
+ */
+extern void test__f_fss_nestss_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_nestss_destroy_callback()
+ */
+extern void test__f_fss_nestss_destroy_callback__works(void **state);
+
+#endif // _TEST__F_fss__nestss_destroy_callback
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_quotes_delete_callback.c b/level_0/f_fss/tests/unit/c/test-fss-set_quotes_delete_callback.c
new file mode 100644 (file)
index 0000000..9910793
--- /dev/null
@@ -0,0 +1,105 @@
+#include "test-fss.h"
+#include "test-fss-set_quotes_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_set_quotes_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
+  f_fss_set_quote_t data_array[] = { data };
+  f_fss_set_quotes_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_fss_set_quotes_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_string_ranges_resize, true);
+    will_return(__wrap_f_string_ranges_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_set_quotes_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_ranges_resize, false);
+    will_return(__wrap_f_string_ranges_resize, F_none);
+
+    will_return(__wrap_f_string_rangess_resize, true);
+    will_return(__wrap_f_string_rangess_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_set_quotes_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_ranges_resize, false);
+    will_return(__wrap_f_string_ranges_resize, F_none);
+
+    will_return(__wrap_f_string_rangess_resize, false);
+    will_return(__wrap_f_string_rangess_resize, F_none);
+
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_set_quotes_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_ranges_resize, false);
+    will_return(__wrap_f_string_ranges_resize, F_none);
+
+    will_return(__wrap_f_string_rangess_resize, false);
+    will_return(__wrap_f_string_rangess_resize, F_none);
+
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_none);
+
+    will_return(__wrap_f_memory_arrays_resize, true);
+    will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_set_quotes_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_fss_set_quotes_delete_callback__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
+  f_fss_set_quote_t data_array[] = { data };
+  f_fss_set_quotes_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_fss_set_quotes_t datas_array[] = { datas };
+  const f_number_unsigned_t length = 1;
+
+  {
+    will_return(__wrap_f_string_ranges_resize, false);
+    will_return(__wrap_f_string_ranges_resize, F_none);
+
+    will_return(__wrap_f_string_rangess_resize, false);
+    will_return(__wrap_f_string_rangess_resize, F_none);
+
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_none);
+
+    will_return(__wrap_f_memory_arrays_resize, false);
+    will_return(__wrap_f_memory_arrays_resize, F_none);
+
+    const f_status_t status = f_fss_set_quotes_delete_callback(0, length, (void *) datas_array);
+
+    assert_int_equal(status, F_none);
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_quotes_delete_callback.h b/level_0/f_fss/tests/unit/c/test-fss-set_quotes_delete_callback.h
new file mode 100644 (file)
index 0000000..45b6509
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_fss__set_quotes_delete_callback
+#define _TEST__F_fss__set_quotes_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_fss_set_quotes_delete_callback()
+ */
+extern void test__f_fss_set_quotes_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_set_quotes_delete_callback()
+ */
+extern void test__f_fss_set_quotes_delete_callback__works(void **state);
+
+#endif // _TEST__F_fss__set_quotes_delete_callback
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_quotes_destroy_callback.c b/level_0/f_fss/tests/unit/c/test-fss-set_quotes_destroy_callback.c
new file mode 100644 (file)
index 0000000..2647243
--- /dev/null
@@ -0,0 +1,105 @@
+#include "test-fss.h"
+#include "test-fss-set_quotes_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_set_quotes_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
+  f_fss_set_quote_t data_array[] = { data };
+  f_fss_set_quotes_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_fss_set_quotes_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_string_ranges_adjust, true);
+    will_return(__wrap_f_string_ranges_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_set_quotes_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_ranges_adjust, false);
+    will_return(__wrap_f_string_ranges_adjust, F_none);
+
+    will_return(__wrap_f_string_rangess_adjust, true);
+    will_return(__wrap_f_string_rangess_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_set_quotes_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_ranges_adjust, false);
+    will_return(__wrap_f_string_ranges_adjust, F_none);
+
+    will_return(__wrap_f_string_rangess_adjust, false);
+    will_return(__wrap_f_string_rangess_adjust, F_none);
+
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_set_quotes_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_ranges_adjust, false);
+    will_return(__wrap_f_string_ranges_adjust, F_none);
+
+    will_return(__wrap_f_string_rangess_adjust, false);
+    will_return(__wrap_f_string_rangess_adjust, F_none);
+
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_none);
+
+    will_return(__wrap_f_memory_arrays_adjust, true);
+    will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_set_quotes_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_fss_set_quotes_destroy_callback__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
+  f_fss_set_quote_t data_array[] = { data };
+  f_fss_set_quotes_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_fss_set_quotes_t datas_array[] = { datas };
+  const f_number_unsigned_t length = 1;
+
+  {
+    will_return(__wrap_f_string_ranges_adjust, false);
+    will_return(__wrap_f_string_ranges_adjust, F_none);
+
+    will_return(__wrap_f_string_rangess_adjust, false);
+    will_return(__wrap_f_string_rangess_adjust, F_none);
+
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_none);
+
+    will_return(__wrap_f_memory_arrays_adjust, false);
+    will_return(__wrap_f_memory_arrays_adjust, F_none);
+
+    const f_status_t status = f_fss_set_quotes_destroy_callback(0, length, (void *) datas_array);
+
+    assert_int_equal(status, F_none);
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_quotes_destroy_callback.h b/level_0/f_fss/tests/unit/c/test-fss-set_quotes_destroy_callback.h
new file mode 100644 (file)
index 0000000..fdf759f
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_fss__set_quotes_destroy_callback
+#define _TEST__F_fss__set_quotes_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_fss_set_quotes_destroy_callback()
+ */
+extern void test__f_fss_set_quotes_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_set_quotes_destroy_callback()
+ */
+extern void test__f_fss_set_quotes_destroy_callback__works(void **state);
+
+#endif // _TEST__F_fss__set_quotes_destroy_callback
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_quotess_delete_callback.c b/level_0/f_fss/tests/unit/c/test-fss-set_quotess_delete_callback.c
new file mode 100644 (file)
index 0000000..021fe27
--- /dev/null
@@ -0,0 +1,114 @@
+#include "test-fss.h"
+#include "test-fss-set_quotess_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_set_quotess_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
+  f_fss_set_quote_t data_array[] = { data };
+  f_fss_set_quotes_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_fss_set_quotes_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_string_ranges_resize, true);
+    will_return(__wrap_f_string_ranges_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_set_quotess_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_ranges_resize, false);
+    will_return(__wrap_f_string_ranges_resize, F_none);
+
+    will_return(__wrap_f_string_rangess_resize, true);
+    will_return(__wrap_f_string_rangess_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_set_quotess_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_ranges_resize, false);
+    will_return(__wrap_f_string_ranges_resize, F_none);
+
+    will_return(__wrap_f_string_rangess_resize, false);
+    will_return(__wrap_f_string_rangess_resize, F_none);
+
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_set_quotess_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_ranges_resize, false);
+    will_return(__wrap_f_string_ranges_resize, F_none);
+
+    will_return(__wrap_f_string_rangess_resize, false);
+    will_return(__wrap_f_string_rangess_resize, F_none);
+
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_none);
+
+    will_return(__wrap_f_memory_arrays_resize, true);
+    will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_set_quotess_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_fss_set_quotess_delete_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_fss_set_quotess_t datass = f_fss_set_quotess_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_fss_set_quotes_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_resize(1, sizeof(f_fss_set_quote_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+
+    status = f_string_ranges_resize(1, &datass.array[0].array[0].objects);
+    assert_int_equal(status, F_none);
+
+    status = f_string_rangess_resize(1, &datass.array[0].array[0].contents);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_resize(1, sizeof(uint8_t), (void **) &datass.array[0].array[0].objects_quote.array, &datass.array[0].array[0].objects_quote.used, &datass.array[0].array[0].objects_quote.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_arrays_adjust(1, sizeof(f_uint8s_t), (void **) &datass.array[0].array[0].contents_quote.array, &datass.array[0].array[0].contents_quote.used, &datass.array[0].array[0].contents_quote.size, &f_uint8ss_destroy_callback);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_fss_set_quotess_delete_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_quotess_delete_callback.h b/level_0/f_fss/tests/unit/c/test-fss-set_quotess_delete_callback.h
new file mode 100644 (file)
index 0000000..0fb5332
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_fss__set_quotess_delete_callback
+#define _TEST__F_fss__set_quotess_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_fss_set_quotess_delete_callback()
+ */
+extern void test__f_fss_set_quotess_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_set_quotess_delete_callback()
+ */
+extern void test__f_fss_set_quotess_delete_callback__works(void **state);
+
+#endif // _TEST__F_fss__set_quotess_delete_callback
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_quotess_destroy_callback.c b/level_0/f_fss/tests/unit/c/test-fss-set_quotess_destroy_callback.c
new file mode 100644 (file)
index 0000000..ed4d28e
--- /dev/null
@@ -0,0 +1,114 @@
+#include "test-fss.h"
+#include "test-fss-set_quotess_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_set_quotess_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_set_quote_t data = f_fss_set_quote_t_initialize;
+  f_fss_set_quote_t data_array[] = { data };
+  f_fss_set_quotes_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_fss_set_quotes_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_string_ranges_adjust, true);
+    will_return(__wrap_f_string_ranges_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_set_quotess_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_ranges_adjust, false);
+    will_return(__wrap_f_string_ranges_adjust, F_none);
+
+    will_return(__wrap_f_string_rangess_adjust, true);
+    will_return(__wrap_f_string_rangess_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_set_quotess_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_ranges_adjust, false);
+    will_return(__wrap_f_string_ranges_adjust, F_none);
+
+    will_return(__wrap_f_string_rangess_adjust, false);
+    will_return(__wrap_f_string_rangess_adjust, F_none);
+
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_set_quotess_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_ranges_adjust, false);
+    will_return(__wrap_f_string_ranges_adjust, F_none);
+
+    will_return(__wrap_f_string_rangess_adjust, false);
+    will_return(__wrap_f_string_rangess_adjust, F_none);
+
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_none);
+
+    will_return(__wrap_f_memory_arrays_adjust, true);
+    will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_set_quotess_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_fss_set_quotess_destroy_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_fss_set_quotess_t datass = f_fss_set_quotess_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_adjust(length, sizeof(f_fss_set_quotes_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_adjust(1, sizeof(f_fss_set_quote_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+
+    status = f_string_ranges_adjust(1, &datass.array[0].array[0].objects);
+    assert_int_equal(status, F_none);
+
+    status = f_string_rangess_adjust(1, &datass.array[0].array[0].contents);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_adjust(1, sizeof(uint8_t), (void **) &datass.array[0].array[0].objects_quote.array, &datass.array[0].array[0].objects_quote.used, &datass.array[0].array[0].objects_quote.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_arrays_adjust(1, sizeof(f_uint8s_t), (void **) &datass.array[0].array[0].contents_quote.array, &datass.array[0].array[0].contents_quote.used, &datass.array[0].array[0].contents_quote.size, &f_uint8ss_destroy_callback);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_fss_set_quotess_destroy_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_fss/tests/unit/c/test-fss-set_quotess_destroy_callback.h b/level_0/f_fss/tests/unit/c/test-fss-set_quotess_destroy_callback.h
new file mode 100644 (file)
index 0000000..0ed11cd
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_fss__set_quotess_destroy_callback
+#define _TEST__F_fss__set_quotess_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_fss_set_quotess_destroy_callback()
+ */
+extern void test__f_fss_set_quotess_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_set_quotess_destroy_callback()
+ */
+extern void test__f_fss_set_quotess_destroy_callback__works(void **state);
+
+#endif // _TEST__F_fss__set_quotess_destroy_callback
diff --git a/level_0/f_fss/tests/unit/c/test-fss-sets_delete_callback.c b/level_0/f_fss/tests/unit/c/test-fss-sets_delete_callback.c
new file mode 100644 (file)
index 0000000..cd93ca8
--- /dev/null
@@ -0,0 +1,66 @@
+#include "test-fss.h"
+#include "test-fss-sets_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_sets_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_set_t data = f_fss_set_t_initialize;
+  f_fss_set_t data_array[] = { data };
+  f_fss_sets_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_fss_sets_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_string_ranges_resize, true);
+    will_return(__wrap_f_string_ranges_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_sets_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_ranges_resize, false);
+    will_return(__wrap_f_string_ranges_resize, F_none);
+
+    will_return(__wrap_f_string_rangess_resize, true);
+    will_return(__wrap_f_string_rangess_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_sets_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_fss_sets_delete_callback__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_set_t data = f_fss_set_t_initialize;
+  f_fss_set_t data_array[] = { data };
+  f_fss_sets_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_fss_sets_t datas_array[] = { datas };
+  const f_number_unsigned_t length = 1;
+
+  {
+    will_return(__wrap_f_string_ranges_resize, false);
+    will_return(__wrap_f_string_ranges_resize, F_none);
+
+    will_return(__wrap_f_string_rangess_resize, false);
+    will_return(__wrap_f_string_rangess_resize, F_none);
+
+    const f_status_t status = f_fss_sets_delete_callback(0, length, (void *) datas_array);
+
+    assert_int_equal(status, F_none);
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_fss/tests/unit/c/test-fss-sets_delete_callback.h b/level_0/f_fss/tests/unit/c/test-fss-sets_delete_callback.h
new file mode 100644 (file)
index 0000000..8bbfa3b
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_fss__sets_delete_callback
+#define _TEST__F_fss__sets_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_fss_sets_delete_callback()
+ */
+extern void test__f_fss_sets_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_sets_delete_callback()
+ */
+extern void test__f_fss_sets_delete_callback__works(void **state);
+
+#endif // _TEST__F_fss__sets_delete_callback
diff --git a/level_0/f_fss/tests/unit/c/test-fss-sets_destroy_callback.c b/level_0/f_fss/tests/unit/c/test-fss-sets_destroy_callback.c
new file mode 100644 (file)
index 0000000..ab3c09f
--- /dev/null
@@ -0,0 +1,66 @@
+#include "test-fss.h"
+#include "test-fss-sets_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_sets_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_set_t data = f_fss_set_t_initialize;
+  f_fss_set_t data_array[] = { data };
+  f_fss_sets_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_fss_sets_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_string_ranges_adjust, true);
+    will_return(__wrap_f_string_ranges_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_sets_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_ranges_adjust, false);
+    will_return(__wrap_f_string_ranges_adjust, F_none);
+
+    will_return(__wrap_f_string_rangess_adjust, true);
+    will_return(__wrap_f_string_rangess_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_sets_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_fss_sets_destroy_callback__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_set_t data = f_fss_set_t_initialize;
+  f_fss_set_t data_array[] = { data };
+  f_fss_sets_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_fss_sets_t datas_array[] = { datas };
+  const f_number_unsigned_t length = 1;
+
+  {
+    will_return(__wrap_f_string_ranges_adjust, false);
+    will_return(__wrap_f_string_ranges_adjust, F_none);
+
+    will_return(__wrap_f_string_rangess_adjust, false);
+    will_return(__wrap_f_string_rangess_adjust, F_none);
+
+    const f_status_t status = f_fss_sets_destroy_callback(0, length, (void *) datas_array);
+
+    assert_int_equal(status, F_none);
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_fss/tests/unit/c/test-fss-sets_destroy_callback.h b/level_0/f_fss/tests/unit/c/test-fss-sets_destroy_callback.h
new file mode 100644 (file)
index 0000000..eb815b2
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_fss__sets_destroy_callback
+#define _TEST__F_fss__sets_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_fss_sets_destroy_callback()
+ */
+extern void test__f_fss_sets_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_sets_destroy_callback()
+ */
+extern void test__f_fss_sets_destroy_callback__works(void **state);
+
+#endif // _TEST__F_fss__sets_destroy_callback
diff --git a/level_0/f_fss/tests/unit/c/test-fss-setss_delete_callback.c b/level_0/f_fss/tests/unit/c/test-fss-setss_delete_callback.c
new file mode 100644 (file)
index 0000000..3ae8143
--- /dev/null
@@ -0,0 +1,75 @@
+#include "test-fss.h"
+#include "test-fss-setss_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_setss_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_set_t data = f_fss_set_t_initialize;
+  f_fss_set_t data_array[] = { data };
+  f_fss_sets_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_fss_sets_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_string_ranges_resize, true);
+    will_return(__wrap_f_string_ranges_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_setss_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_ranges_resize, false);
+    will_return(__wrap_f_string_ranges_resize, F_none);
+
+    will_return(__wrap_f_string_rangess_resize, true);
+    will_return(__wrap_f_string_rangess_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_setss_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_fss_setss_delete_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_fss_setss_t datass = f_fss_setss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_fss_sets_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_resize(1, sizeof(f_fss_set_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+
+    status = f_string_ranges_resize(1, &datass.array[0].array[0].objects);
+    assert_int_equal(status, F_none);
+
+    status = f_string_rangess_resize(1, &datass.array[0].array[0].contents);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_fss_setss_delete_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_fss/tests/unit/c/test-fss-setss_delete_callback.h b/level_0/f_fss/tests/unit/c/test-fss-setss_delete_callback.h
new file mode 100644 (file)
index 0000000..c884f10
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_fss__setss_delete_callback
+#define _TEST__F_fss__setss_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_fss_setss_delete_callback()
+ */
+extern void test__f_fss_setss_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_setss_delete_callback()
+ */
+extern void test__f_fss_setss_delete_callback__works(void **state);
+
+#endif // _TEST__F_fss__setss_delete_callback
diff --git a/level_0/f_fss/tests/unit/c/test-fss-setss_destroy_callback.c b/level_0/f_fss/tests/unit/c/test-fss-setss_destroy_callback.c
new file mode 100644 (file)
index 0000000..14b3068
--- /dev/null
@@ -0,0 +1,75 @@
+#include "test-fss.h"
+#include "test-fss-setss_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_setss_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_set_t data = f_fss_set_t_initialize;
+  f_fss_set_t data_array[] = { data };
+  f_fss_sets_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_fss_sets_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_string_ranges_adjust, true);
+    will_return(__wrap_f_string_ranges_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_setss_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_ranges_adjust, false);
+    will_return(__wrap_f_string_ranges_adjust, F_none);
+
+    will_return(__wrap_f_string_rangess_adjust, true);
+    will_return(__wrap_f_string_rangess_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_setss_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_fss_setss_destroy_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_fss_setss_t datass = f_fss_setss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_adjust(length, sizeof(f_fss_sets_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_adjust(1, sizeof(f_fss_set_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+
+    status = f_string_ranges_adjust(1, &datass.array[0].array[0].objects);
+    assert_int_equal(status, F_none);
+
+    status = f_string_rangess_adjust(1, &datass.array[0].array[0].contents);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_fss_setss_destroy_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_fss/tests/unit/c/test-fss-setss_destroy_callback.h b/level_0/f_fss/tests/unit/c/test-fss-setss_destroy_callback.h
new file mode 100644 (file)
index 0000000..4c9afdf
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_fss__setss_destroy_callback
+#define _TEST__F_fss__setss_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_fss_setss_destroy_callback()
+ */
+extern void test__f_fss_setss_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_setss_destroy_callback()
+ */
+extern void test__f_fss_setss_destroy_callback__works(void **state);
+
+#endif // _TEST__F_fss__setss_destroy_callback
diff --git a/level_0/f_fss/tests/unit/c/test-fss-simple_packets_delete_callback.c b/level_0/f_fss/tests/unit/c/test-fss-simple_packets_delete_callback.c
new file mode 100644 (file)
index 0000000..8d9622e
--- /dev/null
@@ -0,0 +1,51 @@
+#include "test-fss.h"
+#include "test-fss-simple_packets_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_simple_packets_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_simple_packet_t data = { .payload = f_string_empty_s, .control = 0, .size = 0 };
+  f_fss_simple_packet_t data_array[] = { data };
+  f_fss_simple_packets_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_fss_simple_packets_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_string_dynamic_resize, true);
+    will_return(__wrap_f_string_dynamic_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_simple_packets_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_fss_simple_packets_delete_callback__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_simple_packet_t data = { .payload = f_string_empty_s, .control = 0, .size = 0 };
+  f_fss_simple_packet_t data_array[] = { data };
+  f_fss_simple_packets_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_fss_simple_packets_t datas_array[] = { datas };
+  const f_number_unsigned_t length = 1;
+
+  {
+    will_return(__wrap_f_string_dynamic_resize, false);
+    will_return(__wrap_f_string_dynamic_resize, F_none);
+
+    const f_status_t status = f_fss_simple_packets_delete_callback(0, length, (void *) datas_array);
+
+    assert_int_equal(status, F_none);
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_fss/tests/unit/c/test-fss-simple_packets_delete_callback.h b/level_0/f_fss/tests/unit/c/test-fss-simple_packets_delete_callback.h
new file mode 100644 (file)
index 0000000..a6668fe
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_fss__simple_packets_delete_callback
+#define _TEST__F_fss__simple_packets_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_fss_simple_packets_delete_callback()
+ */
+extern void test__f_fss_simple_packets_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_simple_packets_delete_callback()
+ */
+extern void test__f_fss_simple_packets_delete_callback__works(void **state);
+
+#endif // _TEST__F_fss__simple_packets_delete_callback
diff --git a/level_0/f_fss/tests/unit/c/test-fss-simple_packets_destroy_callback.c b/level_0/f_fss/tests/unit/c/test-fss-simple_packets_destroy_callback.c
new file mode 100644 (file)
index 0000000..b4ecd5b
--- /dev/null
@@ -0,0 +1,51 @@
+#include "test-fss.h"
+#include "test-fss-simple_packets_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_simple_packets_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_simple_packet_t data = { .payload = f_string_empty_s, .control = 0, .size = 0 };
+  f_fss_simple_packet_t data_array[] = { data };
+  f_fss_simple_packets_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_fss_simple_packets_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_string_dynamic_adjust, true);
+    will_return(__wrap_f_string_dynamic_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_simple_packets_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_fss_simple_packets_destroy_callback__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_simple_packet_t data = { .payload = f_string_empty_s, .control = 0, .size = 0 };
+  f_fss_simple_packet_t data_array[] = { data };
+  f_fss_simple_packets_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_fss_simple_packets_t datas_array[] = { datas };
+  const f_number_unsigned_t length = 1;
+
+  {
+    will_return(__wrap_f_string_dynamic_adjust, false);
+    will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+    const f_status_t status = f_fss_simple_packets_destroy_callback(0, length, (void *) datas_array);
+
+    assert_int_equal(status, F_none);
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_fss/tests/unit/c/test-fss-simple_packets_destroy_callback.h b/level_0/f_fss/tests/unit/c/test-fss-simple_packets_destroy_callback.h
new file mode 100644 (file)
index 0000000..7bfb870
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_fss__simple_packets_destroy_callback
+#define _TEST__F_fss__simple_packets_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_fss_simple_packets_destroy_callback()
+ */
+extern void test__f_fss_simple_packets_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_simple_packets_destroy_callback()
+ */
+extern void test__f_fss_simple_packets_destroy_callback__works(void **state);
+
+#endif // _TEST__F_fss__simple_packets_destroy_callback
diff --git a/level_0/f_fss/tests/unit/c/test-fss-simple_packetss_delete_callback.c b/level_0/f_fss/tests/unit/c/test-fss-simple_packetss_delete_callback.c
new file mode 100644 (file)
index 0000000..e7b578c
--- /dev/null
@@ -0,0 +1,72 @@
+#include "test-fss.h"
+#include "test-fss-simple_packetss_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_simple_packetss_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_simple_packet_t data = { .payload = f_string_empty_s, .control = 0, .size = 0 };
+  f_fss_simple_packet_t data_array[] = { data };
+  f_fss_simple_packets_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_fss_simple_packets_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_string_dynamic_resize, true);
+    will_return(__wrap_f_string_dynamic_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_simple_packetss_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_dynamic_resize, false);
+    will_return(__wrap_f_string_dynamic_resize, F_none);
+
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_simple_packetss_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_fss_simple_packetss_delete_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_fss_simple_packetss_t datass = f_fss_simple_packetss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_fss_simple_packets_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_resize(1, sizeof(f_fss_simple_packet_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+
+    status = f_string_dynamic_resize(1, &datass.array[0].array[0].payload);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_fss_simple_packetss_delete_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_fss/tests/unit/c/test-fss-simple_packetss_delete_callback.h b/level_0/f_fss/tests/unit/c/test-fss-simple_packetss_delete_callback.h
new file mode 100644 (file)
index 0000000..446e4d7
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_fss__simple_packetss_delete_callback
+#define _TEST__F_fss__simple_packetss_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_fss_simple_packetss_delete_callback()
+ */
+extern void test__f_fss_simple_packetss_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_simple_packetss_delete_callback()
+ */
+extern void test__f_fss_simple_packetss_delete_callback__works(void **state);
+
+#endif // _TEST__F_fss__simple_packetss_delete_callback
diff --git a/level_0/f_fss/tests/unit/c/test-fss-simple_packetss_destroy_callback.c b/level_0/f_fss/tests/unit/c/test-fss-simple_packetss_destroy_callback.c
new file mode 100644 (file)
index 0000000..d2d1ddd
--- /dev/null
@@ -0,0 +1,72 @@
+#include "test-fss.h"
+#include "test-fss-simple_packetss_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_fss_simple_packetss_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fss_simple_packet_t data = { .payload = f_string_empty_s, .control = 0, .size = 0 };
+  f_fss_simple_packet_t data_array[] = { data };
+  f_fss_simple_packets_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_fss_simple_packets_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_string_dynamic_adjust, true);
+    will_return(__wrap_f_string_dynamic_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_simple_packetss_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_dynamic_adjust, false);
+    will_return(__wrap_f_string_dynamic_adjust, F_none);
+
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fss_simple_packetss_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_fss_simple_packetss_destroy_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_fss_simple_packetss_t datass = f_fss_simple_packetss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_adjust(length, sizeof(f_fss_simple_packets_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_adjust(1, sizeof(f_fss_simple_packet_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+
+    status = f_string_dynamic_adjust(1, &datass.array[0].array[0].payload);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_fss_simple_packetss_destroy_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_fss/tests/unit/c/test-fss-simple_packetss_destroy_callback.h b/level_0/f_fss/tests/unit/c/test-fss-simple_packetss_destroy_callback.h
new file mode 100644 (file)
index 0000000..a43cf37
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: FSS
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_fss__simple_packetss_destroy_callback
+#define _TEST__F_fss__simple_packetss_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_fss_simple_packetss_destroy_callback()
+ */
+extern void test__f_fss_simple_packetss_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fss_simple_packetss_destroy_callback()
+ */
+extern void test__f_fss_simple_packetss_destroy_callback__works(void **state);
+
+#endif // _TEST__F_fss__simple_packetss_destroy_callback
index 5d7132517356eab5dc4504121f958105e8a49d85..1af9f30a6d46140eeb925e178c1809faf44bc0f5 100644 (file)
@@ -45,6 +45,66 @@ int main(void) {
     cmocka_unit_test(test__f_fss_fail_utf__works_for_no_error),
     cmocka_unit_test(test__f_fss_fail_utf_to_false__works_for_no_error),
 
+    cmocka_unit_test(test__f_fss_items_delete_callback__fails),
+    cmocka_unit_test(test__f_fss_items_destroy_callback__fails),
+    cmocka_unit_test(test__f_fss_itemss_delete_callback__fails),
+    cmocka_unit_test(test__f_fss_itemss_destroy_callback__fails),
+
+    cmocka_unit_test(test__f_fss_items_delete_callback__works),
+    cmocka_unit_test(test__f_fss_items_destroy_callback__works),
+    cmocka_unit_test(test__f_fss_itemss_delete_callback__works),
+    cmocka_unit_test(test__f_fss_itemss_destroy_callback__works),
+
+    cmocka_unit_test(test__f_fss_nameds_delete_callback__fails),
+    cmocka_unit_test(test__f_fss_nameds_destroy_callback__fails),
+    cmocka_unit_test(test__f_fss_namedss_delete_callback__fails),
+    cmocka_unit_test(test__f_fss_namedss_destroy_callback__fails),
+
+    cmocka_unit_test(test__f_fss_nameds_delete_callback__works),
+    cmocka_unit_test(test__f_fss_nameds_destroy_callback__works),
+    cmocka_unit_test(test__f_fss_namedss_delete_callback__works),
+    cmocka_unit_test(test__f_fss_namedss_destroy_callback__works),
+
+    cmocka_unit_test(test__f_fss_nests_delete_callback__fails),
+    cmocka_unit_test(test__f_fss_nests_destroy_callback__fails),
+    cmocka_unit_test(test__f_fss_nestss_delete_callback__fails),
+    cmocka_unit_test(test__f_fss_nestss_destroy_callback__fails),
+
+    cmocka_unit_test(test__f_fss_nests_delete_callback__works),
+    cmocka_unit_test(test__f_fss_nests_destroy_callback__works),
+    cmocka_unit_test(test__f_fss_nestss_delete_callback__works),
+    cmocka_unit_test(test__f_fss_nestss_destroy_callback__works),
+
+    cmocka_unit_test(test__f_fss_set_quotes_delete_callback__fails),
+    cmocka_unit_test(test__f_fss_set_quotes_destroy_callback__fails),
+    cmocka_unit_test(test__f_fss_set_quotess_delete_callback__fails),
+    cmocka_unit_test(test__f_fss_set_quotess_destroy_callback__fails),
+
+    cmocka_unit_test(test__f_fss_set_quotes_delete_callback__works),
+    cmocka_unit_test(test__f_fss_set_quotes_destroy_callback__works),
+    cmocka_unit_test(test__f_fss_set_quotess_delete_callback__works),
+    cmocka_unit_test(test__f_fss_set_quotess_destroy_callback__works),
+
+    cmocka_unit_test(test__f_fss_sets_delete_callback__fails),
+    cmocka_unit_test(test__f_fss_sets_destroy_callback__fails),
+    cmocka_unit_test(test__f_fss_setss_delete_callback__fails),
+    cmocka_unit_test(test__f_fss_setss_destroy_callback__fails),
+
+    cmocka_unit_test(test__f_fss_sets_delete_callback__works),
+    cmocka_unit_test(test__f_fss_sets_destroy_callback__works),
+    cmocka_unit_test(test__f_fss_setss_delete_callback__works),
+    cmocka_unit_test(test__f_fss_setss_destroy_callback__works),
+
+    cmocka_unit_test(test__f_fss_simple_packets_delete_callback__fails),
+    cmocka_unit_test(test__f_fss_simple_packets_destroy_callback__fails),
+    cmocka_unit_test(test__f_fss_simple_packetss_delete_callback__fails),
+    cmocka_unit_test(test__f_fss_simple_packetss_destroy_callback__fails),
+
+    cmocka_unit_test(test__f_fss_simple_packets_delete_callback__works),
+    cmocka_unit_test(test__f_fss_simple_packets_destroy_callback__works),
+    cmocka_unit_test(test__f_fss_simple_packetss_delete_callback__works),
+    cmocka_unit_test(test__f_fss_simple_packetss_destroy_callback__works),
+
     #ifndef _di_level_0_parameter_checking_
       cmocka_unit_test(test__f_fss_apply_delimit__parameter_checking),
       cmocka_unit_test(test__f_fss_apply_delimit_range__parameter_checking),
@@ -59,6 +119,31 @@ int main(void) {
       cmocka_unit_test(test__f_fss_seek_to_eol__parameter_checking),
       cmocka_unit_test(test__f_fss_skip_past_delimit__parameter_checking),
       cmocka_unit_test(test__f_fss_skip_past_space__parameter_checking),
+
+      // f_fss_items_delete_callback() doesn't use parameter checking.
+      // f_fss_items_destroy_callback() doesn't use parameter checking.
+      // f_fss_itemss_delete_callback() doesn't use parameter checking.
+      // f_fss_itemss_destroy_callback() doesn't use parameter checking.
+      // f_fss_nameds_delete_callback() doesn't use parameter checking.
+      // f_fss_nameds_destroy_callback() doesn't use parameter checking.
+      // f_fss_namedss_delete_callback() doesn't use parameter checking.
+      // f_fss_namedss_destroy_callback() doesn't use parameter checking.
+      // f_fss_nests_delete_callback() doesn't use parameter checking.
+      // f_fss_nests_destroy_callback() doesn't use parameter checking.
+      // f_fss_nestss_delete_callback() doesn't use parameter checking.
+      // f_fss_nestss_destroy_callback() doesn't use parameter checking.
+      // f_fss_set_quotes_delete_callback() doesn't use parameter checking.
+      // f_fss_set_quotes_destroy_callback() doesn't use parameter checking.
+      // f_fss_set_quotess_delete_callback() doesn't use parameter checking.
+      // f_fss_set_quotess_destroy_callback() doesn't use parameter checking.
+      // f_fss_sets_delete_callback() doesn't use parameter checking.
+      // f_fss_sets_destroy_callback() doesn't use parameter checking.
+      // f_fss_setss_delete_callback() doesn't use parameter checking.
+      // f_fss_setss_destroy_callback() doesn't use parameter checking.
+      // f_fss_simple_packets_delete_callback() doesn't use parameter checking.
+      // f_fss_simple_packets_destroy_callback() doesn't use parameter checking.
+      // f_fss_simple_packetss_delete_callback() doesn't use parameter checking.
+      // f_fss_simple_packetss_destroy_callback() doesn't use parameter checking.
     #endif // _di_level_0_parameter_checking_
   };
 
index d676ed1441f2345b2f0dafd7ede7b35c3394a913..4e9eceb93233fad16d6d99f0f874efd2e71dfc62 100644 (file)
 #include "test-fss-is_graph.h"
 #include "test-fss-is_space.h"
 #include "test-fss-is_zero_width.h"
-//#include "test-fss-items_destroy_callback.h"
-//#include "test-fss-items_delete_callback.h"
-//#include "test-fss-named_destroy_callback.h"
-//#include "test-fss-named_delete_callback.h"
-//#include "test-fss-nameds_destroy_callback.h"
-//#include "test-fss-nameds_delete_callback.h"
-//#include "test-fss-nest_destroy_callback.h"
-//#include "test-fss-nest_delete_callback.h"
-//#include "test-fss-nests_destroy_callback.h"
-//#include "test-fss-nests_delete_callback.h"
+#include "test-fss-items_destroy_callback.h"
+#include "test-fss-items_delete_callback.h"
+#include "test-fss-itemss_destroy_callback.h"
+#include "test-fss-itemss_delete_callback.h"
+#include "test-fss-nameds_destroy_callback.h"
+#include "test-fss-nameds_delete_callback.h"
+#include "test-fss-namedss_destroy_callback.h"
+#include "test-fss-namedss_delete_callback.h"
+#include "test-fss-nests_destroy_callback.h"
+#include "test-fss-nests_delete_callback.h"
+#include "test-fss-nestss_destroy_callback.h"
+#include "test-fss-nestss_delete_callback.h"
 #include "test-fss-seek_to_eol.h"
-//#include "test-fss-set_destroy_callback.h"
-//#include "test-fss-set_delete_callback.h"
-//#include "test-fss-set_quote_destroy_callback.h"
-//#include "test-fss-set_quote_delete_callback.h"
-//#include "test-fss-set_quotes_destroy_callback.h"
-//#include "test-fss-set_quotes_delete_callback.h"
-//#include "test-fss-sets_destroy_callback.h"
-//#include "test-fss-sets_delete_callback.h"
-//#include "test-fss-simple_packet_ranges_destroy_callback.h"
-//#include "test-fss-simple_packet_ranges_delete_callback.h"
+#include "test-fss-set_quotes_destroy_callback.h"
+#include "test-fss-set_quotes_delete_callback.h"
+#include "test-fss-set_quotess_destroy_callback.h"
+#include "test-fss-set_quotess_delete_callback.h"
+#include "test-fss-sets_destroy_callback.h"
+#include "test-fss-sets_delete_callback.h"
+#include "test-fss-setss_destroy_callback.h"
+#include "test-fss-setss_delete_callback.h"
+#include "test-fss-simple_packets_destroy_callback.h"
+#include "test-fss-simple_packets_delete_callback.h"
+#include "test-fss-simple_packetss_destroy_callback.h"
+#include "test-fss-simple_packetss_delete_callback.h"
 #include "test-fss-skip_past_delimit.h"
 #include "test-fss-skip_past_space.h"
 
index b964202f19560eb2bfafff616442ca40d828a5be..1eebd62646e9a716dba1987bd66d57e8d8f88d88 100644 (file)
@@ -26,7 +26,8 @@ build_libraries -lc -lcmocka
 build_libraries-individual -lf_memory -lf_string -lf_type_array -lf_utf -lf_iki
 
 build_sources_program test-iki-content_is.c test-iki-content_partial_is.c test-iki-object_is.c test-iki-object_partial_is.c test-iki-read.c
-build_sources_program test-iki-datas_destroy_callback.c test-iki-datas_append.c test-iki-datas_append_all.c test-iki-datas_delete_callback.c test-iki-datass_append.c test-iki-datass_append_all.c
+build_sources_program test-iki-datas_append.c test-iki-datas_append_all.c test-iki-datass_append.c test-iki-datass_append_all.c
+build_sources_program test-iki-datas_delete_callback.c test-iki-datas_destroy_callback.c test-iki-datass_delete_callback.c test-iki-datass_destroy_callback.c
 build_sources_program test-iki.c
 
 build_script no
index 0441520b3536ac745cd732cc17f311959a8b3fec..4ea9c7bc5f94e5add7f26a1ae6ff2de09875e531 100644 (file)
@@ -5,10 +5,11 @@ extern "C" {
 #endif
 
 int mock_unwrap = 0;
+int mock_unwrap_f_memory = 1;
 
-f_status_t __wrap_f_memory_array_adjust(const f_number_unsigned_t length, const size_t width, void ** array, f_number_unsigned_t * const used, f_number_unsigned_t * const size) {
+f_status_t __wrap_f_memory_array_adjust(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size) {
 
-  if (mock_unwrap) {
+  if (mock_unwrap_f_memory) {
     return __real_f_memory_array_adjust(length, width, array, used, size);
   }
 
@@ -23,9 +24,9 @@ f_status_t __wrap_f_memory_array_adjust(const f_number_unsigned_t length, const
   return mock_type(f_status_t);
 }
 
-f_status_t __wrap_f_memory_array_resize(const f_number_unsigned_t length, const size_t width, void ** array, f_number_unsigned_t * const used, f_number_unsigned_t * const size) {
+f_status_t __wrap_f_memory_array_resize(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size) {
 
-  if (mock_unwrap) {
+  if (mock_unwrap_f_memory) {
     return __real_f_memory_array_resize(length, width, array, used, size);
   }
 
index a42bfc5fe0621f8ae278596c806c2131bdb95d12..51dcaa7a97156c3ed7bb29d4649339a3db67158f 100644 (file)
@@ -30,14 +30,17 @@ extern "C" {
 const static int mock_errno_generic = 32767;
 
 extern int mock_unwrap;
+extern int mock_unwrap_f_memory;
 
 extern f_status_t __real_f_memory_array_adjust(const f_number_unsigned_t length, const size_t width, void ** array, f_number_unsigned_t * const used, f_number_unsigned_t * const size);
 extern f_status_t __real_f_memory_array_resize(const f_number_unsigned_t length, const size_t width, void ** array, f_number_unsigned_t * const used, f_number_unsigned_t * const size);
+
 extern f_status_t __real_f_string_ranges_adjust(const f_number_unsigned_t length, f_string_ranges_t * const structure);
 extern f_status_t __real_f_string_ranges_resize(const f_number_unsigned_t length, f_string_ranges_t * const structure);
 
 extern f_status_t __wrap_f_memory_array_adjust(const f_number_unsigned_t length, const size_t width, void ** array, f_number_unsigned_t * const used, f_number_unsigned_t * const size);
 extern f_status_t __wrap_f_memory_array_resize(const f_number_unsigned_t length, const size_t width, void ** array, f_number_unsigned_t * const used, f_number_unsigned_t * const size);
+
 extern f_status_t __wrap_f_string_ranges_adjust(const f_number_unsigned_t length, f_string_ranges_t * const structure);
 extern f_status_t __wrap_f_string_ranges_resize(const f_number_unsigned_t length, f_string_ranges_t * const structure);
 
index 3b6c6ca674667f93d6833847d24a3985fa1a265b..24c5d3076513a3a6cca734f51929319c35c034db 100644 (file)
@@ -8,17 +8,22 @@ extern "C" {
 void test__f_iki_datas_delete_callback__fails(void **state) {
 
   mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
 
-  f_iki_data_t data = f_iki_data_t_initialize;
+  f_string_ranges_t content = f_string_ranges_t_initialize;
+  f_number_unsigneds_t delimits = f_number_unsigneds_t_initialize;
+  f_string_ranges_t variable = f_string_ranges_t_initialize;
+  f_string_ranges_t vocabulary = f_string_ranges_t_initialize;
+  f_iki_data_t data = { .content = content, .delimits = delimits, .variable = variable, .vocabulary = vocabulary };
   f_iki_data_t data_array[] = { data };
   f_iki_datas_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_iki_datas_t datass_array[] = { datas };
+  f_iki_datas_t datas_array[] = { datas };
 
   {
     will_return(__wrap_f_string_ranges_resize, true);
     will_return(__wrap_f_string_ranges_resize, F_status_set_error(F_failure));
 
-    const f_status_t status = f_iki_datas_delete_callback(0, 1, (void *) datass_array);
+    const f_status_t status = f_iki_datas_delete_callback(0, 1, (void *) datas_array);
 
     assert_int_equal(status, F_status_set_error(F_failure));
   }
@@ -30,7 +35,7 @@ void test__f_iki_datas_delete_callback__fails(void **state) {
     will_return(__wrap_f_memory_array_resize, true);
     will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
 
-    const f_status_t status = f_iki_datas_delete_callback(0, 1, (void *) datass_array);
+    const f_status_t status = f_iki_datas_delete_callback(0, 1, (void *) datas_array);
 
     assert_int_equal(status, F_status_set_error(F_failure));
   }
@@ -45,7 +50,7 @@ void test__f_iki_datas_delete_callback__fails(void **state) {
     will_return(__wrap_f_string_ranges_resize, true);
     will_return(__wrap_f_string_ranges_resize, F_status_set_error(F_failure));
 
-    const f_status_t status = f_iki_datas_delete_callback(0, 1, (void *) datass_array);
+    const f_status_t status = f_iki_datas_delete_callback(0, 1, (void *) datas_array);
 
     assert_int_equal(status, F_status_set_error(F_failure));
   }
@@ -63,7 +68,7 @@ void test__f_iki_datas_delete_callback__fails(void **state) {
     will_return(__wrap_f_string_ranges_resize, true);
     will_return(__wrap_f_string_ranges_resize, F_status_set_error(F_failure));
 
-    const f_status_t status = f_iki_datas_delete_callback(0, 1, (void *) datass_array);
+    const f_status_t status = f_iki_datas_delete_callback(0, 1, (void *) datas_array);
 
     assert_int_equal(status, F_status_set_error(F_failure));
   }
@@ -72,11 +77,16 @@ void test__f_iki_datas_delete_callback__fails(void **state) {
 void test__f_iki_datas_delete_callback__works(void **state) {
 
   mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
 
-  f_iki_data_t data = f_iki_data_t_initialize;
+  f_string_ranges_t content = f_string_ranges_t_initialize;
+  f_number_unsigneds_t delimits = f_number_unsigneds_t_initialize;
+  f_string_ranges_t variable = f_string_ranges_t_initialize;
+  f_string_ranges_t vocabulary = f_string_ranges_t_initialize;
+  f_iki_data_t data = { .content = content, .delimits = delimits, .variable = variable, .vocabulary = vocabulary };
   f_iki_data_t data_array[] = { data };
   f_iki_datas_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_iki_datas_t datass_array[] = { datas };
+  f_iki_datas_t datas_array[] = { datas };
   const f_number_unsigned_t length = 1;
 
   {
@@ -92,7 +102,7 @@ void test__f_iki_datas_delete_callback__works(void **state) {
     will_return(__wrap_f_string_ranges_resize, false);
     will_return(__wrap_f_string_ranges_resize, F_none);
 
-    const f_status_t status = f_iki_datas_delete_callback(0, length, (void *) datass_array);
+    const f_status_t status = f_iki_datas_delete_callback(0, length, (void *) datas_array);
 
     assert_int_equal(status, F_none);
   }
index 10a86d8fbce7b57c68b1940ca0b71e994e7643e7..25034a1addb9428438b4ba38d1e67590b83a4577 100644 (file)
@@ -8,17 +8,22 @@ extern "C" {
 void test__f_iki_datas_destroy_callback__fails(void **state) {
 
   mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
 
-  f_iki_data_t data = f_iki_data_t_initialize;
+  f_string_ranges_t content = f_string_ranges_t_initialize;
+  f_number_unsigneds_t delimits = f_number_unsigneds_t_initialize;
+  f_string_ranges_t variable = f_string_ranges_t_initialize;
+  f_string_ranges_t vocabulary = f_string_ranges_t_initialize;
+  f_iki_data_t data = { .content = content, .delimits = delimits, .variable = variable, .vocabulary = vocabulary };
   f_iki_data_t data_array[] = { data };
   f_iki_datas_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_iki_datas_t datass_array[] = { datas };
+  f_iki_datas_t datas_array[] = { datas };
 
   {
     will_return(__wrap_f_string_ranges_adjust, true);
     will_return(__wrap_f_string_ranges_adjust, F_status_set_error(F_failure));
 
-    const f_status_t status = f_iki_datas_destroy_callback(0, 1, (void *) datass_array);
+    const f_status_t status = f_iki_datas_destroy_callback(0, 1, (void *) datas_array);
 
     assert_int_equal(status, F_status_set_error(F_failure));
   }
@@ -30,7 +35,7 @@ void test__f_iki_datas_destroy_callback__fails(void **state) {
     will_return(__wrap_f_memory_array_adjust, true);
     will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
 
-    const f_status_t status = f_iki_datas_destroy_callback(0, 1, (void *) datass_array);
+    const f_status_t status = f_iki_datas_destroy_callback(0, 1, (void *) datas_array);
 
     assert_int_equal(status, F_status_set_error(F_failure));
   }
@@ -45,7 +50,7 @@ void test__f_iki_datas_destroy_callback__fails(void **state) {
     will_return(__wrap_f_string_ranges_adjust, true);
     will_return(__wrap_f_string_ranges_adjust, F_status_set_error(F_failure));
 
-    const f_status_t status = f_iki_datas_destroy_callback(0, 1, (void *) datass_array);
+    const f_status_t status = f_iki_datas_destroy_callback(0, 1, (void *) datas_array);
 
     assert_int_equal(status, F_status_set_error(F_failure));
   }
@@ -63,7 +68,7 @@ void test__f_iki_datas_destroy_callback__fails(void **state) {
     will_return(__wrap_f_string_ranges_adjust, true);
     will_return(__wrap_f_string_ranges_adjust, F_status_set_error(F_failure));
 
-    const f_status_t status = f_iki_datas_destroy_callback(0, 1, (void *) datass_array);
+    const f_status_t status = f_iki_datas_destroy_callback(0, 1, (void *) datas_array);
 
     assert_int_equal(status, F_status_set_error(F_failure));
   }
@@ -72,11 +77,16 @@ void test__f_iki_datas_destroy_callback__fails(void **state) {
 void test__f_iki_datas_destroy_callback__works(void **state) {
 
   mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
 
-  f_iki_data_t data = f_iki_data_t_initialize;
+  f_string_ranges_t content = f_string_ranges_t_initialize;
+  f_number_unsigneds_t delimits = f_number_unsigneds_t_initialize;
+  f_string_ranges_t variable = f_string_ranges_t_initialize;
+  f_string_ranges_t vocabulary = f_string_ranges_t_initialize;
+  f_iki_data_t data = { .content = content, .delimits = delimits, .variable = variable, .vocabulary = vocabulary };
   f_iki_data_t data_array[] = { data };
   f_iki_datas_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_iki_datas_t datass_array[] = { datas };
+  f_iki_datas_t datas_array[] = { datas };
   const f_number_unsigned_t length = 1;
 
   {
@@ -92,7 +102,7 @@ void test__f_iki_datas_destroy_callback__works(void **state) {
     will_return(__wrap_f_string_ranges_adjust, false);
     will_return(__wrap_f_string_ranges_adjust, F_none);
 
-    const f_status_t status = f_iki_datas_destroy_callback(0, length, (void *) datass_array);
+    const f_status_t status = f_iki_datas_destroy_callback(0, length, (void *) datas_array);
 
     assert_int_equal(status, F_none);
   }
diff --git a/level_0/f_iki/tests/unit/c/test-iki-datass_delete_callback.c b/level_0/f_iki/tests/unit/c/test-iki-datass_delete_callback.c
new file mode 100644 (file)
index 0000000..a69d9cd
--- /dev/null
@@ -0,0 +1,139 @@
+#include "test-iki.h"
+#include "test-iki-datass_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_iki_datass_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_string_ranges_t content = f_string_ranges_t_initialize;
+  f_number_unsigneds_t delimits = f_number_unsigneds_t_initialize;
+  f_string_ranges_t variable = f_string_ranges_t_initialize;
+  f_string_ranges_t vocabulary = f_string_ranges_t_initialize;
+  f_iki_data_t data = { .content = content, .delimits = delimits, .variable = variable, .vocabulary = vocabulary };
+  f_iki_data_t data_array[] = { data };
+  f_iki_datas_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_iki_datas_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_string_ranges_resize, true);
+    will_return(__wrap_f_string_ranges_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_iki_datass_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_ranges_resize, false);
+    will_return(__wrap_f_string_ranges_resize, F_none);
+
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_iki_datass_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_ranges_resize, false);
+    will_return(__wrap_f_string_ranges_resize, F_none);
+
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_none);
+
+    will_return(__wrap_f_string_ranges_resize, true);
+    will_return(__wrap_f_string_ranges_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_iki_datass_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_ranges_resize, false);
+    will_return(__wrap_f_string_ranges_resize, F_none);
+
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_none);
+
+    will_return(__wrap_f_string_ranges_resize, false);
+    will_return(__wrap_f_string_ranges_resize, F_none);
+
+    will_return(__wrap_f_string_ranges_resize, true);
+    will_return(__wrap_f_string_ranges_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_iki_datass_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_ranges_resize, false);
+    will_return(__wrap_f_string_ranges_resize, F_none);
+
+    will_return(__wrap_f_memory_array_resize, false);
+    will_return(__wrap_f_memory_array_resize, F_none);
+
+    will_return(__wrap_f_string_ranges_resize, false);
+    will_return(__wrap_f_string_ranges_resize, F_none);
+
+    will_return(__wrap_f_string_ranges_resize, false);
+    will_return(__wrap_f_string_ranges_resize, F_none);
+
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_iki_datass_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_iki_datass_delete_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_iki_datass_t datass = f_iki_datass_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_iki_datas_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_resize(1, sizeof(f_iki_data_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+
+    status = f_string_ranges_resize(1, &datass.array[0].array[0].content);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_resize(1, sizeof(f_number_unsigned_t), (void **) &datass.array[0].array[0].delimits.array, &datass.array[0].array[0].delimits.used, &datass.array[0].array[0].delimits.size);
+    assert_int_equal(status, F_none);
+
+    status = f_string_ranges_resize(1, &datass.array[0].array[0].variable);
+    assert_int_equal(status, F_none);
+
+    status = f_string_ranges_resize(1, &datass.array[0].array[0].vocabulary);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_iki_datass_delete_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_iki/tests/unit/c/test-iki-datass_delete_callback.h b/level_0/f_iki/tests/unit/c/test-iki-datass_delete_callback.h
new file mode 100644 (file)
index 0000000..7643488
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: IKI
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_iki__datass_delete_callback
+#define _TEST__F_iki__datass_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_iki_datass_delete_callback()
+ */
+extern void test__f_iki_datass_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_iki_datass_delete_callback()
+ */
+extern void test__f_iki_datass_delete_callback__works(void **state);
+
+#endif // _TEST__F_iki__datass_delete_callback
diff --git a/level_0/f_iki/tests/unit/c/test-iki-datass_destroy_callback.c b/level_0/f_iki/tests/unit/c/test-iki-datass_destroy_callback.c
new file mode 100644 (file)
index 0000000..f72d2df
--- /dev/null
@@ -0,0 +1,139 @@
+#include "test-iki.h"
+#include "test-iki-datass_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_iki_datass_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_string_ranges_t content = f_string_ranges_t_initialize;
+  f_number_unsigneds_t delimits = f_number_unsigneds_t_initialize;
+  f_string_ranges_t variable = f_string_ranges_t_initialize;
+  f_string_ranges_t vocabulary = f_string_ranges_t_initialize;
+  f_iki_data_t data = { .content = content, .delimits = delimits, .variable = variable, .vocabulary = vocabulary };
+  f_iki_data_t data_array[] = { data };
+  f_iki_datas_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_iki_datas_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_string_ranges_adjust, true);
+    will_return(__wrap_f_string_ranges_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_iki_datass_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_ranges_adjust, false);
+    will_return(__wrap_f_string_ranges_adjust, F_none);
+
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_iki_datass_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_ranges_adjust, false);
+    will_return(__wrap_f_string_ranges_adjust, F_none);
+
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_none);
+
+    will_return(__wrap_f_string_ranges_adjust, true);
+    will_return(__wrap_f_string_ranges_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_iki_datass_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_ranges_adjust, false);
+    will_return(__wrap_f_string_ranges_adjust, F_none);
+
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_none);
+
+    will_return(__wrap_f_string_ranges_adjust, false);
+    will_return(__wrap_f_string_ranges_adjust, F_none);
+
+    will_return(__wrap_f_string_ranges_adjust, true);
+    will_return(__wrap_f_string_ranges_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_iki_datass_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+
+  {
+    will_return(__wrap_f_string_ranges_adjust, false);
+    will_return(__wrap_f_string_ranges_adjust, F_none);
+
+    will_return(__wrap_f_memory_array_adjust, false);
+    will_return(__wrap_f_memory_array_adjust, F_none);
+
+    will_return(__wrap_f_string_ranges_adjust, false);
+    will_return(__wrap_f_string_ranges_adjust, F_none);
+
+    will_return(__wrap_f_string_ranges_adjust, false);
+    will_return(__wrap_f_string_ranges_adjust, F_none);
+
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_iki_datass_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_iki_datass_destroy_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_iki_datass_t datass = f_iki_datass_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_adjust(length, sizeof(f_iki_datas_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_adjust(1, sizeof(f_iki_data_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+
+    status = f_string_ranges_adjust(1, &datass.array[0].array[0].content);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_adjust(1, sizeof(f_number_unsigned_t), (void **) &datass.array[0].array[0].delimits.array, &datass.array[0].array[0].delimits.used, &datass.array[0].array[0].delimits.size);
+    assert_int_equal(status, F_none);
+
+    status = f_string_ranges_adjust(1, &datass.array[0].array[0].variable);
+    assert_int_equal(status, F_none);
+
+    status = f_string_ranges_adjust(1, &datass.array[0].array[0].vocabulary);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_iki_datass_destroy_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_iki/tests/unit/c/test-iki-datass_destroy_callback.h b/level_0/f_iki/tests/unit/c/test-iki-datass_destroy_callback.h
new file mode 100644 (file)
index 0000000..b914fff
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: IKI
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_iki__datass_destroy_callback
+#define _TEST__F_iki__datass_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_iki_datass_destroy_callback()
+ */
+extern void test__f_iki_datass_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_iki_datass_destroy_callback()
+ */
+extern void test__f_iki_datass_destroy_callback__works(void **state);
+
+#endif // _TEST__F_iki__datass_destroy_callback
index 03c0615f4d0526a863140ba7d99da8d04045ac83..f03237228a313dc32b7304a0e28de93320d3517f 100644 (file)
@@ -29,11 +29,15 @@ int main(void) {
     cmocka_unit_test(test__f_iki_content_partial_is__returns_false),
     cmocka_unit_test(test__f_iki_content_partial_is__returns_true),
 
-    cmocka_unit_test(test__f_iki_datas_destroy_callback__fails),
     cmocka_unit_test(test__f_iki_datas_delete_callback__fails),
+    cmocka_unit_test(test__f_iki_datas_destroy_callback__fails),
+    cmocka_unit_test(test__f_iki_datass_destroy_callback__fails),
+    cmocka_unit_test(test__f_iki_datass_delete_callback__fails),
 
-    cmocka_unit_test(test__f_iki_datas_destroy_callback__works),
     cmocka_unit_test(test__f_iki_datas_delete_callback__works),
+    cmocka_unit_test(test__f_iki_datas_destroy_callback__works),
+    cmocka_unit_test(test__f_iki_datass_delete_callback__works),
+    cmocka_unit_test(test__f_iki_datass_destroy_callback__works),
 
     cmocka_unit_test(test__f_iki_datas_append__works),
     cmocka_unit_test(test__f_iki_datas_append_all__works),
@@ -65,6 +69,8 @@ int main(void) {
 
       // f_iki_datas_destroy_callback() doesn't use parameter checking.
       // f_iki_datas_delete_callback() doesn't use parameter checking.
+      // f_iki_datass_destroy_callback() doesn't use parameter checking.
+      // f_iki_datass_delete_callback() doesn't use parameter checking.
 
       cmocka_unit_test(test__f_iki_datas_append__parameter_checking),
       cmocka_unit_test(test__f_iki_datas_append_all__parameter_checking),
index 92827c510d67be47ce0fa7395ae75a08fbdbb72b..24c1e1b44cb7f2ed9945a33bcadbd9cafe56fdad 100644 (file)
 // Test includes.
 #include "test-iki-content_is.h"
 #include "test-iki-content_partial_is.h"
-#include "test-iki-datas_destroy_callback.h"
 #include "test-iki-datas_append.h"
 #include "test-iki-datas_append_all.h"
 #include "test-iki-datas_delete_callback.h"
+#include "test-iki-datas_destroy_callback.h"
 #include "test-iki-datass_append.h"
 #include "test-iki-datass_append_all.h"
+#include "test-iki-datass_delete_callback.h"
+#include "test-iki-datass_destroy_callback.h"
 #include "test-iki-object_is.h"
 #include "test-iki-object_partial_is.h"
 #include "test-iki-read.h"
diff --git a/level_0/f_memory/c/memory/arrayss.c b/level_0/f_memory/c/memory/arrayss.c
deleted file mode 100644 (file)
index 3a433d8..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-#include "../memory.h"
-#include "private-array.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef _di_f_memory_arrayss_adjust_
-  f_status_t f_memory_arrayss_adjust(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size, f_status_t (*destroy_callback)(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array)) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!width) return F_status_set_error(F_parameter);
-      if (!array) return F_status_set_error(F_parameter);
-      if (!used) return F_status_set_error(F_parameter);
-      if (!size) return F_status_set_error(F_parameter);
-      if (!destroy_callback) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (length > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
-
-    if (length < *size) {
-      const f_status_t status = destroy_callback(length, *size, *array);
-      if (F_status_is_error(status)) return status;
-    }
-
-    return private_f_memory_array_adjust(length, width, array, used, size);
-  }
-#endif // _di_f_memory_arrayss_adjust_
-
-#ifndef _di_f_memory_arrayss_resize_
-  f_status_t f_memory_arrayss_resize(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size, f_status_t (*delete_callback)(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array)) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!width) return F_status_set_error(F_parameter);
-      if (!array) return F_status_set_error(F_parameter);
-      if (!used) return F_status_set_error(F_parameter);
-      if (!size) return F_status_set_error(F_parameter);
-      if (!delete_callback) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (length > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
-
-    if (length < *size) {
-      const f_status_t status = delete_callback(length, *size, *array);
-      if (F_status_is_error(status)) return status;
-    }
-
-    return private_f_memory_array_resize(length, width, array, used, size);
-  }
-#endif // _di_f_memory_arrayss_resize_
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_memory/c/memory/arrayss.h b/level_0/f_memory/c/memory/arrayss.h
deleted file mode 100644 (file)
index 3007929..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: Memory
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Defines memory array data.
- *
- * This is auto-included by memory.h and should not need to be explicitly included.
- */
-#ifndef _F_memory_arrayss_h
-#define _F_memory_arrayss_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Resize the memory array of arrays of arrays.
- *
- * This function is only useful for structures of the form "{ array, used, size }" where the array is a an array of simple types.
- * If the simple type that is "array" requires additional memory manipulation on allocation or de-allocation, then do not use this function.
- *
- * The inner array can be a more complex structure because the callback is expected to know the type.
- *
- * @param length
- *   The new size to use.
- * @param width
- *   The size of the structure represented by array.
- *   The word "width" is used due to conflicts of already using "length" and "size".
- *   Must not be 0.
- * @param array
- *   The structure.array to resize.
- * @param used
- *   The structure.used.
- * @param size
- *   The structure.size.
- * @param destroy_callback
- *   A callback to call on each array value when reducing the length of the array.
- *   This callback is expected to know the appropriate type and will cast the structure parameter to the appropriate type.
- *   This callback is intended to be used for deleting data and does not get called when adding new data.
- *
- *   This is only called when the requested length is less than the given size.
- *
- *   Callback Parameters:
- *     - start: The start position in the array to start deleting.
- *     - stop:  The stop in the array to stop deleting.
- *     - array: The array structure to delete all values of.
- *
- *   Callback Returns:
- *     The standard status codes similar to this function.
- *
- * @return
- *   F_none on success.
- *
- *   F_array_too_large (with error bit) if the new array length is too large.
- *   F_memory_not (with error bit) on out of memory.
- *   F_parameter (with error bit) if a parameter is invalid.
- */
-#ifndef _di_f_memory_arrayss_adjust_
-  extern f_status_t f_memory_arrayss_adjust(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size, f_status_t (*destroy_callback)(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array));
-#endif // _di_f_memory_arrayss_adjust_
-
-/**
- * Resize the memory array of arrays of arrays.
- *
- * This function is only useful for structures of the form "{ array, used, size }" where the array is a an array of simple types.
- * If the simple type that is "array" requires additional memory manipulation on allocation or de-allocation, then do not use this function.
- *
- * The inner array can be a more complex structure because the callback is expected to know the type.
- *
- * @param length
- *   The new size to use.
- * @param width
- *   The size of the structure represented by array.
- *   The word "width" is used due to conflicts of already using "length" and "size".
- *   Must not be 0.
- * @param array
- *   The structure.array to resize.
- * @param used
- *   The structure.used.
- * @param size
- *   The structure.size.
- * @param delete_callback
- *   A callback to call on each array value when reducing the length of the array.
- *   This callback is expected to know the appropriate type and will cast the structure parameter to the appropriate type.
- *   This callback is intended to be used for deleting data and does not get called when adding new data.
- *
- *   This is only called when the requested length is less than the given size.
- *
- *   Callback Parameters:
- *     - start: The start position in the array to start deleting.
- *     - stop:  The stop in the array to stop deleting.
- *     - array: The array structure to delete all values of.
- *
- *   Callback Returns:
- *     The standard status codes similar to this function.
- *
- * @return
- *   F_none on success.
- *
- *   F_array_too_large (with error bit) if the new array length is too large.
- *   F_memory_not (with error bit) on out of memory.
- *   F_parameter (with error bit) if a parameter is invalid.
- */
-#ifndef _di_f_memory_arrayss_resize_
-  extern f_status_t f_memory_arrayss_resize(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size, f_status_t (*delete_callback)(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array));
-#endif // _di_f_memory_arrayss_resize_
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _F_memory_arrayss_h
index d65c672523788a3028bd138fbd2084e0205602f1..df7c0545e554d247cb0915e105f6b0afdf77da96 100644 (file)
@@ -31,10 +31,10 @@ build_language c
 
 build_libraries -lc
 
-build_sources_library memory.c memory/array.c memory/arrays.c memory/arrayss.c
+build_sources_library memory.c memory/array.c memory/arrays.c
 build_sources_library private-memory.c memory/private-array.c
 
-build_sources_headers memory.h memory/array.h memory/arrays.h memory/arrayss.h memory/common.h
+build_sources_headers memory.h memory/array.h memory/arrays.h memory/common.h
 
 build_script yes
 build_shared yes
index acc6a10b7a8bfba6807b7f157a5c09956277920e..21779e52558dcd42992a5b2743f5d250c58e49b9 100644 (file)
@@ -26,7 +26,6 @@ build_libraries-individual -lf_memory
 build_sources_program test-memory-adjust.c test-memory-delete.c test-memory-destroy.c test-memory-new_aligned.c test-memory-new.c test-memory-resize.c test-memory.c
 build_sources_program test-memory-array_adjust.c test-memory-array_append.c test-memory-array_append_all.c test-memory-array_decimate_by.c test-memory-array_decrease_by.c test-memory-array_increase.c test-memory-array_increase_by.c test-memory-array_resize.c
 build_sources_program test-memory-arrays_adjust.c test-memory-arrays_resize.c
-build_sources_program test-memory-arrayss_adjust.c test-memory-arrayss_resize.c
 
 build_script no
 build_shared yes
index 5cc8878a477b406db32f0d129ff7567bb73606b1..8636a840f86f1d0bbc93417116326a1734ebccc3 100644 (file)
@@ -44,9 +44,6 @@ int main(void) {
     cmocka_unit_test(test__f_memory_arrays_adjust__returns_array_too_large),
     cmocka_unit_test(test__f_memory_arrays_resize__returns_array_too_large),
 
-    cmocka_unit_test(test__f_memory_arrayss_adjust__returns_array_too_large),
-    cmocka_unit_test(test__f_memory_arrayss_resize__returns_array_too_large),
-
     cmocka_unit_test(test__f_memory_array_append_all__returns_data_not),
     cmocka_unit_test(test__f_memory_array_decimate_by__returns_data_not),
     cmocka_unit_test(test__f_memory_array_decrease_by__returns_data_not),
@@ -65,9 +62,6 @@ int main(void) {
     cmocka_unit_test(test__f_memory_arrays_adjust__works),
     cmocka_unit_test(test__f_memory_arrays_resize__works),
 
-    cmocka_unit_test(test__f_memory_arrayss_adjust__works),
-    cmocka_unit_test(test__f_memory_arrayss_resize__works),
-
     #ifndef _di_level_0_parameter_checking_
       cmocka_unit_test(test__f_memory_adjust__parameter_checking),
       cmocka_unit_test(test__f_memory_delete__parameter_checking),
@@ -86,9 +80,6 @@ int main(void) {
 
       cmocka_unit_test(test__f_memory_arrays_adjust__parameter_checking),
       cmocka_unit_test(test__f_memory_arrays_resize__parameter_checking),
-
-      cmocka_unit_test(test__f_memory_arrayss_adjust__parameter_checking),
-      cmocka_unit_test(test__f_memory_arrayss_resize__parameter_checking),
     #endif // _di_level_0_parameter_checking_
   };
 
index 443d946c577d857e2bc370be2ef84b65cb049635..9958b7336fef49c1fd5ec6c5b151984217f51d61 100644 (file)
@@ -34,8 +34,6 @@
 #include "test-memory-array_resize.h"
 #include "test-memory-arrays_adjust.h"
 #include "test-memory-arrays_resize.h"
-#include "test-memory-arrayss_adjust.h"
-#include "test-memory-arrayss_resize.h"
 #include "test-memory-delete.h"
 #include "test-memory-destroy.h"
 #include "test-memory-new.h"
@@ -69,17 +67,6 @@ typedef struct {
 #define test_memory_arrays_t_initialize { 0, 0, 0 }
 
 /**
- * A structure used for testing the memory arrayss functions.
- */
-typedef struct {
-  test_memory_arrays_t *array;
-  f_number_unsigned_t used;
-  f_number_unsigned_t size;
-} test_memory_arrayss_t;
-
-#define test_memory_arrayss_t_initialize { 0, 0, 0 }
-
-/**
  * Perform any setup operations.
  *
  * @param state
index 46c80ed46b9ae94f561b7ddd50894481bc02e4a0..53627d552cfec8eec344fa201a138f857f6291e8 100644 (file)
@@ -64,4 +64,6 @@ flags_library -fPIC
 # Inject mocks.
 flags -Wl,--wrap=f_memory_array_adjust
 flags -Wl,--wrap=f_memory_array_resize
+flags -Wl,--wrap=f_memory_arrays_adjust
+flags -Wl,--wrap=f_memory_arrays_resize
 flags -Wl,--wrap=poll
index 0518496748e72db0df12e1f1abca76d8c3037305..d3ad7ba0ecad893959f27810762d8ea5effbd275 100644 (file)
@@ -23,23 +23,23 @@ build_language c
 build_libraries -lc -lcmocka
 build_libraries-individual -lf_memory -lf_type_array
 
-build_sources_program test-type_array-cells_destroy_callback.c test-type_array-cells_delete_callback.c
-build_sources_program test-type_array-files_destroy_callback.c test-type_array-files_delete_callback.c
-build_sources_program test-type_array-fll_ids_destroy_callback.c test-type_array-fll_ids_delete_callback.c
-build_sources_program test-type_array-int8s_destroy_callback.c test-type_array-int8s_delete_callback.c
-build_sources_program test-type_array-int16s_destroy_callback.c test-type_array-int16s_delete_callback.c
-build_sources_program test-type_array-int32s_destroy_callback.c test-type_array-int32s_delete_callback.c
-build_sources_program test-type_array-int64s_destroy_callback.c test-type_array-int64s_delete_callback.c
-build_sources_program test-type_array-int128s_destroy_callback.c test-type_array-int128s_delete_callback.c
-build_sources_program test-type_array-number_unsigneds_destroy_callback.c test-type_array-number_unsigneds_delete_callback.c
-build_sources_program test-type_array-polls_destroy_callback.c test-type_array-polls_delete_callback.c
-build_sources_program test-type_array-states_destroy_callback.c test-type_array-states_delete_callback.c
-build_sources_program test-type_array-statuss_destroy_callback.c test-type_array-statuss_delete_callback.c
-build_sources_program test-type_array-uint8s_destroy_callback.c test-type_array-uint8s_delete_callback.c
-build_sources_program test-type_array-uint16s_destroy_callback.c test-type_array-uint16s_delete_callback.c
-build_sources_program test-type_array-uint32s_destroy_callback.c test-type_array-uint32s_delete_callback.c
-build_sources_program test-type_array-uint64s_destroy_callback.c test-type_array-uint64s_delete_callback.c
-build_sources_program test-type_array-uint128s_destroy_callback.c test-type_array-uint128s_delete_callback.c
+build_sources_program test-type_array-cellss_delete_callback.c test-type_array-cellss_destroy_callback.c
+build_sources_program test-type_array-filess_delete_callback.c test-type_array-filess_destroy_callback.c
+build_sources_program test-type_array-fll_idss_delete_callback.c test-type_array-fll_idss_destroy_callback.c
+build_sources_program test-type_array-int8ss_delete_callback.c test-type_array-int8ss_destroy_callback.c
+build_sources_program test-type_array-int16ss_delete_callback.c test-type_array-int16ss_destroy_callback.c
+build_sources_program test-type_array-int32ss_delete_callback.c test-type_array-int32ss_destroy_callback.c
+build_sources_program test-type_array-int64ss_delete_callback.c test-type_array-int64ss_destroy_callback.c
+build_sources_program test-type_array-int128ss_delete_callback.c test-type_array-int128ss_destroy_callback.c
+build_sources_program test-type_array-number_unsignedss_delete_callback.c test-type_array-number_unsignedss_destroy_callback.c
+build_sources_program test-type_array-pollss_delete_callback.c test-type_array-pollss_destroy_callback.c
+build_sources_program test-type_array-statess_delete_callback.c test-type_array-statess_destroy_callback.c
+build_sources_program test-type_array-statusss_delete_callback.c test-type_array-statusss_destroy_callback.c
+build_sources_program test-type_array-uint8ss_delete_callback.c test-type_array-uint8ss_destroy_callback.c
+build_sources_program test-type_array-uint16ss_delete_callback.c test-type_array-uint16ss_destroy_callback.c
+build_sources_program test-type_array-uint32ss_delete_callback.c test-type_array-uint32ss_destroy_callback.c
+build_sources_program test-type_array-uint64ss_delete_callback.c test-type_array-uint64ss_destroy_callback.c
+build_sources_program test-type_array-uint128ss_delete_callback.c test-type_array-uint128ss_destroy_callback.c
 
 build_sources_program test-type_array.c
 
index 02f61f7f828c5c46b7c7342085658be8442d22ad..46c6a2f03a7cf4935b49f074594b8bbc859fd0ad 100644 (file)
@@ -4,8 +4,15 @@
 extern "C" {
 #endif
 
+int mock_unwrap = 0;
+int mock_unwrap_f_memory = 1;
+
 f_status_t __wrap_f_memory_array_adjust(const f_number_unsigned_t length, const size_t width, void ** array, f_number_unsigned_t * const used, f_number_unsigned_t * const size) {
 
+  if (mock_unwrap_f_memory) {
+    return __real_f_memory_array_adjust(length, width, array, used, size);
+  }
+
   if (!array || !used || !size) return F_status_set_error(F_parameter_not);
 
   const bool failure = mock_type(bool);
@@ -19,6 +26,10 @@ f_status_t __wrap_f_memory_array_adjust(const f_number_unsigned_t length, const
 
 f_status_t __wrap_f_memory_array_resize(const f_number_unsigned_t length, const size_t width, void ** array, f_number_unsigned_t * const used, f_number_unsigned_t * const size) {
 
+  if (mock_unwrap_f_memory) {
+    return __real_f_memory_array_adjust(length, width, array, used, size);
+  }
+
   if (!array || !used || !size) return F_status_set_error(F_parameter_not);
 
   const bool failure = mock_type(bool);
@@ -30,8 +41,46 @@ f_status_t __wrap_f_memory_array_resize(const f_number_unsigned_t length, const
   return mock_type(f_status_t);
 }
 
+f_status_t __wrap_f_memory_arrays_adjust(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size, f_status_t (*callback)(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array)) {
+
+  if (mock_unwrap_f_memory) {
+    return __real_f_memory_arrays_resize(length, width, array, used, size, callback);
+  }
+
+  if (!array || !used || !size || !callback) return F_status_set_error(F_parameter_not);
+
+  const bool failure = mock_type(bool);
+
+  if (failure) return mock_type(f_status_t);
+
+  *size = length;
+
+  return mock_type(f_status_t);
+}
+
+f_status_t __wrap_f_memory_arrays_resize(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size, f_status_t (*callback)(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array)) {
+
+  if (mock_unwrap_f_memory) {
+    return __real_f_memory_arrays_resize(length, width, array, used, size, callback);
+  }
+
+  if (!array || !used || !size || !callback) return F_status_set_error(F_parameter_not);
+
+  const bool failure = mock_type(bool);
+
+  if (failure) return mock_type(f_status_t);
+
+  *size = length;
+
+  return mock_type(f_status_t);
+}
+
 int __wrap_poll(f_poll_t *fds, nfds_t nfds, int timeout) {
 
+  if (mock_unwrap) {
+    return __real_poll(fds, nfds, timeout);
+  }
+
   const bool failure = mock_type(bool);
 
   if (failure) {
index 92441e0df4732788c6490a8b93e6bb6b3c870aef..f263d3fc65d99fdadfbfc29639d1baec578d61c2 100644 (file)
@@ -30,8 +30,23 @@ extern "C" {
 
 const static int mock_errno_generic = 32767;
 
+extern int mock_unwrap;
+extern int mock_unwrap_f_memory;
+
+extern f_status_t __real_f_memory_array_adjust(const f_number_unsigned_t length, const size_t width, void ** array, f_number_unsigned_t * const used, f_number_unsigned_t * const size);
+extern f_status_t __real_f_memory_array_resize(const f_number_unsigned_t length, const size_t width, void ** array, f_number_unsigned_t * const used, f_number_unsigned_t * const size);
+
+extern f_status_t __real_f_memory_arrays_adjust(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size, f_status_t (*callback)(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array));
+extern f_status_t __real_f_memory_arrays_resize(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size, f_status_t (*callback)(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array));
+
+extern int __real_poll(f_poll_t *fds, nfds_t nfds, int timeout);
+
 extern f_status_t __wrap_f_memory_array_adjust(const f_number_unsigned_t length, const size_t width, void ** array, f_number_unsigned_t * const used, f_number_unsigned_t * const size);
-extern f_status_t __wrap_f_memory_array_resizze(const f_number_unsigned_t length, const size_t width, void ** array, f_number_unsigned_t * const used, f_number_unsigned_t * const size);
+extern f_status_t __wrap_f_memory_array_resize(const f_number_unsigned_t length, const size_t width, void ** array, f_number_unsigned_t * const used, f_number_unsigned_t * const size);
+
+extern f_status_t __wrap_f_memory_arrays_adjust(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size, f_status_t (*callback)(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array));
+extern f_status_t __wrap_f_memory_arrays_resize(const f_number_unsigned_t length, const size_t width, void ** const array, f_number_unsigned_t * const used, f_number_unsigned_t * const size, f_status_t (*callback)(const f_number_unsigned_t start, const f_number_unsigned_t size, void * const array));
+
 extern int __wrap_poll(f_poll_t *fds, nfds_t nfds, int timeout);
 
 #ifdef __cplusplus
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-cells_delete_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-cells_delete_callback.c
deleted file mode 100644 (file)
index 46fe109..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "test-type_array.h"
-#include "test-type_array-cells_delete_callback.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_cells_delete_callback__fails(void **state) {
-
-  f_cell_t data = f_cell_t_initialize;
-  f_cell_t data_array[] = { data };
-  f_cells_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_cells_t datass_array[] = { datas };
-
-  {
-    will_return(__wrap_f_memory_array_resize, true);
-    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
-
-    const f_status_t status = f_cells_delete_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-}
-
-void test__f_type_array_cells_delete_callback__works(void **state) {
-
-  f_cell_t data = f_cell_t_initialize;
-  f_cell_t data_array[] = { data };
-  f_cells_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_cells_t datass_array[] = { datas };
-  const f_number_unsigned_t length = 1;
-
-  {
-    will_return(__wrap_f_memory_array_resize, false);
-    will_return(__wrap_f_memory_array_resize, F_none);
-
-    const f_status_t status = f_cells_delete_callback(0, length, (void *) datass_array);
-
-    assert_int_equal(status, F_none);
-  }
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-cells_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-cells_delete_callback.h
deleted file mode 100644 (file)
index e514b54..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__cells_delete_callback
-#define _TEST__F_type_array__cells_delete_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_cells_delete_callback()
- */
-extern void test__f_type_array_cells_delete_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_cells_delete_callback()
- */
-extern void test__f_type_array_cells_delete_callback__works(void **state);
-
-#endif // _TEST__F_type_array__cells_delete_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-cells_destroy_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-cells_destroy_callback.c
deleted file mode 100644 (file)
index 706d5bd..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "test-type_array.h"
-#include "test-type_array-cells_destroy_callback.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_cells_destroy_callback__fails(void **state) {
-
-  f_cell_t data = f_cell_t_initialize;
-  f_cell_t data_array[] = { data };
-  f_cells_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_cells_t datass_array[] = { datas };
-
-  {
-    will_return(__wrap_f_memory_array_adjust, true);
-    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
-
-    const f_status_t status = f_cells_destroy_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-}
-
-void test__f_type_array_cells_destroy_callback__works(void **state) {
-
-  f_cell_t data = f_cell_t_initialize;
-  f_cell_t data_array[] = { data };
-  f_cells_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_cells_t datass_array[] = { datas };
-  const f_number_unsigned_t length = 1;
-
-  {
-    will_return(__wrap_f_memory_array_adjust, false);
-    will_return(__wrap_f_memory_array_adjust, F_none);
-
-    const f_status_t status = f_cells_destroy_callback(0, length, (void *) datass_array);
-
-    assert_int_equal(status, F_none);
-  }
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-cells_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-cells_destroy_callback.h
deleted file mode 100644 (file)
index 9eb8873..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__cells_destroy_callback
-#define _TEST__F_type_array__cells_destroy_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_cells_destroy_callback()
- */
-extern void test__f_type_array_cells_destroy_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_cells_destroy_callback()
- */
-extern void test__f_type_array_cells_destroy_callback__works(void **state);
-
-#endif // _TEST__F_type_array__cells_destroy_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-cellss_delete_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-cellss_delete_callback.c
new file mode 100644 (file)
index 0000000..1e14bae
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-type_array.h"
+#include "test-type_array-cellss_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_cellss_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_cell_t data = f_cell_t_initialize;
+  f_cell_t data_array[] = { data };
+  f_cells_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_cells_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_cellss_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_type_array_cellss_delete_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_cellss_t datass = f_cellss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_cells_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_resize(1, sizeof(f_cell_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_cellss_delete_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-cellss_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-cellss_delete_callback.h
new file mode 100644 (file)
index 0000000..60ea14c
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__cellss_delete_callback
+#define _TEST__F_type_array__cellss_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_cellss_delete_callback()
+ */
+extern void test__f_type_array_cellss_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_cellss_delete_callback()
+ */
+extern void test__f_type_array_cellss_delete_callback__works(void **state);
+
+#endif // _TEST__F_type_array__cellss_delete_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-cellss_destroy_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-cellss_destroy_callback.c
new file mode 100644 (file)
index 0000000..6ddc30b
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-type_array.h"
+#include "test-type_array-cellss_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_cellss_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_cell_t data = f_cell_t_initialize;
+  f_cell_t data_array[] = { data };
+  f_cells_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_cells_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_cellss_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_type_array_cellss_destroy_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_cellss_t datass = f_cellss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_adjust(length, sizeof(f_cells_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_adjust(1, sizeof(f_cell_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_cellss_destroy_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-cellss_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-cellss_destroy_callback.h
new file mode 100644 (file)
index 0000000..fb30c5c
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__cellss_destroy_callback
+#define _TEST__F_type_array__cellss_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_cellss_destroy_callback()
+ */
+extern void test__f_type_array_cellss_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_cellss_destroy_callback()
+ */
+extern void test__f_type_array_cellss_destroy_callback__works(void **state);
+
+#endif // _TEST__F_type_array__cellss_destroy_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-files_delete_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-files_delete_callback.c
deleted file mode 100644 (file)
index 6ba1927..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "test-type_array.h"
-#include "test-type_array-files_delete_callback.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_files_delete_callback__fails(void **state) {
-
-  f_file_t data = f_file_t_initialize;
-  f_file_t data_array[] = { data };
-  f_files_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_files_t datass_array[] = { datas };
-
-  {
-    will_return(__wrap_f_memory_array_resize, true);
-    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
-
-    const f_status_t status = f_files_delete_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-}
-
-void test__f_type_array_files_delete_callback__works(void **state) {
-
-  f_file_t data = f_file_t_initialize;
-  f_file_t data_array[] = { data };
-  f_files_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_files_t datass_array[] = { datas };
-  const f_number_unsigned_t length = 1;
-
-  {
-    will_return(__wrap_f_memory_array_resize, false);
-    will_return(__wrap_f_memory_array_resize, F_none);
-
-    const f_status_t status = f_files_delete_callback(0, length, (void *) datass_array);
-
-    assert_int_equal(status, F_none);
-  }
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-files_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-files_delete_callback.h
deleted file mode 100644 (file)
index f9e6903..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__files_delete_callback
-#define _TEST__F_type_array__files_delete_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_files_delete_callback()
- */
-extern void test__f_type_array_files_delete_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_files_delete_callback()
- */
-extern void test__f_type_array_files_delete_callback__works(void **state);
-
-#endif // _TEST__F_type_array__files_delete_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-files_destroy_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-files_destroy_callback.c
deleted file mode 100644 (file)
index 3af9fc1..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "test-type_array.h"
-#include "test-type_array-files_destroy_callback.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_files_destroy_callback__fails(void **state) {
-
-  f_file_t data = f_file_t_initialize;
-  f_file_t data_array[] = { data };
-  f_files_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_files_t datass_array[] = { datas };
-
-  {
-    will_return(__wrap_f_memory_array_adjust, true);
-    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
-
-    const f_status_t status = f_files_destroy_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-}
-
-void test__f_type_array_files_destroy_callback__works(void **state) {
-
-  f_file_t data = f_file_t_initialize;
-  f_file_t data_array[] = { data };
-  f_files_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_files_t datass_array[] = { datas };
-  const f_number_unsigned_t length = 1;
-
-  {
-    will_return(__wrap_f_memory_array_adjust, false);
-    will_return(__wrap_f_memory_array_adjust, F_none);
-
-    const f_status_t status = f_files_destroy_callback(0, length, (void *) datass_array);
-
-    assert_int_equal(status, F_none);
-  }
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-files_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-files_destroy_callback.h
deleted file mode 100644 (file)
index 7f74897..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__files_destroy_callback
-#define _TEST__F_type_array__files_destroy_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_files_destroy_callback()
- */
-extern void test__f_type_array_files_destroy_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_files_destroy_callback()
- */
-extern void test__f_type_array_files_destroy_callback__works(void **state);
-
-#endif // _TEST__F_type_array__files_destroy_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-filess_delete_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-filess_delete_callback.c
new file mode 100644 (file)
index 0000000..9118863
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-type_array.h"
+#include "test-type_array-filess_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_filess_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_file_t data = f_file_t_initialize;
+  f_file_t data_array[] = { data };
+  f_files_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_files_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_filess_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_type_array_filess_delete_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_filess_t datass = f_filess_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_files_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_resize(1, sizeof(f_file_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_filess_delete_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-filess_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-filess_delete_callback.h
new file mode 100644 (file)
index 0000000..d2688cf
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__filess_delete_callback
+#define _TEST__F_type_array__filess_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_filess_delete_callback()
+ */
+extern void test__f_type_array_filess_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_filess_delete_callback()
+ */
+extern void test__f_type_array_filess_delete_callback__works(void **state);
+
+#endif // _TEST__F_type_array__filess_delete_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-filess_destroy_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-filess_destroy_callback.c
new file mode 100644 (file)
index 0000000..7b58459
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-type_array.h"
+#include "test-type_array-filess_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_filess_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_file_t data = f_file_t_initialize;
+  f_file_t data_array[] = { data };
+  f_files_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_files_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_filess_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_type_array_filess_destroy_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_filess_t datass = f_filess_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_adjust(length, sizeof(f_files_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_adjust(1, sizeof(f_file_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_filess_destroy_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-filess_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-filess_destroy_callback.h
new file mode 100644 (file)
index 0000000..a642dd7
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__filess_destroy_callback
+#define _TEST__F_type_array__filess_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_filess_destroy_callback()
+ */
+extern void test__f_type_array_filess_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_filess_destroy_callback()
+ */
+extern void test__f_type_array_filess_destroy_callback__works(void **state);
+
+#endif // _TEST__F_type_array__filess_destroy_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_delete_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_delete_callback.c
deleted file mode 100644 (file)
index b9dfa83..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "test-type_array.h"
-#include "test-type_array-fll_ids_delete_callback.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_fll_ids_delete_callback__fails(void **state) {
-
-  f_fll_id_t data = f_fll_id_t_initialize;
-  f_fll_id_t data_array[] = { data };
-  f_fll_ids_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_fll_ids_t datass_array[] = { datas };
-
-  {
-    will_return(__wrap_f_memory_array_resize, true);
-    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
-
-    const f_status_t status = f_fll_ids_delete_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-}
-
-void test__f_type_array_fll_ids_delete_callback__works(void **state) {
-
-  f_fll_id_t data = f_fll_id_t_initialize;
-  f_fll_id_t data_array[] = { data };
-  f_fll_ids_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_fll_ids_t datass_array[] = { datas };
-  const f_number_unsigned_t length = 1;
-
-  {
-    will_return(__wrap_f_memory_array_resize, false);
-    will_return(__wrap_f_memory_array_resize, F_none);
-
-    const f_status_t status = f_fll_ids_delete_callback(0, length, (void *) datass_array);
-
-    assert_int_equal(status, F_none);
-  }
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_delete_callback.h
deleted file mode 100644 (file)
index 472a906..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__fll_ids_delete_callback
-#define _TEST__F_type_array__fll_ids_delete_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_fll_ids_delete_callback()
- */
-extern void test__f_type_array_fll_ids_delete_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fll_ids_delete_callback()
- */
-extern void test__f_type_array_fll_ids_delete_callback__works(void **state);
-
-#endif // _TEST__F_type_array__fll_ids_delete_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_destroy_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_destroy_callback.c
deleted file mode 100644 (file)
index 2691c79..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "test-type_array.h"
-#include "test-type_array-fll_ids_destroy_callback.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_fll_ids_destroy_callback__fails(void **state) {
-
-  f_fll_id_t data = f_fll_id_t_initialize;
-  f_fll_id_t data_array[] = { data };
-  f_fll_ids_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_fll_ids_t datass_array[] = { datas };
-
-  {
-    will_return(__wrap_f_memory_array_adjust, true);
-    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
-
-    const f_status_t status = f_fll_ids_destroy_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-}
-
-void test__f_type_array_fll_ids_destroy_callback__works(void **state) {
-
-  f_fll_id_t data = f_fll_id_t_initialize;
-  f_fll_id_t data_array[] = { data };
-  f_fll_ids_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_fll_ids_t datass_array[] = { datas };
-  const f_number_unsigned_t length = 1;
-
-  {
-    will_return(__wrap_f_memory_array_adjust, false);
-    will_return(__wrap_f_memory_array_adjust, F_none);
-
-    const f_status_t status = f_fll_ids_destroy_callback(0, length, (void *) datass_array);
-
-    assert_int_equal(status, F_none);
-  }
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_destroy_callback.h
deleted file mode 100644 (file)
index cd90c41..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__fll_ids_destroy_callback
-#define _TEST__F_type_array__fll_ids_destroy_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_fll_ids_destroy_callback()
- */
-extern void test__f_type_array_fll_ids_destroy_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_fll_ids_destroy_callback()
- */
-extern void test__f_type_array_fll_ids_destroy_callback__works(void **state);
-
-#endif // _TEST__F_type_array__fll_ids_destroy_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_delete_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_delete_callback.c
new file mode 100644 (file)
index 0000000..5797651
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-type_array.h"
+#include "test-type_array-fll_idss_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_fll_idss_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fll_id_t data = f_fll_id_t_initialize;
+  f_fll_id_t data_array[] = { data };
+  f_fll_ids_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_fll_ids_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fll_idss_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_type_array_fll_idss_delete_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_fll_idss_t datass = f_fll_idss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_fll_ids_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_resize(1, sizeof(f_fll_id_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_fll_idss_delete_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_delete_callback.h
new file mode 100644 (file)
index 0000000..4f02b30
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__fll_idss_delete_callback
+#define _TEST__F_type_array__fll_idss_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_fll_idss_delete_callback()
+ */
+extern void test__f_type_array_fll_idss_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fll_idss_delete_callback()
+ */
+extern void test__f_type_array_fll_idss_delete_callback__works(void **state);
+
+#endif // _TEST__F_type_array__fll_idss_delete_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_destroy_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_destroy_callback.c
new file mode 100644 (file)
index 0000000..b4d5178
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-type_array.h"
+#include "test-type_array-fll_idss_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_fll_idss_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_fll_id_t data = f_fll_id_t_initialize;
+  f_fll_id_t data_array[] = { data };
+  f_fll_ids_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_fll_ids_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_fll_idss_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_type_array_fll_idss_destroy_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_fll_idss_t datass = f_fll_idss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_adjust(length, sizeof(f_fll_ids_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_adjust(1, sizeof(f_fll_id_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_fll_idss_destroy_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_destroy_callback.h
new file mode 100644 (file)
index 0000000..e0ced0a
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__fll_idss_destroy_callback
+#define _TEST__F_type_array__fll_idss_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_fll_idss_destroy_callback()
+ */
+extern void test__f_type_array_fll_idss_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fll_idss_destroy_callback()
+ */
+extern void test__f_type_array_fll_idss_destroy_callback__works(void **state);
+
+#endif // _TEST__F_type_array__fll_idss_destroy_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int128s_delete_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-int128s_delete_callback.c
deleted file mode 100644 (file)
index 94f141f..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "test-type_array.h"
-#include "test-type_array-int128s_delete_callback.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int128s_delete_callback__fails(void **state) {
-
-  f_int128_t data = 0;
-  f_int128_t data_array[] = { data };
-  f_int128s_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_int128s_t datass_array[] = { datas };
-
-  {
-    will_return(__wrap_f_memory_array_resize, true);
-    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
-
-    const f_status_t status = f_int128s_delete_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-}
-
-void test__f_type_array_int128s_delete_callback__works(void **state) {
-
-  f_int128_t data = 0;
-  f_int128_t data_array[] = { data };
-  f_int128s_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_int128s_t datass_array[] = { datas };
-  const f_number_unsigned_t length = 1;
-
-  {
-    will_return(__wrap_f_memory_array_resize, false);
-    will_return(__wrap_f_memory_array_resize, F_none);
-
-    const f_status_t status = f_int128s_delete_callback(0, length, (void *) datass_array);
-
-    assert_int_equal(status, F_none);
-  }
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int128s_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-int128s_delete_callback.h
deleted file mode 100644 (file)
index 3273acb..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__int128s_delete_callback
-#define _TEST__F_type_array__int128s_delete_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_int128s_delete_callback()
- */
-extern void test__f_type_array_int128s_delete_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int128s_delete_callback()
- */
-extern void test__f_type_array_int128s_delete_callback__works(void **state);
-
-#endif // _TEST__F_type_array__int128s_delete_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int128s_destroy_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-int128s_destroy_callback.c
deleted file mode 100644 (file)
index 474a889..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "test-type_array.h"
-#include "test-type_array-int128s_destroy_callback.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int128s_destroy_callback__fails(void **state) {
-
-  f_int128_t data = 0;
-  f_int128_t data_array[] = { data };
-  f_int128s_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_int128s_t datass_array[] = { datas };
-
-  {
-    will_return(__wrap_f_memory_array_adjust, true);
-    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
-
-    const f_status_t status = f_int128s_destroy_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-}
-
-void test__f_type_array_int128s_destroy_callback__works(void **state) {
-
-  f_int128_t data = 0;
-  f_int128_t data_array[] = { data };
-  f_int128s_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_int128s_t datass_array[] = { datas };
-  const f_number_unsigned_t length = 1;
-
-  {
-    will_return(__wrap_f_memory_array_adjust, false);
-    will_return(__wrap_f_memory_array_adjust, F_none);
-
-    const f_status_t status = f_int128s_destroy_callback(0, length, (void *) datass_array);
-
-    assert_int_equal(status, F_none);
-  }
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int128s_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-int128s_destroy_callback.h
deleted file mode 100644 (file)
index 4db2028..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__int128s_destroy_callback
-#define _TEST__F_type_array__int128s_destroy_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_int128s_destroy_callback()
- */
-extern void test__f_type_array_int128s_destroy_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int128s_destroy_callback()
- */
-extern void test__f_type_array_int128s_destroy_callback__works(void **state);
-
-#endif // _TEST__F_type_array__int128s_destroy_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int128ss_delete_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-int128ss_delete_callback.c
new file mode 100644 (file)
index 0000000..07512fc
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-type_array.h"
+#include "test-type_array-int128ss_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_int128ss_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_int128_t data = 0;
+  f_int128_t data_array[] = { data };
+  f_int128s_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_int128s_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_int128ss_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_type_array_int128ss_delete_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_int128ss_t datass = f_int128ss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_int128s_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_resize(1, sizeof(f_int128_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_int128ss_delete_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int128ss_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-int128ss_delete_callback.h
new file mode 100644 (file)
index 0000000..2c4e448
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__int128ss_delete_callback
+#define _TEST__F_type_array__int128ss_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_int128ss_delete_callback()
+ */
+extern void test__f_type_array_int128ss_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int128ss_delete_callback()
+ */
+extern void test__f_type_array_int128ss_delete_callback__works(void **state);
+
+#endif // _TEST__F_type_array__int128ss_delete_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int128ss_destroy_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-int128ss_destroy_callback.c
new file mode 100644 (file)
index 0000000..ac9c4d5
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-type_array.h"
+#include "test-type_array-int128ss_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_int128ss_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_int128_t data = 0;
+  f_int128_t data_array[] = { data };
+  f_int128s_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_int128s_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_int128ss_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_type_array_int128ss_destroy_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_int128ss_t datass = f_int128ss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_adjust(length, sizeof(f_int128s_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_adjust(1, sizeof(f_int128_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_int128ss_destroy_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int128ss_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-int128ss_destroy_callback.h
new file mode 100644 (file)
index 0000000..1761aa3
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__int128ss_destroy_callback
+#define _TEST__F_type_array__int128ss_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_int128ss_destroy_callback()
+ */
+extern void test__f_type_array_int128ss_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int128ss_destroy_callback()
+ */
+extern void test__f_type_array_int128ss_destroy_callback__works(void **state);
+
+#endif // _TEST__F_type_array__int128ss_destroy_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int16s_delete_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-int16s_delete_callback.c
deleted file mode 100644 (file)
index 7a70378..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "test-type_array.h"
-#include "test-type_array-int16s_delete_callback.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int16s_delete_callback__fails(void **state) {
-
-  int16_t data = 0;
-  int16_t data_array[] = { data };
-  f_int16s_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_int16s_t datass_array[] = { datas };
-
-  {
-    will_return(__wrap_f_memory_array_resize, true);
-    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
-
-    const f_status_t status = f_int16s_delete_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-}
-
-void test__f_type_array_int16s_delete_callback__works(void **state) {
-
-  int16_t data = 0;
-  int16_t data_array[] = { data };
-  f_int16s_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_int16s_t datass_array[] = { datas };
-  const f_number_unsigned_t length = 1;
-
-  {
-    will_return(__wrap_f_memory_array_resize, false);
-    will_return(__wrap_f_memory_array_resize, F_none);
-
-    const f_status_t status = f_int16s_delete_callback(0, length, (void *) datass_array);
-
-    assert_int_equal(status, F_none);
-  }
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int16s_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-int16s_delete_callback.h
deleted file mode 100644 (file)
index 91ccdaf..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__int16s_delete_callback
-#define _TEST__F_type_array__int16s_delete_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_int16s_delete_callback()
- */
-extern void test__f_type_array_int16s_delete_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int16s_delete_callback()
- */
-extern void test__f_type_array_int16s_delete_callback__works(void **state);
-
-#endif // _TEST__F_type_array__int16s_delete_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int16s_destroy_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-int16s_destroy_callback.c
deleted file mode 100644 (file)
index 8016baf..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "test-type_array.h"
-#include "test-type_array-int16s_destroy_callback.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int16s_destroy_callback__fails(void **state) {
-
-  int16_t data = 0;
-  int16_t data_array[] = { data };
-  f_int16s_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_int16s_t datass_array[] = { datas };
-
-  {
-    will_return(__wrap_f_memory_array_adjust, true);
-    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
-
-    const f_status_t status = f_int16s_destroy_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-}
-
-void test__f_type_array_int16s_destroy_callback__works(void **state) {
-
-  int16_t data = 0;
-  int16_t data_array[] = { data };
-  f_int16s_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_int16s_t datass_array[] = { datas };
-  const f_number_unsigned_t length = 1;
-
-  {
-    will_return(__wrap_f_memory_array_adjust, false);
-    will_return(__wrap_f_memory_array_adjust, F_none);
-
-    const f_status_t status = f_int16s_destroy_callback(0, length, (void *) datass_array);
-
-    assert_int_equal(status, F_none);
-  }
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int16s_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-int16s_destroy_callback.h
deleted file mode 100644 (file)
index 068ccd7..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__int16s_destroy_callback
-#define _TEST__F_type_array__int16s_destroy_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_int16s_destroy_callback()
- */
-extern void test__f_type_array_int16s_destroy_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int16s_destroy_callback()
- */
-extern void test__f_type_array_int16s_destroy_callback__works(void **state);
-
-#endif // _TEST__F_type_array__int16s_destroy_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int16ss_delete_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-int16ss_delete_callback.c
new file mode 100644 (file)
index 0000000..020e11f
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-type_array.h"
+#include "test-type_array-int16ss_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_int16ss_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  int16_t data = 0;
+  int16_t data_array[] = { data };
+  f_int16s_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_int16s_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_int16ss_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_type_array_int16ss_delete_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_int16ss_t datass = f_int16ss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_int16s_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_resize(1, sizeof(int16_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_int16ss_delete_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int16ss_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-int16ss_delete_callback.h
new file mode 100644 (file)
index 0000000..424fd03
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__int16ss_delete_callback
+#define _TEST__F_type_array__int16ss_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_int16ss_delete_callback()
+ */
+extern void test__f_type_array_int16ss_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int16ss_delete_callback()
+ */
+extern void test__f_type_array_int16ss_delete_callback__works(void **state);
+
+#endif // _TEST__F_type_array__int16ss_delete_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int16ss_destroy_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-int16ss_destroy_callback.c
new file mode 100644 (file)
index 0000000..27d7a1a
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-type_array.h"
+#include "test-type_array-int16ss_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_int16ss_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  int16_t data = 0;
+  int16_t data_array[] = { data };
+  f_int16s_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_int16s_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_int16ss_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_type_array_int16ss_destroy_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_int16ss_t datass = f_int16ss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_adjust(length, sizeof(f_int16s_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_adjust(1, sizeof(int16_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_int16ss_destroy_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int16ss_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-int16ss_destroy_callback.h
new file mode 100644 (file)
index 0000000..44be70d
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__int16ss_destroy_callback
+#define _TEST__F_type_array__int16ss_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_int16ss_destroy_callback()
+ */
+extern void test__f_type_array_int16ss_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int16ss_destroy_callback()
+ */
+extern void test__f_type_array_int16ss_destroy_callback__works(void **state);
+
+#endif // _TEST__F_type_array__int16ss_destroy_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int32s_delete_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-int32s_delete_callback.c
deleted file mode 100644 (file)
index 37e627f..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "test-type_array.h"
-#include "test-type_array-int32s_delete_callback.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int32s_delete_callback__fails(void **state) {
-
-  int32_t data = 0;
-  int32_t data_array[] = { data };
-  f_int32s_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_int32s_t datass_array[] = { datas };
-
-  {
-    will_return(__wrap_f_memory_array_resize, true);
-    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
-
-    const f_status_t status = f_int32s_delete_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-}
-
-void test__f_type_array_int32s_delete_callback__works(void **state) {
-
-  int32_t data = 0;
-  int32_t data_array[] = { data };
-  f_int32s_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_int32s_t datass_array[] = { datas };
-  const f_number_unsigned_t length = 1;
-
-  {
-    will_return(__wrap_f_memory_array_resize, false);
-    will_return(__wrap_f_memory_array_resize, F_none);
-
-    const f_status_t status = f_int32s_delete_callback(0, length, (void *) datass_array);
-
-    assert_int_equal(status, F_none);
-  }
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int32s_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-int32s_delete_callback.h
deleted file mode 100644 (file)
index ac1c8de..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__int32s_delete_callback
-#define _TEST__F_type_array__int32s_delete_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_int32s_delete_callback()
- */
-extern void test__f_type_array_int32s_delete_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int32s_delete_callback()
- */
-extern void test__f_type_array_int32s_delete_callback__works(void **state);
-
-#endif // _TEST__F_type_array__int32s_delete_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int32s_destroy_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-int32s_destroy_callback.c
deleted file mode 100644 (file)
index fa08145..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "test-type_array.h"
-#include "test-type_array-int32s_destroy_callback.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int32s_destroy_callback__fails(void **state) {
-
-  int32_t data = 0;
-  int32_t data_array[] = { data };
-  f_int32s_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_int32s_t datass_array[] = { datas };
-
-  {
-    will_return(__wrap_f_memory_array_adjust, true);
-    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
-
-    const f_status_t status = f_int32s_destroy_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-}
-
-void test__f_type_array_int32s_destroy_callback__works(void **state) {
-
-  int32_t data = 0;
-  int32_t data_array[] = { data };
-  f_int32s_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_int32s_t datass_array[] = { datas };
-  const f_number_unsigned_t length = 1;
-
-  {
-    will_return(__wrap_f_memory_array_adjust, false);
-    will_return(__wrap_f_memory_array_adjust, F_none);
-
-    const f_status_t status = f_int32s_destroy_callback(0, length, (void *) datass_array);
-
-    assert_int_equal(status, F_none);
-  }
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int32s_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-int32s_destroy_callback.h
deleted file mode 100644 (file)
index 212ae69..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__int32s_destroy_callback
-#define _TEST__F_type_array__int32s_destroy_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_int32s_destroy_callback()
- */
-extern void test__f_type_array_int32s_destroy_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int32s_destroy_callback()
- */
-extern void test__f_type_array_int32s_destroy_callback__works(void **state);
-
-#endif // _TEST__F_type_array__int32s_destroy_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int32ss_delete_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-int32ss_delete_callback.c
new file mode 100644 (file)
index 0000000..3062d4e
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-type_array.h"
+#include "test-type_array-int32ss_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_int32ss_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  int32_t data = 0;
+  int32_t data_array[] = { data };
+  f_int32s_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_int32s_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_int32ss_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_type_array_int32ss_delete_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_int32ss_t datass = f_int32ss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_int32s_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_resize(1, sizeof(int32_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_int32ss_delete_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int32ss_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-int32ss_delete_callback.h
new file mode 100644 (file)
index 0000000..7b3a023
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__int32ss_delete_callback
+#define _TEST__F_type_array__int32ss_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_int32ss_delete_callback()
+ */
+extern void test__f_type_array_int32ss_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int32ss_delete_callback()
+ */
+extern void test__f_type_array_int32ss_delete_callback__works(void **state);
+
+#endif // _TEST__F_type_array__int32ss_delete_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int32ss_destroy_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-int32ss_destroy_callback.c
new file mode 100644 (file)
index 0000000..9d5bcf9
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-type_array.h"
+#include "test-type_array-int32ss_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_int32ss_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  int32_t data = 0;
+  int32_t data_array[] = { data };
+  f_int32s_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_int32s_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_int32ss_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_type_array_int32ss_destroy_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_int32ss_t datass = f_int32ss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_adjust(length, sizeof(f_int32s_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_adjust(1, sizeof(int32_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_int32ss_destroy_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int32ss_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-int32ss_destroy_callback.h
new file mode 100644 (file)
index 0000000..c29867a
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__int32ss_destroy_callback
+#define _TEST__F_type_array__int32ss_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_int32ss_destroy_callback()
+ */
+extern void test__f_type_array_int32ss_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int32ss_destroy_callback()
+ */
+extern void test__f_type_array_int32ss_destroy_callback__works(void **state);
+
+#endif // _TEST__F_type_array__int32ss_destroy_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int64s_delete_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-int64s_delete_callback.c
deleted file mode 100644 (file)
index 312aff3..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "test-type_array.h"
-#include "test-type_array-int64s_delete_callback.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int64s_delete_callback__fails(void **state) {
-
-  int64_t data = 0;
-  int64_t data_array[] = { data };
-  f_int64s_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_int64s_t datass_array[] = { datas };
-
-  {
-    will_return(__wrap_f_memory_array_resize, true);
-    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
-
-    const f_status_t status = f_int64s_delete_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-}
-
-void test__f_type_array_int64s_delete_callback__works(void **state) {
-
-  int64_t data = 0;
-  int64_t data_array[] = { data };
-  f_int64s_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_int64s_t datass_array[] = { datas };
-  const f_number_unsigned_t length = 1;
-
-  {
-    will_return(__wrap_f_memory_array_resize, false);
-    will_return(__wrap_f_memory_array_resize, F_none);
-
-    const f_status_t status = f_int64s_delete_callback(0, length, (void *) datass_array);
-
-    assert_int_equal(status, F_none);
-  }
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int64s_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-int64s_delete_callback.h
deleted file mode 100644 (file)
index 4f06ff8..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__int64s_delete_callback
-#define _TEST__F_type_array__int64s_delete_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_int64s_delete_callback()
- */
-extern void test__f_type_array_int64s_delete_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int64s_delete_callback()
- */
-extern void test__f_type_array_int64s_delete_callback__works(void **state);
-
-#endif // _TEST__F_type_array__int64s_delete_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int64s_destroy_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-int64s_destroy_callback.c
deleted file mode 100644 (file)
index 631ea63..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "test-type_array.h"
-#include "test-type_array-int64s_destroy_callback.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int64s_destroy_callback__fails(void **state) {
-
-  int64_t data = 0;
-  int64_t data_array[] = { data };
-  f_int64s_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_int64s_t datass_array[] = { datas };
-
-  {
-    will_return(__wrap_f_memory_array_adjust, true);
-    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
-
-    const f_status_t status = f_int64s_destroy_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-}
-
-void test__f_type_array_int64s_destroy_callback__works(void **state) {
-
-  int64_t data = 0;
-  int64_t data_array[] = { data };
-  f_int64s_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_int64s_t datass_array[] = { datas };
-  const f_number_unsigned_t length = 1;
-
-  {
-    will_return(__wrap_f_memory_array_adjust, false);
-    will_return(__wrap_f_memory_array_adjust, F_none);
-
-    const f_status_t status = f_int64s_destroy_callback(0, length, (void *) datass_array);
-
-    assert_int_equal(status, F_none);
-  }
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int64s_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-int64s_destroy_callback.h
deleted file mode 100644 (file)
index 998e037..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__int64s_destroy_callback
-#define _TEST__F_type_array__int64s_destroy_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_int64s_destroy_callback()
- */
-extern void test__f_type_array_int64s_destroy_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int64s_destroy_callback()
- */
-extern void test__f_type_array_int64s_destroy_callback__works(void **state);
-
-#endif // _TEST__F_type_array__int64s_destroy_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int64ss_delete_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-int64ss_delete_callback.c
new file mode 100644 (file)
index 0000000..ba5a42c
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-type_array.h"
+#include "test-type_array-int64ss_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_int64ss_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  int64_t data = 0;
+  int64_t data_array[] = { data };
+  f_int64s_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_int64s_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_int64ss_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_type_array_int64ss_delete_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_int64ss_t datass = f_int64ss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_int64s_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_resize(1, sizeof(int64_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_int64ss_delete_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int64ss_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-int64ss_delete_callback.h
new file mode 100644 (file)
index 0000000..cacdff5
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__int64ss_delete_callback
+#define _TEST__F_type_array__int64ss_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_int64ss_delete_callback()
+ */
+extern void test__f_type_array_int64ss_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int64ss_delete_callback()
+ */
+extern void test__f_type_array_int64ss_delete_callback__works(void **state);
+
+#endif // _TEST__F_type_array__int64ss_delete_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int64ss_destroy_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-int64ss_destroy_callback.c
new file mode 100644 (file)
index 0000000..54237d6
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-type_array.h"
+#include "test-type_array-int64ss_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_int64ss_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  int64_t data = 0;
+  int64_t data_array[] = { data };
+  f_int64s_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_int64s_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_int64ss_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_type_array_int64ss_destroy_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_int64ss_t datass = f_int64ss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_adjust(length, sizeof(f_int64s_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_adjust(1, sizeof(int64_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_int64ss_destroy_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int64ss_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-int64ss_destroy_callback.h
new file mode 100644 (file)
index 0000000..77c3ac2
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__int64ss_destroy_callback
+#define _TEST__F_type_array__int64ss_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_int64ss_destroy_callback()
+ */
+extern void test__f_type_array_int64ss_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int64ss_destroy_callback()
+ */
+extern void test__f_type_array_int64ss_destroy_callback__works(void **state);
+
+#endif // _TEST__F_type_array__int64ss_destroy_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int8s_delete_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-int8s_delete_callback.c
deleted file mode 100644 (file)
index cd1e85b..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "test-type_array.h"
-#include "test-type_array-int8s_delete_callback.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int8s_delete_callback__fails(void **state) {
-
-  int8_t data = 0;
-  int8_t data_array[] = { data };
-  f_int8s_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_int8s_t datass_array[] = { datas };
-
-  {
-    will_return(__wrap_f_memory_array_resize, true);
-    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
-
-    const f_status_t status = f_int8s_delete_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-}
-
-void test__f_type_array_int8s_delete_callback__works(void **state) {
-
-  int8_t data = 0;
-  int8_t data_array[] = { data };
-  f_int8s_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_int8s_t datass_array[] = { datas };
-  const f_number_unsigned_t length = 1;
-
-  {
-    will_return(__wrap_f_memory_array_resize, false);
-    will_return(__wrap_f_memory_array_resize, F_none);
-
-    const f_status_t status = f_int8s_delete_callback(0, length, (void *) datass_array);
-
-    assert_int_equal(status, F_none);
-  }
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int8s_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-int8s_delete_callback.h
deleted file mode 100644 (file)
index 30adf90..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__int8s_delete_callback
-#define _TEST__F_type_array__int8s_delete_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_int8s_delete_callback()
- */
-extern void test__f_type_array_int8s_delete_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int8s_delete_callback()
- */
-extern void test__f_type_array_int8s_delete_callback__works(void **state);
-
-#endif // _TEST__F_type_array__int8s_delete_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int8s_destroy_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-int8s_destroy_callback.c
deleted file mode 100644 (file)
index 8339593..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "test-type_array.h"
-#include "test-type_array-int8s_destroy_callback.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_int8s_destroy_callback__fails(void **state) {
-
-  int8_t data = 0;
-  int8_t data_array[] = { data };
-  f_int8s_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_int8s_t datass_array[] = { datas };
-
-  {
-    will_return(__wrap_f_memory_array_adjust, true);
-    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
-
-    const f_status_t status = f_int8s_destroy_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-}
-
-void test__f_type_array_int8s_destroy_callback__works(void **state) {
-
-  int8_t data = 0;
-  int8_t data_array[] = { data };
-  f_int8s_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_int8s_t datass_array[] = { datas };
-  const f_number_unsigned_t length = 1;
-
-  {
-    will_return(__wrap_f_memory_array_adjust, false);
-    will_return(__wrap_f_memory_array_adjust, F_none);
-
-    const f_status_t status = f_int8s_destroy_callback(0, length, (void *) datass_array);
-
-    assert_int_equal(status, F_none);
-  }
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int8s_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-int8s_destroy_callback.h
deleted file mode 100644 (file)
index 2074caa..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__int8s_destroy_callback
-#define _TEST__F_type_array__int8s_destroy_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_int8s_destroy_callback()
- */
-extern void test__f_type_array_int8s_destroy_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_int8s_destroy_callback()
- */
-extern void test__f_type_array_int8s_destroy_callback__works(void **state);
-
-#endif // _TEST__F_type_array__int8s_destroy_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int8ss_delete_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-int8ss_delete_callback.c
new file mode 100644 (file)
index 0000000..3a5ffce
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-type_array.h"
+#include "test-type_array-int8ss_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_int8ss_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  int8_t data = 0;
+  int8_t data_array[] = { data };
+  f_int8s_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_int8s_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_int8ss_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_type_array_int8ss_delete_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_int8ss_t datass = f_int8ss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_int8s_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_resize(1, sizeof(int8_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_int8ss_delete_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int8ss_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-int8ss_delete_callback.h
new file mode 100644 (file)
index 0000000..6bdb16f
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__int8ss_delete_callback
+#define _TEST__F_type_array__int8ss_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_int8ss_delete_callback()
+ */
+extern void test__f_type_array_int8ss_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int8ss_delete_callback()
+ */
+extern void test__f_type_array_int8ss_delete_callback__works(void **state);
+
+#endif // _TEST__F_type_array__int8ss_delete_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int8ss_destroy_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-int8ss_destroy_callback.c
new file mode 100644 (file)
index 0000000..579c020
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-type_array.h"
+#include "test-type_array-int8ss_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_int8ss_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  int8_t data = 0;
+  int8_t data_array[] = { data };
+  f_int8s_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_int8s_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_int8ss_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_type_array_int8ss_destroy_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_int8ss_t datass = f_int8ss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_adjust(length, sizeof(f_int8s_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_adjust(1, sizeof(int8_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_int8ss_destroy_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int8ss_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-int8ss_destroy_callback.h
new file mode 100644 (file)
index 0000000..e972830
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__int8ss_destroy_callback
+#define _TEST__F_type_array__int8ss_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_int8ss_destroy_callback()
+ */
+extern void test__f_type_array_int8ss_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int8ss_destroy_callback()
+ */
+extern void test__f_type_array_int8ss_destroy_callback__works(void **state);
+
+#endif // _TEST__F_type_array__int8ss_destroy_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-number_unsigneds_delete_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-number_unsigneds_delete_callback.c
deleted file mode 100644 (file)
index cf55a24..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "test-type_array.h"
-#include "test-type_array-number_unsigneds_delete_callback.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_number_unsigneds_delete_callback__fails(void **state) {
-
-  f_number_unsigned_t data = f_number_unsigned_t_initialize;
-  f_number_unsigned_t data_array[] = { data };
-  f_number_unsigneds_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_number_unsigneds_t datass_array[] = { datas };
-
-  {
-    will_return(__wrap_f_memory_array_resize, true);
-    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
-
-    const f_status_t status = f_number_unsigneds_delete_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-}
-
-void test__f_type_array_number_unsigneds_delete_callback__works(void **state) {
-
-  f_number_unsigned_t data = f_number_unsigned_t_initialize;
-  f_number_unsigned_t data_array[] = { data };
-  f_number_unsigneds_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_number_unsigneds_t datass_array[] = { datas };
-  const f_number_unsigned_t length = 1;
-
-  {
-    will_return(__wrap_f_memory_array_resize, false);
-    will_return(__wrap_f_memory_array_resize, F_none);
-
-    const f_status_t status = f_number_unsigneds_delete_callback(0, length, (void *) datass_array);
-
-    assert_int_equal(status, F_none);
-  }
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-number_unsigneds_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-number_unsigneds_delete_callback.h
deleted file mode 100644 (file)
index 0e6c3b5..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__number_unsigneds_delete_callback
-#define _TEST__F_type_array__number_unsigneds_delete_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_number_unsigneds_delete_callback()
- */
-extern void test__f_type_array_number_unsigneds_delete_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_number_unsigneds_delete_callback()
- */
-extern void test__f_type_array_number_unsigneds_delete_callback__works(void **state);
-
-#endif // _TEST__F_type_array__number_unsigneds_delete_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-number_unsigneds_destroy_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-number_unsigneds_destroy_callback.c
deleted file mode 100644 (file)
index ad54770..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "test-type_array.h"
-#include "test-type_array-number_unsigneds_destroy_callback.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_number_unsigneds_destroy_callback__fails(void **state) {
-
-  f_number_unsigned_t data = f_number_unsigned_t_initialize;
-  f_number_unsigned_t data_array[] = { data };
-  f_number_unsigneds_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_number_unsigneds_t datass_array[] = { datas };
-
-  {
-    will_return(__wrap_f_memory_array_adjust, true);
-    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
-
-    const f_status_t status = f_number_unsigneds_destroy_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-}
-
-void test__f_type_array_number_unsigneds_destroy_callback__works(void **state) {
-
-  f_number_unsigned_t data = f_number_unsigned_t_initialize;
-  f_number_unsigned_t data_array[] = { data };
-  f_number_unsigneds_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_number_unsigneds_t datass_array[] = { datas };
-  const f_number_unsigned_t length = 1;
-
-  {
-    will_return(__wrap_f_memory_array_adjust, false);
-    will_return(__wrap_f_memory_array_adjust, F_none);
-
-    const f_status_t status = f_number_unsigneds_destroy_callback(0, length, (void *) datass_array);
-
-    assert_int_equal(status, F_none);
-  }
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-number_unsigneds_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-number_unsigneds_destroy_callback.h
deleted file mode 100644 (file)
index ae6810b..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__number_unsigneds_destroy_callback
-#define _TEST__F_type_array__number_unsigneds_destroy_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_number_unsigneds_destroy_callback()
- */
-extern void test__f_type_array_number_unsigneds_destroy_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_number_unsigneds_destroy_callback()
- */
-extern void test__f_type_array_number_unsigneds_destroy_callback__works(void **state);
-
-#endif // _TEST__F_type_array__number_unsigneds_destroy_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-number_unsignedss_delete_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-number_unsignedss_delete_callback.c
new file mode 100644 (file)
index 0000000..4fbc32d
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-type_array.h"
+#include "test-type_array-number_unsignedss_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_number_unsignedss_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_number_unsigned_t data = f_number_unsigned_t_initialize;
+  f_number_unsigned_t data_array[] = { data };
+  f_number_unsigneds_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_number_unsigneds_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_number_unsignedss_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_type_array_number_unsignedss_delete_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_number_unsignedss_t datass = f_number_unsignedss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_number_unsigneds_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_resize(1, sizeof(f_number_unsigned_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_number_unsignedss_delete_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-number_unsignedss_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-number_unsignedss_delete_callback.h
new file mode 100644 (file)
index 0000000..d5442c8
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__number_unsignedss_delete_callback
+#define _TEST__F_type_array__number_unsignedss_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_number_unsignedss_delete_callback()
+ */
+extern void test__f_type_array_number_unsignedss_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_number_unsignedss_delete_callback()
+ */
+extern void test__f_type_array_number_unsignedss_delete_callback__works(void **state);
+
+#endif // _TEST__F_type_array__number_unsignedss_delete_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-number_unsignedss_destroy_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-number_unsignedss_destroy_callback.c
new file mode 100644 (file)
index 0000000..61a4ea4
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-type_array.h"
+#include "test-type_array-number_unsignedss_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_number_unsignedss_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_number_unsigned_t data = f_number_unsigned_t_initialize;
+  f_number_unsigned_t data_array[] = { data };
+  f_number_unsigneds_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_number_unsigneds_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_number_unsignedss_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_type_array_number_unsignedss_destroy_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_number_unsignedss_t datass = f_number_unsignedss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_adjust(length, sizeof(f_number_unsigneds_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_adjust(1, sizeof(f_number_unsigned_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_number_unsignedss_destroy_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-number_unsignedss_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-number_unsignedss_destroy_callback.h
new file mode 100644 (file)
index 0000000..d453af1
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__number_unsignedss_destroy_callback
+#define _TEST__F_type_array__number_unsignedss_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_number_unsignedss_destroy_callback()
+ */
+extern void test__f_type_array_number_unsignedss_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_number_unsignedss_destroy_callback()
+ */
+extern void test__f_type_array_number_unsignedss_destroy_callback__works(void **state);
+
+#endif // _TEST__F_type_array__number_unsignedss_destroy_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-polls_delete_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-polls_delete_callback.c
deleted file mode 100644 (file)
index ed6b410..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "test-type_array.h"
-#include "test-type_array-polls_delete_callback.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_polls_delete_callback__fails(void **state) {
-
-  f_poll_t data = f_poll_t_initialize;
-  f_poll_t data_array[] = { data };
-  f_polls_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_polls_t datass_array[] = { datas };
-
-  {
-    will_return(__wrap_f_memory_array_resize, true);
-    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
-
-    const f_status_t status = f_polls_delete_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-}
-
-void test__f_type_array_polls_delete_callback__works(void **state) {
-
-  f_poll_t data = f_poll_t_initialize;
-  f_poll_t data_array[] = { data };
-  f_polls_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_polls_t datass_array[] = { datas };
-  const f_number_unsigned_t length = 1;
-
-  {
-    will_return(__wrap_f_memory_array_resize, false);
-    will_return(__wrap_f_memory_array_resize, F_none);
-
-    const f_status_t status = f_polls_delete_callback(0, length, (void *) datass_array);
-
-    assert_int_equal(status, F_none);
-  }
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-polls_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-polls_delete_callback.h
deleted file mode 100644 (file)
index d6b9562..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__polls_delete_callback
-#define _TEST__F_type_array__polls_delete_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_polls_delete_callback()
- */
-extern void test__f_type_array_polls_delete_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_polls_delete_callback()
- */
-extern void test__f_type_array_polls_delete_callback__works(void **state);
-
-#endif // _TEST__F_type_array__polls_delete_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-polls_destroy_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-polls_destroy_callback.c
deleted file mode 100644 (file)
index 1241c67..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "test-type_array.h"
-#include "test-type_array-polls_destroy_callback.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_polls_destroy_callback__fails(void **state) {
-
-  f_poll_t data = f_poll_t_initialize;
-  f_poll_t data_array[] = { data };
-  f_polls_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_polls_t datass_array[] = { datas };
-
-  {
-    will_return(__wrap_f_memory_array_adjust, true);
-    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
-
-    const f_status_t status = f_polls_destroy_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-}
-
-void test__f_type_array_polls_destroy_callback__works(void **state) {
-
-  f_poll_t data = f_poll_t_initialize;
-  f_poll_t data_array[] = { data };
-  f_polls_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_polls_t datass_array[] = { datas };
-  const f_number_unsigned_t length = 1;
-
-  {
-    will_return(__wrap_f_memory_array_adjust, false);
-    will_return(__wrap_f_memory_array_adjust, F_none);
-
-    const f_status_t status = f_polls_destroy_callback(0, length, (void *) datass_array);
-
-    assert_int_equal(status, F_none);
-  }
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-polls_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-polls_destroy_callback.h
deleted file mode 100644 (file)
index 4a25b2f..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__polls_destroy_callback
-#define _TEST__F_type_array__polls_destroy_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_polls_destroy_callback()
- */
-extern void test__f_type_array_polls_destroy_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_polls_destroy_callback()
- */
-extern void test__f_type_array_polls_destroy_callback__works(void **state);
-
-#endif // _TEST__F_type_array__polls_destroy_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-pollss_delete_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-pollss_delete_callback.c
new file mode 100644 (file)
index 0000000..ffa0b8c
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-type_array.h"
+#include "test-type_array-pollss_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_pollss_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_poll_t data = f_poll_t_initialize;
+  f_poll_t data_array[] = { data };
+  f_polls_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_polls_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_pollss_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_type_array_pollss_delete_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_pollss_t datass = f_pollss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_polls_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_resize(1, sizeof(f_poll_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_pollss_delete_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-pollss_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-pollss_delete_callback.h
new file mode 100644 (file)
index 0000000..d93c002
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__pollss_delete_callback
+#define _TEST__F_type_array__pollss_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_pollss_delete_callback()
+ */
+extern void test__f_type_array_pollss_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_pollss_delete_callback()
+ */
+extern void test__f_type_array_pollss_delete_callback__works(void **state);
+
+#endif // _TEST__F_type_array__pollss_delete_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-pollss_destroy_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-pollss_destroy_callback.c
new file mode 100644 (file)
index 0000000..4302b51
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-type_array.h"
+#include "test-type_array-pollss_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_pollss_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_poll_t data = f_poll_t_initialize;
+  f_poll_t data_array[] = { data };
+  f_polls_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_polls_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_pollss_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_type_array_pollss_destroy_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_pollss_t datass = f_pollss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_adjust(length, sizeof(f_polls_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_adjust(1, sizeof(f_poll_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_pollss_destroy_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-pollss_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-pollss_destroy_callback.h
new file mode 100644 (file)
index 0000000..0806c60
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__pollss_destroy_callback
+#define _TEST__F_type_array__pollss_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_pollss_destroy_callback()
+ */
+extern void test__f_type_array_pollss_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_pollss_destroy_callback()
+ */
+extern void test__f_type_array_pollss_destroy_callback__works(void **state);
+
+#endif // _TEST__F_type_array__pollss_destroy_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-states_delete_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-states_delete_callback.c
deleted file mode 100644 (file)
index 9aa63db..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "test-type_array.h"
-#include "test-type_array-states_delete_callback.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_states_delete_callback__fails(void **state) {
-
-  f_state_t data = f_state_t_initialize;
-  f_state_t data_array[] = { data };
-  f_states_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_states_t datass_array[] = { datas };
-
-  {
-    will_return(__wrap_f_memory_array_resize, true);
-    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
-
-    const f_status_t status = f_states_delete_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-}
-
-void test__f_type_array_states_delete_callback__works(void **state) {
-
-  f_state_t data = f_state_t_initialize;
-  f_state_t data_array[] = { data };
-  f_states_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_states_t datass_array[] = { datas };
-  const f_number_unsigned_t length = 1;
-
-  {
-    will_return(__wrap_f_memory_array_resize, false);
-    will_return(__wrap_f_memory_array_resize, F_none);
-
-    const f_status_t status = f_states_delete_callback(0, length, (void *) datass_array);
-
-    assert_int_equal(status, F_none);
-  }
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-states_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-states_delete_callback.h
deleted file mode 100644 (file)
index 24855a6..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__states_delete_callback
-#define _TEST__F_type_array__states_delete_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_states_delete_callback()
- */
-extern void test__f_type_array_states_delete_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_states_delete_callback()
- */
-extern void test__f_type_array_states_delete_callback__works(void **state);
-
-#endif // _TEST__F_type_array__states_delete_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-states_destroy_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-states_destroy_callback.c
deleted file mode 100644 (file)
index ca8a1b7..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "test-type_array.h"
-#include "test-type_array-states_destroy_callback.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_states_destroy_callback__fails(void **state) {
-
-  f_state_t data = f_state_t_initialize;
-  f_state_t data_array[] = { data };
-  f_states_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_states_t datass_array[] = { datas };
-
-  {
-    will_return(__wrap_f_memory_array_adjust, true);
-    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
-
-    const f_status_t status = f_states_destroy_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-}
-
-void test__f_type_array_states_destroy_callback__works(void **state) {
-
-  f_state_t data = f_state_t_initialize;
-  f_state_t data_array[] = { data };
-  f_states_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_states_t datass_array[] = { datas };
-  const f_number_unsigned_t length = 1;
-
-  {
-    will_return(__wrap_f_memory_array_adjust, false);
-    will_return(__wrap_f_memory_array_adjust, F_none);
-
-    const f_status_t status = f_states_destroy_callback(0, length, (void *) datass_array);
-
-    assert_int_equal(status, F_none);
-  }
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-states_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-states_destroy_callback.h
deleted file mode 100644 (file)
index 1533ebe..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__states_destroy_callback
-#define _TEST__F_type_array__states_destroy_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_states_destroy_callback()
- */
-extern void test__f_type_array_states_destroy_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_states_destroy_callback()
- */
-extern void test__f_type_array_states_destroy_callback__works(void **state);
-
-#endif // _TEST__F_type_array__states_destroy_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-statess_delete_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-statess_delete_callback.c
new file mode 100644 (file)
index 0000000..353a46d
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-type_array.h"
+#include "test-type_array-statess_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_statess_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_state_t data = f_state_t_initialize;
+  f_state_t data_array[] = { data };
+  f_states_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_states_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_statess_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_type_array_statess_delete_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_statess_t datass = f_statess_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_states_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_resize(1, sizeof(f_state_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_statess_delete_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-statess_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-statess_delete_callback.h
new file mode 100644 (file)
index 0000000..f7dcc9e
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__statess_delete_callback
+#define _TEST__F_type_array__statess_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_statess_delete_callback()
+ */
+extern void test__f_type_array_statess_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_statess_delete_callback()
+ */
+extern void test__f_type_array_statess_delete_callback__works(void **state);
+
+#endif // _TEST__F_type_array__statess_delete_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-statess_destroy_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-statess_destroy_callback.c
new file mode 100644 (file)
index 0000000..a6bef3e
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-type_array.h"
+#include "test-type_array-statess_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_statess_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_state_t data = f_state_t_initialize;
+  f_state_t data_array[] = { data };
+  f_states_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_states_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_statess_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_type_array_statess_destroy_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_statess_t datass = f_statess_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_adjust(length, sizeof(f_states_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_adjust(1, sizeof(f_state_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_statess_destroy_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-statess_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-statess_destroy_callback.h
new file mode 100644 (file)
index 0000000..666444d
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__statess_destroy_callback
+#define _TEST__F_type_array__statess_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_statess_destroy_callback()
+ */
+extern void test__f_type_array_statess_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_statess_destroy_callback()
+ */
+extern void test__f_type_array_statess_destroy_callback__works(void **state);
+
+#endif // _TEST__F_type_array__statess_destroy_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-statuss_delete_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-statuss_delete_callback.c
deleted file mode 100644 (file)
index 6f943d0..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "test-type_array.h"
-#include "test-type_array-statuss_delete_callback.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_statuss_delete_callback__fails(void **state) {
-
-  f_status_t data = f_status_t_initialize;
-  f_status_t data_array[] = { data };
-  f_statuss_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_statuss_t datass_array[] = { datas };
-
-  {
-    will_return(__wrap_f_memory_array_resize, true);
-    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
-
-    const f_status_t status = f_statuss_delete_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-}
-
-void test__f_type_array_statuss_delete_callback__works(void **state) {
-
-  f_status_t data = f_status_t_initialize;
-  f_status_t data_array[] = { data };
-  f_statuss_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_statuss_t datass_array[] = { datas };
-  const f_number_unsigned_t length = 1;
-
-  {
-    will_return(__wrap_f_memory_array_resize, false);
-    will_return(__wrap_f_memory_array_resize, F_none);
-
-    const f_status_t status = f_statuss_delete_callback(0, length, (void *) datass_array);
-
-    assert_int_equal(status, F_none);
-  }
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-statuss_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-statuss_delete_callback.h
deleted file mode 100644 (file)
index 4ba1f6e..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__statuss_delete_callback
-#define _TEST__F_type_array__statuss_delete_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_statuss_delete_callback()
- */
-extern void test__f_type_array_statuss_delete_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_statuss_delete_callback()
- */
-extern void test__f_type_array_statuss_delete_callback__works(void **state);
-
-#endif // _TEST__F_type_array__statuss_delete_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-statuss_destroy_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-statuss_destroy_callback.c
deleted file mode 100644 (file)
index 5696778..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "test-type_array.h"
-#include "test-type_array-statuss_destroy_callback.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_statuss_destroy_callback__fails(void **state) {
-
-  f_status_t data = f_status_t_initialize;
-  f_status_t data_array[] = { data };
-  f_statuss_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_statuss_t datass_array[] = { datas };
-
-  {
-    will_return(__wrap_f_memory_array_adjust, true);
-    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
-
-    const f_status_t status = f_statuss_destroy_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-}
-
-void test__f_type_array_statuss_destroy_callback__works(void **state) {
-
-  f_status_t data = f_status_t_initialize;
-  f_status_t data_array[] = { data };
-  f_statuss_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_statuss_t datass_array[] = { datas };
-  const f_number_unsigned_t length = 1;
-
-  {
-    will_return(__wrap_f_memory_array_adjust, false);
-    will_return(__wrap_f_memory_array_adjust, F_none);
-
-    const f_status_t status = f_statuss_destroy_callback(0, length, (void *) datass_array);
-
-    assert_int_equal(status, F_none);
-  }
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-statuss_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-statuss_destroy_callback.h
deleted file mode 100644 (file)
index 26cb0ac..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__statuss_destroy_callback
-#define _TEST__F_type_array__statuss_destroy_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_statuss_destroy_callback()
- */
-extern void test__f_type_array_statuss_destroy_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_statuss_destroy_callback()
- */
-extern void test__f_type_array_statuss_destroy_callback__works(void **state);
-
-#endif // _TEST__F_type_array__statuss_destroy_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-statusss_delete_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-statusss_delete_callback.c
new file mode 100644 (file)
index 0000000..e5cac87
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-type_array.h"
+#include "test-type_array-statusss_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_statusss_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_status_t data = f_status_t_initialize;
+  f_status_t data_array[] = { data };
+  f_statuss_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_statuss_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_statusss_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_type_array_statusss_delete_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_statusss_t datass = f_statusss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_statuss_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_resize(1, sizeof(f_status_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_statusss_delete_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-statusss_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-statusss_delete_callback.h
new file mode 100644 (file)
index 0000000..c08180e
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__statusss_delete_callback
+#define _TEST__F_type_array__statusss_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_statusss_delete_callback()
+ */
+extern void test__f_type_array_statusss_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_statusss_delete_callback()
+ */
+extern void test__f_type_array_statusss_delete_callback__works(void **state);
+
+#endif // _TEST__F_type_array__statusss_delete_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-statusss_destroy_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-statusss_destroy_callback.c
new file mode 100644 (file)
index 0000000..883c43a
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-type_array.h"
+#include "test-type_array-statusss_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_statusss_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_status_t data = f_status_t_initialize;
+  f_status_t data_array[] = { data };
+  f_statuss_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_statuss_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_statusss_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_type_array_statusss_destroy_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_statusss_t datass = f_statusss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_adjust(length, sizeof(f_statuss_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_adjust(1, sizeof(f_status_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_statusss_destroy_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-statusss_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-statusss_destroy_callback.h
new file mode 100644 (file)
index 0000000..e99640a
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__statusss_destroy_callback
+#define _TEST__F_type_array__statusss_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_statusss_destroy_callback()
+ */
+extern void test__f_type_array_statusss_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_statusss_destroy_callback()
+ */
+extern void test__f_type_array_statusss_destroy_callback__works(void **state);
+
+#endif // _TEST__F_type_array__statusss_destroy_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_delete_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_delete_callback.c
deleted file mode 100644 (file)
index 233f3e5..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "test-type_array.h"
-#include "test-type_array-uint128s_delete_callback.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint128s_delete_callback__fails(void **state) {
-
-  f_uint128_t data = 0;
-  f_uint128_t data_array[] = { data };
-  f_uint128s_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_uint128s_t datass_array[] = { datas };
-
-  {
-    will_return(__wrap_f_memory_array_resize, true);
-    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
-
-    const f_status_t status = f_uint128s_delete_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-}
-
-void test__f_type_array_uint128s_delete_callback__works(void **state) {
-
-  f_uint128_t data = 0;
-  f_uint128_t data_array[] = { data };
-  f_uint128s_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_uint128s_t datass_array[] = { datas };
-  const f_number_unsigned_t length = 1;
-
-  {
-    will_return(__wrap_f_memory_array_resize, false);
-    will_return(__wrap_f_memory_array_resize, F_none);
-
-    const f_status_t status = f_uint128s_delete_callback(0, length, (void *) datass_array);
-
-    assert_int_equal(status, F_none);
-  }
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_delete_callback.h
deleted file mode 100644 (file)
index ae8a66d..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__uint128s_delete_callback
-#define _TEST__F_type_array__uint128s_delete_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_uint128s_delete_callback()
- */
-extern void test__f_type_array_uint128s_delete_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint128s_delete_callback()
- */
-extern void test__f_type_array_uint128s_delete_callback__works(void **state);
-
-#endif // _TEST__F_type_array__uint128s_delete_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_destroy_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_destroy_callback.c
deleted file mode 100644 (file)
index e88b599..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "test-type_array.h"
-#include "test-type_array-uint128s_destroy_callback.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint128s_destroy_callback__fails(void **state) {
-
-  f_uint128_t data = 0;
-  f_uint128_t data_array[] = { data };
-  f_uint128s_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_uint128s_t datass_array[] = { datas };
-
-  {
-    will_return(__wrap_f_memory_array_adjust, true);
-    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
-
-    const f_status_t status = f_uint128s_destroy_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-}
-
-void test__f_type_array_uint128s_destroy_callback__works(void **state) {
-
-  f_uint128_t data = 0;
-  f_uint128_t data_array[] = { data };
-  f_uint128s_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_uint128s_t datass_array[] = { datas };
-  const f_number_unsigned_t length = 1;
-
-  {
-    will_return(__wrap_f_memory_array_adjust, false);
-    will_return(__wrap_f_memory_array_adjust, F_none);
-
-    const f_status_t status = f_uint128s_destroy_callback(0, length, (void *) datass_array);
-
-    assert_int_equal(status, F_none);
-  }
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_destroy_callback.h
deleted file mode 100644 (file)
index 6176824..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__uint128s_destroy_callback
-#define _TEST__F_type_array__uint128s_destroy_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_uint128s_destroy_callback()
- */
-extern void test__f_type_array_uint128s_destroy_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint128s_destroy_callback()
- */
-extern void test__f_type_array_uint128s_destroy_callback__works(void **state);
-
-#endif // _TEST__F_type_array__uint128s_destroy_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_delete_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_delete_callback.c
new file mode 100644 (file)
index 0000000..c275081
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-type_array.h"
+#include "test-type_array-uint128ss_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_uint128ss_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_uint128_t data = 0;
+  f_uint128_t data_array[] = { data };
+  f_uint128s_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_uint128s_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_uint128ss_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_type_array_uint128ss_delete_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_uint128ss_t datass = f_uint128ss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_uint128s_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_resize(1, sizeof(f_uint128_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_uint128ss_delete_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_delete_callback.h
new file mode 100644 (file)
index 0000000..8251c6e
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__uint128ss_delete_callback
+#define _TEST__F_type_array__uint128ss_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_uint128ss_delete_callback()
+ */
+extern void test__f_type_array_uint128ss_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint128ss_delete_callback()
+ */
+extern void test__f_type_array_uint128ss_delete_callback__works(void **state);
+
+#endif // _TEST__F_type_array__uint128ss_delete_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_destroy_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_destroy_callback.c
new file mode 100644 (file)
index 0000000..abd3623
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-type_array.h"
+#include "test-type_array-uint128ss_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_uint128ss_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_uint128_t data = 0;
+  f_uint128_t data_array[] = { data };
+  f_uint128s_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_uint128s_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_uint128ss_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_type_array_uint128ss_destroy_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_uint128ss_t datass = f_uint128ss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_adjust(length, sizeof(f_uint128s_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_adjust(1, sizeof(f_uint128_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_uint128ss_destroy_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_destroy_callback.h
new file mode 100644 (file)
index 0000000..a3eac6c
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__uint128ss_destroy_callback
+#define _TEST__F_type_array__uint128ss_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_uint128ss_destroy_callback()
+ */
+extern void test__f_type_array_uint128ss_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint128ss_destroy_callback()
+ */
+extern void test__f_type_array_uint128ss_destroy_callback__works(void **state);
+
+#endif // _TEST__F_type_array__uint128ss_destroy_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_delete_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_delete_callback.c
deleted file mode 100644 (file)
index 89d2db5..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "test-type_array.h"
-#include "test-type_array-uint16s_delete_callback.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint16s_delete_callback__fails(void **state) {
-
-  uint16_t data = 0;
-  uint16_t data_array[] = { data };
-  f_uint16s_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_uint16s_t datass_array[] = { datas };
-
-  {
-    will_return(__wrap_f_memory_array_resize, true);
-    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
-
-    const f_status_t status = f_uint16s_delete_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-}
-
-void test__f_type_array_uint16s_delete_callback__works(void **state) {
-
-  uint16_t data = 0;
-  uint16_t data_array[] = { data };
-  f_uint16s_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_uint16s_t datass_array[] = { datas };
-  const f_number_unsigned_t length = 1;
-
-  {
-    will_return(__wrap_f_memory_array_resize, false);
-    will_return(__wrap_f_memory_array_resize, F_none);
-
-    const f_status_t status = f_uint16s_delete_callback(0, length, (void *) datass_array);
-
-    assert_int_equal(status, F_none);
-  }
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_delete_callback.h
deleted file mode 100644 (file)
index 48bc3f6..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__uint16s_delete_callback
-#define _TEST__F_type_array__uint16s_delete_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_uint16s_delete_callback()
- */
-extern void test__f_type_array_uint16s_delete_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint16s_delete_callback()
- */
-extern void test__f_type_array_uint16s_delete_callback__works(void **state);
-
-#endif // _TEST__F_type_array__uint16s_delete_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_destroy_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_destroy_callback.c
deleted file mode 100644 (file)
index 34853f7..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "test-type_array.h"
-#include "test-type_array-uint16s_destroy_callback.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint16s_destroy_callback__fails(void **state) {
-
-  uint16_t data = 0;
-  uint16_t data_array[] = { data };
-  f_uint16s_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_uint16s_t datass_array[] = { datas };
-
-  {
-    will_return(__wrap_f_memory_array_adjust, true);
-    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
-
-    const f_status_t status = f_uint16s_destroy_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-}
-
-void test__f_type_array_uint16s_destroy_callback__works(void **state) {
-
-  uint16_t data = 0;
-  uint16_t data_array[] = { data };
-  f_uint16s_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_uint16s_t datass_array[] = { datas };
-  const f_number_unsigned_t length = 1;
-
-  {
-    will_return(__wrap_f_memory_array_adjust, false);
-    will_return(__wrap_f_memory_array_adjust, F_none);
-
-    const f_status_t status = f_uint16s_destroy_callback(0, length, (void *) datass_array);
-
-    assert_int_equal(status, F_none);
-  }
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_destroy_callback.h
deleted file mode 100644 (file)
index bfac51f..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__uint16s_destroy_callback
-#define _TEST__F_type_array__uint16s_destroy_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_uint16s_destroy_callback()
- */
-extern void test__f_type_array_uint16s_destroy_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint16s_destroy_callback()
- */
-extern void test__f_type_array_uint16s_destroy_callback__works(void **state);
-
-#endif // _TEST__F_type_array__uint16s_destroy_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_delete_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_delete_callback.c
new file mode 100644 (file)
index 0000000..12b25f2
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-type_array.h"
+#include "test-type_array-uint16ss_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_uint16ss_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  uint16_t data = 0;
+  uint16_t data_array[] = { data };
+  f_uint16s_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_uint16s_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_uint16ss_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_type_array_uint16ss_delete_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_uint16ss_t datass = f_uint16ss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_uint16s_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_resize(1, sizeof(uint16_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_uint16ss_delete_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_delete_callback.h
new file mode 100644 (file)
index 0000000..e83565b
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__uint16ss_delete_callback
+#define _TEST__F_type_array__uint16ss_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_uint16ss_delete_callback()
+ */
+extern void test__f_type_array_uint16ss_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint16ss_delete_callback()
+ */
+extern void test__f_type_array_uint16ss_delete_callback__works(void **state);
+
+#endif // _TEST__F_type_array__uint16ss_delete_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_destroy_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_destroy_callback.c
new file mode 100644 (file)
index 0000000..3d9d094
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-type_array.h"
+#include "test-type_array-uint16ss_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_uint16ss_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  uint16_t data = 0;
+  uint16_t data_array[] = { data };
+  f_uint16s_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_uint16s_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_uint16ss_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_type_array_uint16ss_destroy_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_uint16ss_t datass = f_uint16ss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_adjust(length, sizeof(f_uint16s_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_adjust(1, sizeof(uint16_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_uint16ss_destroy_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_destroy_callback.h
new file mode 100644 (file)
index 0000000..c9f0340
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__uint16ss_destroy_callback
+#define _TEST__F_type_array__uint16ss_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_uint16ss_destroy_callback()
+ */
+extern void test__f_type_array_uint16ss_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint16ss_destroy_callback()
+ */
+extern void test__f_type_array_uint16ss_destroy_callback__works(void **state);
+
+#endif // _TEST__F_type_array__uint16ss_destroy_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_delete_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_delete_callback.c
deleted file mode 100644 (file)
index 034f1eb..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "test-type_array.h"
-#include "test-type_array-uint32s_delete_callback.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint32s_delete_callback__fails(void **state) {
-
-  uint32_t data = 0;
-  uint32_t data_array[] = { data };
-  f_uint32s_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_uint32s_t datass_array[] = { datas };
-
-  {
-    will_return(__wrap_f_memory_array_resize, true);
-    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
-
-    const f_status_t status = f_uint32s_delete_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-}
-
-void test__f_type_array_uint32s_delete_callback__works(void **state) {
-
-  uint32_t data = 0;
-  uint32_t data_array[] = { data };
-  f_uint32s_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_uint32s_t datass_array[] = { datas };
-  const f_number_unsigned_t length = 1;
-
-  {
-    will_return(__wrap_f_memory_array_resize, false);
-    will_return(__wrap_f_memory_array_resize, F_none);
-
-    const f_status_t status = f_uint32s_delete_callback(0, length, (void *) datass_array);
-
-    assert_int_equal(status, F_none);
-  }
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_delete_callback.h
deleted file mode 100644 (file)
index 045dd27..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__uint32s_delete_callback
-#define _TEST__F_type_array__uint32s_delete_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_uint32s_delete_callback()
- */
-extern void test__f_type_array_uint32s_delete_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint32s_delete_callback()
- */
-extern void test__f_type_array_uint32s_delete_callback__works(void **state);
-
-#endif // _TEST__F_type_array__uint32s_delete_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_destroy_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_destroy_callback.c
deleted file mode 100644 (file)
index d11bd91..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "test-type_array.h"
-#include "test-type_array-uint32s_destroy_callback.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint32s_destroy_callback__fails(void **state) {
-
-  uint32_t data = 0;
-  uint32_t data_array[] = { data };
-  f_uint32s_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_uint32s_t datass_array[] = { datas };
-
-  {
-    will_return(__wrap_f_memory_array_adjust, true);
-    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
-
-    const f_status_t status = f_uint32s_destroy_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-}
-
-void test__f_type_array_uint32s_destroy_callback__works(void **state) {
-
-  uint32_t data = 0;
-  uint32_t data_array[] = { data };
-  f_uint32s_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_uint32s_t datass_array[] = { datas };
-  const f_number_unsigned_t length = 1;
-
-  {
-    will_return(__wrap_f_memory_array_adjust, false);
-    will_return(__wrap_f_memory_array_adjust, F_none);
-
-    const f_status_t status = f_uint32s_destroy_callback(0, length, (void *) datass_array);
-
-    assert_int_equal(status, F_none);
-  }
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_destroy_callback.h
deleted file mode 100644 (file)
index 764f231..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__uint32s_destroy_callback
-#define _TEST__F_type_array__uint32s_destroy_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_uint32s_destroy_callback()
- */
-extern void test__f_type_array_uint32s_destroy_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint32s_destroy_callback()
- */
-extern void test__f_type_array_uint32s_destroy_callback__works(void **state);
-
-#endif // _TEST__F_type_array__uint32s_destroy_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_delete_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_delete_callback.c
new file mode 100644 (file)
index 0000000..4f57ff3
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-type_array.h"
+#include "test-type_array-uint32ss_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_uint32ss_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  uint32_t data = 0;
+  uint32_t data_array[] = { data };
+  f_uint32s_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_uint32s_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_uint32ss_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_type_array_uint32ss_delete_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_uint32ss_t datass = f_uint32ss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_uint32s_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_resize(1, sizeof(uint32_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_uint32ss_delete_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_delete_callback.h
new file mode 100644 (file)
index 0000000..6b96f29
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__uint32ss_delete_callback
+#define _TEST__F_type_array__uint32ss_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_uint32ss_delete_callback()
+ */
+extern void test__f_type_array_uint32ss_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint32ss_delete_callback()
+ */
+extern void test__f_type_array_uint32ss_delete_callback__works(void **state);
+
+#endif // _TEST__F_type_array__uint32ss_delete_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_destroy_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_destroy_callback.c
new file mode 100644 (file)
index 0000000..d54d281
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-type_array.h"
+#include "test-type_array-uint32ss_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_uint32ss_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  uint32_t data = 0;
+  uint32_t data_array[] = { data };
+  f_uint32s_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_uint32s_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_uint32ss_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_type_array_uint32ss_destroy_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_uint32ss_t datass = f_uint32ss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_adjust(length, sizeof(f_uint32s_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_adjust(1, sizeof(uint32_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_uint32ss_destroy_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_destroy_callback.h
new file mode 100644 (file)
index 0000000..3ce3521
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__uint32ss_destroy_callback
+#define _TEST__F_type_array__uint32ss_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_uint32ss_destroy_callback()
+ */
+extern void test__f_type_array_uint32ss_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint32ss_destroy_callback()
+ */
+extern void test__f_type_array_uint32ss_destroy_callback__works(void **state);
+
+#endif // _TEST__F_type_array__uint32ss_destroy_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_delete_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_delete_callback.c
deleted file mode 100644 (file)
index ee0f5eb..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "test-type_array.h"
-#include "test-type_array-uint64s_delete_callback.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint64s_delete_callback__fails(void **state) {
-
-  uint64_t data = 0;
-  uint64_t data_array[] = { data };
-  f_uint64s_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_uint64s_t datass_array[] = { datas };
-
-  {
-    will_return(__wrap_f_memory_array_resize, true);
-    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
-
-    const f_status_t status = f_uint64s_delete_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-}
-
-void test__f_type_array_uint64s_delete_callback__works(void **state) {
-
-  uint64_t data = 0;
-  uint64_t data_array[] = { data };
-  f_uint64s_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_uint64s_t datass_array[] = { datas };
-  const f_number_unsigned_t length = 1;
-
-  {
-    will_return(__wrap_f_memory_array_resize, false);
-    will_return(__wrap_f_memory_array_resize, F_none);
-
-    const f_status_t status = f_uint64s_delete_callback(0, length, (void *) datass_array);
-
-    assert_int_equal(status, F_none);
-  }
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_delete_callback.h
deleted file mode 100644 (file)
index d5570bb..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__uint64s_delete_callback
-#define _TEST__F_type_array__uint64s_delete_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_uint64s_delete_callback()
- */
-extern void test__f_type_array_uint64s_delete_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint64s_delete_callback()
- */
-extern void test__f_type_array_uint64s_delete_callback__works(void **state);
-
-#endif // _TEST__F_type_array__uint64s_delete_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_destroy_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_destroy_callback.c
deleted file mode 100644 (file)
index 9f80d3f..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "test-type_array.h"
-#include "test-type_array-uint64s_destroy_callback.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint64s_destroy_callback__fails(void **state) {
-
-  uint64_t data = 0;
-  uint64_t data_array[] = { data };
-  f_uint64s_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_uint64s_t datass_array[] = { datas };
-
-  {
-    will_return(__wrap_f_memory_array_adjust, true);
-    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
-
-    const f_status_t status = f_uint64s_destroy_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-}
-
-void test__f_type_array_uint64s_destroy_callback__works(void **state) {
-
-  uint64_t data = 0;
-  uint64_t data_array[] = { data };
-  f_uint64s_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_uint64s_t datass_array[] = { datas };
-  const f_number_unsigned_t length = 1;
-
-  {
-    will_return(__wrap_f_memory_array_adjust, false);
-    will_return(__wrap_f_memory_array_adjust, F_none);
-
-    const f_status_t status = f_uint64s_destroy_callback(0, length, (void *) datass_array);
-
-    assert_int_equal(status, F_none);
-  }
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_destroy_callback.h
deleted file mode 100644 (file)
index 856868a..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__uint64s_destroy_callback
-#define _TEST__F_type_array__uint64s_destroy_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_uint64s_destroy_callback()
- */
-extern void test__f_type_array_uint64s_destroy_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint64s_destroy_callback()
- */
-extern void test__f_type_array_uint64s_destroy_callback__works(void **state);
-
-#endif // _TEST__F_type_array__uint64s_destroy_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_delete_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_delete_callback.c
new file mode 100644 (file)
index 0000000..8de79e4
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-type_array.h"
+#include "test-type_array-uint64ss_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_uint64ss_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  uint64_t data = 0;
+  uint64_t data_array[] = { data };
+  f_uint64s_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_uint64s_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_uint64ss_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_type_array_uint64ss_delete_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_uint64ss_t datass = f_uint64ss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_uint64s_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_resize(1, sizeof(uint64_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_uint64ss_delete_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_delete_callback.h
new file mode 100644 (file)
index 0000000..adc2913
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__uint64ss_delete_callback
+#define _TEST__F_type_array__uint64ss_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_uint64ss_delete_callback()
+ */
+extern void test__f_type_array_uint64ss_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint64ss_delete_callback()
+ */
+extern void test__f_type_array_uint64ss_delete_callback__works(void **state);
+
+#endif // _TEST__F_type_array__uint64ss_delete_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_destroy_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_destroy_callback.c
new file mode 100644 (file)
index 0000000..68f6e8b
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-type_array.h"
+#include "test-type_array-uint64ss_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_uint64ss_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  uint64_t data = 0;
+  uint64_t data_array[] = { data };
+  f_uint64s_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_uint64s_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_uint64ss_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_type_array_uint64ss_destroy_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_uint64ss_t datass = f_uint64ss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_adjust(length, sizeof(f_uint64s_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_adjust(1, sizeof(uint64_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_uint64ss_destroy_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_destroy_callback.h
new file mode 100644 (file)
index 0000000..b422b95
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__uint64ss_destroy_callback
+#define _TEST__F_type_array__uint64ss_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_uint64ss_destroy_callback()
+ */
+extern void test__f_type_array_uint64ss_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint64ss_destroy_callback()
+ */
+extern void test__f_type_array_uint64ss_destroy_callback__works(void **state);
+
+#endif // _TEST__F_type_array__uint64ss_destroy_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_delete_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_delete_callback.c
deleted file mode 100644 (file)
index 597ee24..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "test-type_array.h"
-#include "test-type_array-uint8s_delete_callback.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint8s_delete_callback__fails(void **state) {
-
-  uint8_t data = 0;
-  uint8_t data_array[] = { data };
-  f_uint8s_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_uint8s_t datass_array[] = { datas };
-
-  {
-    will_return(__wrap_f_memory_array_resize, true);
-    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
-
-    const f_status_t status = f_uint8s_delete_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-}
-
-void test__f_type_array_uint8s_delete_callback__works(void **state) {
-
-  uint8_t data = 0;
-  uint8_t data_array[] = { data };
-  f_uint8s_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_uint8s_t datass_array[] = { datas };
-  const f_number_unsigned_t length = 1;
-
-  {
-    will_return(__wrap_f_memory_array_resize, false);
-    will_return(__wrap_f_memory_array_resize, F_none);
-
-    const f_status_t status = f_uint8s_delete_callback(0, length, (void *) datass_array);
-
-    assert_int_equal(status, F_none);
-  }
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_delete_callback.h
deleted file mode 100644 (file)
index 8105795..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__uint8s_delete_callback
-#define _TEST__F_type_array__uint8s_delete_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_uint8s_delete_callback()
- */
-extern void test__f_type_array_uint8s_delete_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint8s_delete_callback()
- */
-extern void test__f_type_array_uint8s_delete_callback__works(void **state);
-
-#endif // _TEST__F_type_array__uint8s_delete_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_destroy_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_destroy_callback.c
deleted file mode 100644 (file)
index 49b4cf7..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "test-type_array.h"
-#include "test-type_array-uint8s_destroy_callback.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_type_array_uint8s_destroy_callback__fails(void **state) {
-
-  uint8_t data = 0;
-  uint8_t data_array[] = { data };
-  f_uint8s_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_uint8s_t datass_array[] = { datas };
-
-  {
-    will_return(__wrap_f_memory_array_adjust, true);
-    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
-
-    const f_status_t status = f_uint8s_destroy_callback(0, 1, (void *) datass_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-}
-
-void test__f_type_array_uint8s_destroy_callback__works(void **state) {
-
-  uint8_t data = 0;
-  uint8_t data_array[] = { data };
-  f_uint8s_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_uint8s_t datass_array[] = { datas };
-  const f_number_unsigned_t length = 1;
-
-  {
-    will_return(__wrap_f_memory_array_adjust, false);
-    will_return(__wrap_f_memory_array_adjust, F_none);
-
-    const f_status_t status = f_uint8s_destroy_callback(0, length, (void *) datass_array);
-
-    assert_int_equal(status, F_none);
-  }
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_destroy_callback.h
deleted file mode 100644 (file)
index 5478875..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: Type
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_type_array__uint8s_destroy_callback
-#define _TEST__F_type_array__uint8s_destroy_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_uint8s_destroy_callback()
- */
-extern void test__f_type_array_uint8s_destroy_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_uint8s_destroy_callback()
- */
-extern void test__f_type_array_uint8s_destroy_callback__works(void **state);
-
-#endif // _TEST__F_type_array__uint8s_destroy_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_delete_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_delete_callback.c
new file mode 100644 (file)
index 0000000..672be3a
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-type_array.h"
+#include "test-type_array-uint8ss_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_uint8ss_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  uint8_t data = 0;
+  uint8_t data_array[] = { data };
+  f_uint8s_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_uint8s_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_uint8ss_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_type_array_uint8ss_delete_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_uint8ss_t datass = f_uint8ss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_uint8s_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_resize(1, sizeof(uint8_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_uint8ss_delete_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_delete_callback.h
new file mode 100644 (file)
index 0000000..1dbfbad
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__uint8ss_delete_callback
+#define _TEST__F_type_array__uint8ss_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_uint8ss_delete_callback()
+ */
+extern void test__f_type_array_uint8ss_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint8ss_delete_callback()
+ */
+extern void test__f_type_array_uint8ss_delete_callback__works(void **state);
+
+#endif // _TEST__F_type_array__uint8ss_delete_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_destroy_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_destroy_callback.c
new file mode 100644 (file)
index 0000000..a09ef6d
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-type_array.h"
+#include "test-type_array-uint8ss_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_uint8ss_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  uint8_t data = 0;
+  uint8_t data_array[] = { data };
+  f_uint8s_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_uint8s_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_uint8ss_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_type_array_uint8ss_destroy_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_uint8ss_t datass = f_uint8ss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_adjust(length, sizeof(f_uint8s_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_none);
+
+    status = f_memory_array_adjust(1, sizeof(uint8_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_none);
+  }
+
+  {
+    const f_status_t status = f_uint8ss_destroy_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_destroy_callback.h
new file mode 100644 (file)
index 0000000..eb174fd
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__uint8ss_destroy_callback
+#define _TEST__F_type_array__uint8ss_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_uint8ss_destroy_callback()
+ */
+extern void test__f_type_array_uint8ss_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint8ss_destroy_callback()
+ */
+extern void test__f_type_array_uint8ss_destroy_callback__works(void **state);
+
+#endif // _TEST__F_type_array__uint8ss_destroy_callback
index 7d973c9606dffc96121960a6dc4f613c695628c6..4c013251a6b86eb5502203eacbcf7b555d28640b 100644 (file)
@@ -17,159 +17,159 @@ int setdown(void **state) {
 int main(void) {
 
   const struct CMUnitTest tests[] = {
-    cmocka_unit_test(test__f_type_array_cells_destroy_callback__fails),
-    cmocka_unit_test(test__f_type_array_cells_delete_callback__fails),
+    cmocka_unit_test(test__f_type_array_cellss_delete_callback__fails),
+    cmocka_unit_test(test__f_type_array_cellss_delete_callback__works),
 
-    cmocka_unit_test(test__f_type_array_files_destroy_callback__fails),
-    cmocka_unit_test(test__f_type_array_files_delete_callback__fails),
+    cmocka_unit_test(test__f_type_array_cellss_destroy_callback__fails),
+    cmocka_unit_test(test__f_type_array_cellss_destroy_callback__works),
 
-    cmocka_unit_test(test__f_type_array_fll_ids_destroy_callback__fails),
-    cmocka_unit_test(test__f_type_array_fll_ids_delete_callback__fails),
+    cmocka_unit_test(test__f_type_array_filess_delete_callback__fails),
+    cmocka_unit_test(test__f_type_array_filess_delete_callback__works),
 
-    cmocka_unit_test(test__f_type_array_int8s_destroy_callback__fails),
-    cmocka_unit_test(test__f_type_array_int8s_delete_callback__fails),
+    cmocka_unit_test(test__f_type_array_filess_destroy_callback__fails),
+    cmocka_unit_test(test__f_type_array_filess_destroy_callback__works),
 
-    cmocka_unit_test(test__f_type_array_int16s_destroy_callback__fails),
-    cmocka_unit_test(test__f_type_array_int16s_delete_callback__fails),
+    cmocka_unit_test(test__f_type_array_fll_idss_delete_callback__fails),
+    cmocka_unit_test(test__f_type_array_fll_idss_delete_callback__works),
 
-    cmocka_unit_test(test__f_type_array_int32s_destroy_callback__fails),
-    cmocka_unit_test(test__f_type_array_int32s_delete_callback__fails),
+    cmocka_unit_test(test__f_type_array_fll_idss_destroy_callback__fails),
+    cmocka_unit_test(test__f_type_array_fll_idss_destroy_callback__works),
 
-    cmocka_unit_test(test__f_type_array_int64s_destroy_callback__fails),
-    cmocka_unit_test(test__f_type_array_int64s_delete_callback__fails),
+    cmocka_unit_test(test__f_type_array_int8ss_delete_callback__fails),
+    cmocka_unit_test(test__f_type_array_int8ss_delete_callback__works),
 
-    cmocka_unit_test(test__f_type_array_int128s_destroy_callback__fails),
-    cmocka_unit_test(test__f_type_array_int128s_delete_callback__fails),
+    cmocka_unit_test(test__f_type_array_int8ss_destroy_callback__fails),
+    cmocka_unit_test(test__f_type_array_int8ss_destroy_callback__works),
 
-    cmocka_unit_test(test__f_type_array_number_unsigneds_destroy_callback__fails),
-    cmocka_unit_test(test__f_type_array_number_unsigneds_delete_callback__fails),
+    cmocka_unit_test(test__f_type_array_int16ss_delete_callback__fails),
+    cmocka_unit_test(test__f_type_array_int16ss_delete_callback__works),
 
-    cmocka_unit_test(test__f_type_array_polls_destroy_callback__fails),
-    cmocka_unit_test(test__f_type_array_polls_delete_callback__fails),
+    cmocka_unit_test(test__f_type_array_int16ss_destroy_callback__fails),
+    cmocka_unit_test(test__f_type_array_int16ss_destroy_callback__works),
 
-    cmocka_unit_test(test__f_type_array_states_destroy_callback__fails),
-    cmocka_unit_test(test__f_type_array_states_delete_callback__fails),
+    cmocka_unit_test(test__f_type_array_int32ss_delete_callback__fails),
+    cmocka_unit_test(test__f_type_array_int32ss_delete_callback__works),
 
-    cmocka_unit_test(test__f_type_array_statuss_destroy_callback__fails),
-    cmocka_unit_test(test__f_type_array_statuss_delete_callback__fails),
+    cmocka_unit_test(test__f_type_array_int32ss_destroy_callback__fails),
+    cmocka_unit_test(test__f_type_array_int32ss_destroy_callback__works),
 
-    cmocka_unit_test(test__f_type_array_uint8s_destroy_callback__fails),
-    cmocka_unit_test(test__f_type_array_uint8s_delete_callback__fails),
+    cmocka_unit_test(test__f_type_array_int64ss_delete_callback__fails),
+    cmocka_unit_test(test__f_type_array_int64ss_delete_callback__works),
 
-    cmocka_unit_test(test__f_type_array_uint16s_destroy_callback__fails),
-    cmocka_unit_test(test__f_type_array_uint16s_delete_callback__fails),
+    cmocka_unit_test(test__f_type_array_int64ss_destroy_callback__fails),
+    cmocka_unit_test(test__f_type_array_int64ss_destroy_callback__works),
 
-    cmocka_unit_test(test__f_type_array_uint32s_destroy_callback__fails),
-    cmocka_unit_test(test__f_type_array_uint32s_delete_callback__fails),
+    cmocka_unit_test(test__f_type_array_int128ss_delete_callback__fails),
+    cmocka_unit_test(test__f_type_array_int128ss_delete_callback__works),
 
-    cmocka_unit_test(test__f_type_array_uint64s_destroy_callback__fails),
-    cmocka_unit_test(test__f_type_array_uint64s_delete_callback__fails),
+    cmocka_unit_test(test__f_type_array_int128ss_destroy_callback__fails),
+    cmocka_unit_test(test__f_type_array_int128ss_destroy_callback__works),
 
-    cmocka_unit_test(test__f_type_array_uint128s_destroy_callback__fails),
-    cmocka_unit_test(test__f_type_array_uint128s_delete_callback__fails),
+    cmocka_unit_test(test__f_type_array_number_unsignedss_delete_callback__fails),
+    cmocka_unit_test(test__f_type_array_number_unsignedss_delete_callback__works),
 
-    cmocka_unit_test(test__f_type_array_cells_destroy_callback__works),
-    cmocka_unit_test(test__f_type_array_cells_delete_callback__works),
+    cmocka_unit_test(test__f_type_array_number_unsignedss_destroy_callback__fails),
+    cmocka_unit_test(test__f_type_array_number_unsignedss_destroy_callback__works),
 
-    cmocka_unit_test(test__f_type_array_files_destroy_callback__works),
-    cmocka_unit_test(test__f_type_array_files_delete_callback__works),
+    cmocka_unit_test(test__f_type_array_pollss_delete_callback__fails),
+    cmocka_unit_test(test__f_type_array_pollss_delete_callback__works),
 
-    cmocka_unit_test(test__f_type_array_fll_ids_destroy_callback__works),
-    cmocka_unit_test(test__f_type_array_fll_ids_delete_callback__works),
+    cmocka_unit_test(test__f_type_array_pollss_destroy_callback__fails),
+    cmocka_unit_test(test__f_type_array_pollss_destroy_callback__works),
 
-    cmocka_unit_test(test__f_type_array_int8s_destroy_callback__works),
-    cmocka_unit_test(test__f_type_array_int8s_delete_callback__works),
+    cmocka_unit_test(test__f_type_array_statess_delete_callback__fails),
+    cmocka_unit_test(test__f_type_array_statess_delete_callback__works),
 
-    cmocka_unit_test(test__f_type_array_int16s_destroy_callback__works),
-    cmocka_unit_test(test__f_type_array_int16s_delete_callback__works),
+    cmocka_unit_test(test__f_type_array_statess_destroy_callback__fails),
+    cmocka_unit_test(test__f_type_array_statess_destroy_callback__works),
 
-    cmocka_unit_test(test__f_type_array_int32s_destroy_callback__works),
-    cmocka_unit_test(test__f_type_array_int32s_delete_callback__works),
+    cmocka_unit_test(test__f_type_array_statusss_delete_callback__fails),
+    cmocka_unit_test(test__f_type_array_statusss_delete_callback__works),
 
-    cmocka_unit_test(test__f_type_array_int64s_destroy_callback__works),
-    cmocka_unit_test(test__f_type_array_int64s_delete_callback__works),
+    cmocka_unit_test(test__f_type_array_statusss_destroy_callback__fails),
+    cmocka_unit_test(test__f_type_array_statusss_destroy_callback__works),
 
-    cmocka_unit_test(test__f_type_array_int128s_destroy_callback__works),
-    cmocka_unit_test(test__f_type_array_int128s_delete_callback__works),
+    cmocka_unit_test(test__f_type_array_uint8ss_delete_callback__fails),
+    cmocka_unit_test(test__f_type_array_uint8ss_delete_callback__works),
 
-    cmocka_unit_test(test__f_type_array_number_unsigneds_destroy_callback__works),
-    cmocka_unit_test(test__f_type_array_number_unsigneds_delete_callback__works),
+    cmocka_unit_test(test__f_type_array_uint8ss_destroy_callback__fails),
+    cmocka_unit_test(test__f_type_array_uint8ss_destroy_callback__works),
 
-    cmocka_unit_test(test__f_type_array_polls_destroy_callback__works),
-    cmocka_unit_test(test__f_type_array_polls_delete_callback__works),
+    cmocka_unit_test(test__f_type_array_uint16ss_delete_callback__fails),
+    cmocka_unit_test(test__f_type_array_uint16ss_delete_callback__works),
 
-    cmocka_unit_test(test__f_type_array_states_destroy_callback__works),
-    cmocka_unit_test(test__f_type_array_states_delete_callback__works),
+    cmocka_unit_test(test__f_type_array_uint16ss_destroy_callback__fails),
+    cmocka_unit_test(test__f_type_array_uint16ss_destroy_callback__works),
 
-    cmocka_unit_test(test__f_type_array_statuss_destroy_callback__works),
-    cmocka_unit_test(test__f_type_array_statuss_delete_callback__works),
+    cmocka_unit_test(test__f_type_array_uint32ss_delete_callback__fails),
+    cmocka_unit_test(test__f_type_array_uint32ss_delete_callback__works),
 
-    cmocka_unit_test(test__f_type_array_uint8s_destroy_callback__works),
-    cmocka_unit_test(test__f_type_array_uint8s_delete_callback__works),
+    cmocka_unit_test(test__f_type_array_uint32ss_destroy_callback__fails),
+    cmocka_unit_test(test__f_type_array_uint32ss_destroy_callback__works),
 
-    cmocka_unit_test(test__f_type_array_uint16s_destroy_callback__works),
-    cmocka_unit_test(test__f_type_array_uint16s_delete_callback__works),
+    cmocka_unit_test(test__f_type_array_uint64ss_delete_callback__fails),
+    cmocka_unit_test(test__f_type_array_uint64ss_delete_callback__works),
 
-    cmocka_unit_test(test__f_type_array_uint32s_destroy_callback__works),
-    cmocka_unit_test(test__f_type_array_uint32s_delete_callback__works),
+    cmocka_unit_test(test__f_type_array_uint64ss_destroy_callback__fails),
+    cmocka_unit_test(test__f_type_array_uint64ss_destroy_callback__works),
 
-    cmocka_unit_test(test__f_type_array_uint64s_destroy_callback__works),
-    cmocka_unit_test(test__f_type_array_uint64s_delete_callback__works),
+    cmocka_unit_test(test__f_type_array_uint128ss_delete_callback__fails),
+    cmocka_unit_test(test__f_type_array_uint128ss_delete_callback__works),
 
-    cmocka_unit_test(test__f_type_array_uint128s_destroy_callback__works),
-    cmocka_unit_test(test__f_type_array_uint128s_delete_callback__works),
+    cmocka_unit_test(test__f_type_array_uint128ss_destroy_callback__fails),
+    cmocka_unit_test(test__f_type_array_uint128ss_destroy_callback__works),
 
     #ifndef _di_level_0_parameter_checking_
-      // f_cells_destroy_callback() doesn't use parameter checking.
-      // f_cells_delete_callback() doesn't use parameter checking.
+      // f_cellss_destroy_callback() doesn't use parameter checking.
+      // f_cellss_delete_callback() doesn't use parameter checking.
 
-      // f_files_destroy_callback() doesn't use parameter checking.
-      // f_files_delete_callback() doesn't use parameter checking.
+      // f_filess_destroy_callback() doesn't use parameter checking.
+      // f_filess_delete_callback() doesn't use parameter checking.
 
-      // f_fll_ids_destroy_callback() doesn't use parameter checking.
-      // f_fll_ids_delete_callback() doesn't use parameter checking.
+      // f_fll_idss_destroy_callback() doesn't use parameter checking.
+      // f_fll_idss_delete_callback() doesn't use parameter checking.
 
-      // f_int8s_destroy_callback() doesn't use parameter checking.
-      // f_int8s_delete_callback() doesn't use parameter checking.
+      // f_int8ss_destroy_callback() doesn't use parameter checking.
+      // f_int8ss_delete_callback() doesn't use parameter checking.
 
-      // f_int16s_destroy_callback() doesn't use parameter checking.
-      // f_int16s_delete_callback() doesn't use parameter checking.
+      // f_int16ss_destroy_callback() doesn't use parameter checking.
+      // f_int16ss_delete_callback() doesn't use parameter checking.
 
-      // f_int32s_destroy_callback() doesn't use parameter checking.
-      // f_int32s_delete_callback() doesn't use parameter checking.
+      // f_int32ss_destroy_callback() doesn't use parameter checking.
+      // f_int32ss_delete_callback() doesn't use parameter checking.
 
-      // f_int64s_destroy_callback() doesn't use parameter checking.
-      // f_int64s_delete_callback() doesn't use parameter checking.
+      // f_int64ss_destroy_callback() doesn't use parameter checking.
+      // f_int64ss_delete_callback() doesn't use parameter checking.
 
-      // f_int128s_destroy_callback() doesn't use parameter checking.
-      // f_int128s_delete_callback() doesn't use parameter checking.
+      // f_int128ss_destroy_callback() doesn't use parameter checking.
+      // f_int128ss_delete_callback() doesn't use parameter checking.
 
-      // f_number_unsigneds_destroy_callback() doesn't use parameter checking.
-      // f_number_unsigneds_delete_callback() doesn't use parameter checking.
+      // f_number_unsignedss_destroy_callback() doesn't use parameter checking.
+      // f_number_unsignedss_delete_callback() doesn't use parameter checking.
 
-      // f_polls_destroy_callback() doesn't use parameter checking.
-      // f_polls_delete_callback() doesn't use parameter checking.
+      // f_pollss_destroy_callback() doesn't use parameter checking.
+      // f_pollss_delete_callback() doesn't use parameter checking.
 
-      // f_states_destroy_callback() doesn't use parameter checking.
-      // f_states_delete_callback() doesn't use parameter checking.
+      // f_statess_destroy_callback() doesn't use parameter checking.
+      // f_statess_delete_callback() doesn't use parameter checking.
 
-      // f_statuss_destroy_callback() doesn't use parameter checking.
-      // f_statuss_delete_callback() doesn't use parameter checking.
+      // f_statusss_destroy_callback() doesn't use parameter checking.
+      // f_statusss_delete_callback() doesn't use parameter checking.
 
-      // f_uint8s_destroy_callback() doesn't use parameter checking.
-      // f_uint8s_delete_callback() doesn't use parameter checking.
+      // f_uint8ss_destroy_callback() doesn't use parameter checking.
+      // f_uint8ss_delete_callback() doesn't use parameter checking.
 
-      // f_uint16s_destroy_callback() doesn't use parameter checking.
-      // f_uint16s_delete_callback() doesn't use parameter checking.
+      // f_uint16ss_destroy_callback() doesn't use parameter checking.
+      // f_uint16ss_delete_callback() doesn't use parameter checking.
 
-      // f_uint32s_destroy_callback() doesn't use parameter checking.
-      // f_uint32s_delete_callback() doesn't use parameter checking.
+      // f_uint32ss_destroy_callback() doesn't use parameter checking.
+      // f_uint32ss_delete_callback() doesn't use parameter checking.
 
-      // f_uint64s_destroy_callback() doesn't use parameter checking.
-      // f_uint64s_delete_callback() doesn't use parameter checking.
+      // f_uint64ss_destroy_callback() doesn't use parameter checking.
+      // f_uint64ss_delete_callback() doesn't use parameter checking.
 
-      // f_uint128s_destroy_callback() doesn't use parameter checking.
-      // f_uint128s_delete_callback() doesn't use parameter checking.
+      // f_uint128ss_destroy_callback() doesn't use parameter checking.
+      // f_uint128ss_delete_callback() doesn't use parameter checking.
     #endif // _di_level_0_parameter_checking_
   };
 
index 9acc4dd6e1cdaa16c2fdb32530ff69cf631d1c96..66c9bdedf01a6edf576476314c23a58dd7876722 100644 (file)
 #include <fll/level_0/type_array.h>
 #include <fll/level_0/type_array_file.h>
 
+// Mock includes.
+#include "mock-type_array.h"
+
 // Test includes.
-#include "test-type_array-cells_destroy_callback.h"
-#include "test-type_array-cells_delete_callback.h"
-#include "test-type_array-files_destroy_callback.h"
-#include "test-type_array-files_delete_callback.h"
-#include "test-type_array-fll_ids_destroy_callback.h"
-#include "test-type_array-fll_ids_delete_callback.h"
-#include "test-type_array-int8s_destroy_callback.h"
-#include "test-type_array-int8s_delete_callback.h"
-#include "test-type_array-int16s_destroy_callback.h"
-#include "test-type_array-int16s_delete_callback.h"
-#include "test-type_array-int32s_destroy_callback.h"
-#include "test-type_array-int32s_delete_callback.h"
-#include "test-type_array-int64s_destroy_callback.h"
-#include "test-type_array-int64s_delete_callback.h"
-#include "test-type_array-int128s_destroy_callback.h"
-#include "test-type_array-int128s_delete_callback.h"
-#include "test-type_array-number_unsigneds_destroy_callback.h"
-#include "test-type_array-number_unsigneds_delete_callback.h"
-#include "test-type_array-polls_destroy_callback.h"
-#include "test-type_array-polls_delete_callback.h"
-#include "test-type_array-states_destroy_callback.h"
-#include "test-type_array-states_delete_callback.h"
-#include "test-type_array-statuss_destroy_callback.h"
-#include "test-type_array-statuss_delete_callback.h"
-#include "test-type_array-uint8s_destroy_callback.h"
-#include "test-type_array-uint8s_delete_callback.h"
-#include "test-type_array-uint16s_destroy_callback.h"
-#include "test-type_array-uint16s_delete_callback.h"
-#include "test-type_array-uint32s_destroy_callback.h"
-#include "test-type_array-uint32s_delete_callback.h"
-#include "test-type_array-uint64s_destroy_callback.h"
-#include "test-type_array-uint64s_delete_callback.h"
-#include "test-type_array-uint128s_destroy_callback.h"
-#include "test-type_array-uint128s_delete_callback.h"
+#include "test-type_array-cellss_delete_callback.h"
+#include "test-type_array-cellss_destroy_callback.h"
+#include "test-type_array-filess_delete_callback.h"
+#include "test-type_array-filess_destroy_callback.h"
+#include "test-type_array-fll_idss_delete_callback.h"
+#include "test-type_array-fll_idss_destroy_callback.h"
+#include "test-type_array-int8ss_delete_callback.h"
+#include "test-type_array-int8ss_destroy_callback.h"
+#include "test-type_array-int16ss_delete_callback.h"
+#include "test-type_array-int16ss_destroy_callback.h"
+#include "test-type_array-int32ss_delete_callback.h"
+#include "test-type_array-int32ss_destroy_callback.h"
+#include "test-type_array-int64ss_delete_callback.h"
+#include "test-type_array-int64ss_destroy_callback.h"
+#include "test-type_array-int128ss_delete_callback.h"
+#include "test-type_array-int128ss_destroy_callback.h"
+#include "test-type_array-number_unsignedss_delete_callback.h"
+#include "test-type_array-number_unsignedss_destroy_callback.h"
+#include "test-type_array-pollss_delete_callback.h"
+#include "test-type_array-pollss_destroy_callback.h"
+#include "test-type_array-statess_delete_callback.h"
+#include "test-type_array-statess_destroy_callback.h"
+#include "test-type_array-statusss_delete_callback.h"
+#include "test-type_array-statusss_destroy_callback.h"
+#include "test-type_array-uint8ss_delete_callback.h"
+#include "test-type_array-uint8ss_destroy_callback.h"
+#include "test-type_array-uint16ss_delete_callback.h"
+#include "test-type_array-uint16ss_destroy_callback.h"
+#include "test-type_array-uint32ss_delete_callback.h"
+#include "test-type_array-uint32ss_destroy_callback.h"
+#include "test-type_array-uint64ss_delete_callback.h"
+#include "test-type_array-uint64ss_destroy_callback.h"
+#include "test-type_array-uint128ss_delete_callback.h"
+#include "test-type_array-uint128ss_destroy_callback.h"
 
 #ifdef __cplusplus
 extern "C" {