]> Kevux Git Server - fll/commitdiff
Update: Fix some overlooked unit tests following wrap up of re-designing the memory...
authorKevin Day <thekevinday@gmail.com>
Sun, 27 Aug 2023 22:11:39 +0000 (17:11 -0500)
committerKevin Day <thekevinday@gmail.com>
Sun, 27 Aug 2023 22:11:39 +0000 (17:11 -0500)
I forgot to run all tests and overlooked updating these.

26 files changed:
level_0/f_compare/tests/unit/c/test-compare-utf.c
level_0/f_compare/tests/unit/c/test-compare-utf_dynamic.c
level_0/f_compare/tests/unit/c/test-compare-utf_dynamic_except.c
level_0/f_compare/tests/unit/c/test-compare-utf_dynamic_except_string.c
level_0/f_compare/tests/unit/c/test-compare-utf_dynamic_except_trim.c
level_0/f_compare/tests/unit/c/test-compare-utf_dynamic_except_trim_string.c
level_0/f_compare/tests/unit/c/test-compare-utf_dynamic_partial.c
level_0/f_compare/tests/unit/c/test-compare-utf_dynamic_partial_dynamic.c
level_0/f_compare/tests/unit/c/test-compare-utf_dynamic_partial_except.c
level_0/f_compare/tests/unit/c/test-compare-utf_dynamic_partial_except_dynamic.c
level_0/f_compare/tests/unit/c/test-compare-utf_dynamic_partial_except_string.c
level_0/f_compare/tests/unit/c/test-compare-utf_dynamic_partial_except_trim.c
level_0/f_compare/tests/unit/c/test-compare-utf_dynamic_partial_except_trim_dynamic.c
level_0/f_compare/tests/unit/c/test-compare-utf_dynamic_partial_except_trim_string.c
level_0/f_compare/tests/unit/c/test-compare-utf_dynamic_partial_string.c
level_0/f_compare/tests/unit/c/test-compare-utf_dynamic_partial_trim.c
level_0/f_compare/tests/unit/c/test-compare-utf_dynamic_partial_trim_dynamic.c
level_0/f_compare/tests/unit/c/test-compare-utf_dynamic_partial_trim_string.c
level_0/f_compare/tests/unit/c/test-compare-utf_dynamic_string.c
level_0/f_compare/tests/unit/c/test-compare-utf_dynamic_trim.c
level_0/f_compare/tests/unit/c/test-compare-utf_dynamic_trim_string.c
level_0/f_compare/tests/unit/c/test-compare-utf_except.c
level_0/f_compare/tests/unit/c/test-compare-utf_except_trim.c
level_0/f_compare/tests/unit/c/test-compare-utf_trim.c
level_0/f_compare/tests/unit/c/test-compare.c
level_0/f_compare/tests/unit/c/test-compare.h

index ad64908e9fd7bb8e3df886a1745d6eecc7101783..dc8b7f9a858e6611ddd48d11b73424e743abeae1 100644 (file)
@@ -276,8 +276,8 @@ void test__f_compare_utf__works(void **state) {
     assert_int_equal(status, expects[i]);
   } // for
 
-  f_utf_string_dynamic_resize(0, &utf_string_1);
-  f_utf_string_dynamic_resize(0, &utf_string_2);
+  free((void *) utf_string_1.string);
+  free((void *) utf_string_2.string);
 }
 
 #ifdef __cplusplus
index 936cfb7faa0d018d76237d292aa2b40e6128b135..2da9c21a04faedea7d0bc4001a4208b49e0ccf2e 100644 (file)
@@ -276,8 +276,8 @@ void test__f_compare_utf_dynamic__works(void **state) {
     assert_int_equal(status, expects[i]);
   } // for
 
-  f_utf_string_dynamic_resize(0, &utf_string_1);
-  f_utf_string_dynamic_resize(0, &utf_string_2);
+  free((void *) utf_string_1.string);
+  free((void *) utf_string_2.string);
 }
 
 #ifdef __cplusplus
index 41dd391aaa3e24f818e766d9c1feecf5874a93bc..8a6e30c944b3df6733b9950f8ba093592b43454b 100644 (file)
@@ -299,8 +299,8 @@ void test__f_compare_utf_dynamic_except__works(void **state) {
     assert_int_equal(status, expects[i]);
   } // for
 
