#define _di_f_fss_sets_resize_
#define _di_f_fss_setss_delete_callback_
#define _di_f_fss_setss_destroy_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_limit_process_
#define _di_f_limit_setss_delete_callback_
#define _di_f_limit_setss_destroy_callback_
-#define _di_f_limit_setss_destroy_callback_
#define _di_f_limit_setss_t_
//#define _di_f_limit_sets_t_
//#define _di_f_limit_set_t_
#define _di_f_limit_valuess_delete_callback_
#define _di_f_limit_valuess_destroy_callback_
-#define _di_f_limit_valuess_destroy_callback_
#define _di_f_limit_valuess_t_
#define _di_f_limit_values_t_
//#define _di_f_limit_value_t_
#define _di_f_socket_address_family_e_
#define _di_f_socket_addressss_delete_callback_
#define _di_f_socket_addressss_destroy_callback_
-#define _di_f_socket_addressss_destroy_callback_
#define _di_f_socket_addressss_t_
#define _di_f_socket_addresss_t_
#define _di_f_socket_address_t_
#define _di_f_socket_read_stream_
#define _di_f_socketss_delete_callback_
#define _di_f_socketss_destroy_callback_
-#define _di_f_socketss_destroy_callback_
#define _di_f_socketss_t_
#define _di_f_sockets_t_
#define _di_f_socket_t_
#define _di_f_string_dynamic_prepend_nulless_
#define _di_f_string_dynamics_append_
#define _di_f_string_dynamics_append_all_
+//#define _di_f_string_dynamics_delete_callback_
+#define _di_f_string_dynamics_destroy_callback_
#define _di_f_string_dynamic_seek_line_
#define _di_f_string_dynamic_seek_line_to_
#define _di_f_string_dynamic_seek_to_
#define _di_f_string_dynamicss_append_
#define _di_f_string_dynamicss_append_all_
+#define _di_f_string_dynamicss_delete_callback_
+#define _di_f_string_dynamicss_destroy_callback_
#define _di_f_string_dynamicss_t_
//#define _di_f_string_dynamics_t_
//#define _di_f_string_dynamic_t_
//#define _di_f_string_dynamic_terminate_after_
//#define _di_f_string_empty_s_
//#define _di_f_string_eol_s_
+//#define _di_f_string_format_s_
#define _di_f_string_map_multis_adjust_
#define _di_f_string_map_multis_append_
#define _di_f_string_map_multis_append_all_
#define _di_f_utf_string_dynamic_prepend_assure_
#define _di_f_utf_string_dynamic_prepend_assure_nulless_
#define _di_f_utf_string_dynamic_prepend_nulless_
+#define _di_f_utf_string_dynamic_resize_
+#define _di_f_utf_string_dynamics_adjust_
#define _di_f_utf_string_dynamics_append_
#define _di_f_utf_string_dynamics_append_all_
+#define _di_f_utf_string_dynamics_decimate_by_
+#define _di_f_utf_string_dynamics_decrease_by
+#define _di_f_utf_string_dynamics_decrease_by_
#define _di_f_utf_string_dynamic_seek_line_
#define _di_f_utf_string_dynamic_seek_line_to_
#define _di_f_utf_string_dynamic_seek_to_
+#define _di_f_utf_string_dynamics_increase
+#define _di_f_utf_string_dynamics_increase_
+#define _di_f_utf_string_dynamics_increase_by
+#define _di_f_utf_string_dynamics_increase_by_
+#define _di_f_utf_string_dynamics_resize_
+#define _di_f_utf_string_dynamicss_adjust_
#define _di_f_utf_string_dynamicss_append_
#define _di_f_utf_string_dynamicss_append_all_
+#define _di_f_utf_string_dynamicss_decimate_by_
+#define _di_f_utf_string_dynamicss_decrease_by_
+#define _di_f_utf_string_dynamicss_increase_
+#define _di_f_utf_string_dynamicss_increase_by_
+#define _di_f_utf_string_dynamicss_resize_
#define _di_f_utf_string_dynamicss_t_
//#define _di_f_utf_string_dynamics_t_
//#define _di_f_utf_string_dynamic_t_
f_account_id_by_name
f_account_name_by_id
- f_accounts_adjust
f_accounts_append
f_accounts_append_all
- f_accounts_decimate_by
- f_accounts_decrease_by
- f_accounts_increase
- f_accounts_increase_by
- f_accounts_resize
- f_accountss_adjust
f_accountss_append
f_accountss_append_all
- f_accountss_decimate_by
- f_accountss_decrease_by
- f_accountss_increase
- f_accountss_increase_by
- f_accountss_resize
f_account_by_id:
- f_string_dynamic_increase_by
f_account_by_name:
- f_string_dynamic_increase_by
f_account_delete:
- f_string_dynamic_resize
f_account_destroy:
- f_string_dynamic_adjust
f_account_group_id_by_name:
f_account_group_name_by_id:
- f_string_dynamic_increase_by
f_account_id_by_name:
f_account_name_by_id:
- f_string_dynamic_increase_by
f_accounts_adjust:
f_memory_adjust
- f_string_dynamic_adjust
f_accounts_append:
f_memory_resize
- f_string_dynamic_append
f_accounts_append_all:
f_memory_resize
- f_string_dynamic_append
f_accounts_decimate_by:
f_memory_adjust
- f_string_dynamic_adjust
f_accounts_decrease_by:
f_memory_resize
- f_string_dynamic_resize
f_accounts_increase:
f_memory_resize
- f_string_dynamic_resize
f_accounts_increase_by:
f_memory_resize
- f_string_dynamic_resize
f_accounts_resize:
f_memory_resize
- f_string_dynamic_resize
f_accountss_adjust:
f_memory_adjust
- f_string_dynamic_adjust
f_accountss_append:
f_memory_resize
- f_string_dynamic_resize
f_accountss_append_all:
f_memory_resize
- f_string_dynamic_resize
f_accountss_decimate_by:
f_memory_adjust
- f_string_dynamic_adjust
f_accountss_decrease_by:
f_memory_resize
- f_string_dynamic_resize
f_accountss_increase:
f_memory_resize
- f_string_dynamic_resize
f_accountss_increase_by:
f_memory_resize
- f_string_dynamic_resize
f_accountss_resize:
f_memory_resize
- f_string_dynamic_resize
# 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_memory_arrays_adjust
+flags -Wl,--wrap=f_memory_arrays_resize
flags -Wl,--wrap=getpwnam_r
flags -Wl,--wrap=getpwuid_r
flags -Wl,--wrap=getgrnam_r
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) {
+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) {
- return __real_f_string_dynamic_adjust(length, structure);
+ if (mock_unwrap_f_memory) {
+ return __real_f_memory_arrays_resize(length, width, array, used, size, callback);
}
- if (!structure) return F_status_set_error(F_parameter_not);
+ 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);
- structure->size = length;
+ *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) {
+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) {
- return __real_f_string_dynamic_resize(length, structure);
+ if (mock_unwrap_f_memory) {
+ return __real_f_memory_arrays_resize(length, width, array, used, size, callback);
}
- if (!structure) return F_status_set_error(F_parameter_not);
+ 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);
- structure->size = length;
+ *size = length;
return mock_type(f_status_t);
}
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_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 __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_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_getpwnam_r(const char * const name, struct passwd *pwd, char *buf, size_t buflen, struct passwd **result);
extern int __wrap_getpwuid_r(uid_t uid, struct passwd *pwd, char *buf, size_t buflen, struct passwd **result);
assert_int_equal(status, F_status_set_error(statuss[i]));
} // for
- f_string_dynamic_resize(0, &name);
+ free((void *) name.string);
}
void test__f_account_group_name_by_id__not_found(void **state) {
assert_int_equal(status, F_exist_not);
}
- f_string_dynamic_resize(0, &name);
+ free((void *) name.string);
}
void test__f_account_group_name_by_id__parameter_checking(void **state) {
assert_string_equal(name.string, group_data.gr_name);
}
- f_string_dynamic_resize(0, &name);
+ free((void *) name.string);
}
#ifdef __cplusplus
assert_int_equal(status, F_status_set_error(statuss[i]));
} // for
- f_string_dynamic_resize(0, &name);
+ free((void *) name.string);
}
void test__f_account_name_by_id__not_found(void **state) {
assert_int_equal(status, F_exist_not);
}
- f_string_dynamic_resize(0, &name);
+ free((void *) name.string);
}
void test__f_account_name_by_id__parameter_checking(void **state) {
assert_string_equal(name.string, password.pw_name);
}
- f_string_dynamic_resize(0, &name);
+ free((void *) name.string);
}
#ifdef __cplusplus
void test__f_accounts_delete_callback__fails(void **state) {
mock_unwrap = 0;
- mock_unwrap_f_memory = 1;
+ mock_unwrap_f_memory = 0;
f_account_t data = f_account_t_initialize;
f_account_t data_array[] = { data };
{
- will_return(__wrap_f_string_dynamic_resize, true);
- will_return(__wrap_f_string_dynamic_resize, 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_accounts_delete_callback(0, 1, (void *) data_array);
}
{
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamic_resize, true);
- will_return(__wrap_f_string_dynamic_resize, 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_accounts_delete_callback(0, 1, (void *) data_array);
}
{
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamic_resize, true);
- will_return(__wrap_f_string_dynamic_resize, 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_accounts_delete_callback(0, 1, (void *) data_array);
}
{
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamic_resize, true);
- will_return(__wrap_f_string_dynamic_resize, 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_accounts_delete_callback(0, 1, (void *) data_array);
}
{
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamic_resize, true);
- will_return(__wrap_f_string_dynamic_resize, 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_accounts_delete_callback(0, 1, (void *) data_array);
void test__f_accounts_delete_callback__works(void **state) {
- mock_unwrap = 1;
+ mock_unwrap = 0;
mock_unwrap_f_memory = 1;
const f_number_unsigned_t length = 1;
f_status_t status = f_memory_array_resize(length, sizeof(f_account_t), (void **) &datas.array, &datas.used, &datas.size);
assert_int_equal(status, F_okay);
- status = f_string_dynamic_resize(1, &datas.array[0].home);
+ status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datas.array[0].home.string, &datas.array[0].home.used, &datas.array[0].home.size);
assert_int_equal(status, F_okay);
- status = f_string_dynamic_resize(1, &datas.array[0].label);
+ status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datas.array[0].label.string, &datas.array[0].label.used, &datas.array[0].label.size);
assert_int_equal(status, F_okay);
- status = f_string_dynamic_resize(1, &datas.array[0].name);
+ status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datas.array[0].name.string, &datas.array[0].name.used, &datas.array[0].name.size);
assert_int_equal(status, F_okay);
- status = f_string_dynamic_resize(1, &datas.array[0].password);
+ status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datas.array[0].password.string, &datas.array[0].password.used, &datas.array[0].password.size);
assert_int_equal(status, F_okay);
- status = f_string_dynamic_resize(1, &datas.array[0].shell);
+ status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datas.array[0].shell.string, &datas.array[0].shell.used, &datas.array[0].shell.size);
assert_int_equal(status, F_okay);
}
void test__f_accounts_destroy_callback__fails(void **state) {
mock_unwrap = 0;
- mock_unwrap_f_memory = 1;
+ mock_unwrap_f_memory = 0;
f_account_t data = f_account_t_initialize;
f_account_t data_array[] = { data };
{
- will_return(__wrap_f_string_dynamic_adjust, true);
- will_return(__wrap_f_string_dynamic_adjust, 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_accounts_destroy_callback(0, 1, (void *) data_array);
}
{
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, true);
- will_return(__wrap_f_string_dynamic_adjust, 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_accounts_destroy_callback(0, 1, (void *) data_array);
}
{
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, true);
- will_return(__wrap_f_string_dynamic_adjust, 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_accounts_destroy_callback(0, 1, (void *) data_array);
}
{
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, true);
- will_return(__wrap_f_string_dynamic_adjust, 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_accounts_destroy_callback(0, 1, (void *) data_array);
}
{
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, true);
- will_return(__wrap_f_string_dynamic_adjust, 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_accounts_destroy_callback(0, 1, (void *) data_array);
void test__f_accounts_destroy_callback__works(void **state) {
- mock_unwrap = 1;
+ mock_unwrap = 0;
mock_unwrap_f_memory = 1;
const f_number_unsigned_t length = 1;
f_status_t status = f_memory_array_resize(length, sizeof(f_account_t), (void **) &datas.array, &datas.used, &datas.size);
assert_int_equal(status, F_okay);
- status = f_string_dynamic_resize(1, &datas.array[0].home);
+ status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datas.array[0].home.string, &datas.array[0].home.used, &datas.array[0].home.size);
assert_int_equal(status, F_okay);
- status = f_string_dynamic_resize(1, &datas.array[0].label);
+ status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datas.array[0].label.string, &datas.array[0].label.used, &datas.array[0].label.size);
assert_int_equal(status, F_okay);
- status = f_string_dynamic_resize(1, &datas.array[0].name);
+ status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datas.array[0].name.string, &datas.array[0].name.used, &datas.array[0].name.size);
assert_int_equal(status, F_okay);
- status = f_string_dynamic_resize(1, &datas.array[0].password);
+ status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datas.array[0].password.string, &datas.array[0].password.used, &datas.array[0].password.size);
assert_int_equal(status, F_okay);
- status = f_string_dynamic_resize(1, &datas.array[0].shell);
+ status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datas.array[0].shell.string, &datas.array[0].shell.used, &datas.array[0].shell.size);
assert_int_equal(status, F_okay);
}
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));
+ 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 *) datas_array);
}
{
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamic_resize, true);
- will_return(__wrap_f_string_dynamic_resize, 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 *) datas_array);
}
{
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamic_resize, true);
- will_return(__wrap_f_string_dynamic_resize, 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 *) datas_array);
}
{
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamic_resize, true);
- will_return(__wrap_f_string_dynamic_resize, 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 *) datas_array);
}
{
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamic_resize, true);
- will_return(__wrap_f_string_dynamic_resize, 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 *) datas_array);
}
{
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
will_return(__wrap_f_memory_array_resize, true);
will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
void test__f_accountss_delete_callback__works(void **state) {
- mock_unwrap = 1;
+ mock_unwrap = 0;
mock_unwrap_f_memory = 1;
const f_number_unsigned_t length = 1;
status = f_memory_array_resize(1, sizeof(f_account_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
assert_int_equal(status, F_okay);
- status = f_string_dynamic_resize(1, &datass.array[0].array[0].home);
+ status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datass.array[0].array[0].home.string, &datass.array[0].array[0].home.used, &datass.array[0].array[0].home.size);
assert_int_equal(status, F_okay);
- status = f_string_dynamic_resize(1, &datass.array[0].array[0].label);
+ status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datass.array[0].array[0].label.string, &datass.array[0].array[0].label.used, &datass.array[0].array[0].label.size);
assert_int_equal(status, F_okay);
- status = f_string_dynamic_resize(1, &datass.array[0].array[0].name);
+ status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datass.array[0].array[0].name.string, &datass.array[0].array[0].name.used, &datass.array[0].array[0].name.size);
assert_int_equal(status, F_okay);
- status = f_string_dynamic_resize(1, &datass.array[0].array[0].password);
+ status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datass.array[0].array[0].password.string, &datass.array[0].array[0].password.used, &datass.array[0].array[0].password.size);
assert_int_equal(status, F_okay);
- status = f_string_dynamic_resize(1, &datass.array[0].array[0].shell);
+ status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datass.array[0].array[0].shell.string, &datass.array[0].array[0].shell.used, &datass.array[0].array[0].shell.size);
assert_int_equal(status, F_okay);
}
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));
+ 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 *) datas_array);
}
{
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, true);
- will_return(__wrap_f_string_dynamic_adjust, 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 *) datas_array);
}
{
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, true);
- will_return(__wrap_f_string_dynamic_adjust, 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 *) datas_array);
}
{
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, true);
- will_return(__wrap_f_string_dynamic_adjust, 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 *) datas_array);
}
{
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, true);
- will_return(__wrap_f_string_dynamic_adjust, 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 *) datas_array);
}
{
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
will_return(__wrap_f_memory_array_adjust, true);
will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
void test__f_accountss_destroy_callback__works(void **state) {
- mock_unwrap = 1;
+ mock_unwrap = 0;
mock_unwrap_f_memory = 1;
const f_number_unsigned_t length = 1;
status = f_memory_array_resize(1, sizeof(f_account_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
assert_int_equal(status, F_okay);
- status = f_string_dynamic_resize(1, &datass.array[0].array[0].home);
+ status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datass.array[0].array[0].home.string, &datass.array[0].array[0].home.used, &datass.array[0].array[0].home.size);
assert_int_equal(status, F_okay);
- status = f_string_dynamic_resize(1, &datass.array[0].array[0].label);
+ status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datass.array[0].array[0].label.string, &datass.array[0].array[0].label.used, &datass.array[0].array[0].label.size);
assert_int_equal(status, F_okay);
- status = f_string_dynamic_resize(1, &datass.array[0].array[0].name);
+ status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datass.array[0].array[0].name.string, &datass.array[0].array[0].name.used, &datass.array[0].array[0].name.size);
assert_int_equal(status, F_okay);
- status = f_string_dynamic_resize(1, &datass.array[0].array[0].password);
+ status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datass.array[0].array[0].password.string, &datass.array[0].array[0].password.used, &datass.array[0].array[0].password.size);
assert_int_equal(status, F_okay);
- status = f_string_dynamic_resize(1, &datass.array[0].array[0].shell);
+ status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datass.array[0].array[0].shell.string, &datass.array[0].array[0].shell.used, &datass.array[0].array[0].shell.size);
assert_int_equal(status, F_okay);
}
#endif // defined(_di_libcap_)
}
- f_string_dynamic_resize(0, &name);
+ free((void *) name.string);
}
#ifdef __cplusplus
#endif // defined(_di_libcap_)
}
- f_string_dynamic_resize(0, &text);
+ free((void *) text.string);
}
#ifdef __cplusplus
macro_f_string_dynamic_t_clear(context.success) \
macro_f_string_dynamic_t_clear(context.title) \
macro_f_string_dynamic_t_clear(context.warning)
-
- #define macro_f_color_context_t_new(status, context) \
- macro_f_string_dynamic_t_resize(status, context.reset, F_color_max_size_terminated_d) \
- if (F_status_is_error_not(status)) macro_f_string_dynamic_t_resize(status, context.error, F_color_max_size_terminated_d) \
- if (F_status_is_error_not(status)) macro_f_string_dynamic_t_resize(status, context.important, F_color_max_size_terminated_d) \
- if (F_status_is_error_not(status)) macro_f_string_dynamic_t_resize(status, context.normal, F_color_max_size_terminated_d) \
- if (F_status_is_error_not(status)) macro_f_string_dynamic_t_resize(status, context.normal_reset, F_color_max_size_terminated_d) \
- if (F_status_is_error_not(status)) macro_f_string_dynamic_t_resize(status, context.notable, F_color_max_size_terminated_d) \
- if (F_status_is_error_not(status)) macro_f_string_dynamic_t_resize(status, context.reset, F_color_max_size_terminated_d) \
- if (F_status_is_error_not(status)) macro_f_string_dynamic_t_resize(status, context.standout, F_color_max_size_terminated_d) \
- if (F_status_is_error_not(status)) macro_f_string_dynamic_t_resize(status, context.success, F_color_max_size_terminated_d) \
- if (F_status_is_error_not(status)) macro_f_string_dynamic_t_resize(status, context.title, F_color_max_size_terminated_d) \
- if (F_status_is_error_not(status)) macro_f_string_dynamic_t_resize(status, context.warning, F_color_max_size_terminated_d)
-
- #define macro_f_color_context_t_delete_simple(context) \
- macro_f_string_dynamic_t_delete_simple(context.error) \
- macro_f_string_dynamic_t_delete_simple(context.important) \
- macro_f_string_dynamic_t_delete_simple(context.normal) \
- macro_f_string_dynamic_t_delete_simple(context.normal_reset) \
- macro_f_string_dynamic_t_delete_simple(context.notable) \
- macro_f_string_dynamic_t_delete_simple(context.reset) \
- macro_f_string_dynamic_t_delete_simple(context.standout) \
- macro_f_string_dynamic_t_delete_simple(context.success) \
- macro_f_string_dynamic_t_delete_simple(context.title) \
- macro_f_string_dynamic_t_delete_simple(context.warning) \
- macro_f_color_context_t_clear(context)
-
- #define macro_f_color_context_t_destroy_simple(context, size) \
- macro_f_string_dynamic_t_destroy_simple(context.error, size) \
- macro_f_string_dynamic_t_destroy_simple(context.important, size) \
- macro_f_string_dynamic_t_destroy_simple(context.normal) \
- macro_f_string_dynamic_t_destroy_simple(context.normal_reset) \
- macro_f_string_dynamic_t_destroy_simple(context.notable, size) \
- macro_f_string_dynamic_t_destroy_simple(context.reset) \
- macro_f_string_dynamic_t_destroy_simple(context.standout, size) \
- macro_f_string_dynamic_t_destroy_simple(context.success, size) \
- macro_f_string_dynamic_t_destroy_simple(context.title, size) \
- macro_f_string_dynamic_t_destroy_simple(context.warning, size) \
- macro_f_color_context_t_clear(context)
#endif // _di_f_color_context_t_
/**
f_color_context_t context = f_color_context_t_initialize;
{
- const f_status_t status = f_string_dynamic_resize(size, &context.reset);
+ const f_status_t status = f_memory_array_resize(size, sizeof(f_char_t), (void **) &context.reset.string, &context.reset.used, &context.reset.size);
assert_int_equal(status, F_okay);
assert_int_not_equal(context.reset.size, 0);
}
{
- const f_status_t status = f_string_dynamic_resize(size, &context.warning);
+ const f_status_t status = f_memory_array_resize(size, sizeof(f_char_t), (void **) &context.warning.string, &context.warning.used, &context.warning.size);
assert_int_equal(status, F_okay);
assert_int_not_equal(context.warning.size, 0);
}
{
- const f_status_t status = f_string_dynamic_resize(size, &context.error);
+ const f_status_t status = f_memory_array_resize(size, sizeof(f_char_t), (void **) &context.error.string, &context.error.used, &context.error.size);
assert_int_equal(status, F_okay);
assert_int_not_equal(context.error.size, 0);
}
{
- const f_status_t status = f_string_dynamic_resize(size, &context.title);
+ const f_status_t status = f_memory_array_resize(size, sizeof(f_char_t), (void **) &context.title.string, &context.title.used, &context.title.size);
assert_int_equal(status, F_okay);
assert_int_not_equal(context.title.size, 0);
}
{
- const f_status_t status = f_string_dynamic_resize(size, &context.notable);
+ const f_status_t status = f_memory_array_resize(size, sizeof(f_char_t), (void **) &context.notable.string, &context.notable.used, &context.notable.size);
assert_int_equal(status, F_okay);
assert_int_not_equal(context.notable.size, 0);
}
{
- const f_status_t status = f_string_dynamic_resize(size, &context.important);
+ const f_status_t status = f_memory_array_resize(size, sizeof(f_char_t), (void **) &context.important.string, &context.important.used, &context.important.size);
assert_int_equal(status, F_okay);
assert_int_not_equal(context.important.size, 0);
}
{
- const f_status_t status = f_string_dynamic_resize(size, &context.standout);
+ const f_status_t status = f_memory_array_resize(size, sizeof(f_char_t), (void **) &context.standout.string, &context.standout.used, &context.standout.size);
assert_int_equal(status, F_okay);
assert_int_not_equal(context.standout.size, 0);
}
{
- const f_status_t status = f_string_dynamic_resize(size, &context.success);
+ const f_status_t status = f_memory_array_resize(size, sizeof(f_char_t), (void **) &context.success.string, &context.success.used, &context.success.size);
assert_int_equal(status, F_okay);
assert_int_not_equal(context.success.size, 0);
}
{
- const f_status_t status = f_string_dynamic_resize(size, &context.normal);
+ const f_status_t status = f_memory_array_resize(size, sizeof(f_char_t), (void **) &context.normal.string, &context.normal.used, &context.normal.size);
assert_int_equal(status, F_okay);
assert_int_not_equal(context.normal.size, 0);
}
{
- const f_status_t status = f_string_dynamic_resize(size, &context.normal_reset);
+ const f_status_t status = f_memory_array_resize(size, sizeof(f_char_t), (void **) &context.normal_reset.string, &context.normal_reset.used, &context.normal_reset.size);
assert_int_equal(status, F_okay);
assert_int_not_equal(context.normal_reset.size, 0);
f_color_context_t context = f_color_context_t_initialize;
{
- const f_status_t status = f_string_dynamic_resize(size, &context.reset);
+ const f_status_t status = f_memory_array_resize(size, sizeof(f_char_t), (void **) &context.reset.string, &context.reset.used, &context.reset.size);
assert_int_equal(status, F_okay);
assert_int_not_equal(context.reset.size, 0);
}
{
- const f_status_t status = f_string_dynamic_resize(size, &context.warning);
+ const f_status_t status = f_memory_array_resize(size, sizeof(f_char_t), (void **) &context.warning.string, &context.warning.used, &context.warning.size);
assert_int_equal(status, F_okay);
assert_int_not_equal(context.warning.size, 0);
}
{
- const f_status_t status = f_string_dynamic_resize(size, &context.error);
+ const f_status_t status = f_memory_array_resize(size, sizeof(f_char_t), (void **) &context.error.string, &context.error.used, &context.error.size);
assert_int_equal(status, F_okay);
assert_int_not_equal(context.error.size, 0);
}
{
- const f_status_t status = f_string_dynamic_resize(size, &context.title);
+ const f_status_t status = f_memory_array_resize(size, sizeof(f_char_t), (void **) &context.title.string, &context.title.used, &context.title.size);
assert_int_equal(status, F_okay);
assert_int_not_equal(context.title.size, 0);
}
{
- const f_status_t status = f_string_dynamic_resize(size, &context.notable);
+ const f_status_t status = f_memory_array_resize(size, sizeof(f_char_t), (void **) &context.notable.string, &context.notable.used, &context.notable.size);
assert_int_equal(status, F_okay);
assert_int_not_equal(context.notable.size, 0);
}
{
- const f_status_t status = f_string_dynamic_resize(size, &context.important);
+ const f_status_t status = f_memory_array_resize(size, sizeof(f_char_t), (void **) &context.important.string, &context.important.used, &context.important.size);
assert_int_equal(status, F_okay);
assert_int_not_equal(context.important.size, 0);
}
{
- const f_status_t status = f_string_dynamic_resize(size, &context.standout);
+ const f_status_t status = f_memory_array_resize(size, sizeof(f_char_t), (void **) &context.standout.string, &context.standout.used, &context.standout.size);
assert_int_equal(status, F_okay);
assert_int_not_equal(context.standout.size, 0);
}
{
- const f_status_t status = f_string_dynamic_resize(size, &context.success);
+ const f_status_t status = f_memory_array_resize(size, sizeof(f_char_t), (void **) &context.success.string, &context.success.used, &context.success.size);
assert_int_equal(status, F_okay);
assert_int_not_equal(context.success.size, 0);
}
{
- const f_status_t status = f_string_dynamic_resize(size, &context.normal);
+ const f_status_t status = f_memory_array_resize(size, sizeof(f_char_t), (void **) &context.normal.string, &context.normal.used, &context.normal.size);
assert_int_equal(status, F_okay);
assert_int_not_equal(context.normal.size, 0);
}
{
- const f_status_t status = f_string_dynamic_resize(size, &context.normal_reset);
+ const f_status_t status = f_memory_array_resize(size, sizeof(f_char_t), (void **) &context.normal_reset.string, &context.normal_reset.used, &context.normal_reset.size);
assert_int_equal(status, F_okay);
assert_int_not_equal(context.normal_reset.size, 0);
};
{
- f_status_t status = F_okay;
+ f_status_t status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.reset.string, &context.reset.used, &context.reset.size);
- macro_f_color_context_t_new(status, context);
+
+
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.reset.string, &context.reset.used, &context.reset.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.error.string, &context.error.used, &context.error.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.important.string, &context.important.used, &context.important.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.normal.string, &context.normal.used, &context.normal.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.normal_reset.string, &context.normal_reset.used, &context.normal_reset.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.notable.string, &context.notable.used, &context.notable.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.standout.string, &context.standout.used, &context.standout.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.success.string, &context.success.used, &context.success.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.title.string, &context.title.used, &context.title.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.warning.string, &context.warning.used, &context.warning.size);
}
for (uint8_t i = 0; i < 4; ++i) {
} // for
} // for
- macro_f_color_context_t_delete_simple(context);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.reset.string, &context.reset.used, &context.reset.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.error.string, &context.error.used, &context.error.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.important.string, &context.important.used, &context.important.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.normal.string, &context.normal.used, &context.normal.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.normal_reset.string, &context.normal_reset.used, &context.normal_reset.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.notable.string, &context.notable.used, &context.notable.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.standout.string, &context.standout.used, &context.standout.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.success.string, &context.success.used, &context.success.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.title.string, &context.title.used, &context.title.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.warning.string, &context.warning.used, &context.warning.size);
}
#ifdef __cplusplus
const f_string_static_t color1 = macro_f_string_static_t_initialize_2("color1", 6);
{
- f_status_t status = F_okay;
+ f_status_t status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.reset.string, &context.reset.used, &context.reset.size);
- macro_f_color_context_t_new(status, context);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.reset.string, &context.reset.used, &context.reset.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.error.string, &context.error.used, &context.error.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.important.string, &context.important.used, &context.important.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.normal.string, &context.normal.used, &context.normal.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.normal_reset.string, &context.normal_reset.used, &context.normal_reset.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.notable.string, &context.notable.used, &context.notable.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.standout.string, &context.standout.used, &context.standout.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.success.string, &context.success.used, &context.success.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.title.string, &context.title.used, &context.title.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.warning.string, &context.warning.used, &context.warning.size);
}
{
assert_string_equal(buffer.string, "color1");
}
- macro_f_color_context_t_delete_simple(context);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.reset.string, &context.reset.used, &context.reset.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.error.string, &context.error.used, &context.error.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.important.string, &context.important.used, &context.important.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.normal.string, &context.normal.used, &context.normal.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.normal_reset.string, &context.normal_reset.used, &context.normal_reset.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.notable.string, &context.notable.used, &context.notable.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.standout.string, &context.standout.used, &context.standout.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.success.string, &context.success.used, &context.success.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.title.string, &context.title.used, &context.title.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.warning.string, &context.warning.used, &context.warning.size);
- f_string_dynamic_resize(0, &buffer);
+ free((void *) buffer.string);
}
#ifdef __cplusplus
const f_string_static_t color2 = macro_f_string_static_t_initialize_2("color2", 6);
{
- f_status_t status = F_okay;
+ f_status_t status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.reset.string, &context.reset.used, &context.reset.size);
- macro_f_color_context_t_new(status, context);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.reset.string, &context.reset.used, &context.reset.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.error.string, &context.error.used, &context.error.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.important.string, &context.important.used, &context.important.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.normal.string, &context.normal.used, &context.normal.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.normal_reset.string, &context.normal_reset.used, &context.normal_reset.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.notable.string, &context.notable.used, &context.notable.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.standout.string, &context.standout.used, &context.standout.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.success.string, &context.success.used, &context.success.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.title.string, &context.title.used, &context.title.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.warning.string, &context.warning.used, &context.warning.size);
}
{
assert_string_equal(buffer.string, "color1color2");
}
- macro_f_color_context_t_delete_simple(context);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.reset.string, &context.reset.used, &context.reset.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.error.string, &context.error.used, &context.error.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.important.string, &context.important.used, &context.important.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.normal.string, &context.normal.used, &context.normal.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.normal_reset.string, &context.normal_reset.used, &context.normal_reset.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.notable.string, &context.notable.used, &context.notable.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.standout.string, &context.standout.used, &context.standout.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.success.string, &context.success.used, &context.success.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.title.string, &context.title.used, &context.title.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.warning.string, &context.warning.used, &context.warning.size);
- f_string_dynamic_resize(0, &buffer);
+ free((void *) buffer.string);
}
#ifdef __cplusplus
const f_string_static_t color3 = macro_f_string_static_t_initialize_2("color3", 6);
{
- f_status_t status = F_okay;
+ f_status_t status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.reset.string, &context.reset.used, &context.reset.size);
- macro_f_color_context_t_new(status, context);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.reset.string, &context.reset.used, &context.reset.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.error.string, &context.error.used, &context.error.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.important.string, &context.important.used, &context.important.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.normal.string, &context.normal.used, &context.normal.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.normal_reset.string, &context.normal_reset.used, &context.normal_reset.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.notable.string, &context.notable.used, &context.notable.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.standout.string, &context.standout.used, &context.standout.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.success.string, &context.success.used, &context.success.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.title.string, &context.title.used, &context.title.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.warning.string, &context.warning.used, &context.warning.size);
}
{
assert_string_equal(buffer.string, "color1color2color3");
}
- macro_f_color_context_t_delete_simple(context);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.reset.string, &context.reset.used, &context.reset.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.error.string, &context.error.used, &context.error.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.important.string, &context.important.used, &context.important.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.normal.string, &context.normal.used, &context.normal.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.normal_reset.string, &context.normal_reset.used, &context.normal_reset.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.notable.string, &context.notable.used, &context.notable.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.standout.string, &context.standout.used, &context.standout.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.success.string, &context.success.used, &context.success.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.title.string, &context.title.used, &context.title.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.warning.string, &context.warning.used, &context.warning.size);
- f_string_dynamic_resize(0, &buffer);
+ free((void *) buffer.string);
}
#ifdef __cplusplus
const f_string_static_t color4 = macro_f_string_static_t_initialize_2("color4", 6);
{
- f_status_t status = F_okay;
+ f_status_t status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.reset.string, &context.reset.used, &context.reset.size);
- macro_f_color_context_t_new(status, context);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.reset.string, &context.reset.used, &context.reset.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.error.string, &context.error.used, &context.error.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.important.string, &context.important.used, &context.important.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.normal.string, &context.normal.used, &context.normal.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.normal_reset.string, &context.normal_reset.used, &context.normal_reset.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.notable.string, &context.notable.used, &context.notable.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.standout.string, &context.standout.used, &context.standout.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.success.string, &context.success.used, &context.success.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.title.string, &context.title.used, &context.title.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.warning.string, &context.warning.used, &context.warning.size);
}
{
assert_string_equal(buffer.string, "color1color2color3color4");
}
- macro_f_color_context_t_delete_simple(context);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.reset.string, &context.reset.used, &context.reset.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.error.string, &context.error.used, &context.error.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.important.string, &context.important.used, &context.important.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.normal.string, &context.normal.used, &context.normal.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.normal_reset.string, &context.normal_reset.used, &context.normal_reset.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.notable.string, &context.notable.used, &context.notable.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.standout.string, &context.standout.used, &context.standout.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.success.string, &context.success.used, &context.success.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.title.string, &context.title.used, &context.title.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.warning.string, &context.warning.used, &context.warning.size);
- f_string_dynamic_resize(0, &buffer);
+ free((void *) buffer.string);
}
#ifdef __cplusplus
const f_string_static_t color5 = macro_f_string_static_t_initialize_2("color5", 6);
{
- f_status_t status = F_okay;
+ f_status_t status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.reset.string, &context.reset.used, &context.reset.size);
- macro_f_color_context_t_new(status, context);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.reset.string, &context.reset.used, &context.reset.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.error.string, &context.error.used, &context.error.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.important.string, &context.important.used, &context.important.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.normal.string, &context.normal.used, &context.normal.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.normal_reset.string, &context.normal_reset.used, &context.normal_reset.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.notable.string, &context.notable.used, &context.notable.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.standout.string, &context.standout.used, &context.standout.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.success.string, &context.success.used, &context.success.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.title.string, &context.title.used, &context.title.size);
+ if (F_status_is_error_not(status)) status = f_memory_array_resize(F_color_max_size_terminated_d, sizeof(f_char_t), (void **) &context.warning.string, &context.warning.used, &context.warning.size);
}
{
assert_string_equal(buffer.string, "color1color2color3color4color5");
}
- macro_f_color_context_t_delete_simple(context);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.reset.string, &context.reset.used, &context.reset.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.error.string, &context.error.used, &context.error.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.important.string, &context.important.used, &context.important.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.normal.string, &context.normal.used, &context.normal.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.normal_reset.string, &context.normal_reset.used, &context.normal_reset.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.notable.string, &context.notable.used, &context.notable.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.standout.string, &context.standout.used, &context.standout.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.success.string, &context.success.used, &context.success.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.title.string, &context.title.used, &context.title.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &context.warning.string, &context.warning.used, &context.warning.size);
- f_string_dynamic_resize(0, &buffer);
+ free((void *) buffer.string);
}
#ifdef __cplusplus
if (!parameters) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- f_status_t status = F_okay;
+ {
+ f_status_t status = F_okay;
- for (f_number_unsigned_t i = 0; i < parameters->used; ++i) {
+ for (f_number_unsigned_t i = 0; i < parameters->used; ++i) {
- status = f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) ¶meters->array[i].locations.array, ¶meters->array[i].locations.used, ¶meters->array[i].locations.size);
- if (F_status_is_error(status)) return status;
+ status = f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) ¶meters->array[i].locations.array, ¶meters->array[i].locations.used, ¶meters->array[i].locations.size);
+ if (F_status_is_error(status)) return status;
- status = f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) ¶meters->array[i].locations_sub.array, ¶meters->array[i].locations_sub.used, ¶meters->array[i].locations_sub.size);
- if (F_status_is_error(status)) return status;
+ status = f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) ¶meters->array[i].locations_sub.array, ¶meters->array[i].locations_sub.used, ¶meters->array[i].locations_sub.size);
+ if (F_status_is_error(status)) return status;
- status = f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) ¶meters->array[i].values.array, ¶meters->array[i].values.used, ¶meters->array[i].values.size);
- if (F_status_is_error(status)) return status;
- } // for
+ status = f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) ¶meters->array[i].values.array, ¶meters->array[i].values.used, ¶meters->array[i].values.size);
+ if (F_status_is_error(status)) return status;
+ } // for
- status = f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) ¶meters->arguments.array, ¶meters->arguments.used, ¶meters->arguments.size, &f_string_dynamics_delete_callback);
- if (F_status_is_error(status)) return status;
+ status = f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) ¶meters->arguments.array, ¶meters->arguments.used, ¶meters->arguments.size, &f_string_dynamics_delete_callback);
+ if (F_status_is_error(status)) return status;
- status = f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) ¶meters->remaining.array, ¶meters->remaining.used, ¶meters->remaining.size);
- if (F_status_is_error(status)) return status;
+ status = f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) ¶meters->remaining.array, ¶meters->remaining.used, ¶meters->remaining.size);
+ if (F_status_is_error(status)) return status;
+ }
return F_okay;
}
if (!parameters) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- f_status_t status = F_okay;
+ {
+ f_status_t status = F_okay;
- for (f_number_unsigned_t i = 0; i < parameters->used; ++i) {
+ for (f_number_unsigned_t i = 0; i < parameters->used; ++i) {
- status = f_memory_array_adjust(0, sizeof(f_number_unsigned_t), (void **) ¶meters->array[i].locations.array, ¶meters->array[i].locations.used, ¶meters->array[i].locations.size);
- if (F_status_is_error(status)) return status;
+ status = f_memory_array_adjust(0, sizeof(f_number_unsigned_t), (void **) ¶meters->array[i].locations.array, ¶meters->array[i].locations.used, ¶meters->array[i].locations.size);
+ if (F_status_is_error(status)) return status;
- status = f_memory_array_adjust(0, sizeof(f_number_unsigned_t), (void **) ¶meters->array[i].locations_sub.array, ¶meters->array[i].locations_sub.used, ¶meters->array[i].locations_sub.size);
- if (F_status_is_error(status)) return status;
+ status = f_memory_array_adjust(0, sizeof(f_number_unsigned_t), (void **) ¶meters->array[i].locations_sub.array, ¶meters->array[i].locations_sub.used, ¶meters->array[i].locations_sub.size);
+ if (F_status_is_error(status)) return status;
- status = f_memory_array_adjust(0, sizeof(f_number_unsigned_t), (void **) ¶meters->array[i].values.array, ¶meters->array[i].values.used, ¶meters->array[i].values.size);
- if (F_status_is_error(status)) return status;
- } // for
+ status = f_memory_array_adjust(0, sizeof(f_number_unsigned_t), (void **) ¶meters->array[i].values.array, ¶meters->array[i].values.used, ¶meters->array[i].values.size);
+ if (F_status_is_error(status)) return status;
+ } // for
- status = f_memory_arrays_adjust(0, sizeof(f_string_dynamic_t), (void **) ¶meters->arguments.array, ¶meters->arguments.used, ¶meters->arguments.size, &f_string_dynamics_destroy_callback);
- if (F_status_is_error(status)) return status;
+ status = f_memory_arrays_adjust(0, sizeof(f_string_dynamic_t), (void **) ¶meters->arguments.array, ¶meters->arguments.used, ¶meters->arguments.size, &f_string_dynamics_destroy_callback);
+ if (F_status_is_error(status)) return status;
- status = f_memory_array_adjust(0, sizeof(f_number_unsigned_t), (void **) ¶meters->remaining.array, ¶meters->remaining.used, ¶meters->remaining.size);
- if (F_status_is_error(status)) return status;
+ status = f_memory_array_adjust(0, sizeof(f_number_unsigned_t), (void **) ¶meters->remaining.array, ¶meters->remaining.used, ¶meters->remaining.size);
+ if (F_status_is_error(status)) return status;
+ }
return F_okay;
}
if (!input) return F_data_not;
- // Only the first three characters need to be scanned.
- const f_number_unsigned_t length = strnlen(input, 3);
- if (!length) return F_data_not;
+ {
- if (input[0] == f_console_symbol_short_normal_s.string[0]) {
- *result = f_console_result_found_e | f_console_result_normal_e;
+ // Only the first three characters need to be scanned.
+ const f_number_unsigned_t length = strnlen(input, 3);
+ if (!length) return F_data_not;
- if (length > 1) {
- if (input[1] == f_console_symbol_short_normal_s.string[0]) {
- *result |= f_console_result_long_e;
+ if (input[0] == f_console_symbol_short_normal_s.string[0]) {
+ *result = f_console_result_found_e | f_console_result_normal_e;
- if (length < 3) {
- *result |= f_console_result_alone_e;
+ if (length > 1) {
+ if (input[1] == f_console_symbol_short_normal_s.string[0]) {
+ *result |= f_console_result_long_e;
+
+ if (length < 3) {
+ *result |= f_console_result_alone_e;
+ }
+ }
+ else {
+ *result |= f_console_result_short_e;
}
}
else {
- *result |= f_console_result_short_e;
+ *result |= f_console_result_short_e | f_console_result_alone_e;
}
}
- else {
- *result |= f_console_result_short_e | f_console_result_alone_e;
- }
- }
- else if (input[0] == f_console_symbol_short_inverse_s.string[0]) {
- *result = f_console_result_found_e | f_console_result_inverse_e;
+ else if (input[0] == f_console_symbol_short_inverse_s.string[0]) {
+ *result = f_console_result_found_e | f_console_result_inverse_e;
- if (length > 1) {
- if (input[1] == f_console_symbol_short_inverse_s.string[0]) {
- *result |= f_console_result_long_e;
+ if (length > 1) {
+ if (input[1] == f_console_symbol_short_inverse_s.string[0]) {
+ *result |= f_console_result_long_e;
- if (length < 3) {
- *result |= f_console_result_alone_e;
+ if (length < 3) {
+ *result |= f_console_result_alone_e;
+ }
+ }
+ else {
+ *result |= f_console_result_short_e;
}
}
else {
- *result |= f_console_result_short_e;
+ *result |= f_console_result_short_e | f_console_result_alone_e;
}
}
- else {
- *result |= f_console_result_short_e | f_console_result_alone_e;
- }
}
return F_okay;
parameters.used = 1;
{
- const f_status_t status = f_string_dynamics_resize(size, ¶meters.arguments);
+ const f_status_t status = f_memory_arrays_resize(size, sizeof(f_string_dynamic_t), (void **) ¶meters.arguments.array, ¶meters.arguments.used, ¶meters.arguments.size, &f_string_dynamics_delete_callback);
assert_int_equal(status, F_okay);
assert_int_not_equal(parameters.arguments.size, 0);
parameters.used = 1;
{
- const f_status_t status = f_string_dynamics_resize(size, ¶meters.arguments);
+ const f_status_t status = f_memory_arrays_resize(size, sizeof(f_string_dynamic_t), (void **) ¶meters.arguments.array, ¶meters.arguments.used, ¶meters.arguments.size, &f_string_dynamics_delete_callback);
assert_int_equal(status, F_okay);
assert_int_not_equal(parameters.arguments.size, 0);
destination->path.used = 0;
destination->groups.used = 0;
- f_status_t status = F_okay;
-
- if (source.path.used) {
- status = f_string_dynamic_append(source.path, &destination->path);
- if (F_status_is_error(status)) return status;
- }
-
- if (source.groups.used) {
- status = f_string_dynamics_append_all(source.groups, &destination->groups);
- if (F_status_is_error(status)) return status;
+ {
+ f_status_t status = F_okay;
+
+ if (source.path.used) {
+ status = f_string_dynamic_append(source.path, &destination->path);
+ if (F_status_is_error(status)) return status;
+ }
+
+ if (source.groups.used) {
+ status = f_string_dynamics_append_all(source.groups, &destination->groups);
+ if (F_status_is_error(status)) return status;
+ }
}
return F_okay;
control.as_new = F_false; \
macro_f_string_dynamic_t_clear(control.path); \
macro_f_string_dynamics_t_clear(control.groups);
-
- #define macro_f_control_group_t_delete_simple(control) \
- macro_f_string_dynamic_t_delete_simple(control.path); \
- macro_f_string_dynamics_t_delete_simple(control.groups);
-
- #define macro_f_control_group_t_destroy_simple(control) \
- macro_f_string_dynamic_t_destroy_simple(control.path); \
- macro_f_string_dynamics_t_destroy_simple(control.groups);
#endif // _di_f_control_group_t_
#ifdef __cplusplus
assert_int_equal(status, F_okay);
- macro_f_control_group_t_delete_simple(destination);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &destination.path.string, &destination.path.used, &destination.path.size);
+ f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &destination.groups.array, &destination.groups.used, &destination.groups.size, &f_string_dynamics_delete_callback);
assert_int_equal(destination.as_new, source.as_new);
assert_null(destination.groups.array);
assert_int_equal(destination.groups.used, 0);
- macro_f_control_group_t_delete_simple(destination);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &destination.path.string, &destination.path.used, &destination.path.size);
+ f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &destination.groups.array, &destination.groups.used, &destination.groups.size, &f_string_dynamics_delete_callback);
}
{
assert_int_equal(destination.groups.array[0].used, source.groups.array[0].used);
assert_int_equal(destination.groups.array[1].used, source.groups.array[1].used);
- macro_f_control_group_t_delete_simple(destination);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &destination.path.string, &destination.path.used, &destination.path.size);
+ f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &destination.groups.array, &destination.groups.used, &destination.groups.size, &f_string_dynamics_delete_callback);
}
{
assert_int_equal(destination.groups.array[1].used, source.groups.array[1].used);
assert_int_equal(destination.groups.array[2].used, source.groups.array[2].used);
- macro_f_control_group_t_delete_simple(destination);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &destination.path.string, &destination.path.used, &destination.path.size);
+ f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &destination.groups.array, &destination.groups.used, &destination.groups.size, &f_string_dynamics_delete_callback);
}
}
assert_string_equal(destination.string, "1");
}
- f_string_dynamic_resize(0, &destination);
+ free((void *) destination.string);
}
void test__f_conversion_number_signed_to_string__works_for_prepend(void **state) {
assert_string_equal(destination.string, "0X1");
}
- f_string_dynamic_resize(0, &destination);
+ free((void *) destination.string);
}
void test__f_conversion_number_signed_to_string__works_for_zero(void **state) {
assert_string_equal(destination.string, " 00");
}
- f_string_dynamic_resize(0, &destination);
+ free((void *) destination.string);
}
#ifdef __cplusplus
assert_string_equal(destination.string, "1");
}
- f_string_dynamic_resize(0, &destination);
+ free((void *) destination.string);
}
void test__f_conversion_number_unsigned_to_string__works_for_prepend(void **state) {
assert_string_equal(destination.string, "0X1");
}
- f_string_dynamic_resize(0, &destination);
+ free((void *) destination.string);
}
void test__f_conversion_number_unsigned_to_string__works_for_zero(void **state) {
assert_string_equal(destination.string, " 00");
}
- f_string_dynamic_resize(0, &destination);
+ free((void *) destination.string);
}
#ifdef __cplusplus
# 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
-flags -Wl,--wrap=f_string_dynamics_resize
+flags -Wl,--wrap=f_memory_arrays_adjust
+flags -Wl,--wrap=f_memory_arrays_resize
flags -Wl,--wrap=alphasort
flags -Wl,--wrap=fstatat
flags -Wl,--wrap=mkdir
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) {
+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) {
- 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_dynamics_adjust(const f_number_unsigned_t length, f_string_dynamics_t * const structure) {
-
- if (mock_unwrap) {
- return __real_f_string_dynamics_adjust(length, structure);
+ if (mock_unwrap_f_memory) {
+ return __real_f_memory_arrays_resize(length, width, array, used, size, callback);
}
- if (!structure) return F_status_set_error(F_parameter_not);
+ 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);
- structure->size = length;
+ *size = length;
return mock_type(f_status_t);
}
-f_status_t __wrap_f_string_dynamics_resize(const f_number_unsigned_t length, f_string_dynamics_t * const structure) {
+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) {
- return __real_f_string_dynamics_resize(length, structure);
+ if (mock_unwrap_f_memory) {
+ return __real_f_memory_arrays_resize(length, width, array, used, size, callback);
}
- if (!structure) return F_status_set_error(F_parameter_not);
+ 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);
- structure->size = length;
+ *size = length;
return mock_type(f_status_t);
}
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 __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 __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);
-extern f_status_t __wrap_f_string_dynamics_resize(const f_number_unsigned_t length, f_string_dynamics_t * const structure);
+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_alphasort(const struct dirent **a, const struct dirent **b);
extern int __wrap_fstatat(int dirfd, const char *pathname, struct stat *statbuf, int flags);
} // for
}
- f_string_dynamics_resize(0, &names);
+ f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &names.array, &names.used, &names.size, &f_string_dynamics_delete_callback);
}
void test__f_directory_list__parameter_checking(void **state) {
assert_int_equal(status, F_data_not);
}
- f_string_dynamics_resize(0, &names);
+ f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &names.array, &names.used, &names.size, &f_string_dynamics_delete_callback);
}
void test__f_directory_list__returns_directory_empty(void **state) {
assert_int_equal(status, F_directory_empty);
}
- f_string_dynamics_resize(0, &names);
+ f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &names.array, &names.used, &names.size, &f_string_dynamics_delete_callback);
}
void test__f_directory_list__works(void **state) {
assert_int_equal(status, F_okay);
}
- f_string_dynamics_resize(0, &names);
+ f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &names.array, &names.used, &names.size, &f_string_dynamics_delete_callback);
}
#ifdef __cplusplus
void test__f_directory_listings_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[] = { 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_memory_arrays_resize, true);
+ will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
const f_status_t status = f_directory_listings_delete_callback(0, 1, (void *) datas_array);
}
{
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- 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_memory_arrays_resize, true);
+ will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
const f_status_t status = f_directory_listings_delete_callback(0, 1, (void *) datas_array);
}
{
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- 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_memory_arrays_resize, true);
+ will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
const f_status_t status = f_directory_listings_delete_callback(0, 1, (void *) datas_array);
}
{
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- 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_memory_arrays_resize, true);
+ will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
const f_status_t status = f_directory_listings_delete_callback(0, 1, (void *) datas_array);
}
{
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- 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_memory_arrays_resize, true);
+ will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
const f_status_t status = f_directory_listings_delete_callback(0, 1, (void *) datas_array);
}
{
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- 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_memory_arrays_resize, true);
+ will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
const f_status_t status = f_directory_listings_delete_callback(0, 1, (void *) datas_array);
}
{
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- 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_memory_arrays_resize, true);
+ will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
const f_status_t status = f_directory_listings_delete_callback(0, 1, (void *) datas_array);
}
{
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- 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_memory_arrays_resize, true);
+ will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
const f_status_t status = f_directory_listings_delete_callback(0, 1, (void *) datas_array);
void test__f_directory_listings_delete_callback__works(void **state) {
mock_unwrap = 0;
+ mock_unwrap_f_memory = 1;
- 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 };
const f_number_unsigned_t length = 1;
+ f_directory_listings_t datas = f_directory_listings_t_initialize;
+
{
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ f_status_t status = f_memory_array_resize(length, sizeof(f_directory_listing_t), (void **) &datas.array, &datas.used, &datas.size);
+ assert_int_equal(status, F_okay);
+
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datas.array[0].block.array, &datas.array[0].block.used, &datas.array[0].block.size, &f_string_dynamics_delete_callback);
+ assert_int_equal(status, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datas.array[0].character.array, &datas.array[0].character.used, &datas.array[0].character.size, &f_string_dynamics_delete_callback);
+ assert_int_equal(status, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datas.array[0].directory.array, &datas.array[0].directory.used, &datas.array[0].directory.size, &f_string_dynamics_delete_callback);
+ assert_int_equal(status, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datas.array[0].regular.array, &datas.array[0].regular.used, &datas.array[0].regular.size, &f_string_dynamics_delete_callback);
+ assert_int_equal(status, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datas.array[0].link.array, &datas.array[0].link.used, &datas.array[0].link.size, &f_string_dynamics_delete_callback);
+ assert_int_equal(status, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datas.array[0].fifo.array, &datas.array[0].fifo.used, &datas.array[0].fifo.size, &f_string_dynamics_delete_callback);
+ assert_int_equal(status, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datas.array[0].socket.array, &datas.array[0].socket.used, &datas.array[0].socket.size, &f_string_dynamics_delete_callback);
+ assert_int_equal(status, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datas.array[0].unknown.array, &datas.array[0].unknown.used, &datas.array[0].unknown.size, &f_string_dynamics_delete_callback);
+ assert_int_equal(status, F_okay);
+ }
- const f_status_t status = f_directory_listings_delete_callback(0, length, (void *) datas_array);
+ {
+ const f_status_t status = f_directory_listings_delete_callback(0, length, (void *) datas.array);
assert_int_equal(status, F_okay);
+ assert_int_equal(datas.array[0].block.size, 0);
+ assert_int_equal(datas.array[0].character.size, 0);
+ assert_int_equal(datas.array[0].directory.size, 0);
+ assert_int_equal(datas.array[0].regular.size, 0);
+ assert_int_equal(datas.array[0].link.size, 0);
+ assert_int_equal(datas.array[0].fifo.size, 0);
+ assert_int_equal(datas.array[0].socket.size, 0);
+ assert_int_equal(datas.array[0].unknown.size, 0);
}
+
+ free((void *) datas.array);
}
#ifdef __cplusplus
void test__f_directory_listings_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[] = { 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_memory_arrays_adjust, true);
+ will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
const f_status_t status = f_directory_listings_destroy_callback(0, 1, (void *) datas_array);
}
{
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- 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_memory_arrays_adjust, true);
+ will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
const f_status_t status = f_directory_listings_destroy_callback(0, 1, (void *) datas_array);
}
{
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- 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_memory_arrays_adjust, true);
+ will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
const f_status_t status = f_directory_listings_destroy_callback(0, 1, (void *) datas_array);
}
{
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- 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_memory_arrays_adjust, true);
+ will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
const f_status_t status = f_directory_listings_destroy_callback(0, 1, (void *) datas_array);
}
{
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- 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_memory_arrays_adjust, true);
+ will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
const f_status_t status = f_directory_listings_destroy_callback(0, 1, (void *) datas_array);
}
{
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- 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_memory_arrays_adjust, true);
+ will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
const f_status_t status = f_directory_listings_destroy_callback(0, 1, (void *) datas_array);
}
{
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- 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_memory_arrays_adjust, true);
+ will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
const f_status_t status = f_directory_listings_destroy_callback(0, 1, (void *) datas_array);
}
{
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- 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_memory_arrays_adjust, true);
+ will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
const f_status_t status = f_directory_listings_destroy_callback(0, 1, (void *) datas_array);
void test__f_directory_listings_destroy_callback__works(void **state) {
mock_unwrap = 0;
+ mock_unwrap_f_memory = 1;
- 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 };
const f_number_unsigned_t length = 1;
+ f_directory_listings_t datas = f_directory_listings_t_initialize;
+
{
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ f_status_t status = f_memory_array_resize(length, sizeof(f_directory_listing_t), (void **) &datas.array, &datas.used, &datas.size);
+ assert_int_equal(status, F_okay);
+
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datas.array[0].block.array, &datas.array[0].block.used, &datas.array[0].block.size, &f_string_dynamics_delete_callback);
+ assert_int_equal(status, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datas.array[0].character.array, &datas.array[0].character.used, &datas.array[0].character.size, &f_string_dynamics_delete_callback);
+ assert_int_equal(status, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datas.array[0].directory.array, &datas.array[0].directory.used, &datas.array[0].directory.size, &f_string_dynamics_delete_callback);
+ assert_int_equal(status, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datas.array[0].regular.array, &datas.array[0].regular.used, &datas.array[0].regular.size, &f_string_dynamics_delete_callback);
+ assert_int_equal(status, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datas.array[0].link.array, &datas.array[0].link.used, &datas.array[0].link.size, &f_string_dynamics_delete_callback);
+ assert_int_equal(status, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datas.array[0].fifo.array, &datas.array[0].fifo.used, &datas.array[0].fifo.size, &f_string_dynamics_delete_callback);
+ assert_int_equal(status, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datas.array[0].socket.array, &datas.array[0].socket.used, &datas.array[0].socket.size, &f_string_dynamics_delete_callback);
+ assert_int_equal(status, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datas.array[0].unknown.array, &datas.array[0].unknown.used, &datas.array[0].unknown.size, &f_string_dynamics_delete_callback);
+ assert_int_equal(status, F_okay);
+ }
- const f_status_t status = f_directory_listings_destroy_callback(0, length, (void *) datas_array);
+ {
+ const f_status_t status = f_directory_listings_destroy_callback(0, length, (void *) datas.array);
assert_int_equal(status, F_okay);
+ assert_int_equal(datas.array[0].block.size, 0);
+ assert_int_equal(datas.array[0].character.size, 0);
+ assert_int_equal(datas.array[0].directory.size, 0);
+ assert_int_equal(datas.array[0].regular.size, 0);
+ assert_int_equal(datas.array[0].link.size, 0);
+ assert_int_equal(datas.array[0].fifo.size, 0);
+ assert_int_equal(datas.array[0].socket.size, 0);
+ assert_int_equal(datas.array[0].unknown.size, 0);
}
+
+ free((void *) datas.array);
}
#ifdef __cplusplus
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));
+ 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_directory_listingss_delete_callback(0, 1, (void *) datas_array);
}
{
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- 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_memory_arrays_resize, true);
+ will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
const f_status_t status = f_directory_listingss_delete_callback(0, 1, (void *) datas_array);
}
{
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- 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_memory_arrays_resize, true);
+ will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
const f_status_t status = f_directory_listingss_delete_callback(0, 1, (void *) datas_array);
}
{
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- 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_memory_arrays_resize, true);
+ will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
const f_status_t status = f_directory_listingss_delete_callback(0, 1, (void *) datas_array);
}
{
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- 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_memory_arrays_resize, true);
+ will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
const f_status_t status = f_directory_listingss_delete_callback(0, 1, (void *) datas_array);
}
{
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- 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_memory_arrays_resize, true);
+ will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
const f_status_t status = f_directory_listingss_delete_callback(0, 1, (void *) datas_array);
}
{
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- 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_memory_arrays_resize, true);
+ will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
const f_status_t status = f_directory_listingss_delete_callback(0, 1, (void *) datas_array);
}
{
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- 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_memory_arrays_resize, true);
+ will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
const f_status_t status = f_directory_listingss_delete_callback(0, 1, (void *) datas_array);
}
{
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
will_return(__wrap_f_memory_array_resize, true);
will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
void test__f_directory_listingss_delete_callback__works(void **state) {
- mock_unwrap = 1;
+ mock_unwrap = 0;
mock_unwrap_f_memory = 1;
const f_number_unsigned_t length = 1;
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_okay);
- status = f_string_dynamics_resize(1, &datass.array[0].array[0].block);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datass.array[0].array[0].block.array, &datass.array[0].array[0].block.used, &datass.array[0].array[0].block.size, &f_string_dynamics_delete_callback);
assert_int_equal(status, F_okay);
- status = f_string_dynamics_resize(1, &datass.array[0].array[0].character);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datass.array[0].array[0].character.array, &datass.array[0].array[0].character.used, &datass.array[0].array[0].character.size, &f_string_dynamics_delete_callback);
assert_int_equal(status, F_okay);
- status = f_string_dynamics_resize(1, &datass.array[0].array[0].directory);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datass.array[0].array[0].directory.array, &datass.array[0].array[0].directory.used, &datass.array[0].array[0].directory.size, &f_string_dynamics_delete_callback);
assert_int_equal(status, F_okay);
- status = f_string_dynamics_resize(1, &datass.array[0].array[0].regular);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datass.array[0].array[0].regular.array, &datass.array[0].array[0].regular.used, &datass.array[0].array[0].regular.size, &f_string_dynamics_delete_callback);
assert_int_equal(status, F_okay);
- status = f_string_dynamics_resize(1, &datass.array[0].array[0].link);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datass.array[0].array[0].link.array, &datass.array[0].array[0].link.used, &datass.array[0].array[0].link.size, &f_string_dynamics_delete_callback);
assert_int_equal(status, F_okay);
- status = f_string_dynamics_resize(1, &datass.array[0].array[0].fifo);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datass.array[0].array[0].fifo.array, &datass.array[0].array[0].fifo.used, &datass.array[0].array[0].fifo.size, &f_string_dynamics_delete_callback);
assert_int_equal(status, F_okay);
- status = f_string_dynamics_resize(1, &datass.array[0].array[0].socket);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datass.array[0].array[0].socket.array, &datass.array[0].array[0].socket.used, &datass.array[0].array[0].socket.size, &f_string_dynamics_delete_callback);
assert_int_equal(status, F_okay);
- status = f_string_dynamics_resize(1, &datass.array[0].array[0].unknown);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datass.array[0].array[0].unknown.array, &datass.array[0].array[0].unknown.used, &datass.array[0].array[0].unknown.size, &f_string_dynamics_delete_callback);
assert_int_equal(status, F_okay);
}
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));
+ 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_directory_listingss_destroy_callback(0, 1, (void *) datas_array);
}
{
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- 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_memory_arrays_adjust, true);
+ will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
const f_status_t status = f_directory_listingss_destroy_callback(0, 1, (void *) datas_array);
}
{
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- 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_memory_arrays_adjust, true);
+ will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
const f_status_t status = f_directory_listingss_destroy_callback(0, 1, (void *) datas_array);
}
{
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- 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_memory_arrays_adjust, true);
+ will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
const f_status_t status = f_directory_listingss_destroy_callback(0, 1, (void *) datas_array);
}
{
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- 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_memory_arrays_adjust, true);
+ will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
const f_status_t status = f_directory_listingss_destroy_callback(0, 1, (void *) datas_array);
}
{
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- 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_memory_arrays_adjust, true);
+ will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
const f_status_t status = f_directory_listingss_destroy_callback(0, 1, (void *) datas_array);
}
{
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- 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_memory_arrays_adjust, true);
+ will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
const f_status_t status = f_directory_listingss_destroy_callback(0, 1, (void *) datas_array);
}
{
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- 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_memory_arrays_adjust, true);
+ will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
const f_status_t status = f_directory_listingss_destroy_callback(0, 1, (void *) datas_array);
}
{
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
will_return(__wrap_f_memory_array_adjust, true);
will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
void test__f_directory_listingss_destroy_callback__works(void **state) {
- mock_unwrap = 1;
+ mock_unwrap = 0;
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);
+ 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_okay);
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_okay);
- status = f_string_dynamics_adjust(1, &datass.array[0].array[0].block);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datass.array[0].array[0].block.array, &datass.array[0].array[0].block.used, &datass.array[0].array[0].block.size, &f_string_dynamics_delete_callback);
assert_int_equal(status, F_okay);
- status = f_string_dynamics_adjust(1, &datass.array[0].array[0].character);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datass.array[0].array[0].character.array, &datass.array[0].array[0].character.used, &datass.array[0].array[0].character.size, &f_string_dynamics_delete_callback);
assert_int_equal(status, F_okay);
- status = f_string_dynamics_adjust(1, &datass.array[0].array[0].directory);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datass.array[0].array[0].directory.array, &datass.array[0].array[0].directory.used, &datass.array[0].array[0].directory.size, &f_string_dynamics_delete_callback);
assert_int_equal(status, F_okay);
- status = f_string_dynamics_adjust(1, &datass.array[0].array[0].regular);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datass.array[0].array[0].regular.array, &datass.array[0].array[0].regular.used, &datass.array[0].array[0].regular.size, &f_string_dynamics_delete_callback);
assert_int_equal(status, F_okay);
- status = f_string_dynamics_adjust(1, &datass.array[0].array[0].link);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datass.array[0].array[0].link.array, &datass.array[0].array[0].link.used, &datass.array[0].array[0].link.size, &f_string_dynamics_delete_callback);
assert_int_equal(status, F_okay);
- status = f_string_dynamics_adjust(1, &datass.array[0].array[0].fifo);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datass.array[0].array[0].fifo.array, &datass.array[0].array[0].fifo.used, &datass.array[0].array[0].fifo.size, &f_string_dynamics_delete_callback);
assert_int_equal(status, F_okay);
- status = f_string_dynamics_adjust(1, &datass.array[0].array[0].socket);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datass.array[0].array[0].socket.array, &datass.array[0].array[0].socket.used, &datass.array[0].array[0].socket.size, &f_string_dynamics_delete_callback);
assert_int_equal(status, F_okay);
- status = f_string_dynamics_adjust(1, &datass.array[0].array[0].unknown);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datass.array[0].array[0].unknown.array, &datass.array[0].array[0].unknown.used, &datass.array[0].array[0].unknown.size, &f_string_dynamics_delete_callback);
assert_int_equal(status, F_okay);
}
void test__f_directory_recurse_dos_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 datass_array[] = { datas };
{
- will_return(__wrap_f_string_dynamic_resize, true);
- will_return(__wrap_f_string_dynamic_resize, 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_directory_recurse_dos_delete_callback(0, 1, (void *) datass_array);
}
{
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamic_resize, true);
- will_return(__wrap_f_string_dynamic_resize, 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_directory_recurse_dos_delete_callback(0, 1, (void *) datass_array);
}
{
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- 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_memory_arrays_resize, true);
+ will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
const f_status_t status = f_directory_recurse_dos_delete_callback(0, 1, (void *) datass_array);
}
{
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- 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_memory_arrays_resize, true);
+ will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
const f_status_t status = f_directory_recurse_dos_delete_callback(0, 1, (void *) datass_array);
}
{
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- 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_memory_arrays_resize, true);
+ will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
const f_status_t status = f_directory_recurse_dos_delete_callback(0, 1, (void *) datass_array);
}
{
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- 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_memory_arrays_resize, true);
+ will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
const f_status_t status = f_directory_recurse_dos_delete_callback(0, 1, (void *) datass_array);
}
{
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- 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_memory_arrays_resize, true);
+ will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
const f_status_t status = f_directory_recurse_dos_delete_callback(0, 1, (void *) datass_array);
}
{
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- 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_memory_arrays_resize, true);
+ will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
const f_status_t status = f_directory_recurse_dos_delete_callback(0, 1, (void *) datass_array);
}
{
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- 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_memory_arrays_resize, true);
+ will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
const f_status_t status = f_directory_recurse_dos_delete_callback(0, 1, (void *) datass_array);
}
{
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- 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_memory_arrays_resize, true);
+ will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
const f_status_t status = f_directory_recurse_dos_delete_callback(0, 1, (void *) datass_array);
void test__f_directory_recurse_dos_delete_callback__works(void **state) {
mock_unwrap = 0;
+ mock_unwrap_f_memory = 1;
- 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 };
const f_number_unsigned_t length = 1;
+ f_directory_recurse_dos_t datas = f_directory_recurse_dos_t_initialize;
+
{
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ f_status_t status = f_memory_array_resize(1, sizeof(f_directory_recurse_do_t), (void **) &datas.array, &datas.used, &datas.size);
+ assert_int_equal(status, F_okay);
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datas.array[0].path.string, &datas.array[0].path.used, &datas.array[0].path.size);
+ assert_int_equal(status, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datas.array[0].path_cache.string, &datas.array[0].path_cache.used, &datas.array[0].path_cache.size);
+ assert_int_equal(status, F_okay);
+
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datas.array[0].listing.block.array, &datas.array[0].listing.block.used, &datas.array[0].listing.block.size, &f_string_dynamics_delete_callback);
+ assert_int_equal(status, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datas.array[0].listing.character.array, &datas.array[0].listing.character.used, &datas.array[0].listing.character.size, &f_string_dynamics_delete_callback);
+ assert_int_equal(status, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datas.array[0].listing.directory.array, &datas.array[0].listing.directory.used, &datas.array[0].listing.directory.size, &f_string_dynamics_delete_callback);
+ assert_int_equal(status, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datas.array[0].listing.regular.array, &datas.array[0].listing.regular.used, &datas.array[0].listing.regular.size, &f_string_dynamics_delete_callback);
+ assert_int_equal(status, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datas.array[0].listing.link.array, &datas.array[0].listing.link.used, &datas.array[0].listing.link.size, &f_string_dynamics_delete_callback);
+ assert_int_equal(status, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datas.array[0].listing.fifo.array, &datas.array[0].listing.fifo.used, &datas.array[0].listing.fifo.size, &f_string_dynamics_delete_callback);
+ assert_int_equal(status, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datas.array[0].listing.socket.array, &datas.array[0].listing.socket.used, &datas.array[0].listing.socket.size, &f_string_dynamics_delete_callback);
+ assert_int_equal(status, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datas.array[0].listing.unknown.array, &datas.array[0].listing.unknown.used, &datas.array[0].listing.unknown.size, &f_string_dynamics_delete_callback);
+ assert_int_equal(status, F_okay);
+ }
- const f_status_t status = f_directory_recurse_dos_delete_callback(0, length, (void *) datass_array);
+ {
+ const f_status_t status = f_directory_recurse_dos_delete_callback(0, length, (void *) datas.array);
assert_int_equal(status, F_okay);
+ assert_int_equal(datas.array[0].path.size, 0);
+ assert_int_equal(datas.array[0].path_cache.size, 0);
+ assert_int_equal(datas.array[0].listing.block.size, 0);
+ assert_int_equal(datas.array[0].listing.character.size, 0);
+ assert_int_equal(datas.array[0].listing.directory.size, 0);
+ assert_int_equal(datas.array[0].listing.regular.size, 0);
+ assert_int_equal(datas.array[0].listing.link.size, 0);
+ assert_int_equal(datas.array[0].listing.fifo.size, 0);
+ assert_int_equal(datas.array[0].listing.socket.size, 0);
+ assert_int_equal(datas.array[0].listing.unknown.size, 0);
}
+
+ free((void *) datas.array);
}
#ifdef __cplusplus
void test__f_directory_recurse_dos_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 datass_array[] = { datas };
{
- will_return(__wrap_f_string_dynamic_adjust, true);
- will_return(__wrap_f_string_dynamic_adjust, 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_directory_recurse_dos_destroy_callback(0, 1, (void *) datass_array);
}
{
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, true);
- will_return(__wrap_f_string_dynamic_adjust, 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_directory_recurse_dos_destroy_callback(0, 1, (void *) datass_array);
}
{
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- 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_memory_arrays_adjust, true);
+ will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
const f_status_t status = f_directory_recurse_dos_destroy_callback(0, 1, (void *) datass_array);
}
{
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- 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_memory_arrays_adjust, true);
+ will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
const f_status_t status = f_directory_recurse_dos_destroy_callback(0, 1, (void *) datass_array);
}
{
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- 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_memory_arrays_adjust, true);
+ will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
const f_status_t status = f_directory_recurse_dos_destroy_callback(0, 1, (void *) datass_array);
}
{
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- 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_memory_arrays_adjust, true);
+ will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
const f_status_t status = f_directory_recurse_dos_destroy_callback(0, 1, (void *) datass_array);
}
{
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- 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_memory_arrays_adjust, true);
+ will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
const f_status_t status = f_directory_recurse_dos_destroy_callback(0, 1, (void *) datass_array);
}
{
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- 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_memory_arrays_adjust, true);
+ will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
const f_status_t status = f_directory_recurse_dos_destroy_callback(0, 1, (void *) datass_array);
}
{
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- 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_memory_arrays_adjust, true);
+ will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
const f_status_t status = f_directory_recurse_dos_destroy_callback(0, 1, (void *) datass_array);
}
{
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- 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_memory_arrays_adjust, true);
+ will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
const f_status_t status = f_directory_recurse_dos_destroy_callback(0, 1, (void *) datass_array);
void test__f_directory_recurse_dos_destroy_callback__works(void **state) {
mock_unwrap = 0;
+ mock_unwrap_f_memory = 1;
- 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 };
const f_number_unsigned_t length = 1;
+ f_directory_recurse_dos_t datas = f_directory_recurse_dos_t_initialize;
+
{
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ f_status_t status = f_memory_array_resize(1, sizeof(f_directory_recurse_do_t), (void **) &datas.array, &datas.used, &datas.size);
+ assert_int_equal(status, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datas.array[0].path.string, &datas.array[0].path.used, &datas.array[0].path.size);
+ assert_int_equal(status, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datas.array[0].path_cache.string, &datas.array[0].path_cache.used, &datas.array[0].path_cache.size);
+ assert_int_equal(status, F_okay);
+
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datas.array[0].listing.block.array, &datas.array[0].listing.block.used, &datas.array[0].listing.block.size, &f_string_dynamics_destroy_callback);
+ assert_int_equal(status, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datas.array[0].listing.character.array, &datas.array[0].listing.character.used, &datas.array[0].listing.character.size, &f_string_dynamics_destroy_callback);
+ assert_int_equal(status, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datas.array[0].listing.directory.array, &datas.array[0].listing.directory.used, &datas.array[0].listing.directory.size, &f_string_dynamics_destroy_callback);
+ assert_int_equal(status, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datas.array[0].listing.regular.array, &datas.array[0].listing.regular.used, &datas.array[0].listing.regular.size, &f_string_dynamics_destroy_callback);
+ assert_int_equal(status, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datas.array[0].listing.link.array, &datas.array[0].listing.link.used, &datas.array[0].listing.link.size, &f_string_dynamics_destroy_callback);
+ assert_int_equal(status, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datas.array[0].listing.fifo.array, &datas.array[0].listing.fifo.used, &datas.array[0].listing.fifo.size, &f_string_dynamics_destroy_callback);
+ assert_int_equal(status, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datas.array[0].listing.socket.array, &datas.array[0].listing.socket.used, &datas.array[0].listing.socket.size, &f_string_dynamics_destroy_callback);
+ assert_int_equal(status, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datas.array[0].listing.unknown.array, &datas.array[0].listing.unknown.used, &datas.array[0].listing.unknown.size, &f_string_dynamics_destroy_callback);
+ assert_int_equal(status, F_okay);
+ }
- const f_status_t status = f_directory_recurse_dos_destroy_callback(0, length, (void *) datass_array);
+ {
+ const f_status_t status = f_directory_recurse_dos_destroy_callback(0, length, (void *) datas.array);
assert_int_equal(status, F_okay);
+ assert_int_equal(datas.array[0].path.size, 0);
+ assert_int_equal(datas.array[0].path_cache.size, 0);
+ assert_int_equal(datas.array[0].listing.block.size, 0);
+ assert_int_equal(datas.array[0].listing.character.size, 0);
+ assert_int_equal(datas.array[0].listing.directory.size, 0);
+ assert_int_equal(datas.array[0].listing.regular.size, 0);
+ assert_int_equal(datas.array[0].listing.link.size, 0);
+ assert_int_equal(datas.array[0].listing.fifo.size, 0);
+ assert_int_equal(datas.array[0].listing.socket.size, 0);
+ assert_int_equal(datas.array[0].listing.unknown.size, 0);
}
+
+ free((void *) datas.array);
}
#ifdef __cplusplus
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));
+ 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);
}
{
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamic_resize, true);
- will_return(__wrap_f_string_dynamic_resize, 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_directory_recurse_doss_delete_callback(0, 1, (void *) datass_array);
}
{
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- 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_memory_arrays_resize, true);
+ will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
const f_status_t status = f_directory_recurse_doss_delete_callback(0, 1, (void *) datass_array);
}
{
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- 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_memory_arrays_resize, true);
+ will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
const f_status_t status = f_directory_recurse_doss_delete_callback(0, 1, (void *) datass_array);
}
{
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- 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_memory_arrays_resize, true);
+ will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
const f_status_t status = f_directory_recurse_doss_delete_callback(0, 1, (void *) datass_array);
}
{
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- 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_memory_arrays_resize, true);
+ will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
const f_status_t status = f_directory_recurse_doss_delete_callback(0, 1, (void *) datass_array);
}
{
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- 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_memory_arrays_resize, true);
+ will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
const f_status_t status = f_directory_recurse_doss_delete_callback(0, 1, (void *) datass_array);
}
{
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- 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_memory_arrays_resize, true);
+ will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
const f_status_t status = f_directory_recurse_doss_delete_callback(0, 1, (void *) datass_array);
}
{
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- 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_memory_arrays_resize, true);
+ will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
const f_status_t status = f_directory_recurse_doss_delete_callback(0, 1, (void *) datass_array);
}
{
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- 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_memory_arrays_resize, true);
+ will_return(__wrap_f_memory_arrays_resize, F_status_set_error(F_failure));
const f_status_t status = f_directory_recurse_doss_delete_callback(0, 1, (void *) datass_array);
}
{
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
- will_return(__wrap_f_string_dynamics_resize, false);
- will_return(__wrap_f_string_dynamics_resize, F_okay);
+ will_return(__wrap_f_memory_arrays_resize, false);
+ will_return(__wrap_f_memory_arrays_resize, F_okay);
will_return(__wrap_f_memory_array_resize, true);
will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
void test__f_directory_recurse_doss_delete_callback__works(void **state) {
- mock_unwrap = 1;
+ mock_unwrap = 0;
mock_unwrap_f_memory = 1;
const f_number_unsigned_t length = 1;
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_okay);
- status = f_string_dynamic_resize(1, &datass.array[0].array[0].path);
+ status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datass.array[0].array[0].path.string, &datass.array[0].array[0].path.used, &datass.array[0].array[0].path.size);
assert_int_equal(status, F_okay);
- status = f_string_dynamic_resize(1, &datass.array[0].array[0].path_cache);
+ status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datass.array[0].array[0].path_cache.string, &datass.array[0].array[0].path_cache.used, &datass.array[0].array[0].path_cache.size);
assert_int_equal(status, F_okay);
- status = f_string_dynamics_resize(1, &datass.array[0].array[0].listing.block);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datass.array[0].array[0].listing.block.array, &datass.array[0].array[0].listing.block.used, &datass.array[0].array[0].listing.block.size, &f_string_dynamics_delete_callback);
assert_int_equal(status, F_okay);
- status = f_string_dynamics_resize(1, &datass.array[0].array[0].listing.character);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datass.array[0].array[0].listing.character.array, &datass.array[0].array[0].listing.character.used, &datass.array[0].array[0].listing.character.size, &f_string_dynamics_delete_callback);
assert_int_equal(status, F_okay);
- status = f_string_dynamics_resize(1, &datass.array[0].array[0].listing.directory);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datass.array[0].array[0].listing.directory.array, &datass.array[0].array[0].listing.directory.used, &datass.array[0].array[0].listing.directory.size, &f_string_dynamics_delete_callback);
assert_int_equal(status, F_okay);
- status = f_string_dynamics_resize(1, &datass.array[0].array[0].listing.regular);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datass.array[0].array[0].listing.regular.array, &datass.array[0].array[0].listing.regular.used, &datass.array[0].array[0].listing.regular.size, &f_string_dynamics_delete_callback);
assert_int_equal(status, F_okay);
- status = f_string_dynamics_resize(1, &datass.array[0].array[0].listing.link);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datass.array[0].array[0].listing.link.array, &datass.array[0].array[0].listing.link.used, &datass.array[0].array[0].listing.link.size, &f_string_dynamics_delete_callback);
assert_int_equal(status, F_okay);
- status = f_string_dynamics_resize(1, &datass.array[0].array[0].listing.fifo);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datass.array[0].array[0].listing.fifo.array, &datass.array[0].array[0].listing.fifo.used, &datass.array[0].array[0].listing.fifo.size, &f_string_dynamics_delete_callback);
assert_int_equal(status, F_okay);
- status = f_string_dynamics_resize(1, &datass.array[0].array[0].listing.socket);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datass.array[0].array[0].listing.socket.array, &datass.array[0].array[0].listing.socket.used, &datass.array[0].array[0].listing.socket.size, &f_string_dynamics_delete_callback);
assert_int_equal(status, F_okay);
- status = f_string_dynamics_resize(1, &datass.array[0].array[0].listing.unknown);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datass.array[0].array[0].listing.unknown.array, &datass.array[0].array[0].listing.unknown.used, &datass.array[0].array[0].listing.unknown.size, &f_string_dynamics_delete_callback);
assert_int_equal(status, F_okay);
}
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));
+ 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);
}
{
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, true);
- will_return(__wrap_f_string_dynamic_adjust, 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_directory_recurse_doss_destroy_callback(0, 1, (void *) datass_array);
}
{
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- 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_memory_arrays_adjust, true);
+ will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
const f_status_t status = f_directory_recurse_doss_destroy_callback(0, 1, (void *) datass_array);
}
{
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- 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_memory_arrays_adjust, true);
+ will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
const f_status_t status = f_directory_recurse_doss_destroy_callback(0, 1, (void *) datass_array);
}
{
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- 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_memory_arrays_adjust, true);
+ will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
const f_status_t status = f_directory_recurse_doss_destroy_callback(0, 1, (void *) datass_array);
}
{
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- 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_memory_arrays_adjust, true);
+ will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
const f_status_t status = f_directory_recurse_doss_destroy_callback(0, 1, (void *) datass_array);
}
{
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- 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_memory_arrays_adjust, true);
+ will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
const f_status_t status = f_directory_recurse_doss_destroy_callback(0, 1, (void *) datass_array);
}
{
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- 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_memory_arrays_adjust, true);
+ will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
const f_status_t status = f_directory_recurse_doss_destroy_callback(0, 1, (void *) datass_array);
}
{
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- 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_memory_arrays_adjust, true);
+ will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
const f_status_t status = f_directory_recurse_doss_destroy_callback(0, 1, (void *) datass_array);
}
{
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- 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_memory_arrays_adjust, true);
+ will_return(__wrap_f_memory_arrays_adjust, F_status_set_error(F_failure));
const f_status_t status = f_directory_recurse_doss_destroy_callback(0, 1, (void *) datass_array);
}
{
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
- will_return(__wrap_f_string_dynamics_adjust, false);
- will_return(__wrap_f_string_dynamics_adjust, F_okay);
+ will_return(__wrap_f_memory_arrays_adjust, false);
+ will_return(__wrap_f_memory_arrays_adjust, F_okay);
will_return(__wrap_f_memory_array_adjust, true);
will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
void test__f_directory_recurse_doss_destroy_callback__works(void **state) {
- mock_unwrap = 1;
+ mock_unwrap = 0;
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);
+ 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_okay);
- 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);
+ 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_okay);
- status = f_string_dynamic_adjust(1, &datass.array[0].array[0].path);
+ status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datass.array[0].array[0].path.string, &datass.array[0].array[0].path.used, &datass.array[0].array[0].path.size);
assert_int_equal(status, F_okay);
- status = f_string_dynamic_adjust(1, &datass.array[0].array[0].path_cache);
+ status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datass.array[0].array[0].path_cache.string, &datass.array[0].array[0].path_cache.used, &datass.array[0].array[0].path_cache.size);
assert_int_equal(status, F_okay);
- status = f_string_dynamics_adjust(1, &datass.array[0].array[0].listing.block);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datass.array[0].array[0].listing.block.array, &datass.array[0].array[0].listing.block.used, &datass.array[0].array[0].listing.block.size, &f_string_dynamics_destroy_callback);
assert_int_equal(status, F_okay);
- status = f_string_dynamics_adjust(1, &datass.array[0].array[0].listing.character);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datass.array[0].array[0].listing.character.array, &datass.array[0].array[0].listing.character.used, &datass.array[0].array[0].listing.character.size, &f_string_dynamics_destroy_callback);
assert_int_equal(status, F_okay);
- status = f_string_dynamics_adjust(1, &datass.array[0].array[0].listing.directory);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datass.array[0].array[0].listing.directory.array, &datass.array[0].array[0].listing.directory.used, &datass.array[0].array[0].listing.directory.size, &f_string_dynamics_destroy_callback);
assert_int_equal(status, F_okay);
- status = f_string_dynamics_adjust(1, &datass.array[0].array[0].listing.regular);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datass.array[0].array[0].listing.regular.array, &datass.array[0].array[0].listing.regular.used, &datass.array[0].array[0].listing.regular.size, &f_string_dynamics_destroy_callback);
assert_int_equal(status, F_okay);
- status = f_string_dynamics_adjust(1, &datass.array[0].array[0].listing.link);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datass.array[0].array[0].listing.link.array, &datass.array[0].array[0].listing.link.used, &datass.array[0].array[0].listing.link.size, &f_string_dynamics_destroy_callback);
assert_int_equal(status, F_okay);
- status = f_string_dynamics_adjust(1, &datass.array[0].array[0].listing.fifo);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datass.array[0].array[0].listing.fifo.array, &datass.array[0].array[0].listing.fifo.used, &datass.array[0].array[0].listing.fifo.size, &f_string_dynamics_destroy_callback);
assert_int_equal(status, F_okay);
- status = f_string_dynamics_adjust(1, &datass.array[0].array[0].listing.socket);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datass.array[0].array[0].listing.socket.array, &datass.array[0].array[0].listing.socket.used, &datass.array[0].array[0].listing.socket.size, &f_string_dynamics_destroy_callback);
assert_int_equal(status, F_okay);
- status = f_string_dynamics_adjust(1, &datass.array[0].array[0].listing.unknown);
+ status = f_memory_arrays_resize(1, sizeof(f_string_dynamic_t), (void **) &datass.array[0].array[0].listing.unknown.array, &datass.array[0].array[0].listing.unknown.used, &datass.array[0].array[0].listing.unknown.size, &f_string_dynamics_destroy_callback);
assert_int_equal(status, F_okay);
}
void test__f_directory_statuss_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 datass_array[] = { datas };
{
- will_return(__wrap_f_string_dynamic_resize, true);
- will_return(__wrap_f_string_dynamic_resize, 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_directory_statuss_delete_callback(0, 1, (void *) datass_array);
void test__f_directory_statuss_delete_callback__works(void **state) {
mock_unwrap = 0;
+ mock_unwrap_f_memory = 1;
- 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 };
const f_number_unsigned_t length = 1;
+ f_directory_statuss_t datas = f_directory_statuss_t_initialize;
+
{
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ f_status_t status = f_memory_array_resize(length, sizeof(f_directory_status_t), (void **) &datas.array, &datas.used, &datas.size);
+ assert_int_equal(status, F_okay);
+ }
- const f_status_t status = f_directory_statuss_delete_callback(0, length, (void *) datass_array);
+ {
+ const f_status_t status = f_directory_statuss_delete_callback(0, length, (void *) datas.array);
assert_int_equal(status, F_okay);
+ assert_int_equal(datas.array[0].path.size, 0);
}
+
+ free((void *) datas.array);
}
#ifdef __cplusplus
void test__f_directory_statuss_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 datass_array[] = { datas };
{
- will_return(__wrap_f_string_dynamic_adjust, true);
- will_return(__wrap_f_string_dynamic_adjust, 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_directory_statuss_destroy_callback(0, 1, (void *) datass_array);
void test__f_directory_statuss_destroy_callback__works(void **state) {
mock_unwrap = 0;
+ mock_unwrap_f_memory = 1;
- 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 };
const f_number_unsigned_t length = 1;
+ f_directory_statuss_t datas = f_directory_statuss_t_initialize;
+
{
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ f_status_t status = f_memory_array_adjust(length, sizeof(f_directory_status_t), (void **) &datas.array, &datas.used, &datas.size);
+ assert_int_equal(status, F_okay);
+ }
- const f_status_t status = f_directory_statuss_destroy_callback(0, length, (void *) datass_array);
+ {
+ const f_status_t status = f_directory_statuss_destroy_callback(0, length, (void *) datas.array);
assert_int_equal(status, F_okay);
+ assert_int_equal(datas.array[0].path.size, 0);
}
+
+ free((void *) datas.array);
}
#ifdef __cplusplus
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));
+ 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);
}
{
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
will_return(__wrap_f_memory_array_resize, true);
will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
void test__f_directory_statusss_delete_callback__works(void **state) {
- mock_unwrap = 1;
+ mock_unwrap = 0;
mock_unwrap_f_memory = 1;
const f_number_unsigned_t length = 1;
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_okay);
- status = f_string_dynamic_resize(1, &datass.array[0].array[0].path);
+ status = f_memory_array_adjust(1, sizeof(f_char_t), (void **) &datass.array[0].array[0].path.string, &datass.array[0].array[0].path.used, &datass.array[0].array[0].path.size);
assert_int_equal(status, F_okay);
}
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));
+ 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);
}
{
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
will_return(__wrap_f_memory_array_adjust, true);
will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
void test__f_directory_statusss_destroy_callback__works(void **state) {
- mock_unwrap = 1;
+ mock_unwrap = 0;
mock_unwrap_f_memory = 1;
const f_number_unsigned_t length = 1;
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_okay);
- status = f_string_dynamic_adjust(1, &datass.array[0].array[0].path);
+ status = f_memory_array_adjust(1, sizeof(f_char_t), (void **) &datass.array[0].array[0].path.string, &datass.array[0].array[0].path.used, &datass.array[0].array[0].path.size);
assert_int_equal(status, F_okay);
}
assert_int_equal(status, F_exist_not);
}
- f_string_dynamic_resize(0, &buffer);
+ free((void *) buffer.string);
}
void test__f_environment_get__parameter_checking(void **state) {
assert_int_equal(status, F_data_not);
}
- f_string_dynamic_resize(0, &buffer);
+ free((void *) buffer.string);
}
void test__f_environment_get__works(void **state) {
assert_string_equal(buffer.string, f_string_empty_s.string);
}
- f_string_dynamic_resize(0, &buffer);
+ free((void *) buffer.string);
}
#ifdef __cplusplus
assert_int_equal(status, F_status_set_error(statuss[i]));
} // for
- f_string_dynamic_resize(0, &buffer);
+ free((void *) buffer.string);
}
void test__f_file_link_read__parameter_checking(void **state) {
assert_int_equal(status, F_status_set_error(F_parameter));
}
- f_string_dynamic_resize(0, &buffer);
+ free((void *) buffer.string);
}
void test__f_file_link_read__returns_data_not(void **state) {
assert_int_equal(status, F_data_not);
}
- f_string_dynamic_resize(0, &buffer);
+ free((void *) buffer.string);
}
void test__f_file_link_read__works(void **state) {
assert_int_equal(status, F_okay);
}
- f_string_dynamic_resize(0, &buffer);
+ free((void *) buffer.string);
}
#ifdef __cplusplus
assert_int_equal(status, F_status_set_error(statuss[i]));
} // for
- f_string_dynamic_resize(0, &buffer);
+ free((void *) buffer.string);
}
void test__f_file_link_read_at__parameter_checking(void **state) {
assert_int_equal(status, F_status_set_error(F_parameter));
}
- f_string_dynamic_resize(0, &buffer);
+ free((void *) buffer.string);
}
void test__f_file_link_read_at__returns_data_not(void **state) {
assert_int_equal(status, F_data_not);
}
- f_string_dynamic_resize(0, &buffer);
+ free((void *) buffer.string);
}
void test__f_file_link_read_at__returns_file_descriptor_not(void **state) {
assert_int_equal(status, F_file_descriptor_not);
}
- f_string_dynamic_resize(0, &buffer);
+ free((void *) buffer.string);
}
void test__f_file_link_read_at__works(void **state) {
assert_int_equal(status, F_okay);
}
- f_string_dynamic_resize(0, &buffer);
+ free((void *) buffer.string);
}
#ifdef __cplusplus
assert_int_equal(status, F_data_not);
}
- f_string_dynamic_resize(0, &buffer);
+ free((void *) buffer.string);
}
void test__f_file_name_base__works(void **state) {
assert_string_equal(buffer.string, bases[i].string);
} // for
- f_string_dynamic_resize(0, &buffer);
+ free((void *) buffer.string);
}
#ifdef __cplusplus
assert_int_equal(status, F_data_not);
}
- f_string_dynamic_resize(0, &buffer);
+ free((void *) buffer.string);
}
void test__f_file_name_directory__works(void **state) {
assert_string_equal(buffer.string, bases[i].string);
} // for
- f_string_dynamic_resize(0, &buffer);
+ free((void *) buffer.string);
}
#ifdef __cplusplus
assert_int_equal(status, F_status_set_error(statuss[i]));
} // for
- f_string_dynamic_resize(0, &buffer);
+ free((void *) buffer.string);
}
void test__f_file_read__parameter_checking(void **state) {
assert_int_equal(status, F_status_set_error(F_parameter));
}
- f_string_dynamic_resize(0, &buffer);
+ free((void *) buffer.string);
}
void test__f_file_read__returns_file_descriptor_not(void **state) {
assert_int_equal(F_status_set_fine(status), F_file_descriptor_not);
}
- f_string_dynamic_resize(0, &buffer);
+ free((void *) buffer.string);
}
void test__f_file_read__works(void **state) {
assert_string_equal(buffer.string, "abcdef");
}
- f_string_dynamic_resize(0, &buffer);
+ free((void *) buffer.string);
}
#ifdef __cplusplus
assert_int_equal(status, F_status_set_error(statuss[i]));
} // for
- f_string_dynamic_resize(0, &buffer);
+ free((void *) buffer.string);
}
void test__f_file_read_block__parameter_checking(void **state) {
assert_int_equal(status, F_status_set_error(F_parameter));
}
- f_string_dynamic_resize(0, &buffer);
+ free((void *) buffer.string);
}
void test__f_file_read_block__returns_file_descriptor_not(void **state) {
assert_int_equal(F_status_set_fine(status), F_file_descriptor_not);
}
- f_string_dynamic_resize(0, &buffer);
+ free((void *) buffer.string);
}
void test__f_file_read_block__works(void **state) {
assert_string_equal(buffer.string, "abcd");
}
- f_string_dynamic_resize(0, &buffer);
+ free((void *) buffer.string);
}
#ifdef __cplusplus
assert_int_equal(status, F_status_set_error(statuss[i]));
} // for
- f_string_dynamic_resize(0, &buffer);
+ free((void *) buffer.string);
}
void test__f_file_read_until__parameter_checking(void **state) {
assert_int_equal(status, F_status_set_error(F_parameter));
}
- f_string_dynamic_resize(0, &buffer);
+ free((void *) buffer.string);
}
void test__f_file_read_until__returns_file_descriptor_not(void **state) {
assert_int_equal(F_status_set_fine(status), F_file_descriptor_not);
}
- f_string_dynamic_resize(0, &buffer);
+ free((void *) buffer.string);
}
void test__f_file_read_until__works(void **state) {
assert_string_equal(buffer.string, "abcd");
}
- f_string_dynamic_resize(0, &buffer);
+ free((void *) buffer.string);
}
#ifdef __cplusplus
assert_int_equal(status, F_status_set_error(F_file_read));
}
- f_string_dynamic_resize(0, &buffer);
+ free((void *) buffer.string);
}
void test__f_file_stream_read__parameter_checking(void **state) {
assert_int_equal(F_status_set_fine(status), F_stream_not);
}
- f_string_dynamic_resize(0, &buffer);
+ free((void *) buffer.string);
}
void test__f_file_stream_read__works(void **state) {
assert_int_equal(status, F_okay_eof);
}
- f_string_dynamic_resize(0, &buffer);
+ free((void *) buffer.string);
}
#ifdef __cplusplus
assert_int_equal(status, F_status_set_error(F_file_read));
}
- f_string_dynamic_resize(0, &buffer);
+ free((void *) buffer.string);
}
void test__f_file_stream_read_block__parameter_checking(void **state) {
assert_int_equal(status, F_okay);
}
- f_string_dynamic_resize(0, &buffer);
+ free((void *) buffer.string);
}
#ifdef __cplusplus
assert_int_equal(status, F_status_set_error(F_file_read));
}
- f_string_dynamic_resize(0, &buffer);
+ free((void *) buffer.string);
}
void test__f_file_stream_read_until__parameter_checking(void **state) {
assert_int_equal(F_status_set_fine(status), F_stream_not);
}
- f_string_dynamic_resize(0, &buffer);
+ free((void *) buffer.string);
}
void test__f_file_stream_read_until__works(void **state) {
assert_int_equal(status, F_okay_stop);
}
- f_string_dynamic_resize(0, &buffer);
+ free((void *) buffer.string);
}
#ifdef __cplusplus
* 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_string_dynamic_resize().
*
* @see f_memory_array_resize()
- * @see f_string_dynamic_resize()
*
* @see f_fss_items_decrease_by()
* @see f_fss_items_resize()
* 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_string_dynamic_resize().
*
* @see f_memory_array_resize()
- * @see f_string_dynamic_resize()
*
* @see f_fss_nests_decrease_by()
* @see f_fss_nests_resize()
* 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_string_dynamic_resize().
*
* @see f_memory_array_resize()
- * @see f_string_dynamic_resize()
*
* @see f_fss_nests_decrease_by()
* @see f_fss_nests_increase()
for (f_number_unsigned_t i = length; i < packets->size; ++i) {
- status = f_string_dynamic_resize(0, &packets->array[i].payload);
+ status = f_memory_array(0, sizeof(f_char_t), (void **) &packets->array[i].payload.string, &packets->array[i].payload.used, &packets->array[i].payload.size);
if (F_status_is_error(status)) return status;
} // for
}
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
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) {
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 __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);
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));
+ 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_packets_delete_callback(0, 1, (void *) datas_array);
void test__f_fss_simple_packets_delete_callback__works(void **state) {
mock_unwrap = 0;
- mock_unwrap_f_memory = 0;
+ mock_unwrap_f_memory = 1;
- 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;
+ f_fss_simple_packets_t datas = f_fss_simple_packets_t_initialize;
+
{
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ f_status_t status = f_memory_array_resize(1, sizeof(f_fss_simple_packet_t), (void **) &datas.array, &datas.used, &datas.size);
+ assert_int_equal(status, F_okay);
+
+ status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datas.array[0].payload, &datas.array[0].payload.used, &datas.array[0].payload.size);
+ assert_int_equal(status, F_okay);
+ }
- const f_status_t status = f_fss_simple_packets_delete_callback(0, length, (void *) datas_array);
+ {
+ const f_status_t status = f_fss_simple_packets_delete_callback(0, length, (void *) datas.array);
assert_int_equal(status, F_okay);
+ assert_int_equal(datas.array[0].payload.size, 0);
}
+
+ free((void *) datas.array);
}
#ifdef __cplusplus
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));
+ 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_packets_destroy_callback(0, 1, (void *) datas_array);
void test__f_fss_simple_packets_destroy_callback__works(void **state) {
mock_unwrap = 0;
- mock_unwrap_f_memory = 0;
+ mock_unwrap_f_memory = 1;
- 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;
+ f_fss_simple_packets_t datas = f_fss_simple_packets_t_initialize;
+
{
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ f_status_t status = f_memory_array_resize(1, sizeof(f_fss_simple_packet_t), (void **) &datas.array, &datas.used, &datas.size);
+ assert_int_equal(status, F_okay);
+
+ status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datas.array[0].payload, &datas.array[0].payload.used, &datas.array[0].payload.size);
+ assert_int_equal(status, F_okay);
+ }
- const f_status_t status = f_fss_simple_packets_destroy_callback(0, length, (void *) datas_array);
+ {
+ const f_status_t status = f_fss_simple_packets_destroy_callback(0, length, (void *) datas.array);
assert_int_equal(status, F_okay);
+ assert_int_equal(datas.array[0].payload.size, 0);
}
+
+ free((void *) datas.array);
}
#ifdef __cplusplus
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));
+ 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);
}
{
- will_return(__wrap_f_string_dynamic_resize, false);
- will_return(__wrap_f_string_dynamic_resize, F_okay);
+ will_return(__wrap_f_memory_array_resize, false);
+ will_return(__wrap_f_memory_array_resize, F_okay);
will_return(__wrap_f_memory_array_resize, true);
will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
void test__f_fss_simple_packetss_delete_callback__works(void **state) {
- mock_unwrap = 1;
+ mock_unwrap = 0;
mock_unwrap_f_memory = 1;
const f_number_unsigned_t length = 1;
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_okay);
- status = f_string_dynamic_resize(1, &datass.array[0].array[0].payload);
+ status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datass.array[0].array[0].payload, &datass.array[0].array[0].payload.used, &datass.array[0].array[0].payload.size);
assert_int_equal(status, F_okay);
}
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));
+ 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);
}
{
- will_return(__wrap_f_string_dynamic_adjust, false);
- will_return(__wrap_f_string_dynamic_adjust, F_okay);
+ will_return(__wrap_f_memory_array_adjust, false);
+ will_return(__wrap_f_memory_array_adjust, F_okay);
will_return(__wrap_f_memory_array_adjust, true);
will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
void test__f_fss_simple_packetss_destroy_callback__works(void **state) {
- mock_unwrap = 1;
+ mock_unwrap = 0;
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);
+ 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_okay);
- 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);
+ 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_okay);
- status = f_string_dynamic_adjust(1, &datass.array[0].array[0].payload);
+ status = f_memory_array_resize(1, sizeof(f_char_t), (void **) &datass.array[0].array[0].payload, &datass.array[0].array[0].payload.used, &datass.array[0].array[0].payload.size);
assert_int_equal(status, F_okay);
}
void test__f_limit_setss_delete_callback__works(void **state) {
- mock_unwrap = 1;
+ mock_unwrap = 0;
mock_unwrap_f_memory = 1;
const f_number_unsigned_t length = 1;
void test__f_limit_setss_destroy_callback__works(void **state) {
- mock_unwrap = 1;
+ mock_unwrap = 0;
mock_unwrap_f_memory = 1;
const f_number_unsigned_t length = 1;
void test__f_limit_valuess_delete_callback__works(void **state) {
- mock_unwrap = 1;
+ mock_unwrap = 0;
mock_unwrap_f_memory = 1;
const f_number_unsigned_t length = 1;
void test__f_limit_valuess_destroy_callback__works(void **state) {
- mock_unwrap = 1;
+ mock_unwrap = 0;
mock_unwrap_f_memory = 1;
const f_number_unsigned_t length = 1;
} // for
}
- f_string_dynamic_resize(0, &destination);
+ free((void *) destination.string);
}
void test__f_path_current__parameter_checking(void **state) {
assert_string_equal(destination.string, path_real.string);
}
- f_string_dynamic_resize(0, &destination);
+ free((void *) destination.string);
}
#ifdef __cplusplus
}
// De-allocate each pass to ensure that the NULL termination check is accurate.
- f_string_dynamic_resize(0, &destination);
- } // for
+ if (destination.size && destination.string) {
+ free((void *) destination.string);
- f_string_dynamic_resize(0, &destination);
+ destination.string = 0;
+ destination.used = 0;
+ destination.size = 0;
+ }
+ } // for
}
#ifdef __cplusplus
assert_int_equal(status, F_status_set_error(statuss[i]));
} // for
- f_string_dynamic_resize(0, &destination);
+ free((void *) destination.string);
}
void test__f_path_real__parameter_checking(void **state) {
assert_string_equal(destination.string, path_real.string);
}
- f_string_dynamic_resize(0, &destination);
+ free((void *) destination.string);
}
#ifdef __cplusplus
assert_int_equal(status, F_data_not);
}
- f_string_dynamics_resize(0, &destination);
+ f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &destination.array, &destination.used, &destination.size, &f_string_dynamics_delete_callback);
}
void test__f_serialize_from_simple__works(void **state) {
} // for
}
- f_string_dynamics_resize(0, &destination);
+ f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &destination.array, &destination.used, &destination.size, &f_string_dynamics_delete_callback);
}
#ifdef __cplusplus
assert_int_equal(status, F_data_not);
}
- f_string_dynamic_resize(0, &destination);
+ free((void *) destination.string);
}
void test__f_serialize_from_simple_get__works(void **state) {
}
} // for
- f_string_dynamic_resize(0, &destination);
+ free((void *) destination.string);
}
#ifdef __cplusplus
assert_int_equal(status, F_data_not);
}
- f_string_dynamic_resize(0, &destination);
+ free((void *) destination.string);
}
void test__f_serialize_to_simple__works(void **state) {
assert_string_equal(destination.string, multiple.string);
}
- f_string_dynamic_resize(0, &destination);
+ free((void *) destination.string);
}
#ifdef __cplusplus
void test__f_socket_addressss_delete_callback__works(void **state) {
- mock_unwrap = 1;
+ mock_unwrap = 0;
mock_unwrap_f_memory = 1;
const f_number_unsigned_t length = 1;
void test__f_socket_addressss_destroy_callback__works(void **state) {
- mock_unwrap = 1;
+ mock_unwrap = 0;
mock_unwrap_f_memory = 1;
const f_number_unsigned_t length = 1;
void test__f_socket_ss_delete_callback__works(void **state) {
- mock_unwrap = 1;
+ mock_unwrap = 0;
mock_unwrap_f_memory = 1;
const f_number_unsigned_t length = 1;
void test__f_socket_ss_destroy_callback__works(void **state) {
- mock_unwrap = 1;
+ mock_unwrap = 0;
mock_unwrap_f_memory = 1;
const f_number_unsigned_t length = 1;
build_sources_library string.c
build_sources_library private-string.c string/common.c
-build_sources_library string/private-dynamics.c string/private-dynamicss.c
+build_sources_library string/private-dynamics.c
build_sources_library string/private-maps.c string/private-mapss.c
build_sources_library string/private-map_multis.c string/private-map_multiss.c
build_sources_library string/private-quantitys.c string/private-quantityss.c
build_libraries-individual -lf_memory -lf_string
build_sources_program test-string-append.c test-string-append_assure.c test-string-append_assure_nulless.c test-string-append_nulless.c
-build_sources_program test-string-dynamic_adjust.c test-string-dynamic_append.c test-string-dynamic_append_assure.c test-string-dynamic_append_assure_nulless.c test-string-dynamic_append_nulless.c
-build_sources_program test-string-dynamic_decimate_by.c test-string-dynamic_decrease_by.c test-string-dynamic_increase.c test-string-dynamic_increase_by.c
+build_sources_program test-string-dynamic_append.c test-string-dynamic_append_assure.c test-string-dynamic_append_assure_nulless.c test-string-dynamic_append_nulless.c
build_sources_program test-string-dynamic_mash.c test-string-dynamic_mash_nulless.c
build_sources_program test-string-dynamic_mish.c test-string-dynamic_mish_nulless.c
build_sources_program test-string-dynamic_partial_append.c test-string-dynamic_partial_append_assure.c test-string-dynamic_partial_append_assure_nulless.c test-string-dynamic_partial_append_nulless.c
build_sources_program test-string-dynamic_partial_mish.c test-string-dynamic_partial_mish_nulless.c
build_sources_program test-string-dynamic_partial_prepend.c test-string-dynamic_partial_prepend_assure.c test-string-dynamic_partial_prepend_assure_nulless.c test-string-dynamic_partial_prepend_nulless.c
build_sources_program test-string-dynamic_prepend.c test-string-dynamic_prepend_assure.c test-string-dynamic_prepend_assure_nulless.c test-string-dynamic_prepend_nulless.c
-build_sources_program test-string-dynamic_resize.c
build_sources_program test-string-dynamic_seek_line.c test-string-dynamic_seek_line_to.c test-string-dynamic_seek_to.c
build_sources_program test-string-dynamic_terminate.c test-string-dynamic_terminate_after.c
-build_sources_program test-string-dynamics_adjust.c test-string-dynamics_append.c test-string-dynamics_append_all.c test-string-dynamics_decimate_by.c test-string-dynamics_decrease_by.c test-string-dynamics_increase.c test-string-dynamics_increase_by.c test-string-dynamics_resize.c test-string-dynamicss_adjust.c test-string-dynamicss_append.c test-string-dynamicss_append_all.c test-string-dynamicss_decimate_by.c test-string-dynamicss_decrease_by.c test-string-dynamicss_increase.c test-string-dynamicss_increase_by.c test-string-dynamicss_resize.c
+build_sources_program test-string-dynamics_append.c test-string-dynamics_append_all.c test-string-dynamicss_append.c test-string-dynamicss_append_all.c
build_sources_program test-string-map_multis_adjust.c test-string-map_multis_append.c test-string-map_multis_append_all.c test-string-map_multis_decimate_by.c test-string-map_multis_decrease_by.c test-string-map_multis_increase.c test-string-map_multis_increase_by.c test-string-map_multis_resize.c test-string-map_multiss_adjust.c test-string-map_multiss_append.c test-string-map_multiss_append_all.c test-string-map_multiss_decimate_by.c test-string-map_multiss_decrease_by.c test-string-map_multiss_increase.c test-string-map_multiss_increase_by.c test-string-map_multiss_resize.c
build_sources_program test-string-maps_adjust.c test-string-maps_append.c test-string-maps_append_all.c test-string-maps_decimate_by.c test-string-maps_decrease_by.c test-string-maps_increase.c test-string-maps_increase_by.c test-string-maps_resize.c test-string-mapss_adjust.c test-string-mapss_append.c test-string-mapss_append_all.c test-string-mapss_decimate_by.c test-string-mapss_decrease_by.c test-string-mapss_increase.c test-string-mapss_increase_by.c test-string-mapss_resize.c
build_sources_program test-string-mash.c test-string-mash_nulless.c
+++ /dev/null
-#include "test-string.h"
-#include "test-string-dynamic_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_dynamic_adjust__works(void **state) {
-
- const int length = 5;
- f_string_dynamic_t data = f_string_dynamic_t_initialize;
-
- {
- const f_status_t status = f_string_dynamic_adjust(length, &data);
-
- assert_int_equal(status, F_okay);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.string);
-}
-
-void test__f_string_dynamic_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_string_dynamic_t data = f_string_dynamic_t_initialize;
-
- {
- const f_status_t status = f_string_dynamic_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.string);
-}
-
-#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_string__string_dynamic_adjust
-#define _TEST__F_string__string_dynamic_adjust
-
-/**
- * Test that the function works.
- *
- * @see f_string_dynamic_adjust()
- */
-extern void test__f_string_dynamic_adjust__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_dynamic_adjust()
- */
-extern void test__f_string_dynamic_adjust__parameter_checking(void **state);
-
-#endif // _TEST__F_string__string_dynamic_adjust
+++ /dev/null
-#include "test-string.h"
-#include "test-string-dynamic_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_dynamic_decimate_by__works(void **state) {
-
- const int length = 5;
- f_string_dynamic_t data = f_string_dynamic_t_initialize;
-
- {
- const f_status_t status = f_string_dynamic_resize(length, &data);
-
- assert_int_equal(status, F_okay);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_string_dynamic_decimate_by(length, &data);
-
- assert_int_equal(status, F_okay);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.string);
-}
-
-void test__f_string_dynamic_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_string_dynamic_t data = f_string_dynamic_t_initialize;
-
- {
- const f_status_t status = f_string_dynamic_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.string);
-}
-
-#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_dynamic_decimate_by_h
-#define _TEST__F_dynamic_decimate_by_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_dynamic_decimate_by()
- */
-extern void test__f_string_dynamic_decimate_by__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_dynamic_decimate_by()
- */
-extern void test__f_string_dynamic_decimate_by__parameter_checking(void **state);
-
-#endif // _TEST__F_dynamic_decimate_by_h
+++ /dev/null
-#include "test-string.h"
-#include "test-string-dynamic_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_dynamic_decrease_by__works(void **state) {
-
- const int length = 5;
- f_string_dynamic_t data = f_string_dynamic_t_initialize;
-
- {
- const f_status_t status = f_string_dynamic_resize(length, &data);
-
- assert_int_equal(status, F_okay);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_string_dynamic_decrease_by(length, &data);
-
- assert_int_equal(status, F_okay);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.string);
-}
-
-void test__f_string_dynamic_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_string_dynamic_t data = f_string_dynamic_t_initialize;
-
- {
- const f_status_t status = f_string_dynamic_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.string);
-}
-
-#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_string_dynamic_decrease_by_h
-#define _TEST__F_string_dynamic_decrease_by_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_dynamic_decrease_by()
- */
-extern void test__f_string_dynamic_decrease_by__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_dynamic_decrease_by()
- */
-extern void test__f_string_dynamic_decrease_by__parameter_checking(void **state);
-
-#endif // _TEST__F_string_dynamic_decrease_by_h
+++ /dev/null
-#include "test-string.h"
-#include "test-string-dynamic_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_dynamic_increase__works(void **state) {
-
- const int length = 5;
- f_string_dynamic_t data = f_string_dynamic_t_initialize;
-
- {
- const f_status_t status = f_string_dynamic_resize(length, &data);
-
- assert_int_equal(status, F_okay);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_string_dynamic_increase(length, &data);
-
- assert_int_equal(status, F_okay);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.string);
-}
-
-void test__f_string_dynamic_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_string_dynamic_t data = f_string_dynamic_t_initialize;
-
- {
- const f_status_t status = f_string_dynamic_resize(length, &data);
-
- assert_int_equal(status, F_okay);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_string_dynamic_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.string);
-}
-
-void test__f_string_dynamic_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_string_dynamic_t data = f_string_dynamic_t_initialize;
-
- {
- const f_status_t status = f_string_dynamic_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.string);
-}
-
-#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_string_dynamic_increase_h
-#define _TEST__F_string_dynamic_increase_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_dynamic_increase()
- */
-extern void test__f_string_dynamic_increase__works(void **state);
-
-/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
- *
- * @see f_string_dynamic_increase()
- */
-extern void test__f_string_dynamic_increase__returns_data_not(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_dynamic_increase()
- */
-extern void test__f_string_dynamic_increase__parameter_checking(void **state);
-
-#endif // _TEST__F_string_dynamic_increase_h
+++ /dev/null
-#include "test-string.h"
-#include "test-string-dynamic_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_dynamic_increase_by__works(void **state) {
-
- const int length = 5;
- f_string_dynamic_t data = f_string_dynamic_t_initialize;
-
- {
- const f_status_t status = f_string_dynamic_resize(length, &data);
-
- assert_int_equal(status, F_okay);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_string_dynamic_increase_by(length, &data);
-
- assert_int_equal(status, F_okay);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.string);
-}
-
-void test__f_string_dynamic_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_string_dynamic_t data = f_string_dynamic_t_initialize;
-
- {
- const f_status_t status = f_string_dynamic_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.string);
-}
-
-#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_string_dynamic_increase_by_h
-#define _TEST__F_string_dynamic_increase_by_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_dynamic_increase_by()
- */
-extern void test__f_string_dynamic_increase_by__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_dynamic_increase_by()
- */
-extern void test__f_string_dynamic_increase_by__parameter_checking(void **state);
-
-#endif // _TEST__F_string_dynamic_increase_by_h
+++ /dev/null
-#include "test-string.h"
-#include "test-string-dynamic_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_dynamic_resize__works(void **state) {
-
- const int length = 5;
- f_string_dynamic_t data = f_string_dynamic_t_initialize;
-
- {
- const f_status_t status = f_string_dynamic_resize(length, &data);
-
- assert_int_equal(status, F_okay);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.string);
-}
-
-void test__f_string_dynamic_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_string_dynamic_t data = f_string_dynamic_t_initialize;
-
- {
- const f_status_t status = f_string_dynamic_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.string);
-}
-
-#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_string_dynamic_resize_h
-#define _TEST__F_string_dynamic_resize_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_dynamic_resize()
- */
-extern void test__f_string_dynamic_resize__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_dynamic_resize()
- */
-extern void test__f_string_dynamic_resize__parameter_checking(void **state);
-
-#endif // _TEST__F_string_dynamic_resize_h
// Put some value in the unused section at the end so that it gets overridden.
{
- const f_status_t status = f_string_dynamic_resize(length, &data);
+ const f_status_t status = f_memory_array_resize(length, sizeof(f_char_t), (void **) &data.string, &data.used, &data.size);
assert_int_equal(status, F_okay);
// Ensure a NULL already exists so that the test can confirm that another NULL is not appended.
{
- const f_status_t status = f_string_dynamic_resize(length, &data);
+ const f_status_t status = f_memory_array_resize(length, sizeof(f_char_t), (void **) &data.string, &data.used, &data.size);
assert_int_equal(status, F_okay);
// Put some value in the unused section at the end so that it gets overridden.
{
- const f_status_t status = f_string_dynamic_resize(length, &data);
+ const f_status_t status = f_memory_array_resize(length, sizeof(f_char_t), (void **) &data.string, &data.used, &data.size);
assert_int_equal(status, F_okay);
// Ensure a NULL already exists so that the test can confirm that another NULL is not appended.
{
- const f_status_t status = f_string_dynamic_resize(length, &data);
+ const f_status_t status = f_memory_array_resize(length, sizeof(f_char_t), (void **) &data.string, &data.used, &data.size);
assert_int_equal(status, F_okay);
assert_in_range(data.size, length, length + F_memory_default_allocation_small_d);
+++ /dev/null
-#include "test-string.h"
-#include "test-string-dynamics_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_dynamics_adjust__works(void **state) {
-
- const int length = 5;
- f_string_dynamics_t data = f_string_dynamics_t_initialize;
-
- {
- const f_status_t status = f_string_dynamics_adjust(length, &data);
-
- assert_int_equal(status, F_okay);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_string_dynamics_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_string_dynamics_t data = f_string_dynamics_t_initialize;
-
- {
- const f_status_t status = f_string_dynamics_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#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_string__string_dynamics_adjust
-#define _TEST__F_string__string_dynamics_adjust
-
-/**
- * Test that the function works.
- *
- * @see f_string_dynamics_adjust()
- */
-extern void test__f_string_dynamics_adjust__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_dynamics_adjust()
- */
-extern void test__f_string_dynamics_adjust__parameter_checking(void **state);
-
-#endif // _TEST__F_string__string_dynamics_adjust
};
{
- f_status_t status = f_string_dynamics_resize(length_inner, &source);
+ f_status_t status = f_memory_arrays_resize(length_inner, sizeof(f_string_dynamic_t), (void **) &source.array, &source.used, &source.size, &f_string_dynamics_delete_callback);
assert_int_equal(status, F_okay);
assert_int_equal(source.size, length_inner);
f_string_dynamics_t destination = f_string_dynamics_t_initialize;
{
- const f_status_t status = f_string_dynamics_resize(length, &source);
+ const f_status_t status = f_memory_arrays_resize(length, sizeof(f_string_dynamic_t), (void **) &source.array, &source.used, &source.size, &f_string_dynamics_delete_callback);
assert_int_equal(status, F_okay);
assert_int_equal(source.used, 0);
+++ /dev/null
-#include "test-string.h"
-#include "test-string-dynamics_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_dynamics_decimate_by__works(void **state) {
-
- const int length = 5;
- f_string_dynamics_t data = f_string_dynamics_t_initialize;
-
- {
- const f_status_t status = f_string_dynamics_resize(length, &data);
-
- assert_int_equal(status, F_okay);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_string_dynamics_decimate_by(length, &data);
-
- assert_int_equal(status, F_okay);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_string_dynamics_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_string_dynamics_t data = f_string_dynamics_t_initialize;
-
- {
- const f_status_t status = f_string_dynamics_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#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_dynamics_decimate_by_h
-#define _TEST__F_dynamics_decimate_by_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_dynamics_decimate_by()
- */
-extern void test__f_string_dynamics_decimate_by__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_dynamics_decimate_by()
- */
-extern void test__f_string_dynamics_decimate_by__parameter_checking(void **state);
-
-#endif // _TEST__F_dynamics_decimate_by_h
+++ /dev/null
-#include "test-string.h"
-#include "test-string-dynamics_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_dynamics_decrease_by__works(void **state) {
-
- const int length = 5;
- f_string_dynamics_t data = f_string_dynamics_t_initialize;
-
- {
- const f_status_t status = f_string_dynamics_resize(length, &data);
-
- assert_int_equal(status, F_okay);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_string_dynamics_decrease_by(length, &data);
-
- assert_int_equal(status, F_okay);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_string_dynamics_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_string_dynamics_t data = f_string_dynamics_t_initialize;
-
- {
- const f_status_t status = f_string_dynamics_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#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_string_dynamics_decrease_by_h
-#define _TEST__F_string_dynamics_decrease_by_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_dynamics_decrease_by()
- */
-extern void test__f_string_dynamics_decrease_by__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_dynamics_decrease_by()
- */
-extern void test__f_string_dynamics_decrease_by__parameter_checking(void **state);
-
-#endif // _TEST__F_string_dynamics_decrease_by_h
+++ /dev/null
-#include "test-string.h"
-#include "test-string-dynamics_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_dynamics_increase__works(void **state) {
-
- const int length = 5;
- f_string_dynamics_t data = f_string_dynamics_t_initialize;
-
- {
- const f_status_t status = f_string_dynamics_resize(length, &data);
-
- assert_int_equal(status, F_okay);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_string_dynamics_increase(length, &data);
-
- assert_int_equal(status, F_okay);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.array);
-}
-
-void test__f_string_dynamics_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_string_dynamics_t data = f_string_dynamics_t_initialize;
-
- {
- const f_status_t status = f_string_dynamics_resize(length, &data);
-
- assert_int_equal(status, F_okay);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_string_dynamics_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_string_dynamics_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_string_dynamics_t data = f_string_dynamics_t_initialize;
-
- {
- const f_status_t status = f_string_dynamics_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.array);
-}
-
-#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_string_dynamics_increase_h
-#define _TEST__F_string_dynamics_increase_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_dynamics_increase()
- */
-extern void test__f_string_dynamics_increase__works(void **state);
-
-/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
- *
- * @see f_string_dynamics_increase()
- */
-extern void test__f_string_dynamics_increase__returns_data_not(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_dynamics_increase()
- */
-extern void test__f_string_dynamics_increase__parameter_checking(void **state);
-
-#endif // _TEST__F_string_dynamics_increase_h
+++ /dev/null
-#include "test-string.h"
-#include "test-string-dynamics_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_dynamics_increase_by__works(void **state) {
-
- const int length = 5;
- f_string_dynamics_t data = f_string_dynamics_t_initialize;
-
- {
- const f_status_t status = f_string_dynamics_resize(length, &data);
-
- assert_int_equal(status, F_okay);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_string_dynamics_increase_by(length, &data);
-
- assert_int_equal(status, F_okay);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.array);
-}
-
-void test__f_string_dynamics_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_string_dynamics_t data = f_string_dynamics_t_initialize;
-
- {
- const f_status_t status = f_string_dynamics_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /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_string_dynamics_increase_by_h
-#define _TEST__F_string_dynamics_increase_by_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_dynamics_increase_by()
- */
-extern void test__f_string_dynamics_increase_by__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_dynamics_increase_by()
- */
-extern void test__f_string_dynamics_increase_by__parameter_checking(void **state);
-
-#endif // _TEST__F_string_dynamics_increase_by_h
+++ /dev/null
-#include "test-string.h"
-#include "test-string-dynamics_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_dynamics_resize__works(void **state) {
-
- const int length = 5;
- f_string_dynamics_t data = f_string_dynamics_t_initialize;
-
- {
- const f_status_t status = f_string_dynamics_resize(length, &data);
-
- assert_int_equal(status, F_okay);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_string_dynamics_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_string_dynamics_t data = f_string_dynamics_t_initialize;
-
- {
- const f_status_t status = f_string_dynamics_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#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_string_dynamics_resize_h
-#define _TEST__F_string_dynamics_resize_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_dynamics_resize()
- */
-extern void test__f_string_dynamics_resize__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_dynamics_resize()
- */
-extern void test__f_string_dynamics_resize__parameter_checking(void **state);
-
-#endif // _TEST__F_string_dynamics_resize_h
+++ /dev/null
-#include "test-string.h"
-#include "test-string-dynamicss_adjust.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_dynamicss_adjust__works(void **state) {
-
- const int length = 5;
- f_string_dynamicss_t data = f_string_dynamicss_t_initialize;
-
- {
- const f_status_t status = f_string_dynamicss_adjust(length, &data);
-
- assert_int_equal(status, F_okay);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_string_dynamicss_adjust__parameter_checking(void **state) {
-
- const int length = 5;
- f_string_dynamicss_t data = f_string_dynamicss_t_initialize;
-
- {
- const f_status_t status = f_string_dynamicss_adjust(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#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_string_dynamicss_adjust_h
-#define _TEST__F_string_dynamicss_adjust_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_dynamicss_adjust()
- */
-extern void test__f_string_dynamicss_adjust__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_dynamicss_adjust()
- */
-extern void test__f_string_dynamicss_adjust__parameter_checking(void **state);
-
-#endif // _TEST__F_string_dynamicss_adjust_h
};
{
- f_status_t status = f_string_dynamics_resize(length_inner, &source);
+ f_status_t status = f_memory_arrays_resize(length_inner, sizeof(f_string_dynamic_t), (void **) &source.array, &source.used, &source.size, &f_string_dynamics_delete_callback);
assert_int_equal(status, F_okay);
assert_int_equal(source.size, length_inner);
f_string_dynamicss_t destination = f_string_dynamicss_t_initialize;
{
- const f_status_t status = f_string_dynamics_resize(length, &source);
+ const f_status_t status = f_memory_arrays_resize(length, sizeof(f_string_dynamic_t), (void **) &source.array, &source.used, &source.size, &f_string_dynamics_delete_callback);
assert_int_equal(status, F_okay);
assert_int_equal(source.used, 0);
};
{
- f_status_t status = f_string_dynamicss_resize(length_outer, &source);
+ f_status_t status = f_memory_arrays_resize(length_inner, sizeof(f_string_dynamics_t), (void **) &source.array, &source.used, &source.size, &f_string_dynamicss_delete_callback);
assert_int_equal(status, F_okay);
assert_int_equal(source.used, 0);
for (; source.used < length_outer; ++source.used) {
- status = f_string_dynamics_resize(length_inner, &source.array[source.used]);
+ status = f_memory_arrays_resize(length_inner, sizeof(f_string_dynamic_t), (void **) &source.array[source.used].array, &source.array[source.used].used, &source.array[source.used].size, &f_string_dynamics_delete_callback);
assert_int_equal(status, F_okay);
assert_int_equal(source.array[source.used].used, 0);
f_string_dynamicss_t destination = f_string_dynamicss_t_initialize;
{
- const f_status_t status = f_string_dynamicss_resize(length, &source);
+ const f_status_t status = f_memory_arrays_resize(length, sizeof(f_string_dynamics_t), (void **) &source.array, &source.used, &source.size, &f_string_dynamicss_delete_callback);
assert_int_equal(status, F_okay);
assert_int_equal(source.used, 0);
+++ /dev/null
-#include "test-string.h"
-#include "test-string-dynamicss_decimate_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_dynamicss_decimate_by__works(void **state) {
-
- const int length = 5;
- f_string_dynamicss_t data = f_string_dynamics_t_initialize;
-
- {
- const f_status_t status = f_string_dynamicss_resize(length, &data);
-
- assert_int_equal(status, F_okay);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_string_dynamicss_decimate_by(length, &data);
-
- assert_int_equal(status, F_okay);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_string_dynamicss_decimate_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_string_dynamicss_t data = f_string_dynamics_t_initialize;
-
- {
- const f_status_t status = f_string_dynamicss_decimate_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#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_string_dynamicss_decimate_by_h
-#define _TEST__F_string_dynamicss_decimate_by_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_dynamicss_decimate_by()
- */
-extern void test__f_string_dynamicss_decimate_by__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_dynamicss_decimate_by()
- */
-extern void test__f_string_dynamicss_decimate_by__parameter_checking(void **state);
-
-#endif // _TEST__F_string_dynamicss_decimate_by_h
+++ /dev/null
-#include "test-string.h"
-#include "test-string-dynamicss_decrease_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_dynamicss_decrease_by__works(void **state) {
-
- const int length = 5;
- f_string_dynamicss_t data = f_string_dynamics_t_initialize;
-
- {
- const f_status_t status = f_string_dynamicss_resize(length, &data);
-
- assert_int_equal(status, F_okay);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_string_dynamicss_decrease_by(length, &data);
-
- assert_int_equal(status, F_okay);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-void test__f_string_dynamicss_decrease_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_string_dynamicss_t data = f_string_dynamics_t_initialize;
-
- {
- const f_status_t status = f_string_dynamicss_decrease_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#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_string_dynamicss_decrease_by_h
-#define _TEST__F_string_dynamicss_decrease_by_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_dynamicss_decrease_by()
- */
-extern void test__f_string_dynamicss_decrease_by__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_dynamicss_decrease_by()
- */
-extern void test__f_string_dynamicss_decrease_by__parameter_checking(void **state);
-
-#endif // _TEST__F_string_dynamicss_decrease_by_h
+++ /dev/null
-#include "test-string.h"
-#include "test-string-dynamicss_increase.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_dynamicss_increase__works(void **state) {
-
- const int length = 5;
- f_string_dynamicss_t data = f_string_dynamics_t_initialize;
-
- {
- const f_status_t status = f_string_dynamicss_resize(length, &data);
-
- assert_int_equal(status, F_okay);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_string_dynamicss_increase(length, &data);
-
- assert_int_equal(status, F_okay);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
- }
-
- free((void *) data.array);
-}
-
-void test__f_string_dynamicss_increase__returns_data_not(void **state) {
-
- const int length = 5;
- f_string_dynamicss_t data = f_string_dynamics_t_initialize;
-
- {
- const f_status_t status = f_string_dynamicss_resize(length, &data);
-
- assert_int_equal(status, F_okay);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_string_dynamicss_increase(length, &data);
-
- assert_int_equal(status, F_data_not);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_string_dynamicss_increase__parameter_checking(void **state) {
-
- const int length = 5;
- f_string_dynamicss_t data = f_string_dynamics_t_initialize;
-
- {
- const f_status_t status = f_string_dynamicss_increase(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- free((void *) data.array);
-}
-
-#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_string_dynamicss_increase_h
-#define _TEST__F_string_dynamicss_increase_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_dynamicss_increase()
- */
-extern void test__f_string_dynamicss_increase__works(void **state);
-
-/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
- *
- * @see f_string_dynamicss_increase()
- */
-extern void test__f_string_dynamicss_increase__returns_data_not(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_dynamicss_increase()
- */
-extern void test__f_string_dynamicss_increase__parameter_checking(void **state);
-
-#endif // _TEST__F_string_dynamicss_increase_h
+++ /dev/null
-#include "test-string.h"
-#include "test-string-dynamicss_increase_by.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_dynamicss_increase_by__works(void **state) {
-
- const int length = 5;
- f_string_dynamicss_t data = f_string_dynamics_t_initialize;
-
- {
- const f_status_t status = f_string_dynamicss_resize(length, &data);
-
- assert_int_equal(status, F_okay);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_string_dynamicss_increase_by(length, &data);
-
- assert_int_equal(status, F_okay);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
- }
-
- free((void *) data.array);
-}
-
-void test__f_string_dynamicss_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_string_dynamicss_t data = f_string_dynamics_t_initialize;
-
- {
- const f_status_t status = f_string_dynamicss_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /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_string_dynamicss_increase_by_h
-#define _TEST__F_string_dynamicss_increase_by_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_dynamicss_increase_by()
- */
-extern void test__f_string_dynamicss_increase_by__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_dynamicss_increase_by()
- */
-extern void test__f_string_dynamicss_increase_by__parameter_checking(void **state);
-
-#endif // _TEST__F_string_dynamicss_increase_by_h
+++ /dev/null
-#include "test-string.h"
-#include "test-string-dynamicss_resize.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_dynamicss_resize__works(void **state) {
-
- const int length = 5;
- f_string_dynamicss_t data = f_string_dynamicss_t_initialize;
-
- {
- const f_status_t status = f_string_dynamicss_resize(length, &data);
-
- assert_int_equal(status, F_okay);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- free((void *) data.array);
-}
-
-void test__f_string_dynamicss_resize__parameter_checking(void **state) {
-
- const int length = 5;
- f_string_dynamicss_t data = f_string_dynamicss_t_initialize;
-
- {
- const f_status_t status = f_string_dynamicss_resize(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
-#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_string_dynamicss_resize_h
-#define _TEST__F_string_dynamicss_resize_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_dynamicss_resize()
- */
-extern void test__f_string_dynamicss_resize__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_dynamicss_resize()
- */
-extern void test__f_string_dynamicss_resize__parameter_checking(void **state);
-
-#endif // _TEST__F_string_dynamicss_resize_h
cmocka_unit_test(test__f_string_append_assure_nulless__works),
cmocka_unit_test(test__f_string_append_nulless__works),
- cmocka_unit_test(test__f_string_dynamic_adjust__works),
-
cmocka_unit_test(test__f_string_dynamic_append__works),
cmocka_unit_test(test__f_string_dynamic_append_assure__works),
cmocka_unit_test(test__f_string_dynamic_append_assure_nulless__works),
cmocka_unit_test(test__f_string_dynamic_append_nulless__works),
- cmocka_unit_test(test__f_string_dynamic_decimate_by__works),
- cmocka_unit_test(test__f_string_dynamic_decrease_by__works),
- cmocka_unit_test(test__f_string_dynamic_increase__works),
- cmocka_unit_test(test__f_string_dynamic_increase__returns_data_not),
- cmocka_unit_test(test__f_string_dynamic_increase_by__works),
-
cmocka_unit_test(test__f_string_dynamic_mash__works),
cmocka_unit_test(test__f_string_dynamic_mash_nulless__works),
cmocka_unit_test(test__f_string_dynamic_prepend_assure_nulless__works),
cmocka_unit_test(test__f_string_dynamic_prepend_nulless__works),
- cmocka_unit_test(test__f_string_dynamic_resize__works),
-
cmocka_unit_test(test__f_string_dynamic_seek_line__returns_data_not_stop),
cmocka_unit_test(test__f_string_dynamic_seek_line__returns_none_eos),
cmocka_unit_test(test__f_string_dynamic_seek_line__returns_none_stop),
cmocka_unit_test(test__f_string_dynamic_terminate_after__appends_null),
cmocka_unit_test(test__f_string_dynamic_terminate_after__doesnt_append_null),
- cmocka_unit_test(test__f_string_dynamics_adjust__works),
cmocka_unit_test(test__f_string_dynamics_append__works),
cmocka_unit_test(test__f_string_dynamics_append_all__works),
cmocka_unit_test(test__f_string_dynamics_append_all__returns_data_not),
- cmocka_unit_test(test__f_string_dynamics_decimate_by__works),
- cmocka_unit_test(test__f_string_dynamics_decrease_by__works),
- cmocka_unit_test(test__f_string_dynamics_increase__works),
- cmocka_unit_test(test__f_string_dynamics_increase__returns_data_not),
- cmocka_unit_test(test__f_string_dynamics_increase_by__works),
- cmocka_unit_test(test__f_string_dynamics_resize__works),
-
- cmocka_unit_test(test__f_string_dynamicss_adjust__works),
+
cmocka_unit_test(test__f_string_dynamicss_append__works),
cmocka_unit_test(test__f_string_dynamicss_append__returns_data_not),
cmocka_unit_test(test__f_string_dynamicss_append_all__works),
cmocka_unit_test(test__f_string_dynamicss_append_all__returns_data_not),
- cmocka_unit_test(test__f_string_dynamicss_decimate_by__works),
- cmocka_unit_test(test__f_string_dynamicss_decrease_by__works),
- cmocka_unit_test(test__f_string_dynamicss_increase__works),
- cmocka_unit_test(test__f_string_dynamicss_increase__returns_data_not),
- cmocka_unit_test(test__f_string_dynamicss_increase_by__works),
- cmocka_unit_test(test__f_string_dynamicss_resize__works),
cmocka_unit_test(test__f_string_map_multis_adjust__works),
cmocka_unit_test(test__f_string_map_multis_append__works),
cmocka_unit_test(test__f_string_append_assure_nulless__parameter_checking),
cmocka_unit_test(test__f_string_append_nulless__parameter_checking),
- cmocka_unit_test(test__f_string_dynamic_adjust__parameter_checking),
-
cmocka_unit_test(test__f_string_dynamic_append__parameter_checking),
cmocka_unit_test(test__f_string_dynamic_append_assure__parameter_checking),
cmocka_unit_test(test__f_string_dynamic_append_assure_nulless__parameter_checking),
cmocka_unit_test(test__f_string_dynamic_append_nulless__parameter_checking),
- cmocka_unit_test(test__f_string_dynamic_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_string_dynamic_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_string_dynamic_increase__parameter_checking),
- cmocka_unit_test(test__f_string_dynamic_increase__returns_data_not),
- cmocka_unit_test(test__f_string_dynamic_increase_by__parameter_checking),
-
cmocka_unit_test(test__f_string_dynamic_mash__parameter_checking),
cmocka_unit_test(test__f_string_dynamic_mash_nulless__parameter_checking),
cmocka_unit_test(test__f_string_dynamic_prepend_assure_nulless__parameter_checking),
cmocka_unit_test(test__f_string_dynamic_prepend_nulless__parameter_checking),
- cmocka_unit_test(test__f_string_dynamic_resize__parameter_checking),
-
cmocka_unit_test(test__f_string_dynamic_seek_line__parameter_checking),
cmocka_unit_test(test__f_string_dynamic_seek_line_to__parameter_checking),
cmocka_unit_test(test__f_string_dynamic_seek_to__parameter_checking),
cmocka_unit_test(test__f_string_dynamic_terminate__parameter_checking),
cmocka_unit_test(test__f_string_dynamic_terminate_after__parameter_checking),
- cmocka_unit_test(test__f_string_dynamics_adjust__parameter_checking),
cmocka_unit_test(test__f_string_dynamics_append__parameter_checking),
cmocka_unit_test(test__f_string_dynamics_append_all__parameter_checking),
- cmocka_unit_test(test__f_string_dynamics_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_string_dynamics_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_string_dynamics_increase__parameter_checking),
- cmocka_unit_test(test__f_string_dynamics_increase_by__parameter_checking),
- cmocka_unit_test(test__f_string_dynamics_resize__parameter_checking),
- cmocka_unit_test(test__f_string_dynamicss_adjust__parameter_checking),
cmocka_unit_test(test__f_string_dynamicss_append__parameter_checking),
cmocka_unit_test(test__f_string_dynamicss_append_all__parameter_checking),
- cmocka_unit_test(test__f_string_dynamicss_decimate_by__parameter_checking),
- cmocka_unit_test(test__f_string_dynamicss_decrease_by__parameter_checking),
- cmocka_unit_test(test__f_string_dynamicss_increase__parameter_checking),
- cmocka_unit_test(test__f_string_dynamicss_increase_by__parameter_checking),
- cmocka_unit_test(test__f_string_dynamicss_resize__parameter_checking),
cmocka_unit_test(test__f_string_map_multis_adjust__parameter_checking),
cmocka_unit_test(test__f_string_map_multis_append__parameter_checking),
#include "test-string-append_assure.h"
#include "test-string-append_assure_nulless.h"
#include "test-string-append_nulless.h"
-#include "test-string-dynamic_adjust.h"
#include "test-string-dynamic_append.h"
#include "test-string-dynamic_append_assure.h"
#include "test-string-dynamic_append_assure_nulless.h"
#include "test-string-dynamic_append_nulless.h"
-#include "test-string-dynamic_decimate_by.h"
-#include "test-string-dynamic_decrease_by.h"
-#include "test-string-dynamic_increase.h"
-#include "test-string-dynamic_increase_by.h"
#include "test-string-dynamic_mash.h"
#include "test-string-dynamic_mash_nulless.h"
#include "test-string-dynamic_mish.h"
#include "test-string-dynamic_prepend_assure.h"
#include "test-string-dynamic_prepend_assure_nulless.h"
#include "test-string-dynamic_prepend_nulless.h"
-#include "test-string-dynamic_resize.h"
#include "test-string-dynamic_seek_line.h"
#include "test-string-dynamic_seek_line_to.h"
#include "test-string-dynamic_seek_to.h"
#include "test-string-dynamic_terminate.h"
#include "test-string-dynamic_terminate_after.h"
-#include "test-string-dynamics_adjust.h"
#include "test-string-dynamics_append.h"
#include "test-string-dynamics_append_all.h"
-#include "test-string-dynamics_decimate_by.h"
-#include "test-string-dynamics_decrease_by.h"
-#include "test-string-dynamics_increase.h"
-#include "test-string-dynamics_increase_by.h"
-#include "test-string-dynamics_resize.h"
-#include "test-string-dynamicss_adjust.h"
#include "test-string-dynamicss_append.h"
#include "test-string-dynamicss_append_all.h"
-#include "test-string-dynamicss_decimate_by.h"
-#include "test-string-dynamicss_decrease_by.h"
-#include "test-string-dynamicss_increase.h"
-#include "test-string-dynamicss_increase_by.h"
-#include "test-string-dynamicss_resize.h"
#include "test-string-map_multis_adjust.h"
#include "test-string-map_multis_append.h"
#include "test-string-map_multis_append_all.h"
}
} // for
- f_string_dynamic_resize(0, &path);
+ free((void *) path.string);
}
void test__fll_path_canonical__empty_becomes_pwd(void **state) {
assert_string_equal(pwd, path.string);
} // for
- f_string_dynamic_resize(0, &path);
+ free((void *) path.string);
}
void test__fll_path_canonical__present_paths(void **state) {
assert_string_equal(prepended.string, path.string);
} // for
- f_string_dynamic_resize(0, &path);
+ free((void *) path.string);
}
void test__fll_path_canonical__root_paths(void **state) {
assert_string_equal(expected[i].string, path.string);
} // for
- f_string_dynamic_resize(0, &path);
+ free((void *) path.string);
}
void test__fll_path_canonical__tilde_remains(void **state) {
}
} // for
- f_string_dynamic_resize(0, &path);
+ free((void *) path.string);
}
void test__fll_path_canonical__parameter_checking(void **state) {
f_console_parameters_delete(&main->program.parameters);
- macro_f_color_context_t_delete_simple(main->program.context);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &main->program.reset.string, &main->program.reset.used, &main->program.reset.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &main->program.error.string, &main->program.error.used, &main->program.error.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &main->program.important.string, &main->program.important.used, &main->program.important.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &main->program.normal.string, &main->program.normal.used, &main->program.normal.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &main->program.normal_reset.string, &main->program.normal_reset.used, &main->program.normal_reset.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &main->program.notable.string, &main->program.notable.used, &main->program.notable.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &main->program.standout.string, &main->program.standout.used, &main->program.standout.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &main->program.success.string, &main->program.success.used, &main->program.success.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &main->program.title.string, &main->program.title.used, &main->program.title.size);
+ f_memory_array_resize(, sizeof(f_char_t), (void **) &main->program.warning.string, &main->program.warning.used, &main->program.warning.size0);
f_memory_array_resize(0, sizeof(f_char_t), (void **) &main->program.path_pid.string, &main->program.path_pid.used, &main->program.path_pid.size);
f_memory_array_resize(0, sizeof(f_char_t), (void **) &main->program.path_setting.string, &main->program.path_setting.used, &main->program.path_setting.size);
f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &rule->engine_arguments.array, &rule->engine_arguments.used, &rule->engine_arguments.size, &f_string_dynamics_delete_callback);
f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &rule->environment.array, &rule->environment.used, &rule->environment.size, &f_string_dynamics_delete_callback);
- macro_f_int32s_t_delete_simple(rule->affinity)
- macro_f_control_group_t_delete_simple(rule->cgroup)
- macro_f_int32s_t_delete_simple(rule->groups)
- macro_f_limit_sets_t_delete_simple(rule->limits)
+ f_memory_array_resize(0, sizeof(int32_t), (void **) &rule->affinity.array, &rule->affinity.used, &rule->affinity.size);
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &rule->cgroup.path.string, &rule->cgroup.path.used, &rule->cgroup.path.size);
+ f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &rule->cgroup.groups.array, &rule->cgroup.groups.used, &rule->cgroup.groups.size, &f_string_dynamics_delete_callback);
+ f_memory_array_resize(0, sizeof(int32_t), (void **) &rule->groups.array, &rule->groups.used, &rule->groups.size);
+ f_memory_array_resize(0, sizeof(f_limit_set_t), (void **) &rule->limits.array, &rule->limits.used, &rule->limits.size);
if (rule->capability) {
f_capability_delete(&rule->capability);
* @param rule
* The rule to deallocate.
*
- * @see macro_f_control_group_t_delete_simple()
- * @see macro_f_int32s_t_delete_simple()
- * @see macro_f_limit_sets_t_delete_simple()
- * @see macro_f_string_dynamics_t_delete_simple()
- * @see macro_f_string_maps_t_delete_simple()
- * @see macro_f_thread_condition_t_delete_simple()
- * @see macro_f_thread_mutex_t_delete_simple()
- *
* @see controller_rule_items_delete_simple()
* @see f_capability_delete()
* @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
*/
#ifndef _di_controller_rule_delete_simple_
extern void controller_rule_delete_simple(controller_rule_t * const rule) F_attribute_visibility_internal_d;
f_status_t controller_rule_copy(const controller_rule_t source, controller_rule_t *destination) {
// Delete the third party structures.
- macro_f_control_group_t_delete_simple(destination->cgroup)
+ f_memory_array_resize(0, sizeof(f_char_t), (void **) &destination->cgroup.path.string, &destination->cgroup.path.used, &destination->cgroup.path.size);
+ f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &destination->cgroup.groups.array, &destination->cgroup.groups.used, &destination->cgroup.groups.size, &f_string_dynamics_delete_callback);
+
f_capability_delete(&destination->capability);
f_number_unsigned_t i = 0;
* F_okay on success.
*
* Errors (with error bit) from: f_file_link()
- * Errors (with error bit) from: f_string_dynamics_resize()
* Errors (with error bit) from: fll_execute_arguments_add()
*
* Errors (with error bit) from: fake_execute()
* This generally is only needed when F_child is returned, where this holds the return status of the child process.
*
* @see f_file_link()
- * @see f_string_dynamics_resize()
* @see fll_execute_arguments_add()
*
* @see fake_execute()
* Errors (with error bit) from: f_fss_apply_delimit().
* Errors (with error bit) from: f_string_dynamic_append().
* Errors (with error bit) from: f_string_dynamic_partial_append().
- * Errors (with error bit) from: f_string_dynamics_resize().
* Errors (with error bit) from: f_string_map_multis_resize().
* Errors (with error bit) from: fll_fss_basic_list_read().
* Errors (with error bit) from: fll_fss_extended_read().
* @see f_fss_apply_delimit()
* @see f_string_dynamic_append()
* @see f_string_dynamic_partial_append()
- * @see f_string_dynamics_resize()
* @see f_string_map_multis_resize()
* @see fll_fss_basic_list_read()
* @see fll_fss_extended_read()
* F_failure (with error bit) on any error.
*
* Errors (with error bit) from: f_memory_array_resize()
- * Errors (with error bit) from: f_string_dynamics_resize()
* Errors (with error bit) from: f_string_map_multis_resize()
*
* @see f_memory_array_resize()
- * @see f_string_dynamics_resize()
* @see f_string_map_multis_resize()
*/
#ifndef _di_fake_make_operate_process_type_parameter_
#ifndef _di_firewall_data_delete_
f_status_t firewall_data_delete(firewall_data_t * const data) {
- f_string_dynamics_resize(0, &data->chains);
- f_string_dynamics_resize(0, &data->devices);
+ f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &data->chains.string, &data->chains.used, &data->chains.size, &f_string_dynamics_delete_callback);
+ f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &data->devices.string, &data->devices.used, &data->devices.size, &f_string_dynamics_delete_callback);
return F_okay;
}
f_memory_array_resize(0, sizeof(f_char_t), (void **) &device.string, &device.used, &device.size);
f_memory_array_resize(0, sizeof(f_char_t), (void **) &protocol.string, &protocol.used, &protocol.size);
- f_string_dynamics_resize(0, &arguments);
+ f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &arguments.string, &arguments.used, &arguments.size, &f_string_dynamics_delete_callback);
return F_status_set_error(F_interrupt);
}
f_memory_array_resize(0, sizeof(f_char_t), (void **) &device.string, &device.used, &device.size);
f_memory_array_resize(0, sizeof(f_char_t), (void **) &protocol.string, &protocol.used, &protocol.size);
- f_string_dynamics_resize(0, &arguments);
+ f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &arguments.string, &arguments.used, &arguments.size, &f_string_dynamics_delete_callback);
data->main->child = return_code;
f_memory_array_resize(0, sizeof(f_char_t), (void **) &device.string, &device.used, &device.size);
f_memory_array_resize(0, sizeof(f_char_t), (void **) &protocol.string, &protocol.used, &protocol.size);
- f_string_dynamics_resize(0, &arguments);
+ f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &arguments.string, &arguments.used, &arguments.size, &f_string_dynamics_delete_callback);
data->main->child = return_code;
f_memory_array_resize(0, sizeof(f_char_t), (void **) &device.string, &device.used, &device.size);
f_memory_array_resize(0, sizeof(f_char_t), (void **) &protocol.string, &protocol.used, &protocol.size);
- f_string_dynamics_resize(0, &arguments);
+ f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &arguments.string, &arguments.used, &arguments.size, &f_string_dynamics_delete_callback);
return status;
}
local->chain_ids.used = local->chain_objects.used;
- status = f_string_dynamics_resize(2, &arguments);
+ status = f_memory_arrays_resize(2, sizeof(f_string_dynamic_t), (void **) &arguments.string, &arguments.used, &arguments.size, &f_string_dynamics_delete_callback);
if (F_status_is_error(status)) return status;
status = f_memory_array_increase_by(local->chain_objects.used, sizeof(f_number_unsigned_t), (void **) &local->chain_ids.array, &local->chain_ids.used, &local->chain_ids.size);
status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_char_t), (void **) &arguments.array[1].string, &arguments.array[1].used, &arguments.array[1].size);
}
else {
- f_string_dynamics_resize(0, &arguments);
+ f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &arguments.string, &arguments.used, &arguments.size, &f_string_dynamics_delete_callback);
return status;
}
}
} // for
- f_string_dynamics_resize(0, &arguments);
+ f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &arguments.string, &arguments.used, &arguments.size, &f_string_dynamics_delete_callback);
return status;
}
*
* Errors (with error bit) from: f_console_parameter_process().
* Errors (with error bit) from: f_file_stream_open().
- * Errors (with error bit) from: f_string_dynamics_resize().
* Errors (with error bit) from: fll_program_parameter_process_context().
* Errors (with error bit) from: fll_program_parameter_process_verbosity_standard().
*
*
* @see f_console_parameter_process()
* @see f_file_stream_open()
- * @see f_string_dynamics_resize()
* @see fll_program_parameter_process_context()
* @see fll_program_parameter_process_verbosity_standard()
*
*
* Errors (with error bit) from: f_console_parameter_process().
* Errors (with error bit) from: f_file_stream_open().
- * Errors (with error bit) from: f_string_dynamics_resize().
* Errors (with error bit) from: fll_program_parameter_process_context().
* Errors (with error bit) from: fll_program_parameter_process_verbosity_standard().
*
* @see f_console_parameter_process()
* @see f_file_stream_open()
- * @see f_string_dynamics_resize()
* @see fll_program_parameter_process_context()
* @see fll_program_parameter_process_verbosity_standard()
*
*
* Errors (with error bit) from: f_console_parameter_process().
* Errors (with error bit) from: f_file_stream_open().
- * Errors (with error bit) from: f_string_dynamics_resize().
* Errors (with error bit) from: fll_program_parameter_process_context().
* Errors (with error bit) from: fll_program_parameter_process_verbosity_standard().
* @param callback
*
* @see f_console_parameter_process()
* @see f_file_stream_open()
- * @see f_string_dynamics_resize()
* @see fll_program_parameter_process_context()
* @see fll_program_parameter_process_verbosity_standard()
*/
*
* Errors (with error bit) from: f_console_parameter_process().
* Errors (with error bit) from: f_file_stream_open().
- * Errors (with error bit) from: f_string_dynamics_resize().
* Errors (with error bit) from: fll_program_parameter_process_context().
* Errors (with error bit) from: fll_program_parameter_process_verbosity_standard().
*
* @see f_console_parameter_process()
* @see f_file_stream_open()
- * @see f_string_dynamics_resize()
* @see fll_program_parameter_process_context()
* @see fll_program_parameter_process_verbosity_standard()
*
*
* Errors (with error bit) from: f_console_parameter_process().
* Errors (with error bit) from: f_file_stream_open().
- * Errors (with error bit) from: f_string_dynamics_resize().
* Errors (with error bit) from: fll_program_parameter_process_context().
* Errors (with error bit) from: fll_program_parameter_process_verbosity_standard().
*
* @see f_console_parameter_process()
* @see f_file_stream_open()
- * @see f_string_dynamics_resize()
* @see fll_program_parameter_process_context()
* @see fll_program_parameter_process_verbosity_standard()
*/