From 1ef45af1eae1a4232425a0d468409eeff0ec3202 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Sun, 19 Jan 2025 21:54:42 -0600 Subject: [PATCH] Cleanup: Fix function alphabetic ordering in unit tests. Several of the test files have the parameter_checking function out of order. I also happened to notice that the work test in some cases are also out of order. This out of order is likely a problem caused by early day mass test generation. --- level_0/f_string/tests/unit/c/test-string-append.c | 22 +++---- level_0/f_string/tests/unit/c/test-string-append.h | 8 +-- .../tests/unit/c/test-string-append_assure.c | 22 +++---- .../tests/unit/c/test-string-append_assure.h | 8 +-- .../unit/c/test-string-append_assure_nulless.c | 22 +++---- .../unit/c/test-string-append_assure_nulless.h | 8 +-- .../tests/unit/c/test-string-append_nulless.c | 22 +++---- .../tests/unit/c/test-string-append_nulless.h | 8 +-- .../tests/unit/c/test-string-dynamic_append.c | 22 +++---- .../tests/unit/c/test-string-dynamic_append.h | 8 +-- .../unit/c/test-string-dynamic_append_assure.c | 22 +++---- .../unit/c/test-string-dynamic_append_assure.h | 8 +-- .../c/test-string-dynamic_append_assure_nulless.c | 22 +++---- .../c/test-string-dynamic_append_assure_nulless.h | 8 +-- .../unit/c/test-string-dynamic_append_nulless.c | 22 +++---- .../unit/c/test-string-dynamic_append_nulless.h | 8 +-- .../tests/unit/c/test-string-dynamic_mash.c | 24 +++---- .../tests/unit/c/test-string-dynamic_mash.h | 8 +-- .../unit/c/test-string-dynamic_mash_nulless.c | 24 +++---- .../unit/c/test-string-dynamic_mash_nulless.h | 8 +-- .../tests/unit/c/test-string-dynamic_mish.c | 24 +++---- .../tests/unit/c/test-string-dynamic_mish.h | 8 +-- .../unit/c/test-string-dynamic_mish_nulless.c | 24 +++---- .../unit/c/test-string-dynamic_mish_nulless.h | 8 +-- .../unit/c/test-string-dynamic_partial_append.c | 24 +++---- .../unit/c/test-string-dynamic_partial_append.h | 8 +-- .../c/test-string-dynamic_partial_append_assure.c | 24 +++---- .../c/test-string-dynamic_partial_append_assure.h | 8 +-- ...-string-dynamic_partial_append_assure_nulless.c | 24 +++---- ...-string-dynamic_partial_append_assure_nulless.h | 8 +-- .../c/test-string-dynamic_partial_append_nulless.c | 24 +++---- .../c/test-string-dynamic_partial_append_nulless.h | 8 +-- .../unit/c/test-string-dynamic_partial_mash.c | 26 ++++---- .../unit/c/test-string-dynamic_partial_mash.h | 8 +-- .../c/test-string-dynamic_partial_mash_nulless.c | 26 ++++---- .../c/test-string-dynamic_partial_mash_nulless.h | 8 +-- .../unit/c/test-string-dynamic_partial_mish.c | 26 ++++---- .../unit/c/test-string-dynamic_partial_mish.h | 9 +-- .../c/test-string-dynamic_partial_mish_nulless.c | 26 ++++---- .../c/test-string-dynamic_partial_mish_nulless.h | 8 +-- .../unit/c/test-string-dynamic_partial_prepend.c | 24 +++---- .../unit/c/test-string-dynamic_partial_prepend.h | 8 +-- .../c/test-string-dynamic_partial_prepend_assure.c | 24 +++---- .../c/test-string-dynamic_partial_prepend_assure.h | 8 +-- ...string-dynamic_partial_prepend_assure_nulless.c | 24 +++---- ...string-dynamic_partial_prepend_assure_nulless.h | 8 +-- .../test-string-dynamic_partial_prepend_nulless.c | 24 +++---- .../test-string-dynamic_partial_prepend_nulless.h | 8 +-- .../tests/unit/c/test-string-dynamic_prepend.c | 22 +++---- .../tests/unit/c/test-string-dynamic_prepend.h | 8 +-- .../unit/c/test-string-dynamic_prepend_assure.c | 22 +++---- .../unit/c/test-string-dynamic_prepend_assure.h | 8 +-- .../c/test-string-dynamic_prepend_assure_nulless.c | 22 +++---- .../c/test-string-dynamic_prepend_assure_nulless.h | 8 +-- .../unit/c/test-string-dynamic_prepend_nulless.c | 22 +++---- .../unit/c/test-string-dynamic_prepend_nulless.h | 8 +-- .../tests/unit/c/test-string-dynamic_seek_line.c | 22 +++---- .../tests/unit/c/test-string-dynamic_seek_line.h | 14 ++-- .../unit/c/test-string-dynamic_seek_line_to.c | 24 +++---- .../unit/c/test-string-dynamic_seek_line_to.h | 14 ++-- .../tests/unit/c/test-string-dynamic_seek_to.c | 24 +++---- .../tests/unit/c/test-string-dynamic_seek_to.h | 14 ++-- .../tests/unit/c/test-string-dynamic_strip_null.c | 18 +++--- .../tests/unit/c/test-string-dynamic_strip_null.h | 12 ++-- .../unit/c/test-string-dynamic_strip_null_range.c | 22 +++---- .../unit/c/test-string-dynamic_strip_null_range.h | 14 ++-- .../tests/unit/c/test-string-dynamics_append.c | 22 +++---- .../tests/unit/c/test-string-dynamics_append.h | 8 +-- .../tests/unit/c/test-string-dynamics_append_all.c | 74 +++++++++++----------- .../tests/unit/c/test-string-dynamics_append_all.h | 8 +-- .../tests/unit/c/test-string-dynamicss_append.c | 74 +++++++++++----------- .../tests/unit/c/test-string-dynamicss_append.h | 8 +-- .../unit/c/test-string-dynamicss_append_all.c | 74 +++++++++++----------- .../unit/c/test-string-dynamicss_append_all.h | 8 +-- .../tests/unit/c/test-string-map_multis_append.c | 22 +++---- .../tests/unit/c/test-string-map_multis_append.h | 8 +-- .../unit/c/test-string-map_multis_append_all.c | 74 +++++++++++----------- .../unit/c/test-string-map_multis_append_all.h | 8 +-- .../tests/unit/c/test-string-map_multiss_append.c | 74 +++++++++++----------- .../tests/unit/c/test-string-map_multiss_append.h | 8 +-- .../unit/c/test-string-map_multiss_append_all.c | 74 +++++++++++----------- .../unit/c/test-string-map_multiss_append_all.h | 8 +-- .../tests/unit/c/test-string-maps_append.c | 22 +++---- .../tests/unit/c/test-string-maps_append.h | 8 +-- .../tests/unit/c/test-string-maps_append_all.c | 74 +++++++++++----------- .../tests/unit/c/test-string-maps_append_all.h | 8 +-- .../tests/unit/c/test-string-mapss_append.c | 74 +++++++++++----------- .../tests/unit/c/test-string-mapss_append.h | 8 +-- .../tests/unit/c/test-string-mapss_append_all.c | 74 +++++++++++----------- .../tests/unit/c/test-string-mapss_append_all.h | 8 +-- level_0/f_string/tests/unit/c/test-string-mash.c | 24 +++---- level_0/f_string/tests/unit/c/test-string-mash.h | 8 +-- .../tests/unit/c/test-string-mash_nulless.c | 24 +++---- .../tests/unit/c/test-string-mash_nulless.h | 8 +-- level_0/f_string/tests/unit/c/test-string-mish.c | 24 +++---- level_0/f_string/tests/unit/c/test-string-mish.h | 8 +-- .../tests/unit/c/test-string-mish_nulless.c | 24 +++---- .../tests/unit/c/test-string-mish_nulless.h | 8 +-- .../f_string/tests/unit/c/test-string-prepend.c | 22 +++---- .../f_string/tests/unit/c/test-string-prepend.h | 8 +-- .../tests/unit/c/test-string-prepend_assure.c | 22 +++---- .../tests/unit/c/test-string-prepend_assure.h | 8 +-- .../unit/c/test-string-prepend_assure_nulless.c | 22 +++---- .../unit/c/test-string-prepend_assure_nulless.h | 8 +-- .../tests/unit/c/test-string-prepend_nulless.c | 22 +++---- .../tests/unit/c/test-string-prepend_nulless.h | 8 +-- .../f_string/tests/unit/c/test-string-seek_line.c | 22 +++---- .../f_string/tests/unit/c/test-string-seek_line.h | 14 ++-- .../tests/unit/c/test-string-seek_line_to.c | 24 +++---- .../tests/unit/c/test-string-seek_line_to.h | 14 ++-- .../f_string/tests/unit/c/test-string-seek_to.c | 24 +++---- .../f_string/tests/unit/c/test-string-seek_to.h | 14 ++-- .../tests/unit/c/test-string-triples_append.c | 22 +++---- .../tests/unit/c/test-string-triples_append.h | 8 +-- .../tests/unit/c/test-string-triples_append_all.c | 74 +++++++++++----------- .../tests/unit/c/test-string-triples_append_all.h | 8 +-- .../tests/unit/c/test-string-tripless_append.c | 74 +++++++++++----------- .../tests/unit/c/test-string-tripless_append.h | 8 +-- .../tests/unit/c/test-string-tripless_append_all.c | 74 +++++++++++----------- .../tests/unit/c/test-string-tripless_append_all.h | 8 +-- level_0/f_utf/tests/unit/c/test-utf-append.c | 22 +++---- level_0/f_utf/tests/unit/c/test-utf-append.h | 8 +-- .../f_utf/tests/unit/c/test-utf-append_assure.c | 22 +++---- .../f_utf/tests/unit/c/test-utf-append_assure.h | 8 +-- .../tests/unit/c/test-utf-append_assure_nulless.c | 22 +++---- .../tests/unit/c/test-utf-append_assure_nulless.h | 8 +-- .../f_utf/tests/unit/c/test-utf-append_nulless.c | 22 +++---- .../f_utf/tests/unit/c/test-utf-append_nulless.h | 8 +-- .../tests/unit/c/test-utf-dynamic_append_assure.c | 22 +++---- .../tests/unit/c/test-utf-dynamic_append_assure.h | 8 +-- .../c/test-utf-dynamic_append_assure_nulless.c | 22 +++---- .../c/test-utf-dynamic_append_assure_nulless.h | 8 +-- .../tests/unit/c/test-utf-dynamic_append_nulless.c | 22 +++---- .../tests/unit/c/test-utf-dynamic_append_nulless.h | 8 +-- level_0/f_utf/tests/unit/c/test-utf-dynamic_mash.c | 24 +++---- level_0/f_utf/tests/unit/c/test-utf-dynamic_mash.h | 8 +-- .../tests/unit/c/test-utf-dynamic_mash_nulless.c | 24 +++---- .../tests/unit/c/test-utf-dynamic_mash_nulless.h | 8 +-- level_0/f_utf/tests/unit/c/test-utf-dynamic_mish.c | 24 +++---- level_0/f_utf/tests/unit/c/test-utf-dynamic_mish.h | 8 +-- .../tests/unit/c/test-utf-dynamic_mish_nulless.c | 24 +++---- .../tests/unit/c/test-utf-dynamic_mish_nulless.h | 8 +-- .../tests/unit/c/test-utf-dynamic_partial_append.c | 24 +++---- .../tests/unit/c/test-utf-dynamic_partial_append.h | 8 +-- .../c/test-utf-dynamic_partial_append_assure.c | 24 +++---- .../c/test-utf-dynamic_partial_append_assure.h | 8 +-- ...est-utf-dynamic_partial_append_assure_nulless.c | 24 +++---- ...est-utf-dynamic_partial_append_assure_nulless.h | 8 +-- .../c/test-utf-dynamic_partial_append_nulless.c | 24 +++---- .../c/test-utf-dynamic_partial_append_nulless.h | 8 +-- .../tests/unit/c/test-utf-dynamic_partial_mash.c | 26 ++++---- .../tests/unit/c/test-utf-dynamic_partial_mash.h | 8 +-- .../unit/c/test-utf-dynamic_partial_mash_nulless.c | 26 ++++---- .../unit/c/test-utf-dynamic_partial_mash_nulless.h | 8 +-- .../tests/unit/c/test-utf-dynamic_partial_mish.c | 26 ++++---- .../tests/unit/c/test-utf-dynamic_partial_mish.h | 9 +-- .../unit/c/test-utf-dynamic_partial_mish_nulless.c | 26 ++++---- .../unit/c/test-utf-dynamic_partial_mish_nulless.h | 8 +-- .../unit/c/test-utf-dynamic_partial_prepend.c | 24 +++---- .../unit/c/test-utf-dynamic_partial_prepend.h | 8 +-- .../c/test-utf-dynamic_partial_prepend_assure.c | 24 +++---- .../c/test-utf-dynamic_partial_prepend_assure.h | 8 +-- ...st-utf-dynamic_partial_prepend_assure_nulless.c | 24 +++---- ...st-utf-dynamic_partial_prepend_assure_nulless.h | 8 +-- .../c/test-utf-dynamic_partial_prepend_nulless.c | 24 +++---- .../c/test-utf-dynamic_partial_prepend_nulless.h | 8 +-- .../f_utf/tests/unit/c/test-utf-dynamic_prepend.c | 22 +++---- .../f_utf/tests/unit/c/test-utf-dynamic_prepend.h | 8 +-- .../tests/unit/c/test-utf-dynamic_prepend_assure.c | 22 +++---- .../tests/unit/c/test-utf-dynamic_prepend_assure.h | 8 +-- .../c/test-utf-dynamic_prepend_assure_nulless.c | 22 +++---- .../c/test-utf-dynamic_prepend_assure_nulless.h | 8 +-- .../unit/c/test-utf-dynamic_prepend_nulless.c | 22 +++---- .../unit/c/test-utf-dynamic_prepend_nulless.h | 8 +-- .../tests/unit/c/test-utf-dynamic_seek_line.c | 22 +++---- .../tests/unit/c/test-utf-dynamic_seek_line.h | 14 ++-- .../tests/unit/c/test-utf-dynamic_seek_line_to.c | 24 +++---- .../tests/unit/c/test-utf-dynamic_seek_line_to.h | 14 ++-- .../f_utf/tests/unit/c/test-utf-dynamic_seek_to.c | 24 +++---- .../f_utf/tests/unit/c/test-utf-dynamic_seek_to.h | 14 ++-- .../f_utf/tests/unit/c/test-utf-dynamics_append.c | 22 +++---- .../f_utf/tests/unit/c/test-utf-dynamics_append.h | 8 +-- .../tests/unit/c/test-utf-dynamics_append_all.c | 22 +++---- .../tests/unit/c/test-utf-dynamics_append_all.h | 12 ++-- .../f_utf/tests/unit/c/test-utf-dynamicss_append.c | 74 +++++++++++----------- .../f_utf/tests/unit/c/test-utf-dynamicss_append.h | 8 +-- .../tests/unit/c/test-utf-dynamicss_append_all.c | 74 +++++++++++----------- .../tests/unit/c/test-utf-dynamicss_append_all.h | 8 +-- .../tests/unit/c/test-utf-map_multis_append.c | 22 +++---- .../tests/unit/c/test-utf-map_multis_append.h | 8 +-- .../tests/unit/c/test-utf-map_multis_append_all.c | 74 +++++++++++----------- .../tests/unit/c/test-utf-map_multis_append_all.h | 8 +-- .../tests/unit/c/test-utf-map_multiss_append.c | 74 +++++++++++----------- .../tests/unit/c/test-utf-map_multiss_append.h | 8 +-- .../tests/unit/c/test-utf-map_multiss_append_all.c | 74 +++++++++++----------- .../tests/unit/c/test-utf-map_multiss_append_all.h | 8 +-- level_0/f_utf/tests/unit/c/test-utf-maps_append.c | 22 +++---- level_0/f_utf/tests/unit/c/test-utf-maps_append.h | 8 +-- .../f_utf/tests/unit/c/test-utf-maps_append_all.c | 74 +++++++++++----------- .../f_utf/tests/unit/c/test-utf-maps_append_all.h | 8 +-- level_0/f_utf/tests/unit/c/test-utf-mapss_append.c | 74 +++++++++++----------- level_0/f_utf/tests/unit/c/test-utf-mapss_append.h | 8 +-- .../f_utf/tests/unit/c/test-utf-mapss_append_all.c | 74 +++++++++++----------- .../f_utf/tests/unit/c/test-utf-mapss_append_all.h | 8 +-- level_0/f_utf/tests/unit/c/test-utf-mash.c | 24 +++---- level_0/f_utf/tests/unit/c/test-utf-mash.h | 8 +-- level_0/f_utf/tests/unit/c/test-utf-mash_nulless.c | 24 +++---- level_0/f_utf/tests/unit/c/test-utf-mash_nulless.h | 8 +-- level_0/f_utf/tests/unit/c/test-utf-mish.c | 24 +++---- level_0/f_utf/tests/unit/c/test-utf-mish.h | 8 +-- level_0/f_utf/tests/unit/c/test-utf-mish_nulless.c | 24 +++---- level_0/f_utf/tests/unit/c/test-utf-mish_nulless.h | 8 +-- level_0/f_utf/tests/unit/c/test-utf-prepend.c | 22 +++---- level_0/f_utf/tests/unit/c/test-utf-prepend.h | 8 +-- .../f_utf/tests/unit/c/test-utf-prepend_assure.c | 22 +++---- .../f_utf/tests/unit/c/test-utf-prepend_assure.h | 8 +-- .../tests/unit/c/test-utf-prepend_assure_nulless.c | 22 +++---- .../tests/unit/c/test-utf-prepend_assure_nulless.h | 8 +-- .../f_utf/tests/unit/c/test-utf-prepend_nulless.c | 22 +++---- .../f_utf/tests/unit/c/test-utf-prepend_nulless.h | 8 +-- level_0/f_utf/tests/unit/c/test-utf-seek_line.c | 22 +++---- level_0/f_utf/tests/unit/c/test-utf-seek_line.h | 14 ++-- level_0/f_utf/tests/unit/c/test-utf-seek_line_to.c | 24 +++---- level_0/f_utf/tests/unit/c/test-utf-seek_line_to.h | 12 ++-- level_0/f_utf/tests/unit/c/test-utf-seek_to.c | 24 +++---- level_0/f_utf/tests/unit/c/test-utf-seek_to.h | 12 ++-- .../f_utf/tests/unit/c/test-utf-triples_append.c | 22 +++---- .../f_utf/tests/unit/c/test-utf-triples_append.h | 8 +-- .../tests/unit/c/test-utf-triples_append_all.c | 74 +++++++++++----------- .../tests/unit/c/test-utf-triples_append_all.h | 8 +-- .../f_utf/tests/unit/c/test-utf-tripless_append.c | 74 +++++++++++----------- .../f_utf/tests/unit/c/test-utf-tripless_append.h | 8 +-- .../tests/unit/c/test-utf-tripless_append_all.c | 74 +++++++++++----------- .../tests/unit/c/test-utf-tripless_append_all.h | 8 +-- 234 files changed, 2450 insertions(+), 2448 deletions(-) diff --git a/level_0/f_string/tests/unit/c/test-string-append.c b/level_0/f_string/tests/unit/c/test-string-append.c index a239680..f0dd4e8 100644 --- a/level_0/f_string/tests/unit/c/test-string-append.c +++ b/level_0/f_string/tests/unit/c/test-string-append.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_string_append__parameter_checking(void **state) { + + const f_string_dynamic_t data = f_string_dynamic_t_initialize; + + { + const f_status_t status = f_string_append(data.string, data.used, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_append__works(void **state) { const f_string_static_t source = macro_f_string_static_t_initialize_1("te\0st", 0, 5); @@ -23,17 +34,6 @@ void test__f_string_append__works(void **state) { free((void *) destination.string); } -void test__f_string_append__parameter_checking(void **state) { - - const f_string_dynamic_t data = f_string_dynamic_t_initialize; - - { - const f_status_t status = f_string_append(data.string, data.used, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-append.h b/level_0/f_string/tests/unit/c/test-string-append.h index 2ee97dc..247fefb 100644 --- a/level_0/f_string/tests/unit/c/test-string-append.h +++ b/level_0/f_string/tests/unit/c/test-string-append.h @@ -11,17 +11,17 @@ #define _TEST__F_string_append_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_append() */ -extern void test__f_string_append__works(void **state); +extern void test__f_string_append__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_append() */ -extern void test__f_string_append__parameter_checking(void **state); +extern void test__f_string_append__works(void **state); #endif // _TEST__F_string_append_h diff --git a/level_0/f_string/tests/unit/c/test-string-append_assure.c b/level_0/f_string/tests/unit/c/test-string-append_assure.c index ce2407d..b7f3c1b 100644 --- a/level_0/f_string/tests/unit/c/test-string-append_assure.c +++ b/level_0/f_string/tests/unit/c/test-string-append_assure.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_string_append_assure__parameter_checking(void **state) { + + const f_string_dynamic_t data = f_string_dynamic_t_initialize; + + { + const f_status_t status = f_string_append_assure(data.string, data.used, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_append_assure__works(void **state) { const f_string_static_t source = macro_f_string_static_t_initialize_1("te\0st", 0, 5); @@ -34,17 +45,6 @@ void test__f_string_append_assure__works(void **state) { free((void *) destination.string); } -void test__f_string_append_assure__parameter_checking(void **state) { - - const f_string_dynamic_t data = f_string_dynamic_t_initialize; - - { - const f_status_t status = f_string_append_assure(data.string, data.used, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-append_assure.h b/level_0/f_string/tests/unit/c/test-string-append_assure.h index 02d75af..3b94e5a 100644 --- a/level_0/f_string/tests/unit/c/test-string-append_assure.h +++ b/level_0/f_string/tests/unit/c/test-string-append_assure.h @@ -11,17 +11,17 @@ #define _TEST__F_string_append_assure_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_append_assure() */ -extern void test__f_string_append_assure__works(void **state); +extern void test__f_string_append_assure__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_append_assure() */ -extern void test__f_string_append_assure__parameter_checking(void **state); +extern void test__f_string_append_assure__works(void **state); #endif // _TEST__F_string_append_assure_h diff --git a/level_0/f_string/tests/unit/c/test-string-append_assure_nulless.c b/level_0/f_string/tests/unit/c/test-string-append_assure_nulless.c index 41c2d07..6cd2b73 100644 --- a/level_0/f_string/tests/unit/c/test-string-append_assure_nulless.c +++ b/level_0/f_string/tests/unit/c/test-string-append_assure_nulless.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_string_append_assure_nulless__parameter_checking(void **state) { + + const f_string_dynamic_t data = f_string_dynamic_t_initialize; + + { + const f_status_t status = f_string_append_assure_nulless(data.string, data.used, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_append_assure_nulless__works(void **state) { const f_string_static_t source = macro_f_string_static_t_initialize_1("te\0st", 0, 5); @@ -33,17 +44,6 @@ void test__f_string_append_assure_nulless__works(void **state) { free((void *) destination.string); } -void test__f_string_append_assure_nulless__parameter_checking(void **state) { - - const f_string_dynamic_t data = f_string_dynamic_t_initialize; - - { - const f_status_t status = f_string_append_assure_nulless(data.string, data.used, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-append_assure_nulless.h b/level_0/f_string/tests/unit/c/test-string-append_assure_nulless.h index 8c72b30..0371eae 100644 --- a/level_0/f_string/tests/unit/c/test-string-append_assure_nulless.h +++ b/level_0/f_string/tests/unit/c/test-string-append_assure_nulless.h @@ -11,17 +11,17 @@ #define _TEST__F_string_append_assure_nulless_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_append_assure_nulless() */ -extern void test__f_string_append_assure_nulless__works(void **state); +extern void test__f_string_append_assure_nulless__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_append_assure_nulless() */ -extern void test__f_string_append_assure_nulless__parameter_checking(void **state); +extern void test__f_string_append_assure_nulless__works(void **state); #endif // _TEST__F_string_append_assure_nulless_h diff --git a/level_0/f_string/tests/unit/c/test-string-append_nulless.c b/level_0/f_string/tests/unit/c/test-string-append_nulless.c index 479b950..ee4f8e3 100644 --- a/level_0/f_string/tests/unit/c/test-string-append_nulless.c +++ b/level_0/f_string/tests/unit/c/test-string-append_nulless.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_string_append_nulless__parameter_checking(void **state) { + + const f_string_dynamic_t data = f_string_dynamic_t_initialize; + + { + const f_status_t status = f_string_append_nulless(data.string, data.used, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_append_nulless__works(void **state) { const f_string_static_t source = macro_f_string_static_t_initialize_1("te\0st", 0, 5); @@ -23,17 +34,6 @@ void test__f_string_append_nulless__works(void **state) { free((void *) destination.string); } -void test__f_string_append_nulless__parameter_checking(void **state) { - - const f_string_dynamic_t data = f_string_dynamic_t_initialize; - - { - const f_status_t status = f_string_append_nulless(data.string, data.used, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-append_nulless.h b/level_0/f_string/tests/unit/c/test-string-append_nulless.h index 7d1bf20..db68447 100644 --- a/level_0/f_string/tests/unit/c/test-string-append_nulless.h +++ b/level_0/f_string/tests/unit/c/test-string-append_nulless.h @@ -11,17 +11,17 @@ #define _TEST__F_string_append_nulless_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_append_nulless() */ -extern void test__f_string_append_nulless__works(void **state); +extern void test__f_string_append_nulless__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_append_nulless() */ -extern void test__f_string_append_nulless__parameter_checking(void **state); +extern void test__f_string_append_nulless__works(void **state); #endif // _TEST__F_string_append_nulless_h diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_append.c b/level_0/f_string/tests/unit/c/test-string-dynamic_append.c index 0f0d544..4f0aebf 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_append.c +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_append.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_string_dynamic_append__parameter_checking(void **state) { + + const f_string_dynamic_t data = f_string_dynamic_t_initialize; + + { + const f_status_t status = f_string_dynamic_append(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_dynamic_append__works(void **state) { const f_string_static_t source = macro_f_string_static_t_initialize_1("te\0st", 0, 5); @@ -23,17 +34,6 @@ void test__f_string_dynamic_append__works(void **state) { free((void *) destination.string); } -void test__f_string_dynamic_append__parameter_checking(void **state) { - - const f_string_dynamic_t data = f_string_dynamic_t_initialize; - - { - const f_status_t status = f_string_dynamic_append(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_append.h b/level_0/f_string/tests/unit/c/test-string-dynamic_append.h index a89a35e..a2f8186 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_append.h +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_append.h @@ -11,17 +11,17 @@ #define _TEST__F_string_dynamic_append_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_dynamic_append() */ -extern void test__f_string_dynamic_append__works(void **state); +extern void test__f_string_dynamic_append__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_dynamic_append() */ -extern void test__f_string_dynamic_append__parameter_checking(void **state); +extern void test__f_string_dynamic_append__works(void **state); #endif // _TEST__F_string_dynamic_append_h diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_append_assure.c b/level_0/f_string/tests/unit/c/test-string-dynamic_append_assure.c index 511d85a..8939501 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_append_assure.c +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_append_assure.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_string_dynamic_append_assure__parameter_checking(void **state) { + + const f_string_dynamic_t data = f_string_dynamic_t_initialize; + + { + const f_status_t status = f_string_dynamic_append_assure(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_dynamic_append_assure__works(void **state) { const f_string_static_t source = macro_f_string_static_t_initialize_1("te\0st", 0, 5); @@ -34,17 +45,6 @@ void test__f_string_dynamic_append_assure__works(void **state) { free((void *) destination.string); } -void test__f_string_dynamic_append_assure__parameter_checking(void **state) { - - const f_string_dynamic_t data = f_string_dynamic_t_initialize; - - { - const f_status_t status = f_string_dynamic_append_assure(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_append_assure.h b/level_0/f_string/tests/unit/c/test-string-dynamic_append_assure.h index 72d9457..b3fa05d 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_append_assure.h +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_append_assure.h @@ -11,17 +11,17 @@ #define _TEST__F_string_dynamic_append_assure_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_dynamic_append_assure() */ -extern void test__f_string_dynamic_append_assure__works(void **state); +extern void test__f_string_dynamic_append_assure__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_dynamic_append_assure() */ -extern void test__f_string_dynamic_append_assure__parameter_checking(void **state); +extern void test__f_string_dynamic_append_assure__works(void **state); #endif // _TEST__F_string_dynamic_append_assure_h diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_append_assure_nulless.c b/level_0/f_string/tests/unit/c/test-string-dynamic_append_assure_nulless.c index e94ac93..e5d6eef 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_append_assure_nulless.c +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_append_assure_nulless.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_string_dynamic_append_assure_nulless__parameter_checking(void **state) { + + const f_string_dynamic_t data = f_string_dynamic_t_initialize; + + { + const f_status_t status = f_string_dynamic_append_assure_nulless(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_dynamic_append_assure_nulless__works(void **state) { const f_string_static_t source = macro_f_string_static_t_initialize_1("te\0st", 0, 5); @@ -33,17 +44,6 @@ void test__f_string_dynamic_append_assure_nulless__works(void **state) { free((void *) destination.string); } -void test__f_string_dynamic_append_assure_nulless__parameter_checking(void **state) { - - const f_string_dynamic_t data = f_string_dynamic_t_initialize; - - { - const f_status_t status = f_string_dynamic_append_assure_nulless(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_append_assure_nulless.h b/level_0/f_string/tests/unit/c/test-string-dynamic_append_assure_nulless.h index 83a7097..b6ff348 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_append_assure_nulless.h +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_append_assure_nulless.h @@ -11,17 +11,17 @@ #define _TEST__F_string_dynamic_append_assure_nulless_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_dynamic_append_assure_nulless() */ -extern void test__f_string_dynamic_append_assure_nulless__works(void **state); +extern void test__f_string_dynamic_append_assure_nulless__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_dynamic_append_assure_nulless() */ -extern void test__f_string_dynamic_append_assure_nulless__parameter_checking(void **state); +extern void test__f_string_dynamic_append_assure_nulless__works(void **state); #endif // _TEST__F_string_dynamic_append_assure_nulless_h diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_append_nulless.c b/level_0/f_string/tests/unit/c/test-string-dynamic_append_nulless.c index 48e24e0..c5bc6be 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_append_nulless.c +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_append_nulless.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_string_dynamic_append_nulless__parameter_checking(void **state) { + + const f_string_dynamic_t data = f_string_dynamic_t_initialize; + + { + const f_status_t status = f_string_dynamic_append_nulless(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_dynamic_append_nulless__works(void **state) { const f_string_static_t source = macro_f_string_static_t_initialize_1("te\0st", 0, 5); @@ -23,17 +34,6 @@ void test__f_string_dynamic_append_nulless__works(void **state) { free((void *) destination.string); } -void test__f_string_dynamic_append_nulless__parameter_checking(void **state) { - - const f_string_dynamic_t data = f_string_dynamic_t_initialize; - - { - const f_status_t status = f_string_dynamic_append_nulless(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_append_nulless.h b/level_0/f_string/tests/unit/c/test-string-dynamic_append_nulless.h index 5942a5f..fd1b006 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_append_nulless.h +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_append_nulless.h @@ -11,17 +11,17 @@ #define _TEST__F_string_dynamic_append_nulless_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_dynamic_append_nulless() */ -extern void test__f_string_dynamic_append_nulless__works(void **state); +extern void test__f_string_dynamic_append_nulless__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_dynamic_append_nulless() */ -extern void test__f_string_dynamic_append_nulless__parameter_checking(void **state); +extern void test__f_string_dynamic_append_nulless__works(void **state); #endif // _TEST__F_string_dynamic_append_nulless_h diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_mash.c b/level_0/f_string/tests/unit/c/test-string-dynamic_mash.c index 4a3ad7e..ac20a5e 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_mash.c +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_mash.c @@ -5,6 +5,18 @@ extern "C" { #endif +void test__f_string_dynamic_mash__parameter_checking(void **state) { + + const f_string_static_t glue = macro_f_string_static_t_initialize_1(":", 0, 1); + const f_string_static_t source = macro_f_string_static_t_initialize_1("te\0st", 0, 5); + + { + const f_status_t status = f_string_dynamic_mash(glue, source, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_dynamic_mash__works(void **state) { const f_string_static_t glue = macro_f_string_static_t_initialize_1(":", 0, 1); @@ -37,18 +49,6 @@ void test__f_string_dynamic_mash__works(void **state) { free((void *) destination.string); } -void test__f_string_dynamic_mash__parameter_checking(void **state) { - - const f_string_static_t glue = macro_f_string_static_t_initialize_1(":", 0, 1); - const f_string_static_t source = macro_f_string_static_t_initialize_1("te\0st", 0, 5); - - { - const f_status_t status = f_string_dynamic_mash(glue, source, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_mash.h b/level_0/f_string/tests/unit/c/test-string-dynamic_mash.h index c92487d..480cd39 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_mash.h +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_mash.h @@ -11,17 +11,17 @@ #define _TEST__F_string_dynamic_mash_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_dynamic_mash() */ -extern void test__f_string_dynamic_mash__works(void **state); +extern void test__f_string_dynamic_mash__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_dynamic_mash() */ -extern void test__f_string_dynamic_mash__parameter_checking(void **state); +extern void test__f_string_dynamic_mash__works(void **state); #endif // _TEST__F_string_dynamic_mash_h diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_mash_nulless.c b/level_0/f_string/tests/unit/c/test-string-dynamic_mash_nulless.c index 6aaaba3..aa7f154 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_mash_nulless.c +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_mash_nulless.c @@ -5,6 +5,18 @@ extern "C" { #endif +void test__f_string_dynamic_mash_nulless__parameter_checking(void **state) { + + const f_string_static_t glue = macro_f_string_static_t_initialize_1(":", 0, 1); + const f_string_static_t source = macro_f_string_static_t_initialize_1("te\0st", 0, 5); + + { + const f_status_t status = f_string_dynamic_mash_nulless(glue, source, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_dynamic_mash_nulless__works(void **state) { const f_string_static_t glue = macro_f_string_static_t_initialize_1(":", 0, 1); @@ -35,18 +47,6 @@ void test__f_string_dynamic_mash_nulless__works(void **state) { free((void *) destination.string); } -void test__f_string_dynamic_mash_nulless__parameter_checking(void **state) { - - const f_string_static_t glue = macro_f_string_static_t_initialize_1(":", 0, 1); - const f_string_static_t source = macro_f_string_static_t_initialize_1("te\0st", 0, 5); - - { - const f_status_t status = f_string_dynamic_mash_nulless(glue, source, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_mash_nulless.h b/level_0/f_string/tests/unit/c/test-string-dynamic_mash_nulless.h index 4744097..5d7146f 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_mash_nulless.h +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_mash_nulless.h @@ -11,17 +11,17 @@ #define _TEST__F_string_dynamic_mash_nulless_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_dynamic_mash_nulless() */ -extern void test__f_string_dynamic_mash_nulless__works(void **state); +extern void test__f_string_dynamic_mash_nulless__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_dynamic_mash_nulless() */ -extern void test__f_string_dynamic_mash_nulless__parameter_checking(void **state); +extern void test__f_string_dynamic_mash_nulless__works(void **state); #endif // _TEST__F_string_dynamic_mash_nulless_h diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_mish.c b/level_0/f_string/tests/unit/c/test-string-dynamic_mish.c index 7df910b..2428175 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_mish.c +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_mish.c @@ -5,6 +5,18 @@ extern "C" { #endif +void test__f_string_dynamic_mish__parameter_checking(void **state) { + + const f_string_static_t glue = macro_f_string_static_t_initialize_1(":", 0, 1); + const f_string_static_t source = macro_f_string_static_t_initialize_1("te\0st", 0, 5); + + { + const f_status_t status = f_string_dynamic_mish(glue, source, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_dynamic_mish__works(void **state) { const f_string_static_t glue = macro_f_string_static_t_initialize_1(":", 0, 1); @@ -37,18 +49,6 @@ void test__f_string_dynamic_mish__works(void **state) { free((void *) destination.string); } -void test__f_string_dynamic_mish__parameter_checking(void **state) { - - const f_string_static_t glue = macro_f_string_static_t_initialize_1(":", 0, 1); - const f_string_static_t source = macro_f_string_static_t_initialize_1("te\0st", 0, 5); - - { - const f_status_t status = f_string_dynamic_mish(glue, source, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_mish.h b/level_0/f_string/tests/unit/c/test-string-dynamic_mish.h index ba3ebde..d99b015 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_mish.h +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_mish.h @@ -11,17 +11,17 @@ #define _TEST__F_string_dynamic_mish_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_dynamic_mish() */ -extern void test__f_string_dynamic_mish__works(void **state); +extern void test__f_string_dynamic_mish__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_dynamic_mish() */ -extern void test__f_string_dynamic_mish__parameter_checking(void **state); +extern void test__f_string_dynamic_mish__works(void **state); #endif // _TEST__F_string_dynamic_mish_h diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_mish_nulless.c b/level_0/f_string/tests/unit/c/test-string-dynamic_mish_nulless.c index 42ee635..911e075 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_mish_nulless.c +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_mish_nulless.c @@ -5,6 +5,18 @@ extern "C" { #endif +void test__f_string_dynamic_mish_nulless__parameter_checking(void **state) { + + const f_string_static_t glue = macro_f_string_static_t_initialize_1(":", 0, 1); + const f_string_static_t source = macro_f_string_static_t_initialize_1("te\0st", 0, 5); + + { + const f_status_t status = f_string_dynamic_mish_nulless(glue, source, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_dynamic_mish_nulless__works(void **state) { const f_string_static_t glue = macro_f_string_static_t_initialize_1(":", 0, 1); @@ -35,18 +47,6 @@ void test__f_string_dynamic_mish_nulless__works(void **state) { free((void *) destination.string); } -void test__f_string_dynamic_mish_nulless__parameter_checking(void **state) { - - const f_string_static_t glue = macro_f_string_static_t_initialize_1(":", 0, 1); - const f_string_static_t source = macro_f_string_static_t_initialize_1("te\0st", 0, 5); - - { - const f_status_t status = f_string_dynamic_mish_nulless(glue, source, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_mish_nulless.h b/level_0/f_string/tests/unit/c/test-string-dynamic_mish_nulless.h index f3745b0..edcec8a 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_mish_nulless.h +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_mish_nulless.h @@ -11,17 +11,17 @@ #define _TEST__F_string_dynamic_mish_nulless_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_dynamic_mish_nulless() */ -extern void test__f_string_dynamic_mish_nulless__works(void **state); +extern void test__f_string_dynamic_mish_nulless__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_dynamic_mish_nulless() */ -extern void test__f_string_dynamic_mish_nulless__parameter_checking(void **state); +extern void test__f_string_dynamic_mish_nulless__works(void **state); #endif // _TEST__F_string_dynamic_mish_nulless_h diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_append.c b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_append.c index 2e3a44a..a29827f 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_append.c +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_append.c @@ -5,6 +5,18 @@ extern "C" { #endif +void test__f_string_dynamic_partial_append__parameter_checking(void **state) { + + const f_string_dynamic_t data = f_string_dynamic_t_initialize; + const f_range_t partial = f_range_t_initialize; + + { + const f_status_t status = f_string_dynamic_partial_append(data, partial, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_dynamic_partial_append__works(void **state) { const f_string_static_t source = macro_f_string_static_t_initialize_1("_te\0st_", 0, 7); @@ -25,18 +37,6 @@ void test__f_string_dynamic_partial_append__works(void **state) { free((void *) destination.string); } -void test__f_string_dynamic_partial_append__parameter_checking(void **state) { - - const f_string_dynamic_t data = f_string_dynamic_t_initialize; - const f_range_t partial = f_range_t_initialize; - - { - const f_status_t status = f_string_dynamic_partial_append(data, partial, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_append.h b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_append.h index 8bb8cdc..538b805 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_append.h +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_append.h @@ -11,17 +11,17 @@ #define _TEST__F_string_dynamic_partial_append_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_dynamic_partial_append() */ -extern void test__f_string_dynamic_partial_append__works(void **state); +extern void test__f_string_dynamic_partial_append__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_dynamic_partial_append() */ -extern void test__f_string_dynamic_partial_append__parameter_checking(void **state); +extern void test__f_string_dynamic_partial_append__works(void **state); #endif // _TEST__F_string_dynamic_partial_append_h diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_append_assure.c b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_append_assure.c index 67a96f3..67f510a 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_append_assure.c +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_append_assure.c @@ -5,6 +5,18 @@ extern "C" { #endif +void test__f_string_dynamic_partial_append_assure__parameter_checking(void **state) { + + const f_string_dynamic_t data = f_string_dynamic_t_initialize; + const f_range_t partial = f_range_t_initialize; + + { + const f_status_t status = f_string_dynamic_partial_append_assure(data, partial, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_dynamic_partial_append_assure__works(void **state) { const f_string_static_t source = macro_f_string_static_t_initialize_1("_te\0st_", 0, 7); @@ -36,18 +48,6 @@ void test__f_string_dynamic_partial_append_assure__works(void **state) { free((void *) destination.string); } -void test__f_string_dynamic_partial_append_assure__parameter_checking(void **state) { - - const f_string_dynamic_t data = f_string_dynamic_t_initialize; - const f_range_t partial = f_range_t_initialize; - - { - const f_status_t status = f_string_dynamic_partial_append_assure(data, partial, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_append_assure.h b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_append_assure.h index e8e6bf4..23e5eef 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_append_assure.h +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_append_assure.h @@ -11,17 +11,17 @@ #define _TEST__F_string_dynamic_partial_append_assure_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_dynamic_partial_append_assure() */ -extern void test__f_string_dynamic_partial_append_assure__works(void **state); +extern void test__f_string_dynamic_partial_append_assure__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_dynamic_partial_append_assure() */ -extern void test__f_string_dynamic_partial_append_assure__parameter_checking(void **state); +extern void test__f_string_dynamic_partial_append_assure__works(void **state); #endif // _TEST__F_string_dynamic_partial_append_assure_h diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_append_assure_nulless.c b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_append_assure_nulless.c index b3d555a..2e9463b 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_append_assure_nulless.c +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_append_assure_nulless.c @@ -5,6 +5,18 @@ extern "C" { #endif +void test__f_string_dynamic_partial_append_assure_nulless__parameter_checking(void **state) { + + const f_string_dynamic_t data = f_string_dynamic_t_initialize; + const f_range_t partial = f_range_t_initialize; + + { + const f_status_t status = f_string_dynamic_partial_append_assure_nulless(data, partial, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_dynamic_partial_append_assure_nulless__works(void **state) { const f_string_static_t source = macro_f_string_static_t_initialize_1("_te\0st_", 0, 7); @@ -34,18 +46,6 @@ void test__f_string_dynamic_partial_append_assure_nulless__works(void **state) { free((void *) destination.string); } -void test__f_string_dynamic_partial_append_assure_nulless__parameter_checking(void **state) { - - const f_string_dynamic_t data = f_string_dynamic_t_initialize; - const f_range_t partial = f_range_t_initialize; - - { - const f_status_t status = f_string_dynamic_partial_append_assure_nulless(data, partial, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_append_assure_nulless.h b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_append_assure_nulless.h index c46708c..b2a7654 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_append_assure_nulless.h +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_append_assure_nulless.h @@ -11,17 +11,17 @@ #define _TEST__F_string_dynamic_partial_append_assure_nulless_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_dynamic_partial_append_assure_nulless() */ -extern void test__f_string_dynamic_partial_append_assure_nulless__works(void **state); +extern void test__f_string_dynamic_partial_append_assure_nulless__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_dynamic_partial_append_assure_nulless() */ -extern void test__f_string_dynamic_partial_append_assure_nulless__parameter_checking(void **state); +extern void test__f_string_dynamic_partial_append_assure_nulless__works(void **state); #endif // _TEST__F_string_dynamic_partial_append_assure_nulless_h diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_append_nulless.c b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_append_nulless.c index 01d864f..56d6434 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_append_nulless.c +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_append_nulless.c @@ -5,6 +5,18 @@ extern "C" { #endif +void test__f_string_dynamic_partial_append_nulless__parameter_checking(void **state) { + + const f_string_dynamic_t data = f_string_dynamic_t_initialize; + const f_range_t partial = f_range_t_initialize; + + { + const f_status_t status = f_string_dynamic_partial_append_nulless(data, partial, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_dynamic_partial_append_nulless__works(void **state) { const f_string_static_t source = macro_f_string_static_t_initialize_1("_te\0st_", 0, 7); @@ -24,18 +36,6 @@ void test__f_string_dynamic_partial_append_nulless__works(void **state) { free((void *) destination.string); } -void test__f_string_dynamic_partial_append_nulless__parameter_checking(void **state) { - - const f_string_dynamic_t data = f_string_dynamic_t_initialize; - const f_range_t partial = f_range_t_initialize; - - { - const f_status_t status = f_string_dynamic_partial_append_nulless(data, partial, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_append_nulless.h b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_append_nulless.h index ddd85fc..0b90780 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_append_nulless.h +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_append_nulless.h @@ -11,17 +11,17 @@ #define _TEST__F_string_dynamic_partial_append_nulless_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_dynamic_partial_append_nulless() */ -extern void test__f_string_dynamic_partial_append_nulless__works(void **state); +extern void test__f_string_dynamic_partial_append_nulless__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_dynamic_partial_append_nulless() */ -extern void test__f_string_dynamic_partial_append_nulless__parameter_checking(void **state); +extern void test__f_string_dynamic_partial_append_nulless__works(void **state); #endif // _TEST__F_string_dynamic_partial_append_nulless_h diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_mash.c b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_mash.c index fb357b3..3de5085 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_mash.c +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_mash.c @@ -5,6 +5,19 @@ extern "C" { #endif +void test__f_string_dynamic_partial_mash__parameter_checking(void **state) { + + const f_string_static_t glue = macro_f_string_static_t_initialize_1(":", 0, 1); + const f_string_static_t source = macro_f_string_static_t_initialize_1("te\0st", 0, 5); + const f_range_t partial = f_range_t_initialize; + + { + const f_status_t status = f_string_dynamic_partial_mash(glue, source, partial, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_dynamic_partial_mash__works(void **state) { const f_string_static_t glue = macro_f_string_static_t_initialize_1(":", 0, 1); @@ -39,19 +52,6 @@ void test__f_string_dynamic_partial_mash__works(void **state) { free((void *) destination.string); } -void test__f_string_dynamic_partial_mash__parameter_checking(void **state) { - - const f_string_static_t glue = macro_f_string_static_t_initialize_1(":", 0, 1); - const f_string_static_t source = macro_f_string_static_t_initialize_1("te\0st", 0, 5); - const f_range_t partial = f_range_t_initialize; - - { - const f_status_t status = f_string_dynamic_partial_mash(glue, source, partial, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_mash.h b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_mash.h index 0629f3d..20a2649 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_mash.h +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_mash.h @@ -11,17 +11,17 @@ #define _TEST__F_string_dynamic_partial_mash_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_dynamic_partial_mash() */ -extern void test__f_string_dynamic_partial_mash__works(void **state); +extern void test__f_string_dynamic_partial_mash__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_dynamic_partial_mash() */ -extern void test__f_string_dynamic_partial_mash__parameter_checking(void **state); +extern void test__f_string_dynamic_partial_mash__works(void **state); #endif // _TEST__F_string_dynamic_partial_mash_h diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_mash_nulless.c b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_mash_nulless.c index 0e8428d..953017a 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_mash_nulless.c +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_mash_nulless.c @@ -5,6 +5,19 @@ extern "C" { #endif +void test__f_string_dynamic_partial_mash_nulless__parameter_checking(void **state) { + + const f_string_static_t glue = macro_f_string_static_t_initialize_1(":", 0, 1); + const f_string_static_t source = macro_f_string_static_t_initialize_1("te\0st", 0, 5); + const f_range_t partial = f_range_t_initialize; + + { + const f_status_t status = f_string_dynamic_partial_mash_nulless(glue, source, partial, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_dynamic_partial_mash_nulless__works(void **state) { const f_string_static_t glue = macro_f_string_static_t_initialize_1(":", 0, 1); @@ -36,19 +49,6 @@ void test__f_string_dynamic_partial_mash_nulless__works(void **state) { free((void *) destination.string); } -void test__f_string_dynamic_partial_mash_nulless__parameter_checking(void **state) { - - const f_string_static_t glue = macro_f_string_static_t_initialize_1(":", 0, 1); - const f_string_static_t source = macro_f_string_static_t_initialize_1("te\0st", 0, 5); - const f_range_t partial = f_range_t_initialize; - - { - const f_status_t status = f_string_dynamic_partial_mash_nulless(glue, source, partial, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_mash_nulless.h b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_mash_nulless.h index 838fd05..25d1f9c 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_mash_nulless.h +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_mash_nulless.h @@ -11,17 +11,17 @@ #define _TEST__F_string_dynamic_partial_mash_nulless_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_dynamic_partial_mash_nulless() */ -extern void test__f_string_dynamic_partial_mash_nulless__works(void **state); +extern void test__f_string_dynamic_partial_mash_nulless__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_dynamic_partial_mash_nulless() */ -extern void test__f_string_dynamic_partial_mash_nulless__parameter_checking(void **state); +extern void test__f_string_dynamic_partial_mash_nulless__works(void **state); #endif // _TEST__F_string_dynamic_partial_mash_nulless_h diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_mish.c b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_mish.c index f83dfe0..f8de2b7 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_mish.c +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_mish.c @@ -5,6 +5,19 @@ extern "C" { #endif +void test__f_string_dynamic_partial_mish__parameter_checking(void **state) { + + const f_string_static_t glue = macro_f_string_static_t_initialize_1(":", 0, 1); + const f_string_static_t source = macro_f_string_static_t_initialize_1("te\0st", 0, 5); + const f_range_t partial = f_range_t_initialize; + + { + const f_status_t status = f_string_dynamic_partial_mish(glue, source, partial, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_dynamic_partial_mish__works(void **state) { const f_string_static_t glue = macro_f_string_static_t_initialize_1(":", 0, 1); @@ -39,19 +52,6 @@ void test__f_string_dynamic_partial_mish__works(void **state) { free((void *) destination.string); } -void test__f_string_dynamic_partial_mish__parameter_checking(void **state) { - - const f_string_static_t glue = macro_f_string_static_t_initialize_1(":", 0, 1); - const f_string_static_t source = macro_f_string_static_t_initialize_1("te\0st", 0, 5); - const f_range_t partial = f_range_t_initialize; - - { - const f_status_t status = f_string_dynamic_partial_mish(glue, source, partial, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_mish.h b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_mish.h index 5e27957..5ce563f 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_mish.h +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_mish.h @@ -11,16 +11,17 @@ #define _TEST__F_string_dynamic_partial_mish_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_dynamic_partial_mish() */ -extern void test__f_string_dynamic_partial_mish__works(void **state); +extern void test__f_string_dynamic_partial_mish__parameter_checking(void **state); + /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_dynamic_partial_mish() */ -extern void test__f_string_dynamic_partial_mish__parameter_checking(void **state); +extern void test__f_string_dynamic_partial_mish__works(void **state); #endif // _TEST__F_string_dynamic_partial_mish_h diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_mish_nulless.c b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_mish_nulless.c index 9c1afe7..c689566 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_mish_nulless.c +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_mish_nulless.c @@ -5,6 +5,19 @@ extern "C" { #endif +void test__f_string_dynamic_partial_mish_nulless__parameter_checking(void **state) { + + const f_string_static_t glue = macro_f_string_static_t_initialize_1(":", 0, 1); + const f_string_static_t source = macro_f_string_static_t_initialize_1("te\0st", 0, 5); + const f_range_t partial = f_range_t_initialize; + + { + const f_status_t status = f_string_dynamic_partial_mish_nulless(glue, source, partial, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_dynamic_partial_mish_nulless__works(void **state) { const f_string_static_t glue = macro_f_string_static_t_initialize_1(":", 0, 1); @@ -36,19 +49,6 @@ void test__f_string_dynamic_partial_mish_nulless__works(void **state) { free((void *) destination.string); } -void test__f_string_dynamic_partial_mish_nulless__parameter_checking(void **state) { - - const f_string_static_t glue = macro_f_string_static_t_initialize_1(":", 0, 1); - const f_string_static_t source = macro_f_string_static_t_initialize_1("te\0st", 0, 5); - const f_range_t partial = f_range_t_initialize; - - { - const f_status_t status = f_string_dynamic_partial_mish_nulless(glue, source, partial, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_mish_nulless.h b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_mish_nulless.h index 29b02ec..915f677 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_mish_nulless.h +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_mish_nulless.h @@ -11,17 +11,17 @@ #define _TEST__F_string_dynamic_partial_mish_nulless_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_dynamic_partial_mish_nulless() */ -extern void test__f_string_dynamic_partial_mish_nulless__works(void **state); +extern void test__f_string_dynamic_partial_mish_nulless__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_dynamic_partial_mish_nulless() */ -extern void test__f_string_dynamic_partial_mish_nulless__parameter_checking(void **state); +extern void test__f_string_dynamic_partial_mish_nulless__works(void **state); #endif // _TEST__F_string_dynamic_partial_mish_nulless_h diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_prepend.c b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_prepend.c index decba43..5ac7118 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_prepend.c +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_prepend.c @@ -5,6 +5,18 @@ extern "C" { #endif +void test__f_string_dynamic_partial_prepend__parameter_checking(void **state) { + + const f_string_dynamic_t data = f_string_dynamic_t_initialize; + const f_range_t partial = f_range_t_initialize; + + { + const f_status_t status = f_string_dynamic_partial_prepend(data, partial, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_dynamic_partial_prepend__works(void **state) { const f_string_static_t source = macro_f_string_static_t_initialize_1("_te\0st_", 0, 7); @@ -25,18 +37,6 @@ void test__f_string_dynamic_partial_prepend__works(void **state) { free((void *) destination.string); } -void test__f_string_dynamic_partial_prepend__parameter_checking(void **state) { - - const f_string_dynamic_t data = f_string_dynamic_t_initialize; - const f_range_t partial = f_range_t_initialize; - - { - const f_status_t status = f_string_dynamic_partial_prepend(data, partial, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_prepend.h b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_prepend.h index 891ac07..6b0cb2d 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_prepend.h +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_prepend.h @@ -11,17 +11,17 @@ #define _TEST__F_string_dynamic_partial_prepend_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_dynamic_partial_prepend() */ -extern void test__f_string_dynamic_partial_prepend__works(void **state); +extern void test__f_string_dynamic_partial_prepend__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_dynamic_partial_prepend() */ -extern void test__f_string_dynamic_partial_prepend__parameter_checking(void **state); +extern void test__f_string_dynamic_partial_prepend__works(void **state); #endif // _TEST__F_string_dynamic_partial_prepend_h diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_prepend_assure.c b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_prepend_assure.c index fa9c6ef..33d15c3 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_prepend_assure.c +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_prepend_assure.c @@ -5,6 +5,18 @@ extern "C" { #endif +void test__f_string_dynamic_partial_prepend_assure__parameter_checking(void **state) { + + const f_string_dynamic_t data = f_string_dynamic_t_initialize; + const f_range_t partial = f_range_t_initialize; + + { + const f_status_t status = f_string_dynamic_partial_prepend_assure(data, partial, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_dynamic_partial_prepend_assure__works(void **state) { const f_string_static_t source = macro_f_string_static_t_initialize_1("_te\0st_", 0, 7); @@ -36,18 +48,6 @@ void test__f_string_dynamic_partial_prepend_assure__works(void **state) { free((void *) destination.string); } -void test__f_string_dynamic_partial_prepend_assure__parameter_checking(void **state) { - - const f_string_dynamic_t data = f_string_dynamic_t_initialize; - const f_range_t partial = f_range_t_initialize; - - { - const f_status_t status = f_string_dynamic_partial_prepend_assure(data, partial, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_prepend_assure.h b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_prepend_assure.h index 032c3b2..f6dffe4 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_prepend_assure.h +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_prepend_assure.h @@ -11,17 +11,17 @@ #define _TEST__F_string_dynamic_partial_prepend_assure_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_dynamic_partial_prepend_assure() */ -extern void test__f_string_dynamic_partial_prepend_assure__works(void **state); +extern void test__f_string_dynamic_partial_prepend_assure__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_dynamic_partial_prepend_assure() */ -extern void test__f_string_dynamic_partial_prepend_assure__parameter_checking(void **state); +extern void test__f_string_dynamic_partial_prepend_assure__works(void **state); #endif // _TEST__F_string_dynamic_partial_prepend_assure_h diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_prepend_assure_nulless.c b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_prepend_assure_nulless.c index ccdaed3..d00e885 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_prepend_assure_nulless.c +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_prepend_assure_nulless.c @@ -5,6 +5,18 @@ extern "C" { #endif +void test__f_string_dynamic_partial_prepend_assure_nulless__parameter_checking(void **state) { + + const f_string_dynamic_t data = f_string_dynamic_t_initialize; + const f_range_t partial = f_range_t_initialize; + + { + const f_status_t status = f_string_dynamic_partial_prepend_assure_nulless(data, partial, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_dynamic_partial_prepend_assure_nulless__works(void **state) { const f_string_static_t source = macro_f_string_static_t_initialize_1("_te\0st_", 0, 7); @@ -34,18 +46,6 @@ void test__f_string_dynamic_partial_prepend_assure_nulless__works(void **state) free((void *) destination.string); } -void test__f_string_dynamic_partial_prepend_assure_nulless__parameter_checking(void **state) { - - const f_string_dynamic_t data = f_string_dynamic_t_initialize; - const f_range_t partial = f_range_t_initialize; - - { - const f_status_t status = f_string_dynamic_partial_prepend_assure_nulless(data, partial, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_prepend_assure_nulless.h b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_prepend_assure_nulless.h index 9139e1d..cf025bc 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_prepend_assure_nulless.h +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_prepend_assure_nulless.h @@ -11,17 +11,17 @@ #define _TEST__F_string_dynamic_partial_prepend_assure_nulless_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_dynamic_partial_prepend_assure_nulless() */ -extern void test__f_string_dynamic_partial_prepend_assure_nulless__works(void **state); +extern void test__f_string_dynamic_partial_prepend_assure_nulless__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_dynamic_partial_prepend_assure_nulless() */ -extern void test__f_string_dynamic_partial_prepend_assure_nulless__parameter_checking(void **state); +extern void test__f_string_dynamic_partial_prepend_assure_nulless__works(void **state); #endif // _TEST__F_string_dynamic_partial_prepend_assure_nulless_h diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_prepend_nulless.c b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_prepend_nulless.c index ab61193..f13bee3 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_prepend_nulless.c +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_prepend_nulless.c @@ -5,6 +5,18 @@ extern "C" { #endif +void test__f_string_dynamic_partial_prepend_nulless__parameter_checking(void **state) { + + const f_string_dynamic_t data = f_string_dynamic_t_initialize; + const f_range_t partial = f_range_t_initialize; + + { + const f_status_t status = f_string_dynamic_partial_prepend_nulless(data, partial, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_dynamic_partial_prepend_nulless__works(void **state) { const f_string_static_t source = macro_f_string_static_t_initialize_1("_te\0st_", 0, 7); @@ -24,18 +36,6 @@ void test__f_string_dynamic_partial_prepend_nulless__works(void **state) { free((void *) destination.string); } -void test__f_string_dynamic_partial_prepend_nulless__parameter_checking(void **state) { - - const f_string_dynamic_t data = f_string_dynamic_t_initialize; - const f_range_t partial = f_range_t_initialize; - - { - const f_status_t status = f_string_dynamic_partial_prepend_nulless(data, partial, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_prepend_nulless.h b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_prepend_nulless.h index f857f4e..c480fe4 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_partial_prepend_nulless.h +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_partial_prepend_nulless.h @@ -11,17 +11,17 @@ #define _TEST__F_string_dynamic_partial_prepend_nulless_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_dynamic_partial_prepend_nulless() */ -extern void test__f_string_dynamic_partial_prepend_nulless__works(void **state); +extern void test__f_string_dynamic_partial_prepend_nulless__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_dynamic_partial_prepend_nulless() */ -extern void test__f_string_dynamic_partial_prepend_nulless__parameter_checking(void **state); +extern void test__f_string_dynamic_partial_prepend_nulless__works(void **state); #endif // _TEST__F_string_dynamic_partial_prepend_nulless_h diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_prepend.c b/level_0/f_string/tests/unit/c/test-string-dynamic_prepend.c index 9564944..16a5fd6 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_prepend.c +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_prepend.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_string_dynamic_prepend__parameter_checking(void **state) { + + const f_string_dynamic_t data = f_string_dynamic_t_initialize; + + { + const f_status_t status = f_string_dynamic_prepend(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_dynamic_prepend__works(void **state) { const f_string_static_t source = macro_f_string_static_t_initialize_1("te\0st", 0, 5); @@ -23,17 +34,6 @@ void test__f_string_dynamic_prepend__works(void **state) { free((void *) destination.string); } -void test__f_string_dynamic_prepend__parameter_checking(void **state) { - - const f_string_dynamic_t data = f_string_dynamic_t_initialize; - - { - const f_status_t status = f_string_dynamic_prepend(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_prepend.h b/level_0/f_string/tests/unit/c/test-string-dynamic_prepend.h index a27fc2a..abb0863 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_prepend.h +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_prepend.h @@ -11,17 +11,17 @@ #define _TEST__F_string_dynamic_prepend_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_dynamic_prepend() */ -extern void test__f_string_dynamic_prepend__works(void **state); +extern void test__f_string_dynamic_prepend__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_dynamic_prepend() */ -extern void test__f_string_dynamic_prepend__parameter_checking(void **state); +extern void test__f_string_dynamic_prepend__works(void **state); #endif // _TEST__F_string_dynamic_prepend_h diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_prepend_assure.c b/level_0/f_string/tests/unit/c/test-string-dynamic_prepend_assure.c index c98cd24..766bd86 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_prepend_assure.c +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_prepend_assure.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_string_dynamic_prepend_assure__parameter_checking(void **state) { + + const f_string_dynamic_t data = f_string_dynamic_t_initialize; + + { + const f_status_t status = f_string_dynamic_prepend_assure(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_dynamic_prepend_assure__works(void **state) { const f_string_static_t source = macro_f_string_static_t_initialize_1("te\0st", 0, 5); @@ -34,17 +45,6 @@ void test__f_string_dynamic_prepend_assure__works(void **state) { free((void *) destination.string); } -void test__f_string_dynamic_prepend_assure__parameter_checking(void **state) { - - const f_string_dynamic_t data = f_string_dynamic_t_initialize; - - { - const f_status_t status = f_string_dynamic_prepend_assure(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_prepend_assure.h b/level_0/f_string/tests/unit/c/test-string-dynamic_prepend_assure.h index 5014d37..2be89d3 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_prepend_assure.h +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_prepend_assure.h @@ -11,17 +11,17 @@ #define _TEST__F_string_dynamic_prepend_assure_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_dynamic_prepend_assure() */ -extern void test__f_string_dynamic_prepend_assure__works(void **state); +extern void test__f_string_dynamic_prepend_assure__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_dynamic_prepend_assure() */ -extern void test__f_string_dynamic_prepend_assure__parameter_checking(void **state); +extern void test__f_string_dynamic_prepend_assure__works(void **state); #endif // _TEST__F_string_dynamic_prepend_assure_h diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_prepend_assure_nulless.c b/level_0/f_string/tests/unit/c/test-string-dynamic_prepend_assure_nulless.c index c85fa82..9e6f29c 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_prepend_assure_nulless.c +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_prepend_assure_nulless.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_string_dynamic_prepend_assure_nulless__parameter_checking(void **state) { + + const f_string_dynamic_t data = f_string_dynamic_t_initialize; + + { + const f_status_t status = f_string_dynamic_prepend_assure_nulless(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_dynamic_prepend_assure_nulless__works(void **state) { const f_string_static_t source = macro_f_string_static_t_initialize_1("te\0st", 0, 5); @@ -33,17 +44,6 @@ void test__f_string_dynamic_prepend_assure_nulless__works(void **state) { free((void *) destination.string); } -void test__f_string_dynamic_prepend_assure_nulless__parameter_checking(void **state) { - - const f_string_dynamic_t data = f_string_dynamic_t_initialize; - - { - const f_status_t status = f_string_dynamic_prepend_assure_nulless(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_prepend_assure_nulless.h b/level_0/f_string/tests/unit/c/test-string-dynamic_prepend_assure_nulless.h index 62d99d0..65d2ebe 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_prepend_assure_nulless.h +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_prepend_assure_nulless.h @@ -11,17 +11,17 @@ #define _TEST__F_string_dynamic_prepend_assure_nulless_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_dynamic_prepend_assure_nulless() */ -extern void test__f_string_dynamic_prepend_assure_nulless__works(void **state); +extern void test__f_string_dynamic_prepend_assure_nulless__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_dynamic_prepend_assure_nulless() */ -extern void test__f_string_dynamic_prepend_assure_nulless__parameter_checking(void **state); +extern void test__f_string_dynamic_prepend_assure_nulless__works(void **state); #endif // _TEST__F_string_dynamic_prepend_assure_nulless_h diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_prepend_nulless.c b/level_0/f_string/tests/unit/c/test-string-dynamic_prepend_nulless.c index 3a2f600..30a344b 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_prepend_nulless.c +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_prepend_nulless.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_string_dynamic_prepend_nulless__parameter_checking(void **state) { + + const f_string_dynamic_t data = f_string_dynamic_t_initialize; + + { + const f_status_t status = f_string_dynamic_prepend_nulless(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_dynamic_prepend_nulless__works(void **state) { const f_string_static_t source = macro_f_string_static_t_initialize_1("te\0st", 0, 5); @@ -23,17 +34,6 @@ void test__f_string_dynamic_prepend_nulless__works(void **state) { free((void *) destination.string); } -void test__f_string_dynamic_prepend_nulless__parameter_checking(void **state) { - - const f_string_dynamic_t data = f_string_dynamic_t_initialize; - - { - const f_status_t status = f_string_dynamic_prepend_nulless(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_prepend_nulless.h b/level_0/f_string/tests/unit/c/test-string-dynamic_prepend_nulless.h index f1f7d3a..b6b5724 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_prepend_nulless.h +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_prepend_nulless.h @@ -11,17 +11,17 @@ #define _TEST__F_string_dynamic_prepend_nulless_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_dynamic_prepend_nulless() */ -extern void test__f_string_dynamic_prepend_nulless__works(void **state); +extern void test__f_string_dynamic_prepend_nulless__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_dynamic_prepend_nulless() */ -extern void test__f_string_dynamic_prepend_nulless__parameter_checking(void **state); +extern void test__f_string_dynamic_prepend_nulless__works(void **state); #endif // _TEST__F_string_dynamic_prepend_nulless_h diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_seek_line.c b/level_0/f_string/tests/unit/c/test-string-dynamic_seek_line.c index 1ab687a..00c3350 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_seek_line.c +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_seek_line.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_string_dynamic_seek_line__parameter_checking(void **state) { + + const f_string_static_t source = macro_f_string_static_t_initialize_1("teX\nst", 0, 6); + + { + const f_status_t status = f_string_dynamic_seek_line(source, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_dynamic_seek_line__returns_data_not_stop(void **state) { const f_string_static_t source = macro_f_string_static_t_initialize_1("test\nafter", 0, 10); @@ -66,17 +77,6 @@ void test__f_string_dynamic_seek_line__works(void **state) { } } -void test__f_string_dynamic_seek_line__parameter_checking(void **state) { - - const f_string_static_t source = macro_f_string_static_t_initialize_1("teX\nst", 0, 6); - - { - const f_status_t status = f_string_dynamic_seek_line(source, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_seek_line.h b/level_0/f_string/tests/unit/c/test-string-dynamic_seek_line.h index aaaf36a..a90c1ce 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_seek_line.h +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_seek_line.h @@ -11,6 +11,13 @@ #define _TEST__F_string_dynamic_seek_line_h /** + * Test that the function correctly fails on invalid parameter. + * + * @see f_string_dynamic_seek_line() + */ +extern void test__f_string_dynamic_seek_line__parameter_checking(void **state); + +/** * Test that the function returns F_data_not_stop because range is an empty range (range.start > range.stop). * * @see f_string_dynamic_seek_line() @@ -38,11 +45,4 @@ extern void test__f_string_dynamic_seek_line__returns_none_stop(void **state); */ extern void test__f_string_dynamic_seek_line__works(void **state); -/** - * Test that the function correctly fails on invalid parameter. - * - * @see f_string_dynamic_seek_line() - */ -extern void test__f_string_dynamic_seek_line__parameter_checking(void **state); - #endif // _TEST__F_string_dynamic_seek_line_h diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_seek_line_to.c b/level_0/f_string/tests/unit/c/test-string-dynamic_seek_line_to.c index 6141525..cdd1f87 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_seek_line_to.c +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_seek_line_to.c @@ -22,6 +22,18 @@ void test__f_string_dynamic_seek_line_to__at_newline(void **state) { } } +void test__f_string_dynamic_seek_line_to__parameter_checking(void **state) { + + const f_string_static_t to = macro_f_string_static_t_initialize_1("X", 0, 1); + const f_string_static_t source = macro_f_string_static_t_initialize_1("teX\nst", 0, 6); + + { + const f_status_t status = f_string_dynamic_seek_line_to(source, to.string[0], 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_dynamic_seek_line_to__returns_data_not_stop(void **state) { const f_string_static_t to = macro_f_string_static_t_initialize_1("X", 0, 1); @@ -87,18 +99,6 @@ void test__f_string_dynamic_seek_line_to__works(void **state) { } } -void test__f_string_dynamic_seek_line_to__parameter_checking(void **state) { - - const f_string_static_t to = macro_f_string_static_t_initialize_1("X", 0, 1); - const f_string_static_t source = macro_f_string_static_t_initialize_1("teX\nst", 0, 6); - - { - const f_status_t status = f_string_dynamic_seek_line_to(source, to.string[0], 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_seek_line_to.h b/level_0/f_string/tests/unit/c/test-string-dynamic_seek_line_to.h index a235831..b98b03e 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_seek_line_to.h +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_seek_line_to.h @@ -18,6 +18,13 @@ extern void test__f_string_dynamic_seek_line_to__at_newline(void **state); /** + * Test that the function correctly fails on invalid parameter. + * + * @see f_string_dynamic_seek_line_to() + */ +extern void test__f_string_dynamic_seek_line_to__parameter_checking(void **state); + +/** * Test that the function returns F_data_not_stop because range is an empty range (range.start > range.stop). * * @see f_string_dynamic_seek_line_to() @@ -45,11 +52,4 @@ extern void test__f_string_dynamic_seek_line_to__returns_none_stop(void **state) */ extern void test__f_string_dynamic_seek_line_to__works(void **state); -/** - * Test that the function correctly fails on invalid parameter. - * - * @see f_string_dynamic_seek_line_to() - */ -extern void test__f_string_dynamic_seek_line_to__parameter_checking(void **state); - #endif // _TEST__F_string_dynamic_seek_line_to_h diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_seek_to.c b/level_0/f_string/tests/unit/c/test-string-dynamic_seek_to.c index b2e9d51..b0b2b88 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_seek_to.c +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_seek_to.c @@ -5,6 +5,18 @@ extern "C" { #endif +void test__f_string_dynamic_seek_to__parameter_checking(void **state) { + + const f_string_static_t to = macro_f_string_static_t_initialize_1("X", 0, 1); + const f_string_static_t source = macro_f_string_static_t_initialize_1("teX\nst", 0, 6); + + { + const f_status_t status = f_string_dynamic_seek_to(source, to.string[0], 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_dynamic_seek_to__returns_data_not_stop(void **state) { const f_string_static_t to = macro_f_string_static_t_initialize_1("X", 0, 1); @@ -70,18 +82,6 @@ void test__f_string_dynamic_seek_to__works(void **state) { } } -void test__f_string_dynamic_seek_to__parameter_checking(void **state) { - - const f_string_static_t to = macro_f_string_static_t_initialize_1("X", 0, 1); - const f_string_static_t source = macro_f_string_static_t_initialize_1("teX\nst", 0, 6); - - { - const f_status_t status = f_string_dynamic_seek_to(source, to.string[0], 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_seek_to.h b/level_0/f_string/tests/unit/c/test-string-dynamic_seek_to.h index 042d64e..c05be09 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_seek_to.h +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_seek_to.h @@ -11,6 +11,13 @@ #define _TEST__F_string_dynamic_seek_to_h /** + * Test that the function correctly fails on invalid parameter. + * + * @see f_string_dynamic_seek_to() + */ +extern void test__f_string_dynamic_seek_to__parameter_checking(void **state); + +/** * Test that the function returns F_data_not_stop because range is an empty range (range.start > range.stop). * * @see f_string_dynamic_seek_to() @@ -38,11 +45,4 @@ extern void test__f_string_dynamic_seek_to__returns_none_stop(void **state); */ extern void test__f_string_dynamic_seek_to__works(void **state); -/** - * Test that the function correctly fails on invalid parameter. - * - * @see f_string_dynamic_seek_to() - */ -extern void test__f_string_dynamic_seek_to__parameter_checking(void **state); - #endif // _TEST__F_string_dynamic_seek_to_h diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_strip_null.c b/level_0/f_string/tests/unit/c/test-string-dynamic_strip_null.c index 3e5eac8..abb0502 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_strip_null.c +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_strip_null.c @@ -5,6 +5,15 @@ extern "C" { #endif +void test__f_string_dynamic_strip_null__parameter_checking(void **state) { + + { + const f_status_t status = f_string_dynamic_strip_null(0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_dynamic_strip_null__returns_data_not(void **state) { f_string_static_t buffer = f_string_static_t_initialize; @@ -127,15 +136,6 @@ void test__f_string_dynamic_strip_null__works(void **state) { } // for } -void test__f_string_dynamic_strip_null__parameter_checking(void **state) { - - { - const f_status_t status = f_string_dynamic_strip_null(0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_strip_null.h b/level_0/f_string/tests/unit/c/test-string-dynamic_strip_null.h index 35d05d5..2ea815d 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_strip_null.h +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_strip_null.h @@ -11,24 +11,24 @@ #define _TEST__F_dynamic_strip_null_h /** - * Test that the function returns F_data_not because the buffer is empty. + * Test that the function correctly fails on invalid parameter. * * @see f_string_dynamic_strip_null() */ -extern void test__f_string_dynamic_strip_null__returns_data_not(void **state); +extern void test__f_string_dynamic_strip_null__parameter_checking(void **state); /** - * Test that the function works. + * Test that the function returns F_data_not because the buffer is empty. * * @see f_string_dynamic_strip_null() */ -extern void test__f_string_dynamic_strip_null__works(void **state); +extern void test__f_string_dynamic_strip_null__returns_data_not(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_dynamic_strip_null() */ -extern void test__f_string_dynamic_strip_null__parameter_checking(void **state); +extern void test__f_string_dynamic_strip_null__works(void **state); #endif // _TEST__F_dynamic_strip_null_h diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_strip_null_range.c b/level_0/f_string/tests/unit/c/test-string-dynamic_strip_null_range.c index 180b319..2ff250c 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_strip_null_range.c +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_strip_null_range.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_string_dynamic_strip_null_range__parameter_checking(void **state) { + + const f_range_t range = f_range_t_initialize; + + { + const f_status_t status = f_string_dynamic_strip_null_range(range, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_dynamic_strip_null_range__returns_data_not(void **state) { f_string_static_t buffer = f_string_static_t_initialize; @@ -197,17 +208,6 @@ void test__f_string_dynamic_strip_null_range__works(void **state) { } // for } -void test__f_string_dynamic_strip_null_range__parameter_checking(void **state) { - - const f_range_t range = f_range_t_initialize; - - { - const f_status_t status = f_string_dynamic_strip_null_range(range, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-dynamic_strip_null_range.h b/level_0/f_string/tests/unit/c/test-string-dynamic_strip_null_range.h index 8e73f93..073b9c6 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamic_strip_null_range.h +++ b/level_0/f_string/tests/unit/c/test-string-dynamic_strip_null_range.h @@ -11,6 +11,13 @@ #define _TEST__F_dynamic_strip_null_range_h /** + * Test that the function correctly fails on invalid parameter. + * + * @see f_string_dynamic_strip_null_range() + */ +extern void test__f_string_dynamic_strip_null_range__parameter_checking(void **state); + +/** * Test that the function returns F_data_not because the buffer is empty. * * @see f_string_dynamic_strip_null_range() @@ -38,11 +45,4 @@ extern void test__f_string_dynamic_strip_null_range__returns_data_not_stop(void */ extern void test__f_string_dynamic_strip_null_range__works(void **state); -/** - * Test that the function correctly fails on invalid parameter. - * - * @see f_string_dynamic_strip_null_range() - */ -extern void test__f_string_dynamic_strip_null_range__parameter_checking(void **state); - #endif // _TEST__F_dynamic_strip_null_range_h diff --git a/level_0/f_string/tests/unit/c/test-string-dynamics_append.c b/level_0/f_string/tests/unit/c/test-string-dynamics_append.c index 9c564c4..d57aa5a 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamics_append.c +++ b/level_0/f_string/tests/unit/c/test-string-dynamics_append.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_string_dynamics_append__parameter_checking(void **state) { + + const f_string_dynamic_t data = f_string_dynamic_t_initialize; + + { + const f_status_t status = f_string_dynamics_append(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_dynamics_append__works(void **state) { const f_string_static_t source = macro_f_string_static_t_initialize_1("te\0st", 0, 5); @@ -25,17 +36,6 @@ void test__f_string_dynamics_append__works(void **state) { free((void *) destination.array); } -void test__f_string_dynamics_append__parameter_checking(void **state) { - - const f_string_dynamic_t data = f_string_dynamic_t_initialize; - - { - const f_status_t status = f_string_dynamics_append(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-dynamics_append.h b/level_0/f_string/tests/unit/c/test-string-dynamics_append.h index e4d6f3f..9c559a8 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamics_append.h +++ b/level_0/f_string/tests/unit/c/test-string-dynamics_append.h @@ -11,17 +11,17 @@ #define _TEST__F_string_dynamics_append_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_dynamics_append() */ -extern void test__f_string_dynamics_append__works(void **state); +extern void test__f_string_dynamics_append__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_dynamics_append() */ -extern void test__f_string_dynamics_append__parameter_checking(void **state); +extern void test__f_string_dynamics_append__works(void **state); #endif // _TEST__F_string_dynamics_append_h diff --git a/level_0/f_string/tests/unit/c/test-string-dynamics_append_all.c b/level_0/f_string/tests/unit/c/test-string-dynamics_append_all.c index ead7640..e65479b 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamics_append_all.c +++ b/level_0/f_string/tests/unit/c/test-string-dynamics_append_all.c @@ -5,6 +5,43 @@ extern "C" { #endif +void test__f_string_dynamics_append_all__parameter_checking(void **state) { + + const f_string_dynamics_t data = f_string_dynamics_t_initialize; + + { + const f_status_t status = f_string_dynamics_append_all(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + +void test__f_string_dynamics_append_all__returns_data_not(void **state) { + + const int length = 5; + f_string_dynamics_t source = f_string_dynamics_t_initialize; + f_string_dynamics_t destination = f_string_dynamics_t_initialize; + + { + const f_status_t status = f_memory_arrays_resize(length, sizeof(f_string_dynamic_t), (void **) &source.array, &source.used, &source.size, &f_string_dynamics_delete_callback); + + assert_int_equal(status, F_okay); + assert_int_equal(source.used, 0); + assert_int_equal(source.size, length); + } + + { + const f_status_t status = f_string_dynamics_append_all(source, &destination); + + assert_int_equal(status, F_data_not); + assert_int_equal(destination.used, 0); + assert_int_equal(destination.size, 0); + assert_null(destination.array); + } + + free((void *) source.array); +} + void test__f_string_dynamics_append_all__works(void **state) { const int length_inner = 2; @@ -61,43 +98,6 @@ void test__f_string_dynamics_append_all__works(void **state) { free((void *) destination.array); } -void test__f_string_dynamics_append_all__returns_data_not(void **state) { - - const int length = 5; - f_string_dynamics_t source = f_string_dynamics_t_initialize; - f_string_dynamics_t destination = f_string_dynamics_t_initialize; - - { - const f_status_t status = f_memory_arrays_resize(length, sizeof(f_string_dynamic_t), (void **) &source.array, &source.used, &source.size, &f_string_dynamics_delete_callback); - - assert_int_equal(status, F_okay); - assert_int_equal(source.used, 0); - assert_int_equal(source.size, length); - } - - { - const f_status_t status = f_string_dynamics_append_all(source, &destination); - - assert_int_equal(status, F_data_not); - assert_int_equal(destination.used, 0); - assert_int_equal(destination.size, 0); - assert_null(destination.array); - } - - free((void *) source.array); -} - -void test__f_string_dynamics_append_all__parameter_checking(void **state) { - - const f_string_dynamics_t data = f_string_dynamics_t_initialize; - - { - const f_status_t status = f_string_dynamics_append_all(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-dynamics_append_all.h b/level_0/f_string/tests/unit/c/test-string-dynamics_append_all.h index 22d0f5f..d115759 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamics_append_all.h +++ b/level_0/f_string/tests/unit/c/test-string-dynamics_append_all.h @@ -11,11 +11,11 @@ #define _TEST__F_string_dynamics_append_all_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_dynamics_append_all() */ -extern void test__f_string_dynamics_append_all__works(void **state); +extern void test__f_string_dynamics_append_all__parameter_checking(void **state); /** * Test that the function returns F_data_not when asked to copy an empty structure. @@ -25,10 +25,10 @@ extern void test__f_string_dynamics_append_all__works(void **state); extern void test__f_string_dynamics_append_all__returns_data_not(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_dynamics_append_all() */ -extern void test__f_string_dynamics_append_all__parameter_checking(void **state); +extern void test__f_string_dynamics_append_all__works(void **state); #endif // _TEST__F_string_dynamics_append_all_h diff --git a/level_0/f_string/tests/unit/c/test-string-dynamicss_append.c b/level_0/f_string/tests/unit/c/test-string-dynamicss_append.c index 9e17da4..d7d654b 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamicss_append.c +++ b/level_0/f_string/tests/unit/c/test-string-dynamicss_append.c @@ -5,6 +5,43 @@ extern "C" { #endif +void test__f_string_dynamicss_append__parameter_checking(void **state) { + + f_string_dynamics_t data = f_string_dynamics_t_initialize; + + { + const f_status_t status = f_string_dynamicss_append(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + +void test__f_string_dynamicss_append__returns_data_not(void **state) { + + const int length = 5; + f_string_dynamics_t source = f_string_dynamicss_t_initialize; + f_string_dynamicss_t destination = f_string_dynamicss_t_initialize; + + { + const f_status_t status = f_memory_arrays_resize(length, sizeof(f_string_dynamic_t), (void **) &source.array, &source.used, &source.size, &f_string_dynamics_delete_callback); + + assert_int_equal(status, F_okay); + assert_int_equal(source.used, 0); + assert_int_equal(source.size, length); + } + + { + const f_status_t status = f_string_dynamicss_append(source, &destination); + + assert_int_equal(status, F_data_not); + assert_int_equal(destination.used, 0); + assert_int_equal(destination.size, 0); + assert_null(destination.array); + } + + free((void *) source.array); +} + void test__f_string_dynamicss_append__works(void **state) { const int length_inner = 2; @@ -60,43 +97,6 @@ void test__f_string_dynamicss_append__works(void **state) { free((void *) destination.array); } -void test__f_string_dynamicss_append__returns_data_not(void **state) { - - const int length = 5; - f_string_dynamics_t source = f_string_dynamicss_t_initialize; - f_string_dynamicss_t destination = f_string_dynamicss_t_initialize; - - { - const f_status_t status = f_memory_arrays_resize(length, sizeof(f_string_dynamic_t), (void **) &source.array, &source.used, &source.size, &f_string_dynamics_delete_callback); - - assert_int_equal(status, F_okay); - assert_int_equal(source.used, 0); - assert_int_equal(source.size, length); - } - - { - const f_status_t status = f_string_dynamicss_append(source, &destination); - - assert_int_equal(status, F_data_not); - assert_int_equal(destination.used, 0); - assert_int_equal(destination.size, 0); - assert_null(destination.array); - } - - free((void *) source.array); -} - -void test__f_string_dynamicss_append__parameter_checking(void **state) { - - f_string_dynamics_t data = f_string_dynamics_t_initialize; - - { - const f_status_t status = f_string_dynamicss_append(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-dynamicss_append.h b/level_0/f_string/tests/unit/c/test-string-dynamicss_append.h index f5a2bb4..92af808 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamicss_append.h +++ b/level_0/f_string/tests/unit/c/test-string-dynamicss_append.h @@ -11,11 +11,11 @@ #define _TEST__F_string_dynamicss_append_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_dynamicss_append() */ -extern void test__f_string_dynamicss_append__works(void **state); +extern void test__f_string_dynamicss_append__parameter_checking(void **state); /** * Test that the function returns F_data_not when asked to copy an empty structure. @@ -25,10 +25,10 @@ extern void test__f_string_dynamicss_append__works(void **state); extern void test__f_string_dynamicss_append__returns_data_not(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_dynamicss_append() */ -extern void test__f_string_dynamicss_append__parameter_checking(void **state); +extern void test__f_string_dynamicss_append__works(void **state); #endif // _TEST__F_string_dynamicss_append_h diff --git a/level_0/f_string/tests/unit/c/test-string-dynamicss_append_all.c b/level_0/f_string/tests/unit/c/test-string-dynamicss_append_all.c index f42dd32..7c08f24 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamicss_append_all.c +++ b/level_0/f_string/tests/unit/c/test-string-dynamicss_append_all.c @@ -5,6 +5,43 @@ extern "C" { #endif +void test__f_string_dynamicss_append_all__parameter_checking(void **state) { + + const f_string_dynamicss_t data = f_string_dynamicss_t_initialize; + + { + const f_status_t status = f_string_dynamicss_append_all(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + +void test__f_string_dynamicss_append_all__returns_data_not(void **state) { + + const int length = 5; + f_string_dynamicss_t source = f_string_dynamicss_t_initialize; + f_string_dynamicss_t destination = f_string_dynamicss_t_initialize; + + { + const f_status_t status = f_memory_arrays_resize(length, sizeof(f_string_dynamics_t), (void **) &source.array, &source.used, &source.size, &f_string_dynamicss_delete_callback); + + assert_int_equal(status, F_okay); + assert_int_equal(source.used, 0); + assert_int_equal(source.size, length); + } + + { + const f_status_t status = f_string_dynamicss_append_all(source, &destination); + + assert_int_equal(status, F_data_not); + assert_int_equal(destination.used, 0); + assert_int_equal(destination.size, 0); + assert_null(destination.array); + } + + free((void *) source.array); +} + void test__f_string_dynamicss_append_all__works(void **state) { const int length_inner = 2; @@ -86,43 +123,6 @@ void test__f_string_dynamicss_append_all__works(void **state) { free((void *) destination.array); } -void test__f_string_dynamicss_append_all__returns_data_not(void **state) { - - const int length = 5; - f_string_dynamicss_t source = f_string_dynamicss_t_initialize; - f_string_dynamicss_t destination = f_string_dynamicss_t_initialize; - - { - const f_status_t status = f_memory_arrays_resize(length, sizeof(f_string_dynamics_t), (void **) &source.array, &source.used, &source.size, &f_string_dynamicss_delete_callback); - - assert_int_equal(status, F_okay); - assert_int_equal(source.used, 0); - assert_int_equal(source.size, length); - } - - { - const f_status_t status = f_string_dynamicss_append_all(source, &destination); - - assert_int_equal(status, F_data_not); - assert_int_equal(destination.used, 0); - assert_int_equal(destination.size, 0); - assert_null(destination.array); - } - - free((void *) source.array); -} - -void test__f_string_dynamicss_append_all__parameter_checking(void **state) { - - const f_string_dynamicss_t data = f_string_dynamicss_t_initialize; - - { - const f_status_t status = f_string_dynamicss_append_all(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-dynamicss_append_all.h b/level_0/f_string/tests/unit/c/test-string-dynamicss_append_all.h index eca0be5..1c26cb1 100644 --- a/level_0/f_string/tests/unit/c/test-string-dynamicss_append_all.h +++ b/level_0/f_string/tests/unit/c/test-string-dynamicss_append_all.h @@ -11,11 +11,11 @@ #define _TEST__F_string_dynamicss_append_all_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_dynamicss_append_all() */ -extern void test__f_string_dynamicss_append_all__works(void **state); +extern void test__f_string_dynamicss_append_all__parameter_checking(void **state); /** * Test that the function returns F_data_not when asked to copy an empty structure. @@ -25,10 +25,10 @@ extern void test__f_string_dynamicss_append_all__works(void **state); extern void test__f_string_dynamicss_append_all__returns_data_not(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_dynamicss_append_all() */ -extern void test__f_string_dynamicss_append_all__parameter_checking(void **state); +extern void test__f_string_dynamicss_append_all__works(void **state); #endif // _TEST__F_string_dynamicss_append_all_h diff --git a/level_0/f_string/tests/unit/c/test-string-map_multis_append.c b/level_0/f_string/tests/unit/c/test-string-map_multis_append.c index 54c43cb..a71d623 100644 --- a/level_0/f_string/tests/unit/c/test-string-map_multis_append.c +++ b/level_0/f_string/tests/unit/c/test-string-map_multis_append.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_string_map_multis_append__parameter_checking(void **state) { + + const f_string_map_multi_t data = f_string_map_multi_t_initialize; + + { + const f_status_t status = f_string_map_multis_append(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_map_multis_append__works(void **state) { const int length_values = 2; @@ -65,17 +76,6 @@ void test__f_string_map_multis_append__works(void **state) { free((void *) destination.array); } -void test__f_string_map_multis_append__parameter_checking(void **state) { - - const f_string_map_multi_t data = f_string_map_multi_t_initialize; - - { - const f_status_t status = f_string_map_multis_append(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-map_multis_append.h b/level_0/f_string/tests/unit/c/test-string-map_multis_append.h index 84441f3..bfec420 100644 --- a/level_0/f_string/tests/unit/c/test-string-map_multis_append.h +++ b/level_0/f_string/tests/unit/c/test-string-map_multis_append.h @@ -11,17 +11,17 @@ #define _TEST__F_string_map_multis_append_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_map_multis_append() */ -extern void test__f_string_map_multis_append__works(void **state); +extern void test__f_string_map_multis_append__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_map_multis_append() */ -extern void test__f_string_map_multis_append__parameter_checking(void **state); +extern void test__f_string_map_multis_append__works(void **state); #endif // _TEST__F_string_map_multis_append_h diff --git a/level_0/f_string/tests/unit/c/test-string-map_multis_append_all.c b/level_0/f_string/tests/unit/c/test-string-map_multis_append_all.c index fedc2fb..4b6ab91 100644 --- a/level_0/f_string/tests/unit/c/test-string-map_multis_append_all.c +++ b/level_0/f_string/tests/unit/c/test-string-map_multis_append_all.c @@ -5,6 +5,43 @@ extern "C" { #endif +void test__f_string_map_multis_append_all__parameter_checking(void **state) { + + const f_string_map_multis_t data = f_string_map_multis_t_initialize; + + { + const f_status_t status = f_string_map_multis_append_all(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + +void test__f_string_map_multis_append_all__returns_data_not(void **state) { + + const int length = 5; + f_string_map_multis_t source = f_string_map_multis_t_initialize; + f_string_map_multis_t destination = f_string_map_multis_t_initialize; + + { + const f_status_t status = f_memory_arrays_resize(length, sizeof(f_string_map_multi_t), (void **) &source.array, &source.used, &source.size, &f_string_map_multis_delete_callback); + + assert_int_equal(status, F_okay); + assert_int_equal(source.used, 0); + assert_int_equal(source.size, length); + } + + { + const f_status_t status = f_string_map_multis_append_all(source, &destination); + + assert_int_equal(status, F_data_not); + assert_int_equal(destination.used, 0); + assert_int_equal(destination.size, 0); + assert_null(destination.array); + } + + free((void *) source.array); +} + void test__f_string_map_multis_append_all__works(void **state) { const int length_values = 2; @@ -84,43 +121,6 @@ void test__f_string_map_multis_append_all__works(void **state) { free((void *) destination.array); } -void test__f_string_map_multis_append_all__returns_data_not(void **state) { - - const int length = 5; - f_string_map_multis_t source = f_string_map_multis_t_initialize; - f_string_map_multis_t destination = f_string_map_multis_t_initialize; - - { - const f_status_t status = f_memory_arrays_resize(length, sizeof(f_string_map_multi_t), (void **) &source.array, &source.used, &source.size, &f_string_map_multis_delete_callback); - - assert_int_equal(status, F_okay); - assert_int_equal(source.used, 0); - assert_int_equal(source.size, length); - } - - { - const f_status_t status = f_string_map_multis_append_all(source, &destination); - - assert_int_equal(status, F_data_not); - assert_int_equal(destination.used, 0); - assert_int_equal(destination.size, 0); - assert_null(destination.array); - } - - free((void *) source.array); -} - -void test__f_string_map_multis_append_all__parameter_checking(void **state) { - - const f_string_map_multis_t data = f_string_map_multis_t_initialize; - - { - const f_status_t status = f_string_map_multis_append_all(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-map_multis_append_all.h b/level_0/f_string/tests/unit/c/test-string-map_multis_append_all.h index 858a94f..9a6eca5 100644 --- a/level_0/f_string/tests/unit/c/test-string-map_multis_append_all.h +++ b/level_0/f_string/tests/unit/c/test-string-map_multis_append_all.h @@ -11,11 +11,11 @@ #define _TEST__F_string_map_multis_append_all_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_map_multis_append_all() */ -extern void test__f_string_map_multis_append_all__works(void **state); +extern void test__f_string_map_multis_append_all__parameter_checking(void **state); /** * Test that the function returns F_data_not when asked to copy an empty structure. @@ -25,10 +25,10 @@ extern void test__f_string_map_multis_append_all__works(void **state); extern void test__f_string_map_multis_append_all__returns_data_not(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_map_multis_append_all() */ -extern void test__f_string_map_multis_append_all__parameter_checking(void **state); +extern void test__f_string_map_multis_append_all__works(void **state); #endif // _TEST__F_string_map_multis_append_all_h diff --git a/level_0/f_string/tests/unit/c/test-string-map_multiss_append.c b/level_0/f_string/tests/unit/c/test-string-map_multiss_append.c index 46a816a..6f2d7b6 100644 --- a/level_0/f_string/tests/unit/c/test-string-map_multiss_append.c +++ b/level_0/f_string/tests/unit/c/test-string-map_multiss_append.c @@ -5,6 +5,43 @@ extern "C" { #endif +void test__f_string_map_multiss_append__parameter_checking(void **state) { + + f_string_map_multis_t data = f_string_map_multis_t_initialize; + + { + const f_status_t status = f_string_map_multiss_append(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + +void test__f_string_map_multiss_append__returns_data_not(void **state) { + + const int length = 5; + f_string_map_multis_t source = f_string_map_multiss_t_initialize; + f_string_map_multiss_t destination = f_string_map_multiss_t_initialize; + + { + const f_status_t status = f_memory_arrays_resize(length, sizeof(f_string_map_multi_t), (void **) &source.array, &source.used, &source.size, &f_string_map_multis_delete_callback); + + assert_int_equal(status, F_okay); + assert_int_equal(source.used, 0); + assert_int_equal(source.size, length); + } + + { + const f_status_t status = f_string_map_multiss_append(source, &destination); + + assert_int_equal(status, F_data_not); + assert_int_equal(destination.used, 0); + assert_int_equal(destination.size, 0); + assert_null(destination.array); + } + + free((void *) source.array); +} + void test__f_string_map_multiss_append__works(void **state) { const int length_values = 2; @@ -99,43 +136,6 @@ void test__f_string_map_multiss_append__works(void **state) { free((void *) destination.array); } -void test__f_string_map_multiss_append__returns_data_not(void **state) { - - const int length = 5; - f_string_map_multis_t source = f_string_map_multiss_t_initialize; - f_string_map_multiss_t destination = f_string_map_multiss_t_initialize; - - { - const f_status_t status = f_memory_arrays_resize(length, sizeof(f_string_map_multi_t), (void **) &source.array, &source.used, &source.size, &f_string_map_multis_delete_callback); - - assert_int_equal(status, F_okay); - assert_int_equal(source.used, 0); - assert_int_equal(source.size, length); - } - - { - const f_status_t status = f_string_map_multiss_append(source, &destination); - - assert_int_equal(status, F_data_not); - assert_int_equal(destination.used, 0); - assert_int_equal(destination.size, 0); - assert_null(destination.array); - } - - free((void *) source.array); -} - -void test__f_string_map_multiss_append__parameter_checking(void **state) { - - f_string_map_multis_t data = f_string_map_multis_t_initialize; - - { - const f_status_t status = f_string_map_multiss_append(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-map_multiss_append.h b/level_0/f_string/tests/unit/c/test-string-map_multiss_append.h index 5c7dbbc..d1fad5f 100644 --- a/level_0/f_string/tests/unit/c/test-string-map_multiss_append.h +++ b/level_0/f_string/tests/unit/c/test-string-map_multiss_append.h @@ -11,11 +11,11 @@ #define _TEST__F_string_map_multiss_append_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_map_multiss_append() */ -extern void test__f_string_map_multiss_append__works(void **state); +extern void test__f_string_map_multiss_append__parameter_checking(void **state); /** * Test that the function returns F_data_not when asked to copy an empty structure. @@ -25,10 +25,10 @@ extern void test__f_string_map_multiss_append__works(void **state); extern void test__f_string_map_multiss_append__returns_data_not(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_map_multiss_append() */ -extern void test__f_string_map_multiss_append__parameter_checking(void **state); +extern void test__f_string_map_multiss_append__works(void **state); #endif // _TEST__F_string_map_multiss_append_h diff --git a/level_0/f_string/tests/unit/c/test-string-map_multiss_append_all.c b/level_0/f_string/tests/unit/c/test-string-map_multiss_append_all.c index aa081f7..6fad951 100644 --- a/level_0/f_string/tests/unit/c/test-string-map_multiss_append_all.c +++ b/level_0/f_string/tests/unit/c/test-string-map_multiss_append_all.c @@ -5,6 +5,43 @@ extern "C" { #endif +void test__f_string_map_multiss_append_all__parameter_checking(void **state) { + + const f_string_map_multiss_t data = f_string_map_multiss_t_initialize; + + { + const f_status_t status = f_string_map_multiss_append_all(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + +void test__f_string_map_multiss_append_all__returns_data_not(void **state) { + + const int length = 5; + f_string_map_multiss_t source = f_string_map_multiss_t_initialize; + f_string_map_multiss_t destination = f_string_map_multiss_t_initialize; + + { + const f_status_t status = f_memory_arrays_resize(length, sizeof(f_string_map_multis_t), (void **) &source.array, &source.used, &source.size, &f_string_map_multiss_delete_callback); + + assert_int_equal(status, F_okay); + assert_int_equal(source.used, 0); + assert_int_equal(source.size, length); + } + + { + const f_status_t status = f_string_map_multiss_append_all(source, &destination); + + assert_int_equal(status, F_data_not); + assert_int_equal(destination.used, 0); + assert_int_equal(destination.size, 0); + assert_null(destination.array); + } + + free((void *) source.array); +} + void test__f_string_map_multiss_append_all__works(void **state) { const int length_values = 2; @@ -125,43 +162,6 @@ void test__f_string_map_multiss_append_all__works(void **state) { free((void *) destination.array); } -void test__f_string_map_multiss_append_all__returns_data_not(void **state) { - - const int length = 5; - f_string_map_multiss_t source = f_string_map_multiss_t_initialize; - f_string_map_multiss_t destination = f_string_map_multiss_t_initialize; - - { - const f_status_t status = f_memory_arrays_resize(length, sizeof(f_string_map_multis_t), (void **) &source.array, &source.used, &source.size, &f_string_map_multiss_delete_callback); - - assert_int_equal(status, F_okay); - assert_int_equal(source.used, 0); - assert_int_equal(source.size, length); - } - - { - const f_status_t status = f_string_map_multiss_append_all(source, &destination); - - assert_int_equal(status, F_data_not); - assert_int_equal(destination.used, 0); - assert_int_equal(destination.size, 0); - assert_null(destination.array); - } - - free((void *) source.array); -} - -void test__f_string_map_multiss_append_all__parameter_checking(void **state) { - - const f_string_map_multiss_t data = f_string_map_multiss_t_initialize; - - { - const f_status_t status = f_string_map_multiss_append_all(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-map_multiss_append_all.h b/level_0/f_string/tests/unit/c/test-string-map_multiss_append_all.h index da35a9e..03c49a6 100644 --- a/level_0/f_string/tests/unit/c/test-string-map_multiss_append_all.h +++ b/level_0/f_string/tests/unit/c/test-string-map_multiss_append_all.h @@ -11,11 +11,11 @@ #define _TEST__F_string_map_multiss_append_all_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_map_multiss_append_all() */ -extern void test__f_string_map_multiss_append_all__works(void **state); +extern void test__f_string_map_multiss_append_all__parameter_checking(void **state); /** * Test that the function returns F_data_not when asked to copy an empty structure. @@ -25,10 +25,10 @@ extern void test__f_string_map_multiss_append_all__works(void **state); extern void test__f_string_map_multiss_append_all__returns_data_not(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_map_multiss_append_all() */ -extern void test__f_string_map_multiss_append_all__parameter_checking(void **state); +extern void test__f_string_map_multiss_append_all__works(void **state); #endif // _TEST__F_string_map_multiss_append_all_h diff --git a/level_0/f_string/tests/unit/c/test-string-maps_append.c b/level_0/f_string/tests/unit/c/test-string-maps_append.c index 19a42c5..02f2c66 100644 --- a/level_0/f_string/tests/unit/c/test-string-maps_append.c +++ b/level_0/f_string/tests/unit/c/test-string-maps_append.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_string_maps_append__parameter_checking(void **state) { + + const f_string_map_t data = f_string_map_t_initialize; + + { + const f_status_t status = f_string_maps_append(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_maps_append__works(void **state) { f_string_map_t source = f_string_map_t_initialize; @@ -47,17 +58,6 @@ void test__f_string_maps_append__works(void **state) { free((void *) destination.array); } -void test__f_string_maps_append__parameter_checking(void **state) { - - const f_string_map_t data = f_string_map_t_initialize; - - { - const f_status_t status = f_string_maps_append(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-maps_append.h b/level_0/f_string/tests/unit/c/test-string-maps_append.h index 0a04a3c..0dfed2e 100644 --- a/level_0/f_string/tests/unit/c/test-string-maps_append.h +++ b/level_0/f_string/tests/unit/c/test-string-maps_append.h @@ -11,17 +11,17 @@ #define _TEST__F_string_maps_append_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_maps_append() */ -extern void test__f_string_maps_append__works(void **state); +extern void test__f_string_maps_append__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_maps_append() */ -extern void test__f_string_maps_append__parameter_checking(void **state); +extern void test__f_string_maps_append__works(void **state); #endif // _TEST__F_string_maps_append_h diff --git a/level_0/f_string/tests/unit/c/test-string-maps_append_all.c b/level_0/f_string/tests/unit/c/test-string-maps_append_all.c index a272a45..1e3a864 100644 --- a/level_0/f_string/tests/unit/c/test-string-maps_append_all.c +++ b/level_0/f_string/tests/unit/c/test-string-maps_append_all.c @@ -5,6 +5,43 @@ extern "C" { #endif +void test__f_string_maps_append_all__parameter_checking(void **state) { + + const f_string_maps_t data = f_string_maps_t_initialize; + + { + const f_status_t status = f_string_maps_append_all(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + +void test__f_string_maps_append_all__returns_data_not(void **state) { + + const int length = 5; + f_string_maps_t source = f_string_maps_t_initialize; + f_string_maps_t destination = f_string_maps_t_initialize; + + { + const f_status_t status = f_memory_arrays_resize(length, sizeof(f_string_map_t), (void **) &source.array, &source.used, &source.size, &f_string_maps_delete_callback); + + assert_int_equal(status, F_okay); + assert_int_equal(source.used, 0); + assert_int_equal(source.size, length); + } + + { + const f_status_t status = f_string_maps_append_all(source, &destination); + + assert_int_equal(status, F_data_not); + assert_int_equal(destination.used, 0); + assert_int_equal(destination.size, 0); + assert_null(destination.array); + } + + free((void *) source.array); +} + void test__f_string_maps_append_all__works(void **state) { const int length_inner = 2; @@ -69,43 +106,6 @@ void test__f_string_maps_append_all__works(void **state) { free((void *) destination.array); } -void test__f_string_maps_append_all__returns_data_not(void **state) { - - const int length = 5; - f_string_maps_t source = f_string_maps_t_initialize; - f_string_maps_t destination = f_string_maps_t_initialize; - - { - const f_status_t status = f_memory_arrays_resize(length, sizeof(f_string_map_t), (void **) &source.array, &source.used, &source.size, &f_string_maps_delete_callback); - - assert_int_equal(status, F_okay); - assert_int_equal(source.used, 0); - assert_int_equal(source.size, length); - } - - { - const f_status_t status = f_string_maps_append_all(source, &destination); - - assert_int_equal(status, F_data_not); - assert_int_equal(destination.used, 0); - assert_int_equal(destination.size, 0); - assert_null(destination.array); - } - - free((void *) source.array); -} - -void test__f_string_maps_append_all__parameter_checking(void **state) { - - const f_string_maps_t data = f_string_maps_t_initialize; - - { - const f_status_t status = f_string_maps_append_all(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-maps_append_all.h b/level_0/f_string/tests/unit/c/test-string-maps_append_all.h index 9975c9e..f17de67 100644 --- a/level_0/f_string/tests/unit/c/test-string-maps_append_all.h +++ b/level_0/f_string/tests/unit/c/test-string-maps_append_all.h @@ -11,11 +11,11 @@ #define _TEST__F_string_maps_append_all_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_maps_append_all() */ -extern void test__f_string_maps_append_all__works(void **state); +extern void test__f_string_maps_append_all__parameter_checking(void **state); /** * Test that the function returns F_data_not when asked to copy an empty structure. @@ -25,10 +25,10 @@ extern void test__f_string_maps_append_all__works(void **state); extern void test__f_string_maps_append_all__returns_data_not(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_maps_append_all() */ -extern void test__f_string_maps_append_all__parameter_checking(void **state); +extern void test__f_string_maps_append_all__works(void **state); #endif // _TEST__F_string_maps_append_all_h diff --git a/level_0/f_string/tests/unit/c/test-string-mapss_append.c b/level_0/f_string/tests/unit/c/test-string-mapss_append.c index 1cd4a8d..e40b380 100644 --- a/level_0/f_string/tests/unit/c/test-string-mapss_append.c +++ b/level_0/f_string/tests/unit/c/test-string-mapss_append.c @@ -5,6 +5,43 @@ extern "C" { #endif +void test__f_string_mapss_append__parameter_checking(void **state) { + + f_string_maps_t data = f_string_maps_t_initialize; + + { + const f_status_t status = f_string_mapss_append(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + +void test__f_string_mapss_append__returns_data_not(void **state) { + + const int length = 5; + f_string_maps_t source = f_string_mapss_t_initialize; + f_string_mapss_t destination = f_string_mapss_t_initialize; + + { + const f_status_t status = f_memory_arrays_resize(length, sizeof(f_string_map_t), (void **) &source.array, &source.used, &source.size, &f_string_maps_delete_callback); + + assert_int_equal(status, F_okay); + assert_int_equal(source.used, 0); + assert_int_equal(source.size, length); + } + + { + const f_status_t status = f_string_mapss_append(source, &destination); + + assert_int_equal(status, F_data_not); + assert_int_equal(destination.used, 0); + assert_int_equal(destination.size, 0); + assert_null(destination.array); + } + + free((void *) source.array); +} + void test__f_string_mapss_append__works(void **state) { const int length_inner = 2; @@ -78,43 +115,6 @@ void test__f_string_mapss_append__works(void **state) { free((void *) destination.array); } -void test__f_string_mapss_append__returns_data_not(void **state) { - - const int length = 5; - f_string_maps_t source = f_string_mapss_t_initialize; - f_string_mapss_t destination = f_string_mapss_t_initialize; - - { - const f_status_t status = f_memory_arrays_resize(length, sizeof(f_string_map_t), (void **) &source.array, &source.used, &source.size, &f_string_maps_delete_callback); - - assert_int_equal(status, F_okay); - assert_int_equal(source.used, 0); - assert_int_equal(source.size, length); - } - - { - const f_status_t status = f_string_mapss_append(source, &destination); - - assert_int_equal(status, F_data_not); - assert_int_equal(destination.used, 0); - assert_int_equal(destination.size, 0); - assert_null(destination.array); - } - - free((void *) source.array); -} - -void test__f_string_mapss_append__parameter_checking(void **state) { - - f_string_maps_t data = f_string_maps_t_initialize; - - { - const f_status_t status = f_string_mapss_append(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-mapss_append.h b/level_0/f_string/tests/unit/c/test-string-mapss_append.h index 0a9369f..9d89152 100644 --- a/level_0/f_string/tests/unit/c/test-string-mapss_append.h +++ b/level_0/f_string/tests/unit/c/test-string-mapss_append.h @@ -11,11 +11,11 @@ #define _TEST__F_string_mapss_append_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_mapss_append() */ -extern void test__f_string_mapss_append__works(void **state); +extern void test__f_string_mapss_append__parameter_checking(void **state); /** * Test that the function returns F_data_not when asked to copy an empty structure. @@ -25,10 +25,10 @@ extern void test__f_string_mapss_append__works(void **state); extern void test__f_string_mapss_append__returns_data_not(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_mapss_append() */ -extern void test__f_string_mapss_append__parameter_checking(void **state); +extern void test__f_string_mapss_append__works(void **state); #endif // _TEST__F_string_mapss_append_h diff --git a/level_0/f_string/tests/unit/c/test-string-mapss_append_all.c b/level_0/f_string/tests/unit/c/test-string-mapss_append_all.c index 1ef3088..ad6ea39 100644 --- a/level_0/f_string/tests/unit/c/test-string-mapss_append_all.c +++ b/level_0/f_string/tests/unit/c/test-string-mapss_append_all.c @@ -5,6 +5,43 @@ extern "C" { #endif +void test__f_string_mapss_append_all__parameter_checking(void **state) { + + const f_string_mapss_t data = f_string_mapss_t_initialize; + + { + const f_status_t status = f_string_mapss_append_all(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + +void test__f_string_mapss_append_all__returns_data_not(void **state) { + + const int length = 5; + f_string_mapss_t source = f_string_mapss_t_initialize; + f_string_mapss_t destination = f_string_mapss_t_initialize; + + { + const f_status_t status = f_memory_arrays_resize(length, sizeof(f_string_maps_t), (void **) &source.array, &source.used, &source.size, &f_string_mapss_delete_callback); + + assert_int_equal(status, F_okay); + assert_int_equal(source.used, 0); + assert_int_equal(source.size, length); + } + + { + const f_status_t status = f_string_mapss_append_all(source, &destination); + + assert_int_equal(status, F_data_not); + assert_int_equal(destination.used, 0); + assert_int_equal(destination.size, 0); + assert_null(destination.array); + } + + free((void *) source.array); +} + void test__f_string_mapss_append_all__works(void **state) { const int length_inner = 2; @@ -103,43 +140,6 @@ void test__f_string_mapss_append_all__works(void **state) { free((void *) destination.array); } -void test__f_string_mapss_append_all__returns_data_not(void **state) { - - const int length = 5; - f_string_mapss_t source = f_string_mapss_t_initialize; - f_string_mapss_t destination = f_string_mapss_t_initialize; - - { - const f_status_t status = f_memory_arrays_resize(length, sizeof(f_string_maps_t), (void **) &source.array, &source.used, &source.size, &f_string_mapss_delete_callback); - - assert_int_equal(status, F_okay); - assert_int_equal(source.used, 0); - assert_int_equal(source.size, length); - } - - { - const f_status_t status = f_string_mapss_append_all(source, &destination); - - assert_int_equal(status, F_data_not); - assert_int_equal(destination.used, 0); - assert_int_equal(destination.size, 0); - assert_null(destination.array); - } - - free((void *) source.array); -} - -void test__f_string_mapss_append_all__parameter_checking(void **state) { - - const f_string_mapss_t data = f_string_mapss_t_initialize; - - { - const f_status_t status = f_string_mapss_append_all(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-mapss_append_all.h b/level_0/f_string/tests/unit/c/test-string-mapss_append_all.h index caa1629..b7aaba7 100644 --- a/level_0/f_string/tests/unit/c/test-string-mapss_append_all.h +++ b/level_0/f_string/tests/unit/c/test-string-mapss_append_all.h @@ -11,11 +11,11 @@ #define _TEST__F_string_mapss_append_all_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_mapss_append_all() */ -extern void test__f_string_mapss_append_all__works(void **state); +extern void test__f_string_mapss_append_all__parameter_checking(void **state); /** * Test that the function returns F_data_not when asked to copy an empty structure. @@ -25,10 +25,10 @@ extern void test__f_string_mapss_append_all__works(void **state); extern void test__f_string_mapss_append_all__returns_data_not(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_mapss_append_all() */ -extern void test__f_string_mapss_append_all__parameter_checking(void **state); +extern void test__f_string_mapss_append_all__works(void **state); #endif // _TEST__F_string_mapss_append_all_h diff --git a/level_0/f_string/tests/unit/c/test-string-mash.c b/level_0/f_string/tests/unit/c/test-string-mash.c index 6300ec5..28d798d 100644 --- a/level_0/f_string/tests/unit/c/test-string-mash.c +++ b/level_0/f_string/tests/unit/c/test-string-mash.c @@ -5,6 +5,18 @@ extern "C" { #endif +void test__f_string_mash__parameter_checking(void **state) { + + const f_string_static_t glue = macro_f_string_static_t_initialize_1(":", 0, 1); + const f_string_static_t source = macro_f_string_static_t_initialize_1("te\0st", 0, 5); + + { + const f_status_t status = f_string_mash(glue.string, glue.used, source.string, source.used, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_mash__works(void **state) { const f_string_static_t glue = macro_f_string_static_t_initialize_1(":", 0, 1); @@ -37,18 +49,6 @@ void test__f_string_mash__works(void **state) { free((void *) destination.string); } -void test__f_string_mash__parameter_checking(void **state) { - - const f_string_static_t glue = macro_f_string_static_t_initialize_1(":", 0, 1); - const f_string_static_t source = macro_f_string_static_t_initialize_1("te\0st", 0, 5); - - { - const f_status_t status = f_string_mash(glue.string, glue.used, source.string, source.used, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-mash.h b/level_0/f_string/tests/unit/c/test-string-mash.h index 8120d7b..601ea72 100644 --- a/level_0/f_string/tests/unit/c/test-string-mash.h +++ b/level_0/f_string/tests/unit/c/test-string-mash.h @@ -11,17 +11,17 @@ #define _TEST__F_string_mash_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_mash() */ -extern void test__f_string_mash__works(void **state); +extern void test__f_string_mash__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_mash() */ -extern void test__f_string_mash__parameter_checking(void **state); +extern void test__f_string_mash__works(void **state); #endif // _TEST__F_string_mash_h diff --git a/level_0/f_string/tests/unit/c/test-string-mash_nulless.c b/level_0/f_string/tests/unit/c/test-string-mash_nulless.c index 7673a3d..70edb23 100644 --- a/level_0/f_string/tests/unit/c/test-string-mash_nulless.c +++ b/level_0/f_string/tests/unit/c/test-string-mash_nulless.c @@ -5,6 +5,18 @@ extern "C" { #endif +void test__f_string_mash_nulless__parameter_checking(void **state) { + + const f_string_static_t glue = macro_f_string_static_t_initialize_1(":", 0, 1); + const f_string_static_t source = macro_f_string_static_t_initialize_1("te\0st", 0, 5); + + { + const f_status_t status = f_string_mash_nulless(glue.string, glue.used, source.string, source.used, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_mash_nulless__works(void **state) { const f_string_static_t glue = macro_f_string_static_t_initialize_1(":", 0, 1); @@ -35,18 +47,6 @@ void test__f_string_mash_nulless__works(void **state) { free((void *) destination.string); } -void test__f_string_mash_nulless__parameter_checking(void **state) { - - const f_string_static_t glue = macro_f_string_static_t_initialize_1(":", 0, 1); - const f_string_static_t source = macro_f_string_static_t_initialize_1("te\0st", 0, 5); - - { - const f_status_t status = f_string_mash_nulless(glue.string, glue.used, source.string, source.used, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-mash_nulless.h b/level_0/f_string/tests/unit/c/test-string-mash_nulless.h index ed9e38c..4691d29 100644 --- a/level_0/f_string/tests/unit/c/test-string-mash_nulless.h +++ b/level_0/f_string/tests/unit/c/test-string-mash_nulless.h @@ -11,17 +11,17 @@ #define _TEST__F_string_mash_nulless_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_mash_nulless() */ -extern void test__f_string_mash_nulless__works(void **state); +extern void test__f_string_mash_nulless__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_mash_nulless() */ -extern void test__f_string_mash_nulless__parameter_checking(void **state); +extern void test__f_string_mash_nulless__works(void **state); #endif // _TEST__F_string_mash_nulless_h diff --git a/level_0/f_string/tests/unit/c/test-string-mish.c b/level_0/f_string/tests/unit/c/test-string-mish.c index f57f580..98a87f0 100644 --- a/level_0/f_string/tests/unit/c/test-string-mish.c +++ b/level_0/f_string/tests/unit/c/test-string-mish.c @@ -5,6 +5,18 @@ extern "C" { #endif +void test__f_string_mish__parameter_checking(void **state) { + + const f_string_static_t glue = macro_f_string_static_t_initialize_1(":", 0, 1); + const f_string_static_t source = macro_f_string_static_t_initialize_1("te\0st", 0, 5); + + { + const f_status_t status = f_string_mish(glue.string, glue.used, source.string, source.used, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_mish__works(void **state) { const f_string_static_t glue = macro_f_string_static_t_initialize_1(":", 0, 1); @@ -37,18 +49,6 @@ void test__f_string_mish__works(void **state) { free((void *) destination.string); } -void test__f_string_mish__parameter_checking(void **state) { - - const f_string_static_t glue = macro_f_string_static_t_initialize_1(":", 0, 1); - const f_string_static_t source = macro_f_string_static_t_initialize_1("te\0st", 0, 5); - - { - const f_status_t status = f_string_mish(glue.string, glue.used, source.string, source.used, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-mish.h b/level_0/f_string/tests/unit/c/test-string-mish.h index d15bad7..8c4a280 100644 --- a/level_0/f_string/tests/unit/c/test-string-mish.h +++ b/level_0/f_string/tests/unit/c/test-string-mish.h @@ -11,17 +11,17 @@ #define _TEST__F_string_mish_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_mish() */ -extern void test__f_string_mish__works(void **state); +extern void test__f_string_mish__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_mish() */ -extern void test__f_string_mish__parameter_checking(void **state); +extern void test__f_string_mish__works(void **state); #endif // _TEST__F_string_mish_h diff --git a/level_0/f_string/tests/unit/c/test-string-mish_nulless.c b/level_0/f_string/tests/unit/c/test-string-mish_nulless.c index 98d421d..125c6c9 100644 --- a/level_0/f_string/tests/unit/c/test-string-mish_nulless.c +++ b/level_0/f_string/tests/unit/c/test-string-mish_nulless.c @@ -5,6 +5,18 @@ extern "C" { #endif +void test__f_string_mish_nulless__parameter_checking(void **state) { + + const f_string_static_t glue = macro_f_string_static_t_initialize_1(":", 0, 1); + const f_string_static_t source = macro_f_string_static_t_initialize_1("te\0st", 0, 5); + + { + const f_status_t status = f_string_mish_nulless(glue.string, glue.used, source.string, source.used, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_mish_nulless__works(void **state) { const f_string_static_t glue = macro_f_string_static_t_initialize_1(":", 0, 1); @@ -35,18 +47,6 @@ void test__f_string_mish_nulless__works(void **state) { free((void *) destination.string); } -void test__f_string_mish_nulless__parameter_checking(void **state) { - - const f_string_static_t glue = macro_f_string_static_t_initialize_1(":", 0, 1); - const f_string_static_t source = macro_f_string_static_t_initialize_1("te\0st", 0, 5); - - { - const f_status_t status = f_string_mish_nulless(glue.string, glue.used, source.string, source.used, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-mish_nulless.h b/level_0/f_string/tests/unit/c/test-string-mish_nulless.h index a9fc863..1c65630 100644 --- a/level_0/f_string/tests/unit/c/test-string-mish_nulless.h +++ b/level_0/f_string/tests/unit/c/test-string-mish_nulless.h @@ -11,17 +11,17 @@ #define _TEST__F_string_mish_nulless_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_mish_nulless() */ -extern void test__f_string_mish_nulless__works(void **state); +extern void test__f_string_mish_nulless__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_mish_nulless() */ -extern void test__f_string_mish_nulless__parameter_checking(void **state); +extern void test__f_string_mish_nulless__works(void **state); #endif // _TEST__F_string_mish_nulless_h diff --git a/level_0/f_string/tests/unit/c/test-string-prepend.c b/level_0/f_string/tests/unit/c/test-string-prepend.c index 7542ff4..4ba605d 100644 --- a/level_0/f_string/tests/unit/c/test-string-prepend.c +++ b/level_0/f_string/tests/unit/c/test-string-prepend.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_string_prepend__parameter_checking(void **state) { + + const f_string_dynamic_t data = f_string_dynamic_t_initialize; + + { + const f_status_t status = f_string_prepend(data.string, data.used, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_prepend__works(void **state) { const f_string_static_t source = macro_f_string_static_t_initialize_1("te\0st", 0, 5); @@ -23,17 +34,6 @@ void test__f_string_prepend__works(void **state) { free((void *) destination.string); } -void test__f_string_prepend__parameter_checking(void **state) { - - const f_string_dynamic_t data = f_string_dynamic_t_initialize; - - { - const f_status_t status = f_string_prepend(data.string, data.used, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-prepend.h b/level_0/f_string/tests/unit/c/test-string-prepend.h index 8617a30..a754465 100644 --- a/level_0/f_string/tests/unit/c/test-string-prepend.h +++ b/level_0/f_string/tests/unit/c/test-string-prepend.h @@ -11,17 +11,17 @@ #define _TEST__F_string_prepend_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_prepend() */ -extern void test__f_string_prepend__works(void **state); +extern void test__f_string_prepend__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_prepend() */ -extern void test__f_string_prepend__parameter_checking(void **state); +extern void test__f_string_prepend__works(void **state); #endif // _TEST__F_string_prepend_h diff --git a/level_0/f_string/tests/unit/c/test-string-prepend_assure.c b/level_0/f_string/tests/unit/c/test-string-prepend_assure.c index 3909399..2699371 100644 --- a/level_0/f_string/tests/unit/c/test-string-prepend_assure.c +++ b/level_0/f_string/tests/unit/c/test-string-prepend_assure.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_string_prepend_assure__parameter_checking(void **state) { + + const f_string_dynamic_t data = f_string_dynamic_t_initialize; + + { + const f_status_t status = f_string_prepend_assure(data.string, data.used, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_prepend_assure__works(void **state) { const f_string_static_t source = macro_f_string_static_t_initialize_1("te\0st", 0, 5); @@ -34,17 +45,6 @@ void test__f_string_prepend_assure__works(void **state) { free((void *) destination.string); } -void test__f_string_prepend_assure__parameter_checking(void **state) { - - const f_string_dynamic_t data = f_string_dynamic_t_initialize; - - { - const f_status_t status = f_string_prepend_assure(data.string, data.used, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-prepend_assure.h b/level_0/f_string/tests/unit/c/test-string-prepend_assure.h index 1dd7582..d2b342e 100644 --- a/level_0/f_string/tests/unit/c/test-string-prepend_assure.h +++ b/level_0/f_string/tests/unit/c/test-string-prepend_assure.h @@ -11,17 +11,17 @@ #define _TEST__F_string_prepend_assure_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_prepend_assure() */ -extern void test__f_string_prepend_assure__works(void **state); +extern void test__f_string_prepend_assure__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_prepend_assure() */ -extern void test__f_string_prepend_assure__parameter_checking(void **state); +extern void test__f_string_prepend_assure__works(void **state); #endif // _TEST__F_string_prepend_assure_h diff --git a/level_0/f_string/tests/unit/c/test-string-prepend_assure_nulless.c b/level_0/f_string/tests/unit/c/test-string-prepend_assure_nulless.c index aac9376..bc05e1b 100644 --- a/level_0/f_string/tests/unit/c/test-string-prepend_assure_nulless.c +++ b/level_0/f_string/tests/unit/c/test-string-prepend_assure_nulless.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_string_prepend_assure_nulless__parameter_checking(void **state) { + + const f_string_dynamic_t data = f_string_dynamic_t_initialize; + + { + const f_status_t status = f_string_prepend_assure_nulless(data.string, data.used, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_prepend_assure_nulless__works(void **state) { const f_string_static_t source = macro_f_string_static_t_initialize_1("te\0st", 0, 5); @@ -33,17 +44,6 @@ void test__f_string_prepend_assure_nulless__works(void **state) { free((void *) destination.string); } -void test__f_string_prepend_assure_nulless__parameter_checking(void **state) { - - const f_string_dynamic_t data = f_string_dynamic_t_initialize; - - { - const f_status_t status = f_string_prepend_assure_nulless(data.string, data.used, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-prepend_assure_nulless.h b/level_0/f_string/tests/unit/c/test-string-prepend_assure_nulless.h index ae967af..b468ffa 100644 --- a/level_0/f_string/tests/unit/c/test-string-prepend_assure_nulless.h +++ b/level_0/f_string/tests/unit/c/test-string-prepend_assure_nulless.h @@ -11,17 +11,17 @@ #define _TEST__F_string_prepend_assure_nulless_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_prepend_assure_nulless() */ -extern void test__f_string_prepend_assure_nulless__works(void **state); +extern void test__f_string_prepend_assure_nulless__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_prepend_assure_nulless() */ -extern void test__f_string_prepend_assure_nulless__parameter_checking(void **state); +extern void test__f_string_prepend_assure_nulless__works(void **state); #endif // _TEST__F_string_prepend_assure_nulless_h diff --git a/level_0/f_string/tests/unit/c/test-string-prepend_nulless.c b/level_0/f_string/tests/unit/c/test-string-prepend_nulless.c index 64b337c..135a0eb 100644 --- a/level_0/f_string/tests/unit/c/test-string-prepend_nulless.c +++ b/level_0/f_string/tests/unit/c/test-string-prepend_nulless.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_string_prepend_nulless__parameter_checking(void **state) { + + const f_string_dynamic_t data = f_string_dynamic_t_initialize; + + { + const f_status_t status = f_string_prepend_nulless(data.string, data.used, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_prepend_nulless__works(void **state) { const f_string_static_t source = macro_f_string_static_t_initialize_1("te\0st", 0, 5); @@ -23,17 +34,6 @@ void test__f_string_prepend_nulless__works(void **state) { free((void *) destination.string); } -void test__f_string_prepend_nulless__parameter_checking(void **state) { - - const f_string_dynamic_t data = f_string_dynamic_t_initialize; - - { - const f_status_t status = f_string_prepend_nulless(data.string, data.used, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-prepend_nulless.h b/level_0/f_string/tests/unit/c/test-string-prepend_nulless.h index 17fdcd0..f2f685f 100644 --- a/level_0/f_string/tests/unit/c/test-string-prepend_nulless.h +++ b/level_0/f_string/tests/unit/c/test-string-prepend_nulless.h @@ -11,17 +11,17 @@ #define _TEST__F_string_prepend_nulless_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_prepend_nulless() */ -extern void test__f_string_prepend_nulless__works(void **state); +extern void test__f_string_prepend_nulless__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_prepend_nulless() */ -extern void test__f_string_prepend_nulless__parameter_checking(void **state); +extern void test__f_string_prepend_nulless__works(void **state); #endif // _TEST__F_string_prepend_nulless_h diff --git a/level_0/f_string/tests/unit/c/test-string-seek_line.c b/level_0/f_string/tests/unit/c/test-string-seek_line.c index b48fb92..448725a 100644 --- a/level_0/f_string/tests/unit/c/test-string-seek_line.c +++ b/level_0/f_string/tests/unit/c/test-string-seek_line.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_string_seek_line__parameter_checking(void **state) { + + const f_string_static_t source = macro_f_string_static_t_initialize_1("teX\nst", 0, 6); + + { + const f_status_t status = f_string_seek_line(source.string, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_seek_line__returns_data_not_stop(void **state) { const f_string_static_t source = macro_f_string_static_t_initialize_1("test\nafter", 0, 10); @@ -50,17 +61,6 @@ void test__f_string_seek_line__works(void **state) { } } -void test__f_string_seek_line__parameter_checking(void **state) { - - const f_string_static_t source = macro_f_string_static_t_initialize_1("teX\nst", 0, 6); - - { - const f_status_t status = f_string_seek_line(source.string, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-seek_line.h b/level_0/f_string/tests/unit/c/test-string-seek_line.h index 71769af..393eca1 100644 --- a/level_0/f_string/tests/unit/c/test-string-seek_line.h +++ b/level_0/f_string/tests/unit/c/test-string-seek_line.h @@ -11,6 +11,13 @@ #define _TEST__F_string_seek_line_h /** + * Test that the function correctly fails on invalid parameter. + * + * @see f_string_seek_line() + */ +extern void test__f_string_seek_line__parameter_checking(void **state); + +/** * Test that the function returns F_data_not_stop because range is an empty range (range.start > range.stop). * * @see f_string_seek_line() @@ -31,11 +38,4 @@ extern void test__f_string_seek_line__returns_none_stop(void **state); */ extern void test__f_string_seek_line__works(void **state); -/** - * Test that the function correctly fails on invalid parameter. - * - * @see f_string_seek_line() - */ -extern void test__f_string_seek_line__parameter_checking(void **state); - #endif // _TEST__F_string_seek_line_h diff --git a/level_0/f_string/tests/unit/c/test-string-seek_line_to.c b/level_0/f_string/tests/unit/c/test-string-seek_line_to.c index 0384ab1..e79ebfd 100644 --- a/level_0/f_string/tests/unit/c/test-string-seek_line_to.c +++ b/level_0/f_string/tests/unit/c/test-string-seek_line_to.c @@ -22,6 +22,18 @@ void test__f_string_seek_line_to__at_newline(void **state) { } } +void test__f_string_seek_line_to__parameter_checking(void **state) { + + const f_string_static_t to = macro_f_string_static_t_initialize_1("X", 0, 1); + const f_string_static_t source = macro_f_string_static_t_initialize_1("teX\nst", 0, 6); + + { + const f_status_t status = f_string_seek_line_to(source.string, to.string[0], 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_seek_line_to__returns_data_not_stop(void **state) { const f_string_static_t to = macro_f_string_static_t_initialize_1("X", 0, 1); @@ -70,18 +82,6 @@ void test__f_string_seek_line_to__works(void **state) { } } -void test__f_string_seek_line_to__parameter_checking(void **state) { - - const f_string_static_t to = macro_f_string_static_t_initialize_1("X", 0, 1); - const f_string_static_t source = macro_f_string_static_t_initialize_1("teX\nst", 0, 6); - - { - const f_status_t status = f_string_seek_line_to(source.string, to.string[0], 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-seek_line_to.h b/level_0/f_string/tests/unit/c/test-string-seek_line_to.h index 616433c..e4fb259 100644 --- a/level_0/f_string/tests/unit/c/test-string-seek_line_to.h +++ b/level_0/f_string/tests/unit/c/test-string-seek_line_to.h @@ -18,6 +18,13 @@ extern void test__f_string_seek_line_to__at_newline(void **state); /** + * Test that the function correctly fails on invalid parameter. + * + * @see f_string_seek_line_to() + */ +extern void test__f_string_seek_line_to__parameter_checking(void **state); + +/** * Test that the function returns F_data_not_stop because range is an empty range (range.start > range.stop). * * @see f_string_seek_line_to() @@ -38,11 +45,4 @@ extern void test__f_string_seek_line_to__returns_none_stop(void **state); */ extern void test__f_string_seek_line_to__works(void **state); -/** - * Test that the function correctly fails on invalid parameter. - * - * @see f_string_seek_line_to() - */ -extern void test__f_string_seek_line_to__parameter_checking(void **state); - #endif // _TEST__F_string_seek_line_to_h diff --git a/level_0/f_string/tests/unit/c/test-string-seek_to.c b/level_0/f_string/tests/unit/c/test-string-seek_to.c index 95f4654..7122e6f 100644 --- a/level_0/f_string/tests/unit/c/test-string-seek_to.c +++ b/level_0/f_string/tests/unit/c/test-string-seek_to.c @@ -5,6 +5,18 @@ extern "C" { #endif +void test__f_string_seek_to__parameter_checking(void **state) { + + const f_string_static_t to = macro_f_string_static_t_initialize_1("X", 0, 1); + const f_string_static_t source = macro_f_string_static_t_initialize_1("teX\nst", 0, 6); + + { + const f_status_t status = f_string_seek_to(source.string, to.string[0], 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_seek_to__returns_data_not_stop(void **state) { const f_string_static_t to = macro_f_string_static_t_initialize_1("X", 0, 1); @@ -53,18 +65,6 @@ void test__f_string_seek_to__works(void **state) { } } -void test__f_string_seek_to__parameter_checking(void **state) { - - const f_string_static_t to = macro_f_string_static_t_initialize_1("X", 0, 1); - const f_string_static_t source = macro_f_string_static_t_initialize_1("teX\nst", 0, 6); - - { - const f_status_t status = f_string_seek_to(source.string, to.string[0], 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-seek_to.h b/level_0/f_string/tests/unit/c/test-string-seek_to.h index ece924a..db84190 100644 --- a/level_0/f_string/tests/unit/c/test-string-seek_to.h +++ b/level_0/f_string/tests/unit/c/test-string-seek_to.h @@ -11,6 +11,13 @@ #define _TEST__F_string_seek_to_h /** + * Test that the function correctly fails on invalid parameter. + * + * @see f_string_seek_to() + */ +extern void test__f_string_seek_to__parameter_checking(void **state); + +/** * Test that the function returns F_data_not_stop because range is an empty range (range.start > range.stop). * * @see f_string_seek_to() @@ -31,11 +38,4 @@ extern void test__f_string_seek_to__returns_none_stop(void **state); */ extern void test__f_string_seek_to__works(void **state); -/** - * Test that the function correctly fails on invalid parameter. - * - * @see f_string_seek_to() - */ -extern void test__f_string_seek_to__parameter_checking(void **state); - #endif // _TEST__F_string_seek_to_h diff --git a/level_0/f_string/tests/unit/c/test-string-triples_append.c b/level_0/f_string/tests/unit/c/test-string-triples_append.c index c0afa2c..fa25e5e 100644 --- a/level_0/f_string/tests/unit/c/test-string-triples_append.c +++ b/level_0/f_string/tests/unit/c/test-string-triples_append.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_string_triples_append__parameter_checking(void **state) { + + const f_string_triple_t data = f_string_triple_t_initialize; + + { + const f_status_t status = f_string_triples_append(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_string_triples_append__works(void **state) { const f_string_static_t test_a = macro_f_string_static_t_initialize_1("a", 0, 1); @@ -34,17 +45,6 @@ void test__f_string_triples_append__works(void **state) { free((void *) destination.array); } -void test__f_string_triples_append__parameter_checking(void **state) { - - const f_string_triple_t data = f_string_triple_t_initialize; - - { - const f_status_t status = f_string_triples_append(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-triples_append.h b/level_0/f_string/tests/unit/c/test-string-triples_append.h index af1bb66..f3520f7 100644 --- a/level_0/f_string/tests/unit/c/test-string-triples_append.h +++ b/level_0/f_string/tests/unit/c/test-string-triples_append.h @@ -11,17 +11,17 @@ #define _TEST__F_string_triples_append_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_triples_append() */ -extern void test__f_string_triples_append__works(void **state); +extern void test__f_string_triples_append__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_triples_append() */ -extern void test__f_string_triples_append__parameter_checking(void **state); +extern void test__f_string_triples_append__works(void **state); #endif // _TEST__F_string_triples_append_h diff --git a/level_0/f_string/tests/unit/c/test-string-triples_append_all.c b/level_0/f_string/tests/unit/c/test-string-triples_append_all.c index 279491b..67984cb 100644 --- a/level_0/f_string/tests/unit/c/test-string-triples_append_all.c +++ b/level_0/f_string/tests/unit/c/test-string-triples_append_all.c @@ -5,6 +5,43 @@ extern "C" { #endif +void test__f_string_triples_append_all__parameter_checking(void **state) { + + const f_string_triples_t data = f_string_triples_t_initialize; + + { + const f_status_t status = f_string_triples_append_all(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + +void test__f_string_triples_append_all__returns_data_not(void **state) { + + const int length = 5; + f_string_triples_t source = f_string_triples_t_initialize; + f_string_triples_t destination = f_string_triples_t_initialize; + + { + const f_status_t status = f_memory_arrays_resize(length, sizeof(f_string_triple_t), (void **) &source.array, &source.used, &source.size, &f_string_triples_delete_callback); + + assert_int_equal(status, F_okay); + assert_int_equal(source.used, 0); + assert_int_equal(source.size, length); + } + + { + const f_status_t status = f_string_triples_append_all(source, &destination); + + assert_int_equal(status, F_data_not); + assert_int_equal(destination.used, 0); + assert_int_equal(destination.size, 0); + assert_null(destination.array); + } + + free((void *) source.array); +} + void test__f_string_triples_append_all__works(void **state) { const int length_sources = 2; @@ -54,43 +91,6 @@ void test__f_string_triples_append_all__works(void **state) { free((void *) destination.array); } -void test__f_string_triples_append_all__returns_data_not(void **state) { - - const int length = 5; - f_string_triples_t source = f_string_triples_t_initialize; - f_string_triples_t destination = f_string_triples_t_initialize; - - { - const f_status_t status = f_memory_arrays_resize(length, sizeof(f_string_triple_t), (void **) &source.array, &source.used, &source.size, &f_string_triples_delete_callback); - - assert_int_equal(status, F_okay); - assert_int_equal(source.used, 0); - assert_int_equal(source.size, length); - } - - { - const f_status_t status = f_string_triples_append_all(source, &destination); - - assert_int_equal(status, F_data_not); - assert_int_equal(destination.used, 0); - assert_int_equal(destination.size, 0); - assert_null(destination.array); - } - - free((void *) source.array); -} - -void test__f_string_triples_append_all__parameter_checking(void **state) { - - const f_string_triples_t data = f_string_triples_t_initialize; - - { - const f_status_t status = f_string_triples_append_all(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-triples_append_all.h b/level_0/f_string/tests/unit/c/test-string-triples_append_all.h index ceb8950..4780d96 100644 --- a/level_0/f_string/tests/unit/c/test-string-triples_append_all.h +++ b/level_0/f_string/tests/unit/c/test-string-triples_append_all.h @@ -11,11 +11,11 @@ #define _TEST__F_string_triples_append_all_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_triples_append_all() */ -extern void test__f_string_triples_append_all__works(void **state); +extern void test__f_string_triples_append_all__parameter_checking(void **state); /** * Test that the function returns F_data_not when asked to copy an empty structure. @@ -25,10 +25,10 @@ extern void test__f_string_triples_append_all__works(void **state); extern void test__f_string_triples_append_all__returns_data_not(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_triples_append_all() */ -extern void test__f_string_triples_append_all__parameter_checking(void **state); +extern void test__f_string_triples_append_all__works(void **state); #endif // _TEST__F_string_triples_append_all_h diff --git a/level_0/f_string/tests/unit/c/test-string-tripless_append.c b/level_0/f_string/tests/unit/c/test-string-tripless_append.c index e455a0a..e21633c 100644 --- a/level_0/f_string/tests/unit/c/test-string-tripless_append.c +++ b/level_0/f_string/tests/unit/c/test-string-tripless_append.c @@ -5,6 +5,43 @@ extern "C" { #endif +void test__f_string_tripless_append__parameter_checking(void **state) { + + f_string_triples_t data = f_string_triples_t_initialize; + + { + const f_status_t status = f_string_tripless_append(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + +void test__f_string_tripless_append__returns_data_not(void **state) { + + const int length = 5; + f_string_triples_t source = f_string_tripless_t_initialize; + f_string_tripless_t destination = f_string_tripless_t_initialize; + + { + const f_status_t status = f_memory_arrays_resize(length, sizeof(f_string_triple_t), (void **) &source.array, &source.used, &source.size, &f_string_triples_delete_callback); + + assert_int_equal(status, F_okay); + assert_int_equal(source.used, 0); + assert_int_equal(source.size, length); + } + + { + const f_status_t status = f_string_tripless_append(source, &destination); + + assert_int_equal(status, F_data_not); + assert_int_equal(destination.used, 0); + assert_int_equal(destination.size, 0); + assert_null(destination.array); + } + + free((void *) source.array); +} + void test__f_string_tripless_append__works(void **state) { const int length_sources = 2; @@ -54,43 +91,6 @@ void test__f_string_tripless_append__works(void **state) { free((void *) destination.array); } -void test__f_string_tripless_append__returns_data_not(void **state) { - - const int length = 5; - f_string_triples_t source = f_string_tripless_t_initialize; - f_string_tripless_t destination = f_string_tripless_t_initialize; - - { - const f_status_t status = f_memory_arrays_resize(length, sizeof(f_string_triple_t), (void **) &source.array, &source.used, &source.size, &f_string_triples_delete_callback); - - assert_int_equal(status, F_okay); - assert_int_equal(source.used, 0); - assert_int_equal(source.size, length); - } - - { - const f_status_t status = f_string_tripless_append(source, &destination); - - assert_int_equal(status, F_data_not); - assert_int_equal(destination.used, 0); - assert_int_equal(destination.size, 0); - assert_null(destination.array); - } - - free((void *) source.array); -} - -void test__f_string_tripless_append__parameter_checking(void **state) { - - f_string_triples_t data = f_string_triples_t_initialize; - - { - const f_status_t status = f_string_tripless_append(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-tripless_append.h b/level_0/f_string/tests/unit/c/test-string-tripless_append.h index 7efb569..f7204b7 100644 --- a/level_0/f_string/tests/unit/c/test-string-tripless_append.h +++ b/level_0/f_string/tests/unit/c/test-string-tripless_append.h @@ -11,11 +11,11 @@ #define _TEST__F_string_tripless_append_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_tripless_append() */ -extern void test__f_string_tripless_append__works(void **state); +extern void test__f_string_tripless_append__parameter_checking(void **state); /** * Test that the function returns F_data_not when asked to copy an empty structure. @@ -25,10 +25,10 @@ extern void test__f_string_tripless_append__works(void **state); extern void test__f_string_tripless_append__returns_data_not(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_tripless_append() */ -extern void test__f_string_tripless_append__parameter_checking(void **state); +extern void test__f_string_tripless_append__works(void **state); #endif // _TEST__F_string_tripless_append_h diff --git a/level_0/f_string/tests/unit/c/test-string-tripless_append_all.c b/level_0/f_string/tests/unit/c/test-string-tripless_append_all.c index 0202f61..a0fc2c6 100644 --- a/level_0/f_string/tests/unit/c/test-string-tripless_append_all.c +++ b/level_0/f_string/tests/unit/c/test-string-tripless_append_all.c @@ -5,6 +5,43 @@ extern "C" { #endif +void test__f_string_tripless_append_all__parameter_checking(void **state) { + + const f_string_tripless_t data = f_string_tripless_t_initialize; + + { + const f_status_t status = f_string_tripless_append_all(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + +void test__f_string_tripless_append_all__returns_data_not(void **state) { + + const int length = 5; + f_string_tripless_t source = f_string_tripless_t_initialize; + f_string_tripless_t destination = f_string_tripless_t_initialize; + + { + const f_status_t status = f_memory_arrays_resize(length, sizeof(f_string_triples_t), (void **) &source.array, &source.used, &source.size, &f_string_tripless_delete_callback); + + assert_int_equal(status, F_okay); + assert_int_equal(source.used, 0); + assert_int_equal(source.size, length); + } + + { + const f_status_t status = f_string_tripless_append_all(source, &destination); + + assert_int_equal(status, F_data_not); + assert_int_equal(destination.used, 0); + assert_int_equal(destination.size, 0); + assert_null(destination.array); + } + + free((void *) source.array); +} + void test__f_string_tripless_append_all__works(void **state) { const int length_sources = 2; @@ -80,43 +117,6 @@ void test__f_string_tripless_append_all__works(void **state) { free((void *) destination.array); } -void test__f_string_tripless_append_all__returns_data_not(void **state) { - - const int length = 5; - f_string_tripless_t source = f_string_tripless_t_initialize; - f_string_tripless_t destination = f_string_tripless_t_initialize; - - { - const f_status_t status = f_memory_arrays_resize(length, sizeof(f_string_triples_t), (void **) &source.array, &source.used, &source.size, &f_string_tripless_delete_callback); - - assert_int_equal(status, F_okay); - assert_int_equal(source.used, 0); - assert_int_equal(source.size, length); - } - - { - const f_status_t status = f_string_tripless_append_all(source, &destination); - - assert_int_equal(status, F_data_not); - assert_int_equal(destination.used, 0); - assert_int_equal(destination.size, 0); - assert_null(destination.array); - } - - free((void *) source.array); -} - -void test__f_string_tripless_append_all__parameter_checking(void **state) { - - const f_string_tripless_t data = f_string_tripless_t_initialize; - - { - const f_status_t status = f_string_tripless_append_all(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_string/tests/unit/c/test-string-tripless_append_all.h b/level_0/f_string/tests/unit/c/test-string-tripless_append_all.h index 5970131..c6cbf98 100644 --- a/level_0/f_string/tests/unit/c/test-string-tripless_append_all.h +++ b/level_0/f_string/tests/unit/c/test-string-tripless_append_all.h @@ -11,11 +11,11 @@ #define _TEST__F_string_tripless_append_all_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_string_tripless_append_all() */ -extern void test__f_string_tripless_append_all__works(void **state); +extern void test__f_string_tripless_append_all__parameter_checking(void **state); /** * Test that the function returns F_data_not when asked to copy an empty structure. @@ -25,10 +25,10 @@ extern void test__f_string_tripless_append_all__works(void **state); extern void test__f_string_tripless_append_all__returns_data_not(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_string_tripless_append_all() */ -extern void test__f_string_tripless_append_all__parameter_checking(void **state); +extern void test__f_string_tripless_append_all__works(void **state); #endif // _TEST__F_string_tripless_append_all_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-append.c b/level_0/f_utf/tests/unit/c/test-utf-append.c index a837208..a12bf9b 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-append.c +++ b/level_0/f_utf/tests/unit/c/test-utf-append.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_utf_append__parameter_checking(void **state) { + + const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; + + { + const f_status_t status = f_utf_string_append(data.string, data.used, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_append__works(void **state) { const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t", 0, 5); @@ -24,17 +35,6 @@ void test__f_utf_append__works(void **state) { free((void *) destination.string); } -void test__f_utf_append__parameter_checking(void **state) { - - const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; - - { - const f_status_t status = f_utf_string_append(data.string, data.used, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-append.h b/level_0/f_utf/tests/unit/c/test-utf-append.h index cf7d8dc..254afd7 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-append.h +++ b/level_0/f_utf/tests/unit/c/test-utf-append.h @@ -11,17 +11,17 @@ #define _TEST__F_utf_append_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_append() */ -extern void test__f_utf_append__works(void **state); +extern void test__f_utf_append__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_append() */ -extern void test__f_utf_append__parameter_checking(void **state); +extern void test__f_utf_append__works(void **state); #endif // _TEST__F_utf_append_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-append_assure.c b/level_0/f_utf/tests/unit/c/test-utf-append_assure.c index fe0ce1e..84f6f4a 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-append_assure.c +++ b/level_0/f_utf/tests/unit/c/test-utf-append_assure.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_utf_append_assure__parameter_checking(void **state) { + + const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; + + { + const f_status_t status = f_utf_string_append_assure(data.string, data.used, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_append_assure__works(void **state) { const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t", 0, 5); @@ -36,17 +47,6 @@ void test__f_utf_append_assure__works(void **state) { free((void *) destination.string); } -void test__f_utf_append_assure__parameter_checking(void **state) { - - const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; - - { - const f_status_t status = f_utf_string_append_assure(data.string, data.used, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-append_assure.h b/level_0/f_utf/tests/unit/c/test-utf-append_assure.h index 8819f15..f491406 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-append_assure.h +++ b/level_0/f_utf/tests/unit/c/test-utf-append_assure.h @@ -11,17 +11,17 @@ #define _TEST__F_utf_append_assure_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_append_assure() */ -extern void test__f_utf_append_assure__works(void **state); +extern void test__f_utf_append_assure__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_append_assure() */ -extern void test__f_utf_append_assure__parameter_checking(void **state); +extern void test__f_utf_append_assure__works(void **state); #endif // _TEST__F_utf_append_assure_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-append_assure_nulless.c b/level_0/f_utf/tests/unit/c/test-utf-append_assure_nulless.c index 8971c0f..e4ca32f 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-append_assure_nulless.c +++ b/level_0/f_utf/tests/unit/c/test-utf-append_assure_nulless.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_utf_append_assure_nulless__parameter_checking(void **state) { + + const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; + + { + const f_status_t status = f_utf_string_append_assure_nulless(data.string, data.used, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_append_assure_nulless__works(void **state) { const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t", 0, 5); @@ -37,17 +48,6 @@ void test__f_utf_append_assure_nulless__works(void **state) { free((void *) destination.string); } -void test__f_utf_append_assure_nulless__parameter_checking(void **state) { - - const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; - - { - const f_status_t status = f_utf_string_append_assure_nulless(data.string, data.used, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-append_assure_nulless.h b/level_0/f_utf/tests/unit/c/test-utf-append_assure_nulless.h index 06d3d8d..328c766 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-append_assure_nulless.h +++ b/level_0/f_utf/tests/unit/c/test-utf-append_assure_nulless.h @@ -11,17 +11,17 @@ #define _TEST__F_utf_append_assure_nulless_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_append_assure_nulless() */ -extern void test__f_utf_append_assure_nulless__works(void **state); +extern void test__f_utf_append_assure_nulless__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_append_assure_nulless() */ -extern void test__f_utf_append_assure_nulless__parameter_checking(void **state); +extern void test__f_utf_append_assure_nulless__works(void **state); #endif // _TEST__F_utf_append_assure_nulless_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-append_nulless.c b/level_0/f_utf/tests/unit/c/test-utf-append_nulless.c index de30383..f86a010 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-append_nulless.c +++ b/level_0/f_utf/tests/unit/c/test-utf-append_nulless.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_utf_append_nulless__parameter_checking(void **state) { + + const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; + + { + const f_status_t status = f_utf_string_append_nulless(data.string, data.used, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_append_nulless__works(void **state) { const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t", 0, 5); @@ -25,17 +36,6 @@ void test__f_utf_append_nulless__works(void **state) { free((void *) destination.string); } -void test__f_utf_append_nulless__parameter_checking(void **state) { - - const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; - - { - const f_status_t status = f_utf_string_append_nulless(data.string, data.used, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-append_nulless.h b/level_0/f_utf/tests/unit/c/test-utf-append_nulless.h index 245fa35..8e2509d 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-append_nulless.h +++ b/level_0/f_utf/tests/unit/c/test-utf-append_nulless.h @@ -11,17 +11,17 @@ #define _TEST__F_utf_append_nulless_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_append_nulless() */ -extern void test__f_utf_append_nulless__works(void **state); +extern void test__f_utf_append_nulless__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_append_nulless() */ -extern void test__f_utf_append_nulless__parameter_checking(void **state); +extern void test__f_utf_append_nulless__works(void **state); #endif // _TEST__F_utf_append_nulless_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_append_assure.c b/level_0/f_utf/tests/unit/c/test-utf-dynamic_append_assure.c index bea2752..3563bc3 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_append_assure.c +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_append_assure.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_utf_string_dynamic_append_assure__parameter_checking(void **state) { + + const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; + + { + const f_status_t status = f_utf_string_dynamic_append_assure(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_string_dynamic_append_assure__works(void **state) { const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t", 0, 5); @@ -36,17 +47,6 @@ void test__f_utf_string_dynamic_append_assure__works(void **state) { free((void *) destination.string); } -void test__f_utf_string_dynamic_append_assure__parameter_checking(void **state) { - - const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; - - { - const f_status_t status = f_utf_string_dynamic_append_assure(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_append_assure.h b/level_0/f_utf/tests/unit/c/test-utf-dynamic_append_assure.h index 811cffe..ba3fe5e 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_append_assure.h +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_append_assure.h @@ -11,17 +11,17 @@ #define _TEST__F_utf_dynamic_append_assure_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_dynamic_append_assure() */ -extern void test__f_utf_string_dynamic_append_assure__works(void **state); +extern void test__f_utf_string_dynamic_append_assure__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_dynamic_append_assure() */ -extern void test__f_utf_string_dynamic_append_assure__parameter_checking(void **state); +extern void test__f_utf_string_dynamic_append_assure__works(void **state); #endif // _TEST__F_utf_dynamic_append_assure_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_append_assure_nulless.c b/level_0/f_utf/tests/unit/c/test-utf-dynamic_append_assure_nulless.c index eeb44c0..bae8409 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_append_assure_nulless.c +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_append_assure_nulless.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_utf_string_dynamic_append_assure_nulless__parameter_checking(void **state) { + + const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; + + { + const f_status_t status = f_utf_string_dynamic_append_assure_nulless(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_string_dynamic_append_assure_nulless__works(void **state) { const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t", 0, 5); @@ -37,17 +48,6 @@ void test__f_utf_string_dynamic_append_assure_nulless__works(void **state) { free((void *) destination.string); } -void test__f_utf_string_dynamic_append_assure_nulless__parameter_checking(void **state) { - - const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; - - { - const f_status_t status = f_utf_string_dynamic_append_assure_nulless(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_append_assure_nulless.h b/level_0/f_utf/tests/unit/c/test-utf-dynamic_append_assure_nulless.h index 0ab23a1..7f8fb35 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_append_assure_nulless.h +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_append_assure_nulless.h @@ -11,17 +11,17 @@ #define _TEST__F_utf_dynamic_append_assure_nulless_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_dynamic_append_assure_nulless() */ -extern void test__f_utf_string_dynamic_append_assure_nulless__works(void **state); +extern void test__f_utf_string_dynamic_append_assure_nulless__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_dynamic_append_assure_nulless() */ -extern void test__f_utf_string_dynamic_append_assure_nulless__parameter_checking(void **state); +extern void test__f_utf_string_dynamic_append_assure_nulless__works(void **state); #endif // _TEST__F_utf_dynamic_append_assure_nulless_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_append_nulless.c b/level_0/f_utf/tests/unit/c/test-utf-dynamic_append_nulless.c index 9807175..a7679cf 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_append_nulless.c +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_append_nulless.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_utf_string_dynamic_append_nulless__parameter_checking(void **state) { + + const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; + + { + const f_status_t status = f_utf_string_dynamic_append_nulless(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_string_dynamic_append_nulless__works(void **state) { const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t", 0, 5); @@ -25,17 +36,6 @@ void test__f_utf_string_dynamic_append_nulless__works(void **state) { free((void *) destination.string); } -void test__f_utf_string_dynamic_append_nulless__parameter_checking(void **state) { - - const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; - - { - const f_status_t status = f_utf_string_dynamic_append_nulless(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_append_nulless.h b/level_0/f_utf/tests/unit/c/test-utf-dynamic_append_nulless.h index 1c502ad..07f15f8 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_append_nulless.h +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_append_nulless.h @@ -11,17 +11,17 @@ #define _TEST__F_utf_dynamic_append_nulless_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_dynamic_append_nulless() */ -extern void test__f_utf_string_dynamic_append_nulless__works(void **state); +extern void test__f_utf_string_dynamic_append_nulless__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_dynamic_append_nulless() */ -extern void test__f_utf_string_dynamic_append_nulless__parameter_checking(void **state); +extern void test__f_utf_string_dynamic_append_nulless__works(void **state); #endif // _TEST__F_utf_dynamic_append_nulless_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_mash.c b/level_0/f_utf/tests/unit/c/test-utf-dynamic_mash.c index 226ecbc..b602c28 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_mash.c +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_mash.c @@ -5,6 +5,18 @@ extern "C" { #endif +void test__f_utf_string_dynamic_mash__parameter_checking(void **state) { + + const f_utf_string_static_t glue = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0:", 0, 1); + const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t", 0, 5); + + { + const f_status_t status = f_utf_string_dynamic_mash(glue, source, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_string_dynamic_mash__works(void **state) { const f_utf_string_static_t glue = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0:", 0, 1); @@ -38,18 +50,6 @@ void test__f_utf_string_dynamic_mash__works(void **state) { free((void *) destination.string); } -void test__f_utf_string_dynamic_mash__parameter_checking(void **state) { - - const f_utf_string_static_t glue = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0:", 0, 1); - const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t", 0, 5); - - { - const f_status_t status = f_utf_string_dynamic_mash(glue, source, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_mash.h b/level_0/f_utf/tests/unit/c/test-utf-dynamic_mash.h index ba93412..8e648a3 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_mash.h +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_mash.h @@ -11,17 +11,17 @@ #define _TEST__F_utf_dynamic_mash_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_dynamic_mash() */ -extern void test__f_utf_string_dynamic_mash__works(void **state); +extern void test__f_utf_string_dynamic_mash__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_dynamic_mash() */ -extern void test__f_utf_string_dynamic_mash__parameter_checking(void **state); +extern void test__f_utf_string_dynamic_mash__works(void **state); #endif // _TEST__F_utf_dynamic_mash_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_mash_nulless.c b/level_0/f_utf/tests/unit/c/test-utf-dynamic_mash_nulless.c index 2d7dd4d..4194abe 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_mash_nulless.c +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_mash_nulless.c @@ -5,6 +5,18 @@ extern "C" { #endif +void test__f_utf_string_dynamic_mash_nulless__parameter_checking(void **state) { + + const f_utf_string_static_t glue = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0:", 0, 1); + const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t", 0, 5); + + { + const f_status_t status = f_utf_string_dynamic_mash_nulless(glue, source, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_string_dynamic_mash_nulless__works(void **state) { const f_utf_string_static_t glue = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0:", 0, 1); @@ -39,18 +51,6 @@ void test__f_utf_string_dynamic_mash_nulless__works(void **state) { free((void *) destination.string); } -void test__f_utf_string_dynamic_mash_nulless__parameter_checking(void **state) { - - const f_utf_string_static_t glue = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0:", 0, 1); - const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t", 0, 5); - - { - const f_status_t status = f_utf_string_dynamic_mash_nulless(glue, source, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_mash_nulless.h b/level_0/f_utf/tests/unit/c/test-utf-dynamic_mash_nulless.h index f8eac83..ca167be 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_mash_nulless.h +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_mash_nulless.h @@ -11,17 +11,17 @@ #define _TEST__F_utf_dynamic_mash_nulless_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_dynamic_mash_nulless() */ -extern void test__f_utf_string_dynamic_mash_nulless__works(void **state); +extern void test__f_utf_string_dynamic_mash_nulless__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_dynamic_mash_nulless() */ -extern void test__f_utf_string_dynamic_mash_nulless__parameter_checking(void **state); +extern void test__f_utf_string_dynamic_mash_nulless__works(void **state); #endif // _TEST__F_utf_dynamic_mash_nulless_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_mish.c b/level_0/f_utf/tests/unit/c/test-utf-dynamic_mish.c index fd4adac..8e59ed2 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_mish.c +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_mish.c @@ -5,6 +5,18 @@ extern "C" { #endif +void test__f_utf_string_dynamic_mish__parameter_checking(void **state) { + + const f_utf_string_static_t glue = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0:", 0, 1); + const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t", 0, 5); + + { + const f_status_t status = f_utf_string_dynamic_mish(glue, source, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_string_dynamic_mish__works(void **state) { const f_utf_string_static_t glue = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0:", 0, 1); @@ -38,18 +50,6 @@ void test__f_utf_string_dynamic_mish__works(void **state) { free((void *) destination.string); } -void test__f_utf_string_dynamic_mish__parameter_checking(void **state) { - - const f_utf_string_static_t glue = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0:", 0, 1); - const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t", 0, 5); - - { - const f_status_t status = f_utf_string_dynamic_mish(glue, source, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_mish.h b/level_0/f_utf/tests/unit/c/test-utf-dynamic_mish.h index 2155c64..59f3709 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_mish.h +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_mish.h @@ -11,17 +11,17 @@ #define _TEST__F_utf_dynamic_mish_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_dynamic_mish() */ -extern void test__f_utf_string_dynamic_mish__works(void **state); +extern void test__f_utf_string_dynamic_mish__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_dynamic_mish() */ -extern void test__f_utf_string_dynamic_mish__parameter_checking(void **state); +extern void test__f_utf_string_dynamic_mish__works(void **state); #endif // _TEST__F_utf_dynamic_mish_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_mish_nulless.c b/level_0/f_utf/tests/unit/c/test-utf-dynamic_mish_nulless.c index 9bf6523..0a4b563 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_mish_nulless.c +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_mish_nulless.c @@ -5,6 +5,18 @@ extern "C" { #endif +void test__f_utf_string_dynamic_mish_nulless__parameter_checking(void **state) { + + const f_utf_string_static_t glue = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0:", 0, 1); + const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t", 0, 5); + + { + const f_status_t status = f_utf_string_dynamic_mish_nulless(glue, source, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_string_dynamic_mish_nulless__works(void **state) { const f_utf_string_static_t glue = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0:", 0, 1); @@ -39,18 +51,6 @@ void test__f_utf_string_dynamic_mish_nulless__works(void **state) { free((void *) destination.string); } -void test__f_utf_string_dynamic_mish_nulless__parameter_checking(void **state) { - - const f_utf_string_static_t glue = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0:", 0, 1); - const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t", 0, 5); - - { - const f_status_t status = f_utf_string_dynamic_mish_nulless(glue, source, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_mish_nulless.h b/level_0/f_utf/tests/unit/c/test-utf-dynamic_mish_nulless.h index 3be4e73..947bb17 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_mish_nulless.h +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_mish_nulless.h @@ -11,17 +11,17 @@ #define _TEST__F_utf_dynamic_mish_nulless_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_dynamic_mish_nulless() */ -extern void test__f_utf_string_dynamic_mish_nulless__works(void **state); +extern void test__f_utf_string_dynamic_mish_nulless__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_dynamic_mish_nulless() */ -extern void test__f_utf_string_dynamic_mish_nulless__parameter_checking(void **state); +extern void test__f_utf_string_dynamic_mish_nulless__works(void **state); #endif // _TEST__F_utf_dynamic_mish_nulless_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_append.c b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_append.c index 5900877..b8dc67f 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_append.c +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_append.c @@ -5,6 +5,18 @@ extern "C" { #endif +void test__f_utf_string_dynamic_partial_append__parameter_checking(void **state) { + + const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; + const f_range_t partial = f_range_t_initialize; + + { + const f_status_t status = f_utf_string_dynamic_partial_append(data, partial, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_string_dynamic_partial_append__works(void **state) { const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0_\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t\0\0\0_", 0, 7); @@ -26,18 +38,6 @@ void test__f_utf_string_dynamic_partial_append__works(void **state) { free((void *) destination.string); } -void test__f_utf_string_dynamic_partial_append__parameter_checking(void **state) { - - const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; - const f_range_t partial = f_range_t_initialize; - - { - const f_status_t status = f_utf_string_dynamic_partial_append(data, partial, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_append.h b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_append.h index 6873b41..28f4c30 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_append.h +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_append.h @@ -11,17 +11,17 @@ #define _TEST__F_utf_dynamic_partial_append_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_dynamic_partial_append() */ -extern void test__f_utf_string_dynamic_partial_append__works(void **state); +extern void test__f_utf_string_dynamic_partial_append__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_dynamic_partial_append() */ -extern void test__f_utf_string_dynamic_partial_append__parameter_checking(void **state); +extern void test__f_utf_string_dynamic_partial_append__works(void **state); #endif // _TEST__F_utf_dynamic_partial_append_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_append_assure.c b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_append_assure.c index e1d10cb..73e2a81 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_append_assure.c +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_append_assure.c @@ -5,6 +5,18 @@ extern "C" { #endif +void test__f_utf_string_dynamic_partial_append_assure__parameter_checking(void **state) { + + const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; + const f_range_t partial = f_range_t_initialize; + + { + const f_status_t status = f_utf_string_dynamic_partial_append_assure(data, partial, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_string_dynamic_partial_append_assure__works(void **state) { const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0_\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t\0\0\0_", 0, 7); @@ -38,18 +50,6 @@ void test__f_utf_string_dynamic_partial_append_assure__works(void **state) { free((void *) destination.string); } -void test__f_utf_string_dynamic_partial_append_assure__parameter_checking(void **state) { - - const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; - const f_range_t partial = f_range_t_initialize; - - { - const f_status_t status = f_utf_string_dynamic_partial_append_assure(data, partial, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_append_assure.h b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_append_assure.h index d334362..9d376be 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_append_assure.h +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_append_assure.h @@ -11,17 +11,17 @@ #define _TEST__F_utf_dynamic_partial_append_assure_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_dynamic_partial_append_assure() */ -extern void test__f_utf_string_dynamic_partial_append_assure__works(void **state); +extern void test__f_utf_string_dynamic_partial_append_assure__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_dynamic_partial_append_assure() */ -extern void test__f_utf_string_dynamic_partial_append_assure__parameter_checking(void **state); +extern void test__f_utf_string_dynamic_partial_append_assure__works(void **state); #endif // _TEST__F_utf_dynamic_partial_append_assure_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_append_assure_nulless.c b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_append_assure_nulless.c index eaae1be..794cbd9 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_append_assure_nulless.c +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_append_assure_nulless.c @@ -5,6 +5,18 @@ extern "C" { #endif +void test__f_utf_string_dynamic_partial_append_assure_nulless__parameter_checking(void **state) { + + const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; + const f_range_t partial = f_range_t_initialize; + + { + const f_status_t status = f_utf_string_dynamic_partial_append_assure_nulless(data, partial, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_string_dynamic_partial_append_assure_nulless__works(void **state) { const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0_\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t\0\0\0_", 0, 7); @@ -38,18 +50,6 @@ void test__f_utf_string_dynamic_partial_append_assure_nulless__works(void **stat free((void *) destination.string); } -void test__f_utf_string_dynamic_partial_append_assure_nulless__parameter_checking(void **state) { - - const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; - const f_range_t partial = f_range_t_initialize; - - { - const f_status_t status = f_utf_string_dynamic_partial_append_assure_nulless(data, partial, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_append_assure_nulless.h b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_append_assure_nulless.h index 9ce437e..d63c13b 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_append_assure_nulless.h +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_append_assure_nulless.h @@ -11,17 +11,17 @@ #define _TEST__F_utf_dynamic_partial_append_assure_nulless_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_dynamic_partial_append_assure_nulless() */ -extern void test__f_utf_string_dynamic_partial_append_assure_nulless__works(void **state); +extern void test__f_utf_string_dynamic_partial_append_assure_nulless__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_dynamic_partial_append_assure_nulless() */ -extern void test__f_utf_string_dynamic_partial_append_assure_nulless__parameter_checking(void **state); +extern void test__f_utf_string_dynamic_partial_append_assure_nulless__works(void **state); #endif // _TEST__F_utf_dynamic_partial_append_assure_nulless_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_append_nulless.c b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_append_nulless.c index a794a28..88dad19 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_append_nulless.c +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_append_nulless.c @@ -5,6 +5,18 @@ extern "C" { #endif +void test__f_utf_string_dynamic_partial_append_nulless__parameter_checking(void **state) { + + const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; + const f_range_t partial = f_range_t_initialize; + + { + const f_status_t status = f_utf_string_dynamic_partial_append_nulless(data, partial, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_string_dynamic_partial_append_nulless__works(void **state) { const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0_\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t\0\0\0_", 0, 7); @@ -26,18 +38,6 @@ void test__f_utf_string_dynamic_partial_append_nulless__works(void **state) { free((void *) destination.string); } -void test__f_utf_string_dynamic_partial_append_nulless__parameter_checking(void **state) { - - const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; - const f_range_t partial = f_range_t_initialize; - - { - const f_status_t status = f_utf_string_dynamic_partial_append_nulless(data, partial, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_append_nulless.h b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_append_nulless.h index 67c8f62..1263aee 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_append_nulless.h +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_append_nulless.h @@ -11,17 +11,17 @@ #define _TEST__F_utf_dynamic_partial_append_nulless_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_dynamic_partial_append_nulless() */ -extern void test__f_utf_string_dynamic_partial_append_nulless__works(void **state); +extern void test__f_utf_string_dynamic_partial_append_nulless__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_dynamic_partial_append_nulless() */ -extern void test__f_utf_string_dynamic_partial_append_nulless__parameter_checking(void **state); +extern void test__f_utf_string_dynamic_partial_append_nulless__works(void **state); #endif // _TEST__F_utf_dynamic_partial_append_nulless_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_mash.c b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_mash.c index 14b76c3..5da4881 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_mash.c +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_mash.c @@ -5,6 +5,19 @@ extern "C" { #endif +void test__f_utf_string_dynamic_partial_mash__parameter_checking(void **state) { + + const f_utf_string_static_t glue = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0:", 0, 1); + const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t", 0, 5); + const f_range_t partial = f_range_t_initialize; + + { + const f_status_t status = f_utf_string_dynamic_partial_mash(glue, source, partial, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_string_dynamic_partial_mash__works(void **state) { const f_utf_string_static_t glue = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0:", 0, 1); @@ -40,19 +53,6 @@ void test__f_utf_string_dynamic_partial_mash__works(void **state) { free((void *) destination.string); } -void test__f_utf_string_dynamic_partial_mash__parameter_checking(void **state) { - - const f_utf_string_static_t glue = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0:", 0, 1); - const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t", 0, 5); - const f_range_t partial = f_range_t_initialize; - - { - const f_status_t status = f_utf_string_dynamic_partial_mash(glue, source, partial, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_mash.h b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_mash.h index 17c519d..11d0a1b 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_mash.h +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_mash.h @@ -11,17 +11,17 @@ #define _TEST__F_utf_dynamic_partial_mash_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_dynamic_partial_mash() */ -extern void test__f_utf_string_dynamic_partial_mash__works(void **state); +extern void test__f_utf_string_dynamic_partial_mash__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_dynamic_partial_mash() */ -extern void test__f_utf_string_dynamic_partial_mash__parameter_checking(void **state); +extern void test__f_utf_string_dynamic_partial_mash__works(void **state); #endif // _TEST__F_utf_dynamic_partial_mash_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_mash_nulless.c b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_mash_nulless.c index cb47378..f186ce8 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_mash_nulless.c +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_mash_nulless.c @@ -5,6 +5,19 @@ extern "C" { #endif +void test__f_utf_string_dynamic_partial_mash_nulless__parameter_checking(void **state) { + + const f_utf_string_static_t glue = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0:", 0, 1); + const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t", 0, 5); + const f_range_t partial = f_range_t_initialize; + + { + const f_status_t status = f_utf_string_dynamic_partial_mash_nulless(glue, source, partial, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_string_dynamic_partial_mash_nulless__works(void **state) { const f_utf_string_static_t glue = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0:", 0, 1); @@ -40,19 +53,6 @@ void test__f_utf_string_dynamic_partial_mash_nulless__works(void **state) { free((void *) destination.string); } -void test__f_utf_string_dynamic_partial_mash_nulless__parameter_checking(void **state) { - - const f_utf_string_static_t glue = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0:", 0, 1); - const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t", 0, 5); - const f_range_t partial = f_range_t_initialize; - - { - const f_status_t status = f_utf_string_dynamic_partial_mash_nulless(glue, source, partial, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_mash_nulless.h b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_mash_nulless.h index 450b651..18aacb0 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_mash_nulless.h +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_mash_nulless.h @@ -11,17 +11,17 @@ #define _TEST__F_utf_dynamic_partial_mash_nulless_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_dynamic_partial_mash_nulless() */ -extern void test__f_utf_string_dynamic_partial_mash_nulless__works(void **state); +extern void test__f_utf_string_dynamic_partial_mash_nulless__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_dynamic_partial_mash_nulless() */ -extern void test__f_utf_string_dynamic_partial_mash_nulless__parameter_checking(void **state); +extern void test__f_utf_string_dynamic_partial_mash_nulless__works(void **state); #endif // _TEST__F_utf_dynamic_partial_mash_nulless_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_mish.c b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_mish.c index f3fef0e..30be7c3 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_mish.c +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_mish.c @@ -5,6 +5,19 @@ extern "C" { #endif +void test__f_utf_string_dynamic_partial_mish__parameter_checking(void **state) { + + const f_utf_string_static_t glue = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0:", 0, 1); + const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t", 0, 5); + const f_range_t partial = f_range_t_initialize; + + { + const f_status_t status = f_utf_string_dynamic_partial_mish(glue, source, partial, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_string_dynamic_partial_mish__works(void **state) { const f_utf_string_static_t glue = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0:", 0, 1); @@ -40,19 +53,6 @@ void test__f_utf_string_dynamic_partial_mish__works(void **state) { free((void *) destination.string); } -void test__f_utf_string_dynamic_partial_mish__parameter_checking(void **state) { - - const f_utf_string_static_t glue = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0:", 0, 1); - const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t", 0, 5); - const f_range_t partial = f_range_t_initialize; - - { - const f_status_t status = f_utf_string_dynamic_partial_mish(glue, source, partial, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_mish.h b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_mish.h index 09375f7..04b3b97 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_mish.h +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_mish.h @@ -11,16 +11,17 @@ #define _TEST__F_utf_dynamic_partial_mish_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_dynamic_partial_mish() */ -extern void test__f_utf_string_dynamic_partial_mish__works(void **state); +extern void test__f_utf_string_dynamic_partial_mish__parameter_checking(void **state); + /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_dynamic_partial_mish() */ -extern void test__f_utf_string_dynamic_partial_mish__parameter_checking(void **state); +extern void test__f_utf_string_dynamic_partial_mish__works(void **state); #endif // _TEST__F_utf_dynamic_partial_mish_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_mish_nulless.c b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_mish_nulless.c index a6ecee9..f2bed09 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_mish_nulless.c +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_mish_nulless.c @@ -5,6 +5,19 @@ extern "C" { #endif +void test__f_utf_string_dynamic_partial_mish_nulless__parameter_checking(void **state) { + + const f_utf_string_static_t glue = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0:", 0, 1); + const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t", 0, 5); + const f_range_t partial = f_range_t_initialize; + + { + const f_status_t status = f_utf_string_dynamic_partial_mish_nulless(glue, source, partial, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_string_dynamic_partial_mish_nulless__works(void **state) { const f_utf_string_static_t glue = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0:", 0, 1); @@ -40,19 +53,6 @@ void test__f_utf_string_dynamic_partial_mish_nulless__works(void **state) { free((void *) destination.string); } -void test__f_utf_string_dynamic_partial_mish_nulless__parameter_checking(void **state) { - - const f_utf_string_static_t glue = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0:", 0, 1); - const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t", 0, 5); - const f_range_t partial = f_range_t_initialize; - - { - const f_status_t status = f_utf_string_dynamic_partial_mish_nulless(glue, source, partial, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_mish_nulless.h b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_mish_nulless.h index d5fc7ad..82e6e50 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_mish_nulless.h +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_mish_nulless.h @@ -11,17 +11,17 @@ #define _TEST__F_utf_dynamic_partial_mish_nulless_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_dynamic_partial_mish_nulless() */ -extern void test__f_utf_string_dynamic_partial_mish_nulless__works(void **state); +extern void test__f_utf_string_dynamic_partial_mish_nulless__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_dynamic_partial_mish_nulless() */ -extern void test__f_utf_string_dynamic_partial_mish_nulless__parameter_checking(void **state); +extern void test__f_utf_string_dynamic_partial_mish_nulless__works(void **state); #endif // _TEST__F_utf_dynamic_partial_mish_nulless_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_prepend.c b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_prepend.c index 76100c1..3011417 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_prepend.c +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_prepend.c @@ -5,6 +5,18 @@ extern "C" { #endif +void test__f_utf_string_dynamic_partial_prepend__parameter_checking(void **state) { + + const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; + const f_range_t partial = f_range_t_initialize; + + { + const f_status_t status = f_utf_string_dynamic_partial_prepend(data, partial, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_string_dynamic_partial_prepend__works(void **state) { const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0_\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t\0\0\0_", 0, 7); @@ -26,18 +38,6 @@ void test__f_utf_string_dynamic_partial_prepend__works(void **state) { free((void *) destination.string); } -void test__f_utf_string_dynamic_partial_prepend__parameter_checking(void **state) { - - const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; - const f_range_t partial = f_range_t_initialize; - - { - const f_status_t status = f_utf_string_dynamic_partial_prepend(data, partial, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_prepend.h b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_prepend.h index 2de8bd9..d02fa6e 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_prepend.h +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_prepend.h @@ -11,17 +11,17 @@ #define _TEST__F_utf_dynamic_partial_prepend_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_dynamic_partial_prepend() */ -extern void test__f_utf_string_dynamic_partial_prepend__works(void **state); +extern void test__f_utf_string_dynamic_partial_prepend__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_dynamic_partial_prepend() */ -extern void test__f_utf_string_dynamic_partial_prepend__parameter_checking(void **state); +extern void test__f_utf_string_dynamic_partial_prepend__works(void **state); #endif // _TEST__F_utf_dynamic_partial_prepend_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_prepend_assure.c b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_prepend_assure.c index 4b18246..f1649c8 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_prepend_assure.c +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_prepend_assure.c @@ -5,6 +5,18 @@ extern "C" { #endif +void test__f_utf_string_dynamic_partial_prepend_assure__parameter_checking(void **state) { + + const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; + const f_range_t partial = f_range_t_initialize; + + { + const f_status_t status = f_utf_string_dynamic_partial_prepend_assure(data, partial, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_string_dynamic_partial_prepend_assure__works(void **state) { const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0_\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t\0\0\0_", 0, 7); @@ -38,18 +50,6 @@ void test__f_utf_string_dynamic_partial_prepend_assure__works(void **state) { free((void *) destination.string); } -void test__f_utf_string_dynamic_partial_prepend_assure__parameter_checking(void **state) { - - const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; - const f_range_t partial = f_range_t_initialize; - - { - const f_status_t status = f_utf_string_dynamic_partial_prepend_assure(data, partial, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_prepend_assure.h b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_prepend_assure.h index 0bd72de..40837f7 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_prepend_assure.h +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_prepend_assure.h @@ -11,17 +11,17 @@ #define _TEST__F_utf_dynamic_partial_prepend_assure_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_dynamic_partial_prepend_assure() */ -extern void test__f_utf_string_dynamic_partial_prepend_assure__works(void **state); +extern void test__f_utf_string_dynamic_partial_prepend_assure__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_dynamic_partial_prepend_assure() */ -extern void test__f_utf_string_dynamic_partial_prepend_assure__parameter_checking(void **state); +extern void test__f_utf_string_dynamic_partial_prepend_assure__works(void **state); #endif // _TEST__F_utf_dynamic_partial_prepend_assure_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_prepend_assure_nulless.c b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_prepend_assure_nulless.c index 0d1dd08..245c548 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_prepend_assure_nulless.c +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_prepend_assure_nulless.c @@ -5,6 +5,18 @@ extern "C" { #endif +void test__f_utf_string_dynamic_partial_prepend_assure_nulless__parameter_checking(void **state) { + + const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; + const f_range_t partial = f_range_t_initialize; + + { + const f_status_t status = f_utf_string_dynamic_partial_prepend_assure_nulless(data, partial, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_string_dynamic_partial_prepend_assure_nulless__works(void **state) { const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0_\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t\0\0\0_", 0, 7); @@ -38,18 +50,6 @@ void test__f_utf_string_dynamic_partial_prepend_assure_nulless__works(void **sta free((void *) destination.string); } -void test__f_utf_string_dynamic_partial_prepend_assure_nulless__parameter_checking(void **state) { - - const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; - const f_range_t partial = f_range_t_initialize; - - { - const f_status_t status = f_utf_string_dynamic_partial_prepend_assure_nulless(data, partial, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_prepend_assure_nulless.h b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_prepend_assure_nulless.h index 597b4bb..ae637b0 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_prepend_assure_nulless.h +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_prepend_assure_nulless.h @@ -11,17 +11,17 @@ #define _TEST__F_utf_dynamic_partial_prepend_assure_nulless_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_dynamic_partial_prepend_assure_nulless() */ -extern void test__f_utf_string_dynamic_partial_prepend_assure_nulless__works(void **state); +extern void test__f_utf_string_dynamic_partial_prepend_assure_nulless__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_dynamic_partial_prepend_assure_nulless() */ -extern void test__f_utf_string_dynamic_partial_prepend_assure_nulless__parameter_checking(void **state); +extern void test__f_utf_string_dynamic_partial_prepend_assure_nulless__works(void **state); #endif // _TEST__F_utf_dynamic_partial_prepend_assure_nulless_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_prepend_nulless.c b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_prepend_nulless.c index 004c09b..960b462 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_prepend_nulless.c +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_prepend_nulless.c @@ -5,6 +5,18 @@ extern "C" { #endif +void test__f_utf_string_dynamic_partial_prepend_nulless__parameter_checking(void **state) { + + const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; + const f_range_t partial = f_range_t_initialize; + + { + const f_status_t status = f_utf_string_dynamic_partial_prepend_nulless(data, partial, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_string_dynamic_partial_prepend_nulless__works(void **state) { const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0_\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t\0\0\0_", 0, 7); @@ -26,18 +38,6 @@ void test__f_utf_string_dynamic_partial_prepend_nulless__works(void **state) { free((void *) destination.string); } -void test__f_utf_string_dynamic_partial_prepend_nulless__parameter_checking(void **state) { - - const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; - const f_range_t partial = f_range_t_initialize; - - { - const f_status_t status = f_utf_string_dynamic_partial_prepend_nulless(data, partial, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_prepend_nulless.h b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_prepend_nulless.h index 84cb7ed..95ef1cd 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_prepend_nulless.h +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_partial_prepend_nulless.h @@ -11,17 +11,17 @@ #define _TEST__F_utf_dynamic_partial_prepend_nulless_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_dynamic_partial_prepend_nulless() */ -extern void test__f_utf_string_dynamic_partial_prepend_nulless__works(void **state); +extern void test__f_utf_string_dynamic_partial_prepend_nulless__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_dynamic_partial_prepend_nulless() */ -extern void test__f_utf_string_dynamic_partial_prepend_nulless__parameter_checking(void **state); +extern void test__f_utf_string_dynamic_partial_prepend_nulless__works(void **state); #endif // _TEST__F_utf_dynamic_partial_prepend_nulless_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_prepend.c b/level_0/f_utf/tests/unit/c/test-utf-dynamic_prepend.c index ae21b4f..a0b17b9 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_prepend.c +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_prepend.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_utf_string_dynamic_prepend__parameter_checking(void **state) { + + const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; + + { + const f_status_t status = f_utf_string_dynamic_prepend(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_string_dynamic_prepend__works(void **state) { const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t", 0, 5); @@ -24,17 +35,6 @@ void test__f_utf_string_dynamic_prepend__works(void **state) { free((void *) destination.string); } -void test__f_utf_string_dynamic_prepend__parameter_checking(void **state) { - - const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; - - { - const f_status_t status = f_utf_string_dynamic_prepend(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_prepend.h b/level_0/f_utf/tests/unit/c/test-utf-dynamic_prepend.h index 5177ef9..1dd7b3b 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_prepend.h +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_prepend.h @@ -11,17 +11,17 @@ #define _TEST__F_utf_dynamic_prepend_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_dynamic_prepend() */ -extern void test__f_utf_string_dynamic_prepend__works(void **state); +extern void test__f_utf_string_dynamic_prepend__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_dynamic_prepend() */ -extern void test__f_utf_string_dynamic_prepend__parameter_checking(void **state); +extern void test__f_utf_string_dynamic_prepend__works(void **state); #endif // _TEST__F_utf_dynamic_prepend_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_prepend_assure.c b/level_0/f_utf/tests/unit/c/test-utf-dynamic_prepend_assure.c index 7d4b1d8..c5040ed 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_prepend_assure.c +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_prepend_assure.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_utf_string_dynamic_prepend_assure__parameter_checking(void **state) { + + const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; + + { + const f_status_t status = f_utf_string_dynamic_prepend_assure(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_string_dynamic_prepend_assure__works(void **state) { const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t", 0, 5); @@ -36,17 +47,6 @@ void test__f_utf_string_dynamic_prepend_assure__works(void **state) { free((void *) destination.string); } -void test__f_utf_string_dynamic_prepend_assure__parameter_checking(void **state) { - - const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; - - { - const f_status_t status = f_utf_string_dynamic_prepend_assure(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_prepend_assure.h b/level_0/f_utf/tests/unit/c/test-utf-dynamic_prepend_assure.h index 040e96b..c3ada91 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_prepend_assure.h +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_prepend_assure.h @@ -11,17 +11,17 @@ #define _TEST__F_utf_dynamic_prepend_assure_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_dynamic_prepend_assure() */ -extern void test__f_utf_string_dynamic_prepend_assure__works(void **state); +extern void test__f_utf_string_dynamic_prepend_assure__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_dynamic_prepend_assure() */ -extern void test__f_utf_string_dynamic_prepend_assure__parameter_checking(void **state); +extern void test__f_utf_string_dynamic_prepend_assure__works(void **state); #endif // _TEST__F_utf_dynamic_prepend_assure_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_prepend_assure_nulless.c b/level_0/f_utf/tests/unit/c/test-utf-dynamic_prepend_assure_nulless.c index cdbd627..cadc9fa 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_prepend_assure_nulless.c +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_prepend_assure_nulless.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_utf_string_dynamic_prepend_assure_nulless__parameter_checking(void **state) { + + const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; + + { + const f_status_t status = f_utf_string_dynamic_prepend_assure_nulless(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_string_dynamic_prepend_assure_nulless__works(void **state) { const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t", 0, 5); @@ -37,17 +48,6 @@ void test__f_utf_string_dynamic_prepend_assure_nulless__works(void **state) { free((void *) destination.string); } -void test__f_utf_string_dynamic_prepend_assure_nulless__parameter_checking(void **state) { - - const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; - - { - const f_status_t status = f_utf_string_dynamic_prepend_assure_nulless(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_prepend_assure_nulless.h b/level_0/f_utf/tests/unit/c/test-utf-dynamic_prepend_assure_nulless.h index 63eea96..e4541ba 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_prepend_assure_nulless.h +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_prepend_assure_nulless.h @@ -11,17 +11,17 @@ #define _TEST__F_utf_dynamic_prepend_assure_nulless_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_dynamic_prepend_assure_nulless() */ -extern void test__f_utf_string_dynamic_prepend_assure_nulless__works(void **state); +extern void test__f_utf_string_dynamic_prepend_assure_nulless__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_dynamic_prepend_assure_nulless() */ -extern void test__f_utf_string_dynamic_prepend_assure_nulless__parameter_checking(void **state); +extern void test__f_utf_string_dynamic_prepend_assure_nulless__works(void **state); #endif // _TEST__F_utf_dynamic_prepend_assure_nulless_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_prepend_nulless.c b/level_0/f_utf/tests/unit/c/test-utf-dynamic_prepend_nulless.c index 706b76e..7ad1f62 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_prepend_nulless.c +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_prepend_nulless.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_utf_string_dynamic_prepend_nulless__parameter_checking(void **state) { + + const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; + + { + const f_status_t status = f_utf_string_dynamic_prepend_nulless(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_string_dynamic_prepend_nulless__works(void **state) { const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t", 0, 5); @@ -25,17 +36,6 @@ void test__f_utf_string_dynamic_prepend_nulless__works(void **state) { free((void *) destination.string); } -void test__f_utf_string_dynamic_prepend_nulless__parameter_checking(void **state) { - - const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; - - { - const f_status_t status = f_utf_string_dynamic_prepend_nulless(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_prepend_nulless.h b/level_0/f_utf/tests/unit/c/test-utf-dynamic_prepend_nulless.h index c970a2b..336f682 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_prepend_nulless.h +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_prepend_nulless.h @@ -11,17 +11,17 @@ #define _TEST__F_utf_dynamic_prepend_nulless_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_dynamic_prepend_nulless() */ -extern void test__f_utf_string_dynamic_prepend_nulless__works(void **state); +extern void test__f_utf_string_dynamic_prepend_nulless__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_dynamic_prepend_nulless() */ -extern void test__f_utf_string_dynamic_prepend_nulless__parameter_checking(void **state); +extern void test__f_utf_string_dynamic_prepend_nulless__works(void **state); #endif // _TEST__F_utf_dynamic_prepend_nulless_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_seek_line.c b/level_0/f_utf/tests/unit/c/test-utf-dynamic_seek_line.c index ca80d90..daa85a1 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_seek_line.c +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_seek_line.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_utf_string_dynamic_seek_line__parameter_checking(void **state) { + + const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0X\0\0\0\n\0\0\0s\0\0\0t", 0, 6); + + { + const f_status_t status = f_utf_string_dynamic_seek_line(source, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_string_dynamic_seek_line__returns_data_not_stop(void **state) { const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0s\0\0\0t\0\0\0\n\0\0\0a\0\0\0f\0\0\0t\0\0\0e\0\0\0r", 0, 10); @@ -66,17 +77,6 @@ void test__f_utf_string_dynamic_seek_line__works(void **state) { } } -void test__f_utf_string_dynamic_seek_line__parameter_checking(void **state) { - - const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0X\0\0\0\n\0\0\0s\0\0\0t", 0, 6); - - { - const f_status_t status = f_utf_string_dynamic_seek_line(source, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_seek_line.h b/level_0/f_utf/tests/unit/c/test-utf-dynamic_seek_line.h index 37242b5..46a40f9 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_seek_line.h +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_seek_line.h @@ -11,6 +11,13 @@ #define _TEST__F_utf_dynamic_seek_line_h /** + * Test that the function correctly fails on invalid parameter. + * + * @see f_utf_string_dynamic_seek_line() + */ +extern void test__f_utf_string_dynamic_seek_line__parameter_checking(void **state); + +/** * Test that the function returns F_data_not_stop because range is an empty range (range.start > range.stop). * * @see f_utf_string_dynamic_seek_line() @@ -38,11 +45,4 @@ extern void test__f_utf_string_dynamic_seek_line__returns_none_stop(void **state */ extern void test__f_utf_string_dynamic_seek_line__works(void **state); -/** - * Test that the function correctly fails on invalid parameter. - * - * @see f_utf_string_dynamic_seek_line() - */ -extern void test__f_utf_string_dynamic_seek_line__parameter_checking(void **state); - #endif // _TEST__F_utf_dynamic_seek_line_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_seek_line_to.c b/level_0/f_utf/tests/unit/c/test-utf-dynamic_seek_line_to.c index 46d9a26..5384cdb 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_seek_line_to.c +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_seek_line_to.c @@ -39,6 +39,18 @@ void test__f_utf_string_dynamic_seek_line_to__before_newline(void **state) { } } +void test__f_utf_string_dynamic_seek_line_to__parameter_checking(void **state) { + + const f_utf_string_static_t to = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0X", 0, 1); + const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0X\0\0\0\n\0\0\0s\0\0\0t", 0, 6); + + { + const f_status_t status = f_utf_string_dynamic_seek_line_to(source, to.string[0], 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_string_dynamic_seek_line_to__returns_data_not_stop(void **state) { const f_utf_string_static_t to = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0X", 0, 1); @@ -87,18 +99,6 @@ void test__f_utf_string_dynamic_seek_line_to__returns_none_stop(void **state) { } } -void test__f_utf_string_dynamic_seek_line_to__parameter_checking(void **state) { - - const f_utf_string_static_t to = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0X", 0, 1); - const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0X\0\0\0\n\0\0\0s\0\0\0t", 0, 6); - - { - const f_status_t status = f_utf_string_dynamic_seek_line_to(source, to.string[0], 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_seek_line_to.h b/level_0/f_utf/tests/unit/c/test-utf-dynamic_seek_line_to.h index 1da9414..27ff9ea 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_seek_line_to.h +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_seek_line_to.h @@ -25,6 +25,13 @@ extern void test__f_utf_string_dynamic_seek_line_to__after_newline(void **state) extern void test__f_utf_string_dynamic_seek_line_to__before_newline(void **state); /** + * Test that the function correctly fails on invalid parameter. + * + * @see f_utf_string_dynamic_seek_line_to() + */ +extern void test__f_utf_string_dynamic_seek_line_to__parameter_checking(void **state); + +/** * Test that the function returns F_data_not_stop because range is an empty range (range.start > range.stop). * * @see f_utf_string_dynamic_seek_line_to() @@ -45,11 +52,4 @@ extern void test__f_utf_string_dynamic_seek_line_to__returns_none_eos(void **sta */ extern void test__f_utf_string_dynamic_seek_line_to__returns_none_stop(void **state); -/** - * Test that the function correctly fails on invalid parameter. - * - * @see f_utf_string_dynamic_seek_line_to() - */ -extern void test__f_utf_string_dynamic_seek_line_to__parameter_checking(void **state); - #endif // _TEST__F_utf_dynamic_seek_line_to_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_seek_to.c b/level_0/f_utf/tests/unit/c/test-utf-dynamic_seek_to.c index a4c0348..1df7ace 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_seek_to.c +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_seek_to.c @@ -39,6 +39,18 @@ void test__f_utf_string_dynamic_seek_to__before_newline(void **state) { } } +void test__f_utf_string_dynamic_seek_to__parameter_checking(void **state) { + + const f_utf_string_static_t to = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0X", 0, 1); + const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0X\0\0\0\n\0\0\0s\0\0\0t", 0, 6); + + { + const f_status_t status = f_utf_string_dynamic_seek_to(source, to.string[0], 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_string_dynamic_seek_to__returns_data_not_stop(void **state) { const f_utf_string_static_t to = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0X", 0, 1); @@ -118,18 +130,6 @@ void test__f_utf_string_dynamic_seek_to__works(void **state) { } } -void test__f_utf_string_dynamic_seek_to__parameter_checking(void **state) { - - const f_utf_string_static_t to = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0X", 0, 1); - const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0X\0\0\0\n\0\0\0s\0\0\0t", 0, 6); - - { - const f_status_t status = f_utf_string_dynamic_seek_to(source, to.string[0], 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamic_seek_to.h b/level_0/f_utf/tests/unit/c/test-utf-dynamic_seek_to.h index bd008b7..44f1011 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamic_seek_to.h +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamic_seek_to.h @@ -25,6 +25,13 @@ extern void test__f_utf_string_dynamic_seek_to__after_newline(void **state); extern void test__f_utf_string_dynamic_seek_to__before_newline(void **state); /** + * Test that the function correctly fails on invalid parameter. + * + * @see f_utf_string_dynamic_seek_to() + */ +extern void test__f_utf_string_dynamic_seek_to__parameter_checking(void **state); + +/** * Test that the function returns F_data_not_stop because range is an empty range (range.start > range.stop). * * @see f_utf_string_dynamic_seek_to() @@ -45,11 +52,4 @@ extern void test__f_utf_string_dynamic_seek_to__returns_none_eos(void **state); */ extern void test__f_utf_string_dynamic_seek_to__returns_none_stop(void **state); -/** - * Test that the function correctly fails on invalid parameter. - * - * @see f_utf_string_dynamic_seek_to() - */ -extern void test__f_utf_string_dynamic_seek_to__parameter_checking(void **state); - #endif // _TEST__F_utf_dynamic_seek_to_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamics_append.c b/level_0/f_utf/tests/unit/c/test-utf-dynamics_append.c index f2b3037..46950fd 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamics_append.c +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamics_append.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_utf_string_dynamics_append__parameter_checking(void **state) { + + const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; + + { + const f_status_t status = f_utf_string_dynamics_append(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_string_dynamics_append__works(void **state) { const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t", 0, 5); @@ -26,17 +37,6 @@ void test__f_utf_string_dynamics_append__works(void **state) { free((void *) destination.array); } -void test__f_utf_string_dynamics_append__parameter_checking(void **state) { - - const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; - - { - const f_status_t status = f_utf_string_dynamics_append(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamics_append.h b/level_0/f_utf/tests/unit/c/test-utf-dynamics_append.h index 02e32a6..13e4bdd 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamics_append.h +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamics_append.h @@ -11,17 +11,17 @@ #define _TEST__F_utf_dynamics_append_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_dynamics_append() */ -extern void test__f_utf_string_dynamics_append__works(void **state); +extern void test__f_utf_string_dynamics_append__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_dynamics_append() */ -extern void test__f_utf_string_dynamics_append__parameter_checking(void **state); +extern void test__f_utf_string_dynamics_append__works(void **state); #endif // _TEST__F_utf_dynamics_append_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamics_append_all.c b/level_0/f_utf/tests/unit/c/test-utf-dynamics_append_all.c index d067777..9a454c0 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamics_append_all.c +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamics_append_all.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_utf_string_dynamics_append_all__parameter_checking(void **state) { + + const f_utf_string_dynamics_t data = f_utf_string_dynamics_t_initialize; + + { + const f_status_t status = f_utf_string_dynamics_append_all(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_string_dynamics_append_all__works(void **state) { const int length_inner = 2; @@ -90,17 +101,6 @@ void test__f_utf_string_dynamics_append_all__returns_data_not(void **state) { free((void *) source.array); } -void test__f_utf_string_dynamics_append_all__parameter_checking(void **state) { - - const f_utf_string_dynamics_t data = f_utf_string_dynamics_t_initialize; - - { - const f_status_t status = f_utf_string_dynamics_append_all(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamics_append_all.h b/level_0/f_utf/tests/unit/c/test-utf-dynamics_append_all.h index 6e7e29f..3b88798 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamics_append_all.h +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamics_append_all.h @@ -11,24 +11,24 @@ #define _TEST__F_utf_dynamics_append_all_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_dynamics_append_all() */ -extern void test__f_utf_string_dynamics_append_all__works(void **state); +extern void test__f_utf_string_dynamics_append_all__parameter_checking(void **state); /** - * Test that the function returns F_data_not when asked to copy an empty structure. + * Test that the function works. * * @see f_utf_string_dynamics_append_all() */ -extern void test__f_utf_string_dynamics_append_all__returns_data_not(void **state); +extern void test__f_utf_string_dynamics_append_all__works(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function returns F_data_not when asked to copy an empty structure. * * @see f_utf_string_dynamics_append_all() */ -extern void test__f_utf_string_dynamics_append_all__parameter_checking(void **state); +extern void test__f_utf_string_dynamics_append_all__returns_data_not(void **state); #endif // _TEST__F_utf_dynamics_append_all_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamicss_append.c b/level_0/f_utf/tests/unit/c/test-utf-dynamicss_append.c index 9cfe570..a418897 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamicss_append.c +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamicss_append.c @@ -5,6 +5,43 @@ extern "C" { #endif +void test__f_utf_string_dynamicss_append__parameter_checking(void **state) { + + f_utf_string_dynamics_t data = f_utf_string_dynamics_t_initialize; + + { + const f_status_t status = f_utf_string_dynamicss_append(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + +void test__f_utf_string_dynamicss_append__returns_data_not(void **state) { + + const int length = 5; + f_utf_string_dynamics_t source = f_utf_string_dynamicss_t_initialize; + f_utf_string_dynamicss_t destination = f_utf_string_dynamicss_t_initialize; + + { + const f_status_t status = f_memory_array_increase_by(length, sizeof(f_utf_string_dynamic_t), (void **) &source.array, &source.used, &source.size); + + assert_int_equal(status, F_okay); + assert_int_equal(source.used, 0); + assert_int_equal(source.size, length); + } + + { + const f_status_t status = f_utf_string_dynamicss_append(source, &destination); + + assert_int_equal(status, F_data_not); + assert_int_equal(destination.used, 0); + assert_int_equal(destination.size, 0); + assert_null(destination.array); + } + + free((void *) source.array); +} + void test__f_utf_string_dynamicss_append__works(void **state) { const int length_inner = 2; @@ -65,43 +102,6 @@ void test__f_utf_string_dynamicss_append__works(void **state) { free((void *) destination.array); } -void test__f_utf_string_dynamicss_append__returns_data_not(void **state) { - - const int length = 5; - f_utf_string_dynamics_t source = f_utf_string_dynamicss_t_initialize; - f_utf_string_dynamicss_t destination = f_utf_string_dynamicss_t_initialize; - - { - const f_status_t status = f_memory_array_increase_by(length, sizeof(f_utf_string_dynamic_t), (void **) &source.array, &source.used, &source.size); - - assert_int_equal(status, F_okay); - assert_int_equal(source.used, 0); - assert_int_equal(source.size, length); - } - - { - const f_status_t status = f_utf_string_dynamicss_append(source, &destination); - - assert_int_equal(status, F_data_not); - assert_int_equal(destination.used, 0); - assert_int_equal(destination.size, 0); - assert_null(destination.array); - } - - free((void *) source.array); -} - -void test__f_utf_string_dynamicss_append__parameter_checking(void **state) { - - f_utf_string_dynamics_t data = f_utf_string_dynamics_t_initialize; - - { - const f_status_t status = f_utf_string_dynamicss_append(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamicss_append.h b/level_0/f_utf/tests/unit/c/test-utf-dynamicss_append.h index 2c8e28c..97ea5d2 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamicss_append.h +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamicss_append.h @@ -11,11 +11,11 @@ #define _TEST__F_utf_dynamicss_append_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_dynamicss_append() */ -extern void test__f_utf_string_dynamicss_append__works(void **state); +extern void test__f_utf_string_dynamicss_append__parameter_checking(void **state); /** * Test that the function returns F_data_not when asked to copy an empty structure. @@ -25,10 +25,10 @@ extern void test__f_utf_string_dynamicss_append__works(void **state); extern void test__f_utf_string_dynamicss_append__returns_data_not(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_dynamicss_append() */ -extern void test__f_utf_string_dynamicss_append__parameter_checking(void **state); +extern void test__f_utf_string_dynamicss_append__works(void **state); #endif // _TEST__F_utf_dynamicss_append_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamicss_append_all.c b/level_0/f_utf/tests/unit/c/test-utf-dynamicss_append_all.c index 1e06942..c3bce2d 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamicss_append_all.c +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamicss_append_all.c @@ -5,6 +5,43 @@ extern "C" { #endif +void test__f_utf_string_dynamicss_append_all__parameter_checking(void **state) { + + const f_utf_string_dynamicss_t data = f_utf_string_dynamicss_t_initialize; + + { + const f_status_t status = f_utf_string_dynamicss_append_all(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + +void test__f_utf_string_dynamicss_append_all__returns_data_not(void **state) { + + const int length = 5; + f_utf_string_dynamicss_t source = f_utf_string_dynamicss_t_initialize; + f_utf_string_dynamicss_t destination = f_utf_string_dynamicss_t_initialize; + + { + const f_status_t status = f_memory_array_increase_by(length, sizeof(f_utf_string_dynamics_t), (void **) &source.array, &source.used, &source.size); + + assert_int_equal(status, F_okay); + assert_int_equal(source.used, 0); + assert_int_equal(source.size, length); + } + + { + const f_status_t status = f_utf_string_dynamicss_append_all(source, &destination); + + assert_int_equal(status, F_data_not); + assert_int_equal(destination.used, 0); + assert_int_equal(destination.size, 0); + assert_null(destination.array); + } + + free((void *) source.array); +} + void test__f_utf_string_dynamicss_append_all__works(void **state) { const int length_inner = 2; @@ -91,43 +128,6 @@ void test__f_utf_string_dynamicss_append_all__works(void **state) { free((void *) destination.array); } -void test__f_utf_string_dynamicss_append_all__returns_data_not(void **state) { - - const int length = 5; - f_utf_string_dynamicss_t source = f_utf_string_dynamicss_t_initialize; - f_utf_string_dynamicss_t destination = f_utf_string_dynamicss_t_initialize; - - { - const f_status_t status = f_memory_array_increase_by(length, sizeof(f_utf_string_dynamics_t), (void **) &source.array, &source.used, &source.size); - - assert_int_equal(status, F_okay); - assert_int_equal(source.used, 0); - assert_int_equal(source.size, length); - } - - { - const f_status_t status = f_utf_string_dynamicss_append_all(source, &destination); - - assert_int_equal(status, F_data_not); - assert_int_equal(destination.used, 0); - assert_int_equal(destination.size, 0); - assert_null(destination.array); - } - - free((void *) source.array); -} - -void test__f_utf_string_dynamicss_append_all__parameter_checking(void **state) { - - const f_utf_string_dynamicss_t data = f_utf_string_dynamicss_t_initialize; - - { - const f_status_t status = f_utf_string_dynamicss_append_all(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-dynamicss_append_all.h b/level_0/f_utf/tests/unit/c/test-utf-dynamicss_append_all.h index 6242f3e..438d58e 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-dynamicss_append_all.h +++ b/level_0/f_utf/tests/unit/c/test-utf-dynamicss_append_all.h @@ -11,11 +11,11 @@ #define _TEST__F_utf_dynamicss_append_all_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_dynamicss_append_all() */ -extern void test__f_utf_string_dynamicss_append_all__works(void **state); +extern void test__f_utf_string_dynamicss_append_all__parameter_checking(void **state); /** * Test that the function returns F_data_not when asked to copy an empty structure. @@ -25,10 +25,10 @@ extern void test__f_utf_string_dynamicss_append_all__works(void **state); extern void test__f_utf_string_dynamicss_append_all__returns_data_not(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_dynamicss_append_all() */ -extern void test__f_utf_string_dynamicss_append_all__parameter_checking(void **state); +extern void test__f_utf_string_dynamicss_append_all__works(void **state); #endif // _TEST__F_utf_dynamicss_append_all_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-map_multis_append.c b/level_0/f_utf/tests/unit/c/test-utf-map_multis_append.c index 21f5fba..008bae1 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-map_multis_append.c +++ b/level_0/f_utf/tests/unit/c/test-utf-map_multis_append.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_utf_string_map_multis_append__parameter_checking(void **state) { + + const f_utf_string_map_multi_t data = f_utf_string_map_multi_t_initialize; + + { + const f_status_t status = f_utf_string_map_multis_append(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_string_map_multis_append__works(void **state) { const int length_values = 2; @@ -85,17 +96,6 @@ void test__f_utf_string_map_multis_append__works(void **state) { free((void *) destination.array); } -void test__f_utf_string_map_multis_append__parameter_checking(void **state) { - - const f_utf_string_map_multi_t data = f_utf_string_map_multi_t_initialize; - - { - const f_status_t status = f_utf_string_map_multis_append(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-map_multis_append.h b/level_0/f_utf/tests/unit/c/test-utf-map_multis_append.h index 9099a23..c931d7b 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-map_multis_append.h +++ b/level_0/f_utf/tests/unit/c/test-utf-map_multis_append.h @@ -11,17 +11,17 @@ #define _TEST__F_utf_map_multis_append_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_map_multis_append() */ -extern void test__f_utf_string_map_multis_append__works(void **state); +extern void test__f_utf_string_map_multis_append__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_map_multis_append() */ -extern void test__f_utf_string_map_multis_append__parameter_checking(void **state); +extern void test__f_utf_string_map_multis_append__works(void **state); #endif // _TEST__F_utf_map_multis_append_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-map_multis_append_all.c b/level_0/f_utf/tests/unit/c/test-utf-map_multis_append_all.c index 5614a72..c0d850b 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-map_multis_append_all.c +++ b/level_0/f_utf/tests/unit/c/test-utf-map_multis_append_all.c @@ -5,6 +5,43 @@ extern "C" { #endif +void test__f_utf_string_map_multis_append_all__parameter_checking(void **state) { + + const f_utf_string_map_multis_t data = f_utf_string_map_multis_t_initialize; + + { + const f_status_t status = f_utf_string_map_multis_append_all(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + +void test__f_utf_string_map_multis_append_all__returns_data_not(void **state) { + + const int length = 5; + f_utf_string_map_multis_t source = f_utf_string_map_multis_t_initialize; + f_utf_string_map_multis_t destination = f_utf_string_map_multis_t_initialize; + + { + const f_status_t status = f_memory_array_increase_by(length, sizeof(f_utf_string_map_multis_t), (void **) &source.array, &source.used, &source.size); + + assert_int_equal(status, F_okay); + assert_int_equal(source.used, 0); + assert_int_equal(source.size, length); + } + + { + const f_status_t status = f_utf_string_map_multis_append_all(source, &destination); + + assert_int_equal(status, F_data_not); + assert_int_equal(destination.used, 0); + assert_int_equal(destination.size, 0); + assert_null(destination.array); + } + + free((void *) source.array); +} + void test__f_utf_string_map_multis_append_all__works(void **state) { const int length_values = 2; @@ -84,43 +121,6 @@ void test__f_utf_string_map_multis_append_all__works(void **state) { free((void *) destination.array); } -void test__f_utf_string_map_multis_append_all__returns_data_not(void **state) { - - const int length = 5; - f_utf_string_map_multis_t source = f_utf_string_map_multis_t_initialize; - f_utf_string_map_multis_t destination = f_utf_string_map_multis_t_initialize; - - { - const f_status_t status = f_memory_array_increase_by(length, sizeof(f_utf_string_map_multis_t), (void **) &source.array, &source.used, &source.size); - - assert_int_equal(status, F_okay); - assert_int_equal(source.used, 0); - assert_int_equal(source.size, length); - } - - { - const f_status_t status = f_utf_string_map_multis_append_all(source, &destination); - - assert_int_equal(status, F_data_not); - assert_int_equal(destination.used, 0); - assert_int_equal(destination.size, 0); - assert_null(destination.array); - } - - free((void *) source.array); -} - -void test__f_utf_string_map_multis_append_all__parameter_checking(void **state) { - - const f_utf_string_map_multis_t data = f_utf_string_map_multis_t_initialize; - - { - const f_status_t status = f_utf_string_map_multis_append_all(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-map_multis_append_all.h b/level_0/f_utf/tests/unit/c/test-utf-map_multis_append_all.h index bdfadee..1fed1ff 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-map_multis_append_all.h +++ b/level_0/f_utf/tests/unit/c/test-utf-map_multis_append_all.h @@ -11,11 +11,11 @@ #define _TEST__F_utf_map_multis_append_all_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_map_multis_append_all() */ -extern void test__f_utf_string_map_multis_append_all__works(void **state); +extern void test__f_utf_string_map_multis_append_all__parameter_checking(void **state); /** * Test that the function returns F_data_not when asked to copy an empty structure. @@ -25,10 +25,10 @@ extern void test__f_utf_string_map_multis_append_all__works(void **state); extern void test__f_utf_string_map_multis_append_all__returns_data_not(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_map_multis_append_all() */ -extern void test__f_utf_string_map_multis_append_all__parameter_checking(void **state); +extern void test__f_utf_string_map_multis_append_all__works(void **state); #endif // _TEST__F_utf_map_multis_append_all_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-map_multiss_append.c b/level_0/f_utf/tests/unit/c/test-utf-map_multiss_append.c index f4b4dd0..87561a3 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-map_multiss_append.c +++ b/level_0/f_utf/tests/unit/c/test-utf-map_multiss_append.c @@ -5,6 +5,43 @@ extern "C" { #endif +void test__f_utf_string_map_multiss_append__parameter_checking(void **state) { + + f_utf_string_map_multis_t data = f_utf_string_map_multis_t_initialize; + + { + const f_status_t status = f_utf_string_map_multiss_append(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + +void test__f_utf_string_map_multiss_append__returns_data_not(void **state) { + + const int length = 5; + f_utf_string_map_multis_t source = f_utf_string_map_multiss_t_initialize; + f_utf_string_map_multiss_t destination = f_utf_string_map_multiss_t_initialize; + + { + const f_status_t status = f_memory_array_increase_by(length, sizeof(f_utf_string_map_multis_t), (void **) &source.array, &source.used, &source.size); + + assert_int_equal(status, F_okay); + assert_int_equal(source.used, 0); + assert_int_equal(source.size, length); + } + + { + const f_status_t status = f_utf_string_map_multiss_append(source, &destination); + + assert_int_equal(status, F_data_not); + assert_int_equal(destination.used, 0); + assert_int_equal(destination.size, 0); + assert_null(destination.array); + } + + free((void *) source.array); +} + void test__f_utf_string_map_multiss_append__works(void **state) { const int length_values = 2; @@ -99,43 +136,6 @@ void test__f_utf_string_map_multiss_append__works(void **state) { free((void *) destination.array); } -void test__f_utf_string_map_multiss_append__returns_data_not(void **state) { - - const int length = 5; - f_utf_string_map_multis_t source = f_utf_string_map_multiss_t_initialize; - f_utf_string_map_multiss_t destination = f_utf_string_map_multiss_t_initialize; - - { - const f_status_t status = f_memory_array_increase_by(length, sizeof(f_utf_string_map_multis_t), (void **) &source.array, &source.used, &source.size); - - assert_int_equal(status, F_okay); - assert_int_equal(source.used, 0); - assert_int_equal(source.size, length); - } - - { - const f_status_t status = f_utf_string_map_multiss_append(source, &destination); - - assert_int_equal(status, F_data_not); - assert_int_equal(destination.used, 0); - assert_int_equal(destination.size, 0); - assert_null(destination.array); - } - - free((void *) source.array); -} - -void test__f_utf_string_map_multiss_append__parameter_checking(void **state) { - - f_utf_string_map_multis_t data = f_utf_string_map_multis_t_initialize; - - { - const f_status_t status = f_utf_string_map_multiss_append(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-map_multiss_append.h b/level_0/f_utf/tests/unit/c/test-utf-map_multiss_append.h index 2885f9d..57c38b8 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-map_multiss_append.h +++ b/level_0/f_utf/tests/unit/c/test-utf-map_multiss_append.h @@ -11,11 +11,11 @@ #define _TEST__F_utf_map_multiss_append_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_map_multiss_append() */ -extern void test__f_utf_string_map_multiss_append__works(void **state); +extern void test__f_utf_string_map_multiss_append__parameter_checking(void **state); /** * Test that the function returns F_data_not when asked to copy an empty structure. @@ -25,10 +25,10 @@ extern void test__f_utf_string_map_multiss_append__works(void **state); extern void test__f_utf_string_map_multiss_append__returns_data_not(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_map_multiss_append() */ -extern void test__f_utf_string_map_multiss_append__parameter_checking(void **state); +extern void test__f_utf_string_map_multiss_append__works(void **state); #endif // _TEST__F_utf_map_multiss_append_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-map_multiss_append_all.c b/level_0/f_utf/tests/unit/c/test-utf-map_multiss_append_all.c index 144597f..bcb2193 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-map_multiss_append_all.c +++ b/level_0/f_utf/tests/unit/c/test-utf-map_multiss_append_all.c @@ -5,6 +5,43 @@ extern "C" { #endif +void test__f_utf_string_map_multiss_append_all__parameter_checking(void **state) { + + const f_utf_string_map_multiss_t data = f_utf_string_map_multiss_t_initialize; + + { + const f_status_t status = f_utf_string_map_multiss_append_all(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + +void test__f_utf_string_map_multiss_append_all__returns_data_not(void **state) { + + const int length = 5; + f_utf_string_map_multiss_t source = f_utf_string_map_multiss_t_initialize; + f_utf_string_map_multiss_t destination = f_utf_string_map_multiss_t_initialize; + + { + const f_status_t status = f_memory_array_increase_by(length, sizeof(f_utf_string_map_multis_t), (void **) &source.array, &source.used, &source.size); + + assert_int_equal(status, F_okay); + assert_int_equal(source.used, 0); + assert_int_equal(source.size, length); + } + + { + const f_status_t status = f_utf_string_map_multiss_append_all(source, &destination); + + assert_int_equal(status, F_data_not); + assert_int_equal(destination.used, 0); + assert_int_equal(destination.size, 0); + assert_null(destination.array); + } + + free((void *) source.array); +} + void test__f_utf_string_map_multiss_append_all__works(void **state) { const int length_values = 2; @@ -125,43 +162,6 @@ void test__f_utf_string_map_multiss_append_all__works(void **state) { free((void *) destination.array); } -void test__f_utf_string_map_multiss_append_all__returns_data_not(void **state) { - - const int length = 5; - f_utf_string_map_multiss_t source = f_utf_string_map_multiss_t_initialize; - f_utf_string_map_multiss_t destination = f_utf_string_map_multiss_t_initialize; - - { - const f_status_t status = f_memory_array_increase_by(length, sizeof(f_utf_string_map_multis_t), (void **) &source.array, &source.used, &source.size); - - assert_int_equal(status, F_okay); - assert_int_equal(source.used, 0); - assert_int_equal(source.size, length); - } - - { - const f_status_t status = f_utf_string_map_multiss_append_all(source, &destination); - - assert_int_equal(status, F_data_not); - assert_int_equal(destination.used, 0); - assert_int_equal(destination.size, 0); - assert_null(destination.array); - } - - free((void *) source.array); -} - -void test__f_utf_string_map_multiss_append_all__parameter_checking(void **state) { - - const f_utf_string_map_multiss_t data = f_utf_string_map_multiss_t_initialize; - - { - const f_status_t status = f_utf_string_map_multiss_append_all(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-map_multiss_append_all.h b/level_0/f_utf/tests/unit/c/test-utf-map_multiss_append_all.h index 75fbd98..2ecd046 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-map_multiss_append_all.h +++ b/level_0/f_utf/tests/unit/c/test-utf-map_multiss_append_all.h @@ -11,11 +11,11 @@ #define _TEST__F_utf_map_multiss_append_all_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_map_multiss_append_all() */ -extern void test__f_utf_string_map_multiss_append_all__works(void **state); +extern void test__f_utf_string_map_multiss_append_all__parameter_checking(void **state); /** * Test that the function returns F_data_not when asked to copy an empty structure. @@ -25,10 +25,10 @@ extern void test__f_utf_string_map_multiss_append_all__works(void **state); extern void test__f_utf_string_map_multiss_append_all__returns_data_not(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_map_multiss_append_all() */ -extern void test__f_utf_string_map_multiss_append_all__parameter_checking(void **state); +extern void test__f_utf_string_map_multiss_append_all__works(void **state); #endif // _TEST__F_utf_map_multiss_append_all_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-maps_append.c b/level_0/f_utf/tests/unit/c/test-utf-maps_append.c index 6bf5e96..69f18b5 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-maps_append.c +++ b/level_0/f_utf/tests/unit/c/test-utf-maps_append.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_utf_string_maps_append__parameter_checking(void **state) { + + const f_utf_string_map_t data = f_utf_string_map_t_initialize; + + { + const f_status_t status = f_utf_string_maps_append(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_string_maps_append__works(void **state) { f_utf_string_map_t source = f_utf_string_map_t_initialize; @@ -47,17 +58,6 @@ void test__f_utf_string_maps_append__works(void **state) { free((void *) destination.array); } -void test__f_utf_string_maps_append__parameter_checking(void **state) { - - const f_utf_string_map_t data = f_utf_string_map_t_initialize; - - { - const f_status_t status = f_utf_string_maps_append(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-maps_append.h b/level_0/f_utf/tests/unit/c/test-utf-maps_append.h index f647075..20fc816 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-maps_append.h +++ b/level_0/f_utf/tests/unit/c/test-utf-maps_append.h @@ -11,17 +11,17 @@ #define _TEST__F_utf_maps_append_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_maps_append() */ -extern void test__f_utf_string_maps_append__works(void **state); +extern void test__f_utf_string_maps_append__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_maps_append() */ -extern void test__f_utf_string_maps_append__parameter_checking(void **state); +extern void test__f_utf_string_maps_append__works(void **state); #endif // _TEST__F_utf_maps_append_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-maps_append_all.c b/level_0/f_utf/tests/unit/c/test-utf-maps_append_all.c index 624893b..799b2ae 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-maps_append_all.c +++ b/level_0/f_utf/tests/unit/c/test-utf-maps_append_all.c @@ -5,6 +5,43 @@ extern "C" { #endif +void test__f_utf_string_maps_append_all__parameter_checking(void **state) { + + const f_utf_string_maps_t data = f_utf_string_maps_t_initialize; + + { + const f_status_t status = f_utf_string_maps_append_all(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + +void test__f_utf_string_maps_append_all__returns_data_not(void **state) { + + const int length = 5; + f_utf_string_maps_t source = f_utf_string_maps_t_initialize; + f_utf_string_maps_t destination = f_utf_string_maps_t_initialize; + + { + const f_status_t status = f_memory_array_increase_by(length, sizeof(f_utf_string_map_t), (void **) &source.array, &source.used, &source.size); + + assert_int_equal(status, F_okay); + assert_int_equal(source.used, 0); + assert_int_equal(source.size, length); + } + + { + const f_status_t status = f_utf_string_maps_append_all(source, &destination); + + assert_int_equal(status, F_data_not); + assert_int_equal(destination.used, 0); + assert_int_equal(destination.size, 0); + assert_null(destination.array); + } + + free((void *) source.array); +} + void test__f_utf_string_maps_append_all__works(void **state) { const int length_inner = 2; @@ -69,43 +106,6 @@ void test__f_utf_string_maps_append_all__works(void **state) { free((void *) destination.array); } -void test__f_utf_string_maps_append_all__returns_data_not(void **state) { - - const int length = 5; - f_utf_string_maps_t source = f_utf_string_maps_t_initialize; - f_utf_string_maps_t destination = f_utf_string_maps_t_initialize; - - { - const f_status_t status = f_memory_array_increase_by(length, sizeof(f_utf_string_map_t), (void **) &source.array, &source.used, &source.size); - - assert_int_equal(status, F_okay); - assert_int_equal(source.used, 0); - assert_int_equal(source.size, length); - } - - { - const f_status_t status = f_utf_string_maps_append_all(source, &destination); - - assert_int_equal(status, F_data_not); - assert_int_equal(destination.used, 0); - assert_int_equal(destination.size, 0); - assert_null(destination.array); - } - - free((void *) source.array); -} - -void test__f_utf_string_maps_append_all__parameter_checking(void **state) { - - const f_utf_string_maps_t data = f_utf_string_maps_t_initialize; - - { - const f_status_t status = f_utf_string_maps_append_all(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-maps_append_all.h b/level_0/f_utf/tests/unit/c/test-utf-maps_append_all.h index c373085..fe17dec 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-maps_append_all.h +++ b/level_0/f_utf/tests/unit/c/test-utf-maps_append_all.h @@ -11,11 +11,11 @@ #define _TEST__F_utf_maps_append_all_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_maps_append_all() */ -extern void test__f_utf_string_maps_append_all__works(void **state); +extern void test__f_utf_string_maps_append_all__parameter_checking(void **state); /** * Test that the function returns F_data_not when asked to copy an empty structure. @@ -25,10 +25,10 @@ extern void test__f_utf_string_maps_append_all__works(void **state); extern void test__f_utf_string_maps_append_all__returns_data_not(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_maps_append_all() */ -extern void test__f_utf_string_maps_append_all__parameter_checking(void **state); +extern void test__f_utf_string_maps_append_all__works(void **state); #endif // _TEST__F_utf_maps_append_all_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-mapss_append.c b/level_0/f_utf/tests/unit/c/test-utf-mapss_append.c index be6aa47..1c50874 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-mapss_append.c +++ b/level_0/f_utf/tests/unit/c/test-utf-mapss_append.c @@ -5,6 +5,43 @@ extern "C" { #endif +void test__f_utf_string_mapss_append__parameter_checking(void **state) { + + f_utf_string_maps_t data = f_utf_string_maps_t_initialize; + + { + const f_status_t status = f_utf_string_mapss_append(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + +void test__f_utf_string_mapss_append__returns_data_not(void **state) { + + const int length = 5; + f_utf_string_maps_t source = f_utf_string_mapss_t_initialize; + f_utf_string_mapss_t destination = f_utf_string_mapss_t_initialize; + + { + const f_status_t status = f_memory_array_increase_by(length, sizeof(f_utf_string_maps_t), (void **) &source.array, &source.used, &source.size); + + assert_int_equal(status, F_okay); + assert_int_equal(source.used, 0); + assert_int_equal(source.size, length); + } + + { + const f_status_t status = f_utf_string_mapss_append(source, &destination); + + assert_int_equal(status, F_data_not); + assert_int_equal(destination.used, 0); + assert_int_equal(destination.size, 0); + assert_null(destination.array); + } + + free((void *) source.array); +} + void test__f_utf_string_mapss_append__works(void **state) { const int length_inner = 2; @@ -78,43 +115,6 @@ void test__f_utf_string_mapss_append__works(void **state) { free((void *) destination.array); } -void test__f_utf_string_mapss_append__returns_data_not(void **state) { - - const int length = 5; - f_utf_string_maps_t source = f_utf_string_mapss_t_initialize; - f_utf_string_mapss_t destination = f_utf_string_mapss_t_initialize; - - { - const f_status_t status = f_memory_array_increase_by(length, sizeof(f_utf_string_maps_t), (void **) &source.array, &source.used, &source.size); - - assert_int_equal(status, F_okay); - assert_int_equal(source.used, 0); - assert_int_equal(source.size, length); - } - - { - const f_status_t status = f_utf_string_mapss_append(source, &destination); - - assert_int_equal(status, F_data_not); - assert_int_equal(destination.used, 0); - assert_int_equal(destination.size, 0); - assert_null(destination.array); - } - - free((void *) source.array); -} - -void test__f_utf_string_mapss_append__parameter_checking(void **state) { - - f_utf_string_maps_t data = f_utf_string_maps_t_initialize; - - { - const f_status_t status = f_utf_string_mapss_append(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-mapss_append.h b/level_0/f_utf/tests/unit/c/test-utf-mapss_append.h index d95640d..c971a2d 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-mapss_append.h +++ b/level_0/f_utf/tests/unit/c/test-utf-mapss_append.h @@ -11,11 +11,11 @@ #define _TEST__F_utf_mapss_append_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_mapss_append() */ -extern void test__f_utf_string_mapss_append__works(void **state); +extern void test__f_utf_string_mapss_append__parameter_checking(void **state); /** * Test that the function returns F_data_not when asked to copy an empty structure. @@ -25,10 +25,10 @@ extern void test__f_utf_string_mapss_append__works(void **state); extern void test__f_utf_string_mapss_append__returns_data_not(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_mapss_append() */ -extern void test__f_utf_string_mapss_append__parameter_checking(void **state); +extern void test__f_utf_string_mapss_append__works(void **state); #endif // _TEST__F_utf_mapss_append_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-mapss_append_all.c b/level_0/f_utf/tests/unit/c/test-utf-mapss_append_all.c index 4509cba..e9011fd 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-mapss_append_all.c +++ b/level_0/f_utf/tests/unit/c/test-utf-mapss_append_all.c @@ -5,6 +5,43 @@ extern "C" { #endif +void test__f_utf_string_mapss_append_all__parameter_checking(void **state) { + + const f_utf_string_mapss_t data = f_utf_string_mapss_t_initialize; + + { + const f_status_t status = f_utf_string_mapss_append_all(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + +void test__f_utf_string_mapss_append_all__returns_data_not(void **state) { + + const int length = 5; + f_utf_string_mapss_t source = f_utf_string_mapss_t_initialize; + f_utf_string_mapss_t destination = f_utf_string_mapss_t_initialize; + + { + const f_status_t status = f_memory_array_increase_by(length, sizeof(f_utf_string_maps_t), (void **) &source.array, &source.used, &source.size); + + assert_int_equal(status, F_okay); + assert_int_equal(source.used, 0); + assert_int_equal(source.size, length); + } + + { + const f_status_t status = f_utf_string_mapss_append_all(source, &destination); + + assert_int_equal(status, F_data_not); + assert_int_equal(destination.used, 0); + assert_int_equal(destination.size, 0); + assert_null(destination.array); + } + + free((void *) source.array); +} + void test__f_utf_string_mapss_append_all__works(void **state) { const int length_inner = 2; @@ -103,43 +140,6 @@ void test__f_utf_string_mapss_append_all__works(void **state) { free((void *) destination.array); } -void test__f_utf_string_mapss_append_all__returns_data_not(void **state) { - - const int length = 5; - f_utf_string_mapss_t source = f_utf_string_mapss_t_initialize; - f_utf_string_mapss_t destination = f_utf_string_mapss_t_initialize; - - { - const f_status_t status = f_memory_array_increase_by(length, sizeof(f_utf_string_maps_t), (void **) &source.array, &source.used, &source.size); - - assert_int_equal(status, F_okay); - assert_int_equal(source.used, 0); - assert_int_equal(source.size, length); - } - - { - const f_status_t status = f_utf_string_mapss_append_all(source, &destination); - - assert_int_equal(status, F_data_not); - assert_int_equal(destination.used, 0); - assert_int_equal(destination.size, 0); - assert_null(destination.array); - } - - free((void *) source.array); -} - -void test__f_utf_string_mapss_append_all__parameter_checking(void **state) { - - const f_utf_string_mapss_t data = f_utf_string_mapss_t_initialize; - - { - const f_status_t status = f_utf_string_mapss_append_all(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-mapss_append_all.h b/level_0/f_utf/tests/unit/c/test-utf-mapss_append_all.h index 8d14688..03c5146 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-mapss_append_all.h +++ b/level_0/f_utf/tests/unit/c/test-utf-mapss_append_all.h @@ -11,11 +11,11 @@ #define _TEST__F_utf_mapss_append_all_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_mapss_append_all() */ -extern void test__f_utf_string_mapss_append_all__works(void **state); +extern void test__f_utf_string_mapss_append_all__parameter_checking(void **state); /** * Test that the function returns F_data_not when asked to copy an empty structure. @@ -25,10 +25,10 @@ extern void test__f_utf_string_mapss_append_all__works(void **state); extern void test__f_utf_string_mapss_append_all__returns_data_not(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_mapss_append_all() */ -extern void test__f_utf_string_mapss_append_all__parameter_checking(void **state); +extern void test__f_utf_string_mapss_append_all__works(void **state); #endif // _TEST__F_utf_mapss_append_all_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-mash.c b/level_0/f_utf/tests/unit/c/test-utf-mash.c index 893422e..51ed5b5 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-mash.c +++ b/level_0/f_utf/tests/unit/c/test-utf-mash.c @@ -5,6 +5,18 @@ extern "C" { #endif +void test__f_utf_mash__parameter_checking(void **state) { + + const f_utf_string_static_t glue = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0:", 0, 1); + const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t", 0, 5); + + { + const f_status_t status = f_utf_string_mash(glue.string, glue.used, source.string, source.used, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_mash__works(void **state) { const f_utf_string_static_t glue = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0:", 0, 1); @@ -38,18 +50,6 @@ void test__f_utf_mash__works(void **state) { free((void *) destination.string); } -void test__f_utf_mash__parameter_checking(void **state) { - - const f_utf_string_static_t glue = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0:", 0, 1); - const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t", 0, 5); - - { - const f_status_t status = f_utf_string_mash(glue.string, glue.used, source.string, source.used, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-mash.h b/level_0/f_utf/tests/unit/c/test-utf-mash.h index a0765d0..9bef06f 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-mash.h +++ b/level_0/f_utf/tests/unit/c/test-utf-mash.h @@ -11,17 +11,17 @@ #define _TEST__F_utf_mash_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_mash() */ -extern void test__f_utf_mash__works(void **state); +extern void test__f_utf_mash__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_mash() */ -extern void test__f_utf_mash__parameter_checking(void **state); +extern void test__f_utf_mash__works(void **state); #endif // _TEST__F_utf_mash_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-mash_nulless.c b/level_0/f_utf/tests/unit/c/test-utf-mash_nulless.c index f00c74c..dcfc6d1 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-mash_nulless.c +++ b/level_0/f_utf/tests/unit/c/test-utf-mash_nulless.c @@ -5,6 +5,18 @@ extern "C" { #endif +void test__f_utf_mash_nulless__parameter_checking(void **state) { + + const f_utf_string_static_t glue = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0:", 0, 1); + const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t", 0, 5); + + { + const f_status_t status = f_utf_string_mash_nulless(glue.string, glue.used, source.string, source.used, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_mash_nulless__works(void **state) { const f_utf_string_static_t glue = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0:", 0, 1); @@ -39,18 +51,6 @@ void test__f_utf_mash_nulless__works(void **state) { free((void *) destination.string); } -void test__f_utf_mash_nulless__parameter_checking(void **state) { - - const f_utf_string_static_t glue = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0:", 0, 1); - const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t", 0, 5); - - { - const f_status_t status = f_utf_string_mash_nulless(glue.string, glue.used, source.string, source.used, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-mash_nulless.h b/level_0/f_utf/tests/unit/c/test-utf-mash_nulless.h index ec22051..f751983 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-mash_nulless.h +++ b/level_0/f_utf/tests/unit/c/test-utf-mash_nulless.h @@ -11,17 +11,17 @@ #define _TEST__F_utf_mash_nulless_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_mash_nulless() */ -extern void test__f_utf_mash_nulless__works(void **state); +extern void test__f_utf_mash_nulless__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_mash_nulless() */ -extern void test__f_utf_mash_nulless__parameter_checking(void **state); +extern void test__f_utf_mash_nulless__works(void **state); #endif // _TEST__F_utf_mash_nulless_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-mish.c b/level_0/f_utf/tests/unit/c/test-utf-mish.c index ac68a5b..304582f 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-mish.c +++ b/level_0/f_utf/tests/unit/c/test-utf-mish.c @@ -5,6 +5,18 @@ extern "C" { #endif +void test__f_utf_mish__parameter_checking(void **state) { + + const f_utf_string_static_t glue = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0:", 0, 1); + const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t", 0, 5); + + { + const f_status_t status = f_utf_string_mish(glue.string, glue.used, source.string, source.used, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_mish__works(void **state) { const f_utf_string_static_t glue = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0:", 0, 1); @@ -38,18 +50,6 @@ void test__f_utf_mish__works(void **state) { free((void *) destination.string); } -void test__f_utf_mish__parameter_checking(void **state) { - - const f_utf_string_static_t glue = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0:", 0, 1); - const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t", 0, 5); - - { - const f_status_t status = f_utf_string_mish(glue.string, glue.used, source.string, source.used, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-mish.h b/level_0/f_utf/tests/unit/c/test-utf-mish.h index 4df2112..6e44779 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-mish.h +++ b/level_0/f_utf/tests/unit/c/test-utf-mish.h @@ -11,17 +11,17 @@ #define _TEST__F_utf_mish_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_mish() */ -extern void test__f_utf_mish__works(void **state); +extern void test__f_utf_mish__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_mish() */ -extern void test__f_utf_mish__parameter_checking(void **state); +extern void test__f_utf_mish__works(void **state); #endif // _TEST__F_utf_mish_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-mish_nulless.c b/level_0/f_utf/tests/unit/c/test-utf-mish_nulless.c index 1c9bc46..a519737 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-mish_nulless.c +++ b/level_0/f_utf/tests/unit/c/test-utf-mish_nulless.c @@ -5,6 +5,18 @@ extern "C" { #endif +void test__f_utf_mish_nulless__parameter_checking(void **state) { + + const f_utf_string_static_t glue = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0:", 0, 1); + const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t", 0, 5); + + { + const f_status_t status = f_utf_string_mish_nulless(glue.string, glue.used, source.string, source.used, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_mish_nulless__works(void **state) { const f_utf_string_static_t glue = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0:", 0, 1); @@ -39,18 +51,6 @@ void test__f_utf_mish_nulless__works(void **state) { free((void *) destination.string); } -void test__f_utf_mish_nulless__parameter_checking(void **state) { - - const f_utf_string_static_t glue = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0:", 0, 1); - const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t", 0, 5); - - { - const f_status_t status = f_utf_string_mish_nulless(glue.string, glue.used, source.string, source.used, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-mish_nulless.h b/level_0/f_utf/tests/unit/c/test-utf-mish_nulless.h index 7c8e8a5..c2680d5 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-mish_nulless.h +++ b/level_0/f_utf/tests/unit/c/test-utf-mish_nulless.h @@ -11,17 +11,17 @@ #define _TEST__F_utf_mish_nulless_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_mish_nulless() */ -extern void test__f_utf_mish_nulless__works(void **state); +extern void test__f_utf_mish_nulless__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_mish_nulless() */ -extern void test__f_utf_mish_nulless__parameter_checking(void **state); +extern void test__f_utf_mish_nulless__works(void **state); #endif // _TEST__F_utf_mish_nulless_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-prepend.c b/level_0/f_utf/tests/unit/c/test-utf-prepend.c index 91b1998..cd5cfec 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-prepend.c +++ b/level_0/f_utf/tests/unit/c/test-utf-prepend.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_utf_prepend__parameter_checking(void **state) { + + const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; + + { + const f_status_t status = f_utf_string_prepend(data.string, data.used, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_prepend__works(void **state) { const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t", 0, 5); @@ -24,17 +35,6 @@ void test__f_utf_prepend__works(void **state) { free((void *) destination.string); } -void test__f_utf_prepend__parameter_checking(void **state) { - - const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; - - { - const f_status_t status = f_utf_string_prepend(data.string, data.used, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-prepend.h b/level_0/f_utf/tests/unit/c/test-utf-prepend.h index b8d2042..0e2c399 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-prepend.h +++ b/level_0/f_utf/tests/unit/c/test-utf-prepend.h @@ -11,17 +11,17 @@ #define _TEST__F_utf_prepend_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_prepend() */ -extern void test__f_utf_prepend__works(void **state); +extern void test__f_utf_prepend__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_prepend() */ -extern void test__f_utf_prepend__parameter_checking(void **state); +extern void test__f_utf_prepend__works(void **state); #endif // _TEST__F_utf_prepend_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-prepend_assure.c b/level_0/f_utf/tests/unit/c/test-utf-prepend_assure.c index b75927c..3f08ba4 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-prepend_assure.c +++ b/level_0/f_utf/tests/unit/c/test-utf-prepend_assure.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_utf_prepend_assure__parameter_checking(void **state) { + + const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; + + { + const f_status_t status = f_utf_string_prepend_assure(data.string, data.used, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_prepend_assure__works(void **state) { const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t", 0, 5); @@ -36,17 +47,6 @@ void test__f_utf_prepend_assure__works(void **state) { free((void *) destination.string); } -void test__f_utf_prepend_assure__parameter_checking(void **state) { - - const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; - - { - const f_status_t status = f_utf_string_prepend_assure(data.string, data.used, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-prepend_assure.h b/level_0/f_utf/tests/unit/c/test-utf-prepend_assure.h index 12c2c6c..3dcc2c0 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-prepend_assure.h +++ b/level_0/f_utf/tests/unit/c/test-utf-prepend_assure.h @@ -11,17 +11,17 @@ #define _TEST__F_utf_prepend_assure_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_prepend_assure() */ -extern void test__f_utf_prepend_assure__works(void **state); +extern void test__f_utf_prepend_assure__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_prepend_assure() */ -extern void test__f_utf_prepend_assure__parameter_checking(void **state); +extern void test__f_utf_prepend_assure__works(void **state); #endif // _TEST__F_utf_prepend_assure_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-prepend_assure_nulless.c b/level_0/f_utf/tests/unit/c/test-utf-prepend_assure_nulless.c index ed07042..5bb17f4 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-prepend_assure_nulless.c +++ b/level_0/f_utf/tests/unit/c/test-utf-prepend_assure_nulless.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_utf_prepend_assure_nulless__parameter_checking(void **state) { + + const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; + + { + const f_status_t status = f_utf_string_prepend_assure_nulless(data.string, data.used, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_prepend_assure_nulless__works(void **state) { const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t", 0, 5); @@ -37,17 +48,6 @@ void test__f_utf_prepend_assure_nulless__works(void **state) { free((void *) destination.string); } -void test__f_utf_prepend_assure_nulless__parameter_checking(void **state) { - - const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; - - { - const f_status_t status = f_utf_string_prepend_assure_nulless(data.string, data.used, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-prepend_assure_nulless.h b/level_0/f_utf/tests/unit/c/test-utf-prepend_assure_nulless.h index cec79f4..7f73a56 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-prepend_assure_nulless.h +++ b/level_0/f_utf/tests/unit/c/test-utf-prepend_assure_nulless.h @@ -11,17 +11,17 @@ #define _TEST__F_utf_prepend_assure_nulless_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_prepend_assure_nulless() */ -extern void test__f_utf_prepend_assure_nulless__works(void **state); +extern void test__f_utf_prepend_assure_nulless__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_prepend_assure_nulless() */ -extern void test__f_utf_prepend_assure_nulless__parameter_checking(void **state); +extern void test__f_utf_prepend_assure_nulless__works(void **state); #endif // _TEST__F_utf_prepend_assure_nulless_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-prepend_nulless.c b/level_0/f_utf/tests/unit/c/test-utf-prepend_nulless.c index c35bb41..bdb8174 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-prepend_nulless.c +++ b/level_0/f_utf/tests/unit/c/test-utf-prepend_nulless.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_utf_prepend_nulless__parameter_checking(void **state) { + + const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; + + { + const f_status_t status = f_utf_string_prepend_nulless(data.string, data.used, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_prepend_nulless__works(void **state) { const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0\0\0\0\0s\0\0\0t", 0, 5); @@ -25,17 +36,6 @@ void test__f_utf_prepend_nulless__works(void **state) { free((void *) destination.string); } -void test__f_utf_prepend_nulless__parameter_checking(void **state) { - - const f_utf_string_dynamic_t data = f_utf_string_dynamic_t_initialize; - - { - const f_status_t status = f_utf_string_prepend_nulless(data.string, data.used, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-prepend_nulless.h b/level_0/f_utf/tests/unit/c/test-utf-prepend_nulless.h index 9349d32..c49bca4 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-prepend_nulless.h +++ b/level_0/f_utf/tests/unit/c/test-utf-prepend_nulless.h @@ -11,17 +11,17 @@ #define _TEST__F_utf_prepend_nulless_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_prepend_nulless() */ -extern void test__f_utf_prepend_nulless__works(void **state); +extern void test__f_utf_prepend_nulless__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_prepend_nulless() */ -extern void test__f_utf_prepend_nulless__parameter_checking(void **state); +extern void test__f_utf_prepend_nulless__works(void **state); #endif // _TEST__F_utf_prepend_nulless_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-seek_line.c b/level_0/f_utf/tests/unit/c/test-utf-seek_line.c index 75c667c..612e311 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-seek_line.c +++ b/level_0/f_utf/tests/unit/c/test-utf-seek_line.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_utf_seek_line__parameter_checking(void **state) { + + const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0X\0\0\0\n\0\0\0s\0\0\0t", 0, 6); + + { + const f_status_t status = f_utf_string_seek_line(source.string, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_seek_line__returns_data_not_stop(void **state) { const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0s\0\0\0t\0\0\0\n\0\0\0a\0\0\0f\0\0\0t\0\0\0e\0\0\0r", 0, 10); @@ -50,17 +61,6 @@ void test__f_utf_seek_line__works(void **state) { } } -void test__f_utf_seek_line__parameter_checking(void **state) { - - const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0X\0\0\0\n\0\0\0s\0\0\0t", 0, 6); - - { - const f_status_t status = f_utf_string_seek_line(source.string, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-seek_line.h b/level_0/f_utf/tests/unit/c/test-utf-seek_line.h index ae1cf4d..31465b8 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-seek_line.h +++ b/level_0/f_utf/tests/unit/c/test-utf-seek_line.h @@ -11,6 +11,13 @@ #define _TEST__F_utf_seek_line_h /** + * Test that the function correctly fails on invalid parameter. + * + * @see f_utf_string_seek_line() + */ +extern void test__f_utf_seek_line__parameter_checking(void **state); + +/** * Test that the function returns F_data_not_stop because range is an empty range (range.start > range.stop). * * @see f_utf_string_seek_line() @@ -31,11 +38,4 @@ extern void test__f_utf_seek_line__returns_none_stop(void **state); */ extern void test__f_utf_seek_line__works(void **state); -/** - * Test that the function correctly fails on invalid parameter. - * - * @see f_utf_string_seek_line() - */ -extern void test__f_utf_seek_line__parameter_checking(void **state); - #endif // _TEST__F_utf_seek_line_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-seek_line_to.c b/level_0/f_utf/tests/unit/c/test-utf-seek_line_to.c index 47c84c3..65f954c 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-seek_line_to.c +++ b/level_0/f_utf/tests/unit/c/test-utf-seek_line_to.c @@ -39,6 +39,18 @@ void test__f_utf_seek_line_to__before_newline(void **state) { } } +void test__f_utf_seek_line_to__parameter_checking(void **state) { + + const f_utf_string_static_t to = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0X", 0, 1); + const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0X\0\0\0\n\0\0\0s\0\0\0t", 0, 6); + + { + const f_status_t status = f_utf_string_seek_line_to(source.string, to.string[0], 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_seek_line_to__returns_data_not_stop(void **state) { const f_utf_string_static_t to = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0X", 0, 1); @@ -70,18 +82,6 @@ void test__f_utf_seek_line_to__returns_none_stop(void **state) { } } -void test__f_utf_seek_line_to__parameter_checking(void **state) { - - const f_utf_string_static_t to = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0X", 0, 1); - const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0X\0\0\0\n\0\0\0s\0\0\0t", 0, 6); - - { - const f_status_t status = f_utf_string_seek_line_to(source.string, to.string[0], 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-seek_line_to.h b/level_0/f_utf/tests/unit/c/test-utf-seek_line_to.h index 8dc8d10..58b085d 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-seek_line_to.h +++ b/level_0/f_utf/tests/unit/c/test-utf-seek_line_to.h @@ -25,24 +25,24 @@ extern void test__f_utf_seek_line_to__after_newline(void **state); extern void test__f_utf_seek_line_to__before_newline(void **state); /** - * Test that the function returns F_data_not_stop because range is an empty range (range.start > range.stop). + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_seek_line_to() */ -extern void test__f_utf_seek_line_to__returns_data_not_stop(void **state); +extern void test__f_utf_seek_line_to__parameter_checking(void **state); /** - * Test that the function returns F_okay_stop stopped after end of range because no newline is found. + * Test that the function returns F_data_not_stop because range is an empty range (range.start > range.stop). * * @see f_utf_string_seek_line_to() */ -extern void test__f_utf_seek_line_to__returns_none_stop(void **state); +extern void test__f_utf_seek_line_to__returns_data_not_stop(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function returns F_okay_stop stopped after end of range because no newline is found. * * @see f_utf_string_seek_line_to() */ -extern void test__f_utf_seek_line_to__parameter_checking(void **state); +extern void test__f_utf_seek_line_to__returns_none_stop(void **state); #endif // _TEST__F_utf_seek_line_to_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-seek_to.c b/level_0/f_utf/tests/unit/c/test-utf-seek_to.c index b246a27..77c50f7 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-seek_to.c +++ b/level_0/f_utf/tests/unit/c/test-utf-seek_to.c @@ -39,6 +39,18 @@ void test__f_utf_seek_to__before_newline(void **state) { } } +void test__f_utf_seek_to__parameter_checking(void **state) { + + const f_utf_string_static_t to = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0X", 0, 1); + const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0X\0\0\0\n\0\0\0s\0\0\0t", 0, 6); + + { + const f_status_t status = f_utf_string_seek_to(source.string, to.string[0], 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_seek_to__returns_data_not_stop(void **state) { const f_utf_string_static_t to = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0X", 0, 1); @@ -70,18 +82,6 @@ void test__f_utf_seek_to__returns_none_stop(void **state) { } } -void test__f_utf_seek_to__parameter_checking(void **state) { - - const f_utf_string_static_t to = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0X", 0, 1); - const f_utf_string_static_t source = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0t\0\0\0e\0\0\0X\0\0\0\n\0\0\0s\0\0\0t", 0, 6); - - { - const f_status_t status = f_utf_string_seek_to(source.string, to.string[0], 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-seek_to.h b/level_0/f_utf/tests/unit/c/test-utf-seek_to.h index 7184a81..147299f 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-seek_to.h +++ b/level_0/f_utf/tests/unit/c/test-utf-seek_to.h @@ -25,24 +25,24 @@ extern void test__f_utf_seek_to__after_newline(void **state); extern void test__f_utf_seek_to__before_newline(void **state); /** - * Test that the function returns F_data_not_stop because range is an empty range (range.start > range.stop). + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_seek_to() */ -extern void test__f_utf_seek_to__returns_data_not_stop(void **state); +extern void test__f_utf_seek_to__parameter_checking(void **state); /** - * Test that the function returns F_okay_stop stopped after end of range because no newline is found. + * Test that the function returns F_data_not_stop because range is an empty range (range.start > range.stop). * * @see f_utf_string_seek_to() */ -extern void test__f_utf_seek_to__returns_none_stop(void **state); +extern void test__f_utf_seek_to__returns_data_not_stop(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function returns F_okay_stop stopped after end of range because no newline is found. * * @see f_utf_string_seek_to() */ -extern void test__f_utf_seek_to__parameter_checking(void **state); +extern void test__f_utf_seek_to__returns_none_stop(void **state); #endif // _TEST__F_utf_seek_to_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-triples_append.c b/level_0/f_utf/tests/unit/c/test-utf-triples_append.c index 6df4199..b3e3d01 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-triples_append.c +++ b/level_0/f_utf/tests/unit/c/test-utf-triples_append.c @@ -5,6 +5,17 @@ extern "C" { #endif +void test__f_utf_string_triples_append__parameter_checking(void **state) { + + const f_utf_string_triple_t data = f_utf_string_triple_t_initialize; + + { + const f_status_t status = f_utf_string_triples_append(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + void test__f_utf_string_triples_append__works(void **state) { const f_utf_string_static_t test_a = macro_f_utf_string_static_t_initialize_1((f_utf_string_t) "\0\0\0a", 0, 1); @@ -34,17 +45,6 @@ void test__f_utf_string_triples_append__works(void **state) { free((void *) destination.array); } -void test__f_utf_string_triples_append__parameter_checking(void **state) { - - const f_utf_string_triple_t data = f_utf_string_triple_t_initialize; - - { - const f_status_t status = f_utf_string_triples_append(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-triples_append.h b/level_0/f_utf/tests/unit/c/test-utf-triples_append.h index 0bd3465..ced4f9d 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-triples_append.h +++ b/level_0/f_utf/tests/unit/c/test-utf-triples_append.h @@ -11,17 +11,17 @@ #define _TEST__F_utf_triples_append_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_triples_append() */ -extern void test__f_utf_string_triples_append__works(void **state); +extern void test__f_utf_string_triples_append__parameter_checking(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_triples_append() */ -extern void test__f_utf_string_triples_append__parameter_checking(void **state); +extern void test__f_utf_string_triples_append__works(void **state); #endif // _TEST__F_utf_triples_append_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-triples_append_all.c b/level_0/f_utf/tests/unit/c/test-utf-triples_append_all.c index f9ac703..46267b3 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-triples_append_all.c +++ b/level_0/f_utf/tests/unit/c/test-utf-triples_append_all.c @@ -5,6 +5,43 @@ extern "C" { #endif +void test__f_utf_string_triples_append_all__parameter_checking(void **state) { + + const f_utf_string_triples_t data = f_utf_string_triples_t_initialize; + + { + const f_status_t status = f_utf_string_triples_append_all(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + +void test__f_utf_string_triples_append_all__returns_data_not(void **state) { + + const int length = 5; + f_utf_string_triples_t source = f_utf_string_triples_t_initialize; + f_utf_string_triples_t destination = f_utf_string_triples_t_initialize; + + { + const f_status_t status = f_memory_array_increase_by(length, sizeof(f_utf_string_triple_t), (void **) &source.array, &source.used, &source.size); + + assert_int_equal(status, F_okay); + assert_int_equal(source.used, 0); + assert_int_equal(source.size, length); + } + + { + const f_status_t status = f_utf_string_triples_append_all(source, &destination); + + assert_int_equal(status, F_data_not); + assert_int_equal(destination.used, 0); + assert_int_equal(destination.size, 0); + assert_null(destination.array); + } + + free((void *) source.array); +} + void test__f_utf_string_triples_append_all__works(void **state) { const int length_sources = 2; @@ -54,43 +91,6 @@ void test__f_utf_string_triples_append_all__works(void **state) { free((void *) destination.array); } -void test__f_utf_string_triples_append_all__returns_data_not(void **state) { - - const int length = 5; - f_utf_string_triples_t source = f_utf_string_triples_t_initialize; - f_utf_string_triples_t destination = f_utf_string_triples_t_initialize; - - { - const f_status_t status = f_memory_array_increase_by(length, sizeof(f_utf_string_triple_t), (void **) &source.array, &source.used, &source.size); - - assert_int_equal(status, F_okay); - assert_int_equal(source.used, 0); - assert_int_equal(source.size, length); - } - - { - const f_status_t status = f_utf_string_triples_append_all(source, &destination); - - assert_int_equal(status, F_data_not); - assert_int_equal(destination.used, 0); - assert_int_equal(destination.size, 0); - assert_null(destination.array); - } - - free((void *) source.array); -} - -void test__f_utf_string_triples_append_all__parameter_checking(void **state) { - - const f_utf_string_triples_t data = f_utf_string_triples_t_initialize; - - { - const f_status_t status = f_utf_string_triples_append_all(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-triples_append_all.h b/level_0/f_utf/tests/unit/c/test-utf-triples_append_all.h index 5fe8678..9a5675c 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-triples_append_all.h +++ b/level_0/f_utf/tests/unit/c/test-utf-triples_append_all.h @@ -11,11 +11,11 @@ #define _TEST__F_utf_triples_append_all_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_triples_append_all() */ -extern void test__f_utf_string_triples_append_all__works(void **state); +extern void test__f_utf_string_triples_append_all__parameter_checking(void **state); /** * Test that the function returns F_data_not when asked to copy an empty structure. @@ -25,10 +25,10 @@ extern void test__f_utf_string_triples_append_all__works(void **state); extern void test__f_utf_string_triples_append_all__returns_data_not(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_triples_append_all() */ -extern void test__f_utf_string_triples_append_all__parameter_checking(void **state); +extern void test__f_utf_string_triples_append_all__works(void **state); #endif // _TEST__F_utf_triples_append_all_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-tripless_append.c b/level_0/f_utf/tests/unit/c/test-utf-tripless_append.c index 45be389..41e391a 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-tripless_append.c +++ b/level_0/f_utf/tests/unit/c/test-utf-tripless_append.c @@ -5,6 +5,43 @@ extern "C" { #endif +void test__f_utf_string_tripless_append__parameter_checking(void **state) { + + f_utf_string_triples_t data = f_utf_string_triples_t_initialize; + + { + const f_status_t status = f_utf_string_tripless_append(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + +void test__f_utf_string_tripless_append__returns_data_not(void **state) { + + const int length = 5; + f_utf_string_triples_t source = f_utf_string_tripless_t_initialize; + f_utf_string_tripless_t destination = f_utf_string_tripless_t_initialize; + + { + const f_status_t status = f_memory_array_increase_by(length, sizeof(f_utf_string_triples_t), (void **) &source.array, &source.used, &source.size); + + assert_int_equal(status, F_okay); + assert_int_equal(source.used, 0); + assert_int_equal(source.size, length); + } + + { + const f_status_t status = f_utf_string_tripless_append(source, &destination); + + assert_int_equal(status, F_data_not); + assert_int_equal(destination.used, 0); + assert_int_equal(destination.size, 0); + assert_null(destination.array); + } + + free((void *) source.array); +} + void test__f_utf_string_tripless_append__works(void **state) { const int length_sources = 2; @@ -54,43 +91,6 @@ void test__f_utf_string_tripless_append__works(void **state) { free((void *) destination.array); } -void test__f_utf_string_tripless_append__returns_data_not(void **state) { - - const int length = 5; - f_utf_string_triples_t source = f_utf_string_tripless_t_initialize; - f_utf_string_tripless_t destination = f_utf_string_tripless_t_initialize; - - { - const f_status_t status = f_memory_array_increase_by(length, sizeof(f_utf_string_triples_t), (void **) &source.array, &source.used, &source.size); - - assert_int_equal(status, F_okay); - assert_int_equal(source.used, 0); - assert_int_equal(source.size, length); - } - - { - const f_status_t status = f_utf_string_tripless_append(source, &destination); - - assert_int_equal(status, F_data_not); - assert_int_equal(destination.used, 0); - assert_int_equal(destination.size, 0); - assert_null(destination.array); - } - - free((void *) source.array); -} - -void test__f_utf_string_tripless_append__parameter_checking(void **state) { - - f_utf_string_triples_t data = f_utf_string_triples_t_initialize; - - { - const f_status_t status = f_utf_string_tripless_append(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-tripless_append.h b/level_0/f_utf/tests/unit/c/test-utf-tripless_append.h index ded84de..eef0053 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-tripless_append.h +++ b/level_0/f_utf/tests/unit/c/test-utf-tripless_append.h @@ -11,11 +11,11 @@ #define _TEST__F_utf_tripless_append_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_tripless_append() */ -extern void test__f_utf_string_tripless_append__works(void **state); +extern void test__f_utf_string_tripless_append__parameter_checking(void **state); /** * Test that the function returns F_data_not when asked to copy an empty structure. @@ -25,10 +25,10 @@ extern void test__f_utf_string_tripless_append__works(void **state); extern void test__f_utf_string_tripless_append__returns_data_not(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_tripless_append() */ -extern void test__f_utf_string_tripless_append__parameter_checking(void **state); +extern void test__f_utf_string_tripless_append__works(void **state); #endif // _TEST__F_utf_tripless_append_h diff --git a/level_0/f_utf/tests/unit/c/test-utf-tripless_append_all.c b/level_0/f_utf/tests/unit/c/test-utf-tripless_append_all.c index a074ed5..6e7d83a 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-tripless_append_all.c +++ b/level_0/f_utf/tests/unit/c/test-utf-tripless_append_all.c @@ -5,6 +5,43 @@ extern "C" { #endif +void test__f_utf_string_tripless_append_all__parameter_checking(void **state) { + + const f_utf_string_tripless_t data = f_utf_string_tripless_t_initialize; + + { + const f_status_t status = f_utf_string_tripless_append_all(data, 0); + + assert_int_equal(status, F_status_set_error(F_parameter)); + } +} + +void test__f_utf_string_tripless_append_all__returns_data_not(void **state) { + + const int length = 5; + f_utf_string_tripless_t source = f_utf_string_tripless_t_initialize; + f_utf_string_tripless_t destination = f_utf_string_tripless_t_initialize; + + { + const f_status_t status = f_memory_array_increase_by(length, sizeof(f_utf_string_triples_t), (void **) &source.array, &source.used, &source.size); + + assert_int_equal(status, F_okay); + assert_int_equal(source.used, 0); + assert_int_equal(source.size, length); + } + + { + const f_status_t status = f_utf_string_tripless_append_all(source, &destination); + + assert_int_equal(status, F_data_not); + assert_int_equal(destination.used, 0); + assert_int_equal(destination.size, 0); + assert_null(destination.array); + } + + free((void *) source.array); +} + void test__f_utf_string_tripless_append_all__works(void **state) { const int length_sources = 2; @@ -80,43 +117,6 @@ void test__f_utf_string_tripless_append_all__works(void **state) { free((void *) destination.array); } -void test__f_utf_string_tripless_append_all__returns_data_not(void **state) { - - const int length = 5; - f_utf_string_tripless_t source = f_utf_string_tripless_t_initialize; - f_utf_string_tripless_t destination = f_utf_string_tripless_t_initialize; - - { - const f_status_t status = f_memory_array_increase_by(length, sizeof(f_utf_string_triples_t), (void **) &source.array, &source.used, &source.size); - - assert_int_equal(status, F_okay); - assert_int_equal(source.used, 0); - assert_int_equal(source.size, length); - } - - { - const f_status_t status = f_utf_string_tripless_append_all(source, &destination); - - assert_int_equal(status, F_data_not); - assert_int_equal(destination.used, 0); - assert_int_equal(destination.size, 0); - assert_null(destination.array); - } - - free((void *) source.array); -} - -void test__f_utf_string_tripless_append_all__parameter_checking(void **state) { - - const f_utf_string_tripless_t data = f_utf_string_tripless_t_initialize; - - { - const f_status_t status = f_utf_string_tripless_append_all(data, 0); - - assert_int_equal(status, F_status_set_error(F_parameter)); - } -} - #ifdef __cplusplus } // extern "C" #endif diff --git a/level_0/f_utf/tests/unit/c/test-utf-tripless_append_all.h b/level_0/f_utf/tests/unit/c/test-utf-tripless_append_all.h index 22d30de..d68d221 100644 --- a/level_0/f_utf/tests/unit/c/test-utf-tripless_append_all.h +++ b/level_0/f_utf/tests/unit/c/test-utf-tripless_append_all.h @@ -11,11 +11,11 @@ #define _TEST__F_utf_tripless_append_all_h /** - * Test that the function works. + * Test that the function correctly fails on invalid parameter. * * @see f_utf_string_tripless_append_all() */ -extern void test__f_utf_string_tripless_append_all__works(void **state); +extern void test__f_utf_string_tripless_append_all__parameter_checking(void **state); /** * Test that the function returns F_data_not when asked to copy an empty structure. @@ -25,10 +25,10 @@ extern void test__f_utf_string_tripless_append_all__works(void **state); extern void test__f_utf_string_tripless_append_all__returns_data_not(void **state); /** - * Test that the function correctly fails on invalid parameter. + * Test that the function works. * * @see f_utf_string_tripless_append_all() */ -extern void test__f_utf_string_tripless_append_all__parameter_checking(void **state); +extern void test__f_utf_string_tripless_append_all__works(void **state); #endif // _TEST__F_utf_tripless_append_all_h -- 1.8.3.1