-  f_utf_string_dynamic_resize(0, &utf_string_1);
-  f_utf_string_dynamic_resize(0, &utf_string_2);
+  free((void *) utf_string_1.string);
+  free((void *) utf_string_2.string);
 }
 
 #ifdef __cplusplus
index 956ce9f87e51c1ae6e726eccac007a6f3743cc20..6aa77c8bf0b8833809e1764a873ae0e7e4d19ceb 100644 (file)
@@ -299,8 +299,8 @@ void test__f_compare_utf_dynamic_except_string__works(void **state) {
     assert_int_equal(status, expects[i]);
   } // for
 
-  f_utf_string_dynamic_resize(0, &utf_string_1);
-  f_utf_string_dynamic_resize(0, &utf_string_2);
+  free((void *) utf_string_1.string);
+  free((void *) utf_string_2.string);
 }
 
 #ifdef __cplusplus
index ce95d433c628193441faf8f9411c0c8bcc227d2b..cb3a63058fe3e860baec5b94571c553452bd36ab 100644 (file)
@@ -312,8 +312,8 @@ void test__f_compare_utf_dynamic_except_trim__works(void **state) {
     assert_int_equal(status, expects[i]);
   } // for
 
-  f_utf_string_dynamic_resize(0, &utf_string_1);
-  f_utf_string_dynamic_resize(0, &utf_string_2);
+  free((void *) utf_string_1.string);
+  free((void *) utf_string_2.string);
 }
 
 #ifdef __cplusplus
index 377e80fa7ca953b64b050f3da6eec4490115f4c3..39f4a4f25020c1d1e8bca19daa55dfea9d2b2f88 100644 (file)
@@ -312,8 +312,8 @@ void test__f_compare_utf_dynamic_except_trim_string__works(void **state) {
     assert_int_equal(status, expects[i]);
   } // for
 
-  f_utf_string_dynamic_resize(0, &utf_string_1);
-  f_utf_string_dynamic_resize(0, &utf_string_2);
+  free((void *) utf_string_1.string);
+  free((void *) utf_string_2.string);
 }
 
 #ifdef __cplusplus
index 362d46e84bd0de0a24e4e705be541b64bc18722e..3d00387156eec193e2d356a67f187bdc7b033140 100644 (file)
@@ -314,8 +314,8 @@ void test__f_compare_utf_dynamic_partial__works(void **state) {
     assert_int_equal(status, expects[i]);
   } // for
 
-  f_utf_string_dynamic_resize(0, &utf_string_1);
-  f_utf_string_dynamic_resize(0, &utf_string_2);
+  free((void *) utf_string_1.string);
+  free((void *) utf_string_2.string);
 }
 
 #ifdef __cplusplus
index 3e1f0993c50b2343258adc57fa0557bd8196f85d..8386309219694c94c59b4835acd0cb57f664881f 100644 (file)
@@ -311,8 +311,8 @@ void test__f_compare_utf_dynamic_partial_dynamic__works(void **state) {
     assert_int_equal(status, expects[i]);
   } // for
 
-  f_utf_string_dynamic_resize(0, &utf_string_1);
-  f_utf_string_dynamic_resize(0, &utf_string_2);
+  free((void *) utf_string_1.string);
+  free((void *) utf_string_2.string);
 }
 
 #ifdef __cplusplus
index 6608aebd7d502a3ed66b4beb1e2e3d5d16caba16..e8a7ae44437683b1c51af0faecdf88fc1778601b 100644 (file)
@@ -319,8 +319,8 @@ void test__f_compare_utf_dynamic_partial_except__works(void **state) {
     assert_int_equal(status, expects[i]);
   } // for
 
-  f_utf_string_dynamic_resize(0, &utf_string_1);
-  f_utf_string_dynamic_resize(0, &utf_string_2);
+  free((void *) utf_string_1.string);
+  free((void *) utf_string_2.string);
 }
 
 #ifdef __cplusplus
index dc0d0531c02ad62d4c625e67e46fa01b7fcee552..9ee8c582282fb35e21de1a0c4d20ea284afa6d0f 100644 (file)
@@ -316,8 +316,8 @@ void test__f_compare_utf_dynamic_partial_except_dynamic__works(void **state) {
     assert_int_equal(status, expects[i]);
   } // for
 
