]> Kevux Git Server - fll/commitdiff
Cleanup: Update unit tests in f_print to follow current __wrap_fwrite_unlocked()...
authorKevin Day <thekevinday@gmail.com>
Tue, 7 Jun 2022 04:59:26 +0000 (23:59 -0500)
committerKevin Day <thekevinday@gmail.com>
Tue, 7 Jun 2022 04:59:26 +0000 (23:59 -0500)
43 files changed:
level_0/f_print/tests/unit/c/mock-print.c
level_0/f_print/tests/unit/c/mock-print.h
level_0/f_print/tests/unit/c/test-print-.c
level_0/f_print/tests/unit/c/test-print-character.c
level_0/f_print/tests/unit/c/test-print-character_safely.c
level_0/f_print/tests/unit/c/test-print-dynamic.c
level_0/f_print/tests/unit/c/test-print-dynamic_partial.c
level_0/f_print/tests/unit/c/test-print-dynamic_partial_raw.c
level_0/f_print/tests/unit/c/test-print-dynamic_partial_raw_safely.c
level_0/f_print/tests/unit/c/test-print-dynamic_partial_safely.c
level_0/f_print/tests/unit/c/test-print-dynamic_raw.c
level_0/f_print/tests/unit/c/test-print-dynamic_raw_safely.c
level_0/f_print/tests/unit/c/test-print-dynamic_safely.c
level_0/f_print/tests/unit/c/test-print-except.c
level_0/f_print/tests/unit/c/test-print-except_dynamic.c
level_0/f_print/tests/unit/c/test-print-except_dynamic_partial.c
level_0/f_print/tests/unit/c/test-print-except_dynamic_partial_raw.c
level_0/f_print/tests/unit/c/test-print-except_dynamic_partial_raw_safely.c
level_0/f_print/tests/unit/c/test-print-except_dynamic_partial_safely.c
level_0/f_print/tests/unit/c/test-print-except_dynamic_raw.c
level_0/f_print/tests/unit/c/test-print-except_dynamic_raw_safely.c
level_0/f_print/tests/unit/c/test-print-except_dynamic_safely.c
level_0/f_print/tests/unit/c/test-print-except_in.c
level_0/f_print/tests/unit/c/test-print-except_in_dynamic.c
level_0/f_print/tests/unit/c/test-print-except_in_dynamic_partial.c
level_0/f_print/tests/unit/c/test-print-except_in_dynamic_partial_raw.c
level_0/f_print/tests/unit/c/test-print-except_in_dynamic_partial_raw_safely.c
level_0/f_print/tests/unit/c/test-print-except_in_dynamic_partial_safely.c
level_0/f_print/tests/unit/c/test-print-except_in_dynamic_raw.c
level_0/f_print/tests/unit/c/test-print-except_in_dynamic_raw_safely.c
level_0/f_print/tests/unit/c/test-print-except_in_dynamic_safely.c
level_0/f_print/tests/unit/c/test-print-except_in_raw.c
level_0/f_print/tests/unit/c/test-print-except_in_raw_safely.c
level_0/f_print/tests/unit/c/test-print-except_in_safely.c
level_0/f_print/tests/unit/c/test-print-except_raw.c
level_0/f_print/tests/unit/c/test-print-except_raw_safely.c
level_0/f_print/tests/unit/c/test-print-except_safely.c
level_0/f_print/tests/unit/c/test-print-raw.c
level_0/f_print/tests/unit/c/test-print-raw_safely.c
level_0/f_print/tests/unit/c/test-print-raw_terminated.c
level_0/f_print/tests/unit/c/test-print-safely.c
level_0/f_print/tests/unit/c/test-print-safely_terminated.c
level_0/f_print/tests/unit/c/test-print-terminated.c

index 0092af61f4299cb7ae057909ab24037fec6f0a01..cabf181afbef67b017fc422e4ce2ab1187cd0ba1 100644 (file)
@@ -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) {
index e25c33139921a83a71283ba93c579896bd97931e..bd3dae48c2c0c4740739563fd5dfe73bb13b4696 100644 (file)
@@ -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
index c122949653724cc45612fe71755ef532b038a684..7b8d16b2f80553f25e493e48b4cf96f40baabdcb 100644 (file)
@@ -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);
 
index 9334f7043e1696d54b5afadb14c26174a447c187..45fd9eb0e7e15f032ac9abde49b5325d14021f50 100644 (file)
@@ -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);
 
index d96db2d38d74dd9388cb5f2c66519a1e3eec3417..e9c3d6fe5766601a2a60ab92559f0ee47f6311d2 100644 (file)
@@ -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);
 
index 21a684aa9ddc4e5ac3e3b8b846dfad2004239e16..c2992abb8ecac998071e1ff7506e1661a0edf8ed 100644 (file)
@@ -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);
 
index 3b0c6efe3beebe2da8349afffa30d683f31331e7..d757a56a377fe26de33d20e3fb98e96939c3255c 100644 (file)
@@ -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);
 
index 3e221e9eb023a9dcb6666bb388c56e53e83b56d4..07be962ec42d51fb031fdeb4f3dd449c97eba4ba 100644 (file)
@@ -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);
 
index c6a8fd433d5f4795def189b34450d463f7853529..5a055897301881654be918cd67b18d5b655d0f40 100644 (file)
@@ -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);
 
index 57820a8c3d051035a5f27c4b90ff57ea00c5290f..1e25af8d171c3c5458ad4acc17b362ca82c42d19 100644 (file)
@@ -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);
 
index 94852e15a80b5a4530e55d983e05a53813d19fd8..8ac1bb5a3d02fdc6ea25a15a16f54b30b562e6dd 100644 (file)
@@ -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);
 
