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.
#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_
#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_
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
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);
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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),
// 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_
* 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.
*/
#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
#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.
*/
#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
#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.
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
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
#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) {
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);
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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;
{
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);
}
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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));
}
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;
{
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);
}
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
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),
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_
};
#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"
* }
*
* 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.
*/
#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
#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
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
}
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
}
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) {
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) {
#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
#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
#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
*
* 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);
*
* 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);
*
* 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);
*
* 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);
*
* 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);
*
* 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);
} // 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
#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.
*/
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
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
#define CMOCKA_XML_FILE ./out.xml
main:
- build settings individual test
+ build settings-mocks individual test
build settings-tests individual test
operate build_path
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"
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
-#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" {
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));
}
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);
}
*
* 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.
*/
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
-#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" {
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));
}
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);
}
*
* 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.
*/
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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
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),
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_
};
#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"
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
#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);
}
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);
}
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);
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));
}
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));
}
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));
}
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));
}
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;
{
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);
}
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));
}
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));
}
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));
}
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));
}
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;
{
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);
}
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
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),
// 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),
// 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"
+++ /dev/null
-#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
+++ /dev/null
-/**
- * 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
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
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
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),
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),
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_
};
#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"
#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
# 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
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
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);
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);
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) {
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
+++ /dev/null
-#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
+++ /dev/null
-/**
- * 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
+++ /dev/null
-#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
+++ /dev/null
-/**
- * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
+++ /dev/null
-#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
+++ /dev/null
-/**
- * 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
+++ /dev/null
-#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
+++ /dev/null
-/**
- * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
+++ /dev/null
-#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
+++ /dev/null
-/**
- * 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
+++ /dev/null
-#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
+++ /dev/null
-/**
- * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
+++ /dev/null
-#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
+++ /dev/null
-/**
- * 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
+++ /dev/null
-#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
+++ /dev/null
-/**
- * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
+++ /dev/null
-#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
+++ /dev/null
-/**
- * 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
+++ /dev/null
-#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
+++ /dev/null
-/**
- * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
+++ /dev/null
-#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
+++ /dev/null
-/**
- * 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
+++ /dev/null
-#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
+++ /dev/null
-/**
- * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
+++ /dev/null
-#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
+++ /dev/null
-/**
- * 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
+++ /dev/null
-#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
+++ /dev/null
-/**
- * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
+++ /dev/null
-#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
+++ /dev/null
-/**
- * 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
+++ /dev/null
-#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
+++ /dev/null
-/**
- * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
+++ /dev/null
-#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
+++ /dev/null
-/**
- * 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
+++ /dev/null
-#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
+++ /dev/null
-/**
- * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
+++ /dev/null
-#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
+++ /dev/null
-/**
- * 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
+++ /dev/null
-#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
+++ /dev/null
-/**
- * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
+++ /dev/null
-#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
+++ /dev/null
-/**
- * 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
+++ /dev/null
-#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
+++ /dev/null
-/**
- * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
+++ /dev/null
-#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
+++ /dev/null
-/**
- * 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
+++ /dev/null
-#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
+++ /dev/null
-/**
- * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
+++ /dev/null
-#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
+++ /dev/null
-/**
- * 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
+++ /dev/null
-#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
+++ /dev/null
-/**
- * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
+++ /dev/null
-#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
+++ /dev/null
-/**
- * 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
+++ /dev/null
-#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
+++ /dev/null
-/**
- * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
+++ /dev/null
-#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
+++ /dev/null
-/**
- * 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
+++ /dev/null
-#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
+++ /dev/null
-/**
- * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
+++ /dev/null
-#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
+++ /dev/null
-/**
- * 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
+++ /dev/null
-#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
+++ /dev/null
-/**
- * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
+++ /dev/null
-#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
+++ /dev/null
-/**
- * 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
+++ /dev/null
-#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
+++ /dev/null
-/**
- * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
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_
};
#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" {