-  f_utf_string_dynamic_resize(0, &utf_string_1);
-  f_utf_string_dynamic_resize(0, &utf_string_2);
+  free((void *) utf_string_1.string);
+  free((void *) utf_string_2.string);
 }
 
 #ifdef __cplusplus
index 08adac5a211cad754a398555f007132b6c057e4d..494e1311380d411e57687573ba0b46d5d4eadc80 100644 (file)
@@ -319,8 +319,8 @@ void test__f_compare_utf_dynamic_partial_except_string__works(void **state) {
     assert_int_equal(status, expects[i]);
   } // for
 
-  f_utf_string_dynamic_resize(0, &utf_string_1);
-  f_utf_string_dynamic_resize(0, &utf_string_2);
+  free((void *) utf_string_1.string);
+  free((void *) utf_string_2.string);
 }
 
 #ifdef __cplusplus
index 7387fee0deabbb7a2f6021c31ee6e7a92b218514..f491a297589f8a6b8a46c9ed854ebac29dcc785d 100644 (file)
@@ -332,8 +332,8 @@ void test__f_compare_utf_dynamic_partial_except_trim__works(void **state) {
     assert_int_equal(status, expects[i]);
   } // for
 
-  f_utf_string_dynamic_resize(0, &utf_string_1);
-  f_utf_string_dynamic_resize(0, &utf_string_2);
+  free((void *) utf_string_1.string);
+  free((void *) utf_string_2.string);
 }
 
 #ifdef __cplusplus
index de486817fe8fbaf923a554b3cf2ca44c4962cf47..608eeb65736721b400851fd1ef46933b61876f42 100644 (file)
@@ -329,8 +329,8 @@ void test__f_compare_utf_dynamic_partial_except_trim_dynamic__works(void **state
     assert_int_equal(status, expects[i]);
   } // for
 
-  f_utf_string_dynamic_resize(0, &utf_string_1);
-  f_utf_string_dynamic_resize(0, &utf_string_2);
+  free((void *) utf_string_1.string);
+  free((void *) utf_string_2.string);
 }
 
 #ifdef __cplusplus
index b170d153c7721788d9db18d4af2d8d68c9d720b2..8b4f3bc8b821692adaa5e9d3be55eeed8d7c5efd 100644 (file)
@@ -332,8 +332,8 @@ void test__f_compare_utf_dynamic_partial_except_trim_string__works(void **state)
     assert_int_equal(status, expects[i]);
   } // for
 
-  f_utf_string_dynamic_resize(0, &utf_string_1);
-  f_utf_string_dynamic_resize(0, &utf_string_2);
+  free((void *) utf_string_1.string);
+  free((void *) utf_string_2.string);
 }
 
 #ifdef __cplusplus
index 26c7f3c687ce8a199f994de6c65c45a3142eebdf..b756ddaefdb1863ff2d84168f5334b874c7a9872 100644 (file)
@@ -314,8 +314,8 @@ void test__f_compare_utf_dynamic_partial_string__works(void **state) {
     assert_int_equal(status, expects[i]);
   } // for
 
-  f_utf_string_dynamic_resize(0, &utf_string_1);
-  f_utf_string_dynamic_resize(0, &utf_string_2);
+  free((void *) utf_string_1.string);
+  free((void *) utf_string_2.string);
 }
 
 #ifdef __cplusplus
index dcab5772e662b8f0c0dc894e6d0a834f981afc1f..1d7010ab515b1ae49e1a6b5bfb40999cef78501f 100644 (file)
@@ -327,8 +327,8 @@ void test__f_compare_utf_dynamic_partial_trim__works(void **state) {
     assert_int_equal(status, expects[i]);
   } // for
 
-  f_utf_string_dynamic_resize(0, &utf_string_1);
-  f_utf_string_dynamic_resize(0, &utf_string_2);
+  free((void *) utf_string_1.string);
+  free((void *) utf_string_2.string);
 }
 
 #ifdef __cplusplus
index ae2bd0c5c4effcbf634d48d1d322ce26b90f2756..e15a6438f26649aacc62d1b26ae1485d8cf71ccc 100644 (file)
@@ -324,8 +324,8 @@ void test__f_compare_utf_dynamic_partial_trim_dynamic__works(void **state) {
     assert_int_equal(status, expects[i]);
   } // for
 
