Instantiate it as a pointer instead given that it is possible in this case.
Use F_type_output_d instead of "stdout".
will_return(__wrap_fwrite_unlocked, true);
will_return(__wrap_fwrite_unlocked, 0);
- const f_status_t status = f_conversion_number_signed_print(1, data, stdout);
+ const f_status_t status = f_conversion_number_signed_print(1, data, F_type_output_d);
assert_int_equal(F_status_set_fine(status), F_output);
}
will_return(__wrap_fwrite_unlocked, true);
will_return(__wrap_fwrite_unlocked, 0);
- const f_status_t status = f_conversion_number_signed_print(1, data, stdout);
+ const f_status_t status = f_conversion_number_signed_print(1, data, F_type_output_d);
assert_int_equal(F_status_set_fine(status), F_output);
}
will_return(__wrap_fwrite_unlocked, true);
will_return(__wrap_fwrite_unlocked, 0);
- const f_status_t status = f_conversion_number_signed_print(0, data, stdout);
+ const f_status_t status = f_conversion_number_signed_print(0, data, F_type_output_d);
assert_int_equal(F_status_set_fine(status), F_output);
}
}
{
- FILE file;
+ FILE *file = 0;
const f_conversion_data_t data = macro_f_conversion_data_t_initialize(1, 0, 0);
- const f_status_t status = f_conversion_number_signed_print(0, data, &file);
+ const f_status_t status = f_conversion_number_signed_print(0, data, file);
assert_int_equal(F_status_set_fine(status), F_parameter);
}
{
const f_conversion_data_t data = macro_f_conversion_data_t_initialize(10, 0, 0);
- const f_status_t status = f_conversion_number_signed_print(1, data, stdout);
+ const f_status_t status = f_conversion_number_signed_print(1, data, F_type_output_d);
will_return(__wrap_fwrite_unlocked, false);
will_return(__wrap_fwrite_unlocked, true);
will_return(__wrap_fwrite_unlocked, 0);
- const f_status_t status = f_conversion_number_unsigned_print(1, data, stdout);
+ const f_status_t status = f_conversion_number_unsigned_print(1, data, F_type_output_d);
assert_int_equal(F_status_set_fine(status), F_output);
}
will_return(__wrap_fwrite_unlocked, true);
will_return(__wrap_fwrite_unlocked, 0);
- const f_status_t status = f_conversion_number_unsigned_print(1, data, stdout);
+ const f_status_t status = f_conversion_number_unsigned_print(1, data, F_type_output_d);
assert_int_equal(F_status_set_fine(status), F_output);
}
will_return(__wrap_fwrite_unlocked, true);
will_return(__wrap_fwrite_unlocked, 0);
- const f_status_t status = f_conversion_number_unsigned_print(0, data, stdout);
+ const f_status_t status = f_conversion_number_unsigned_print(0, data, F_type_output_d);
assert_int_equal(F_status_set_fine(status), F_output);
}
}
{
- FILE file;
+ FILE *file = 0;
const f_conversion_data_t data = macro_f_conversion_data_t_initialize(1, 0, 0);
- const f_status_t status = f_conversion_number_unsigned_print(0, data, &file);
+ const f_status_t status = f_conversion_number_unsigned_print(0, data, file);
assert_int_equal(F_status_set_fine(status), F_parameter);
}
{
const f_conversion_data_t data = macro_f_conversion_data_t_initialize(10, 0, 0);
- const f_status_t status = f_conversion_number_unsigned_print(1, data, stdout);
+ const f_status_t status = f_conversion_number_unsigned_print(1, data, F_type_output_d);
will_return(__wrap_fwrite_unlocked, false);
f_file_t file = f_file_t_initialize;
file.id = 0;
- file.stream = stdout;
+ file.stream = F_type_input_d;
if (flush) {
if (flush == 1) {
f_file_t file = f_file_t_initialize;
file.id = 0;
- file.stream = stdout;
+ file.stream = F_type_input_d;
will_return(__wrap_fclose, false);
will_return(__wrap_fclose, 0);
f_file_t file = f_file_t_initialize;
file.id = 0;
- file.stream = stdout;
+ file.stream = F_type_input_d;
will_return(__wrap_fflush, false);
will_return(__wrap_fflush, 0);
const f_string_static_t path = macro_f_string_static_t_initialize("test", 0, 4);
const int id = 1;
- FILE *file_pointer = stdout;
{
f_file_t file = f_file_t_initialize;
will_return(__wrap_fopen, false);
- will_return(__wrap_fopen, file_pointer);
+ will_return(__wrap_fopen, F_type_output_d);
will_return(__wrap_fileno, id);
const f_status_t status = f_file_stream_open(path, path, &file);
assert_int_equal(status, F_none);
- assert_int_equal(file.stream, file_pointer);
+ assert_int_equal(file.stream, F_type_output_d);
}
{
f_file_t file = f_file_t_initialize;
will_return(__wrap_fopen, false);
- will_return(__wrap_fopen, file_pointer);
+ will_return(__wrap_fopen, F_type_output_d);
will_return(__wrap_fileno, id);
const f_status_t status = f_file_stream_open(path, f_string_empty_s, &file);
assert_int_equal(status, F_none);
- assert_int_equal(file.stream, file_pointer);
+ assert_int_equal(file.stream, F_type_output_d);
}
}
f_file_t file = f_file_t_initialize;
file.size_read = 1;
- file.stream = stdout;
+ file.stream = F_type_input_d;
will_return(__wrap_feof_unlocked, false);
will_return(__wrap_feof_unlocked, 0);
{
f_file_t file = f_file_t_initialize;
file.size_read = 1;
- file.stream = stdout;
+ file.stream = F_type_input_d;
will_return(__wrap_feof_unlocked, false);
will_return(__wrap_feof_unlocked, 0);
f_file_t file = f_file_t_initialize;
file.size_read = 1;
- file.stream = stdout;
+ file.stream = F_type_input_d;
will_return(__wrap_feof_unlocked, false);
will_return(__wrap_feof_unlocked, 0);
{
f_file_t file = f_file_t_initialize;
file.size_read = 1;
- file.stream = stdout;
+ file.stream = F_type_input_d;
will_return(__wrap_feof_unlocked, false);
will_return(__wrap_feof_unlocked, 0);
f_file_t file = f_file_t_initialize;
file.size_read = 1;
- file.stream = stdout;
+ file.stream = F_type_input_d;
will_return(__wrap_feof_unlocked, false);
will_return(__wrap_feof_unlocked, 0);
{
f_file_t file = f_file_t_initialize;
file.size_read = 1;
- file.stream = stdout;
+ file.stream = F_type_input_d;
will_return(__wrap_feof_unlocked, false);
will_return(__wrap_feof_unlocked, 0);
const f_string_static_t path = macro_f_string_static_t_initialize("test", 0, 4);
const int id = 1;
- FILE *file_pointer = stdout;
{
f_file_t file = f_file_t_initialize;
- file.stream = file_pointer;
+ file.stream = F_type_input_d;
will_return(__wrap_freopen, false);
- will_return(__wrap_freopen, file_pointer);
+ will_return(__wrap_freopen, F_type_input_d);
will_return(__wrap_fileno, id);
const f_status_t status = f_file_stream_reopen(path, path, &file);
assert_int_equal(status, F_none);
- assert_int_equal(file.stream, file_pointer);
+ assert_int_equal(file.stream, F_type_input_d);
}
{
f_file_t file = f_file_t_initialize;
will_return(__wrap_freopen, false);
- will_return(__wrap_freopen, file_pointer);
+ will_return(__wrap_freopen, F_type_input_d);
will_return(__wrap_fileno, id);
const f_status_t status = f_file_stream_reopen(path, f_string_empty_s, &file);
assert_int_equal(status, F_none);
- assert_int_equal(file.stream, file_pointer);
+ assert_int_equal(file.stream, F_type_input_d);
}
}
f_file_t file = f_file_t_initialize;
file.size_read = 1;
- file.stream = stdout;
+ file.stream = F_type_input_d;
will_return(__wrap_fwrite_unlocked, true);
will_return(__wrap_fwrite_unlocked, errnos[i]);
void test__f_file_stream_write__returns_data_not(void **state) {
f_file_t file = f_file_t_initialize;
- FILE file_stucture;
- file.stream = &file_stucture;
+ file.stream = F_type_input_d;
{
const f_status_t status = f_file_stream_write(file, f_string_empty_s, 0);
{
f_file_t file = f_file_t_initialize;
file.size_write = path.used;
- file.stream = stdout;
+ file.stream = F_type_input_d;
will_return(__wrap_fwrite_unlocked, false);
will_return(__wrap_fwrite_unlocked, file.size_write);
f_file_t file = f_file_t_initialize;
file.size_read = 1;
- file.stream = stdout;
+ file.stream = F_type_input_d;
will_return(__wrap_fwrite_unlocked, true);
will_return(__wrap_fwrite_unlocked, errnos[i]);
void test__f_file_stream_write_block__returns_data_not(void **state) {
f_file_t file = f_file_t_initialize;
- FILE file_stucture;
- file.stream = &file_stucture;
+ file.stream = F_type_input_d;
{
const f_status_t status = f_file_stream_write_block(file, f_string_empty_s, 0);
{
f_file_t file = f_file_t_initialize;
file.size_write = 1;
- file.stream = stdout;
+ file.stream = F_type_input_d;
will_return(__wrap_fwrite_unlocked, false);
will_return(__wrap_fwrite_unlocked, file.size_write);
{
f_file_t file = f_file_t_initialize;
file.size_write = path.used;
- file.stream = stdout;
+ file.stream = F_type_input_d;
will_return(__wrap_fwrite_unlocked, false);
will_return(__wrap_fwrite_unlocked, file.size_write);
f_file_t file = f_file_t_initialize;
file.size_read = 1;
- file.stream = stdout;
+ file.stream = F_type_input_d;
will_return(__wrap_fwrite_unlocked, true);
will_return(__wrap_fwrite_unlocked, errnos[i]);
void test__f_file_stream_write_range__returns_data_not(void **state) {
f_file_t file = f_file_t_initialize;
- FILE file_stucture;
- file.stream = &file_stucture;
+ file.stream = F_type_input_d;
{
const f_string_range_t range = f_string_range_t_initialize;
{
f_file_t file = f_file_t_initialize;
file.size_write = 1;
- file.stream = stdout;
+ file.stream = F_type_input_d;
will_return(__wrap_fwrite_unlocked, false);
will_return(__wrap_fwrite_unlocked, file.size_write);
{
f_file_t file = f_file_t_initialize;
file.size_write = path.used;
- file.stream = stdout;
+ file.stream = F_type_input_d;
will_return(__wrap_fwrite_unlocked, false);
will_return(__wrap_fwrite_unlocked, file.size_write);
f_file_t file = f_file_t_initialize;
file.size_read = 1;
- file.stream = stdout;
+ file.stream = F_type_input_d;
will_return(__wrap_fwrite_unlocked, true);
will_return(__wrap_fwrite_unlocked, errnos[i]);
const f_string_static_t path = macro_f_string_static_t_initialize("test", 0, 4);
f_file_t file = f_file_t_initialize;
- FILE file_stucture;
- file.stream = &file_stucture;
+ file.stream = F_type_input_d;
{
const f_status_t status = f_file_stream_write_until(file, f_string_empty_s, 0, 0);
{
f_file_t file = f_file_t_initialize;
file.size_write = 1;
- file.stream = stdout;
+ file.stream = F_type_input_d;
will_return(__wrap_fwrite_unlocked, false);
will_return(__wrap_fwrite_unlocked, file.size_write);
{
f_file_t file = f_file_t_initialize;
file.size_write = path.used;
- file.stream = stdout;
+ file.stream = F_type_input_d;
will_return(__wrap_fwrite_unlocked, false);
will_return(__wrap_fwrite_unlocked, file.size_write);
if (!result) {
// @todo in order to get this working, the recursive function that calls this needs to be rewritten with more flexibility or provide a higher-level equivalent function.
- fll_print_format("Removed '%S'.%r", stdout, path, f_string_eol_s);
+ fll_print_format("Removed '%S'.%r", F_type_input_d, path, f_string_eol_s);
}
return result;