From: Kevin Day Date: Tue, 7 Jun 2022 04:59:26 +0000 (-0500) Subject: Cleanup: Update unit tests in f_print to follow current __wrap_fwrite_unlocked()... X-Git-Tag: 0.5.10~61 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=434e0b6ed9176de39dab5d50ba505da9bc981f73;p=fll Cleanup: Update unit tests in f_print to follow current __wrap_fwrite_unlocked() mock practices. --- diff --git a/level_0/f_print/tests/unit/c/mock-print.c b/level_0/f_print/tests/unit/c/mock-print.c index 0092af6..cabf181 100644 --- a/level_0/f_print/tests/unit/c/mock-print.c +++ b/level_0/f_print/tests/unit/c/mock-print.c @@ -12,9 +12,15 @@ int __wrap_ferror_unlocked(FILE *stream) { return mock_type(int); } -size_t __wrap_fwrite_unlocked(const void *ptr, size_t size, size_t n, FILE *stream) { +size_t __wrap_fwrite_unlocked(const void *ptr, size_t size, size_t nmemb, FILE *stream) { - return mock_type(size_t); + const bool failure = mock_type(bool); + + if (failure) { + return mock_type(int); + } + + return nmemb; } ssize_t __wrap_write(int fd, const void *buf, size_t count) { diff --git a/level_0/f_print/tests/unit/c/mock-print.h b/level_0/f_print/tests/unit/c/mock-print.h index e25c331..bd3dae4 100644 --- a/level_0/f_print/tests/unit/c/mock-print.h +++ b/level_0/f_print/tests/unit/c/mock-print.h @@ -30,7 +30,7 @@ const static int mock_errno_generic = 32767; extern void __wrap_clearerr_unlocked(FILE *stream); extern int __wrap_ferror_unlocked(FILE *stream); -extern size_t __wrap_fwrite_unlocked(const void *ptr, size_t size, size_t n, FILE *stream); +extern size_t __wrap_fwrite_unlocked(const void *ptr, size_t size, size_t nmemb, FILE *stream); extern ssize_t __wrap_write(int fd, const void *buf, size_t count); #ifdef __cplusplus diff --git a/level_0/f_print/tests/unit/c/test-print-.c b/level_0/f_print/tests/unit/c/test-print-.c index c122949..7b8d16b 100644 --- a/level_0/f_print/tests/unit/c/test-print-.c +++ b/level_0/f_print/tests/unit/c/test-print-.c @@ -10,8 +10,9 @@ void test__f_print__fails(void **state) { const f_string_static_t test = macro_f_string_static_t_initialize("test", 0, 4); { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); - will_return(__wrap_ferror_unlocked, 1); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print(test.string, test.used, stdout); @@ -58,8 +59,8 @@ void test__f_print__works(void **state) { const f_string_static_t test = macro_f_string_static_t_initialize("test", 0, 4); { - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print(test.string, test.used, stdout); diff --git a/level_0/f_print/tests/unit/c/test-print-character.c b/level_0/f_print/tests/unit/c/test-print-character.c index 9334f70..45fd9eb 100644 --- a/level_0/f_print/tests/unit/c/test-print-character.c +++ b/level_0/f_print/tests/unit/c/test-print-character.c @@ -10,7 +10,9 @@ void test__f_print_character__fails(void **state) { const f_string_static_t test = macro_f_string_static_t_initialize("test", 0, 4); { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_character(test.string[0], stdout); @@ -34,7 +36,8 @@ void test__f_print_character__works(void **state) { const f_string_static_t test = macro_f_string_static_t_initialize("test", 0, 4); { - will_return(__wrap_fwrite_unlocked, 1); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_character(test.string[0], stdout); diff --git a/level_0/f_print/tests/unit/c/test-print-character_safely.c b/level_0/f_print/tests/unit/c/test-print-character_safely.c index d96db2d..e9c3d6f 100644 --- a/level_0/f_print/tests/unit/c/test-print-character_safely.c +++ b/level_0/f_print/tests/unit/c/test-print-character_safely.c @@ -10,7 +10,9 @@ void test__f_print_character_safely__fails(void **state) { const f_string_static_t test = macro_f_string_static_t_initialize("test", 0, 4); { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_character_safely(test.string[0], stdout); @@ -18,7 +20,9 @@ void test__f_print_character_safely__fails(void **state) { } { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_character_safely((f_char_t) 0x7f, stdout); @@ -26,7 +30,9 @@ void test__f_print_character_safely__fails(void **state) { } { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_character_safely((f_char_t) F_utf_byte_1_d, stdout); @@ -36,7 +42,9 @@ void test__f_print_character_safely__fails(void **state) { { const f_string_static_t alternate = macro_f_string_static_t_initialize("蠇", 0, 2); + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_character_safely(alternate.string[0], stdout); @@ -44,7 +52,9 @@ void test__f_print_character_safely__fails(void **state) { } { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_character_safely(test.string[0], stdout); @@ -68,7 +78,8 @@ void test__f_print_character_safely__returns_utf(void **state) { const f_string_static_t test = macro_f_string_static_t_initialize("蠇", 0, 2); { - will_return(__wrap_fwrite_unlocked, 1); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_character_safely(test.string[0], stdout); @@ -81,7 +92,8 @@ void test__f_print_character_safely__works(void **state) { const f_string_static_t test = macro_f_string_static_t_initialize("test", 0, 4); { - will_return(__wrap_fwrite_unlocked, f_print_sequence_delete_s.used); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_character_safely((f_char_t) 0x7f, stdout); @@ -89,7 +101,8 @@ void test__f_print_character_safely__works(void **state) { } { - will_return(__wrap_fwrite_unlocked, f_print_sequence_unknown_s.used); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_character_safely((f_char_t) F_utf_byte_1_d, stdout); @@ -97,7 +110,8 @@ void test__f_print_character_safely__works(void **state) { } { - will_return(__wrap_fwrite_unlocked, 1); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_character_safely(test.string[0], stdout); diff --git a/level_0/f_print/tests/unit/c/test-print-dynamic.c b/level_0/f_print/tests/unit/c/test-print-dynamic.c index 21a684a..c2992ab 100644 --- a/level_0/f_print/tests/unit/c/test-print-dynamic.c +++ b/level_0/f_print/tests/unit/c/test-print-dynamic.c @@ -10,8 +10,9 @@ void test__f_print_dynamic__fails(void **state) { const f_string_static_t test = macro_f_string_static_t_initialize("test", 0, 4); { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); - will_return(__wrap_ferror_unlocked, 1); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_dynamic(test, stdout); @@ -44,8 +45,8 @@ void test__f_print_dynamic__works(void **state) { const f_string_static_t test = macro_f_string_static_t_initialize("test", 0, 4); { - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_dynamic(test, stdout); diff --git a/level_0/f_print/tests/unit/c/test-print-dynamic_partial.c b/level_0/f_print/tests/unit/c/test-print-dynamic_partial.c index 3b0c6ef..d757a56 100644 --- a/level_0/f_print/tests/unit/c/test-print-dynamic_partial.c +++ b/level_0/f_print/tests/unit/c/test-print-dynamic_partial.c @@ -11,8 +11,9 @@ void test__f_print_dynamic_partial__fails(void **state) { const f_string_range_t partial = macro_f_string_range_t_initialize(0, 2); { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); - will_return(__wrap_ferror_unlocked, 1); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_dynamic_partial(test, partial, stdout); @@ -49,8 +50,8 @@ void test__f_print_dynamic_partial__works(void **state) { const f_string_range_t partial = macro_f_string_range_t_initialize(0, 2); { - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_dynamic_partial(test, partial, stdout); diff --git a/level_0/f_print/tests/unit/c/test-print-dynamic_partial_raw.c b/level_0/f_print/tests/unit/c/test-print-dynamic_partial_raw.c index 3e221e9..07be962 100644 --- a/level_0/f_print/tests/unit/c/test-print-dynamic_partial_raw.c +++ b/level_0/f_print/tests/unit/c/test-print-dynamic_partial_raw.c @@ -11,8 +11,9 @@ void test__f_print_dynamic_partial_raw__fails(void **state) { const f_string_range_t partial = macro_f_string_range_t_initialize(0, 2); { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); - will_return(__wrap_ferror_unlocked, 1); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_dynamic_partial_raw(test, partial, stdout); @@ -49,8 +50,8 @@ void test__f_print_dynamic_partial_raw__works(void **state) { const f_string_range_t partial = macro_f_string_range_t_initialize(0, 2); { - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_dynamic_partial_raw(test, partial, stdout); diff --git a/level_0/f_print/tests/unit/c/test-print-dynamic_partial_raw_safely.c b/level_0/f_print/tests/unit/c/test-print-dynamic_partial_raw_safely.c index c6a8fd4..5a05589 100644 --- a/level_0/f_print/tests/unit/c/test-print-dynamic_partial_raw_safely.c +++ b/level_0/f_print/tests/unit/c/test-print-dynamic_partial_raw_safely.c @@ -11,8 +11,9 @@ void test__f_print_dynamic_partial_raw_safely__fails(void **state) { const f_string_range_t partial = macro_f_string_range_t_initialize(0, 2); { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); - will_return(__wrap_ferror_unlocked, 1); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_dynamic_partial_raw_safely(test, partial, stdout); @@ -49,8 +50,8 @@ void test__f_print_dynamic_partial_raw_safely__works(void **state) { const f_string_range_t partial = macro_f_string_range_t_initialize(0, 2); { - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_dynamic_partial_raw_safely(test, partial, stdout); diff --git a/level_0/f_print/tests/unit/c/test-print-dynamic_partial_safely.c b/level_0/f_print/tests/unit/c/test-print-dynamic_partial_safely.c index 57820a8..1e25af8 100644 --- a/level_0/f_print/tests/unit/c/test-print-dynamic_partial_safely.c +++ b/level_0/f_print/tests/unit/c/test-print-dynamic_partial_safely.c @@ -11,8 +11,9 @@ void test__f_print_dynamic_partial_safely__fails(void **state) { const f_string_range_t partial = macro_f_string_range_t_initialize(0, 2); { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); - will_return(__wrap_ferror_unlocked, 1); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_dynamic_partial_safely(test, partial, stdout); @@ -49,8 +50,8 @@ void test__f_print_dynamic_partial_safely__works(void **state) { const f_string_range_t partial = macro_f_string_range_t_initialize(0, 2); { - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_dynamic_partial_safely(test, partial, stdout); diff --git a/level_0/f_print/tests/unit/c/test-print-dynamic_raw.c b/level_0/f_print/tests/unit/c/test-print-dynamic_raw.c index 94852e1..8ac1bb5 100644 --- a/level_0/f_print/tests/unit/c/test-print-dynamic_raw.c +++ b/level_0/f_print/tests/unit/c/test-print-dynamic_raw.c @@ -10,8 +10,9 @@ void test__f_print_dynamic_raw__fails(void **state) { const f_string_static_t test = macro_f_string_static_t_initialize("test", 0, 4); { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); - will_return(__wrap_ferror_unlocked, 1); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_dynamic_raw(test, stdout); @@ -44,8 +45,8 @@ void test__f_print_dynamic_raw__works(void **state) { const f_string_static_t test = macro_f_string_static_t_initialize("test", 0, 4); { - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_dynamic_raw(test, stdout); diff --git a/level_0/f_print/tests/unit/c/test-print-dynamic_raw_safely.c b/level_0/f_print/tests/unit/c/test-print-dynamic_raw_safely.c index 4e9f664..581b965 100644 --- a/level_0/f_print/tests/unit/c/test-print-dynamic_raw_safely.c +++ b/level_0/f_print/tests/unit/c/test-print-dynamic_raw_safely.c @@ -10,8 +10,9 @@ void test__f_print_dynamic_raw_safely__fails(void **state) { const f_string_static_t test = macro_f_string_static_t_initialize("test", 0, 4); { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); - will_return(__wrap_ferror_unlocked, 1); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_dynamic_raw_safely(test, stdout); @@ -44,8 +45,8 @@ void test__f_print_dynamic_raw_safely__works(void **state) { const f_string_static_t test = macro_f_string_static_t_initialize("test", 0, 4); { - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_dynamic_raw_safely(test, stdout); diff --git a/level_0/f_print/tests/unit/c/test-print-dynamic_safely.c b/level_0/f_print/tests/unit/c/test-print-dynamic_safely.c index c9c52c8..a6963bd0 100644 --- a/level_0/f_print/tests/unit/c/test-print-dynamic_safely.c +++ b/level_0/f_print/tests/unit/c/test-print-dynamic_safely.c @@ -10,8 +10,9 @@ void test__f_print_dynamic_safely__fails(void **state) { const f_string_static_t test = macro_f_string_static_t_initialize("test", 0, 4); { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); - will_return(__wrap_ferror_unlocked, 1); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_dynamic_safely(test, stdout); @@ -44,8 +45,8 @@ void test__f_print_dynamic_safely__works(void **state) { const f_string_static_t test = macro_f_string_static_t_initialize("test", 0, 4); { - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_dynamic_safely(test, stdout); diff --git a/level_0/f_print/tests/unit/c/test-print-except.c b/level_0/f_print/tests/unit/c/test-print-except.c index 78d5ca4..94b5f3a 100644 --- a/level_0/f_print/tests/unit/c/test-print-except.c +++ b/level_0/f_print/tests/unit/c/test-print-except.c @@ -11,8 +11,9 @@ void test__f_print_except__fails(void **state) { const f_array_lengths_t except = f_array_lengths_t_initialize; { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); - will_return(__wrap_ferror_unlocked, 1); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_except(test.string, 0, test.used, except, stdout); @@ -63,8 +64,8 @@ void test__f_print_except__works(void **state) { { const f_array_lengths_t except = f_array_lengths_t_initialize; - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except(test.string, 0, test.used, except, stdout); @@ -74,8 +75,8 @@ void test__f_print_except__works(void **state) { { const f_array_lengths_t except = f_array_lengths_t_initialize; - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except(test.string, 2, test.used, except, stdout); @@ -86,8 +87,8 @@ void test__f_print_except__works(void **state) { f_array_length_t lengths[] = { 3 }; const f_array_lengths_t except = macro_f_array_lengths_t_initialize(lengths, 0, 1); - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except(test.string, 1, test.used, except, stdout); diff --git a/level_0/f_print/tests/unit/c/test-print-except_dynamic.c b/level_0/f_print/tests/unit/c/test-print-except_dynamic.c index f5cae0a..5705ffc 100644 --- a/level_0/f_print/tests/unit/c/test-print-except_dynamic.c +++ b/level_0/f_print/tests/unit/c/test-print-except_dynamic.c @@ -11,8 +11,9 @@ void test__f_print_except_dynamic__fails(void **state) { const f_array_lengths_t except = f_array_lengths_t_initialize; { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); - will_return(__wrap_ferror_unlocked, 1); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_except_dynamic(test, except, stdout); @@ -50,8 +51,8 @@ void test__f_print_except_dynamic__works(void **state) { { const f_array_lengths_t except = f_array_lengths_t_initialize; - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_dynamic(test, except, stdout); @@ -62,8 +63,8 @@ void test__f_print_except_dynamic__works(void **state) { f_array_length_t lengths[] = { 3 }; const f_array_lengths_t except = macro_f_array_lengths_t_initialize(lengths, 0, 1); - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_dynamic(test, except, stdout); diff --git a/level_0/f_print/tests/unit/c/test-print-except_dynamic_partial.c b/level_0/f_print/tests/unit/c/test-print-except_dynamic_partial.c index 74cc53d..03752e5 100644 --- a/level_0/f_print/tests/unit/c/test-print-except_dynamic_partial.c +++ b/level_0/f_print/tests/unit/c/test-print-except_dynamic_partial.c @@ -12,8 +12,9 @@ void test__f_print_except_dynamic_partial__fails(void **state) { const f_string_range_t partial = macro_f_string_range_t_initialize(0, 2); { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); - will_return(__wrap_ferror_unlocked, 1); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_except_dynamic_partial(test, partial, except, stdout); @@ -54,8 +55,8 @@ void test__f_print_except_dynamic_partial__works(void **state) { { const f_array_lengths_t except = f_array_lengths_t_initialize; - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_dynamic_partial(test, partial, except, stdout); @@ -66,8 +67,8 @@ void test__f_print_except_dynamic_partial__works(void **state) { f_array_length_t lengths[] = { 3 }; const f_array_lengths_t except = macro_f_array_lengths_t_initialize(lengths, 0, 1); - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_dynamic_partial(test, partial, except, stdout); diff --git a/level_0/f_print/tests/unit/c/test-print-except_dynamic_partial_raw.c b/level_0/f_print/tests/unit/c/test-print-except_dynamic_partial_raw.c index d90fb8a..920854c 100644 --- a/level_0/f_print/tests/unit/c/test-print-except_dynamic_partial_raw.c +++ b/level_0/f_print/tests/unit/c/test-print-except_dynamic_partial_raw.c @@ -12,8 +12,9 @@ void test__f_print_except_dynamic_partial_raw__fails(void **state) { const f_string_range_t partial = macro_f_string_range_t_initialize(0, 2); { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); - will_return(__wrap_ferror_unlocked, 1); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_except_dynamic_partial_raw(test, partial, except, stdout); @@ -54,8 +55,8 @@ void test__f_print_except_dynamic_partial_raw__works(void **state) { { const f_array_lengths_t except = f_array_lengths_t_initialize; - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_dynamic_partial_raw(test, partial, except, stdout); @@ -66,8 +67,8 @@ void test__f_print_except_dynamic_partial_raw__works(void **state) { f_array_length_t lengths[] = { 3 }; const f_array_lengths_t except = macro_f_array_lengths_t_initialize(lengths, 0, 1); - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_dynamic_partial_raw(test, partial, except, stdout); diff --git a/level_0/f_print/tests/unit/c/test-print-except_dynamic_partial_raw_safely.c b/level_0/f_print/tests/unit/c/test-print-except_dynamic_partial_raw_safely.c index b70bd7d..27ad0d0 100644 --- a/level_0/f_print/tests/unit/c/test-print-except_dynamic_partial_raw_safely.c +++ b/level_0/f_print/tests/unit/c/test-print-except_dynamic_partial_raw_safely.c @@ -12,8 +12,9 @@ void test__f_print_except_dynamic_partial_raw_safely__fails(void **state) { const f_string_range_t partial = macro_f_string_range_t_initialize(0, 2); { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); - will_return(__wrap_ferror_unlocked, 1); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_except_dynamic_partial_raw_safely(test, partial, except, stdout); @@ -54,8 +55,8 @@ void test__f_print_except_dynamic_partial_raw_safely__works(void **state) { { const f_array_lengths_t except = f_array_lengths_t_initialize; - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_dynamic_partial_raw_safely(test, partial, except, stdout); @@ -66,8 +67,8 @@ void test__f_print_except_dynamic_partial_raw_safely__works(void **state) { f_array_length_t lengths[] = { 3 }; const f_array_lengths_t except = macro_f_array_lengths_t_initialize(lengths, 0, 1); - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_dynamic_partial_raw_safely(test, partial, except, stdout); diff --git a/level_0/f_print/tests/unit/c/test-print-except_dynamic_partial_safely.c b/level_0/f_print/tests/unit/c/test-print-except_dynamic_partial_safely.c index 761c050..a6aad5b 100644 --- a/level_0/f_print/tests/unit/c/test-print-except_dynamic_partial_safely.c +++ b/level_0/f_print/tests/unit/c/test-print-except_dynamic_partial_safely.c @@ -12,8 +12,9 @@ void test__f_print_except_dynamic_partial_safely__fails(void **state) { const f_string_range_t partial = macro_f_string_range_t_initialize(0, 2); { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); - will_return(__wrap_ferror_unlocked, 1); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_except_dynamic_partial_safely(test, partial, except, stdout); @@ -54,8 +55,8 @@ void test__f_print_except_dynamic_partial_safely__works(void **state) { { const f_array_lengths_t except = f_array_lengths_t_initialize; - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_dynamic_partial_safely(test, partial, except, stdout); @@ -66,8 +67,8 @@ void test__f_print_except_dynamic_partial_safely__works(void **state) { f_array_length_t lengths[] = { 3 }; const f_array_lengths_t except = macro_f_array_lengths_t_initialize(lengths, 0, 1); - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_dynamic_partial_safely(test, partial, except, stdout); diff --git a/level_0/f_print/tests/unit/c/test-print-except_dynamic_raw.c b/level_0/f_print/tests/unit/c/test-print-except_dynamic_raw.c index 8b84476..d5b2ac8 100644 --- a/level_0/f_print/tests/unit/c/test-print-except_dynamic_raw.c +++ b/level_0/f_print/tests/unit/c/test-print-except_dynamic_raw.c @@ -11,8 +11,9 @@ void test__f_print_except_dynamic_raw__fails(void **state) { const f_array_lengths_t except = f_array_lengths_t_initialize; { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); - will_return(__wrap_ferror_unlocked, 1); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_except_dynamic_raw(test, except, stdout); @@ -50,8 +51,8 @@ void test__f_print_except_dynamic_raw__works(void **state) { { const f_array_lengths_t except = f_array_lengths_t_initialize; - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_dynamic_raw(test, except, stdout); @@ -62,8 +63,8 @@ void test__f_print_except_dynamic_raw__works(void **state) { f_array_length_t lengths[] = { 3 }; const f_array_lengths_t except = macro_f_array_lengths_t_initialize(lengths, 0, 1); - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_dynamic_raw(test, except, stdout); diff --git a/level_0/f_print/tests/unit/c/test-print-except_dynamic_raw_safely.c b/level_0/f_print/tests/unit/c/test-print-except_dynamic_raw_safely.c index 1bdd7b4..8a5092a 100644 --- a/level_0/f_print/tests/unit/c/test-print-except_dynamic_raw_safely.c +++ b/level_0/f_print/tests/unit/c/test-print-except_dynamic_raw_safely.c @@ -11,8 +11,9 @@ void test__f_print_except_dynamic_raw_safely__fails(void **state) { const f_array_lengths_t except = f_array_lengths_t_initialize; { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); - will_return(__wrap_ferror_unlocked, 1); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_except_dynamic_raw_safely(test, except, stdout); @@ -50,8 +51,8 @@ void test__f_print_except_dynamic_raw_safely__works(void **state) { { const f_array_lengths_t except = f_array_lengths_t_initialize; - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_dynamic_raw_safely(test, except, stdout); @@ -62,8 +63,8 @@ void test__f_print_except_dynamic_raw_safely__works(void **state) { f_array_length_t lengths[] = { 3 }; const f_array_lengths_t except = macro_f_array_lengths_t_initialize(lengths, 0, 1); - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_dynamic_raw_safely(test, except, stdout); diff --git a/level_0/f_print/tests/unit/c/test-print-except_dynamic_safely.c b/level_0/f_print/tests/unit/c/test-print-except_dynamic_safely.c index 4a5f91f..4a34167 100644 --- a/level_0/f_print/tests/unit/c/test-print-except_dynamic_safely.c +++ b/level_0/f_print/tests/unit/c/test-print-except_dynamic_safely.c @@ -11,8 +11,9 @@ void test__f_print_except_dynamic_safely__fails(void **state) { const f_array_lengths_t except = f_array_lengths_t_initialize; { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); - will_return(__wrap_ferror_unlocked, 1); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_except_dynamic_safely(test, except, stdout); @@ -50,8 +51,8 @@ void test__f_print_except_dynamic_safely__works(void **state) { { const f_array_lengths_t except = f_array_lengths_t_initialize; - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_dynamic_safely(test, except, stdout); @@ -62,8 +63,8 @@ void test__f_print_except_dynamic_safely__works(void **state) { f_array_length_t lengths[] = { 3 }; const f_array_lengths_t except = macro_f_array_lengths_t_initialize(lengths, 0, 1); - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_dynamic_safely(test, except, stdout); diff --git a/level_0/f_print/tests/unit/c/test-print-except_in.c b/level_0/f_print/tests/unit/c/test-print-except_in.c index 46e86a6..2340b7f 100644 --- a/level_0/f_print/tests/unit/c/test-print-except_in.c +++ b/level_0/f_print/tests/unit/c/test-print-except_in.c @@ -12,8 +12,9 @@ void test__f_print_except_in__fails(void **state) { const f_string_ranges_t range = f_string_ranges_t_initialize; { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); - will_return(__wrap_ferror_unlocked, 1); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_except_in(test.string, 0, test.used, except, range, stdout); @@ -67,8 +68,8 @@ void test__f_print_except_in__works(void **state) { const f_array_lengths_t except = f_array_lengths_t_initialize; const f_string_ranges_t range = f_string_ranges_t_initialize; - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_in(test.string, 0, test.used, except, range, stdout); @@ -79,8 +80,8 @@ void test__f_print_except_in__works(void **state) { const f_array_lengths_t except = f_array_lengths_t_initialize; const f_string_ranges_t range = f_string_ranges_t_initialize; - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_in(test.string, 2, test.used, except, range, stdout); @@ -95,8 +96,8 @@ void test__f_print_except_in__works(void **state) { const f_array_lengths_t except = macro_f_array_lengths_t_initialize(lengths, 0, 1); const f_string_ranges_t range = macro_f_string_ranges_t_initialize(ranges, 0, 1); - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_in(test.string, 1, test.used, except, range, stdout); diff --git a/level_0/f_print/tests/unit/c/test-print-except_in_dynamic.c b/level_0/f_print/tests/unit/c/test-print-except_in_dynamic.c index d162468..bb759c2 100644 --- a/level_0/f_print/tests/unit/c/test-print-except_in_dynamic.c +++ b/level_0/f_print/tests/unit/c/test-print-except_in_dynamic.c @@ -12,8 +12,9 @@ void test__f_print_except_in_dynamic__fails(void **state) { const f_string_ranges_t range = f_string_ranges_t_initialize; { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); - will_return(__wrap_ferror_unlocked, 1); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_except_in_dynamic(test, except, range, stdout); @@ -54,8 +55,8 @@ void test__f_print_except_in_dynamic__works(void **state) { const f_array_lengths_t except = f_array_lengths_t_initialize; const f_string_ranges_t range = f_string_ranges_t_initialize; - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_in_dynamic(test, except, range, stdout); @@ -70,8 +71,8 @@ void test__f_print_except_in_dynamic__works(void **state) { const f_array_lengths_t except = macro_f_array_lengths_t_initialize(lengths, 0, 1); const f_string_ranges_t range = macro_f_string_ranges_t_initialize(ranges, 0, 1); - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_in_dynamic(test, except, range, stdout); diff --git a/level_0/f_print/tests/unit/c/test-print-except_in_dynamic_partial.c b/level_0/f_print/tests/unit/c/test-print-except_in_dynamic_partial.c index 5bc646e..522bda9 100644 --- a/level_0/f_print/tests/unit/c/test-print-except_in_dynamic_partial.c +++ b/level_0/f_print/tests/unit/c/test-print-except_in_dynamic_partial.c @@ -13,8 +13,9 @@ void test__f_print_except_in_dynamic_partial__fails(void **state) { const f_string_range_t partial = macro_f_string_range_t_initialize(0, 2); { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); - will_return(__wrap_ferror_unlocked, 1); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_except_in_dynamic_partial(test, partial, except, range, stdout); @@ -58,8 +59,8 @@ void test__f_print_except_in_dynamic_partial__works(void **state) { const f_array_lengths_t except = f_array_lengths_t_initialize; const f_string_ranges_t range = f_string_ranges_t_initialize; - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_in_dynamic_partial(test, partial, except, range, stdout); @@ -74,8 +75,8 @@ void test__f_print_except_in_dynamic_partial__works(void **state) { const f_array_lengths_t except = macro_f_array_lengths_t_initialize(lengths, 0, 1); const f_string_ranges_t range = macro_f_string_ranges_t_initialize(ranges, 0, 1); - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_in_dynamic_partial(test, partial, except, range, stdout); diff --git a/level_0/f_print/tests/unit/c/test-print-except_in_dynamic_partial_raw.c b/level_0/f_print/tests/unit/c/test-print-except_in_dynamic_partial_raw.c index bb27c65..24d1ba1 100644 --- a/level_0/f_print/tests/unit/c/test-print-except_in_dynamic_partial_raw.c +++ b/level_0/f_print/tests/unit/c/test-print-except_in_dynamic_partial_raw.c @@ -13,8 +13,9 @@ void test__f_print_except_in_dynamic_partial_raw__fails(void **state) { const f_string_range_t partial = macro_f_string_range_t_initialize(0, 2); { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); - will_return(__wrap_ferror_unlocked, 1); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_except_in_dynamic_partial_raw(test, partial, except, range, stdout); @@ -58,8 +59,8 @@ void test__f_print_except_in_dynamic_partial_raw__works(void **state) { const f_array_lengths_t except = f_array_lengths_t_initialize; const f_string_ranges_t range = f_string_ranges_t_initialize; - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_in_dynamic_partial_raw(test, partial, except, range, stdout); @@ -74,8 +75,8 @@ void test__f_print_except_in_dynamic_partial_raw__works(void **state) { const f_array_lengths_t except = macro_f_array_lengths_t_initialize(lengths, 0, 1); const f_string_ranges_t range = macro_f_string_ranges_t_initialize(ranges, 0, 1); - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_in_dynamic_partial_raw(test, partial, except, range, stdout); diff --git a/level_0/f_print/tests/unit/c/test-print-except_in_dynamic_partial_raw_safely.c b/level_0/f_print/tests/unit/c/test-print-except_in_dynamic_partial_raw_safely.c index 893b4df..b90ca7e 100644 --- a/level_0/f_print/tests/unit/c/test-print-except_in_dynamic_partial_raw_safely.c +++ b/level_0/f_print/tests/unit/c/test-print-except_in_dynamic_partial_raw_safely.c @@ -13,8 +13,9 @@ void test__f_print_except_in_dynamic_partial_raw_safely__fails(void **state) { const f_string_range_t partial = macro_f_string_range_t_initialize(0, 2); { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); - will_return(__wrap_ferror_unlocked, 1); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_except_in_dynamic_partial_raw_safely(test, partial, except, range, stdout); @@ -58,8 +59,8 @@ void test__f_print_except_in_dynamic_partial_raw_safely__works(void **state) { const f_array_lengths_t except = f_array_lengths_t_initialize; const f_string_ranges_t range = f_string_ranges_t_initialize; - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_in_dynamic_partial_raw_safely(test, partial, except, range, stdout); @@ -74,8 +75,8 @@ void test__f_print_except_in_dynamic_partial_raw_safely__works(void **state) { const f_array_lengths_t except = macro_f_array_lengths_t_initialize(lengths, 0, 1); const f_string_ranges_t range = macro_f_string_ranges_t_initialize(ranges, 0, 1); - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_in_dynamic_partial_raw_safely(test, partial, except, range, stdout); diff --git a/level_0/f_print/tests/unit/c/test-print-except_in_dynamic_partial_safely.c b/level_0/f_print/tests/unit/c/test-print-except_in_dynamic_partial_safely.c index 57386b3..8c2fa1e 100644 --- a/level_0/f_print/tests/unit/c/test-print-except_in_dynamic_partial_safely.c +++ b/level_0/f_print/tests/unit/c/test-print-except_in_dynamic_partial_safely.c @@ -13,8 +13,9 @@ void test__f_print_except_in_dynamic_partial_safely__fails(void **state) { const f_string_range_t partial = macro_f_string_range_t_initialize(0, 2); { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); - will_return(__wrap_ferror_unlocked, 1); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_except_in_dynamic_partial_safely(test, partial, except, range, stdout); @@ -58,8 +59,8 @@ void test__f_print_except_in_dynamic_partial_safely__works(void **state) { const f_array_lengths_t except = f_array_lengths_t_initialize; const f_string_ranges_t range = f_string_ranges_t_initialize; - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_in_dynamic_partial_safely(test, partial, except, range, stdout); @@ -74,8 +75,8 @@ void test__f_print_except_in_dynamic_partial_safely__works(void **state) { const f_array_lengths_t except = macro_f_array_lengths_t_initialize(lengths, 0, 1); const f_string_ranges_t range = macro_f_string_ranges_t_initialize(ranges, 0, 1); - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_in_dynamic_partial_safely(test, partial, except, range, stdout); diff --git a/level_0/f_print/tests/unit/c/test-print-except_in_dynamic_raw.c b/level_0/f_print/tests/unit/c/test-print-except_in_dynamic_raw.c index 8faf1f0..2ad258c 100644 --- a/level_0/f_print/tests/unit/c/test-print-except_in_dynamic_raw.c +++ b/level_0/f_print/tests/unit/c/test-print-except_in_dynamic_raw.c @@ -12,8 +12,9 @@ void test__f_print_except_in_dynamic_raw__fails(void **state) { const f_string_ranges_t range = f_string_ranges_t_initialize; { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); - will_return(__wrap_ferror_unlocked, 1); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_except_in_dynamic_raw(test, except, range, stdout); @@ -54,8 +55,8 @@ void test__f_print_except_in_dynamic_raw__works(void **state) { const f_array_lengths_t except = f_array_lengths_t_initialize; const f_string_ranges_t range = f_string_ranges_t_initialize; - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_in_dynamic_raw(test, except, range, stdout); @@ -70,8 +71,8 @@ void test__f_print_except_in_dynamic_raw__works(void **state) { const f_array_lengths_t except = macro_f_array_lengths_t_initialize(lengths, 0, 1); const f_string_ranges_t range = macro_f_string_ranges_t_initialize(ranges, 0, 1); - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_in_dynamic_raw(test, except, range, stdout); diff --git a/level_0/f_print/tests/unit/c/test-print-except_in_dynamic_raw_safely.c b/level_0/f_print/tests/unit/c/test-print-except_in_dynamic_raw_safely.c index ba13e3f..0063216 100644 --- a/level_0/f_print/tests/unit/c/test-print-except_in_dynamic_raw_safely.c +++ b/level_0/f_print/tests/unit/c/test-print-except_in_dynamic_raw_safely.c @@ -12,8 +12,9 @@ void test__f_print_except_in_dynamic_raw_safely__fails(void **state) { const f_string_ranges_t range = f_string_ranges_t_initialize; { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); - will_return(__wrap_ferror_unlocked, 1); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_except_in_dynamic_raw_safely(test, except, range, stdout); @@ -54,8 +55,8 @@ void test__f_print_except_in_dynamic_raw_safely__works(void **state) { const f_array_lengths_t except = f_array_lengths_t_initialize; const f_string_ranges_t range = f_string_ranges_t_initialize; - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_in_dynamic_raw_safely(test, except, range, stdout); @@ -70,8 +71,8 @@ void test__f_print_except_in_dynamic_raw_safely__works(void **state) { const f_array_lengths_t except = macro_f_array_lengths_t_initialize(lengths, 0, 1); const f_string_ranges_t range = macro_f_string_ranges_t_initialize(ranges, 0, 1); - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_in_dynamic_raw_safely(test, except, range, stdout); diff --git a/level_0/f_print/tests/unit/c/test-print-except_in_dynamic_safely.c b/level_0/f_print/tests/unit/c/test-print-except_in_dynamic_safely.c index d7a377d..e862b0b 100644 --- a/level_0/f_print/tests/unit/c/test-print-except_in_dynamic_safely.c +++ b/level_0/f_print/tests/unit/c/test-print-except_in_dynamic_safely.c @@ -12,8 +12,9 @@ void test__f_print_except_in_dynamic_safely__fails(void **state) { const f_string_ranges_t range = f_string_ranges_t_initialize; { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); - will_return(__wrap_ferror_unlocked, 1); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_except_in_dynamic_safely(test, except, range, stdout); @@ -54,8 +55,8 @@ void test__f_print_except_in_dynamic_safely__works(void **state) { const f_array_lengths_t except = f_array_lengths_t_initialize; const f_string_ranges_t range = f_string_ranges_t_initialize; - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_in_dynamic_safely(test, except, range, stdout); @@ -70,8 +71,8 @@ void test__f_print_except_in_dynamic_safely__works(void **state) { const f_array_lengths_t except = macro_f_array_lengths_t_initialize(lengths, 0, 1); const f_string_ranges_t range = macro_f_string_ranges_t_initialize(ranges, 0, 1); - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_in_dynamic_safely(test, except, range, stdout); diff --git a/level_0/f_print/tests/unit/c/test-print-except_in_raw.c b/level_0/f_print/tests/unit/c/test-print-except_in_raw.c index 71a1d34..26db749 100644 --- a/level_0/f_print/tests/unit/c/test-print-except_in_raw.c +++ b/level_0/f_print/tests/unit/c/test-print-except_in_raw.c @@ -12,8 +12,9 @@ void test__f_print_except_in_raw__fails(void **state) { const f_string_ranges_t range = f_string_ranges_t_initialize; { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); - will_return(__wrap_ferror_unlocked, 1); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_except_in_raw(test.string, 0, test.used, except, range, stdout); @@ -67,8 +68,8 @@ void test__f_print_except_in_raw__works(void **state) { const f_array_lengths_t except = f_array_lengths_t_initialize; const f_string_ranges_t range = f_string_ranges_t_initialize; - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_in_raw(test.string, 0, test.used, except, range, stdout); @@ -79,8 +80,8 @@ void test__f_print_except_in_raw__works(void **state) { const f_array_lengths_t except = f_array_lengths_t_initialize; const f_string_ranges_t range = f_string_ranges_t_initialize; - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_in_raw(test.string, 2, test.used, except, range, stdout); @@ -95,8 +96,8 @@ void test__f_print_except_in_raw__works(void **state) { const f_array_lengths_t except = macro_f_array_lengths_t_initialize(lengths, 0, 1); const f_string_ranges_t range = macro_f_string_ranges_t_initialize(ranges, 0, 1); - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_in_raw(test.string, 1, test.used, except, range, stdout); diff --git a/level_0/f_print/tests/unit/c/test-print-except_in_raw_safely.c b/level_0/f_print/tests/unit/c/test-print-except_in_raw_safely.c index c884d81..6683bbd 100644 --- a/level_0/f_print/tests/unit/c/test-print-except_in_raw_safely.c +++ b/level_0/f_print/tests/unit/c/test-print-except_in_raw_safely.c @@ -12,8 +12,9 @@ void test__f_print_except_in_raw_safely__fails(void **state) { const f_string_ranges_t range = f_string_ranges_t_initialize; { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); - will_return(__wrap_ferror_unlocked, 1); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_except_in_raw_safely(test.string, 0, test.used, except, range, stdout); @@ -67,8 +68,8 @@ void test__f_print_except_in_raw_safely__works(void **state) { const f_array_lengths_t except = f_array_lengths_t_initialize; const f_string_ranges_t range = f_string_ranges_t_initialize; - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_in_raw_safely(test.string, 0, test.used, except, range, stdout); @@ -79,8 +80,8 @@ void test__f_print_except_in_raw_safely__works(void **state) { const f_array_lengths_t except = f_array_lengths_t_initialize; const f_string_ranges_t range = f_string_ranges_t_initialize; - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_in_raw_safely(test.string, 2, test.used, except, range, stdout); @@ -95,8 +96,8 @@ void test__f_print_except_in_raw_safely__works(void **state) { const f_array_lengths_t except = macro_f_array_lengths_t_initialize(lengths, 0, 1); const f_string_ranges_t range = macro_f_string_ranges_t_initialize(ranges, 0, 1); - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_in_raw_safely(test.string, 1, test.used, except, range, stdout); diff --git a/level_0/f_print/tests/unit/c/test-print-except_in_safely.c b/level_0/f_print/tests/unit/c/test-print-except_in_safely.c index 33695f8..0e411e9 100644 --- a/level_0/f_print/tests/unit/c/test-print-except_in_safely.c +++ b/level_0/f_print/tests/unit/c/test-print-except_in_safely.c @@ -12,8 +12,9 @@ void test__f_print_except_in_safely__fails(void **state) { const f_string_ranges_t range = f_string_ranges_t_initialize; { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); - will_return(__wrap_ferror_unlocked, 1); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_except_in_safely(test.string, 0, test.used, except, range, stdout); @@ -67,8 +68,8 @@ void test__f_print_except_in_safely__works(void **state) { const f_array_lengths_t except = f_array_lengths_t_initialize; const f_string_ranges_t range = f_string_ranges_t_initialize; - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_in_safely(test.string, 0, test.used, except, range, stdout); @@ -79,8 +80,8 @@ void test__f_print_except_in_safely__works(void **state) { const f_array_lengths_t except = f_array_lengths_t_initialize; const f_string_ranges_t range = f_string_ranges_t_initialize; - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_in_safely(test.string, 2, test.used, except, range, stdout); @@ -95,8 +96,8 @@ void test__f_print_except_in_safely__works(void **state) { const f_array_lengths_t except = macro_f_array_lengths_t_initialize(lengths, 0, 1); const f_string_ranges_t range = macro_f_string_ranges_t_initialize(ranges, 0, 1); - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_in_safely(test.string, 1, test.used, except, range, stdout); diff --git a/level_0/f_print/tests/unit/c/test-print-except_raw.c b/level_0/f_print/tests/unit/c/test-print-except_raw.c index bef76c6..ee39ac3 100644 --- a/level_0/f_print/tests/unit/c/test-print-except_raw.c +++ b/level_0/f_print/tests/unit/c/test-print-except_raw.c @@ -11,8 +11,9 @@ void test__f_print_except_raw__fails(void **state) { const f_array_lengths_t except = f_array_lengths_t_initialize; { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); - will_return(__wrap_ferror_unlocked, 1); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_except_raw(test.string, 0, test.used, except, stdout); @@ -63,8 +64,8 @@ void test__f_print_except_raw__works(void **state) { { const f_array_lengths_t except = f_array_lengths_t_initialize; - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_raw(test.string, 0, test.used, except, stdout); @@ -74,8 +75,8 @@ void test__f_print_except_raw__works(void **state) { { const f_array_lengths_t except = f_array_lengths_t_initialize; - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_raw(test.string, 2, test.used, except, stdout); @@ -86,8 +87,8 @@ void test__f_print_except_raw__works(void **state) { f_array_length_t lengths[] = { 3 }; const f_array_lengths_t except = macro_f_array_lengths_t_initialize(lengths, 0, 1); - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_raw(test.string, 1, test.used, except, stdout); diff --git a/level_0/f_print/tests/unit/c/test-print-except_raw_safely.c b/level_0/f_print/tests/unit/c/test-print-except_raw_safely.c index 1d19f4e..e428bf3 100644 --- a/level_0/f_print/tests/unit/c/test-print-except_raw_safely.c +++ b/level_0/f_print/tests/unit/c/test-print-except_raw_safely.c @@ -11,8 +11,9 @@ void test__f_print_except_raw_safely__fails(void **state) { const f_array_lengths_t except = f_array_lengths_t_initialize; { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); - will_return(__wrap_ferror_unlocked, 1); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_except_raw_safely(test.string, 0, test.used, except, stdout); @@ -63,8 +64,8 @@ void test__f_print_except_raw_safely__works(void **state) { { const f_array_lengths_t except = f_array_lengths_t_initialize; - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_raw_safely(test.string, 0, test.used, except, stdout); @@ -74,8 +75,8 @@ void test__f_print_except_raw_safely__works(void **state) { { const f_array_lengths_t except = f_array_lengths_t_initialize; - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_raw_safely(test.string, 2, test.used, except, stdout); @@ -86,8 +87,8 @@ void test__f_print_except_raw_safely__works(void **state) { f_array_length_t lengths[] = { 3 }; const f_array_lengths_t except = macro_f_array_lengths_t_initialize(lengths, 0, 1); - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_raw_safely(test.string, 1, test.used, except, stdout); diff --git a/level_0/f_print/tests/unit/c/test-print-except_safely.c b/level_0/f_print/tests/unit/c/test-print-except_safely.c index e9f6a0f..8caa07c 100644 --- a/level_0/f_print/tests/unit/c/test-print-except_safely.c +++ b/level_0/f_print/tests/unit/c/test-print-except_safely.c @@ -11,8 +11,9 @@ void test__f_print_except_safely__fails(void **state) { const f_array_lengths_t except = f_array_lengths_t_initialize; { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); - will_return(__wrap_ferror_unlocked, 1); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_except_safely(test.string, 0, test.used, except, stdout); @@ -63,8 +64,8 @@ void test__f_print_except_safely__works(void **state) { { const f_array_lengths_t except = f_array_lengths_t_initialize; - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_safely(test.string, 0, test.used, except, stdout); @@ -74,8 +75,8 @@ void test__f_print_except_safely__works(void **state) { { const f_array_lengths_t except = f_array_lengths_t_initialize; - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_safely(test.string, 2, test.used, except, stdout); @@ -86,8 +87,8 @@ void test__f_print_except_safely__works(void **state) { f_array_length_t lengths[] = { 3 }; const f_array_lengths_t except = macro_f_array_lengths_t_initialize(lengths, 0, 1); - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_except_safely(test.string, 1, test.used, except, stdout); diff --git a/level_0/f_print/tests/unit/c/test-print-raw.c b/level_0/f_print/tests/unit/c/test-print-raw.c index 0a8988c..cdc24d4 100644 --- a/level_0/f_print/tests/unit/c/test-print-raw.c +++ b/level_0/f_print/tests/unit/c/test-print-raw.c @@ -10,8 +10,9 @@ void test__f_print_raw__fails(void **state) { const f_string_static_t test = macro_f_string_static_t_initialize("test", 0, 4); { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); - will_return(__wrap_ferror_unlocked, 1); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_raw(test.string, test.used, stdout); @@ -58,8 +59,8 @@ void test__f_print_raw__works(void **state) { const f_string_static_t test = macro_f_string_static_t_initialize("test", 0, 4); { - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_raw(test.string, test.used, stdout); diff --git a/level_0/f_print/tests/unit/c/test-print-raw_safely.c b/level_0/f_print/tests/unit/c/test-print-raw_safely.c index 0bd375c..9014874 100644 --- a/level_0/f_print/tests/unit/c/test-print-raw_safely.c +++ b/level_0/f_print/tests/unit/c/test-print-raw_safely.c @@ -10,8 +10,9 @@ void test__f_print_raw_safely__fails(void **state) { const f_string_static_t test = macro_f_string_static_t_initialize("test", 0, 4); { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); - will_return(__wrap_ferror_unlocked, 1); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_raw_safely(test.string, test.used, stdout); @@ -58,8 +59,8 @@ void test__f_print_raw_safely__works(void **state) { const f_string_static_t test = macro_f_string_static_t_initialize("test", 0, 4); { - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_raw_safely(test.string, test.used, stdout); diff --git a/level_0/f_print/tests/unit/c/test-print-raw_terminated.c b/level_0/f_print/tests/unit/c/test-print-raw_terminated.c index 525f7a1..dba764e 100644 --- a/level_0/f_print/tests/unit/c/test-print-raw_terminated.c +++ b/level_0/f_print/tests/unit/c/test-print-raw_terminated.c @@ -10,8 +10,9 @@ void test__f_print_raw_terminated__fails(void **state) { const f_string_static_t test = macro_f_string_static_t_initialize("test", 0, 4); { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); - will_return(__wrap_ferror_unlocked, 1); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_raw_terminated(test.string, stdout); @@ -44,8 +45,8 @@ void test__f_print_raw_terminated__works(void **state) { const f_string_static_t test = macro_f_string_static_t_initialize("test", 0, 4); { - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_raw_terminated(test.string, stdout); diff --git a/level_0/f_print/tests/unit/c/test-print-safely.c b/level_0/f_print/tests/unit/c/test-print-safely.c index 5d7141f..5ce011c 100644 --- a/level_0/f_print/tests/unit/c/test-print-safely.c +++ b/level_0/f_print/tests/unit/c/test-print-safely.c @@ -10,8 +10,9 @@ void test__f_print_safely__fails(void **state) { const f_string_static_t test = macro_f_string_static_t_initialize("test", 0, 4); { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); - will_return(__wrap_ferror_unlocked, 1); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_safely(test.string, test.used, stdout); @@ -58,8 +59,8 @@ void test__f_print_safely__works(void **state) { const f_string_static_t test = macro_f_string_static_t_initialize("test", 0, 4); { - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_safely(test.string, test.used, stdout); diff --git a/level_0/f_print/tests/unit/c/test-print-safely_terminated.c b/level_0/f_print/tests/unit/c/test-print-safely_terminated.c index 49a0670..72c6ca7 100644 --- a/level_0/f_print/tests/unit/c/test-print-safely_terminated.c +++ b/level_0/f_print/tests/unit/c/test-print-safely_terminated.c @@ -10,8 +10,9 @@ void test__f_print_safely_terminated__fails(void **state) { const f_string_static_t test = macro_f_string_static_t_initialize("test", 0, 4); { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); - will_return(__wrap_ferror_unlocked, 1); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_safely_terminated(test.string, stdout); @@ -44,8 +45,8 @@ void test__f_print_safely_terminated__works(void **state) { const f_string_static_t test = macro_f_string_static_t_initialize("test", 0, 4); { - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_safely_terminated(test.string, stdout); diff --git a/level_0/f_print/tests/unit/c/test-print-terminated.c b/level_0/f_print/tests/unit/c/test-print-terminated.c index cb4a2a9..f6231fe 100644 --- a/level_0/f_print/tests/unit/c/test-print-terminated.c +++ b/level_0/f_print/tests/unit/c/test-print-terminated.c @@ -10,8 +10,9 @@ void test__f_print_terminated__fails(void **state) { const f_string_static_t test = macro_f_string_static_t_initialize("test", 0, 4); { + will_return(__wrap_fwrite_unlocked, true); will_return(__wrap_fwrite_unlocked, 0); - will_return(__wrap_ferror_unlocked, 1); + will_return(__wrap_ferror_unlocked, true); const f_status_t status = f_print_terminated(test.string, stdout); @@ -44,8 +45,8 @@ void test__f_print_terminated__works(void **state) { const f_string_static_t test = macro_f_string_static_t_initialize("test", 0, 4); { - will_return(__wrap_fwrite_unlocked, test.used); - will_return(__wrap_ferror_unlocked, 0); + will_return(__wrap_fwrite_unlocked, false); + will_return(__wrap_ferror_unlocked, false); const f_status_t status = f_print_terminated(test.string, stdout);