-  f_utf_string_dynamic_resize(0, &utf_string_1);
-  f_utf_string_dynamic_resize(0, &utf_string_2);
+  free((void *) utf_string_1.string);
+  free((void *) utf_string_2.string);
 }
 
 #ifdef __cplusplus
index 50e1928f6da250598489b1a43b04abf8282e470b..544b15c208052b3571200c5d3e8d9c668564b76e 100644 (file)
@@ -327,8 +327,8 @@ void test__f_compare_utf_dynamic_partial_trim_string__works(void **state) {
     assert_int_equal(status, expects[i]);
   } // for
 
-  f_utf_string_dynamic_resize(0, &utf_string_1);
-  f_utf_string_dynamic_resize(0, &utf_string_2);
+  free((void *) utf_string_1.string);
+  free((void *) utf_string_2.string);
 }
 
 #ifdef __cplusplus
index f45a05eabad44d27209a79cc823acb4a109ead15..e8e0baeef89b7311dd0f8fe429248bfc7273dbe7 100644 (file)
@@ -276,8 +276,8 @@ void test__f_compare_utf_dynamic_string__works(void **state) {
     assert_int_equal(status, expects[i]);
   } // for
 
-  f_utf_string_dynamic_resize(0, &utf_string_1);
-  f_utf_string_dynamic_resize(0, &utf_string_2);
+  free((void *) utf_string_1.string);
+  free((void *) utf_string_2.string);
 }
 
 #ifdef __cplusplus
index 77040fe60b2e57422a0d28d36d18677214d091b0..1b6ec6dc542eaeb374009095aa4c731dde35cfa1 100644 (file)
@@ -117,8 +117,8 @@ void test__f_compare_utf_dynamic_trim__trims(void **state) {
     assert_int_equal(status, F_equal_to);
   } // for
 
-  f_utf_string_dynamic_resize(0, &utf_string_1);
-  f_utf_string_dynamic_resize(0, &utf_string_2);
+  free((void *) utf_string_1.string);
+  free((void *) utf_string_2.string);
 }
 
 void test__f_compare_utf_dynamic_trim__something_misses_nothing(void **state) {
@@ -151,7 +151,7 @@ void test__f_compare_utf_dynamic_trim__something_misses_nothing(void **state) {
     assert_int_equal(status, F_equal_to_not);
   } // for
 
-  f_utf_string_dynamic_resize(0, &utf_string_1);
+  free((void *) utf_string_1.string);
 }
 
 void test__f_compare_utf_dynamic_trim__works(void **state) {
@@ -425,8 +425,8 @@ void test__f_compare_utf_dynamic_trim__works(void **state) {
     assert_int_equal(status, expects[i]);
   } // for
 
-  f_utf_string_dynamic_resize(0, &utf_string_1);
-  f_utf_string_dynamic_resize(0, &utf_string_2);
+  free((void *) utf_string_1.string);
+  free((void *) utf_string_2.string);
 }
 
 #ifdef __cplusplus
index b09ef71f10c64f55d7ea690bc1a505c4720a0917..1b0114fe6d8011527969bf02c27a49af43a35493 100644 (file)
@@ -117,8 +117,8 @@ void test__f_compare_utf_dynamic_trim_string__trims(void **state) {
     assert_int_equal(status, F_equal_to);
   } // for
 
-  f_utf_string_dynamic_resize(0, &utf_string_1);
-  f_utf_string_dynamic_resize(0, &utf_string_2);
+  free((void *) utf_string_1.string);
+  free((void *) utf_string_2.string);
 }
 
 void test__f_compare_utf_dynamic_trim_string__something_misses_nothing(void **state) {
@@ -151,7 +151,7 @@ void test__f_compare_utf_dynamic_trim_string__something_misses_nothing(void **st
     assert_int_equal(status, F_equal_to_not);
   } // for
 
-  f_utf_string_dynamic_resize(0, &utf_string_1);
+  free((void *) utf_string_1.string);
 }
 
 void test__f_compare_utf_dynamic_trim_string__works(void **state) {
@@ -425,8 +425,8 @@ void test__f_compare_utf_dynamic_trim_string__works(void **state) {
     assert_int_equal(status, expects[i]);
   } // for
 
-  f_utf_string_dynamic_resize(0, &utf_string_1);
-  f_utf_string_dynamic_resize(0, &utf_string_2);
+  free((void *) utf_string_1.string);
+  free((void *) utf_string_2.string);
 }
 
 #ifdef __cplusplus