index 4e9f664226181cc700740ef2fa5f55e63099baa2..581b965da97d85b79cca37150cdce861771ffc6a 100644 (file)
@@ -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);
 
index c9c52c8082907f240fec6b021b1cac34ff4e6b17..a6963bd065139a2763fbcada3ed56228ef3b092f 100644 (file)
@@ -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);
 
index 78d5ca46f944398dc5cb6030961c4cb84fb365e1..94b5f3af3cb1c2417d1594487708cc6858fc940e 100644 (file)
@@ -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);
 
index f5cae0a04240dcbb57e4b0febe55b37169f9c647..5705ffc4c2456dc828b1e8f3da8119a235665113 100644 (file)
@@ -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);
 
index 74cc53d11ece8784a73e246ea2fb11cfb55dd8a5..03752e54600ec571537a134f595bda7e89407559 100644 (file)
@@ -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);
 
index d90fb8aed91616bc0eaef288c6af58403b92fb9f..920854cf621a0793c36e67c38d1f23f0e2a8ed04 100644 (file)
@@ -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);
 
index b70bd7d1b792830ce92ab39d9a0d0a1216ed59f0..27ad0d0cb42e229edbdf67ad4c1f549a0fb1241c 100644 (file)
@@ -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);
 
index 761c0509fa435c9e2f3eb64f8da60123865292eb..a6aad5bfc4c505fdae385f19a751bab46d7d6831 100644 (file)
@@ -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);
 
index 8b84476138e2b89ba9bc8ab2ab972d0c4bf6bd7b..d5b2ac8c0db495e1c1f9eb8ca945c372d381d0d3 100644 (file)
@@ -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);
 
index 1bdd7b432f268897c9255806fa7bf6817298cabd..8a5092a6f69b2d871d17ffb8cefa1ef7f9a4b3cf 100644 (file)
@@ -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);
 
index 4a5f91fa67c39fa4de92e6eab362023cb54f8713..4a34167c33983fbdff07e35638eeff3e7619d5ba 100644 (file)
@@ -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);
 
index 46e86a68caedbada30e1d2a2bc3be2cb98af7337..2340b7fdc3857af9606a2aaa708844e11c935196 100644 (file)
@@ -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);
 
index d16246836ab39bd9ea3d9d22b9b10c636c9bbe89..bb759c24e28d84e994655cd296a89ee2cffec0bc 100644 (file)
@@ -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);
 
index 5bc646efb056225e71f4b57b8ae394db3871ca09..522bda97156ab39dca595af2d863c9da20cdd8d4 100644 (file)
@@ -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);
 
index bb27c65dec96325ef60a625264a0e1da41720ae3..24d1ba1d6cd288d5a49b6098191d950f98e31217 100644 (file)
@@ -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);
 
index 893b4df5d97fc0ff3b25503faaf77d604b759b9d..b90ca7ece48a7109aa1ea7094515abdd0b9f123d 100644 (file)
@@ -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);
 
index 57386b3e62333cb274e0c37b98b41c8f768bc549..8c2fa1e7933ccb01d9c769aebe12264c9bf976c1 100644 (file)
@@ -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);
 
index 8faf1f02fa12291e72b8a3edf915af0b67717ca1..2ad258c1986226e4f816c6a829d43b75398b77cc 100644 (file)
@@ -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);
 
index ba13e3fca4195fe98b507c210c55e4dce9221715..0063216ddf0d89499b6763da6bdfb0ae28c8d640 100644 (file)
@@ -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);
 
index d7a377d8b97359aa7982de4769bbdfd95f68e064..e862b0b7afb3ef4eba19cf01c7c4ecdd89669e01 100644 (file)
@@ -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);
 
index 71a1d34bcee6c78b0ab47ca9c1b50606be062a69..26db7492c09bdb23417cefbb4e30303bcb24c772 100644 (file)
@@ -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);
 
index c884d817aa0f5277de72e48ceb1ddd5a9bab395a..6683bbd49dc9aec25103555ac314227da378b1cd 100644 (file)
@@ -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);
 
index 33695f860373bfeb59bba2be801509e2cf0b42bb..0e411e940cb95269e28cd13b60527ceae0c90c93 100644 (file)
@@ -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);
 
index bef76c6b45af0978fdf3c267826480ee3e3a8617..ee39ac3cc6241c45d892e7ca5637fc277373e50a 100644 (file)
@@ -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);
 
index 1d19f4e329bd168fabf8baddfaa48132e098edc2..e428bf3d6305762b4d08c4f76b2cff10e369890a 100644 (file)
@@ -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);
 
index e9f6a0f27cae88096a55474da8dbe0675d0d7b3e..8caa07c7e3808c9033cd449563bde2f297f70b6a 100644 (file)
@@ -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);
 
index 0a8988c58ab78b18ae37fcbdf0fb9b88ed062d27..cdc24d467fdcfdc18e139761e8706fbfe91ec228 100644 (file)
@@ -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);
 
index 0bd375cdaa9ab9a3710350309a65454ed3def4bd..9014874eaa0ff8b98a5356e5e5db86a114e07cba 100644 (file)
@@ -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);
 
index 525f7a1c20f4538c3e520a3ef7577ae8a9f61282..dba764ecfa04a37e5567568ff86dc0026c37f215 100644 (file)
@@ -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);
 
index 5d7141f0cc896fef8270fd07bf25c62d75b2db07..5ce011cdabdcbcc5b34a0c60f7e1aad41aa65444 100644 (file)
@@ -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);
 
index 49a0670cc224cdab36883f38bd751ae3d19052b9..72c6ca79665426f3092722858c0d8b5a55b94cac 100644 (file)
@@ -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);
 
index cb4a2a9a43f5290d6ed809ad0544367fd28e3350..f6231fec4816a507d7883eda661834eeea377a44 100644 (file)
@@ -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);