index f4c536dd2ea659fbcbf36a3808c708bd4d0c5e63..15b57f7c5365a5aa62d84b78ae7e064b947f6bb0 100644 (file)
@@ -299,8 +299,8 @@ void test__f_compare_utf_except__works(void **state) {
     assert_int_equal(status, expects[i]);
   } // for
 
-  f_utf_string_dynamic_resize(0, &utf_string_1);
-  f_utf_string_dynamic_resize(0, &utf_string_2);
+  free((void *) utf_string_1.string);
+  free((void *) utf_string_2.string);
 }
 
 #ifdef __cplusplus
index d8f6997d7e835f17daed65619b12871f7ae82228..e7391c313942ac916577f4e339890aaa1cf39ce3 100644 (file)
@@ -312,8 +312,8 @@ void test__f_compare_utf_except_trim__works(void **state) {
     assert_int_equal(status, expects[i]);
   } // for
 
-  f_utf_string_dynamic_resize(0, &utf_string_1);
-  f_utf_string_dynamic_resize(0, &utf_string_2);
+  free((void *) utf_string_1.string);
+  free((void *) utf_string_2.string);
 }
 
 #ifdef __cplusplus
index 4f675b47c08633e9af96dab99698d678b0c5927e..e2b9b53ce5e2886846f2dc5540c7adaa9ac490a3 100644 (file)
@@ -117,8 +117,8 @@ void test__f_compare_utf_trim__trims(void **state) {
     assert_int_equal(status, F_equal_to);
   } // for
 
-  f_utf_string_dynamic_resize(0, &utf_string_1);
-  f_utf_string_dynamic_resize(0, &utf_string_2);
+  free((void *) utf_string_1.string);
+  free((void *) utf_string_2.string);
 }
 
 void test__f_compare_utf_trim__something_misses_nothing(void **state) {
@@ -151,7 +151,7 @@ void test__f_compare_utf_trim__something_misses_nothing(void **state) {
     assert_int_equal(status, F_equal_to_not);
   } // for
 
-  f_utf_string_dynamic_resize(0, &utf_string_1);
+  free((void *) utf_string_1.string);
 }
 
 void test__f_compare_utf_trim__works(void **state) {
@@ -425,8 +425,8 @@ void test__f_compare_utf_trim__works(void **state) {
     assert_int_equal(status, expects[i]);
   } // for
 
-  f_utf_string_dynamic_resize(0, &utf_string_1);
-  f_utf_string_dynamic_resize(0, &utf_string_2);
+  free((void *) utf_string_1.string);
+  free((void *) utf_string_2.string);
 }
 
 #ifdef __cplusplus
index a22395d673c2b098736ae9185432b83a6644041b..159eb7069605069c4a27a5ee24505443d5f045f9 100644 (file)
@@ -136,7 +136,7 @@ int main(void) {
 
 f_status_t test_convert_dynamic_to_utf(const f_string_static_t dynamic, f_utf_string_dynamic_t * const utf) {
 
-  f_status_t status = f_utf_string_dynamic_resize(dynamic.used, utf);
+  f_status_t status = f_memory_array_resize(dynamic.used, sizeof(f_utf_char_t), (void **) &utf->string, &utf->used, &utf->size);
   if (F_status_is_error(status)) return status;
 
   utf->used = 0;
index aa6347d97021d37d3d0bbfab6248d75ed2baabd1..13e9de66930e1683abfa3ca154f972d6f3e16245 100644 (file)
@@ -124,11 +124,11 @@ extern int main(void);
  * @return
  *   F_okay on success.
  *
+ *   Errors (with error bit) from: f_memory_array_resize().
  *   Errors (with error bit) from: f_utf_char_to_character().
- *   Errors (with error bit) from: f_utf_string_dynamic_resize().
  *
+ * @see f_memory_array_resize()
  * @see f_utf_char_to_character()
- * @see f_utf_string_dynamic_resize()
  */
 extern f_status_t test_convert_dynamic_to_utf(const f_string_static_t dynamic, f_utf_string_dynamic_t * const utf);