While these tests are not expected to be thorough at this time, there are several checks that should still be and can easily be made.
Some of the test files have incorrect comments.
Order test functions alphabetically.
extern void test__f_limit_sets_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 returns F_data_not.
*
* @see f_limit_sets_append_all()
*/
extern void test__f_limit_sets_increase__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
* @see f_limit_sets_increase()
*/
extern void test__f_limit_setss_append__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
* @see f_limit_setss_append()
*/
extern void test__f_limit_setss_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 returns F_data_not.
*
* @see f_limit_setss_append_all()
*/
extern void test__f_limit_setss_decimate_by__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
* @see f_limit_setss_decimate_by()
*/
extern void test__f_limit_setss_decrease_by__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
* @see f_limit_setss_decrease_by()
*/
extern void test__f_limit_setss_increase__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
* @see f_limit_setss_increase()
*/
extern void test__f_limit_setss_increase_by__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
* @see f_limit_setss_increase_by()
*/
extern void test__f_limit_values_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 returns F_data_not.
*
* @see f_limit_values_append_all()
*/
extern void test__f_limit_values_increase__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
* @see f_limit_values_increase()
*/
extern void test__f_limit_valuess_append__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
* @see f_limit_valuess_append()
*/
extern void test__f_limit_valuess_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 returns F_data_not.
*
* @see f_limit_valuess_append_all()
*/
extern void test__f_limit_valuess_decimate_by__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
* @see f_limit_valuess_decimate_by()
*/
extern void test__f_limit_valuess_decrease_by__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
* @see f_limit_valuess_decrease_by()
*/
extern void test__f_limit_valuess_increase__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
* @see f_limit_valuess_increase()
*/
extern void test__f_limit_valuess_increase_by__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
* @see f_limit_valuess_increase_by()
*/
#define _TEST__F_path_current_h
/**
+ * Test that function fails.
+ *
+ * @see f_path_current()
+ */
+extern void test__f_path_current__fails(void **state);
+
+/**
* Test that parameter checking works as expected.
*
* @see f_path_current()
extern void test__f_path_current__parameter_checking(void **state);
#endif // _di_level_0_parameter_checking_
+/**
+ * Test that function works.
+ *
+ * @see f_path_current()
+ */
+extern void test__f_path_current__works(void **state);
+
#endif // _TEST__F_path_current_h
/**
* FLL - Level 0
*
- * Project: Path
+ * Project: Pipe
* API Version: 0.5
* Licenses: lgpl-2.1-or-later
*
/**
* FLL - Level 0
*
- * Project: IKI
+ * Project: Pipe
* API Version: 0.5
* Licenses: lgpl-2.1-or-later
*
extern "C" {
#endif
-void test__f_type_array_array_lengths_adjust__works(void **state) {
+void test__f_type_array_array_lengths_adjust__parameter_checking(void **state) {
const int length = 5;
f_array_lengths_t data = f_array_lengths_t_initialize;
{
- const f_status_t status = f_array_lengths_adjust(length, &data);
+ const f_status_t status = f_array_lengths_adjust(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_array_lengths_adjust__parameter_checking(void **state) {
+void test__f_type_array_array_lengths_adjust__works(void **state) {
const int length = 5;
f_array_lengths_t data = f_array_lengths_t_initialize;
{
- const f_status_t status = f_array_lengths_adjust(length, 0);
+ const f_status_t status = f_array_lengths_adjust(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__array_lengths_adjust
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_array_lengths_adjust()
+ * @see f_array_lengths_adjust()
*/
-extern void test__f_type_array_array_lengths_adjust__works(void **state);
+extern void test__f_type_array_array_lengths_adjust__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_array_lengths_adjust()
+ * @see f_array_lengths_adjust()
*/
-extern void test__f_type_array_array_lengths_adjust__parameter_checking(void **state);
+extern void test__f_type_array_array_lengths_adjust__works(void **state);
#endif // _TEST__F_type_array__array_lengths_adjust
extern "C" {
#endif
+void test__f_type_array_array_lengths_append__parameter_checking(void **state) {
+
+ const f_array_length_t data = f_array_length_t_initialize;
+
+ {
+ const f_status_t status = f_array_lengths_append(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
void test__f_type_array_array_lengths_append__works(void **state) {
const f_array_length_t source = 3;
free((void *) destination.array);
}
-void test__f_type_array_array_lengths_append__parameter_checking(void **state) {
-
- const f_array_length_t data = f_array_length_t_initialize;
-
- {
- const f_status_t status = f_array_lengths_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__array_lengths_append
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_array_lengths_append()
+ * @see f_array_lengths_append()
*/
-extern void test__f_type_array_array_lengths_append__works(void **state);
+extern void test__f_type_array_array_lengths_append__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_array_lengths_append()
+ * @see f_array_lengths_append()
*/
-extern void test__f_type_array_array_lengths_append__parameter_checking(void **state);
+extern void test__f_type_array_array_lengths_append__works(void **state);
#endif // _TEST__F_type_array__array_lengths_append
extern "C" {
#endif
-void test__f_type_array_array_lengths_append_all__works(void **state) {
+void test__f_type_array_array_lengths_append_all__parameter_checking(void **state) {
+
+ const f_array_lengths_t data = f_array_lengths_t_initialize;
+
+ {
+ const f_status_t status = f_array_lengths_append_all(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_array_lengths_append_all__returns_data_not(void **state) {
const int length = 5;
- const int length_used = 2;
f_array_lengths_t source = f_array_lengths_t_initialize;
f_array_lengths_t destination = f_array_lengths_t_initialize;
assert_int_equal(source.size, length);
}
- for (; source.used < length_used; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
{
const f_status_t status = f_array_lengths_append_all(source, &destination);
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_array_length_t i = 0; i < source.used; ++i) {
- assert_int_equal(destination.array[i], i + 1);
- } // for
+ 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);
- free((void *) destination.array);
}
-void test__f_type_array_array_lengths_append_all__returns_data_not(void **state) {
+void test__f_type_array_array_lengths_append_all__works(void **state) {
const int length = 5;
+ const int length_used = 2;
f_array_lengths_t source = f_array_lengths_t_initialize;
f_array_lengths_t destination = f_array_lengths_t_initialize;
assert_int_equal(source.size, length);
}
+ for (; source.used < length_used; ++source.used) {
+ source.array[source.used] = source.used + 1;
+ } // for
+
{
const f_status_t status = f_array_lengths_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);
+ assert_int_equal(status, F_none);
+ assert_int_equal(destination.used, source.used);
+ assert_int_equal(destination.size, source.used);
+
+ for (f_array_length_t i = 0; i < source.used; ++i) {
+ assert_int_equal(destination.array[i], i + 1);
+ } // for
}
free((void *) source.array);
-}
-
-void test__f_type_array_array_lengths_append_all__parameter_checking(void **state) {
-
- const f_array_lengths_t data = f_array_lengths_t_initialize;
-
- {
- const f_status_t status = f_array_lengths_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
+ free((void *) destination.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__array_lengths_append_all
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_array_lengths_append_all()
+ * @see f_array_lengths_append_all()
*/
-extern void test__f_type_array_array_lengths_append_all__works(void **state);
+extern void test__f_type_array_array_lengths_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 returns F_data_not.
*
- * @see f_type_array_array_lengths_append_all()
+ * @see f_array_lengths_append_all()
*/
extern void test__f_type_array_array_lengths_append_all__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_array_lengths_append_all()
+ * @see f_array_lengths_append_all()
*/
-extern void test__f_type_array_array_lengths_append_all__parameter_checking(void **state);
+extern void test__f_type_array_array_lengths_append_all__works(void **state);
#endif // _TEST__F_type_array__array_lengths_append_all
extern "C" {
#endif
-void test__f_type_array_array_lengths_decimate_by__works(void **state) {
+void test__f_type_array_array_lengths_decimate_by__parameter_checking(void **state) {
const int length = 5;
f_array_lengths_t data = f_array_lengths_t_initialize;
{
- const f_status_t status = f_array_lengths_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_array_lengths_decimate_by(length, &data);
+ const f_status_t status = f_array_lengths_decimate_by(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
assert_null(data.array);
}
-void test__f_type_array_array_lengths_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_array_lengths_decimate_by__works(void **state) {
const int length = 5;
f_array_lengths_t data = f_array_lengths_t_initialize;
{
- const f_status_t status = f_array_lengths_decimate_by(length, 0);
+ const f_status_t status = f_array_lengths_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_array_lengths_decimate_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__array_lengths_decimate_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_array_lengths_decimate_by()
+ * @see f_array_lengths_decimate_by()
*/
-extern void test__f_type_array_array_lengths_decimate_by__works(void **state);
+extern void test__f_type_array_array_lengths_decimate_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_array_lengths_decimate_by()
+ * @see f_array_lengths_decimate_by()
*/
-extern void test__f_type_array_array_lengths_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_array_lengths_decimate_by__works(void **state);
#endif // _TEST__F_type_array__array_lengths_decimate_by
extern "C" {
#endif
-void test__f_type_array_array_lengths_decrease_by__works(void **state) {
+void test__f_type_array_array_lengths_decrease_by__parameter_checking(void **state) {
const int length = 5;
f_array_lengths_t data = f_array_lengths_t_initialize;
{
- const f_status_t status = f_array_lengths_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_array_lengths_decrease_by(length, &data);
+ const f_status_t status = f_array_lengths_decrease_by(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
assert_null(data.array);
}
-void test__f_type_array_array_lengths_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_array_lengths_decrease_by__works(void **state) {
const int length = 5;
f_array_lengths_t data = f_array_lengths_t_initialize;
{
- const f_status_t status = f_array_lengths_decrease_by(length, 0);
+ const f_status_t status = f_array_lengths_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_array_lengths_decrease_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__array_lengths_decrease_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_array_lengths_decrease_by()
+ * @see f_array_lengths_decrease_by()
*/
-extern void test__f_type_array_array_lengths_decrease_by__works(void **state);
+extern void test__f_type_array_array_lengths_decrease_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_array_lengths_decrease_by()
+ * @see f_array_lengths_decrease_by()
*/
-extern void test__f_type_array_array_lengths_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_array_lengths_decrease_by__works(void **state);
#endif // _TEST__F_type_array__array_lengths_decrease_by
extern "C" {
#endif
-void test__f_type_array_array_lengths_increase__works(void **state) {
+void test__f_type_array_array_lengths_increase__parameter_checking(void **state) {
const int length = 5;
f_array_lengths_t data = f_array_lengths_t_initialize;
{
- const f_status_t status = f_array_lengths_resize(length, &data);
+ const f_status_t status = f_array_lengths_increase(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_array_lengths_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ assert_int_equal(data.size, 0);
}
free((void *) data.array);
free((void *) data.array);
}
-void test__f_type_array_array_lengths_increase__parameter_checking(void **state) {
+void test__f_type_array_array_lengths_increase__works(void **state) {
const int length = 5;
f_array_lengths_t data = f_array_lengths_t_initialize;
{
- const f_status_t status = f_array_lengths_increase(length, 0);
+ const f_status_t status = f_array_lengths_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_array_lengths_increase(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
}
free((void *) data.array);
#define _TEST__F_type_array__array_lengths_increase
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_array_lengths_increase()
+ * @see f_array_lengths_increase()
*/
-extern void test__f_type_array_array_lengths_increase__works(void **state);
+extern void test__f_type_array_array_lengths_increase__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_array_lengths_increase()
+ * @see f_array_lengths_increase()
*/
extern void test__f_type_array_array_lengths_increase__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_array_lengths_increase()
+ * @see f_array_lengths_increase()
*/
-extern void test__f_type_array_array_lengths_increase__parameter_checking(void **state);
+extern void test__f_type_array_array_lengths_increase__works(void **state);
#endif // _TEST__F_type_array__array_lengths_increase
extern "C" {
#endif
+void test__f_type_array_array_lengths_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_array_lengths_t data = f_array_lengths_t_initialize;
+
+ {
+ const f_status_t status = f_array_lengths_increase_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
void test__f_type_array_array_lengths_increase_by__works(void **state) {
const int length = 5;
free((void *) data.array);
}
-void test__f_type_array_array_lengths_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_array_lengths_t data = f_array_lengths_t_initialize;
-
- {
- const f_status_t status = f_array_lengths_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__array_lengths_increase_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_array_lengths_increase_by()
+ * @see f_array_lengths_increase_by()
*/
-extern void test__f_type_array_array_lengths_increase_by__works(void **state);
+extern void test__f_type_array_array_lengths_increase_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_array_lengths_increase_by()
+ * @see f_array_lengths_increase_by()
*/
-extern void test__f_type_array_array_lengths_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_array_lengths_increase_by__works(void **state);
#endif // _TEST__F_type_array__array_lengths_increase_by
extern "C" {
#endif
-void test__f_type_array_array_lengths_resize__works(void **state) {
+void test__f_type_array_array_lengths_resize__parameter_checking(void **state) {
const int length = 5;
f_array_lengths_t data = f_array_lengths_t_initialize;
{
- const f_status_t status = f_array_lengths_resize(length, &data);
+ const f_status_t status = f_array_lengths_resize(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_array_lengths_resize__parameter_checking(void **state) {
+void test__f_type_array_array_lengths_resize__works(void **state) {
const int length = 5;
f_array_lengths_t data = f_array_lengths_t_initialize;
{
- const f_status_t status = f_array_lengths_resize(length, 0);
+ const f_status_t status = f_array_lengths_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__array_lengths_resize
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_array_lengths_resize()
+ * @see f_array_lengths_resize()
*/
-extern void test__f_type_array_array_lengths_resize__works(void **state);
+extern void test__f_type_array_array_lengths_resize__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_array_lengths_resize()
+ * @see f_array_lengths_resize()
*/
-extern void test__f_type_array_array_lengths_resize__parameter_checking(void **state);
+extern void test__f_type_array_array_lengths_resize__works(void **state);
#endif // _TEST__F_type_array__array_lengths_resize
extern "C" {
#endif
-void test__f_type_array_array_lengthss_adjust__works(void **state) {
+void test__f_type_array_array_lengthss_adjust__parameter_checking(void **state) {
const int length = 5;
f_array_lengthss_t data = f_array_lengthss_t_initialize;
{
- const f_status_t status = f_array_lengthss_adjust(length, &data);
+ const f_status_t status = f_array_lengthss_adjust(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_array_lengthss_adjust__parameter_checking(void **state) {
+void test__f_type_array_array_lengthss_adjust__works(void **state) {
const int length = 5;
f_array_lengthss_t data = f_array_lengthss_t_initialize;
{
- const f_status_t status = f_array_lengthss_adjust(length, 0);
+ const f_status_t status = f_array_lengthss_adjust(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__array_lengthss_adjust
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_array_lengthss_adjust()
+ * @see f_array_lengthss_adjust()
*/
-extern void test__f_type_array_array_lengthss_adjust__works(void **state);
+extern void test__f_type_array_array_lengthss_adjust__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_array_lengthss_adjust()
+ * @see f_array_lengthss_adjust()
*/
-extern void test__f_type_array_array_lengthss_adjust__parameter_checking(void **state);
+extern void test__f_type_array_array_lengthss_adjust__works(void **state);
#endif // _TEST__F_type_array__array_lengthss_adjust
extern "C" {
#endif
-void test__f_type_array_array_lengthss_append__works(void **state) {
+void test__f_type_array_array_lengthss_append__parameter_checking(void **state) {
+
+ const f_array_lengths_t data = f_array_lengths_t_initialize;
+
+ {
+ const f_status_t status = f_array_lengthss_append(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_array_lengthss_append__returns_data_not(void **state) {
const int length = 5;
f_array_lengths_t source = f_array_lengths_t_initialize;
assert_int_equal(source.size, length);
}
- for (; source.used < length; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
{
const f_status_t status = f_array_lengthss_append(source, &destination);
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0].used, source.used);
- assert_int_equal(destination.array[0].size, source.used);
-
- for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
- assert_int_equal(destination.array[0].array[i], i + 1);
- } // for
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(destination.used, 0);
+ assert_int_equal(destination.size, 0);
+ assert_null(destination.array);
}
- for (f_array_length_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
free((void *) source.array);
- free((void *) destination.array);
}
-void test__f_type_array_array_lengthss_append__returns_data_not(void **state) {
+void test__f_type_array_array_lengthss_append__works(void **state) {
const int length = 5;
f_array_lengths_t source = f_array_lengths_t_initialize;
assert_int_equal(source.size, length);
}
+ for (; source.used < length; ++source.used) {
+ source.array[source.used] = source.used + 1;
+ } // for
+
{
const f_status_t status = f_array_lengthss_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_type_array_array_lengthss_append__parameter_checking(void **state) {
+ assert_int_equal(status, F_none);
+ assert_int_equal(destination.used, 1);
+ assert_int_equal(destination.array[0].used, source.used);
+ assert_int_equal(destination.array[0].size, source.used);
- const f_array_lengths_t data = f_array_lengths_t_initialize;
+ for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
+ assert_int_equal(destination.array[0].array[i], i + 1);
+ } // for
+ }
- {
- const f_status_t status = f_array_lengthss_append(data, 0);
+ for (f_array_length_t i = 0; i < destination.used; ++i) {
+ free((void *) destination.array[i].array);
+ } // for
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
+ free((void *) source.array);
+ free((void *) destination.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__array_lengthss_append
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_array_lengthss_append()
+ * @see f_array_lengthss_append()
*/
-extern void test__f_type_array_array_lengthss_append__works(void **state);
+extern void test__f_type_array_array_lengthss_append__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_array_lengthss_append()
+ * @see f_array_lengthss_append()
*/
extern void test__f_type_array_array_lengthss_append__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_array_lengthss_append()
+ * @see f_array_lengthss_append()
*/
-extern void test__f_type_array_array_lengthss_append__parameter_checking(void **state);
+extern void test__f_type_array_array_lengthss_append__works(void **state);
#endif // _TEST__F_type_array__array_lengthss_append
extern "C" {
#endif
+void test__f_type_array_array_lengthss_append_all__parameter_checking(void **state) {
+
+ const f_array_lengthss_t data = f_array_lengthss_t_initialize;
+
+ {
+ const f_status_t status = f_array_lengthss_append_all(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_array_lengthss_append_all__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_array_lengthss_t source = f_array_lengthss_t_initialize;
+ f_array_lengthss_t destination = f_array_lengthss_t_initialize;
+
+ {
+ const f_status_t status = f_array_lengthss_resize(length, &source);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(source.used, 0);
+ assert_int_equal(source.size, length);
+ }
+
+ {
+ const f_status_t status = f_array_lengthss_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_type_array_array_lengthss_append_all__works(void **state) {
const int length = 5;
free((void *) destination.array);
}
-void test__f_type_array_array_lengthss_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_array_lengthss_t source = f_array_lengthss_t_initialize;
- f_array_lengthss_t destination = f_array_lengthss_t_initialize;
-
- {
- const f_status_t status = f_array_lengthss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_array_lengthss_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_type_array_array_lengthss_append_all__parameter_checking(void **state) {
-
- const f_array_lengthss_t data = f_array_lengthss_t_initialize;
-
- {
- const f_status_t status = f_array_lengthss_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__array_lengthss_append_all
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_array_lengthss_append_all()
+ * @see f_array_lengthss_append_all()
*/
-extern void test__f_type_array_array_lengthss_append_all__works(void **state);
+extern void test__f_type_array_array_lengthss_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 returns F_data_not.
*
- * @see f_type_array_array_lengthss_append_all()
+ * @see f_array_lengthss_append_all()
*/
extern void test__f_type_array_array_lengthss_append_all__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_array_lengthss_append_all()
+ * @see f_array_lengthss_append_all()
*/
-extern void test__f_type_array_array_lengthss_append_all__parameter_checking(void **state);
+extern void test__f_type_array_array_lengthss_append_all__works(void **state);
#endif // _TEST__F_type_array__array_lengthss_append_all
extern "C" {
#endif
-void test__f_type_array_array_lengthss_decimate_by__works(void **state) {
+void test__f_type_array_array_lengthss_decimate_by__parameter_checking(void **state) {
const int length = 5;
f_array_lengthss_t data = f_array_lengths_t_initialize;
{
+ const f_status_t status = f_array_lengthss_decimate_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_array_lengthss_decimate_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_array_lengthss_t data = f_array_lengthss_t_initialize;
+
+ {
const f_status_t status = f_array_lengthss_resize(length, &data);
assert_int_equal(status, F_none);
}
{
- const f_status_t status = f_array_lengthss_decimate_by(length, &data);
+ const f_status_t status = f_array_lengthss_decimate_by(0, &data);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_data_not);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
-void test__f_type_array_array_lengthss_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_array_lengthss_decimate_by__works(void **state) {
const int length = 5;
f_array_lengthss_t data = f_array_lengths_t_initialize;
{
- const f_status_t status = f_array_lengthss_decimate_by(length, 0);
+ const f_status_t status = f_array_lengthss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_array_lengthss_decimate_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__array_lengthss_decimate_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_array_lengthss_decimate_by()
+ * @see f_array_lengthss_decimate_by()
*/
-extern void test__f_type_array_array_lengthss_decimate_by__works(void **state);
+extern void test__f_type_array_array_lengthss_decimate_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
* @see f_type_array_array_lengthss_decimate_by()
*/
-extern void test__f_type_array_array_lengthss_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_array_lengthss_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_array_lengthss_decimate_by()
+ */
+extern void test__f_type_array_array_lengthss_decimate_by__works(void **state);
#endif // _TEST__F_type_array__array_lengthss_decimate_by
extern "C" {
#endif
-void test__f_type_array_array_lengthss_decrease_by__works(void **state) {
+void test__f_type_array_array_lengthss_decrease_by__parameter_checking(void **state) {
const int length = 5;
f_array_lengthss_t data = f_array_lengths_t_initialize;
{
+ const f_status_t status = f_array_lengthss_decrease_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_array_lengthss_decrease_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_array_lengthss_t data = f_array_lengthss_t_initialize;
+
+ {
const f_status_t status = f_array_lengthss_resize(length, &data);
assert_int_equal(status, F_none);
}
{
- const f_status_t status = f_array_lengthss_decrease_by(length, &data);
+ const f_status_t status = f_array_lengthss_decrease_by(0, &data);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_data_not);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
-void test__f_type_array_array_lengthss_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_array_lengthss_decrease_by__works(void **state) {
const int length = 5;
f_array_lengthss_t data = f_array_lengths_t_initialize;
{
- const f_status_t status = f_array_lengthss_decrease_by(length, 0);
+ const f_status_t status = f_array_lengthss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_array_lengthss_decrease_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__array_lengthss_decrease_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_array_lengthss_decrease_by()
+ * @see f_array_lengthss_decrease_by()
*/
-extern void test__f_type_array_array_lengthss_decrease_by__works(void **state);
+extern void test__f_type_array_array_lengthss_decrease_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_array_lengthss_decrease_by()
+ * @see f_array_lengthss_decrease_by()
*/
-extern void test__f_type_array_array_lengthss_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_array_lengthss_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_array_lengthss_decrease_by()
+ */
+extern void test__f_type_array_array_lengthss_decrease_by__works(void **state);
#endif // _TEST__F_type_array__array_lengthss_decrease_by
extern "C" {
#endif
-void test__f_type_array_array_lengthss_increase__works(void **state) {
+void test__f_type_array_array_lengthss_increase__parameter_checking(void **state) {
const int length = 5;
f_array_lengthss_t data = f_array_lengths_t_initialize;
{
- const f_status_t status = f_array_lengthss_resize(length, &data);
+ const f_status_t status = f_array_lengthss_increase(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_array_lengthss_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ assert_int_equal(data.size, 0);
}
free((void *) data.array);
free((void *) data.array);
}
-void test__f_type_array_array_lengthss_increase__parameter_checking(void **state) {
+void test__f_type_array_array_lengthss_increase__works(void **state) {
const int length = 5;
f_array_lengthss_t data = f_array_lengths_t_initialize;
{
- const f_status_t status = f_array_lengthss_increase(length, 0);
+ const f_status_t status = f_array_lengthss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_array_lengthss_increase(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
}
free((void *) data.array);
#define _TEST__F_type_array__array_lengthss_increase
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_array_lengthss_increase()
+ * @see f_array_lengthss_increase()
*/
-extern void test__f_type_array_array_lengthss_increase__works(void **state);
+extern void test__f_type_array_array_lengthss_increase__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_array_lengthss_increase()
+ * @see f_array_lengthss_increase()
*/
extern void test__f_type_array_array_lengthss_increase__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_array_lengthss_increase()
+ * @see f_array_lengthss_increase()
*/
-extern void test__f_type_array_array_lengthss_increase__parameter_checking(void **state);
+extern void test__f_type_array_array_lengthss_increase__works(void **state);
#endif // _TEST__F_type_array__array_lengthss_increase
extern "C" {
#endif
-void test__f_type_array_array_lengthss_increase_by__works(void **state) {
+void test__f_type_array_array_lengthss_increase_by__parameter_checking(void **state) {
const int length = 5;
f_array_lengthss_t data = f_array_lengths_t_initialize;
{
+ const f_status_t status = f_array_lengthss_increase_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_array_lengthss_increase_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_array_lengthss_t data = f_array_lengthss_t_initialize;
+
+ {
const f_status_t status = f_array_lengthss_resize(length, &data);
assert_int_equal(status, F_none);
}
{
- data.used = length;
+ const f_status_t status = f_array_lengthss_increase_by(0, &data);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+ {
const f_status_t status = f_array_lengthss_increase_by(length, &data);
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
}
free((void *) data.array);
}
-void test__f_type_array_array_lengthss_increase_by__parameter_checking(void **state) {
+void test__f_type_array_array_lengthss_increase_by__works(void **state) {
const int length = 5;
f_array_lengthss_t data = f_array_lengths_t_initialize;
{
- const f_status_t status = f_array_lengthss_increase_by(length, 0);
+ const f_status_t status = f_array_lengthss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ {
+ data.used = length;
+
+ const f_status_t status = f_array_lengthss_increase_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_int_equal(data.size, length * 2);
+ }
+
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__array_lengthss_increase_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_array_lengthss_increase_by()
+ * @see f_array_lengthss_increase_by()
*/
-extern void test__f_type_array_array_lengthss_increase_by__works(void **state);
+extern void test__f_type_array_array_lengthss_increase_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_array_lengthss_increase_by()
+ * @see f_array_lengthss_increase_by()
*/
-extern void test__f_type_array_array_lengthss_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_array_lengthss_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_array_lengthss_increase_by()
+ */
+extern void test__f_type_array_array_lengthss_increase_by__works(void **state);
#endif // _TEST__F_type_array__array_lengthss_increase_by
extern "C" {
#endif
-void test__f_type_array_array_lengthss_resize__works(void **state) {
+void test__f_type_array_array_lengthss_resize__parameter_checking(void **state) {
const int length = 5;
f_array_lengthss_t data = f_array_lengthss_t_initialize;
{
- const f_status_t status = f_array_lengthss_resize(length, &data);
+ const f_status_t status = f_array_lengthss_resize(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_array_lengthss_resize__parameter_checking(void **state) {
+void test__f_type_array_array_lengthss_resize__works(void **state) {
const int length = 5;
f_array_lengthss_t data = f_array_lengthss_t_initialize;
{
- const f_status_t status = f_array_lengthss_resize(length, 0);
+ const f_status_t status = f_array_lengthss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__array_lengthss_resize
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_array_lengthss_resize()
+ * @see f_array_lengthss_resize()
*/
-extern void test__f_type_array_array_lengthss_resize__works(void **state);
+extern void test__f_type_array_array_lengthss_resize__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_array_lengthss_resize()
+ * @see f_array_lengthss_resize()
*/
-extern void test__f_type_array_array_lengthss_resize__parameter_checking(void **state);
+extern void test__f_type_array_array_lengthss_resize__works(void **state);
#endif // _TEST__F_type_array__array_lengthss_resize
extern "C" {
#endif
-void test__f_type_array_cells_adjust__works(void **state) {
+void test__f_type_array_cells_adjust__parameter_checking(void **state) {
const int length = 5;
f_cells_t data = f_cells_t_initialize;
{
- const f_status_t status = f_cells_adjust(length, &data);
+ const f_status_t status = f_cells_adjust(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_cells_adjust__parameter_checking(void **state) {
+void test__f_type_array_cells_adjust__works(void **state) {
const int length = 5;
f_cells_t data = f_cells_t_initialize;
{
- const f_status_t status = f_cells_adjust(length, 0);
+ const f_status_t status = f_cells_adjust(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__cells_adjust
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_cells_adjust()
+ * @see f_cells_adjust()
*/
-extern void test__f_type_array_cells_adjust__works(void **state);
+extern void test__f_type_array_cells_adjust__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_cells_adjust()
+ * @see f_cells_adjust()
*/
-extern void test__f_type_array_cells_adjust__parameter_checking(void **state);
+extern void test__f_type_array_cells_adjust__works(void **state);
#endif // _TEST__F_type_array__cells_adjust
extern "C" {
#endif
+void test__f_type_array_cells_append__parameter_checking(void **state) {
+
+ const f_cell_t data = f_cell_t_initialize;
+
+ {
+ const f_status_t status = f_cells_append(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
void test__f_type_array_cells_append__works(void **state) {
const f_cell_t source = { .row = 1, .column = 2 };
free((void *) destination.array);
}
-void test__f_type_array_cells_append__parameter_checking(void **state) {
-
- const f_cell_t data = f_cell_t_initialize;
-
- {
- const f_status_t status = f_cells_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__cells_append
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_cells_append()
+ * @see f_cells_append()
*/
-extern void test__f_type_array_cells_append__works(void **state);
+extern void test__f_type_array_cells_append__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_cells_append()
+ * @see f_cells_append()
*/
-extern void test__f_type_array_cells_append__parameter_checking(void **state);
+extern void test__f_type_array_cells_append__works(void **state);
#endif // _TEST__F_type_array__cells_append
extern "C" {
#endif
-void test__f_type_array_cells_append_all__works(void **state) {
+void test__f_type_array_cells_append_all__parameter_checking(void **state) {
+
+ const f_cells_t data = f_cells_t_initialize;
+
+ {
+ const f_status_t status = f_cells_append_all(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_cells_append_all__returns_data_not(void **state) {
const int length = 5;
f_cells_t source = f_cells_t_initialize;
f_cells_t destination = f_cells_t_initialize;
- const f_cell_t cell_0 = { .row = 1, .column = 2 };
- const f_cell_t cell_1 = { .row = 3, .column = 4 };
-
{
const f_status_t status = f_cells_resize(length, &source);
assert_int_equal(source.size, length);
}
- memcpy(&source.array[source.used++], (void *) &cell_0, sizeof(f_cell_t));
- memcpy(&source.array[source.used++], (void *) &cell_1, sizeof(f_cell_t));
-
{
const f_status_t status = f_cells_append_all(source, &destination);
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- assert_int_equal(destination.array[0].row, cell_0.row);
- assert_int_equal(destination.array[0].column, cell_0.column);
-
- assert_int_equal(destination.array[1].row, cell_1.row);
- assert_int_equal(destination.array[1].column, cell_1.column);
+ 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);
- free((void *) destination.array);
}
-void test__f_type_array_cells_append_all__returns_data_not(void **state) {
+void test__f_type_array_cells_append_all__works(void **state) {
const int length = 5;
f_cells_t source = f_cells_t_initialize;
f_cells_t destination = f_cells_t_initialize;
+ const f_cell_t cell_0 = { .row = 1, .column = 2 };
+ const f_cell_t cell_1 = { .row = 3, .column = 4 };
+
{
const f_status_t status = f_cells_resize(length, &source);
assert_int_equal(source.size, length);
}
+ memcpy(&source.array[source.used++], (void *) &cell_0, sizeof(f_cell_t));
+ memcpy(&source.array[source.used++], (void *) &cell_1, sizeof(f_cell_t));
+
{
const f_status_t status = f_cells_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_type_array_cells_append_all__parameter_checking(void **state) {
-
- const f_cells_t data = f_cells_t_initialize;
+ assert_int_equal(status, F_none);
+ assert_int_equal(destination.used, source.used);
+ assert_int_equal(destination.size, source.used);
- {
- const f_status_t status = f_cells_append_all(data, 0);
+ assert_int_equal(destination.array[0].row, cell_0.row);
+ assert_int_equal(destination.array[0].column, cell_0.column);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(destination.array[1].row, cell_1.row);
+ assert_int_equal(destination.array[1].column, cell_1.column);
}
+
+ free((void *) source.array);
+ free((void *) destination.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__cells_append_all
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_cells_append_all()
+ * @see f_cells_append_all()
*/
-extern void test__f_type_array_cells_append_all__works(void **state);
+extern void test__f_type_array_cells_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 returns F_data_not.
*
- * @see f_type_array_cells_append_all()
+ * @see f_cells_append_all()
*/
extern void test__f_type_array_cells_append_all__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_cells_append_all()
+ * @see f_cells_append_all()
*/
-extern void test__f_type_array_cells_append_all__parameter_checking(void **state);
+extern void test__f_type_array_cells_append_all__works(void **state);
#endif // _TEST__F_type_array__cells_append_all
extern "C" {
#endif
-void test__f_type_array_cells_decimate_by__works(void **state) {
+void test__f_type_array_cells_decimate_by__parameter_checking(void **state) {
const int length = 5;
f_cells_t data = f_cells_t_initialize;
{
- const f_status_t status = f_cells_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_cells_decimate_by(length, &data);
+ const f_status_t status = f_cells_decimate_by(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
assert_null(data.array);
}
-void test__f_type_array_cells_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_cells_decimate_by__works(void **state) {
const int length = 5;
f_cells_t data = f_cells_t_initialize;
{
- const f_status_t status = f_cells_decimate_by(length, 0);
+ const f_status_t status = f_cells_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_cells_decimate_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__cells_decimate_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_cells_decimate_by()
+ * @see f_cells_decimate_by()
*/
-extern void test__f_type_array_cells_decimate_by__works(void **state);
+extern void test__f_type_array_cells_decimate_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_cells_decimate_by()
+ * @see f_cells_decimate_by()
*/
-extern void test__f_type_array_cells_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_cells_decimate_by__works(void **state);
#endif // _TEST__F_type_array__cells_decimate_by
extern "C" {
#endif
-void test__f_type_array_cells_decrease_by__works(void **state) {
+void test__f_type_array_cells_decrease_by__parameter_checking(void **state) {
const int length = 5;
f_cells_t data = f_cells_t_initialize;
{
- const f_status_t status = f_cells_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_cells_decrease_by(length, &data);
+ const f_status_t status = f_cells_decrease_by(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
assert_null(data.array);
}
-void test__f_type_array_cells_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_cells_decrease_by__works(void **state) {
const int length = 5;
f_cells_t data = f_cells_t_initialize;
{
- const f_status_t status = f_cells_decrease_by(length, 0);
+ const f_status_t status = f_cells_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_cells_decrease_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__cells_decrease_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_cells_decrease_by()
+ * @see f_cells_decrease_by()
*/
-extern void test__f_type_array_cells_decrease_by__works(void **state);
+extern void test__f_type_array_cells_decrease_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_cells_decrease_by()
+ * @see f_cells_decrease_by()
*/
-extern void test__f_type_array_cells_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_cells_decrease_by__works(void **state);
#endif // _TEST__F_type_array__cells_decrease_by
extern "C" {
#endif
-void test__f_type_array_cells_increase__works(void **state) {
+void test__f_type_array_cells_increase__parameter_checking(void **state) {
const int length = 5;
f_cells_t data = f_cells_t_initialize;
{
- const f_status_t status = f_cells_resize(length, &data);
+ const f_status_t status = f_cells_increase(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_cells_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ assert_int_equal(data.size, 0);
}
free((void *) data.array);
free((void *) data.array);
}
-void test__f_type_array_cells_increase__parameter_checking(void **state) {
+void test__f_type_array_cells_increase__works(void **state) {
const int length = 5;
f_cells_t data = f_cells_t_initialize;
{
- const f_status_t status = f_cells_increase(length, 0);
+ const f_status_t status = f_cells_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_cells_increase(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
}
free((void *) data.array);
#define _TEST__F_type_array__cells_increase
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_cells_increase()
+ * @see f_cells_increase()
*/
-extern void test__f_type_array_cells_increase__works(void **state);
+extern void test__f_type_array_cells_increase__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_cells_increase()
+ * @see f_cells_increase()
*/
extern void test__f_type_array_cells_increase__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_cells_increase()
+ * @see f_cells_increase()
*/
-extern void test__f_type_array_cells_increase__parameter_checking(void **state);
+extern void test__f_type_array_cells_increase__works(void **state);
#endif // _TEST__F_type_array__cells_increase
extern "C" {
#endif
+void test__f_type_array_cells_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_cells_t data = f_cells_t_initialize;
+
+ {
+ const f_status_t status = f_cells_increase_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
void test__f_type_array_cells_increase_by__works(void **state) {
const int length = 5;
free((void *) data.array);
}
-void test__f_type_array_cells_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_cells_t data = f_cells_t_initialize;
-
- {
- const f_status_t status = f_cells_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__cells_increase_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_cells_increase_by()
+ * @see f_cells_increase_by()
*/
-extern void test__f_type_array_cells_increase_by__works(void **state);
+extern void test__f_type_array_cells_increase_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_cells_increase_by()
+ * @see f_cells_increase_by()
*/
-extern void test__f_type_array_cells_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_cells_increase_by__works(void **state);
#endif // _TEST__F_type_array__cells_increase_by
extern "C" {
#endif
-void test__f_type_array_cells_resize__works(void **state) {
+void test__f_type_array_cells_resize__parameter_checking(void **state) {
const int length = 5;
f_cells_t data = f_cells_t_initialize;
{
- const f_status_t status = f_cells_resize(length, &data);
+ const f_status_t status = f_cells_resize(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_cells_resize__parameter_checking(void **state) {
+void test__f_type_array_cells_resize__works(void **state) {
const int length = 5;
f_cells_t data = f_cells_t_initialize;
{
- const f_status_t status = f_cells_resize(length, 0);
+ const f_status_t status = f_cells_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__cells_resize
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_cells_resize()
+ * @see f_cells_resize()
*/
-extern void test__f_type_array_cells_resize__works(void **state);
+extern void test__f_type_array_cells_resize__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_cells_resize()
+ * @see f_cells_resize()
*/
-extern void test__f_type_array_cells_resize__parameter_checking(void **state);
+extern void test__f_type_array_cells_resize__works(void **state);
#endif // _TEST__F_type_array__cells_resize
extern "C" {
#endif
-void test__f_type_array_cellss_adjust__works(void **state) {
+void test__f_type_array_cellss_adjust__parameter_checking(void **state) {
const int length = 5;
f_cellss_t data = f_cellss_t_initialize;
{
- const f_status_t status = f_cellss_adjust(length, &data);
+ const f_status_t status = f_cellss_adjust(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_cellss_adjust__parameter_checking(void **state) {
+void test__f_type_array_cellss_adjust__works(void **state) {
const int length = 5;
f_cellss_t data = f_cellss_t_initialize;
{
- const f_status_t status = f_cellss_adjust(length, 0);
+ const f_status_t status = f_cellss_adjust(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__cellss_adjust
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_cellss_adjust()
+ * @see f_cellss_adjust()
*/
-extern void test__f_type_array_cellss_adjust__works(void **state);
+extern void test__f_type_array_cellss_adjust__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_cellss_adjust()
+ * @see f_cellss_adjust()
*/
-extern void test__f_type_array_cellss_adjust__parameter_checking(void **state);
+extern void test__f_type_array_cellss_adjust__works(void **state);
#endif // _TEST__F_type_array__cellss_adjust
extern "C" {
#endif
+void test__f_type_array_cellss_append__parameter_checking(void **state) {
+
+ f_cells_t data = f_cells_t_initialize;
+
+ {
+ const f_status_t status = f_cellss_append(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_cellss_append__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_cells_t source = f_cellss_t_initialize;
+ f_cellss_t destination = f_cellss_t_initialize;
+
+ {
+ const f_status_t status = f_cells_resize(length, &source);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(source.used, 0);
+ assert_int_equal(source.size, length);
+ }
+
+ {
+ const f_status_t status = f_cellss_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_type_array_cellss_append__works(void **state) {
const int length = 5;
free((void *) destination.array);
}
-void test__f_type_array_cellss_append__returns_data_not(void **state) {
-
- const int length = 5;
- f_cells_t source = f_cellss_t_initialize;
- f_cellss_t destination = f_cellss_t_initialize;
-
- {
- const f_status_t status = f_cells_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_cellss_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_type_array_cellss_append__parameter_checking(void **state) {
-
- f_cells_t data = f_cells_t_initialize;
-
- {
- const f_status_t status = f_cellss_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__cellss_append
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_cellss_append()
+ * @see f_cellss_append()
*/
-extern void test__f_type_array_cellss_append__works(void **state);
+extern void test__f_type_array_cellss_append__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_cellss_append()
+ * @see f_cellss_append()
*/
extern void test__f_type_array_cellss_append__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_cellss_append()
+ * @see f_cellss_append()
*/
-extern void test__f_type_array_cellss_append__parameter_checking(void **state);
+extern void test__f_type_array_cellss_append__works(void **state);
#endif // _TEST__F_type_array__cellss_append
extern "C" {
#endif
+void test__f_type_array_cellss_append_all__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_cellss_t source = f_cellss_t_initialize;
+ f_cellss_t destination = f_cellss_t_initialize;
+
+ {
+ const f_status_t status = f_cellss_resize(length, &source);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(source.used, 0);
+ assert_int_equal(source.size, length);
+ }
+
+ {
+ const f_status_t status = f_cellss_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_type_array_cellss_append_all__parameter_checking(void **state) {
+
+ const f_cellss_t data = f_cellss_t_initialize;
+
+ {
+ const f_status_t status = f_cellss_append_all(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
void test__f_type_array_cellss_append_all__works(void **state) {
const int length = 5;
free((void *) destination.array);
}
-void test__f_type_array_cellss_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_cellss_t source = f_cellss_t_initialize;
- f_cellss_t destination = f_cellss_t_initialize;
-
- {
- const f_status_t status = f_cellss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_cellss_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_type_array_cellss_append_all__parameter_checking(void **state) {
-
- const f_cellss_t data = f_cellss_t_initialize;
-
- {
- const f_status_t status = f_cellss_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__cellss_append_all
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_cellss_append_all()
+ * @see f_cellss_append_all()
*/
-extern void test__f_type_array_cellss_append_all__works(void **state);
+extern void test__f_type_array_cellss_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 returns F_data_not.
*
- * @see f_type_array_cellss_append_all()
+ * @see f_cellss_append_all()
*/
extern void test__f_type_array_cellss_append_all__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_cellss_append_all()
+ * @see f_cellss_append_all()
*/
-extern void test__f_type_array_cellss_append_all__parameter_checking(void **state);
+extern void test__f_type_array_cellss_append_all__works(void **state);
#endif // _TEST__F_type_array__cellss_append_all
extern "C" {
#endif
-void test__f_type_array_cellss_decimate_by__works(void **state) {
+void test__f_type_array_cellss_decimate_by__parameter_checking(void **state) {
const int length = 5;
f_cellss_t data = f_cells_t_initialize;
{
+ const f_status_t status = f_cellss_decimate_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_cellss_decimate_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_cellss_t data = f_cellss_t_initialize;
+
+ {
const f_status_t status = f_cellss_resize(length, &data);
assert_int_equal(status, F_none);
}
{
- const f_status_t status = f_cellss_decimate_by(length, &data);
+ const f_status_t status = f_cellss_decimate_by(0, &data);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_data_not);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
-void test__f_type_array_cellss_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_cellss_decimate_by__works(void **state) {
const int length = 5;
f_cellss_t data = f_cells_t_initialize;
{
- const f_status_t status = f_cellss_decimate_by(length, 0);
+ const f_status_t status = f_cellss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_cellss_decimate_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__cellss_decimate_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_cellss_decimate_by()
+ * @see f_cellss_decimate_by()
*/
-extern void test__f_type_array_cellss_decimate_by__works(void **state);
+extern void test__f_type_array_cellss_decimate_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
* @see f_type_array_cellss_decimate_by()
*/
-extern void test__f_type_array_cellss_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_cellss_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_cellss_decimate_by()
+ */
+extern void test__f_type_array_cellss_decimate_by__works(void **state);
#endif // _TEST__F_type_array__cellss_decimate_by
extern "C" {
#endif
-void test__f_type_array_cellss_decrease_by__works(void **state) {
+void test__f_type_array_cellss_decrease_by__parameter_checking(void **state) {
const int length = 5;
f_cellss_t data = f_cells_t_initialize;
{
+ const f_status_t status = f_cellss_decrease_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_cellss_decrease_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_cellss_t data = f_cellss_t_initialize;
+
+ {
const f_status_t status = f_cellss_resize(length, &data);
assert_int_equal(status, F_none);
}
{
- const f_status_t status = f_cellss_decrease_by(length, &data);
+ const f_status_t status = f_cellss_decrease_by(0, &data);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_data_not);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
-void test__f_type_array_cellss_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_cellss_decrease_by__works(void **state) {
const int length = 5;
f_cellss_t data = f_cells_t_initialize;
{
- const f_status_t status = f_cellss_decrease_by(length, 0);
+ const f_status_t status = f_cellss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_cellss_decrease_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__cellss_decrease_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_cellss_decrease_by()
+ * @see f_cellss_decrease_by()
*/
-extern void test__f_type_array_cellss_decrease_by__works(void **state);
+extern void test__f_type_array_cellss_decrease_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_cellss_decrease_by()
+ * @see f_cellss_decrease_by()
*/
-extern void test__f_type_array_cellss_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_cellss_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_cellss_decrease_by()
+ */
+extern void test__f_type_array_cellss_decrease_by__works(void **state);
#endif // _TEST__F_type_array__cellss_decrease_by
extern "C" {
#endif
-void test__f_type_array_cellss_increase__works(void **state) {
+void test__f_type_array_cellss_increase__parameter_checking(void **state) {
const int length = 5;
f_cellss_t data = f_cells_t_initialize;
{
- const f_status_t status = f_cellss_resize(length, &data);
+ const f_status_t status = f_cellss_increase(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_cellss_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ assert_int_equal(data.size, 0);
}
free((void *) data.array);
free((void *) data.array);
}
-void test__f_type_array_cellss_increase__parameter_checking(void **state) {
+void test__f_type_array_cellss_increase__works(void **state) {
const int length = 5;
f_cellss_t data = f_cells_t_initialize;
{
- const f_status_t status = f_cellss_increase(length, 0);
+ const f_status_t status = f_cellss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_cellss_increase(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
}
free((void *) data.array);
#define _TEST__F_type_array__cellss_increase
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_cellss_increase()
+ * @see f_cellss_increase()
*/
-extern void test__f_type_array_cellss_increase__works(void **state);
+extern void test__f_type_array_cellss_increase__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_cellss_increase()
+ * @see f_cellss_increase()
*/
extern void test__f_type_array_cellss_increase__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_cellss_increase()
+ * @see f_cellss_increase()
*/
-extern void test__f_type_array_cellss_increase__parameter_checking(void **state);
+extern void test__f_type_array_cellss_increase__works(void **state);
#endif // _TEST__F_type_array__cellss_increase
extern "C" {
#endif
-void test__f_type_array_cellss_increase_by__works(void **state) {
+void test__f_type_array_cellss_increase_by__parameter_checking(void **state) {
const int length = 5;
f_cellss_t data = f_cells_t_initialize;
{
+ const f_status_t status = f_cellss_increase_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_cellss_increase_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_cellss_t data = f_cellss_t_initialize;
+
+ {
const f_status_t status = f_cellss_resize(length, &data);
assert_int_equal(status, F_none);
}
{
- data.used = length;
+ const f_status_t status = f_cellss_increase_by(0, &data);
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
const f_status_t status = f_cellss_increase_by(length, &data);
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ free((void *) data.array);
+}
+
+void test__f_type_array_cell_decrease_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_cellss_t data = f_cellss_t_initialize;
+
+ {
+ const f_status_t status = f_cellss_resize(length, &data);
+
assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_cellss_decrease_by(0, &data);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
}
free((void *) data.array);
}
-void test__f_type_array_cellss_increase_by__parameter_checking(void **state) {
+void test__f_type_array_cellss_increase_by__works(void **state) {
const int length = 5;
f_cellss_t data = f_cells_t_initialize;
{
- const f_status_t status = f_cellss_increase_by(length, 0);
+ const f_status_t status = f_cellss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ {
+ data.used = length;
+
+ const f_status_t status = f_cellss_increase_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_int_equal(data.size, length * 2);
+ }
+
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__cellss_increase_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_cellss_increase_by()
+ * @see f_cellss_increase_by()
*/
-extern void test__f_type_array_cellss_increase_by__works(void **state);
+extern void test__f_type_array_cellss_increase_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_cellss_increase_by()
+ * @see f_cellss_increase_by()
*/
-extern void test__f_type_array_cellss_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_cellss_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_cellss_increase_by()
+ */
+extern void test__f_type_array_cellss_increase_by__works(void **state);
#endif // _TEST__F_type_array__cellss_increase_by
extern "C" {
#endif
-void test__f_type_array_cellss_resize__works(void **state) {
+void test__f_type_array_cellss_resize__parameter_checking(void **state) {
const int length = 5;
f_cellss_t data = f_cellss_t_initialize;
{
- const f_status_t status = f_cellss_resize(length, &data);
+ const f_status_t status = f_cellss_resize(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_cellss_resize__parameter_checking(void **state) {
+void test__f_type_array_cellss_resize__works(void **state) {
const int length = 5;
f_cellss_t data = f_cellss_t_initialize;
{
- const f_status_t status = f_cellss_resize(length, 0);
+ const f_status_t status = f_cellss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__cellss_resize
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_cellss_resize()
+ * @see f_cellss_resize()
*/
-extern void test__f_type_array_cellss_resize__works(void **state);
+extern void test__f_type_array_cellss_resize__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_cellss_resize()
+ * @see f_cellss_resize()
*/
-extern void test__f_type_array_cellss_resize__parameter_checking(void **state);
+extern void test__f_type_array_cellss_resize__works(void **state);
#endif // _TEST__F_type_array__cellss_resize
extern "C" {
#endif
-void test__f_type_array_fll_ids_adjust__works(void **state) {
+void test__f_type_array_fll_ids_adjust__parameter_checking(void **state) {
const int length = 5;
f_fll_ids_t data = f_fll_ids_t_initialize;
{
- const f_status_t status = f_fll_ids_adjust(length, &data);
+ const f_status_t status = f_fll_ids_adjust(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_fll_ids_adjust__parameter_checking(void **state) {
+void test__f_type_array_fll_ids_adjust__works(void **state) {
const int length = 5;
f_fll_ids_t data = f_fll_ids_t_initialize;
{
- const f_status_t status = f_fll_ids_adjust(length, 0);
+ const f_status_t status = f_fll_ids_adjust(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__fll_ids_adjust
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_fll_ids_adjust()
+ * @see f_fll_ids_adjust()
*/
-extern void test__f_type_array_fll_ids_adjust__works(void **state);
+extern void test__f_type_array_fll_ids_adjust__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_fll_ids_adjust()
+ * @see f_fll_ids_adjust()
*/
-extern void test__f_type_array_fll_ids_adjust__parameter_checking(void **state);
+extern void test__f_type_array_fll_ids_adjust__works(void **state);
#endif // _TEST__F_type_array__fll_ids_adjust
extern "C" {
#endif
+void test__f_type_array_fll_ids_append__parameter_checking(void **state) {
+
+ const f_fll_id_t data = f_fll_id_t_initialize;
+
+ {
+ const f_status_t status = f_fll_ids_append(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
void test__f_type_array_fll_ids_append__works(void **state) {
const f_fll_id_t source = { .name = "test", .type = 1, .used = 4 };
free((void *) destination.array);
}
-void test__f_type_array_fll_ids_append__parameter_checking(void **state) {
-
- const f_fll_id_t data = f_fll_id_t_initialize;
-
- {
- const f_status_t status = f_fll_ids_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__fll_ids_append
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_fll_ids_append()
+ * @see f_fll_ids_append()
*/
-extern void test__f_type_array_fll_ids_append__works(void **state);
+extern void test__f_type_array_fll_ids_append__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_fll_ids_append()
+ * @see f_fll_ids_append()
*/
-extern void test__f_type_array_fll_ids_append__parameter_checking(void **state);
+extern void test__f_type_array_fll_ids_append__works(void **state);
#endif // _TEST__F_type_array__fll_ids_append
extern "C" {
#endif
-void test__f_type_array_fll_ids_append_all__works(void **state) {
+void test__f_type_array_fll_ids_append_all__parameter_checking(void **state) {
+
+ const f_fll_ids_t data = f_fll_ids_t_initialize;
+
+ {
+ const f_status_t status = f_fll_ids_append_all(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_fll_ids_append_all__returns_data_not(void **state) {
const int length = 5;
f_fll_ids_t source = f_fll_ids_t_initialize;
f_fll_ids_t destination = f_fll_ids_t_initialize;
- const f_fll_id_t fll_id_0 = { .name = "test", .type = 1, .used = 4 };
- const f_fll_id_t fll_id_1 = { .name = "other", .type = 2, .used = 5 };
-
{
const f_status_t status = f_fll_ids_resize(length, &source);
assert_int_equal(source.size, length);
}
- memcpy(&source.array[source.used++], (void *) &fll_id_0, sizeof(f_fll_id_t));
- memcpy(&source.array[source.used++], (void *) &fll_id_1, sizeof(f_fll_id_t));
-
{
const f_status_t status = f_fll_ids_append_all(source, &destination);
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- assert_string_equal(destination.array[0].name, fll_id_0.name);
- assert_int_equal(destination.array[0].type, fll_id_0.type);
- assert_int_equal(destination.array[0].used, fll_id_0.used);
-
- assert_string_equal(destination.array[1].name, fll_id_1.name);
- assert_int_equal(destination.array[1].type, fll_id_1.type);
- assert_int_equal(destination.array[1].used, fll_id_1.used);
+ 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);
- free((void *) destination.array);
}
-void test__f_type_array_fll_ids_append_all__returns_data_not(void **state) {
+void test__f_type_array_fll_ids_append_all__works(void **state) {
const int length = 5;
f_fll_ids_t source = f_fll_ids_t_initialize;
f_fll_ids_t destination = f_fll_ids_t_initialize;
+ const f_fll_id_t fll_id_0 = { .name = "test", .type = 1, .used = 4 };
+ const f_fll_id_t fll_id_1 = { .name = "other", .type = 2, .used = 5 };
+
{
const f_status_t status = f_fll_ids_resize(length, &source);
assert_int_equal(source.size, length);
}
+ memcpy(&source.array[source.used++], (void *) &fll_id_0, sizeof(f_fll_id_t));
+ memcpy(&source.array[source.used++], (void *) &fll_id_1, sizeof(f_fll_id_t));
+
{
const f_status_t status = f_fll_ids_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_type_array_fll_ids_append_all__parameter_checking(void **state) {
-
- const f_fll_ids_t data = f_fll_ids_t_initialize;
+ assert_int_equal(status, F_none);
+ assert_int_equal(destination.used, source.used);
+ assert_int_equal(destination.size, source.used);
- {
- const f_status_t status = f_fll_ids_append_all(data, 0);
+ assert_string_equal(destination.array[0].name, fll_id_0.name);
+ assert_int_equal(destination.array[0].type, fll_id_0.type);
+ assert_int_equal(destination.array[0].used, fll_id_0.used);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_string_equal(destination.array[1].name, fll_id_1.name);
+ assert_int_equal(destination.array[1].type, fll_id_1.type);
+ assert_int_equal(destination.array[1].used, fll_id_1.used);
}
+
+ free((void *) source.array);
+ free((void *) destination.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__fll_ids_append_all
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_fll_ids_append_all()
+ * @see f_fll_ids_append_all()
*/
-extern void test__f_type_array_fll_ids_append_all__works(void **state);
+extern void test__f_type_array_fll_ids_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 returns F_data_not.
*
- * @see f_type_array_fll_ids_append_all()
+ * @see f_fll_ids_append_all()
*/
extern void test__f_type_array_fll_ids_append_all__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_fll_ids_append_all()
+ * @see f_fll_ids_append_all()
*/
-extern void test__f_type_array_fll_ids_append_all__parameter_checking(void **state);
+extern void test__f_type_array_fll_ids_append_all__works(void **state);
#endif // _TEST__F_type_array__fll_ids_append_all
extern "C" {
#endif
-void test__f_type_array_fll_ids_decimate_by__works(void **state) {
+void test__f_type_array_fll_ids_decimate_by__parameter_checking(void **state) {
const int length = 5;
f_fll_ids_t data = f_fll_ids_t_initialize;
{
- const f_status_t status = f_fll_ids_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fll_ids_decimate_by(length, &data);
+ const f_status_t status = f_fll_ids_decimate_by(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
assert_null(data.array);
}
-void test__f_type_array_fll_ids_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_fll_ids_decimate_by__works(void **state) {
const int length = 5;
f_fll_ids_t data = f_fll_ids_t_initialize;
{
- const f_status_t status = f_fll_ids_decimate_by(length, 0);
+ const f_status_t status = f_fll_ids_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_fll_ids_decimate_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__fll_ids_decimate_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_fll_ids_decimate_by()
+ * @see f_fll_ids_decimate_by()
*/
-extern void test__f_type_array_fll_ids_decimate_by__works(void **state);
+extern void test__f_type_array_fll_ids_decimate_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_fll_ids_decimate_by()
+ * @see f_fll_ids_decimate_by()
*/
-extern void test__f_type_array_fll_ids_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_fll_ids_decimate_by__works(void **state);
#endif // _TEST__F_type_array__fll_ids_decimate_by
extern "C" {
#endif
-void test__f_type_array_fll_ids_decrease_by__works(void **state) {
+void test__f_type_array_fll_ids_decrease_by__parameter_checking(void **state) {
const int length = 5;
f_fll_ids_t data = f_fll_ids_t_initialize;
{
- const f_status_t status = f_fll_ids_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_fll_ids_decrease_by(length, &data);
+ const f_status_t status = f_fll_ids_decrease_by(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
assert_null(data.array);
}
-void test__f_type_array_fll_ids_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_fll_ids_decrease_by__works(void **state) {
const int length = 5;
f_fll_ids_t data = f_fll_ids_t_initialize;
{
- const f_status_t status = f_fll_ids_decrease_by(length, 0);
+ const f_status_t status = f_fll_ids_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_fll_ids_decrease_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__fll_ids_decrease_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_fll_ids_decrease_by()
+ * @see f_fll_ids_decrease_by()
*/
-extern void test__f_type_array_fll_ids_decrease_by__works(void **state);
+extern void test__f_type_array_fll_ids_decrease_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_fll_ids_decrease_by()
+ * @see f_fll_ids_decrease_by()
*/
-extern void test__f_type_array_fll_ids_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_fll_ids_decrease_by__works(void **state);
#endif // _TEST__F_type_array__fll_ids_decrease_by
extern "C" {
#endif
-void test__f_type_array_fll_ids_increase__works(void **state) {
+void test__f_type_array_fll_ids_increase__parameter_checking(void **state) {
const int length = 5;
f_fll_ids_t data = f_fll_ids_t_initialize;
{
- const f_status_t status = f_fll_ids_resize(length, &data);
+ const f_status_t status = f_fll_ids_increase(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_fll_ids_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ assert_int_equal(data.size, 0);
}
free((void *) data.array);
free((void *) data.array);
}
-void test__f_type_array_fll_ids_increase__parameter_checking(void **state) {
+void test__f_type_array_fll_ids_increase__works(void **state) {
const int length = 5;
f_fll_ids_t data = f_fll_ids_t_initialize;
{
- const f_status_t status = f_fll_ids_increase(length, 0);
+ const f_status_t status = f_fll_ids_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_fll_ids_increase(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
}
free((void *) data.array);
#define _TEST__F_type_array__fll_ids_increase
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_fll_ids_increase()
+ * @see f_fll_ids_increase()
*/
-extern void test__f_type_array_fll_ids_increase__works(void **state);
+extern void test__f_type_array_fll_ids_increase__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_fll_ids_increase()
+ * @see f_fll_ids_increase()
*/
extern void test__f_type_array_fll_ids_increase__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_fll_ids_increase()
+ * @see f_fll_ids_increase()
*/
-extern void test__f_type_array_fll_ids_increase__parameter_checking(void **state);
+extern void test__f_type_array_fll_ids_increase__works(void **state);
#endif // _TEST__F_type_array__fll_ids_increase
extern "C" {
#endif
+void test__f_type_array_fll_ids_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_fll_ids_t data = f_fll_ids_t_initialize;
+
+ {
+ const f_status_t status = f_fll_ids_increase_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
void test__f_type_array_fll_ids_increase_by__works(void **state) {
const int length = 5;
free((void *) data.array);
}
-void test__f_type_array_fll_ids_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_fll_ids_t data = f_fll_ids_t_initialize;
-
- {
- const f_status_t status = f_fll_ids_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__fll_ids_increase_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_fll_ids_increase_by()
+ * @see f_fll_ids_increase_by()
*/
-extern void test__f_type_array_fll_ids_increase_by__works(void **state);
+extern void test__f_type_array_fll_ids_increase_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_fll_ids_increase_by()
+ * @see f_fll_ids_increase_by()
*/
-extern void test__f_type_array_fll_ids_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_fll_ids_increase_by__works(void **state);
#endif // _TEST__F_type_array__fll_ids_increase_by
extern "C" {
#endif
-void test__f_type_array_fll_ids_resize__works(void **state) {
+void test__f_type_array_fll_ids_resize__parameter_checking(void **state) {
const int length = 5;
f_fll_ids_t data = f_fll_ids_t_initialize;
{
- const f_status_t status = f_fll_ids_resize(length, &data);
+ const f_status_t status = f_fll_ids_resize(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_fll_ids_resize__parameter_checking(void **state) {
+void test__f_type_array_fll_ids_resize__works(void **state) {
const int length = 5;
f_fll_ids_t data = f_fll_ids_t_initialize;
{
- const f_status_t status = f_fll_ids_resize(length, 0);
+ const f_status_t status = f_fll_ids_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__fll_ids_resize
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_fll_ids_resize()
+ * @see f_fll_ids_resize()
*/
-extern void test__f_type_array_fll_ids_resize__works(void **state);
+extern void test__f_type_array_fll_ids_resize__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_fll_ids_resize()
+ * @see f_fll_ids_resize()
*/
-extern void test__f_type_array_fll_ids_resize__parameter_checking(void **state);
+extern void test__f_type_array_fll_ids_resize__works(void **state);
#endif // _TEST__F_type_array__fll_ids_resize
extern "C" {
#endif
-void test__f_type_array_fll_idss_adjust__works(void **state) {
+void test__f_type_array_fll_idss_adjust__parameter_checking(void **state) {
const int length = 5;
f_fll_idss_t data = f_fll_idss_t_initialize;
{
- const f_status_t status = f_fll_idss_adjust(length, &data);
+ const f_status_t status = f_fll_idss_adjust(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_fll_idss_adjust__parameter_checking(void **state) {
+void test__f_type_array_fll_idss_adjust__works(void **state) {
const int length = 5;
f_fll_idss_t data = f_fll_idss_t_initialize;
{
- const f_status_t status = f_fll_idss_adjust(length, 0);
+ const f_status_t status = f_fll_idss_adjust(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__fll_idss_adjust
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_fll_idss_adjust()
+ * @see f_fll_idss_adjust()
*/
-extern void test__f_type_array_fll_idss_adjust__works(void **state);
+extern void test__f_type_array_fll_idss_adjust__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_fll_idss_adjust()
+ * @see f_fll_idss_adjust()
*/
-extern void test__f_type_array_fll_idss_adjust__parameter_checking(void **state);
+extern void test__f_type_array_fll_idss_adjust__works(void **state);
#endif // _TEST__F_type_array__fll_idss_adjust
extern "C" {
#endif
+void test__f_type_array_fll_idss_append__parameter_checking(void **state) {
+
+ f_fll_ids_t data = f_fll_ids_t_initialize;
+
+ {
+ const f_status_t status = f_fll_idss_append(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_fll_idss_append__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fll_ids_t source = f_fll_idss_t_initialize;
+ f_fll_idss_t destination = f_fll_idss_t_initialize;
+
+ {
+ const f_status_t status = f_fll_ids_resize(length, &source);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(source.used, 0);
+ assert_int_equal(source.size, length);
+ }
+
+ {
+ const f_status_t status = f_fll_idss_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_type_array_fll_idss_append__works(void **state) {
const int length = 5;
free((void *) destination.array);
}
-void test__f_type_array_fll_idss_append__returns_data_not(void **state) {
-
- const int length = 5;
- f_fll_ids_t source = f_fll_idss_t_initialize;
- f_fll_idss_t destination = f_fll_idss_t_initialize;
-
- {
- const f_status_t status = f_fll_ids_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_fll_idss_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_type_array_fll_idss_append__parameter_checking(void **state) {
-
- f_fll_ids_t data = f_fll_ids_t_initialize;
-
- {
- const f_status_t status = f_fll_idss_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__fll_idss_append
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_fll_idss_append()
+ * @see f_fll_idss_append()
*/
-extern void test__f_type_array_fll_idss_append__works(void **state);
+extern void test__f_type_array_fll_idss_append__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_fll_idss_append()
+ * @see f_fll_idss_append()
*/
extern void test__f_type_array_fll_idss_append__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_fll_idss_append()
+ * @see f_fll_idss_append()
*/
-extern void test__f_type_array_fll_idss_append__parameter_checking(void **state);
+extern void test__f_type_array_fll_idss_append__works(void **state);
#endif // _TEST__F_type_array__fll_idss_append
extern "C" {
#endif
+void test__f_type_array_fll_idss_append_all__parameter_checking(void **state) {
+
+ const f_fll_idss_t data = f_fll_idss_t_initialize;
+
+ {
+ const f_status_t status = f_fll_idss_append_all(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_fll_idss_append_all__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fll_idss_t source = f_fll_idss_t_initialize;
+ f_fll_idss_t destination = f_fll_idss_t_initialize;
+
+ {
+ const f_status_t status = f_fll_idss_resize(length, &source);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(source.used, 0);
+ assert_int_equal(source.size, length);
+ }
+
+ {
+ const f_status_t status = f_fll_idss_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_type_array_fll_idss_append_all__works(void **state) {
const int length = 5;
free((void *) destination.array);
}
-void test__f_type_array_fll_idss_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_fll_idss_t source = f_fll_idss_t_initialize;
- f_fll_idss_t destination = f_fll_idss_t_initialize;
-
- {
- const f_status_t status = f_fll_idss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_fll_idss_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_type_array_fll_idss_append_all__parameter_checking(void **state) {
-
- const f_fll_idss_t data = f_fll_idss_t_initialize;
-
- {
- const f_status_t status = f_fll_idss_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__fll_idss_append_all
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_fll_idss_append_all()
+ * @see f_fll_idss_append_all()
*/
-extern void test__f_type_array_fll_idss_append_all__works(void **state);
+extern void test__f_type_array_fll_idss_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 returns F_data_not.
*
- * @see f_type_array_fll_idss_append_all()
+ * @see f_fll_idss_append_all()
*/
extern void test__f_type_array_fll_idss_append_all__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_fll_idss_append_all()
+ * @see f_fll_idss_append_all()
*/
-extern void test__f_type_array_fll_idss_append_all__parameter_checking(void **state);
+extern void test__f_type_array_fll_idss_append_all__works(void **state);
#endif // _TEST__F_type_array__fll_idss_append_all
extern "C" {
#endif
-void test__f_type_array_fll_idss_decimate_by__works(void **state) {
+void test__f_type_array_fll_idss_decimate_by__parameter_checking(void **state) {
const int length = 5;
f_fll_idss_t data = f_fll_ids_t_initialize;
{
+ const f_status_t status = f_fll_idss_decimate_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_fll_idss_decimate_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fll_idss_t data = f_fll_idss_t_initialize;
+
+ {
const f_status_t status = f_fll_idss_resize(length, &data);
assert_int_equal(status, F_none);
}
{
- const f_status_t status = f_fll_idss_decimate_by(length, &data);
+ const f_status_t status = f_fll_idss_decimate_by(0, &data);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_data_not);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
-void test__f_type_array_fll_idss_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_fll_idss_decimate_by__works(void **state) {
const int length = 5;
f_fll_idss_t data = f_fll_ids_t_initialize;
{
- const f_status_t status = f_fll_idss_decimate_by(length, 0);
+ const f_status_t status = f_fll_idss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_fll_idss_decimate_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__fll_idss_decimate_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_fll_idss_decimate_by()
+ * @see f_fll_idss_decimate_by()
*/
-extern void test__f_type_array_fll_idss_decimate_by__works(void **state);
+extern void test__f_type_array_fll_idss_decimate_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
* @see f_type_array_fll_idss_decimate_by()
*/
-extern void test__f_type_array_fll_idss_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_fll_idss_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fll_idss_decimate_by()
+ */
+extern void test__f_type_array_fll_idss_decimate_by__works(void **state);
#endif // _TEST__F_type_array__fll_idss_decimate_by
extern "C" {
#endif
-void test__f_type_array_fll_idss_decrease_by__works(void **state) {
+void test__f_type_array_fll_idss_decrease_by__parameter_checking(void **state) {
const int length = 5;
f_fll_idss_t data = f_fll_ids_t_initialize;
{
+ const f_status_t status = f_fll_idss_decrease_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_fll_idss_decrease_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fll_idss_t data = f_fll_idss_t_initialize;
+
+ {
const f_status_t status = f_fll_idss_resize(length, &data);
assert_int_equal(status, F_none);
}
{
- const f_status_t status = f_fll_idss_decrease_by(length, &data);
+ const f_status_t status = f_fll_idss_decrease_by(0, &data);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_data_not);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
-void test__f_type_array_fll_idss_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_fll_idss_decrease_by__works(void **state) {
const int length = 5;
f_fll_idss_t data = f_fll_ids_t_initialize;
{
- const f_status_t status = f_fll_idss_decrease_by(length, 0);
+ const f_status_t status = f_fll_idss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_fll_idss_decrease_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__fll_idss_decrease_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_fll_idss_decrease_by()
+ * @see f_fll_idss_decrease_by()
*/
-extern void test__f_type_array_fll_idss_decrease_by__works(void **state);
+extern void test__f_type_array_fll_idss_decrease_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_fll_idss_decrease_by()
+ * @see f_fll_idss_decrease_by()
*/
-extern void test__f_type_array_fll_idss_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_fll_idss_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fll_idss_decrease_by()
+ */
+extern void test__f_type_array_fll_idss_decrease_by__works(void **state);
#endif // _TEST__F_type_array__fll_idss_decrease_by
extern "C" {
#endif
-void test__f_type_array_fll_idss_increase__works(void **state) {
+void test__f_type_array_fll_idss_increase__parameter_checking(void **state) {
const int length = 5;
f_fll_idss_t data = f_fll_ids_t_initialize;
{
- const f_status_t status = f_fll_idss_resize(length, &data);
+ const f_status_t status = f_fll_idss_increase(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_fll_idss_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ assert_int_equal(data.size, 0);
}
free((void *) data.array);
free((void *) data.array);
}
-void test__f_type_array_fll_idss_increase__parameter_checking(void **state) {
+void test__f_type_array_fll_idss_increase__works(void **state) {
const int length = 5;
f_fll_idss_t data = f_fll_ids_t_initialize;
{
- const f_status_t status = f_fll_idss_increase(length, 0);
+ const f_status_t status = f_fll_idss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_fll_idss_increase(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
}
free((void *) data.array);
#define _TEST__F_type_array__fll_idss_increase
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_fll_idss_increase()
+ * @see f_fll_idss_increase()
*/
-extern void test__f_type_array_fll_idss_increase__works(void **state);
+extern void test__f_type_array_fll_idss_increase__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_fll_idss_increase()
+ * @see f_fll_idss_increase()
*/
extern void test__f_type_array_fll_idss_increase__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_fll_idss_increase()
+ * @see f_fll_idss_increase()
*/
-extern void test__f_type_array_fll_idss_increase__parameter_checking(void **state);
+extern void test__f_type_array_fll_idss_increase__works(void **state);
#endif // _TEST__F_type_array__fll_idss_increase
extern "C" {
#endif
-void test__f_type_array_fll_idss_increase_by__works(void **state) {
+void test__f_type_array_fll_idss_increase_by__parameter_checking(void **state) {
const int length = 5;
f_fll_idss_t data = f_fll_ids_t_initialize;
{
+ const f_status_t status = f_fll_idss_increase_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_fll_idss_increase_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_fll_idss_t data = f_fll_idss_t_initialize;
+
+ {
const f_status_t status = f_fll_idss_resize(length, &data);
assert_int_equal(status, F_none);
}
{
- data.used = length;
+ const f_status_t status = f_fll_idss_increase_by(0, &data);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+ {
const f_status_t status = f_fll_idss_increase_by(length, &data);
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
}
free((void *) data.array);
}
-void test__f_type_array_fll_idss_increase_by__parameter_checking(void **state) {
+void test__f_type_array_fll_idss_increase_by__works(void **state) {
const int length = 5;
f_fll_idss_t data = f_fll_ids_t_initialize;
{
- const f_status_t status = f_fll_idss_increase_by(length, 0);
+ const f_status_t status = f_fll_idss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ {
+ data.used = length;
+
+ const f_status_t status = f_fll_idss_increase_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_int_equal(data.size, length * 2);
+ }
+
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__fll_idss_increase_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_fll_idss_increase_by()
+ * @see f_fll_idss_increase_by()
*/
-extern void test__f_type_array_fll_idss_increase_by__works(void **state);
+extern void test__f_type_array_fll_idss_increase_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_fll_idss_increase_by()
+ * @see f_fll_idss_increase_by()
*/
-extern void test__f_type_array_fll_idss_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_fll_idss_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_fll_idss_increase_by()
+ */
+extern void test__f_type_array_fll_idss_increase_by__works(void **state);
#endif // _TEST__F_type_array__fll_idss_increase_by
extern "C" {
#endif
-void test__f_type_array_fll_idss_resize__works(void **state) {
+void test__f_type_array_fll_idss_resize__parameter_checking(void **state) {
const int length = 5;
f_fll_idss_t data = f_fll_idss_t_initialize;
{
- const f_status_t status = f_fll_idss_resize(length, &data);
+ const f_status_t status = f_fll_idss_resize(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_fll_idss_resize__parameter_checking(void **state) {
+void test__f_type_array_fll_idss_resize__works(void **state) {
const int length = 5;
f_fll_idss_t data = f_fll_idss_t_initialize;
{
- const f_status_t status = f_fll_idss_resize(length, 0);
+ const f_status_t status = f_fll_idss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__fll_idss_resize
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_fll_idss_resize()
+ * @see f_fll_idss_resize()
*/
-extern void test__f_type_array_fll_idss_resize__works(void **state);
+extern void test__f_type_array_fll_idss_resize__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_fll_idss_resize()
+ * @see f_fll_idss_resize()
*/
-extern void test__f_type_array_fll_idss_resize__parameter_checking(void **state);
+extern void test__f_type_array_fll_idss_resize__works(void **state);
#endif // _TEST__F_type_array__fll_idss_resize
extern "C" {
#endif
-void test__f_type_array_int128s_adjust__works(void **state) {
+void test__f_type_array_int128s_adjust__parameter_checking(void **state) {
const int length = 5;
f_int128s_t data = f_int128s_t_initialize;
{
- const f_status_t status = f_int128s_adjust(length, &data);
+ const f_status_t status = f_int128s_adjust(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_int128s_adjust__parameter_checking(void **state) {
+void test__f_type_array_int128s_adjust__works(void **state) {
const int length = 5;
f_int128s_t data = f_int128s_t_initialize;
{
- const f_status_t status = f_int128s_adjust(length, 0);
+ const f_status_t status = f_int128s_adjust(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__int128s_adjust
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int128s_adjust()
+ * @see f_int128s_adjust()
*/
-extern void test__f_type_array_int128s_adjust__works(void **state);
+extern void test__f_type_array_int128s_adjust__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int128s_adjust()
+ * @see f_int128s_adjust()
*/
-extern void test__f_type_array_int128s_adjust__parameter_checking(void **state);
+extern void test__f_type_array_int128s_adjust__works(void **state);
#endif // _TEST__F_type_array__int128s_adjust
extern "C" {
#endif
+void test__f_type_array_int128s_append__parameter_checking(void **state) {
+
+ const int128_t data = 0;
+
+ {
+ const f_status_t status = f_int128s_append(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
void test__f_type_array_int128s_append__works(void **state) {
const int128_t source = 3;
free((void *) destination.array);
}
-void test__f_type_array_int128s_append__parameter_checking(void **state) {
-
- const uint128_t data = 0;
-
- {
- const f_status_t status = f_int128s_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__int128s_append
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int128s_append()
+ * @see f_int128s_append()
*/
-extern void test__f_type_array_int128s_append__works(void **state);
+extern void test__f_type_array_int128s_append__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int128s_append()
+ * @see f_int128s_append()
*/
-extern void test__f_type_array_int128s_append__parameter_checking(void **state);
+extern void test__f_type_array_int128s_append__works(void **state);
#endif // _TEST__F_type_array__int128s_append
extern "C" {
#endif
-void test__f_type_array_int128s_append_all__works(void **state) {
+void test__f_type_array_int128s_append_all__parameter_checking(void **state) {
+
+ const f_int128s_t data = f_int128s_t_initialize;
+
+ {
+ const f_status_t status = f_int128s_append_all(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_int128s_append_all__returns_data_not(void **state) {
const int length = 5;
- const int length_used = 2;
f_int128s_t source = f_int128s_t_initialize;
f_int128s_t destination = f_int128s_t_initialize;
assert_int_equal(source.size, length);
}
- for (; source.used < length_used; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
{
const f_status_t status = f_int128s_append_all(source, &destination);
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_array_length_t i = 0; i < source.used; ++i) {
- assert_int_equal(destination.array[i], i + 1);
- } // for
+ 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);
- free((void *) destination.array);
}
-void test__f_type_array_int128s_append_all__returns_data_not(void **state) {
+void test__f_type_array_int128s_append_all__works(void **state) {
const int length = 5;
+ const int length_used = 2;
f_int128s_t source = f_int128s_t_initialize;
f_int128s_t destination = f_int128s_t_initialize;
assert_int_equal(source.size, length);
}
+ for (; source.used < length_used; ++source.used) {
+ source.array[source.used] = source.used + 1;
+ } // for
+
{
const f_status_t status = f_int128s_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);
+ assert_int_equal(status, F_none);
+ assert_int_equal(destination.used, source.used);
+ assert_int_equal(destination.size, source.used);
+
+ for (f_array_length_t i = 0; i < source.used; ++i) {
+ assert_int_equal(destination.array[i], i + 1);
+ } // for
}
free((void *) source.array);
-}
-
-void test__f_type_array_int128s_append_all__parameter_checking(void **state) {
-
- const f_int128s_t data = f_int128s_t_initialize;
-
- {
- const f_status_t status = f_int128s_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
+ free((void *) destination.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__int128s_append_all
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int128s_append_all()
+ * @see f_int128s_append_all()
*/
-extern void test__f_type_array_int128s_append_all__works(void **state);
+extern void test__f_type_array_int128s_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 returns F_data_not.
*
- * @see f_type_array_int128s_append_all()
+ * @see f_int128s_append_all()
*/
extern void test__f_type_array_int128s_append_all__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int128s_append_all()
+ * @see f_int128s_append_all()
*/
-extern void test__f_type_array_int128s_append_all__parameter_checking(void **state);
+extern void test__f_type_array_int128s_append_all__works(void **state);
#endif // _TEST__F_type_array__int128s_append_all
extern "C" {
#endif
-void test__f_type_array_int128s_decimate_by__works(void **state) {
+void test__f_type_array_int128s_decimate_by__parameter_checking(void **state) {
const int length = 5;
f_int128s_t data = f_int128s_t_initialize;
{
- const f_status_t status = f_int128s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int128s_decimate_by(length, &data);
+ const f_status_t status = f_int128s_decimate_by(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
assert_null(data.array);
}
-void test__f_type_array_int128s_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_int128s_decimate_by__works(void **state) {
const int length = 5;
f_int128s_t data = f_int128s_t_initialize;
{
- const f_status_t status = f_int128s_decimate_by(length, 0);
+ const f_status_t status = f_int128s_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_int128s_decimate_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__int128s_decimate_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int128s_decimate_by()
+ * @see f_int128s_decimate_by()
*/
-extern void test__f_type_array_int128s_decimate_by__works(void **state);
+extern void test__f_type_array_int128s_decimate_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int128s_decimate_by()
+ * @see f_int128s_decimate_by()
*/
-extern void test__f_type_array_int128s_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_int128s_decimate_by__works(void **state);
#endif // _TEST__F_type_array__int128s_decimate_by
extern "C" {
#endif
-void test__f_type_array_int128s_decrease_by__works(void **state) {
+void test__f_type_array_int128s_decrease_by__parameter_checking(void **state) {
const int length = 5;
f_int128s_t data = f_int128s_t_initialize;
{
- const f_status_t status = f_int128s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int128s_decrease_by(length, &data);
+ const f_status_t status = f_int128s_decrease_by(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
assert_null(data.array);
}
-void test__f_type_array_int128s_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_int128s_decrease_by__works(void **state) {
const int length = 5;
f_int128s_t data = f_int128s_t_initialize;
{
- const f_status_t status = f_int128s_decrease_by(length, 0);
+ const f_status_t status = f_int128s_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_int128s_decrease_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__int128s_decrease_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int128s_decrease_by()
+ * @see f_int128s_decrease_by()
*/
-extern void test__f_type_array_int128s_decrease_by__works(void **state);
+extern void test__f_type_array_int128s_decrease_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int128s_decrease_by()
+ * @see f_int128s_decrease_by()
*/
-extern void test__f_type_array_int128s_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_int128s_decrease_by__works(void **state);
#endif // _TEST__F_type_array__int128s_decrease_by
extern "C" {
#endif
-void test__f_type_array_int128s_increase__works(void **state) {
+void test__f_type_array_int128s_increase__parameter_checking(void **state) {
const int length = 5;
f_int128s_t data = f_int128s_t_initialize;
{
- const f_status_t status = f_int128s_resize(length, &data);
+ const f_status_t status = f_int128s_increase(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_int128s_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ assert_int_equal(data.size, 0);
}
free((void *) data.array);
free((void *) data.array);
}
-void test__f_type_array_int128s_increase__parameter_checking(void **state) {
+void test__f_type_array_int128s_increase__works(void **state) {
const int length = 5;
f_int128s_t data = f_int128s_t_initialize;
{
- const f_status_t status = f_int128s_increase(length, 0);
+ const f_status_t status = f_int128s_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_int128s_increase(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
}
free((void *) data.array);
#define _TEST__F_type_array__int128s_increase
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int128s_increase()
+ * @see f_int128s_increase()
*/
-extern void test__f_type_array_int128s_increase__works(void **state);
+extern void test__f_type_array_int128s_increase__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_int128s_increase()
+ * @see f_int128s_increase()
*/
extern void test__f_type_array_int128s_increase__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int128s_increase()
+ * @see f_int128s_increase()
*/
-extern void test__f_type_array_int128s_increase__parameter_checking(void **state);
+extern void test__f_type_array_int128s_increase__works(void **state);
#endif // _TEST__F_type_array__int128s_increase
extern "C" {
#endif
+void test__f_type_array_int128s_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_int128s_t data = f_int128s_t_initialize;
+
+ {
+ const f_status_t status = f_int128s_increase_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
void test__f_type_array_int128s_increase_by__works(void **state) {
const int length = 5;
free((void *) data.array);
}
-void test__f_type_array_int128s_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_int128s_t data = f_int128s_t_initialize;
-
- {
- const f_status_t status = f_int128s_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__int128s_increase_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int128s_increase_by()
+ * @see f_int128s_increase_by()
*/
-extern void test__f_type_array_int128s_increase_by__works(void **state);
+extern void test__f_type_array_int128s_increase_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int128s_increase_by()
+ * @see f_int128s_increase_by()
*/
-extern void test__f_type_array_int128s_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_int128s_increase_by__works(void **state);
#endif // _TEST__F_type_array__int128s_increase_by
extern "C" {
#endif
-void test__f_type_array_int128s_resize__works(void **state) {
+void test__f_type_array_int128s_resize__parameter_checking(void **state) {
const int length = 5;
f_int128s_t data = f_int128s_t_initialize;
{
- const f_status_t status = f_int128s_resize(length, &data);
+ const f_status_t status = f_int128s_resize(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_int128s_resize__parameter_checking(void **state) {
+void test__f_type_array_int128s_resize__works(void **state) {
const int length = 5;
f_int128s_t data = f_int128s_t_initialize;
{
- const f_status_t status = f_int128s_resize(length, 0);
+ const f_status_t status = f_int128s_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__int128s_resize
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int128s_resize()
+ * @see f_int128s_resize()
*/
-extern void test__f_type_array_int128s_resize__works(void **state);
+extern void test__f_type_array_int128s_resize__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int128s_resize()
+ * @see f_int128s_resize()
*/
-extern void test__f_type_array_int128s_resize__parameter_checking(void **state);
+extern void test__f_type_array_int128s_resize__works(void **state);
#endif // _TEST__F_type_array__int128s_resize
extern "C" {
#endif
-void test__f_type_array_int128ss_adjust__works(void **state) {
+void test__f_type_array_int128ss_adjust__parameter_checking(void **state) {
const int length = 5;
f_int128ss_t data = f_int128ss_t_initialize;
{
- const f_status_t status = f_int128ss_adjust(length, &data);
+ const f_status_t status = f_int128ss_adjust(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_int128ss_adjust__parameter_checking(void **state) {
+void test__f_type_array_int128ss_adjust__works(void **state) {
const int length = 5;
f_int128ss_t data = f_int128ss_t_initialize;
{
- const f_status_t status = f_int128ss_adjust(length, 0);
+ const f_status_t status = f_int128ss_adjust(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__int128ss_adjust
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int128ss_adjust()
+ * @see f_int128ss_adjust()
*/
-extern void test__f_type_array_int128ss_adjust__works(void **state);
+extern void test__f_type_array_int128ss_adjust__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int128ss_adjust()
+ * @see f_int128ss_adjust()
*/
-extern void test__f_type_array_int128ss_adjust__parameter_checking(void **state);
+extern void test__f_type_array_int128ss_adjust__works(void **state);
#endif // _TEST__F_type_array__int128ss_adjust
extern "C" {
#endif
-void test__f_type_array_int128ss_append__works(void **state) {
+void test__f_type_array_int128ss_append__parameter_checking(void **state) {
+
+ f_int128s_t data = f_int128s_t_initialize;
+
+ {
+ const f_status_t status = f_int128ss_append(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_int128ss_append__returns_data_not(void **state) {
const int length = 5;
f_int128s_t source = f_int128s_t_initialize;
assert_int_equal(source.size, length);
}
- for (; source.used < length; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
{
const f_status_t status = f_int128ss_append(source, &destination);
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0].used, source.used);
- assert_int_equal(destination.array[0].size, source.used);
-
- for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
- assert_int_equal(destination.array[0].array[i], i + 1);
- } // for
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(destination.used, 0);
+ assert_int_equal(destination.size, 0);
+ assert_null(destination.array);
}
- for (f_array_length_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
free((void *) source.array);
- free((void *) destination.array);
}
-void test__f_type_array_int128ss_append__returns_data_not(void **state) {
+void test__f_type_array_int128ss_append__works(void **state) {
const int length = 5;
f_int128s_t source = f_int128s_t_initialize;
assert_int_equal(source.size, length);
}
+ for (; source.used < length; ++source.used) {
+ source.array[source.used] = source.used + 1;
+ } // for
+
{
const f_status_t status = f_int128ss_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_type_array_int128ss_append__parameter_checking(void **state) {
+ assert_int_equal(status, F_none);
+ assert_int_equal(destination.used, 1);
+ assert_int_equal(destination.array[0].used, source.used);
+ assert_int_equal(destination.array[0].size, source.used);
- f_int128s_t data = f_int128s_t_initialize;
+ for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
+ assert_int_equal(destination.array[0].array[i], i + 1);
+ } // for
+ }
- {
- const f_status_t status = f_int128ss_append(data, 0);
+ for (f_array_length_t i = 0; i < destination.used; ++i) {
+ free((void *) destination.array[i].array);
+ } // for
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
+ free((void *) source.array);
+ free((void *) destination.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__int128ss_append
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int128ss_append()
+ * @see f_int128ss_append()
*/
-extern void test__f_type_array_int128ss_append__works(void **state);
+extern void test__f_type_array_int128ss_append__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_int128ss_append()
+ * @see f_int128ss_append()
*/
extern void test__f_type_array_int128ss_append__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int128ss_append()
+ * @see f_int128ss_append()
*/
-extern void test__f_type_array_int128ss_append__parameter_checking(void **state);
+extern void test__f_type_array_int128ss_append__works(void **state);
#endif // _TEST__F_type_array__int128ss_append
extern "C" {
#endif
+void test__f_type_array_int128ss_append_all__parameter_checking(void **state) {
+
+ const f_int128ss_t data = f_int128ss_t_initialize;
+
+ {
+ const f_status_t status = f_int128ss_append_all(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_int128ss_append_all__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_int128ss_t source = f_int128ss_t_initialize;
+ f_int128ss_t destination = f_int128ss_t_initialize;
+
+ {
+ const f_status_t status = f_int128ss_resize(length, &source);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(source.used, 0);
+ assert_int_equal(source.size, length);
+ }
+
+ {
+ const f_status_t status = f_int128ss_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_type_array_int128ss_append_all__works(void **state) {
const int length = 5;
free((void *) destination.array);
}
-void test__f_type_array_int128ss_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_int128ss_t source = f_int128ss_t_initialize;
- f_int128ss_t destination = f_int128ss_t_initialize;
-
- {
- const f_status_t status = f_int128ss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_int128ss_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_type_array_int128ss_append_all__parameter_checking(void **state) {
-
- const f_int128ss_t data = f_int128ss_t_initialize;
-
- {
- const f_status_t status = f_int128ss_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__int128ss_append_all
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int128ss_append_all()
+ * @see f_int128ss_append_all()
*/
-extern void test__f_type_array_int128ss_append_all__works(void **state);
+extern void test__f_type_array_int128ss_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 returns F_data_not.
*
- * @see f_type_array_int128ss_append_all()
+ * @see f_int128ss_append_all()
*/
extern void test__f_type_array_int128ss_append_all__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int128ss_append_all()
+ * @see f_int128ss_append_all()
*/
-extern void test__f_type_array_int128ss_append_all__parameter_checking(void **state);
+extern void test__f_type_array_int128ss_append_all__works(void **state);
#endif // _TEST__F_type_array__int128ss_append_all
extern "C" {
#endif
-void test__f_type_array_int128ss_decimate_by__works(void **state) {
+void test__f_type_array_int128ss_decimate_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_int128ss_t data = f_int128ss_t_initialize;
+
+ {
+ const f_status_t status = f_int128ss_decimate_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_int128ss_decimate_by__returns_data_not(void **state) {
const int length = 5;
- f_int128ss_t data = f_int128s_t_initialize;
+ f_int128ss_t data = f_int128ss_t_initialize;
{
const f_status_t status = f_int128ss_resize(length, &data);
}
{
- const f_status_t status = f_int128ss_decimate_by(length, &data);
+ const f_status_t status = f_int128ss_decimate_by(0, &data);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_data_not);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
-void test__f_type_array_int128ss_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_int128ss_decimate_by__works(void **state) {
const int length = 5;
- f_int128ss_t data = f_int128s_t_initialize;
+ f_int128ss_t data = f_int128ss_t_initialize;
{
- const f_status_t status = f_int128ss_decimate_by(length, 0);
+ const f_status_t status = f_int128ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_int128ss_decimate_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__int128ss_decimate_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int128ss_decimate_by()
+ * @see f_int128ss_decimate_by()
*/
-extern void test__f_type_array_int128ss_decimate_by__works(void **state);
+extern void test__f_type_array_int128ss_decimate_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
* @see f_type_array_int128ss_decimate_by()
*/
-extern void test__f_type_array_int128ss_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_int128ss_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int128ss_decimate_by()
+ */
+extern void test__f_type_array_int128ss_decimate_by__works(void **state);
#endif // _TEST__F_type_array__int128ss_decimate_by
extern "C" {
#endif
-void test__f_type_array_int128ss_decrease_by__works(void **state) {
+void test__f_type_array_int128ss_decrease_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_int128ss_t data = f_int128ss_t_initialize;
+
+ {
+ const f_status_t status = f_int128ss_decrease_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_int128ss_decrease_by__returns_data_not(void **state) {
const int length = 5;
- f_int128ss_t data = f_int128s_t_initialize;
+ f_int128ss_t data = f_int128ss_t_initialize;
{
const f_status_t status = f_int128ss_resize(length, &data);
}
{
- const f_status_t status = f_int128ss_decrease_by(length, &data);
+ const f_status_t status = f_int128ss_decrease_by(0, &data);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_data_not);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
-void test__f_type_array_int128ss_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_int128ss_decrease_by__works(void **state) {
const int length = 5;
- f_int128ss_t data = f_int128s_t_initialize;
+ f_int128ss_t data = f_int128ss_t_initialize;
{
- const f_status_t status = f_int128ss_decrease_by(length, 0);
+ const f_status_t status = f_int128ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_int128ss_decrease_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__int128ss_decrease_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int128ss_decrease_by()
+ * @see f_int128ss_decrease_by()
*/
-extern void test__f_type_array_int128ss_decrease_by__works(void **state);
+extern void test__f_type_array_int128ss_decrease_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_int128ss_decrease_by()
+ * @see f_int128ss_decrease_by()
*/
-extern void test__f_type_array_int128ss_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_int128ss_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int128ss_decrease_by()
+ */
+extern void test__f_type_array_int128ss_decrease_by__works(void **state);
#endif // _TEST__F_type_array__int128ss_decrease_by
extern "C" {
#endif
-void test__f_type_array_int128ss_increase__works(void **state) {
+void test__f_type_array_int128ss_increase__parameter_checking(void **state) {
const int length = 5;
- f_int128ss_t data = f_int128s_t_initialize;
+ f_int128ss_t data = f_int128ss_t_initialize;
{
- const f_status_t status = f_int128ss_resize(length, &data);
+ const f_status_t status = f_int128ss_increase(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_int128ss_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ assert_int_equal(data.size, 0);
}
free((void *) data.array);
void test__f_type_array_int128ss_increase__returns_data_not(void **state) {
const int length = 5;
- f_int128ss_t data = f_int128s_t_initialize;
+ f_int128ss_t data = f_int128ss_t_initialize;
{
const f_status_t status = f_int128ss_resize(length, &data);
free((void *) data.array);
}
-void test__f_type_array_int128ss_increase__parameter_checking(void **state) {
+void test__f_type_array_int128ss_increase__works(void **state) {
const int length = 5;
- f_int128ss_t data = f_int128s_t_initialize;
+ f_int128ss_t data = f_int128ss_t_initialize;
{
- const f_status_t status = f_int128ss_increase(length, 0);
+ const f_status_t status = f_int128ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_int128ss_increase(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
}
free((void *) data.array);
#define _TEST__F_type_array__int128ss_increase
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int128ss_increase()
+ * @see f_int128ss_increase()
*/
-extern void test__f_type_array_int128ss_increase__works(void **state);
+extern void test__f_type_array_int128ss_increase__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_int128ss_increase()
+ * @see f_int128ss_increase()
*/
extern void test__f_type_array_int128ss_increase__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int128ss_increase()
+ * @see f_int128ss_increase()
*/
-extern void test__f_type_array_int128ss_increase__parameter_checking(void **state);
+extern void test__f_type_array_int128ss_increase__works(void **state);
#endif // _TEST__F_type_array__int128ss_increase
extern "C" {
#endif
-void test__f_type_array_int128ss_increase_by__works(void **state) {
+void test__f_type_array_int128ss_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_int128ss_t data = f_int128ss_t_initialize;
+
+ {
+ const f_status_t status = f_int128ss_increase_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_int128ss_increase_by__returns_data_not(void **state) {
const int length = 5;
- f_int128ss_t data = f_int128s_t_initialize;
+ f_int128ss_t data = f_int128ss_t_initialize;
{
const f_status_t status = f_int128ss_resize(length, &data);
}
{
- data.used = length;
+ const f_status_t status = f_int128ss_increase_by(0, &data);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+ {
const f_status_t status = f_int128ss_increase_by(length, &data);
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
}
free((void *) data.array);
}
-void test__f_type_array_int128ss_increase_by__parameter_checking(void **state) {
+void test__f_type_array_int128ss_increase_by__works(void **state) {
const int length = 5;
- f_int128ss_t data = f_int128s_t_initialize;
+ f_int128ss_t data = f_int128ss_t_initialize;
{
- const f_status_t status = f_int128ss_increase_by(length, 0);
+ const f_status_t status = f_int128ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ {
+ data.used = length;
+
+ const f_status_t status = f_int128ss_increase_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_int_equal(data.size, length * 2);
+ }
+
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__int128ss_increase_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int128ss_increase_by()
+ * @see f_int128ss_increase_by()
*/
-extern void test__f_type_array_int128ss_increase_by__works(void **state);
+extern void test__f_type_array_int128ss_increase_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_int128ss_increase_by()
+ * @see f_int128ss_increase_by()
*/
-extern void test__f_type_array_int128ss_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_int128ss_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int128ss_increase_by()
+ */
+extern void test__f_type_array_int128ss_increase_by__works(void **state);
#endif // _TEST__F_type_array__int128ss_increase_by
extern "C" {
#endif
-void test__f_type_array_int128ss_resize__works(void **state) {
+void test__f_type_array_int128ss_resize__parameter_checking(void **state) {
const int length = 5;
f_int128ss_t data = f_int128ss_t_initialize;
{
- const f_status_t status = f_int128ss_resize(length, &data);
+ const f_status_t status = f_int128ss_resize(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_int128ss_resize__parameter_checking(void **state) {
+void test__f_type_array_int128ss_resize__works(void **state) {
const int length = 5;
f_int128ss_t data = f_int128ss_t_initialize;
{
- const f_status_t status = f_int128ss_resize(length, 0);
+ const f_status_t status = f_int128ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__int128ss_resize
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int128ss_resize()
+ * @see f_int128ss_resize()
*/
-extern void test__f_type_array_int128ss_resize__works(void **state);
+extern void test__f_type_array_int128ss_resize__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int128ss_resize()
+ * @see f_int128ss_resize()
*/
-extern void test__f_type_array_int128ss_resize__parameter_checking(void **state);
+extern void test__f_type_array_int128ss_resize__works(void **state);
#endif // _TEST__F_type_array__int128ss_resize
extern "C" {
#endif
-void test__f_type_array_int16s_adjust__works(void **state) {
+void test__f_type_array_int16s_adjust__parameter_checking(void **state) {
const int length = 5;
f_int16s_t data = f_int16s_t_initialize;
{
- const f_status_t status = f_int16s_adjust(length, &data);
+ const f_status_t status = f_int16s_adjust(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_int16s_adjust__parameter_checking(void **state) {
+void test__f_type_array_int16s_adjust__works(void **state) {
const int length = 5;
f_int16s_t data = f_int16s_t_initialize;
{
- const f_status_t status = f_int16s_adjust(length, 0);
+ const f_status_t status = f_int16s_adjust(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__int16s_adjust
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int16s_adjust()
+ * @see f_int16s_adjust()
*/
-extern void test__f_type_array_int16s_adjust__works(void **state);
+extern void test__f_type_array_int16s_adjust__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int16s_adjust()
+ * @see f_int16s_adjust()
*/
-extern void test__f_type_array_int16s_adjust__parameter_checking(void **state);
+extern void test__f_type_array_int16s_adjust__works(void **state);
#endif // _TEST__F_type_array__int16s_adjust
extern "C" {
#endif
+void test__f_type_array_int16s_append__parameter_checking(void **state) {
+
+ const int16_t data = 0;
+
+ {
+ const f_status_t status = f_int16s_append(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
void test__f_type_array_int16s_append__works(void **state) {
- const uint16_t source = 3;
+ const int16_t source = 3;
f_int16s_t destination = f_int16s_t_initialize;
{
free((void *) destination.array);
}
-void test__f_type_array_int16s_append__parameter_checking(void **state) {
-
- const uint16_t data = 0;
-
- {
- const f_status_t status = f_int16s_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__int16s_append
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int16s_append()
+ * @see f_int16s_append()
*/
-extern void test__f_type_array_int16s_append__works(void **state);
+extern void test__f_type_array_int16s_append__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int16s_append()
+ * @see f_int16s_append()
*/
-extern void test__f_type_array_int16s_append__parameter_checking(void **state);
+extern void test__f_type_array_int16s_append__works(void **state);
#endif // _TEST__F_type_array__int16s_append
extern "C" {
#endif
-void test__f_type_array_int16s_append_all__works(void **state) {
+void test__f_type_array_int16s_append_all__parameter_checking(void **state) {
+
+ const f_int16s_t data = f_int16s_t_initialize;
+
+ {
+ const f_status_t status = f_int16s_append_all(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_int16s_append_all__returns_data_not(void **state) {
const int length = 5;
- const int length_used = 2;
f_int16s_t source = f_int16s_t_initialize;
f_int16s_t destination = f_int16s_t_initialize;
assert_int_equal(source.size, length);
}
- for (; source.used < length_used; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
{
const f_status_t status = f_int16s_append_all(source, &destination);
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_array_length_t i = 0; i < source.used; ++i) {
- assert_int_equal(destination.array[i], i + 1);
- } // for
+ 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);
- free((void *) destination.array);
}
-void test__f_type_array_int16s_append_all__returns_data_not(void **state) {
+void test__f_type_array_int16s_append_all__works(void **state) {
const int length = 5;
+ const int length_used = 2;
f_int16s_t source = f_int16s_t_initialize;
f_int16s_t destination = f_int16s_t_initialize;
assert_int_equal(source.size, length);
}
+ for (; source.used < length_used; ++source.used) {
+ source.array[source.used] = source.used + 1;
+ } // for
+
{
const f_status_t status = f_int16s_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);
+ assert_int_equal(status, F_none);
+ assert_int_equal(destination.used, source.used);
+ assert_int_equal(destination.size, source.used);
+
+ for (f_array_length_t i = 0; i < source.used; ++i) {
+ assert_int_equal(destination.array[i], i + 1);
+ } // for
}
free((void *) source.array);
-}
-
-void test__f_type_array_int16s_append_all__parameter_checking(void **state) {
-
- const f_int16s_t data = f_int16s_t_initialize;
-
- {
- const f_status_t status = f_int16s_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
+ free((void *) destination.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__int16s_append_all
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int16s_append_all()
+ * @see f_int16s_append_all()
*/
-extern void test__f_type_array_int16s_append_all__works(void **state);
+extern void test__f_type_array_int16s_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 returns F_data_not.
*
- * @see f_type_array_int16s_append_all()
+ * @see f_int16s_append_all()
*/
extern void test__f_type_array_int16s_append_all__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int16s_append_all()
+ * @see f_int16s_append_all()
*/
-extern void test__f_type_array_int16s_append_all__parameter_checking(void **state);
+extern void test__f_type_array_int16s_append_all__works(void **state);
#endif // _TEST__F_type_array__int16s_append_all
extern "C" {
#endif
-void test__f_type_array_int16s_decimate_by__works(void **state) {
+void test__f_type_array_int16s_decimate_by__parameter_checking(void **state) {
const int length = 5;
f_int16s_t data = f_int16s_t_initialize;
{
- const f_status_t status = f_int16s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int16s_decimate_by(length, &data);
+ const f_status_t status = f_int16s_decimate_by(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
assert_null(data.array);
}
-void test__f_type_array_int16s_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_int16s_decimate_by__works(void **state) {
const int length = 5;
f_int16s_t data = f_int16s_t_initialize;
{
- const f_status_t status = f_int16s_decimate_by(length, 0);
+ const f_status_t status = f_int16s_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_int16s_decimate_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__int16s_decimate_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int16s_decimate_by()
+ * @see f_int16s_decimate_by()
*/
-extern void test__f_type_array_int16s_decimate_by__works(void **state);
+extern void test__f_type_array_int16s_decimate_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int16s_decimate_by()
+ * @see f_int16s_decimate_by()
*/
-extern void test__f_type_array_int16s_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_int16s_decimate_by__works(void **state);
#endif // _TEST__F_type_array__int16s_decimate_by
extern "C" {
#endif
-void test__f_type_array_int16s_decrease_by__works(void **state) {
+void test__f_type_array_int16s_decrease_by__parameter_checking(void **state) {
const int length = 5;
f_int16s_t data = f_int16s_t_initialize;
{
- const f_status_t status = f_int16s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int16s_decrease_by(length, &data);
+ const f_status_t status = f_int16s_decrease_by(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
assert_null(data.array);
}
-void test__f_type_array_int16s_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_int16s_decrease_by__works(void **state) {
const int length = 5;
f_int16s_t data = f_int16s_t_initialize;
{
- const f_status_t status = f_int16s_decrease_by(length, 0);
+ const f_status_t status = f_int16s_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_int16s_decrease_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__int16s_decrease_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int16s_decrease_by()
+ * @see f_int16s_decrease_by()
*/
-extern void test__f_type_array_int16s_decrease_by__works(void **state);
+extern void test__f_type_array_int16s_decrease_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int16s_decrease_by()
+ * @see f_int16s_decrease_by()
*/
-extern void test__f_type_array_int16s_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_int16s_decrease_by__works(void **state);
#endif // _TEST__F_type_array__int16s_decrease_by
extern "C" {
#endif
-void test__f_type_array_int16s_increase__works(void **state) {
+void test__f_type_array_int16s_increase__parameter_checking(void **state) {
const int length = 5;
f_int16s_t data = f_int16s_t_initialize;
{
- const f_status_t status = f_int16s_resize(length, &data);
+ const f_status_t status = f_int16s_increase(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_int16s_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ assert_int_equal(data.size, 0);
}
free((void *) data.array);
free((void *) data.array);
}
-void test__f_type_array_int16s_increase__parameter_checking(void **state) {
+void test__f_type_array_int16s_increase__works(void **state) {
const int length = 5;
f_int16s_t data = f_int16s_t_initialize;
{
- const f_status_t status = f_int16s_increase(length, 0);
+ const f_status_t status = f_int16s_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_int16s_increase(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
}
free((void *) data.array);
#define _TEST__F_type_array__int16s_increase
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int16s_increase()
+ * @see f_int16s_increase()
*/
-extern void test__f_type_array_int16s_increase__works(void **state);
+extern void test__f_type_array_int16s_increase__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_int16s_increase()
+ * @see f_int16s_increase()
*/
extern void test__f_type_array_int16s_increase__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int16s_increase()
+ * @see f_int16s_increase()
*/
-extern void test__f_type_array_int16s_increase__parameter_checking(void **state);
+extern void test__f_type_array_int16s_increase__works(void **state);
#endif // _TEST__F_type_array__int16s_increase
extern "C" {
#endif
+void test__f_type_array_int16s_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_int16s_t data = f_int16s_t_initialize;
+
+ {
+ const f_status_t status = f_int16s_increase_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
void test__f_type_array_int16s_increase_by__works(void **state) {
const int length = 5;
free((void *) data.array);
}
-void test__f_type_array_int16s_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_int16s_t data = f_int16s_t_initialize;
-
- {
- const f_status_t status = f_int16s_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__int16s_increase_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int16s_increase_by()
+ * @see f_int16s_increase_by()
*/
-extern void test__f_type_array_int16s_increase_by__works(void **state);
+extern void test__f_type_array_int16s_increase_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int16s_increase_by()
+ * @see f_int16s_increase_by()
*/
-extern void test__f_type_array_int16s_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_int16s_increase_by__works(void **state);
#endif // _TEST__F_type_array__int16s_increase_by
extern "C" {
#endif
-void test__f_type_array_int16s_resize__works(void **state) {
+void test__f_type_array_int16s_resize__parameter_checking(void **state) {
const int length = 5;
f_int16s_t data = f_int16s_t_initialize;
{
- const f_status_t status = f_int16s_resize(length, &data);
+ const f_status_t status = f_int16s_resize(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_int16s_resize__parameter_checking(void **state) {
+void test__f_type_array_int16s_resize__works(void **state) {
const int length = 5;
f_int16s_t data = f_int16s_t_initialize;
{
- const f_status_t status = f_int16s_resize(length, 0);
+ const f_status_t status = f_int16s_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__int16s_resize
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int16s_resize()
+ * @see f_int16s_resize()
*/
-extern void test__f_type_array_int16s_resize__works(void **state);
+extern void test__f_type_array_int16s_resize__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int16s_resize()
+ * @see f_int16s_resize()
*/
-extern void test__f_type_array_int16s_resize__parameter_checking(void **state);
+extern void test__f_type_array_int16s_resize__works(void **state);
#endif // _TEST__F_type_array__int16s_resize
extern "C" {
#endif
-void test__f_type_array_int16ss_adjust__works(void **state) {
+void test__f_type_array_int16ss_adjust__parameter_checking(void **state) {
const int length = 5;
f_int16ss_t data = f_int16ss_t_initialize;
{
- const f_status_t status = f_int16ss_adjust(length, &data);
+ const f_status_t status = f_int16ss_adjust(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_int16ss_adjust__parameter_checking(void **state) {
+void test__f_type_array_int16ss_adjust__works(void **state) {
const int length = 5;
f_int16ss_t data = f_int16ss_t_initialize;
{
- const f_status_t status = f_int16ss_adjust(length, 0);
+ const f_status_t status = f_int16ss_adjust(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__int16ss_adjust
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int16ss_adjust()
+ * @see f_int16ss_adjust()
*/
-extern void test__f_type_array_int16ss_adjust__works(void **state);
+extern void test__f_type_array_int16ss_adjust__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int16ss_adjust()
+ * @see f_int16ss_adjust()
*/
-extern void test__f_type_array_int16ss_adjust__parameter_checking(void **state);
+extern void test__f_type_array_int16ss_adjust__works(void **state);
#endif // _TEST__F_type_array__int16ss_adjust
extern "C" {
#endif
-void test__f_type_array_int16ss_append__works(void **state) {
+void test__f_type_array_int16ss_append__parameter_checking(void **state) {
+
+ f_int16s_t data = f_int16s_t_initialize;
+
+ {
+ const f_status_t status = f_int16ss_append(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_int16ss_append__returns_data_not(void **state) {
const int length = 5;
f_int16s_t source = f_int16s_t_initialize;
assert_int_equal(source.size, length);
}
- for (; source.used < length; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
{
const f_status_t status = f_int16ss_append(source, &destination);
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0].used, source.used);
- assert_int_equal(destination.array[0].size, source.used);
-
- for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
- assert_int_equal(destination.array[0].array[i], i + 1);
- } // for
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(destination.used, 0);
+ assert_int_equal(destination.size, 0);
+ assert_null(destination.array);
}
- for (f_array_length_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
free((void *) source.array);
- free((void *) destination.array);
}
-void test__f_type_array_int16ss_append__returns_data_not(void **state) {
+void test__f_type_array_int16ss_append__works(void **state) {
const int length = 5;
f_int16s_t source = f_int16s_t_initialize;
assert_int_equal(source.size, length);
}
+ for (; source.used < length; ++source.used) {
+ source.array[source.used] = source.used + 1;
+ } // for
+
{
const f_status_t status = f_int16ss_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_type_array_int16ss_append__parameter_checking(void **state) {
+ assert_int_equal(status, F_none);
+ assert_int_equal(destination.used, 1);
+ assert_int_equal(destination.array[0].used, source.used);
+ assert_int_equal(destination.array[0].size, source.used);
- f_int16s_t data = f_int16s_t_initialize;
+ for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
+ assert_int_equal(destination.array[0].array[i], i + 1);
+ } // for
+ }
- {
- const f_status_t status = f_int16ss_append(data, 0);
+ for (f_array_length_t i = 0; i < destination.used; ++i) {
+ free((void *) destination.array[i].array);
+ } // for
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
+ free((void *) source.array);
+ free((void *) destination.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__int16ss_append
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int16ss_append()
+ * @see f_int16ss_append()
*/
-extern void test__f_type_array_int16ss_append__works(void **state);
+extern void test__f_type_array_int16ss_append__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_int16ss_append()
+ * @see f_int16ss_append()
*/
extern void test__f_type_array_int16ss_append__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int16ss_append()
+ * @see f_int16ss_append()
*/
-extern void test__f_type_array_int16ss_append__parameter_checking(void **state);
+extern void test__f_type_array_int16ss_append__works(void **state);
#endif // _TEST__F_type_array__int16ss_append
extern "C" {
#endif
+void test__f_type_array_int16ss_append_all__parameter_checking(void **state) {
+
+ const f_int16ss_t data = f_int16ss_t_initialize;
+
+ {
+ const f_status_t status = f_int16ss_append_all(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_int16ss_append_all__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_int16ss_t source = f_int16ss_t_initialize;
+ f_int16ss_t destination = f_int16ss_t_initialize;
+
+ {
+ const f_status_t status = f_int16ss_resize(length, &source);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(source.used, 0);
+ assert_int_equal(source.size, length);
+ }
+
+ {
+ const f_status_t status = f_int16ss_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_type_array_int16ss_append_all__works(void **state) {
const int length = 5;
free((void *) destination.array);
}
-void test__f_type_array_int16ss_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_int16ss_t source = f_int16ss_t_initialize;
- f_int16ss_t destination = f_int16ss_t_initialize;
-
- {
- const f_status_t status = f_int16ss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_int16ss_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_type_array_int16ss_append_all__parameter_checking(void **state) {
-
- const f_int16ss_t data = f_int16ss_t_initialize;
-
- {
- const f_status_t status = f_int16ss_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__int16ss_append_all
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int16ss_append_all()
+ * @see f_int16ss_append_all()
*/
-extern void test__f_type_array_int16ss_append_all__works(void **state);
+extern void test__f_type_array_int16ss_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 returns F_data_not.
*
- * @see f_type_array_int16ss_append_all()
+ * @see f_int16ss_append_all()
*/
extern void test__f_type_array_int16ss_append_all__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int16ss_append_all()
+ * @see f_int16ss_append_all()
*/
-extern void test__f_type_array_int16ss_append_all__parameter_checking(void **state);
+extern void test__f_type_array_int16ss_append_all__works(void **state);
#endif // _TEST__F_type_array__int16ss_append_all
extern "C" {
#endif
-void test__f_type_array_int16ss_decimate_by__works(void **state) {
+void test__f_type_array_int16ss_decimate_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_int16ss_t data = f_int16ss_t_initialize;
+
+ {
+ const f_status_t status = f_int16ss_decimate_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_int16ss_decimate_by__returns_data_not(void **state) {
const int length = 5;
- f_int16ss_t data = f_int16s_t_initialize;
+ f_int16ss_t data = f_int16ss_t_initialize;
{
const f_status_t status = f_int16ss_resize(length, &data);
}
{
- const f_status_t status = f_int16ss_decimate_by(length, &data);
+ const f_status_t status = f_int16ss_decimate_by(0, &data);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_data_not);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
-void test__f_type_array_int16ss_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_int16ss_decimate_by__works(void **state) {
const int length = 5;
- f_int16ss_t data = f_int16s_t_initialize;
+ f_int16ss_t data = f_int16ss_t_initialize;
{
- const f_status_t status = f_int16ss_decimate_by(length, 0);
+ const f_status_t status = f_int16ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_int16ss_decimate_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__int16ss_decimate_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int16ss_decimate_by()
+ * @see f_int16ss_decimate_by()
*/
-extern void test__f_type_array_int16ss_decimate_by__works(void **state);
+extern void test__f_type_array_int16ss_decimate_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
* @see f_type_array_int16ss_decimate_by()
*/
-extern void test__f_type_array_int16ss_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_int16ss_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int16ss_decimate_by()
+ */
+extern void test__f_type_array_int16ss_decimate_by__works(void **state);
#endif // _TEST__F_type_array__int16ss_decimate_by
extern "C" {
#endif
-void test__f_type_array_int16ss_decrease_by__works(void **state) {
+void test__f_type_array_int16ss_decrease_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_int16ss_t data = f_int16ss_t_initialize;
+
+ {
+ const f_status_t status = f_int16ss_decrease_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_int16ss_decrease_by__returns_data_not(void **state) {
const int length = 5;
- f_int16ss_t data = f_int16s_t_initialize;
+ f_int16ss_t data = f_int16ss_t_initialize;
{
const f_status_t status = f_int16ss_resize(length, &data);
}
{
- const f_status_t status = f_int16ss_decrease_by(length, &data);
+ const f_status_t status = f_int16ss_decrease_by(0, &data);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_data_not);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
-void test__f_type_array_int16ss_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_int16ss_decrease_by__works(void **state) {
const int length = 5;
- f_int16ss_t data = f_int16s_t_initialize;
+ f_int16ss_t data = f_int16ss_t_initialize;
{
- const f_status_t status = f_int16ss_decrease_by(length, 0);
+ const f_status_t status = f_int16ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_int16ss_decrease_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__int16ss_decrease_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int16ss_decrease_by()
+ * @see f_int16ss_decrease_by()
*/
-extern void test__f_type_array_int16ss_decrease_by__works(void **state);
+extern void test__f_type_array_int16ss_decrease_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_int16ss_decrease_by()
+ * @see f_int16ss_decrease_by()
*/
-extern void test__f_type_array_int16ss_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_int16ss_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int16ss_decrease_by()
+ */
+extern void test__f_type_array_int16ss_decrease_by__works(void **state);
#endif // _TEST__F_type_array__int16ss_decrease_by
extern "C" {
#endif
-void test__f_type_array_int16ss_increase__works(void **state) {
+void test__f_type_array_int16ss_increase__parameter_checking(void **state) {
const int length = 5;
f_int16ss_t data = f_int16s_t_initialize;
{
- const f_status_t status = f_int16ss_resize(length, &data);
+ const f_status_t status = f_int16ss_increase(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_int16ss_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ assert_int_equal(data.size, 0);
}
free((void *) data.array);
void test__f_type_array_int16ss_increase__returns_data_not(void **state) {
const int length = 5;
- f_int16ss_t data = f_int16s_t_initialize;
+ f_int16ss_t data = f_int16ss_t_initialize;
{
const f_status_t status = f_int16ss_resize(length, &data);
free((void *) data.array);
}
-void test__f_type_array_int16ss_increase__parameter_checking(void **state) {
+void test__f_type_array_int16ss_increase__works(void **state) {
const int length = 5;
- f_int16ss_t data = f_int16s_t_initialize;
+ f_int16ss_t data = f_int16ss_t_initialize;
{
- const f_status_t status = f_int16ss_increase(length, 0);
+ const f_status_t status = f_int16ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_int16ss_increase(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
}
free((void *) data.array);
#define _TEST__F_type_array__int16ss_increase
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int16ss_increase()
+ * @see f_int16ss_increase()
*/
-extern void test__f_type_array_int16ss_increase__works(void **state);
+extern void test__f_type_array_int16ss_increase__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_int16ss_increase()
+ * @see f_int16ss_increase()
*/
extern void test__f_type_array_int16ss_increase__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int16ss_increase()
+ * @see f_int16ss_increase()
*/
-extern void test__f_type_array_int16ss_increase__parameter_checking(void **state);
+extern void test__f_type_array_int16ss_increase__works(void **state);
#endif // _TEST__F_type_array__int16ss_increase
extern "C" {
#endif
-void test__f_type_array_int16ss_increase_by__works(void **state) {
+void test__f_type_array_int16ss_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_int16ss_t data = f_int16ss_t_initialize;
+
+ {
+ const f_status_t status = f_int16ss_increase_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_int16ss_increase_by__returns_data_not(void **state) {
const int length = 5;
- f_int16ss_t data = f_int16s_t_initialize;
+ f_int16ss_t data = f_int16ss_t_initialize;
{
const f_status_t status = f_int16ss_resize(length, &data);
}
{
- data.used = length;
+ const f_status_t status = f_int16ss_increase_by(0, &data);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+ {
const f_status_t status = f_int16ss_increase_by(length, &data);
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ free((void *) data.array);
+}
+
+void test__f_type_array_array_length_decrease_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_array_lengthss_t data = f_array_lengthss_t_initialize;
+
+ {
+ const f_status_t status = f_array_lengthss_resize(length, &data);
+
assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_array_lengthss_decrease_by(0, &data);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
}
free((void *) data.array);
}
-void test__f_type_array_int16ss_increase_by__parameter_checking(void **state) {
+void test__f_type_array_int16ss_increase_by__works(void **state) {
const int length = 5;
- f_int16ss_t data = f_int16s_t_initialize;
+ f_int16ss_t data = f_int16ss_t_initialize;
{
- const f_status_t status = f_int16ss_increase_by(length, 0);
+ const f_status_t status = f_int16ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ {
+ data.used = length;
+
+ const f_status_t status = f_int16ss_increase_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_int_equal(data.size, length * 2);
+ }
+
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__int16ss_increase_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int16ss_increase_by()
+ * @see f_int16ss_increase_by()
*/
-extern void test__f_type_array_int16ss_increase_by__works(void **state);
+extern void test__f_type_array_int16ss_increase_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_int16ss_increase_by()
+ * @see f_int16ss_increase_by()
*/
-extern void test__f_type_array_int16ss_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_int16ss_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int16ss_increase_by()
+ */
+extern void test__f_type_array_int16ss_increase_by__works(void **state);
#endif // _TEST__F_type_array__int16ss_increase_by
extern "C" {
#endif
-void test__f_type_array_int16ss_resize__works(void **state) {
+void test__f_type_array_int16ss_resize__parameter_checking(void **state) {
const int length = 5;
f_int16ss_t data = f_int16ss_t_initialize;
{
- const f_status_t status = f_int16ss_resize(length, &data);
+ const f_status_t status = f_int16ss_resize(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_int16ss_resize__parameter_checking(void **state) {
+void test__f_type_array_int16ss_resize__works(void **state) {
const int length = 5;
f_int16ss_t data = f_int16ss_t_initialize;
{
- const f_status_t status = f_int16ss_resize(length, 0);
+ const f_status_t status = f_int16ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__int16ss_resize
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int16ss_resize()
+ * @see f_int16ss_resize()
*/
-extern void test__f_type_array_int16ss_resize__works(void **state);
+extern void test__f_type_array_int16ss_resize__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int16ss_resize()
+ * @see f_int16ss_resize()
*/
-extern void test__f_type_array_int16ss_resize__parameter_checking(void **state);
+extern void test__f_type_array_int16ss_resize__works(void **state);
#endif // _TEST__F_type_array__int16ss_resize
extern "C" {
#endif
-void test__f_type_array_int32s_adjust__works(void **state) {
+void test__f_type_array_int32s_adjust__parameter_checking(void **state) {
const int length = 5;
f_int32s_t data = f_int32s_t_initialize;
{
- const f_status_t status = f_int32s_adjust(length, &data);
+ const f_status_t status = f_int32s_adjust(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_int32s_adjust__parameter_checking(void **state) {
+void test__f_type_array_int32s_adjust__works(void **state) {
const int length = 5;
f_int32s_t data = f_int32s_t_initialize;
{
- const f_status_t status = f_int32s_adjust(length, 0);
+ const f_status_t status = f_int32s_adjust(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__int32s_adjust
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int32s_adjust()
+ * @see f_int32s_adjust()
*/
-extern void test__f_type_array_int32s_adjust__works(void **state);
+extern void test__f_type_array_int32s_adjust__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int32s_adjust()
+ * @see f_int32s_adjust()
*/
-extern void test__f_type_array_int32s_adjust__parameter_checking(void **state);
+extern void test__f_type_array_int32s_adjust__works(void **state);
#endif // _TEST__F_type_array__int32s_adjust
extern "C" {
#endif
+void test__f_type_array_int32s_append__parameter_checking(void **state) {
+
+ const int32_t data = 0;
+
+ {
+ const f_status_t status = f_int32s_append(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
void test__f_type_array_int32s_append__works(void **state) {
const int32_t source = 3;
free((void *) destination.array);
}
-void test__f_type_array_int32s_append__parameter_checking(void **state) {
-
- const uint32_t data = 0;
-
- {
- const f_status_t status = f_int32s_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__int32s_append
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int32s_append()
+ * @see f_int32s_append()
*/
-extern void test__f_type_array_int32s_append__works(void **state);
+extern void test__f_type_array_int32s_append__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int32s_append()
+ * @see f_int32s_append()
*/
-extern void test__f_type_array_int32s_append__parameter_checking(void **state);
+extern void test__f_type_array_int32s_append__works(void **state);
#endif // _TEST__F_type_array__int32s_append
extern "C" {
#endif
-void test__f_type_array_int32s_append_all__works(void **state) {
+void test__f_type_array_int32s_append_all__parameter_checking(void **state) {
+
+ const f_int32s_t data = f_int32s_t_initialize;
+
+ {
+ const f_status_t status = f_int32s_append_all(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_int32s_append_all__returns_data_not(void **state) {
const int length = 5;
- const int length_used = 2;
f_int32s_t source = f_int32s_t_initialize;
f_int32s_t destination = f_int32s_t_initialize;
assert_int_equal(source.size, length);
}
- for (; source.used < length_used; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
{
const f_status_t status = f_int32s_append_all(source, &destination);
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_array_length_t i = 0; i < source.used; ++i) {
- assert_int_equal(destination.array[i], i + 1);
- } // for
+ 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);
- free((void *) destination.array);
}
-void test__f_type_array_int32s_append_all__returns_data_not(void **state) {
+void test__f_type_array_int32s_append_all__works(void **state) {
const int length = 5;
+ const int length_used = 2;
f_int32s_t source = f_int32s_t_initialize;
f_int32s_t destination = f_int32s_t_initialize;
assert_int_equal(source.size, length);
}
+ for (; source.used < length_used; ++source.used) {
+ source.array[source.used] = source.used + 1;
+ } // for
+
{
const f_status_t status = f_int32s_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);
+ assert_int_equal(status, F_none);
+ assert_int_equal(destination.used, source.used);
+ assert_int_equal(destination.size, source.used);
+
+ for (f_array_length_t i = 0; i < source.used; ++i) {
+ assert_int_equal(destination.array[i], i + 1);
+ } // for
}
free((void *) source.array);
-}
-
-void test__f_type_array_int32s_append_all__parameter_checking(void **state) {
-
- const f_int32s_t data = f_int32s_t_initialize;
-
- {
- const f_status_t status = f_int32s_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
+ free((void *) destination.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__int32s_append_all
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int32s_append_all()
+ * @see f_int32s_append_all()
*/
-extern void test__f_type_array_int32s_append_all__works(void **state);
+extern void test__f_type_array_int32s_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 returns F_data_not.
*
- * @see f_type_array_int32s_append_all()
+ * @see f_int32s_append_all()
*/
extern void test__f_type_array_int32s_append_all__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int32s_append_all()
+ * @see f_int32s_append_all()
*/
-extern void test__f_type_array_int32s_append_all__parameter_checking(void **state);
+extern void test__f_type_array_int32s_append_all__works(void **state);
#endif // _TEST__F_type_array__int32s_append_all
extern "C" {
#endif
-void test__f_type_array_int32s_decimate_by__works(void **state) {
+void test__f_type_array_int32s_decimate_by__parameter_checking(void **state) {
const int length = 5;
f_int32s_t data = f_int32s_t_initialize;
{
- const f_status_t status = f_int32s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int32s_decimate_by(length, &data);
+ const f_status_t status = f_int32s_decimate_by(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
assert_null(data.array);
}
-void test__f_type_array_int32s_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_int32s_decimate_by__works(void **state) {
const int length = 5;
f_int32s_t data = f_int32s_t_initialize;
{
- const f_status_t status = f_int32s_decimate_by(length, 0);
+ const f_status_t status = f_int32s_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_int32s_decimate_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__int32s_decimate_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int32s_decimate_by()
+ * @see f_int32s_decimate_by()
*/
-extern void test__f_type_array_int32s_decimate_by__works(void **state);
+extern void test__f_type_array_int32s_decimate_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int32s_decimate_by()
+ * @see f_int32s_decimate_by()
*/
-extern void test__f_type_array_int32s_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_int32s_decimate_by__works(void **state);
#endif // _TEST__F_type_array__int32s_decimate_by
extern "C" {
#endif
-void test__f_type_array_int32s_decrease_by__works(void **state) {
+void test__f_type_array_int32s_decrease_by__parameter_checking(void **state) {
const int length = 5;
f_int32s_t data = f_int32s_t_initialize;
{
- const f_status_t status = f_int32s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int32s_decrease_by(length, &data);
+ const f_status_t status = f_int32s_decrease_by(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
assert_null(data.array);
}
-void test__f_type_array_int32s_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_int32s_decrease_by__works(void **state) {
const int length = 5;
f_int32s_t data = f_int32s_t_initialize;
{
- const f_status_t status = f_int32s_decrease_by(length, 0);
+ const f_status_t status = f_int32s_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_int32s_decrease_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__int32s_decrease_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int32s_decrease_by()
+ * @see f_int32s_decrease_by()
*/
-extern void test__f_type_array_int32s_decrease_by__works(void **state);
+extern void test__f_type_array_int32s_decrease_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int32s_decrease_by()
+ * @see f_int32s_decrease_by()
*/
-extern void test__f_type_array_int32s_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_int32s_decrease_by__works(void **state);
#endif // _TEST__F_type_array__int32s_decrease_by
extern "C" {
#endif
-void test__f_type_array_int32s_increase__works(void **state) {
+void test__f_type_array_int32s_increase__parameter_checking(void **state) {
const int length = 5;
f_int32s_t data = f_int32s_t_initialize;
{
- const f_status_t status = f_int32s_resize(length, &data);
+ const f_status_t status = f_int32s_increase(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_int32s_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ assert_int_equal(data.size, 0);
}
free((void *) data.array);
free((void *) data.array);
}
-void test__f_type_array_int32s_increase__parameter_checking(void **state) {
+void test__f_type_array_int32s_increase__works(void **state) {
const int length = 5;
f_int32s_t data = f_int32s_t_initialize;
{
- const f_status_t status = f_int32s_increase(length, 0);
+ const f_status_t status = f_int32s_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_int32s_increase(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
}
free((void *) data.array);
#define _TEST__F_type_array__int32s_increase
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int32s_increase()
+ * @see f_int32s_increase()
*/
-extern void test__f_type_array_int32s_increase__works(void **state);
+extern void test__f_type_array_int32s_increase__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_int32s_increase()
+ * @see f_int32s_increase()
*/
extern void test__f_type_array_int32s_increase__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int32s_increase()
+ * @see f_int32s_increase()
*/
-extern void test__f_type_array_int32s_increase__parameter_checking(void **state);
+extern void test__f_type_array_int32s_increase__works(void **state);
#endif // _TEST__F_type_array__int32s_increase
extern "C" {
#endif
+void test__f_type_array_int32s_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_int32s_t data = f_int32s_t_initialize;
+
+ {
+ const f_status_t status = f_int32s_increase_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
void test__f_type_array_int32s_increase_by__works(void **state) {
const int length = 5;
free((void *) data.array);
}
-void test__f_type_array_int32s_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_int32s_t data = f_int32s_t_initialize;
-
- {
- const f_status_t status = f_int32s_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__int32s_increase_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int32s_increase_by()
+ * @see f_int32s_increase_by()
*/
-extern void test__f_type_array_int32s_increase_by__works(void **state);
+extern void test__f_type_array_int32s_increase_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int32s_increase_by()
+ * @see f_int32s_increase_by()
*/
-extern void test__f_type_array_int32s_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_int32s_increase_by__works(void **state);
#endif // _TEST__F_type_array__int32s_increase_by
extern "C" {
#endif
-void test__f_type_array_int32s_resize__works(void **state) {
+void test__f_type_array_int32s_resize__parameter_checking(void **state) {
const int length = 5;
f_int32s_t data = f_int32s_t_initialize;
{
- const f_status_t status = f_int32s_resize(length, &data);
+ const f_status_t status = f_int32s_resize(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_int32s_resize__parameter_checking(void **state) {
+void test__f_type_array_int32s_resize__works(void **state) {
const int length = 5;
f_int32s_t data = f_int32s_t_initialize;
{
- const f_status_t status = f_int32s_resize(length, 0);
+ const f_status_t status = f_int32s_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__int32s_resize
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int32s_resize()
+ * @see f_int32s_resize()
*/
-extern void test__f_type_array_int32s_resize__works(void **state);
+extern void test__f_type_array_int32s_resize__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int32s_resize()
+ * @see f_int32s_resize()
*/
-extern void test__f_type_array_int32s_resize__parameter_checking(void **state);
+extern void test__f_type_array_int32s_resize__works(void **state);
#endif // _TEST__F_type_array__int32s_resize
extern "C" {
#endif
-void test__f_type_array_int32ss_adjust__works(void **state) {
+void test__f_type_array_int32ss_adjust__parameter_checking(void **state) {
const int length = 5;
f_int32ss_t data = f_int32ss_t_initialize;
{
- const f_status_t status = f_int32ss_adjust(length, &data);
+ const f_status_t status = f_int32ss_adjust(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_int32ss_adjust__parameter_checking(void **state) {
+void test__f_type_array_int32ss_adjust__works(void **state) {
const int length = 5;
f_int32ss_t data = f_int32ss_t_initialize;
{
- const f_status_t status = f_int32ss_adjust(length, 0);
+ const f_status_t status = f_int32ss_adjust(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__int32ss_adjust
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int32ss_adjust()
+ * @see f_int32ss_adjust()
*/
-extern void test__f_type_array_int32ss_adjust__works(void **state);
+extern void test__f_type_array_int32ss_adjust__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int32ss_adjust()
+ * @see f_int32ss_adjust()
*/
-extern void test__f_type_array_int32ss_adjust__parameter_checking(void **state);
+extern void test__f_type_array_int32ss_adjust__works(void **state);
#endif // _TEST__F_type_array__int32ss_adjust
extern "C" {
#endif
-void test__f_type_array_int32ss_append__works(void **state) {
+void test__f_type_array_int32ss_append__parameter_checking(void **state) {
+
+ f_int32s_t data = f_int32s_t_initialize;
+
+ {
+ const f_status_t status = f_int32ss_append(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_int32ss_append__returns_data_not(void **state) {
const int length = 5;
f_int32s_t source = f_int32s_t_initialize;
assert_int_equal(source.size, length);
}
- for (; source.used < length; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
{
const f_status_t status = f_int32ss_append(source, &destination);
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0].used, source.used);
- assert_int_equal(destination.array[0].size, source.used);
-
- for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
- assert_int_equal(destination.array[0].array[i], i + 1);
- } // for
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(destination.used, 0);
+ assert_int_equal(destination.size, 0);
+ assert_null(destination.array);
}
- for (f_array_length_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
free((void *) source.array);
- free((void *) destination.array);
}
-void test__f_type_array_int32ss_append__returns_data_not(void **state) {
+void test__f_type_array_int32ss_append__works(void **state) {
const int length = 5;
f_int32s_t source = f_int32s_t_initialize;
assert_int_equal(source.size, length);
}
+ for (; source.used < length; ++source.used) {
+ source.array[source.used] = source.used + 1;
+ } // for
+
{
const f_status_t status = f_int32ss_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_type_array_int32ss_append__parameter_checking(void **state) {
+ assert_int_equal(status, F_none);
+ assert_int_equal(destination.used, 1);
+ assert_int_equal(destination.array[0].used, source.used);
+ assert_int_equal(destination.array[0].size, source.used);
- f_int32s_t data = f_int32s_t_initialize;
+ for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
+ assert_int_equal(destination.array[0].array[i], i + 1);
+ } // for
+ }
- {
- const f_status_t status = f_int32ss_append(data, 0);
+ for (f_array_length_t i = 0; i < destination.used; ++i) {
+ free((void *) destination.array[i].array);
+ } // for
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
+ free((void *) source.array);
+ free((void *) destination.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__int32ss_append
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int32ss_append()
+ * @see f_int32ss_append()
*/
-extern void test__f_type_array_int32ss_append__works(void **state);
+extern void test__f_type_array_int32ss_append__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_int32ss_append()
+ * @see f_int32ss_append()
*/
extern void test__f_type_array_int32ss_append__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int32ss_append()
+ * @see f_int32ss_append()
*/
-extern void test__f_type_array_int32ss_append__parameter_checking(void **state);
+extern void test__f_type_array_int32ss_append__works(void **state);
#endif // _TEST__F_type_array__int32ss_append
extern "C" {
#endif
+void test__f_type_array_int32ss_append_all__parameter_checking(void **state) {
+
+ const f_int32ss_t data = f_int32ss_t_initialize;
+
+ {
+ const f_status_t status = f_int32ss_append_all(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_int32ss_append_all__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_int32ss_t source = f_int32ss_t_initialize;
+ f_int32ss_t destination = f_int32ss_t_initialize;
+
+ {
+ const f_status_t status = f_int32ss_resize(length, &source);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(source.used, 0);
+ assert_int_equal(source.size, length);
+ }
+
+ {
+ const f_status_t status = f_int32ss_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_type_array_int32ss_append_all__works(void **state) {
const int length = 5;
free((void *) destination.array);
}
-void test__f_type_array_int32ss_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_int32ss_t source = f_int32ss_t_initialize;
- f_int32ss_t destination = f_int32ss_t_initialize;
-
- {
- const f_status_t status = f_int32ss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_int32ss_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_type_array_int32ss_append_all__parameter_checking(void **state) {
-
- const f_int32ss_t data = f_int32ss_t_initialize;
-
- {
- const f_status_t status = f_int32ss_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__int32ss_append_all
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int32ss_append_all()
+ * @see f_int32ss_append_all()
*/
-extern void test__f_type_array_int32ss_append_all__works(void **state);
+extern void test__f_type_array_int32ss_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 returns F_data_not.
*
- * @see f_type_array_int32ss_append_all()
+ * @see f_int32ss_append_all()
*/
extern void test__f_type_array_int32ss_append_all__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int32ss_append_all()
+ * @see f_int32ss_append_all()
*/
-extern void test__f_type_array_int32ss_append_all__parameter_checking(void **state);
+extern void test__f_type_array_int32ss_append_all__works(void **state);
#endif // _TEST__F_type_array__int32ss_append_all
extern "C" {
#endif
-void test__f_type_array_int32ss_decimate_by__works(void **state) {
+void test__f_type_array_int32ss_decimate_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_int32ss_t data = f_int32ss_t_initialize;
+
+ {
+ const f_status_t status = f_int32ss_decimate_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_int32ss_decimate_by__returns_data_not(void **state) {
const int length = 5;
- f_int32ss_t data = f_int32s_t_initialize;
+ f_int32ss_t data = f_int32ss_t_initialize;
{
const f_status_t status = f_int32ss_resize(length, &data);
}
{
- const f_status_t status = f_int32ss_decimate_by(length, &data);
+ const f_status_t status = f_int32ss_decimate_by(0, &data);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_data_not);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
-void test__f_type_array_int32ss_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_int32ss_decimate_by__works(void **state) {
const int length = 5;
- f_int32ss_t data = f_int32s_t_initialize;
+ f_int32ss_t data = f_int32ss_t_initialize;
{
- const f_status_t status = f_int32ss_decimate_by(length, 0);
+ const f_status_t status = f_int32ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_int32ss_decimate_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__int32ss_decimate_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int32ss_decimate_by()
+ * @see f_int32ss_decimate_by()
*/
-extern void test__f_type_array_int32ss_decimate_by__works(void **state);
+extern void test__f_type_array_int32ss_decimate_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
* @see f_type_array_int32ss_decimate_by()
*/
-extern void test__f_type_array_int32ss_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_int32ss_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int32ss_decimate_by()
+ */
+extern void test__f_type_array_int32ss_decimate_by__works(void **state);
#endif // _TEST__F_type_array__int32ss_decimate_by
extern "C" {
#endif
-void test__f_type_array_int32ss_decrease_by__works(void **state) {
+void test__f_type_array_int32ss_decrease_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_int32ss_t data = f_int32ss_t_initialize;
+
+ {
+ const f_status_t status = f_int32ss_decrease_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_int32ss_decrease_by__returns_data_not(void **state) {
const int length = 5;
- f_int32ss_t data = f_int32s_t_initialize;
+ f_int32ss_t data = f_int32ss_t_initialize;
{
const f_status_t status = f_int32ss_resize(length, &data);
}
{
- const f_status_t status = f_int32ss_decrease_by(length, &data);
+ const f_status_t status = f_int32ss_decrease_by(0, &data);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_data_not);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
-void test__f_type_array_int32ss_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_int32ss_decrease_by__works(void **state) {
const int length = 5;
- f_int32ss_t data = f_int32s_t_initialize;
+ f_int32ss_t data = f_int32ss_t_initialize;
{
- const f_status_t status = f_int32ss_decrease_by(length, 0);
+ const f_status_t status = f_int32ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_int32ss_decrease_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__int32ss_decrease_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int32ss_decrease_by()
+ * @see f_int32ss_decrease_by()
*/
-extern void test__f_type_array_int32ss_decrease_by__works(void **state);
+extern void test__f_type_array_int32ss_decrease_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_int32ss_decrease_by()
+ * @see f_int32ss_decrease_by()
*/
-extern void test__f_type_array_int32ss_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_int32ss_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int32ss_decrease_by()
+ */
+extern void test__f_type_array_int32ss_decrease_by__works(void **state);
#endif // _TEST__F_type_array__int32ss_decrease_by
extern "C" {
#endif
-void test__f_type_array_int32ss_increase__works(void **state) {
+void test__f_type_array_int32ss_increase__parameter_checking(void **state) {
const int length = 5;
f_int32ss_t data = f_int32s_t_initialize;
{
- const f_status_t status = f_int32ss_resize(length, &data);
+ const f_status_t status = f_int32ss_increase(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_int32ss_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ assert_int_equal(data.size, 0);
}
free((void *) data.array);
void test__f_type_array_int32ss_increase__returns_data_not(void **state) {
const int length = 5;
- f_int32ss_t data = f_int32s_t_initialize;
+ f_int32ss_t data = f_int32ss_t_initialize;
{
const f_status_t status = f_int32ss_resize(length, &data);
free((void *) data.array);
}
-void test__f_type_array_int32ss_increase__parameter_checking(void **state) {
+void test__f_type_array_int32ss_increase__works(void **state) {
const int length = 5;
- f_int32ss_t data = f_int32s_t_initialize;
+ f_int32ss_t data = f_int32ss_t_initialize;
{
- const f_status_t status = f_int32ss_increase(length, 0);
+ const f_status_t status = f_int32ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_int32ss_increase(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
}
free((void *) data.array);
#define _TEST__F_type_array__int32ss_increase
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int32ss_increase()
+ * @see f_int32ss_increase()
*/
-extern void test__f_type_array_int32ss_increase__works(void **state);
+extern void test__f_type_array_int32ss_increase__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_int32ss_increase()
+ * @see f_int32ss_increase()
*/
extern void test__f_type_array_int32ss_increase__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int32ss_increase()
+ * @see f_int32ss_increase()
*/
-extern void test__f_type_array_int32ss_increase__parameter_checking(void **state);
+extern void test__f_type_array_int32ss_increase__works(void **state);
#endif // _TEST__F_type_array__int32ss_increase
extern "C" {
#endif
-void test__f_type_array_int32ss_increase_by__works(void **state) {
+void test__f_type_array_int32ss_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_int32ss_t data = f_int32ss_t_initialize;
+
+ {
+ const f_status_t status = f_int32ss_increase_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_int32ss_increase_by__returns_data_not(void **state) {
const int length = 5;
- f_int32ss_t data = f_int32s_t_initialize;
+ f_int32ss_t data = f_int32ss_t_initialize;
{
const f_status_t status = f_int32ss_resize(length, &data);
}
{
- data.used = length;
+ const f_status_t status = f_int32ss_increase_by(0, &data);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+ {
const f_status_t status = f_int32ss_increase_by(length, &data);
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
}
free((void *) data.array);
}
-void test__f_type_array_int32ss_increase_by__parameter_checking(void **state) {
+void test__f_type_array_int32ss_increase_by__works(void **state) {
const int length = 5;
- f_int32ss_t data = f_int32s_t_initialize;
+ f_int32ss_t data = f_int32ss_t_initialize;
{
- const f_status_t status = f_int32ss_increase_by(length, 0);
+ const f_status_t status = f_int32ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ {
+ data.used = length;
+
+ const f_status_t status = f_int32ss_increase_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_int_equal(data.size, length * 2);
+ }
+
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__int32ss_increase_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int32ss_increase_by()
+ * @see f_int32ss_increase_by()
*/
-extern void test__f_type_array_int32ss_increase_by__works(void **state);
+extern void test__f_type_array_int32ss_increase_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_int32ss_increase_by()
+ * @see f_int32ss_increase_by()
*/
-extern void test__f_type_array_int32ss_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_int32ss_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int32ss_increase_by()
+ */
+extern void test__f_type_array_int32ss_increase_by__works(void **state);
#endif // _TEST__F_type_array__int32ss_increase_by
extern "C" {
#endif
-void test__f_type_array_int32ss_resize__works(void **state) {
+void test__f_type_array_int32ss_resize__parameter_checking(void **state) {
const int length = 5;
f_int32ss_t data = f_int32ss_t_initialize;
{
- const f_status_t status = f_int32ss_resize(length, &data);
+ const f_status_t status = f_int32ss_resize(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_int32ss_resize__parameter_checking(void **state) {
+void test__f_type_array_int32ss_resize__works(void **state) {
const int length = 5;
f_int32ss_t data = f_int32ss_t_initialize;
{
- const f_status_t status = f_int32ss_resize(length, 0);
+ const f_status_t status = f_int32ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__int32ss_resize
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int32ss_resize()
+ * @see f_int32ss_resize()
*/
-extern void test__f_type_array_int32ss_resize__works(void **state);
+extern void test__f_type_array_int32ss_resize__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int32ss_resize()
+ * @see f_int32ss_resize()
*/
-extern void test__f_type_array_int32ss_resize__parameter_checking(void **state);
+extern void test__f_type_array_int32ss_resize__works(void **state);
#endif // _TEST__F_type_array__int32ss_resize
extern "C" {
#endif
-void test__f_type_array_int64s_adjust__works(void **state) {
+void test__f_type_array_int64s_adjust__parameter_checking(void **state) {
const int length = 5;
f_int64s_t data = f_int64s_t_initialize;
{
- const f_status_t status = f_int64s_adjust(length, &data);
+ const f_status_t status = f_int64s_adjust(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_int64s_adjust__parameter_checking(void **state) {
+void test__f_type_array_int64s_adjust__works(void **state) {
const int length = 5;
f_int64s_t data = f_int64s_t_initialize;
{
- const f_status_t status = f_int64s_adjust(length, 0);
+ const f_status_t status = f_int64s_adjust(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__int64s_adjust
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int64s_adjust()
+ * @see f_int64s_adjust()
*/
-extern void test__f_type_array_int64s_adjust__works(void **state);
+extern void test__f_type_array_int64s_adjust__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int64s_adjust()
+ * @see f_int64s_adjust()
*/
-extern void test__f_type_array_int64s_adjust__parameter_checking(void **state);
+extern void test__f_type_array_int64s_adjust__works(void **state);
#endif // _TEST__F_type_array__int64s_adjust
extern "C" {
#endif
+void test__f_type_array_int64s_append__parameter_checking(void **state) {
+
+ const int64_t data = 0;
+
+ {
+ const f_status_t status = f_int64s_append(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
void test__f_type_array_int64s_append__works(void **state) {
const int64_t source = 3;
free((void *) destination.array);
}
-void test__f_type_array_int64s_append__parameter_checking(void **state) {
-
- const uint64_t data = 0;
-
- {
- const f_status_t status = f_int64s_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__int64s_append
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int64s_append()
+ * @see f_int64s_append()
*/
-extern void test__f_type_array_int64s_append__works(void **state);
+extern void test__f_type_array_int64s_append__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int64s_append()
+ * @see f_int64s_append()
*/
-extern void test__f_type_array_int64s_append__parameter_checking(void **state);
+extern void test__f_type_array_int64s_append__works(void **state);
#endif // _TEST__F_type_array__int64s_append
extern "C" {
#endif
-void test__f_type_array_int64s_append_all__works(void **state) {
+void test__f_type_array_int64s_append_all__parameter_checking(void **state) {
+
+ const f_int64s_t data = f_int64s_t_initialize;
+
+ {
+ const f_status_t status = f_int64s_append_all(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_int64s_append_all__returns_data_not(void **state) {
const int length = 5;
- const int length_used = 2;
f_int64s_t source = f_int64s_t_initialize;
f_int64s_t destination = f_int64s_t_initialize;
assert_int_equal(source.size, length);
}
- for (; source.used < length_used; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
{
const f_status_t status = f_int64s_append_all(source, &destination);
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_array_length_t i = 0; i < source.used; ++i) {
- assert_int_equal(destination.array[i], i + 1);
- } // for
+ 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);
- free((void *) destination.array);
}
-void test__f_type_array_int64s_append_all__returns_data_not(void **state) {
+void test__f_type_array_int64s_append_all__works(void **state) {
const int length = 5;
+ const int length_used = 2;
f_int64s_t source = f_int64s_t_initialize;
f_int64s_t destination = f_int64s_t_initialize;
assert_int_equal(source.size, length);
}
+ for (; source.used < length_used; ++source.used) {
+ source.array[source.used] = source.used + 1;
+ } // for
+
{
const f_status_t status = f_int64s_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);
+ assert_int_equal(status, F_none);
+ assert_int_equal(destination.used, source.used);
+ assert_int_equal(destination.size, source.used);
+
+ for (f_array_length_t i = 0; i < source.used; ++i) {
+ assert_int_equal(destination.array[i], i + 1);
+ } // for
}
free((void *) source.array);
-}
-
-void test__f_type_array_int64s_append_all__parameter_checking(void **state) {
-
- const f_int64s_t data = f_int64s_t_initialize;
-
- {
- const f_status_t status = f_int64s_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
+ free((void *) destination.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__int64s_append_all
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int64s_append_all()
+ * @see f_int64s_append_all()
*/
-extern void test__f_type_array_int64s_append_all__works(void **state);
+extern void test__f_type_array_int64s_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 returns F_data_not.
*
- * @see f_type_array_int64s_append_all()
+ * @see f_int64s_append_all()
*/
extern void test__f_type_array_int64s_append_all__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int64s_append_all()
+ * @see f_int64s_append_all()
*/
-extern void test__f_type_array_int64s_append_all__parameter_checking(void **state);
+extern void test__f_type_array_int64s_append_all__works(void **state);
#endif // _TEST__F_type_array__int64s_append_all
extern "C" {
#endif
-void test__f_type_array_int64s_decimate_by__works(void **state) {
+void test__f_type_array_int64s_decimate_by__parameter_checking(void **state) {
const int length = 5;
f_int64s_t data = f_int64s_t_initialize;
{
- const f_status_t status = f_int64s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int64s_decimate_by(length, &data);
+ const f_status_t status = f_int64s_decimate_by(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
assert_null(data.array);
}
-void test__f_type_array_int64s_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_int64s_decimate_by__works(void **state) {
const int length = 5;
f_int64s_t data = f_int64s_t_initialize;
{
- const f_status_t status = f_int64s_decimate_by(length, 0);
+ const f_status_t status = f_int64s_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_int64s_decimate_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__int64s_decimate_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int64s_decimate_by()
+ * @see f_int64s_decimate_by()
*/
-extern void test__f_type_array_int64s_decimate_by__works(void **state);
+extern void test__f_type_array_int64s_decimate_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int64s_decimate_by()
+ * @see f_int64s_decimate_by()
*/
-extern void test__f_type_array_int64s_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_int64s_decimate_by__works(void **state);
#endif // _TEST__F_type_array__int64s_decimate_by
extern "C" {
#endif
-void test__f_type_array_int64s_decrease_by__works(void **state) {
+void test__f_type_array_int64s_decrease_by__parameter_checking(void **state) {
const int length = 5;
f_int64s_t data = f_int64s_t_initialize;
{
- const f_status_t status = f_int64s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int64s_decrease_by(length, &data);
+ const f_status_t status = f_int64s_decrease_by(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
assert_null(data.array);
}
-void test__f_type_array_int64s_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_int64s_decrease_by__works(void **state) {
const int length = 5;
f_int64s_t data = f_int64s_t_initialize;
{
- const f_status_t status = f_int64s_decrease_by(length, 0);
+ const f_status_t status = f_int64s_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_int64s_decrease_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__int64s_decrease_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int64s_decrease_by()
+ * @see f_int64s_decrease_by()
*/
-extern void test__f_type_array_int64s_decrease_by__works(void **state);
+extern void test__f_type_array_int64s_decrease_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int64s_decrease_by()
+ * @see f_int64s_decrease_by()
*/
-extern void test__f_type_array_int64s_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_int64s_decrease_by__works(void **state);
#endif // _TEST__F_type_array__int64s_decrease_by
extern "C" {
#endif
-void test__f_type_array_int64s_increase__works(void **state) {
+void test__f_type_array_int64s_increase__parameter_checking(void **state) {
const int length = 5;
f_int64s_t data = f_int64s_t_initialize;
{
- const f_status_t status = f_int64s_resize(length, &data);
+ const f_status_t status = f_int64s_increase(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_int64s_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ assert_int_equal(data.size, 0);
}
free((void *) data.array);
free((void *) data.array);
}
-void test__f_type_array_int64s_increase__parameter_checking(void **state) {
+void test__f_type_array_int64s_increase__works(void **state) {
const int length = 5;
f_int64s_t data = f_int64s_t_initialize;
{
- const f_status_t status = f_int64s_increase(length, 0);
+ const f_status_t status = f_int64s_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_int64s_increase(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
}
free((void *) data.array);
#define _TEST__F_type_array__int64s_increase
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int64s_increase()
+ * @see f_int64s_increase()
*/
-extern void test__f_type_array_int64s_increase__works(void **state);
+extern void test__f_type_array_int64s_increase__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_int64s_increase()
+ * @see f_int64s_increase()
*/
extern void test__f_type_array_int64s_increase__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int64s_increase()
+ * @see f_int64s_increase()
*/
-extern void test__f_type_array_int64s_increase__parameter_checking(void **state);
+extern void test__f_type_array_int64s_increase__works(void **state);
#endif // _TEST__F_type_array__int64s_increase
extern "C" {
#endif
+void test__f_type_array_int64s_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_int64s_t data = f_int64s_t_initialize;
+
+ {
+ const f_status_t status = f_int64s_increase_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
void test__f_type_array_int64s_increase_by__works(void **state) {
const int length = 5;
free((void *) data.array);
}
-void test__f_type_array_int64s_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_int64s_t data = f_int64s_t_initialize;
-
- {
- const f_status_t status = f_int64s_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__int64s_increase_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int64s_increase_by()
+ * @see f_int64s_increase_by()
*/
-extern void test__f_type_array_int64s_increase_by__works(void **state);
+extern void test__f_type_array_int64s_increase_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int64s_increase_by()
+ * @see f_int64s_increase_by()
*/
-extern void test__f_type_array_int64s_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_int64s_increase_by__works(void **state);
#endif // _TEST__F_type_array__int64s_increase_by
extern "C" {
#endif
-void test__f_type_array_int64s_resize__works(void **state) {
+void test__f_type_array_int64s_resize__parameter_checking(void **state) {
const int length = 5;
f_int64s_t data = f_int64s_t_initialize;
{
- const f_status_t status = f_int64s_resize(length, &data);
+ const f_status_t status = f_int64s_resize(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_int64s_resize__parameter_checking(void **state) {
+void test__f_type_array_int64s_resize__works(void **state) {
const int length = 5;
f_int64s_t data = f_int64s_t_initialize;
{
- const f_status_t status = f_int64s_resize(length, 0);
+ const f_status_t status = f_int64s_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__int64s_resize
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int64s_resize()
+ * @see f_int64s_resize()
*/
-extern void test__f_type_array_int64s_resize__works(void **state);
+extern void test__f_type_array_int64s_resize__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int64s_resize()
+ * @see f_int64s_resize()
*/
-extern void test__f_type_array_int64s_resize__parameter_checking(void **state);
+extern void test__f_type_array_int64s_resize__works(void **state);
#endif // _TEST__F_type_array__int64s_resize
extern "C" {
#endif
-void test__f_type_array_int64ss_adjust__works(void **state) {
+void test__f_type_array_int64ss_adjust__parameter_checking(void **state) {
const int length = 5;
f_int64ss_t data = f_int64ss_t_initialize;
{
- const f_status_t status = f_int64ss_adjust(length, &data);
+ const f_status_t status = f_int64ss_adjust(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_int64ss_adjust__parameter_checking(void **state) {
+void test__f_type_array_int64ss_adjust__works(void **state) {
const int length = 5;
f_int64ss_t data = f_int64ss_t_initialize;
{
- const f_status_t status = f_int64ss_adjust(length, 0);
+ const f_status_t status = f_int64ss_adjust(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__int64ss_adjust
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int64ss_adjust()
+ * @see f_int64ss_adjust()
*/
-extern void test__f_type_array_int64ss_adjust__works(void **state);
+extern void test__f_type_array_int64ss_adjust__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int64ss_adjust()
+ * @see f_int64ss_adjust()
*/
-extern void test__f_type_array_int64ss_adjust__parameter_checking(void **state);
+extern void test__f_type_array_int64ss_adjust__works(void **state);
#endif // _TEST__F_type_array__int64ss_adjust
extern "C" {
#endif
-void test__f_type_array_int64ss_append__works(void **state) {
+void test__f_type_array_int64ss_append__parameter_checking(void **state) {
+
+ f_int64s_t data = f_int64s_t_initialize;
+
+ {
+ const f_status_t status = f_int64ss_append(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_int64ss_append__returns_data_not(void **state) {
const int length = 5;
f_int64s_t source = f_int64s_t_initialize;
assert_int_equal(source.size, length);
}
- for (; source.used < length; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
{
const f_status_t status = f_int64ss_append(source, &destination);
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0].used, source.used);
- assert_int_equal(destination.array[0].size, source.used);
-
- for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
- assert_int_equal(destination.array[0].array[i], i + 1);
- } // for
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(destination.used, 0);
+ assert_int_equal(destination.size, 0);
+ assert_null(destination.array);
}
- for (f_array_length_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
free((void *) source.array);
- free((void *) destination.array);
}
-void test__f_type_array_int64ss_append__returns_data_not(void **state) {
+void test__f_type_array_int64ss_append__works(void **state) {
const int length = 5;
f_int64s_t source = f_int64s_t_initialize;
assert_int_equal(source.size, length);
}
+ for (; source.used < length; ++source.used) {
+ source.array[source.used] = source.used + 1;
+ } // for
+
{
const f_status_t status = f_int64ss_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_type_array_int64ss_append__parameter_checking(void **state) {
+ assert_int_equal(status, F_none);
+ assert_int_equal(destination.used, 1);
+ assert_int_equal(destination.array[0].used, source.used);
+ assert_int_equal(destination.array[0].size, source.used);
- f_int64s_t data = f_int64s_t_initialize;
+ for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
+ assert_int_equal(destination.array[0].array[i], i + 1);
+ } // for
+ }
- {
- const f_status_t status = f_int64ss_append(data, 0);
+ for (f_array_length_t i = 0; i < destination.used; ++i) {
+ free((void *) destination.array[i].array);
+ } // for
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
+ free((void *) source.array);
+ free((void *) destination.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__int64ss_append
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int64ss_append()
+ * @see f_int64ss_append()
*/
-extern void test__f_type_array_int64ss_append__works(void **state);
+extern void test__f_type_array_int64ss_append__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_int64ss_append()
+ * @see f_int64ss_append()
*/
extern void test__f_type_array_int64ss_append__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int64ss_append()
+ * @see f_int64ss_append()
*/
-extern void test__f_type_array_int64ss_append__parameter_checking(void **state);
+extern void test__f_type_array_int64ss_append__works(void **state);
#endif // _TEST__F_type_array__int64ss_append
extern "C" {
#endif
+void test__f_type_array_int64ss_append_all__parameter_checking(void **state) {
+
+ const f_int64ss_t data = f_int64ss_t_initialize;
+
+ {
+ const f_status_t status = f_int64ss_append_all(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_int64ss_append_all__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_int64ss_t source = f_int64ss_t_initialize;
+ f_int64ss_t destination = f_int64ss_t_initialize;
+
+ {
+ const f_status_t status = f_int64ss_resize(length, &source);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(source.used, 0);
+ assert_int_equal(source.size, length);
+ }
+
+ {
+ const f_status_t status = f_int64ss_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_type_array_int64ss_append_all__works(void **state) {
const int length = 5;
free((void *) destination.array);
}
-void test__f_type_array_int64ss_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_int64ss_t source = f_int64ss_t_initialize;
- f_int64ss_t destination = f_int64ss_t_initialize;
-
- {
- const f_status_t status = f_int64ss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_int64ss_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_type_array_int64ss_append_all__parameter_checking(void **state) {
-
- const f_int64ss_t data = f_int64ss_t_initialize;
-
- {
- const f_status_t status = f_int64ss_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__int64ss_append_all
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int64ss_append_all()
+ * @see f_int64ss_append_all()
*/
-extern void test__f_type_array_int64ss_append_all__works(void **state);
+extern void test__f_type_array_int64ss_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 returns F_data_not.
*
- * @see f_type_array_int64ss_append_all()
+ * @see f_int64ss_append_all()
*/
extern void test__f_type_array_int64ss_append_all__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int64ss_append_all()
+ * @see f_int64ss_append_all()
*/
-extern void test__f_type_array_int64ss_append_all__parameter_checking(void **state);
+extern void test__f_type_array_int64ss_append_all__works(void **state);
#endif // _TEST__F_type_array__int64ss_append_all
extern "C" {
#endif
-void test__f_type_array_int64ss_decimate_by__works(void **state) {
+void test__f_type_array_int64ss_decimate_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_int64ss_t data = f_int64ss_t_initialize;
+
+ {
+ const f_status_t status = f_int64ss_decimate_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_int64ss_decimate_by__returns_data_not(void **state) {
const int length = 5;
- f_int64ss_t data = f_int64s_t_initialize;
+ f_int64ss_t data = f_int64ss_t_initialize;
{
const f_status_t status = f_int64ss_resize(length, &data);
}
{
- const f_status_t status = f_int64ss_decimate_by(length, &data);
+ const f_status_t status = f_int64ss_decimate_by(0, &data);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_data_not);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
-void test__f_type_array_int64ss_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_int64ss_decimate_by__works(void **state) {
const int length = 5;
- f_int64ss_t data = f_int64s_t_initialize;
+ f_int64ss_t data = f_int64ss_t_initialize;
{
- const f_status_t status = f_int64ss_decimate_by(length, 0);
+ const f_status_t status = f_int64ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_int64ss_decimate_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__int64ss_decimate_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int64ss_decimate_by()
+ * @see f_int64ss_decimate_by()
*/
-extern void test__f_type_array_int64ss_decimate_by__works(void **state);
+extern void test__f_type_array_int64ss_decimate_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
* @see f_type_array_int64ss_decimate_by()
*/
-extern void test__f_type_array_int64ss_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_int64ss_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int64ss_decimate_by()
+ */
+extern void test__f_type_array_int64ss_decimate_by__works(void **state);
#endif // _TEST__F_type_array__int64ss_decimate_by
extern "C" {
#endif
-void test__f_type_array_int64ss_decrease_by__works(void **state) {
+void test__f_type_array_int64ss_decrease_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_int64ss_t data = f_int64ss_t_initialize;
+
+ {
+ const f_status_t status = f_int64ss_decrease_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_int64ss_decrease_by__returns_data_not(void **state) {
const int length = 5;
- f_int64ss_t data = f_int64s_t_initialize;
+ f_int64ss_t data = f_int64ss_t_initialize;
{
const f_status_t status = f_int64ss_resize(length, &data);
}
{
- const f_status_t status = f_int64ss_decrease_by(length, &data);
+ const f_status_t status = f_int64ss_decrease_by(0, &data);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_data_not);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
-void test__f_type_array_int64ss_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_int64ss_decrease_by__works(void **state) {
const int length = 5;
- f_int64ss_t data = f_int64s_t_initialize;
+ f_int64ss_t data = f_int64ss_t_initialize;
{
- const f_status_t status = f_int64ss_decrease_by(length, 0);
+ const f_status_t status = f_int64ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_int64ss_decrease_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__int64ss_decrease_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int64ss_decrease_by()
+ * @see f_int64ss_decrease_by()
*/
-extern void test__f_type_array_int64ss_decrease_by__works(void **state);
+extern void test__f_type_array_int64ss_decrease_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_int64ss_decrease_by()
+ * @see f_int64ss_decrease_by()
*/
-extern void test__f_type_array_int64ss_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_int64ss_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int64ss_decrease_by()
+ */
+extern void test__f_type_array_int64ss_decrease_by__works(void **state);
#endif // _TEST__F_type_array__int64ss_decrease_by
extern "C" {
#endif
-void test__f_type_array_int64ss_increase__works(void **state) {
+void test__f_type_array_int64ss_increase__parameter_checking(void **state) {
const int length = 5;
f_int64ss_t data = f_int64s_t_initialize;
{
- const f_status_t status = f_int64ss_resize(length, &data);
+ const f_status_t status = f_int64ss_increase(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_int64ss_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ assert_int_equal(data.size, 0);
}
free((void *) data.array);
void test__f_type_array_int64ss_increase__returns_data_not(void **state) {
const int length = 5;
- f_int64ss_t data = f_int64s_t_initialize;
+ f_int64ss_t data = f_int64ss_t_initialize;
{
const f_status_t status = f_int64ss_resize(length, &data);
free((void *) data.array);
}
-void test__f_type_array_int64ss_increase__parameter_checking(void **state) {
+void test__f_type_array_int64ss_increase__works(void **state) {
const int length = 5;
- f_int64ss_t data = f_int64s_t_initialize;
+ f_int64ss_t data = f_int64ss_t_initialize;
{
- const f_status_t status = f_int64ss_increase(length, 0);
+ const f_status_t status = f_int64ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_int64ss_increase(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
}
free((void *) data.array);
#define _TEST__F_type_array__int64ss_increase
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int64ss_increase()
+ * @see f_int64ss_increase()
*/
-extern void test__f_type_array_int64ss_increase__works(void **state);
+extern void test__f_type_array_int64ss_increase__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_int64ss_increase()
+ * @see f_int64ss_increase()
*/
extern void test__f_type_array_int64ss_increase__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int64ss_increase()
+ * @see f_int64ss_increase()
*/
-extern void test__f_type_array_int64ss_increase__parameter_checking(void **state);
+extern void test__f_type_array_int64ss_increase__works(void **state);
#endif // _TEST__F_type_array__int64ss_increase
extern "C" {
#endif
-void test__f_type_array_int64ss_increase_by__works(void **state) {
+void test__f_type_array_int64ss_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_int64ss_t data = f_int64ss_t_initialize;
+
+ {
+ const f_status_t status = f_int64ss_increase_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_int64ss_increase_by__returns_data_not(void **state) {
const int length = 5;
- f_int64ss_t data = f_int64s_t_initialize;
+ f_int64ss_t data = f_int64ss_t_initialize;
{
const f_status_t status = f_int64ss_resize(length, &data);
}
{
- data.used = length;
+ const f_status_t status = f_int64ss_increase_by(0, &data);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+ {
const f_status_t status = f_int64ss_increase_by(length, &data);
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
}
free((void *) data.array);
}
-void test__f_type_array_int64ss_increase_by__parameter_checking(void **state) {
+void test__f_type_array_int64ss_increase_by__works(void **state) {
const int length = 5;
- f_int64ss_t data = f_int64s_t_initialize;
+ f_int64ss_t data = f_int64ss_t_initialize;
{
- const f_status_t status = f_int64ss_increase_by(length, 0);
+ const f_status_t status = f_int64ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ {
+ data.used = length;
+
+ const f_status_t status = f_int64ss_increase_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_int_equal(data.size, length * 2);
+ }
+
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__int64ss_increase_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int64ss_increase_by()
+ * @see f_int64ss_increase_by()
*/
-extern void test__f_type_array_int64ss_increase_by__works(void **state);
+extern void test__f_type_array_int64ss_increase_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_int64ss_increase_by()
+ * @see f_int64ss_increase_by()
*/
-extern void test__f_type_array_int64ss_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_int64ss_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int64ss_increase_by()
+ */
+extern void test__f_type_array_int64ss_increase_by__works(void **state);
#endif // _TEST__F_type_array__int64ss_increase_by
extern "C" {
#endif
-void test__f_type_array_int64ss_resize__works(void **state) {
+void test__f_type_array_int64ss_resize__parameter_checking(void **state) {
const int length = 5;
f_int64ss_t data = f_int64ss_t_initialize;
{
- const f_status_t status = f_int64ss_resize(length, &data);
+ const f_status_t status = f_int64ss_resize(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_int64ss_resize__parameter_checking(void **state) {
+void test__f_type_array_int64ss_resize__works(void **state) {
const int length = 5;
f_int64ss_t data = f_int64ss_t_initialize;
{
- const f_status_t status = f_int64ss_resize(length, 0);
+ const f_status_t status = f_int64ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__int64ss_resize
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int64ss_resize()
+ * @see f_int64ss_resize()
*/
-extern void test__f_type_array_int64ss_resize__works(void **state);
+extern void test__f_type_array_int64ss_resize__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int64ss_resize()
+ * @see f_int64ss_resize()
*/
-extern void test__f_type_array_int64ss_resize__parameter_checking(void **state);
+extern void test__f_type_array_int64ss_resize__works(void **state);
#endif // _TEST__F_type_array__int64ss_resize
extern "C" {
#endif
-void test__f_type_array_int8s_adjust__works(void **state) {
+void test__f_type_array_int8s_adjust__parameter_checking(void **state) {
const int length = 5;
f_int8s_t data = f_int8s_t_initialize;
{
- const f_status_t status = f_int8s_adjust(length, &data);
+ const f_status_t status = f_int8s_adjust(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_int8s_adjust__parameter_checking(void **state) {
+void test__f_type_array_int8s_adjust__works(void **state) {
const int length = 5;
f_int8s_t data = f_int8s_t_initialize;
{
- const f_status_t status = f_int8s_adjust(length, 0);
+ const f_status_t status = f_int8s_adjust(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__int8s_adjust
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int8s_adjust()
+ * @see f_int8s_adjust()
*/
-extern void test__f_type_array_int8s_adjust__works(void **state);
+extern void test__f_type_array_int8s_adjust__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int8s_adjust()
+ * @see f_int8s_adjust()
*/
-extern void test__f_type_array_int8s_adjust__parameter_checking(void **state);
+extern void test__f_type_array_int8s_adjust__works(void **state);
#endif // _TEST__F_type_array__int8s_adjust
extern "C" {
#endif
+void test__f_type_array_int8s_append__parameter_checking(void **state) {
+
+ const int8_t data = 0;
+
+ {
+ const f_status_t status = f_int8s_append(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
void test__f_type_array_int8s_append__works(void **state) {
const int8_t source = 3;
free((void *) destination.array);
}
-void test__f_type_array_int8s_append__parameter_checking(void **state) {
-
- const uint8_t data = 0;
-
- {
- const f_status_t status = f_int8s_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__int8s_append
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int8s_append()
+ * @see f_int8s_append()
*/
-extern void test__f_type_array_int8s_append__works(void **state);
+extern void test__f_type_array_int8s_append__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int8s_append()
+ * @see f_int8s_append()
*/
-extern void test__f_type_array_int8s_append__parameter_checking(void **state);
+extern void test__f_type_array_int8s_append__works(void **state);
#endif // _TEST__F_type_array__int8s_append
extern "C" {
#endif
-void test__f_type_array_int8s_append_all__works(void **state) {
+void test__f_type_array_int8s_append_all__parameter_checking(void **state) {
+
+ const f_int8s_t data = f_int8s_t_initialize;
+
+ {
+ const f_status_t status = f_int8s_append_all(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_int8s_append_all__returns_data_not(void **state) {
const int length = 5;
- const int length_used = 2;
f_int8s_t source = f_int8s_t_initialize;
f_int8s_t destination = f_int8s_t_initialize;
assert_int_equal(source.size, length);
}
- for (; source.used < length_used; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
{
const f_status_t status = f_int8s_append_all(source, &destination);
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_array_length_t i = 0; i < source.used; ++i) {
- assert_int_equal(destination.array[i], i + 1);
- } // for
+ 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);
- free((void *) destination.array);
}
-void test__f_type_array_int8s_append_all__returns_data_not(void **state) {
+void test__f_type_array_int8s_append_all__works(void **state) {
const int length = 5;
+ const int length_used = 2;
f_int8s_t source = f_int8s_t_initialize;
f_int8s_t destination = f_int8s_t_initialize;
assert_int_equal(source.size, length);
}
+ for (; source.used < length_used; ++source.used) {
+ source.array[source.used] = source.used + 1;
+ } // for
+
{
const f_status_t status = f_int8s_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);
+ assert_int_equal(status, F_none);
+ assert_int_equal(destination.used, source.used);
+ assert_int_equal(destination.size, source.used);
+
+ for (f_array_length_t i = 0; i < source.used; ++i) {
+ assert_int_equal(destination.array[i], i + 1);
+ } // for
}
free((void *) source.array);
-}
-
-void test__f_type_array_int8s_append_all__parameter_checking(void **state) {
-
- const f_int8s_t data = f_int8s_t_initialize;
-
- {
- const f_status_t status = f_int8s_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
+ free((void *) destination.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__int8s_append_all
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int8s_append_all()
+ * @see f_int8s_append_all()
*/
-extern void test__f_type_array_int8s_append_all__works(void **state);
+extern void test__f_type_array_int8s_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 returns F_data_not.
*
- * @see f_type_array_int8s_append_all()
+ * @see f_int8s_append_all()
*/
extern void test__f_type_array_int8s_append_all__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int8s_append_all()
+ * @see f_int8s_append_all()
*/
-extern void test__f_type_array_int8s_append_all__parameter_checking(void **state);
+extern void test__f_type_array_int8s_append_all__works(void **state);
#endif // _TEST__F_type_array__int8s_append_all
extern "C" {
#endif
-void test__f_type_array_int8s_decimate_by__works(void **state) {
+void test__f_type_array_int8s_decimate_by__parameter_checking(void **state) {
const int length = 5;
f_int8s_t data = f_int8s_t_initialize;
{
- const f_status_t status = f_int8s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int8s_decimate_by(length, &data);
+ const f_status_t status = f_int8s_decimate_by(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
assert_null(data.array);
}
-void test__f_type_array_int8s_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_int8s_decimate_by__works(void **state) {
const int length = 5;
f_int8s_t data = f_int8s_t_initialize;
{
- const f_status_t status = f_int8s_decimate_by(length, 0);
+ const f_status_t status = f_int8s_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_int8s_decimate_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__int8s_decimate_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int8s_decimate_by()
+ * @see f_int8s_decimate_by()
*/
-extern void test__f_type_array_int8s_decimate_by__works(void **state);
+extern void test__f_type_array_int8s_decimate_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int8s_decimate_by()
+ * @see f_int8s_decimate_by()
*/
-extern void test__f_type_array_int8s_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_int8s_decimate_by__works(void **state);
#endif // _TEST__F_type_array__int8s_decimate_by
extern "C" {
#endif
-void test__f_type_array_int8s_decrease_by__works(void **state) {
+void test__f_type_array_int8s_decrease_by__parameter_checking(void **state) {
const int length = 5;
f_int8s_t data = f_int8s_t_initialize;
{
- const f_status_t status = f_int8s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_int8s_decrease_by(length, &data);
+ const f_status_t status = f_int8s_decrease_by(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
assert_null(data.array);
}
-void test__f_type_array_int8s_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_int8s_decrease_by__works(void **state) {
const int length = 5;
f_int8s_t data = f_int8s_t_initialize;
{
- const f_status_t status = f_int8s_decrease_by(length, 0);
+ const f_status_t status = f_int8s_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_int8s_decrease_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__int8s_decrease_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int8s_decrease_by()
+ * @see f_int8s_decrease_by()
*/
-extern void test__f_type_array_int8s_decrease_by__works(void **state);
+extern void test__f_type_array_int8s_decrease_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int8s_decrease_by()
+ * @see f_int8s_decrease_by()
*/
-extern void test__f_type_array_int8s_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_int8s_decrease_by__works(void **state);
#endif // _TEST__F_type_array__int8s_decrease_by
extern "C" {
#endif
-void test__f_type_array_int8s_increase__works(void **state) {
+void test__f_type_array_int8s_increase__parameter_checking(void **state) {
const int length = 5;
f_int8s_t data = f_int8s_t_initialize;
{
- const f_status_t status = f_int8s_resize(length, &data);
+ const f_status_t status = f_int8s_increase(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_int8s_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ assert_int_equal(data.size, 0);
}
free((void *) data.array);
free((void *) data.array);
}
-void test__f_type_array_int8s_increase__parameter_checking(void **state) {
+void test__f_type_array_int8s_increase__works(void **state) {
const int length = 5;
f_int8s_t data = f_int8s_t_initialize;
{
- const f_status_t status = f_int8s_increase(length, 0);
+ const f_status_t status = f_int8s_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_int8s_increase(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
}
free((void *) data.array);
#define _TEST__F_type_array__int8s_increase
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int8s_increase()
+ * @see f_int8s_increase()
*/
-extern void test__f_type_array_int8s_increase__works(void **state);
+extern void test__f_type_array_int8s_increase__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_int8s_increase()
+ * @see f_int8s_increase()
*/
extern void test__f_type_array_int8s_increase__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int8s_increase()
+ * @see f_int8s_increase()
*/
-extern void test__f_type_array_int8s_increase__parameter_checking(void **state);
+extern void test__f_type_array_int8s_increase__works(void **state);
#endif // _TEST__F_type_array__int8s_increase
extern "C" {
#endif
+void test__f_type_array_int8s_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_int8s_t data = f_int8s_t_initialize;
+
+ {
+ const f_status_t status = f_int8s_increase_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
void test__f_type_array_int8s_increase_by__works(void **state) {
const int length = 5;
free((void *) data.array);
}
-void test__f_type_array_int8s_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_int8s_t data = f_int8s_t_initialize;
-
- {
- const f_status_t status = f_int8s_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__int8s_increase_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int8s_increase_by()
+ * @see f_int8s_increase_by()
*/
-extern void test__f_type_array_int8s_increase_by__works(void **state);
+extern void test__f_type_array_int8s_increase_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int8s_increase_by()
+ * @see f_int8s_increase_by()
*/
-extern void test__f_type_array_int8s_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_int8s_increase_by__works(void **state);
#endif // _TEST__F_type_array__int8s_increase_by
extern "C" {
#endif
-void test__f_type_array_int8s_resize__works(void **state) {
+void test__f_type_array_int8s_resize__parameter_checking(void **state) {
const int length = 5;
f_int8s_t data = f_int8s_t_initialize;
{
- const f_status_t status = f_int8s_resize(length, &data);
+ const f_status_t status = f_int8s_resize(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_int8s_resize__parameter_checking(void **state) {
+void test__f_type_array_int8s_resize__works(void **state) {
const int length = 5;
f_int8s_t data = f_int8s_t_initialize;
{
- const f_status_t status = f_int8s_resize(length, 0);
+ const f_status_t status = f_int8s_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__int8s_resize
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int8s_resize()
+ * @see f_int8s_resize()
*/
-extern void test__f_type_array_int8s_resize__works(void **state);
+extern void test__f_type_array_int8s_resize__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int8s_resize()
+ * @see f_int8s_resize()
*/
-extern void test__f_type_array_int8s_resize__parameter_checking(void **state);
+extern void test__f_type_array_int8s_resize__works(void **state);
#endif // _TEST__F_type_array__int8s_resize
extern "C" {
#endif
-void test__f_type_array_int8ss_adjust__works(void **state) {
+void test__f_type_array_int8ss_adjust__parameter_checking(void **state) {
const int length = 5;
f_int8ss_t data = f_int8ss_t_initialize;
{
- const f_status_t status = f_int8ss_adjust(length, &data);
+ const f_status_t status = f_int8ss_adjust(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_int8ss_adjust__parameter_checking(void **state) {
+void test__f_type_array_int8ss_adjust__works(void **state) {
const int length = 5;
f_int8ss_t data = f_int8ss_t_initialize;
{
- const f_status_t status = f_int8ss_adjust(length, 0);
+ const f_status_t status = f_int8ss_adjust(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__int8ss_adjust
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int8ss_adjust()
+ * @see f_int8ss_adjust()
*/
-extern void test__f_type_array_int8ss_adjust__works(void **state);
+extern void test__f_type_array_int8ss_adjust__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int8ss_adjust()
+ * @see f_int8ss_adjust()
*/
-extern void test__f_type_array_int8ss_adjust__parameter_checking(void **state);
+extern void test__f_type_array_int8ss_adjust__works(void **state);
#endif // _TEST__F_type_array__int8ss_adjust
extern "C" {
#endif
-void test__f_type_array_int8ss_append__works(void **state) {
+void test__f_type_array_int8ss_append__parameter_checking(void **state) {
+
+ f_int8s_t data = f_int8s_t_initialize;
+
+ {
+ const f_status_t status = f_int8ss_append(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_int8ss_append__returns_data_not(void **state) {
const int length = 5;
f_int8s_t source = f_int8s_t_initialize;
assert_int_equal(source.size, length);
}
- for (; source.used < length; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
{
const f_status_t status = f_int8ss_append(source, &destination);
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0].used, source.used);
- assert_int_equal(destination.array[0].size, source.used);
-
- for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
- assert_int_equal(destination.array[0].array[i], i + 1);
- } // for
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(destination.used, 0);
+ assert_int_equal(destination.size, 0);
+ assert_null(destination.array);
}
- for (f_array_length_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
free((void *) source.array);
- free((void *) destination.array);
}
-void test__f_type_array_int8ss_append__returns_data_not(void **state) {
+void test__f_type_array_int8ss_append__works(void **state) {
const int length = 5;
f_int8s_t source = f_int8s_t_initialize;
assert_int_equal(source.size, length);
}
+ for (; source.used < length; ++source.used) {
+ source.array[source.used] = source.used + 1;
+ } // for
+
{
const f_status_t status = f_int8ss_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_type_array_int8ss_append__parameter_checking(void **state) {
+ assert_int_equal(status, F_none);
+ assert_int_equal(destination.used, 1);
+ assert_int_equal(destination.array[0].used, source.used);
+ assert_int_equal(destination.array[0].size, source.used);
- f_int8s_t data = f_int8s_t_initialize;
+ for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
+ assert_int_equal(destination.array[0].array[i], i + 1);
+ } // for
+ }
- {
- const f_status_t status = f_int8ss_append(data, 0);
+ for (f_array_length_t i = 0; i < destination.used; ++i) {
+ free((void *) destination.array[i].array);
+ } // for
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
+ free((void *) source.array);
+ free((void *) destination.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__int8ss_append
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int8ss_append()
+ * @see f_int8ss_append()
*/
-extern void test__f_type_array_int8ss_append__works(void **state);
+extern void test__f_type_array_int8ss_append__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_int8ss_append()
+ * @see f_int8ss_append()
*/
extern void test__f_type_array_int8ss_append__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int8ss_append()
+ * @see f_int8ss_append()
*/
-extern void test__f_type_array_int8ss_append__parameter_checking(void **state);
+extern void test__f_type_array_int8ss_append__works(void **state);
#endif // _TEST__F_type_array__int8ss_append
extern "C" {
#endif
+void test__f_type_array_int8ss_append_all__parameter_checking(void **state) {
+
+ const f_int8ss_t data = f_int8ss_t_initialize;
+
+ {
+ const f_status_t status = f_int8ss_append_all(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_int8ss_append_all__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_int8ss_t source = f_int8ss_t_initialize;
+ f_int8ss_t destination = f_int8ss_t_initialize;
+
+ {
+ const f_status_t status = f_int8ss_resize(length, &source);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(source.used, 0);
+ assert_int_equal(source.size, length);
+ }
+
+ {
+ const f_status_t status = f_int8ss_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_type_array_int8ss_append_all__works(void **state) {
const int length = 5;
free((void *) destination.array);
}
-void test__f_type_array_int8ss_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_int8ss_t source = f_int8ss_t_initialize;
- f_int8ss_t destination = f_int8ss_t_initialize;
-
- {
- const f_status_t status = f_int8ss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_int8ss_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_type_array_int8ss_append_all__parameter_checking(void **state) {
-
- const f_int8ss_t data = f_int8ss_t_initialize;
-
- {
- const f_status_t status = f_int8ss_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__int8ss_append_all
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int8ss_append_all()
+ * @see f_int8ss_append_all()
*/
-extern void test__f_type_array_int8ss_append_all__works(void **state);
+extern void test__f_type_array_int8ss_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 returns F_data_not.
*
- * @see f_type_array_int8ss_append_all()
+ * @see f_int8ss_append_all()
*/
extern void test__f_type_array_int8ss_append_all__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int8ss_append_all()
+ * @see f_int8ss_append_all()
*/
-extern void test__f_type_array_int8ss_append_all__parameter_checking(void **state);
+extern void test__f_type_array_int8ss_append_all__works(void **state);
#endif // _TEST__F_type_array__int8ss_append_all
extern "C" {
#endif
-void test__f_type_array_int8ss_decimate_by__works(void **state) {
+void test__f_type_array_int8ss_decimate_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_int8ss_t data = f_int8ss_t_initialize;
+
+ {
+ const f_status_t status = f_int8ss_decimate_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_int8ss_decimate_by__returns_data_not(void **state) {
const int length = 5;
- f_int8ss_t data = f_int8s_t_initialize;
+ f_int8ss_t data = f_int8ss_t_initialize;
{
const f_status_t status = f_int8ss_resize(length, &data);
}
{
- const f_status_t status = f_int8ss_decimate_by(length, &data);
+ const f_status_t status = f_int8ss_decimate_by(0, &data);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_data_not);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
-void test__f_type_array_int8ss_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_int8ss_decimate_by__works(void **state) {
const int length = 5;
- f_int8ss_t data = f_int8s_t_initialize;
+ f_int8ss_t data = f_int8ss_t_initialize;
{
- const f_status_t status = f_int8ss_decimate_by(length, 0);
+ const f_status_t status = f_int8ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_int8ss_decimate_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__int8ss_decimate_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int8ss_decimate_by()
+ * @see f_int8ss_decimate_by()
*/
-extern void test__f_type_array_int8ss_decimate_by__works(void **state);
+extern void test__f_type_array_int8ss_decimate_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
* @see f_type_array_int8ss_decimate_by()
*/
-extern void test__f_type_array_int8ss_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_int8ss_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int8ss_decimate_by()
+ */
+extern void test__f_type_array_int8ss_decimate_by__works(void **state);
#endif // _TEST__F_type_array__int8ss_decimate_by
extern "C" {
#endif
-void test__f_type_array_int8ss_decrease_by__works(void **state) {
+void test__f_type_array_int8ss_decrease_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_int8ss_t data = f_int8ss_t_initialize;
+
+ {
+ const f_status_t status = f_int8ss_decrease_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_int8ss_decrease_by__returns_data_not(void **state) {
const int length = 5;
- f_int8ss_t data = f_int8s_t_initialize;
+ f_int8ss_t data = f_int8ss_t_initialize;
{
const f_status_t status = f_int8ss_resize(length, &data);
}
{
- const f_status_t status = f_int8ss_decrease_by(length, &data);
+ const f_status_t status = f_int8ss_decrease_by(0, &data);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_data_not);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
-void test__f_type_array_int8ss_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_int8ss_decrease_by__works(void **state) {
const int length = 5;
- f_int8ss_t data = f_int8s_t_initialize;
+ f_int8ss_t data = f_int8ss_t_initialize;
{
- const f_status_t status = f_int8ss_decrease_by(length, 0);
+ const f_status_t status = f_int8ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_int8ss_decrease_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__int8ss_decrease_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int8ss_decrease_by()
+ * @see f_int8ss_decrease_by()
*/
-extern void test__f_type_array_int8ss_decrease_by__works(void **state);
+extern void test__f_type_array_int8ss_decrease_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_int8ss_decrease_by()
+ * @see f_int8ss_decrease_by()
*/
-extern void test__f_type_array_int8ss_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_int8ss_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int8ss_decrease_by()
+ */
+extern void test__f_type_array_int8ss_decrease_by__works(void **state);
#endif // _TEST__F_type_array__int8ss_decrease_by
extern "C" {
#endif
-void test__f_type_array_int8ss_increase__works(void **state) {
+void test__f_type_array_int8ss_increase__parameter_checking(void **state) {
const int length = 5;
f_int8ss_t data = f_int8s_t_initialize;
{
- const f_status_t status = f_int8ss_resize(length, &data);
+ const f_status_t status = f_int8ss_increase(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_int8ss_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ assert_int_equal(data.size, 0);
}
free((void *) data.array);
void test__f_type_array_int8ss_increase__returns_data_not(void **state) {
const int length = 5;
- f_int8ss_t data = f_int8s_t_initialize;
+ f_int8ss_t data = f_int8ss_t_initialize;
{
const f_status_t status = f_int8ss_resize(length, &data);
free((void *) data.array);
}
-void test__f_type_array_int8ss_increase__parameter_checking(void **state) {
+void test__f_type_array_int8ss_increase__works(void **state) {
const int length = 5;
- f_int8ss_t data = f_int8s_t_initialize;
+ f_int8ss_t data = f_int8ss_t_initialize;
{
- const f_status_t status = f_int8ss_increase(length, 0);
+ const f_status_t status = f_int8ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_int8ss_increase(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
}
free((void *) data.array);
#define _TEST__F_type_array__int8ss_increase
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int8ss_increase()
+ * @see f_int8ss_increase()
*/
-extern void test__f_type_array_int8ss_increase__works(void **state);
+extern void test__f_type_array_int8ss_increase__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_int8ss_increase()
+ * @see f_int8ss_increase()
*/
extern void test__f_type_array_int8ss_increase__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int8ss_increase()
+ * @see f_int8ss_increase()
*/
-extern void test__f_type_array_int8ss_increase__parameter_checking(void **state);
+extern void test__f_type_array_int8ss_increase__works(void **state);
#endif // _TEST__F_type_array__int8ss_increase
extern "C" {
#endif
-void test__f_type_array_int8ss_increase_by__works(void **state) {
+void test__f_type_array_int8ss_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_int8ss_t data = f_int8ss_t_initialize;
+
+ {
+ const f_status_t status = f_int8ss_increase_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_int8ss_increase_by__returns_data_not(void **state) {
const int length = 5;
- f_int8ss_t data = f_int8s_t_initialize;
+ f_int8ss_t data = f_int8ss_t_initialize;
{
const f_status_t status = f_int8ss_resize(length, &data);
}
{
- data.used = length;
+ const f_status_t status = f_int8ss_increase_by(0, &data);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+ {
const f_status_t status = f_int8ss_increase_by(length, &data);
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
}
free((void *) data.array);
}
-void test__f_type_array_int8ss_increase_by__parameter_checking(void **state) {
+void test__f_type_array_int8ss_increase_by__works(void **state) {
const int length = 5;
- f_int8ss_t data = f_int8s_t_initialize;
+ f_int8ss_t data = f_int8ss_t_initialize;
{
- const f_status_t status = f_int8ss_increase_by(length, 0);
+ const f_status_t status = f_int8ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ {
+ data.used = length;
+
+ const f_status_t status = f_int8ss_increase_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_int_equal(data.size, length * 2);
+ }
+
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__int8ss_increase_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int8ss_increase_by()
+ * @see f_int8ss_increase_by()
*/
-extern void test__f_type_array_int8ss_increase_by__works(void **state);
+extern void test__f_type_array_int8ss_increase_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_int8ss_increase_by()
+ * @see f_int8ss_increase_by()
*/
-extern void test__f_type_array_int8ss_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_int8ss_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_int8ss_increase_by()
+ */
+extern void test__f_type_array_int8ss_increase_by__works(void **state);
#endif // _TEST__F_type_array__int8ss_increase_by
extern "C" {
#endif
-void test__f_type_array_int8ss_resize__works(void **state) {
+void test__f_type_array_int8ss_resize__parameter_checking(void **state) {
const int length = 5;
f_int8ss_t data = f_int8ss_t_initialize;
{
- const f_status_t status = f_int8ss_resize(length, &data);
+ const f_status_t status = f_int8ss_resize(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_int8ss_resize__parameter_checking(void **state) {
+void test__f_type_array_int8ss_resize__works(void **state) {
const int length = 5;
f_int8ss_t data = f_int8ss_t_initialize;
{
- const f_status_t status = f_int8ss_resize(length, 0);
+ const f_status_t status = f_int8ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__int8ss_resize
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_int8ss_resize()
+ * @see f_int8ss_resize()
*/
-extern void test__f_type_array_int8ss_resize__works(void **state);
+extern void test__f_type_array_int8ss_resize__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_int8ss_resize()
+ * @see f_int8ss_resize()
*/
-extern void test__f_type_array_int8ss_resize__parameter_checking(void **state);
+extern void test__f_type_array_int8ss_resize__works(void **state);
#endif // _TEST__F_type_array__int8ss_resize
extern "C" {
#endif
-void test__f_type_array_states_adjust__works(void **state) {
+void test__f_type_array_states_adjust__parameter_checking(void **state) {
const int length = 5;
f_states_t data = f_states_t_initialize;
{
- const f_status_t status = f_states_adjust(length, &data);
+ const f_status_t status = f_states_adjust(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_states_adjust__parameter_checking(void **state) {
+void test__f_type_array_states_adjust__works(void **state) {
const int length = 5;
f_states_t data = f_states_t_initialize;
{
- const f_status_t status = f_states_adjust(length, 0);
+ const f_status_t status = f_states_adjust(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__states_adjust
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_states_adjust()
+ * @see f_states_adjust()
*/
-extern void test__f_type_array_states_adjust__works(void **state);
+extern void test__f_type_array_states_adjust__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_states_adjust()
+ * @see f_states_adjust()
*/
-extern void test__f_type_array_states_adjust__parameter_checking(void **state);
+extern void test__f_type_array_states_adjust__works(void **state);
#endif // _TEST__F_type_array__states_adjust
extern "C" {
#endif
+void test__f_type_array_states_append__parameter_checking(void **state) {
+
+ const f_state_t data = f_state_t_initialize;
+
+ {
+ const f_status_t status = f_states_append(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
void test__f_type_array_states_append__works(void **state) {
int fake_1 = 1;
free((void *) destination.array);
}
-void test__f_type_array_states_append__parameter_checking(void **state) {
-
- const f_state_t data = f_state_t_initialize;
-
- {
- const f_status_t status = f_states_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__states_append
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_states_append()
+ * @see f_states_append()
*/
-extern void test__f_type_array_states_append__works(void **state);
+extern void test__f_type_array_states_append__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_states_append()
+ * @see f_states_append()
*/
-extern void test__f_type_array_states_append__parameter_checking(void **state);
+extern void test__f_type_array_states_append__works(void **state);
#endif // _TEST__F_type_array__states_append
extern "C" {
#endif
+void test__f_type_array_states_append_all__parameter_checking(void **state) {
+
+ const f_states_t data = f_states_t_initialize;
+
+ {
+ const f_status_t status = f_states_append_all(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_states_append_all__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_states_t source = f_states_t_initialize;
+ f_states_t destination = f_states_t_initialize;
+
+ {
+ const f_status_t status = f_states_resize(length, &source);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(source.used, 0);
+ assert_int_equal(source.size, length);
+ }
+
+ {
+ const f_status_t status = f_states_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_type_array_states_append_all__works(void **state) {
const int length = 5;
free((void *) destination.array);
}
-void test__f_type_array_states_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_states_t source = f_states_t_initialize;
- f_states_t destination = f_states_t_initialize;
-
- {
- const f_status_t status = f_states_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_states_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_type_array_states_append_all__parameter_checking(void **state) {
-
- const f_states_t data = f_states_t_initialize;
-
- {
- const f_status_t status = f_states_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__states_append_all
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_states_append_all()
+ * @see f_states_append_all()
*/
-extern void test__f_type_array_states_append_all__works(void **state);
+extern void test__f_type_array_states_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 returns F_data_not.
*
- * @see f_type_array_states_append_all()
+ * @see f_states_append_all()
*/
extern void test__f_type_array_states_append_all__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_states_append_all()
+ * @see f_states_append_all()
*/
-extern void test__f_type_array_states_append_all__parameter_checking(void **state);
+extern void test__f_type_array_states_append_all__works(void **state);
#endif // _TEST__F_type_array__states_append_all
extern "C" {
#endif
-void test__f_type_array_states_decimate_by__works(void **state) {
+void test__f_type_array_states_decimate_by__parameter_checking(void **state) {
const int length = 5;
f_states_t data = f_states_t_initialize;
{
- const f_status_t status = f_states_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_states_decimate_by(length, &data);
+ const f_status_t status = f_states_decimate_by(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
assert_null(data.array);
}
-void test__f_type_array_states_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_states_decimate_by__works(void **state) {
const int length = 5;
f_states_t data = f_states_t_initialize;
{
- const f_status_t status = f_states_decimate_by(length, 0);
+ const f_status_t status = f_states_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_states_decimate_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__states_decimate_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_states_decimate_by()
+ * @see f_states_decimate_by()
*/
-extern void test__f_type_array_states_decimate_by__works(void **state);
+extern void test__f_type_array_states_decimate_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_states_decimate_by()
+ * @see f_states_decimate_by()
*/
-extern void test__f_type_array_states_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_states_decimate_by__works(void **state);
#endif // _TEST__F_type_array__states_decimate_by
extern "C" {
#endif
-void test__f_type_array_states_decrease_by__works(void **state) {
+void test__f_type_array_states_decrease_by__parameter_checking(void **state) {
const int length = 5;
f_states_t data = f_states_t_initialize;
{
- const f_status_t status = f_states_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_states_decrease_by(length, &data);
+ const f_status_t status = f_states_decrease_by(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
assert_null(data.array);
}
-void test__f_type_array_states_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_states_decrease_by__works(void **state) {
const int length = 5;
f_states_t data = f_states_t_initialize;
{
- const f_status_t status = f_states_decrease_by(length, 0);
+ const f_status_t status = f_states_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_states_decrease_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__states_decrease_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_states_decrease_by()
+ * @see f_states_decrease_by()
*/
-extern void test__f_type_array_states_decrease_by__works(void **state);
+extern void test__f_type_array_states_decrease_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_states_decrease_by()
+ * @see f_states_decrease_by()
*/
-extern void test__f_type_array_states_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_states_decrease_by__works(void **state);
#endif // _TEST__F_type_array__states_decrease_by
extern "C" {
#endif
-void test__f_type_array_states_increase__works(void **state) {
+void test__f_type_array_states_increase__parameter_checking(void **state) {
const int length = 5;
f_states_t data = f_states_t_initialize;
{
- const f_status_t status = f_states_resize(length, &data);
+ const f_status_t status = f_states_increase(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_states_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ assert_int_equal(data.size, 0);
}
free((void *) data.array);
free((void *) data.array);
}
-void test__f_type_array_states_increase__parameter_checking(void **state) {
+void test__f_type_array_states_increase__works(void **state) {
const int length = 5;
f_states_t data = f_states_t_initialize;
{
- const f_status_t status = f_states_increase(length, 0);
+ const f_status_t status = f_states_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_states_increase(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
}
free((void *) data.array);
#define _TEST__F_type_array__states_increase
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_states_increase()
+ * @see f_states_increase()
*/
-extern void test__f_type_array_states_increase__works(void **state);
+extern void test__f_type_array_states_increase__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_states_increase()
+ * @see f_states_increase()
*/
extern void test__f_type_array_states_increase__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_states_increase()
+ * @see f_states_increase()
*/
-extern void test__f_type_array_states_increase__parameter_checking(void **state);
+extern void test__f_type_array_states_increase__works(void **state);
#endif // _TEST__F_type_array__states_increase
extern "C" {
#endif
+void test__f_type_array_states_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_states_t data = f_states_t_initialize;
+
+ {
+ const f_status_t status = f_states_increase_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
void test__f_type_array_states_increase_by__works(void **state) {
const int length = 5;
free((void *) data.array);
}
-void test__f_type_array_states_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_states_t data = f_states_t_initialize;
-
- {
- const f_status_t status = f_states_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__states_increase_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_states_increase_by()
+ * @see f_states_increase_by()
*/
-extern void test__f_type_array_states_increase_by__works(void **state);
+extern void test__f_type_array_states_increase_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_states_increase_by()
+ * @see f_states_increase_by()
*/
-extern void test__f_type_array_states_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_states_increase_by__works(void **state);
#endif // _TEST__F_type_array__states_increase_by
extern "C" {
#endif
-void test__f_type_array_states_resize__works(void **state) {
+void test__f_type_array_states_resize__parameter_checking(void **state) {
const int length = 5;
f_states_t data = f_states_t_initialize;
{
- const f_status_t status = f_states_resize(length, &data);
+ const f_status_t status = f_states_resize(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_states_resize__parameter_checking(void **state) {
+void test__f_type_array_states_resize__works(void **state) {
const int length = 5;
f_states_t data = f_states_t_initialize;
{
- const f_status_t status = f_states_resize(length, 0);
+ const f_status_t status = f_states_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__states_resize
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_states_resize()
+ * @see f_states_resize()
*/
-extern void test__f_type_array_states_resize__works(void **state);
+extern void test__f_type_array_states_resize__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_states_resize()
+ * @see f_states_resize()
*/
-extern void test__f_type_array_states_resize__parameter_checking(void **state);
+extern void test__f_type_array_states_resize__works(void **state);
#endif // _TEST__F_type_array__states_resize
extern "C" {
#endif
-void test__f_type_array_statess_adjust__works(void **state) {
+void test__f_type_array_statess_adjust__parameter_checking(void **state) {
const int length = 5;
f_statess_t data = f_statess_t_initialize;
{
- const f_status_t status = f_statess_adjust(length, &data);
+ const f_status_t status = f_statess_adjust(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_statess_adjust__parameter_checking(void **state) {
+void test__f_type_array_statess_adjust__works(void **state) {
const int length = 5;
f_statess_t data = f_statess_t_initialize;
{
- const f_status_t status = f_statess_adjust(length, 0);
+ const f_status_t status = f_statess_adjust(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__statess_adjust
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_statess_adjust()
+ * @see f_statess_adjust()
*/
-extern void test__f_type_array_statess_adjust__works(void **state);
+extern void test__f_type_array_statess_adjust__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_statess_adjust()
+ * @see f_statess_adjust()
*/
-extern void test__f_type_array_statess_adjust__parameter_checking(void **state);
+extern void test__f_type_array_statess_adjust__works(void **state);
#endif // _TEST__F_type_array__statess_adjust
extern "C" {
#endif
+void test__f_type_array_statess_append__parameter_checking(void **state) {
+
+ f_states_t data = f_states_t_initialize;
+
+ {
+ const f_status_t status = f_statess_append(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_statess_append__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_states_t source = f_states_t_initialize;
+ f_statess_t destination = f_statess_t_initialize;
+
+ {
+ const f_status_t status = f_states_resize(length, &source);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(source.used, 0);
+ assert_int_equal(source.size, length);
+ }
+
+ {
+ const f_status_t status = f_statess_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_type_array_statess_append__works(void **state) {
const int length = 5;
free((void *) destination.array);
}
-void test__f_type_array_statess_append__returns_data_not(void **state) {
-
- const int length = 5;
- f_states_t source = f_states_t_initialize;
- f_statess_t destination = f_statess_t_initialize;
-
- {
- const f_status_t status = f_states_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_statess_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_type_array_statess_append__parameter_checking(void **state) {
-
- f_states_t data = f_states_t_initialize;
-
- {
- const f_status_t status = f_statess_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__statess_append
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_statess_append()
+ * @see f_statess_append()
*/
-extern void test__f_type_array_statess_append__works(void **state);
+extern void test__f_type_array_statess_append__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_statess_append()
+ * @see f_statess_append()
*/
extern void test__f_type_array_statess_append__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_statess_append()
+ * @see f_statess_append()
*/
-extern void test__f_type_array_statess_append__parameter_checking(void **state);
+extern void test__f_type_array_statess_append__works(void **state);
#endif // _TEST__F_type_array__statess_append
extern "C" {
#endif
+void test__f_type_array_statess_append_all__parameter_checking(void **state) {
+
+ const f_statess_t data = f_statess_t_initialize;
+
+ {
+ const f_status_t status = f_statess_append_all(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_statess_append_all__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_statess_t source = f_statess_t_initialize;
+ f_statess_t destination = f_statess_t_initialize;
+
+ {
+ const f_status_t status = f_statess_resize(length, &source);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(source.used, 0);
+ assert_int_equal(source.size, length);
+ }
+
+ {
+ const f_status_t status = f_statess_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_type_array_statess_append_all__works(void **state) {
const int length = 5;
free((void *) destination.array);
}
-void test__f_type_array_statess_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_statess_t source = f_statess_t_initialize;
- f_statess_t destination = f_statess_t_initialize;
-
- {
- const f_status_t status = f_statess_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_statess_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_type_array_statess_append_all__parameter_checking(void **state) {
-
- const f_statess_t data = f_statess_t_initialize;
-
- {
- const f_status_t status = f_statess_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__statess_append_all
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_statess_append_all()
+ * @see f_statess_append_all()
*/
-extern void test__f_type_array_statess_append_all__works(void **state);
+extern void test__f_type_array_statess_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 returns F_data_not.
*
- * @see f_type_array_statess_append_all()
+ * @see f_statess_append_all()
*/
extern void test__f_type_array_statess_append_all__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_statess_append_all()
+ * @see f_statess_append_all()
*/
-extern void test__f_type_array_statess_append_all__parameter_checking(void **state);
+extern void test__f_type_array_statess_append_all__works(void **state);
#endif // _TEST__F_type_array__statess_append_all
extern "C" {
#endif
-void test__f_type_array_statess_decimate_by__works(void **state) {
+void test__f_type_array_statess_decimate_by__parameter_checking(void **state) {
const int length = 5;
f_statess_t data = f_states_t_initialize;
{
+ const f_status_t status = f_statess_decimate_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_statess_decimate_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_statess_t data = f_statess_t_initialize;
+
+ {
const f_status_t status = f_statess_resize(length, &data);
assert_int_equal(status, F_none);
}
{
- const f_status_t status = f_statess_decimate_by(length, &data);
+ const f_status_t status = f_statess_decimate_by(0, &data);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_data_not);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
-void test__f_type_array_statess_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_statess_decimate_by__works(void **state) {
const int length = 5;
f_statess_t data = f_states_t_initialize;
{
- const f_status_t status = f_statess_decimate_by(length, 0);
+ const f_status_t status = f_statess_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_statess_decimate_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__statess_decimate_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_statess_decimate_by()
+ * @see f_statess_decimate_by()
*/
-extern void test__f_type_array_statess_decimate_by__works(void **state);
+extern void test__f_type_array_statess_decimate_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
* @see f_type_array_statess_decimate_by()
*/
-extern void test__f_type_array_statess_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_statess_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_statess_decimate_by()
+ */
+extern void test__f_type_array_statess_decimate_by__works(void **state);
#endif // _TEST__F_type_array__statess_decimate_by
extern "C" {
#endif
-void test__f_type_array_statess_decrease_by__works(void **state) {
+void test__f_type_array_statess_decrease_by__parameter_checking(void **state) {
const int length = 5;
f_statess_t data = f_states_t_initialize;
{
+ const f_status_t status = f_statess_decrease_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_statess_decrease_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_statess_t data = f_statess_t_initialize;
+
+ {
const f_status_t status = f_statess_resize(length, &data);
assert_int_equal(status, F_none);
}
{
- const f_status_t status = f_statess_decrease_by(length, &data);
+ const f_status_t status = f_statess_decrease_by(0, &data);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_data_not);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
-void test__f_type_array_statess_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_statess_decrease_by__works(void **state) {
const int length = 5;
f_statess_t data = f_states_t_initialize;
{
- const f_status_t status = f_statess_decrease_by(length, 0);
+ const f_status_t status = f_statess_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_statess_decrease_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__statess_decrease_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_statess_decrease_by()
+ * @see f_statess_decrease_by()
*/
-extern void test__f_type_array_statess_decrease_by__works(void **state);
+extern void test__f_type_array_statess_decrease_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_statess_decrease_by()
+ * @see f_statess_decrease_by()
*/
-extern void test__f_type_array_statess_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_statess_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_statess_decrease_by()
+ */
+extern void test__f_type_array_statess_decrease_by__works(void **state);
#endif // _TEST__F_type_array__statess_decrease_by
extern "C" {
#endif
-void test__f_type_array_statess_increase__works(void **state) {
+void test__f_type_array_statess_increase__parameter_checking(void **state) {
const int length = 5;
f_statess_t data = f_states_t_initialize;
{
- const f_status_t status = f_statess_resize(length, &data);
+ const f_status_t status = f_statess_increase(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_statess_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ assert_int_equal(data.size, 0);
}
free((void *) data.array);
free((void *) data.array);
}
-void test__f_type_array_statess_increase__parameter_checking(void **state) {
+void test__f_type_array_statess_increase__works(void **state) {
const int length = 5;
f_statess_t data = f_states_t_initialize;
{
- const f_status_t status = f_statess_increase(length, 0);
+ const f_status_t status = f_statess_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_statess_increase(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
}
free((void *) data.array);
#define _TEST__F_type_array__statess_increase
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_statess_increase()
+ * @see f_statess_increase()
*/
-extern void test__f_type_array_statess_increase__works(void **state);
+extern void test__f_type_array_statess_increase__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_statess_increase()
+ * @see f_statess_increase()
*/
extern void test__f_type_array_statess_increase__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_statess_increase()
+ * @see f_statess_increase()
*/
-extern void test__f_type_array_statess_increase__parameter_checking(void **state);
+extern void test__f_type_array_statess_increase__works(void **state);
#endif // _TEST__F_type_array__statess_increase
extern "C" {
#endif
-void test__f_type_array_statess_increase_by__works(void **state) {
+void test__f_type_array_statess_increase_by__parameter_checking(void **state) {
const int length = 5;
f_statess_t data = f_states_t_initialize;
{
+ const f_status_t status = f_statess_increase_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_statess_increase_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_statess_t data = f_statess_t_initialize;
+
+ {
const f_status_t status = f_statess_resize(length, &data);
assert_int_equal(status, F_none);
}
{
- data.used = length;
+ const f_status_t status = f_statess_increase_by(0, &data);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+ {
const f_status_t status = f_statess_increase_by(length, &data);
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
}
free((void *) data.array);
}
-void test__f_type_array_statess_increase_by__parameter_checking(void **state) {
+void test__f_type_array_statess_increase_by__works(void **state) {
const int length = 5;
f_statess_t data = f_states_t_initialize;
{
- const f_status_t status = f_statess_increase_by(length, 0);
+ const f_status_t status = f_statess_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ {
+ data.used = length;
+
+ const f_status_t status = f_statess_increase_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_int_equal(data.size, length * 2);
+ }
+
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__statess_increase_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_statess_increase_by()
+ * @see f_statess_increase_by()
*/
-extern void test__f_type_array_statess_increase_by__works(void **state);
+extern void test__f_type_array_statess_increase_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_statess_increase_by()
+ * @see f_statess_increase_by()
*/
-extern void test__f_type_array_statess_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_statess_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_statess_increase_by()
+ */
+extern void test__f_type_array_statess_increase_by__works(void **state);
#endif // _TEST__F_type_array__statess_increase_by
extern "C" {
#endif
-void test__f_type_array_statess_resize__works(void **state) {
+void test__f_type_array_statess_resize__parameter_checking(void **state) {
const int length = 5;
f_statess_t data = f_statess_t_initialize;
{
- const f_status_t status = f_statess_resize(length, &data);
+ const f_status_t status = f_statess_resize(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_statess_resize__parameter_checking(void **state) {
+void test__f_type_array_statess_resize__works(void **state) {
const int length = 5;
f_statess_t data = f_statess_t_initialize;
{
- const f_status_t status = f_statess_resize(length, 0);
+ const f_status_t status = f_statess_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__statess_resize
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_statess_resize()
+ * @see f_statess_resize()
*/
-extern void test__f_type_array_statess_resize__works(void **state);
+extern void test__f_type_array_statess_resize__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_statess_resize()
+ * @see f_statess_resize()
*/
-extern void test__f_type_array_statess_resize__parameter_checking(void **state);
+extern void test__f_type_array_statess_resize__works(void **state);
#endif // _TEST__F_type_array__statess_resize
extern "C" {
#endif
-void test__f_type_array_statuss_adjust__works(void **state) {
+void test__f_type_array_statuss_adjust__parameter_checking(void **state) {
const int length = 5;
f_statuss_t data = f_statuss_t_initialize;
{
- const f_status_t status = f_statuss_adjust(length, &data);
+ const f_status_t status = f_statuss_adjust(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_statuss_adjust__parameter_checking(void **state) {
+void test__f_type_array_statuss_adjust__works(void **state) {
const int length = 5;
f_statuss_t data = f_statuss_t_initialize;
{
- const f_status_t status = f_statuss_adjust(length, 0);
+ const f_status_t status = f_statuss_adjust(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__statuss_adjust
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_statuss_adjust()
+ * @see f_statuss_adjust()
*/
-extern void test__f_type_array_statuss_adjust__works(void **state);
+extern void test__f_type_array_statuss_adjust__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_statuss_adjust()
+ * @see f_statuss_adjust()
*/
-extern void test__f_type_array_statuss_adjust__parameter_checking(void **state);
+extern void test__f_type_array_statuss_adjust__works(void **state);
#endif // _TEST__F_type_array__statuss_adjust
extern "C" {
#endif
+void test__f_type_array_statuss_append__parameter_checking(void **state) {
+
+ const f_status_t data = f_status_t_initialize;
+
+ {
+ const f_status_t status = f_statuss_append(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
void test__f_type_array_statuss_append__works(void **state) {
const f_status_t source = 3;
free((void *) destination.array);
}
-void test__f_type_array_statuss_append__parameter_checking(void **state) {
-
- const f_status_t data = f_status_t_initialize;
-
- {
- const f_status_t status = f_statuss_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__statuss_append
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_statuss_append()
+ * @see f_statuss_append()
*/
-extern void test__f_type_array_statuss_append__works(void **state);
+extern void test__f_type_array_statuss_append__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_statuss_append()
+ * @see f_statuss_append()
*/
-extern void test__f_type_array_statuss_append__parameter_checking(void **state);
+extern void test__f_type_array_statuss_append__works(void **state);
#endif // _TEST__F_type_array__statuss_append
extern "C" {
#endif
-void test__f_type_array_statuss_append_all__works(void **state) {
+void test__f_type_array_statuss_append_all__parameter_checking(void **state) {
+
+ const f_statuss_t data = f_statuss_t_initialize;
+
+ {
+ const f_status_t status = f_statuss_append_all(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_statuss_append_all__returns_data_not(void **state) {
const int length = 5;
- const int length_used = 2;
f_statuss_t source = f_statuss_t_initialize;
f_statuss_t destination = f_statuss_t_initialize;
assert_int_equal(source.size, length);
}
- for (; source.used < length_used; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
{
const f_status_t status = f_statuss_append_all(source, &destination);
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_array_length_t i = 0; i < source.used; ++i) {
- assert_int_equal(destination.array[i], i + 1);
- } // for
+ 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);
- free((void *) destination.array);
}
-void test__f_type_array_statuss_append_all__returns_data_not(void **state) {
+void test__f_type_array_statuss_append_all__works(void **state) {
const int length = 5;
+ const int length_used = 2;
f_statuss_t source = f_statuss_t_initialize;
f_statuss_t destination = f_statuss_t_initialize;
assert_int_equal(source.size, length);
}
+ for (; source.used < length_used; ++source.used) {
+ source.array[source.used] = source.used + 1;
+ } // for
+
{
const f_status_t status = f_statuss_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);
+ assert_int_equal(status, F_none);
+ assert_int_equal(destination.used, source.used);
+ assert_int_equal(destination.size, source.used);
+
+ for (f_array_length_t i = 0; i < source.used; ++i) {
+ assert_int_equal(destination.array[i], i + 1);
+ } // for
}
free((void *) source.array);
-}
-
-void test__f_type_array_statuss_append_all__parameter_checking(void **state) {
-
- const f_statuss_t data = f_statuss_t_initialize;
-
- {
- const f_status_t status = f_statuss_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
+ free((void *) destination.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__statuss_append_all
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_statuss_append_all()
+ * @see f_statuss_append_all()
*/
-extern void test__f_type_array_statuss_append_all__works(void **state);
+extern void test__f_type_array_statuss_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 returns F_data_not.
*
- * @see f_type_array_statuss_append_all()
+ * @see f_statuss_append_all()
*/
extern void test__f_type_array_statuss_append_all__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_statuss_append_all()
+ * @see f_statuss_append_all()
*/
-extern void test__f_type_array_statuss_append_all__parameter_checking(void **state);
+extern void test__f_type_array_statuss_append_all__works(void **state);
#endif // _TEST__F_type_array__statuss_append_all
extern "C" {
#endif
-void test__f_type_array_statuss_decimate_by__works(void **state) {
+void test__f_type_array_statuss_decimate_by__parameter_checking(void **state) {
const int length = 5;
f_statuss_t data = f_statuss_t_initialize;
{
- const f_status_t status = f_statuss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_statuss_decimate_by(length, &data);
+ const f_status_t status = f_statuss_decimate_by(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
assert_null(data.array);
}
-void test__f_type_array_statuss_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_statuss_decimate_by__works(void **state) {
const int length = 5;
f_statuss_t data = f_statuss_t_initialize;
{
- const f_status_t status = f_statuss_decimate_by(length, 0);
+ const f_status_t status = f_statuss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_statuss_decimate_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__statuss_decimate_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_statuss_decimate_by()
+ * @see f_statuss_decimate_by()
*/
-extern void test__f_type_array_statuss_decimate_by__works(void **state);
+extern void test__f_type_array_statuss_decimate_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_statuss_decimate_by()
+ * @see f_statuss_decimate_by()
*/
-extern void test__f_type_array_statuss_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_statuss_decimate_by__works(void **state);
#endif // _TEST__F_type_array__statuss_decimate_by
extern "C" {
#endif
-void test__f_type_array_statuss_decrease_by__works(void **state) {
+void test__f_type_array_statuss_decrease_by__parameter_checking(void **state) {
const int length = 5;
f_statuss_t data = f_statuss_t_initialize;
{
- const f_status_t status = f_statuss_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_statuss_decrease_by(length, &data);
+ const f_status_t status = f_statuss_decrease_by(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
assert_null(data.array);
}
-void test__f_type_array_statuss_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_statuss_decrease_by__works(void **state) {
const int length = 5;
f_statuss_t data = f_statuss_t_initialize;
{
- const f_status_t status = f_statuss_decrease_by(length, 0);
+ const f_status_t status = f_statuss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_statuss_decrease_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__statuss_decrease_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_statuss_decrease_by()
+ * @see f_statuss_decrease_by()
*/
-extern void test__f_type_array_statuss_decrease_by__works(void **state);
+extern void test__f_type_array_statuss_decrease_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_statuss_decrease_by()
+ * @see f_statuss_decrease_by()
*/
-extern void test__f_type_array_statuss_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_statuss_decrease_by__works(void **state);
#endif // _TEST__F_type_array__statuss_decrease_by
extern "C" {
#endif
-void test__f_type_array_statuss_increase__works(void **state) {
+void test__f_type_array_statuss_increase__parameter_checking(void **state) {
const int length = 5;
f_statuss_t data = f_statuss_t_initialize;
{
- const f_status_t status = f_statuss_resize(length, &data);
+ const f_status_t status = f_statuss_increase(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_statuss_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ assert_int_equal(data.size, 0);
}
free((void *) data.array);
free((void *) data.array);
}
-void test__f_type_array_statuss_increase__parameter_checking(void **state) {
+void test__f_type_array_statuss_increase__works(void **state) {
const int length = 5;
f_statuss_t data = f_statuss_t_initialize;
{
- const f_status_t status = f_statuss_increase(length, 0);
+ const f_status_t status = f_statuss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_statuss_increase(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
}
free((void *) data.array);
#define _TEST__F_type_array__statuss_increase
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_statuss_increase()
+ * @see f_statuss_increase()
*/
-extern void test__f_type_array_statuss_increase__works(void **state);
+extern void test__f_type_array_statuss_increase__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_statuss_increase()
+ * @see f_statuss_increase()
*/
extern void test__f_type_array_statuss_increase__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_statuss_increase()
+ * @see f_statuss_increase()
*/
-extern void test__f_type_array_statuss_increase__parameter_checking(void **state);
+extern void test__f_type_array_statuss_increase__works(void **state);
#endif // _TEST__F_type_array__statuss_increase
extern "C" {
#endif
+
+void test__f_type_array_statuss_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_statuss_t data = f_statuss_t_initialize;
+
+ {
+ const f_status_t status = f_statuss_increase_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
void test__f_type_array_statuss_increase_by__works(void **state) {
const int length = 5;
free((void *) data.array);
}
-void test__f_type_array_statuss_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_statuss_t data = f_statuss_t_initialize;
-
- {
- const f_status_t status = f_statuss_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__statuss_increase_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_statuss_increase_by()
+ * @see f_statuss_increase_by()
*/
-extern void test__f_type_array_statuss_increase_by__works(void **state);
+extern void test__f_type_array_statuss_increase_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_statuss_increase_by()
+ * @see f_statuss_increase_by()
*/
-extern void test__f_type_array_statuss_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_statuss_increase_by__works(void **state);
#endif // _TEST__F_type_array__statuss_increase_by
extern "C" {
#endif
-void test__f_type_array_statuss_resize__works(void **state) {
+void test__f_type_array_statuss_resize__parameter_checking(void **state) {
const int length = 5;
f_statuss_t data = f_statuss_t_initialize;
{
- const f_status_t status = f_statuss_resize(length, &data);
+ const f_status_t status = f_statuss_resize(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_statuss_resize__parameter_checking(void **state) {
+void test__f_type_array_statuss_resize__works(void **state) {
const int length = 5;
f_statuss_t data = f_statuss_t_initialize;
{
- const f_status_t status = f_statuss_resize(length, 0);
+ const f_status_t status = f_statuss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__statuss_resize
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_statuss_resize()
+ * @see f_statuss_resize()
*/
-extern void test__f_type_array_statuss_resize__works(void **state);
+extern void test__f_type_array_statuss_resize__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_statuss_resize()
+ * @see f_statuss_resize()
*/
-extern void test__f_type_array_statuss_resize__parameter_checking(void **state);
+extern void test__f_type_array_statuss_resize__works(void **state);
#endif // _TEST__F_type_array__statuss_resize
extern "C" {
#endif
-void test__f_type_array_statusss_adjust__works(void **state) {
+void test__f_type_array_statusss_adjust__parameter_checking(void **state) {
const int length = 5;
f_statusss_t data = f_statusss_t_initialize;
{
- const f_status_t status = f_statusss_adjust(length, &data);
+ const f_status_t status = f_statusss_adjust(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_statusss_adjust__parameter_checking(void **state) {
+void test__f_type_array_statusss_adjust__works(void **state) {
const int length = 5;
f_statusss_t data = f_statusss_t_initialize;
{
- const f_status_t status = f_statusss_adjust(length, 0);
+ const f_status_t status = f_statusss_adjust(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__statusss_adjust
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_statusss_adjust()
+ * @see f_statusss_adjust()
*/
-extern void test__f_type_array_statusss_adjust__works(void **state);
+extern void test__f_type_array_statusss_adjust__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_statusss_adjust()
+ * @see f_statusss_adjust()
*/
-extern void test__f_type_array_statusss_adjust__parameter_checking(void **state);
+extern void test__f_type_array_statusss_adjust__works(void **state);
#endif // _TEST__F_type_array__statusss_adjust
extern "C" {
#endif
-void test__f_type_array_statusss_append__works(void **state) {
+void test__f_type_array_statusss_append__parameter_checking(void **state) {
+
+ f_statuss_t data = f_statuss_t_initialize;
+
+ {
+ const f_status_t status = f_statusss_append(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_statusss_append__returns_data_not(void **state) {
const int length = 5;
f_statuss_t source = f_statuss_t_initialize;
assert_int_equal(source.size, length);
}
- for (; source.used < length; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
{
const f_status_t status = f_statusss_append(source, &destination);
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0].used, source.used);
- assert_int_equal(destination.array[0].size, source.used);
-
- for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
- assert_int_equal(destination.array[0].array[i], i + 1);
- } // for
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(destination.used, 0);
+ assert_int_equal(destination.size, 0);
+ assert_null(destination.array);
}
- for (f_array_length_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
free((void *) source.array);
- free((void *) destination.array);
}
-void test__f_type_array_statusss_append__returns_data_not(void **state) {
+void test__f_type_array_statusss_append__works(void **state) {
const int length = 5;
f_statuss_t source = f_statuss_t_initialize;
assert_int_equal(source.size, length);
}
+ for (; source.used < length; ++source.used) {
+ source.array[source.used] = source.used + 1;
+ } // for
+
{
const f_status_t status = f_statusss_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_type_array_statusss_append__parameter_checking(void **state) {
+ assert_int_equal(status, F_none);
+ assert_int_equal(destination.used, 1);
+ assert_int_equal(destination.array[0].used, source.used);
+ assert_int_equal(destination.array[0].size, source.used);
- f_statuss_t data = f_statuss_t_initialize;
+ for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
+ assert_int_equal(destination.array[0].array[i], i + 1);
+ } // for
+ }
- {
- const f_status_t status = f_statusss_append(data, 0);
+ for (f_array_length_t i = 0; i < destination.used; ++i) {
+ free((void *) destination.array[i].array);
+ } // for
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
+ free((void *) source.array);
+ free((void *) destination.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__statusss_append
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_statusss_append()
+ * @see f_statusss_append()
*/
-extern void test__f_type_array_statusss_append__works(void **state);
+extern void test__f_type_array_statusss_append__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_statusss_append()
+ * @see f_statusss_append()
*/
extern void test__f_type_array_statusss_append__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_statusss_append()
+ * @see f_statusss_append()
*/
-extern void test__f_type_array_statusss_append__parameter_checking(void **state);
+extern void test__f_type_array_statusss_append__works(void **state);
#endif // _TEST__F_type_array__statusss_append
extern "C" {
#endif
+void test__f_type_array_statusss_append_all__parameter_checking(void **state) {
+
+ const f_statusss_t data = f_statusss_t_initialize;
+
+ {
+ const f_status_t status = f_statusss_append_all(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_statusss_append_all__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_statusss_t source = f_statusss_t_initialize;
+ f_statusss_t destination = f_statusss_t_initialize;
+
+ {
+ const f_status_t status = f_statusss_resize(length, &source);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(source.used, 0);
+ assert_int_equal(source.size, length);
+ }
+
+ {
+ const f_status_t status = f_statusss_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_type_array_statusss_append_all__works(void **state) {
const int length = 5;
free((void *) destination.array);
}
-void test__f_type_array_statusss_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_statusss_t source = f_statusss_t_initialize;
- f_statusss_t destination = f_statusss_t_initialize;
-
- {
- const f_status_t status = f_statusss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_statusss_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_type_array_statusss_append_all__parameter_checking(void **state) {
-
- const f_statusss_t data = f_statusss_t_initialize;
-
- {
- const f_status_t status = f_statusss_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__statusss_append_all
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_statusss_append_all()
+ * @see f_statusss_append_all()
*/
-extern void test__f_type_array_statusss_append_all__works(void **state);
+extern void test__f_type_array_statusss_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 returns F_data_not.
*
- * @see f_type_array_statusss_append_all()
+ * @see f_statusss_append_all()
*/
extern void test__f_type_array_statusss_append_all__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_statusss_append_all()
+ * @see f_statusss_append_all()
*/
-extern void test__f_type_array_statusss_append_all__parameter_checking(void **state);
+extern void test__f_type_array_statusss_append_all__works(void **state);
#endif // _TEST__F_type_array__statusss_append_all
extern "C" {
#endif
-void test__f_type_array_statusss_decimate_by__works(void **state) {
+void test__f_type_array_statusss_decimate_by__parameter_checking(void **state) {
const int length = 5;
f_statusss_t data = f_statuss_t_initialize;
{
+ const f_status_t status = f_statusss_decimate_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_statusss_decimate_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_statusss_t data = f_statusss_t_initialize;
+
+ {
const f_status_t status = f_statusss_resize(length, &data);
assert_int_equal(status, F_none);
}
{
- const f_status_t status = f_statusss_decimate_by(length, &data);
+ const f_status_t status = f_statusss_decimate_by(0, &data);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_data_not);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
-void test__f_type_array_statusss_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_statusss_decimate_by__works(void **state) {
const int length = 5;
f_statusss_t data = f_statuss_t_initialize;
{
- const f_status_t status = f_statusss_decimate_by(length, 0);
+ const f_status_t status = f_statusss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_statusss_decimate_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__statusss_decimate_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_statusss_decimate_by()
+ * @see f_statusss_decimate_by()
*/
-extern void test__f_type_array_statusss_decimate_by__works(void **state);
+extern void test__f_type_array_statusss_decimate_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
* @see f_type_array_statusss_decimate_by()
*/
-extern void test__f_type_array_statusss_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_statusss_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_statusss_decimate_by()
+ */
+extern void test__f_type_array_statusss_decimate_by__works(void **state);
#endif // _TEST__F_type_array__statusss_decimate_by
extern "C" {
#endif
-void test__f_type_array_statusss_decrease_by__works(void **state) {
+void test__f_type_array_statusss_decrease_by__parameter_checking(void **state) {
const int length = 5;
f_statusss_t data = f_statuss_t_initialize;
{
+ const f_status_t status = f_statusss_decrease_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_statusss_decrease_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_statusss_t data = f_statusss_t_initialize;
+
+ {
const f_status_t status = f_statusss_resize(length, &data);
assert_int_equal(status, F_none);
}
{
- const f_status_t status = f_statusss_decrease_by(length, &data);
+ const f_status_t status = f_statusss_decrease_by(0, &data);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_data_not);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
-void test__f_type_array_statusss_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_statusss_decrease_by__works(void **state) {
const int length = 5;
f_statusss_t data = f_statuss_t_initialize;
{
- const f_status_t status = f_statusss_decrease_by(length, 0);
+ const f_status_t status = f_statusss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_statusss_decrease_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__statusss_decrease_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_statusss_decrease_by()
+ * @see f_statusss_decrease_by()
*/
-extern void test__f_type_array_statusss_decrease_by__works(void **state);
+extern void test__f_type_array_statusss_decrease_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_statusss_decrease_by()
+ * @see f_statusss_decrease_by()
*/
-extern void test__f_type_array_statusss_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_statusss_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_statusss_decrease_by()
+ */
+extern void test__f_type_array_statusss_decrease_by__works(void **state);
#endif // _TEST__F_type_array__statusss_decrease_by
extern "C" {
#endif
-void test__f_type_array_statusss_increase__works(void **state) {
+void test__f_type_array_statusss_increase__parameter_checking(void **state) {
const int length = 5;
f_statusss_t data = f_statuss_t_initialize;
{
- const f_status_t status = f_statusss_resize(length, &data);
+ const f_status_t status = f_statusss_increase(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_statusss_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ assert_int_equal(data.size, 0);
}
free((void *) data.array);
free((void *) data.array);
}
-void test__f_type_array_statusss_increase__parameter_checking(void **state) {
+void test__f_type_array_statusss_increase__works(void **state) {
const int length = 5;
f_statusss_t data = f_statuss_t_initialize;
{
- const f_status_t status = f_statusss_increase(length, 0);
+ const f_status_t status = f_statusss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_statusss_increase(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
}
free((void *) data.array);
#define _TEST__F_type_array__statusss_increase
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_statusss_increase()
+ * @see f_statusss_increase()
*/
-extern void test__f_type_array_statusss_increase__works(void **state);
+extern void test__f_type_array_statusss_increase__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_statusss_increase()
+ * @see f_statusss_increase()
*/
extern void test__f_type_array_statusss_increase__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_statusss_increase()
+ * @see f_statusss_increase()
*/
-extern void test__f_type_array_statusss_increase__parameter_checking(void **state);
+extern void test__f_type_array_statusss_increase__works(void **state);
#endif // _TEST__F_type_array__statusss_increase
extern "C" {
#endif
-void test__f_type_array_statusss_increase_by__works(void **state) {
+void test__f_type_array_statusss_increase_by__parameter_checking(void **state) {
const int length = 5;
f_statusss_t data = f_statuss_t_initialize;
{
+ const f_status_t status = f_statusss_increase_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_statusss_increase_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_statusss_t data = f_statusss_t_initialize;
+
+ {
const f_status_t status = f_statusss_resize(length, &data);
assert_int_equal(status, F_none);
}
{
- data.used = length;
+ const f_status_t status = f_statusss_increase_by(0, &data);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+ {
const f_status_t status = f_statusss_increase_by(length, &data);
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
}
free((void *) data.array);
}
-void test__f_type_array_statusss_increase_by__parameter_checking(void **state) {
+void test__f_type_array_statusss_increase_by__works(void **state) {
const int length = 5;
f_statusss_t data = f_statuss_t_initialize;
{
- const f_status_t status = f_statusss_increase_by(length, 0);
+ const f_status_t status = f_statusss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ {
+ data.used = length;
+
+ const f_status_t status = f_statusss_increase_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_int_equal(data.size, length * 2);
+ }
+
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__statusss_increase_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_statusss_increase_by()
+ * @see f_statusss_increase_by()
*/
-extern void test__f_type_array_statusss_increase_by__works(void **state);
+extern void test__f_type_array_statusss_increase_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_statusss_increase_by()
+ * @see f_statusss_increase_by()
*/
-extern void test__f_type_array_statusss_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_statusss_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_statusss_increase_by()
+ */
+extern void test__f_type_array_statusss_increase_by__works(void **state);
#endif // _TEST__F_type_array__statusss_increase_by
extern "C" {
#endif
-void test__f_type_array_statusss_resize__works(void **state) {
+void test__f_type_array_statusss_resize__parameter_checking(void **state) {
const int length = 5;
f_statusss_t data = f_statusss_t_initialize;
{
- const f_status_t status = f_statusss_resize(length, &data);
+ const f_status_t status = f_statusss_resize(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_statusss_resize__parameter_checking(void **state) {
+void test__f_type_array_statusss_resize__works(void **state) {
const int length = 5;
f_statusss_t data = f_statusss_t_initialize;
{
- const f_status_t status = f_statusss_resize(length, 0);
+ const f_status_t status = f_statusss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__statusss_resize
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_statusss_resize()
+ * @see f_statusss_resize()
*/
-extern void test__f_type_array_statusss_resize__works(void **state);
+extern void test__f_type_array_statusss_resize__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_statusss_resize()
+ * @see f_statusss_resize()
*/
-extern void test__f_type_array_statusss_resize__parameter_checking(void **state);
+extern void test__f_type_array_statusss_resize__works(void **state);
#endif // _TEST__F_type_array__statusss_resize
extern "C" {
#endif
-void test__f_type_array_uint128s_adjust__works(void **state) {
+void test__f_type_array_uint128s_adjust__parameter_checking(void **state) {
const int length = 5;
f_uint128s_t data = f_uint128s_t_initialize;
{
- const f_status_t status = f_uint128s_adjust(length, &data);
+ const f_status_t status = f_uint128s_adjust(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_uint128s_adjust__parameter_checking(void **state) {
+void test__f_type_array_uint128s_adjust__works(void **state) {
const int length = 5;
f_uint128s_t data = f_uint128s_t_initialize;
{
- const f_status_t status = f_uint128s_adjust(length, 0);
+ const f_status_t status = f_uint128s_adjust(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__uint128s_adjust
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint128s_adjust()
+ * @see f_uint128s_adjust()
*/
-extern void test__f_type_array_uint128s_adjust__works(void **state);
+extern void test__f_type_array_uint128s_adjust__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint128s_adjust()
+ * @see f_uint128s_adjust()
*/
-extern void test__f_type_array_uint128s_adjust__parameter_checking(void **state);
+extern void test__f_type_array_uint128s_adjust__works(void **state);
#endif // _TEST__F_type_array__uint128s_adjust
extern "C" {
#endif
+void test__f_type_array_uint128s_append__parameter_checking(void **state) {
+
+ const uint128_t data = 0;
+
+ {
+ const f_status_t status = f_uint128s_append(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
void test__f_type_array_uint128s_append__works(void **state) {
const uint128_t source = 3;
free((void *) destination.array);
}
-void test__f_type_array_uint128s_append__parameter_checking(void **state) {
-
- const uint128_t data = 0;
-
- {
- const f_status_t status = f_uint128s_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__uint128s_append
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint128s_append()
+ * @see f_uint128s_append()
*/
-extern void test__f_type_array_uint128s_append__works(void **state);
+extern void test__f_type_array_uint128s_append__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint128s_append()
+ * @see f_uint128s_append()
*/
-extern void test__f_type_array_uint128s_append__parameter_checking(void **state);
+extern void test__f_type_array_uint128s_append__works(void **state);
#endif // _TEST__F_type_array__uint128s_append
extern "C" {
#endif
-void test__f_type_array_uint128s_append_all__works(void **state) {
+void test__f_type_array_uint128s_append_all__parameter_checking(void **state) {
+
+ const f_uint128s_t data = f_uint128s_t_initialize;
+
+ {
+ const f_status_t status = f_uint128s_append_all(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_uint128s_append_all__returns_data_not(void **state) {
const int length = 5;
- const int length_used = 2;
f_uint128s_t source = f_uint128s_t_initialize;
f_uint128s_t destination = f_uint128s_t_initialize;
assert_int_equal(source.size, length);
}
- for (; source.used < length_used; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
{
const f_status_t status = f_uint128s_append_all(source, &destination);
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_array_length_t i = 0; i < source.used; ++i) {
- assert_int_equal(destination.array[i], i + 1);
- } // for
+ 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);
- free((void *) destination.array);
}
-void test__f_type_array_uint128s_append_all__returns_data_not(void **state) {
+void test__f_type_array_uint128s_append_all__works(void **state) {
const int length = 5;
+ const int length_used = 2;
f_uint128s_t source = f_uint128s_t_initialize;
f_uint128s_t destination = f_uint128s_t_initialize;
assert_int_equal(source.size, length);
}
+ for (; source.used < length_used; ++source.used) {
+ source.array[source.used] = source.used + 1;
+ } // for
+
{
const f_status_t status = f_uint128s_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);
+ assert_int_equal(status, F_none);
+ assert_int_equal(destination.used, source.used);
+ assert_int_equal(destination.size, source.used);
+
+ for (f_array_length_t i = 0; i < source.used; ++i) {
+ assert_int_equal(destination.array[i], i + 1);
+ } // for
}
free((void *) source.array);
-}
-
-void test__f_type_array_uint128s_append_all__parameter_checking(void **state) {
-
- const f_uint128s_t data = f_uint128s_t_initialize;
-
- {
- const f_status_t status = f_uint128s_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
+ free((void *) destination.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__uint128s_append_all
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint128s_append_all()
+ * @see f_uint128s_append_all()
*/
-extern void test__f_type_array_uint128s_append_all__works(void **state);
+extern void test__f_type_array_uint128s_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 returns F_data_not.
*
- * @see f_type_array_uint128s_append_all()
+ * @see f_uint128s_append_all()
*/
extern void test__f_type_array_uint128s_append_all__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint128s_append_all()
+ * @see f_uint128s_append_all()
*/
-extern void test__f_type_array_uint128s_append_all__parameter_checking(void **state);
+extern void test__f_type_array_uint128s_append_all__works(void **state);
#endif // _TEST__F_type_array__uint128s_append_all
extern "C" {
#endif
-void test__f_type_array_uint128s_decimate_by__works(void **state) {
+void test__f_type_array_uint128s_decimate_by__parameter_checking(void **state) {
const int length = 5;
f_uint128s_t data = f_uint128s_t_initialize;
{
- const f_status_t status = f_uint128s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint128s_decimate_by(length, &data);
+ const f_status_t status = f_uint128s_decimate_by(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
assert_null(data.array);
}
-void test__f_type_array_uint128s_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_uint128s_decimate_by__works(void **state) {
const int length = 5;
f_uint128s_t data = f_uint128s_t_initialize;
{
- const f_status_t status = f_uint128s_decimate_by(length, 0);
+ const f_status_t status = f_uint128s_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_uint128s_decimate_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__uint128s_decimate_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint128s_decimate_by()
+ * @see f_uint128s_decimate_by()
*/
-extern void test__f_type_array_uint128s_decimate_by__works(void **state);
+extern void test__f_type_array_uint128s_decimate_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint128s_decimate_by()
+ * @see f_uint128s_decimate_by()
*/
-extern void test__f_type_array_uint128s_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_uint128s_decimate_by__works(void **state);
#endif // _TEST__F_type_array__uint128s_decimate_by
extern "C" {
#endif
-void test__f_type_array_uint128s_decrease_by__works(void **state) {
+void test__f_type_array_uint128s_decrease_by__parameter_checking(void **state) {
const int length = 5;
f_uint128s_t data = f_uint128s_t_initialize;
{
- const f_status_t status = f_uint128s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint128s_decrease_by(length, &data);
+ const f_status_t status = f_uint128s_decrease_by(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
assert_null(data.array);
}
-void test__f_type_array_uint128s_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_uint128s_decrease_by__works(void **state) {
const int length = 5;
f_uint128s_t data = f_uint128s_t_initialize;
{
- const f_status_t status = f_uint128s_decrease_by(length, 0);
+ const f_status_t status = f_uint128s_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_uint128s_decrease_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__uint128s_decrease_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint128s_decrease_by()
+ * @see f_uint128s_decrease_by()
*/
-extern void test__f_type_array_uint128s_decrease_by__works(void **state);
+extern void test__f_type_array_uint128s_decrease_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint128s_decrease_by()
+ * @see f_uint128s_decrease_by()
*/
-extern void test__f_type_array_uint128s_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_uint128s_decrease_by__works(void **state);
#endif // _TEST__F_type_array__uint128s_decrease_by
extern "C" {
#endif
-void test__f_type_array_uint128s_increase__works(void **state) {
+void test__f_type_array_uint128s_increase__parameter_checking(void **state) {
const int length = 5;
f_uint128s_t data = f_uint128s_t_initialize;
{
- const f_status_t status = f_uint128s_resize(length, &data);
+ const f_status_t status = f_uint128s_increase(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_uint128s_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ assert_int_equal(data.size, 0);
}
free((void *) data.array);
free((void *) data.array);
}
-void test__f_type_array_uint128s_increase__parameter_checking(void **state) {
+void test__f_type_array_uint128s_increase__works(void **state) {
const int length = 5;
f_uint128s_t data = f_uint128s_t_initialize;
{
- const f_status_t status = f_uint128s_increase(length, 0);
+ const f_status_t status = f_uint128s_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_uint128s_increase(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
}
free((void *) data.array);
#define _TEST__F_type_array__uint128s_increase
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint128s_increase()
+ * @see f_uint128s_increase()
*/
-extern void test__f_type_array_uint128s_increase__works(void **state);
+extern void test__f_type_array_uint128s_increase__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_uint128s_increase()
+ * @see f_uint128s_increase()
*/
extern void test__f_type_array_uint128s_increase__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint128s_increase()
+ * @see f_uint128s_increase()
*/
-extern void test__f_type_array_uint128s_increase__parameter_checking(void **state);
+extern void test__f_type_array_uint128s_increase__works(void **state);
#endif // _TEST__F_type_array__uint128s_increase
extern "C" {
#endif
+void test__f_type_array_uint128s_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_uint128s_t data = f_uint128s_t_initialize;
+
+ {
+ const f_status_t status = f_uint128s_increase_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
void test__f_type_array_uint128s_increase_by__works(void **state) {
const int length = 5;
free((void *) data.array);
}
-void test__f_type_array_uint128s_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint128s_t data = f_uint128s_t_initialize;
-
- {
- const f_status_t status = f_uint128s_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__uint128s_increase_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint128s_increase_by()
+ * @see f_uint128s_increase_by()
*/
-extern void test__f_type_array_uint128s_increase_by__works(void **state);
+extern void test__f_type_array_uint128s_increase_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint128s_increase_by()
+ * @see f_uint128s_increase_by()
*/
-extern void test__f_type_array_uint128s_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_uint128s_increase_by__works(void **state);
#endif // _TEST__F_type_array__uint128s_increase_by
extern "C" {
#endif
-void test__f_type_array_uint128s_resize__works(void **state) {
+void test__f_type_array_uint128s_resize__parameter_checking(void **state) {
const int length = 5;
f_uint128s_t data = f_uint128s_t_initialize;
{
- const f_status_t status = f_uint128s_resize(length, &data);
+ const f_status_t status = f_uint128s_resize(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_uint128s_resize__parameter_checking(void **state) {
+void test__f_type_array_uint128s_resize__works(void **state) {
const int length = 5;
f_uint128s_t data = f_uint128s_t_initialize;
{
- const f_status_t status = f_uint128s_resize(length, 0);
+ const f_status_t status = f_uint128s_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__uint128s_resize
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint128s_resize()
+ * @see f_uint128s_resize()
*/
-extern void test__f_type_array_uint128s_resize__works(void **state);
+extern void test__f_type_array_uint128s_resize__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint128s_resize()
+ * @see f_uint128s_resize()
*/
-extern void test__f_type_array_uint128s_resize__parameter_checking(void **state);
+extern void test__f_type_array_uint128s_resize__works(void **state);
#endif // _TEST__F_type_array__uint128s_resize
extern "C" {
#endif
-void test__f_type_array_uint128ss_adjust__works(void **state) {
+void test__f_type_array_uint128ss_adjust__parameter_checking(void **state) {
const int length = 5;
f_uint128ss_t data = f_uint128ss_t_initialize;
{
- const f_status_t status = f_uint128ss_adjust(length, &data);
+ const f_status_t status = f_uint128ss_adjust(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_uint128ss_adjust__parameter_checking(void **state) {
+void test__f_type_array_uint128ss_adjust__works(void **state) {
const int length = 5;
f_uint128ss_t data = f_uint128ss_t_initialize;
{
- const f_status_t status = f_uint128ss_adjust(length, 0);
+ const f_status_t status = f_uint128ss_adjust(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__uint128ss_adjust
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint128ss_adjust()
+ * @see f_uint128ss_adjust()
*/
-extern void test__f_type_array_uint128ss_adjust__works(void **state);
+extern void test__f_type_array_uint128ss_adjust__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint128ss_adjust()
+ * @see f_uint128ss_adjust()
*/
-extern void test__f_type_array_uint128ss_adjust__parameter_checking(void **state);
+extern void test__f_type_array_uint128ss_adjust__works(void **state);
#endif // _TEST__F_type_array__uint128ss_adjust
extern "C" {
#endif
-void test__f_type_array_uint128ss_append__works(void **state) {
+void test__f_type_array_uint128ss_append__parameter_checking(void **state) {
+
+ f_uint128s_t data = f_uint128s_t_initialize;
+
+ {
+ const f_status_t status = f_uint128ss_append(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_uint128ss_append__returns_data_not(void **state) {
const int length = 5;
f_uint128s_t source = f_uint128s_t_initialize;
assert_int_equal(source.size, length);
}
- for (; source.used < length; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
{
const f_status_t status = f_uint128ss_append(source, &destination);
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0].used, source.used);
- assert_int_equal(destination.array[0].size, source.used);
-
- for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
- assert_int_equal(destination.array[0].array[i], i + 1);
- } // for
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(destination.used, 0);
+ assert_int_equal(destination.size, 0);
+ assert_null(destination.array);
}
- for (f_array_length_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
free((void *) source.array);
- free((void *) destination.array);
}
-void test__f_type_array_uint128ss_append__returns_data_not(void **state) {
+void test__f_type_array_uint128ss_append__works(void **state) {
const int length = 5;
f_uint128s_t source = f_uint128s_t_initialize;
assert_int_equal(source.size, length);
}
+ for (; source.used < length; ++source.used) {
+ source.array[source.used] = source.used + 1;
+ } // for
+
{
const f_status_t status = f_uint128ss_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_type_array_uint128ss_append__parameter_checking(void **state) {
+ assert_int_equal(status, F_none);
+ assert_int_equal(destination.used, 1);
+ assert_int_equal(destination.array[0].used, source.used);
+ assert_int_equal(destination.array[0].size, source.used);
- f_uint128s_t data = f_uint128s_t_initialize;
+ for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
+ assert_int_equal(destination.array[0].array[i], i + 1);
+ } // for
+ }
- {
- const f_status_t status = f_uint128ss_append(data, 0);
+ for (f_array_length_t i = 0; i < destination.used; ++i) {
+ free((void *) destination.array[i].array);
+ } // for
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
+ free((void *) source.array);
+ free((void *) destination.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__uint128ss_append
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint128ss_append()
+ * @see f_uint128ss_append()
*/
-extern void test__f_type_array_uint128ss_append__works(void **state);
+extern void test__f_type_array_uint128ss_append__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_uint128ss_append()
+ * @see f_uint128ss_append()
*/
extern void test__f_type_array_uint128ss_append__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint128ss_append()
+ * @see f_uint128ss_append()
*/
-extern void test__f_type_array_uint128ss_append__parameter_checking(void **state);
+extern void test__f_type_array_uint128ss_append__works(void **state);
#endif // _TEST__F_type_array__uint128ss_append
extern "C" {
#endif
+void test__f_type_array_uint128ss_append_all__parameter_checking(void **state) {
+
+ const f_uint128ss_t data = f_uint128ss_t_initialize;
+
+ {
+ const f_status_t status = f_uint128ss_append_all(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_uint128ss_append_all__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_uint128ss_t source = f_uint128ss_t_initialize;
+ f_uint128ss_t destination = f_uint128ss_t_initialize;
+
+ {
+ const f_status_t status = f_uint128ss_resize(length, &source);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(source.used, 0);
+ assert_int_equal(source.size, length);
+ }
+
+ {
+ const f_status_t status = f_uint128ss_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_type_array_uint128ss_append_all__works(void **state) {
const int length = 5;
free((void *) destination.array);
}
-void test__f_type_array_uint128ss_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint128ss_t source = f_uint128ss_t_initialize;
- f_uint128ss_t destination = f_uint128ss_t_initialize;
-
- {
- const f_status_t status = f_uint128ss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_uint128ss_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_type_array_uint128ss_append_all__parameter_checking(void **state) {
-
- const f_uint128ss_t data = f_uint128ss_t_initialize;
-
- {
- const f_status_t status = f_uint128ss_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__uint128ss_append_all
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint128ss_append_all()
+ * @see f_uint128ss_append_all()
*/
-extern void test__f_type_array_uint128ss_append_all__works(void **state);
+extern void test__f_type_array_uint128ss_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 returns F_data_not.
*
- * @see f_type_array_uint128ss_append_all()
+ * @see f_uint128ss_append_all()
*/
extern void test__f_type_array_uint128ss_append_all__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint128ss_append_all()
+ * @see f_uint128ss_append_all()
*/
-extern void test__f_type_array_uint128ss_append_all__parameter_checking(void **state);
+extern void test__f_type_array_uint128ss_append_all__works(void **state);
#endif // _TEST__F_type_array__uint128ss_append_all
extern "C" {
#endif
-void test__f_type_array_uint128ss_decimate_by__works(void **state) {
+void test__f_type_array_uint128ss_decimate_by__parameter_checking(void **state) {
const int length = 5;
f_uint128ss_t data = f_uint128s_t_initialize;
{
+ const f_status_t status = f_uint128ss_decimate_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_uint128ss_decimate_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_uint128ss_t data = f_uint128ss_t_initialize;
+
+ {
const f_status_t status = f_uint128ss_resize(length, &data);
assert_int_equal(status, F_none);
}
{
- const f_status_t status = f_uint128ss_decimate_by(length, &data);
+ const f_status_t status = f_uint128ss_decimate_by(0, &data);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_data_not);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
-void test__f_type_array_uint128ss_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_uint128ss_decimate_by__works(void **state) {
const int length = 5;
f_uint128ss_t data = f_uint128s_t_initialize;
{
- const f_status_t status = f_uint128ss_decimate_by(length, 0);
+ const f_status_t status = f_uint128ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_uint128ss_decimate_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__uint128ss_decimate_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint128ss_decimate_by()
+ * @see f_uint128ss_decimate_by()
*/
-extern void test__f_type_array_uint128ss_decimate_by__works(void **state);
+extern void test__f_type_array_uint128ss_decimate_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
* @see f_type_array_uint128ss_decimate_by()
*/
-extern void test__f_type_array_uint128ss_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_uint128ss_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint128ss_decimate_by()
+ */
+extern void test__f_type_array_uint128ss_decimate_by__works(void **state);
#endif // _TEST__F_type_array__uint128ss_decimate_by
extern "C" {
#endif
-void test__f_type_array_uint128ss_decrease_by__works(void **state) {
+void test__f_type_array_uint128ss_decrease_by__parameter_checking(void **state) {
const int length = 5;
f_uint128ss_t data = f_uint128s_t_initialize;
{
+ const f_status_t status = f_uint128ss_decrease_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_uint128ss_decrease_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_uint128ss_t data = f_uint128ss_t_initialize;
+
+ {
const f_status_t status = f_uint128ss_resize(length, &data);
assert_int_equal(status, F_none);
}
{
- const f_status_t status = f_uint128ss_decrease_by(length, &data);
+ const f_status_t status = f_uint128ss_decrease_by(0, &data);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_data_not);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
-void test__f_type_array_uint128ss_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_uint128ss_decrease_by__works(void **state) {
const int length = 5;
f_uint128ss_t data = f_uint128s_t_initialize;
{
- const f_status_t status = f_uint128ss_decrease_by(length, 0);
+ const f_status_t status = f_uint128ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_uint128ss_decrease_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__uint128ss_decrease_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint128ss_decrease_by()
+ * @see f_uint128ss_decrease_by()
*/
-extern void test__f_type_array_uint128ss_decrease_by__works(void **state);
+extern void test__f_type_array_uint128ss_decrease_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_uint128ss_decrease_by()
+ * @see f_uint128ss_decrease_by()
*/
-extern void test__f_type_array_uint128ss_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_uint128ss_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint128ss_decrease_by()
+ */
+extern void test__f_type_array_uint128ss_decrease_by__works(void **state);
#endif // _TEST__F_type_array__uint128ss_decrease_by
extern "C" {
#endif
-void test__f_type_array_uint128ss_increase__works(void **state) {
+void test__f_type_array_uint128ss_increase__parameter_checking(void **state) {
const int length = 5;
f_uint128ss_t data = f_uint128s_t_initialize;
{
- const f_status_t status = f_uint128ss_resize(length, &data);
+ const f_status_t status = f_uint128ss_increase(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_uint128ss_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ assert_int_equal(data.size, 0);
}
free((void *) data.array);
free((void *) data.array);
}
-void test__f_type_array_uint128ss_increase__parameter_checking(void **state) {
+void test__f_type_array_uint128ss_increase__works(void **state) {
const int length = 5;
f_uint128ss_t data = f_uint128s_t_initialize;
{
- const f_status_t status = f_uint128ss_increase(length, 0);
+ const f_status_t status = f_uint128ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_uint128ss_increase(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
}
free((void *) data.array);
#define _TEST__F_type_array__uint128ss_increase
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint128ss_increase()
+ * @see f_uint128ss_increase()
*/
-extern void test__f_type_array_uint128ss_increase__works(void **state);
+extern void test__f_type_array_uint128ss_increase__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_uint128ss_increase()
+ * @see f_uint128ss_increase()
*/
extern void test__f_type_array_uint128ss_increase__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint128ss_increase()
+ * @see f_uint128ss_increase()
*/
-extern void test__f_type_array_uint128ss_increase__parameter_checking(void **state);
+extern void test__f_type_array_uint128ss_increase__works(void **state);
#endif // _TEST__F_type_array__uint128ss_increase
extern "C" {
#endif
-void test__f_type_array_uint128ss_increase_by__works(void **state) {
+void test__f_type_array_uint128ss_increase_by__parameter_checking(void **state) {
const int length = 5;
f_uint128ss_t data = f_uint128s_t_initialize;
{
+ const f_status_t status = f_uint128ss_increase_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_uint128ss_increase_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_uint128ss_t data = f_uint128ss_t_initialize;
+
+ {
const f_status_t status = f_uint128ss_resize(length, &data);
assert_int_equal(status, F_none);
}
{
- data.used = length;
+ const f_status_t status = f_uint128ss_increase_by(0, &data);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+ {
const f_status_t status = f_uint128ss_increase_by(length, &data);
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
}
free((void *) data.array);
}
-void test__f_type_array_uint128ss_increase_by__parameter_checking(void **state) {
+void test__f_type_array_uint128ss_increase_by__works(void **state) {
const int length = 5;
f_uint128ss_t data = f_uint128s_t_initialize;
{
- const f_status_t status = f_uint128ss_increase_by(length, 0);
+ const f_status_t status = f_uint128ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ {
+ data.used = length;
+
+ const f_status_t status = f_uint128ss_increase_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_int_equal(data.size, length * 2);
+ }
+
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__uint128ss_increase_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint128ss_increase_by()
+ * @see f_uint128ss_increase_by()
*/
-extern void test__f_type_array_uint128ss_increase_by__works(void **state);
+extern void test__f_type_array_uint128ss_increase_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_uint128ss_increase_by()
+ * @see f_uint128ss_increase_by()
*/
-extern void test__f_type_array_uint128ss_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_uint128ss_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint128ss_increase_by()
+ */
+extern void test__f_type_array_uint128ss_increase_by__works(void **state);
#endif // _TEST__F_type_array__uint128ss_increase_by
extern "C" {
#endif
-void test__f_type_array_uint128ss_resize__works(void **state) {
+void test__f_type_array_uint128ss_resize__parameter_checking(void **state) {
const int length = 5;
f_uint128ss_t data = f_uint128ss_t_initialize;
{
- const f_status_t status = f_uint128ss_resize(length, &data);
+ const f_status_t status = f_uint128ss_resize(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_uint128ss_resize__parameter_checking(void **state) {
+void test__f_type_array_uint128ss_resize__works(void **state) {
const int length = 5;
f_uint128ss_t data = f_uint128ss_t_initialize;
{
- const f_status_t status = f_uint128ss_resize(length, 0);
+ const f_status_t status = f_uint128ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__uint128ss_resize
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint128ss_resize()
+ * @see f_uint128ss_resize()
*/
-extern void test__f_type_array_uint128ss_resize__works(void **state);
+extern void test__f_type_array_uint128ss_resize__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint128ss_resize()
+ * @see f_uint128ss_resize()
*/
-extern void test__f_type_array_uint128ss_resize__parameter_checking(void **state);
+extern void test__f_type_array_uint128ss_resize__works(void **state);
#endif // _TEST__F_type_array__uint128ss_resize
extern "C" {
#endif
-void test__f_type_array_uint16s_adjust__works(void **state) {
+void test__f_type_array_uint16s_adjust__parameter_checking(void **state) {
const int length = 5;
f_uint16s_t data = f_uint16s_t_initialize;
{
- const f_status_t status = f_uint16s_adjust(length, &data);
+ const f_status_t status = f_uint16s_adjust(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_uint16s_adjust__parameter_checking(void **state) {
+void test__f_type_array_uint16s_adjust__works(void **state) {
const int length = 5;
f_uint16s_t data = f_uint16s_t_initialize;
{
- const f_status_t status = f_uint16s_adjust(length, 0);
+ const f_status_t status = f_uint16s_adjust(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__uint16s_adjust
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint16s_adjust()
+ * @see f_uint16s_adjust()
*/
-extern void test__f_type_array_uint16s_adjust__works(void **state);
+extern void test__f_type_array_uint16s_adjust__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint16s_adjust()
+ * @see f_uint16s_adjust()
*/
-extern void test__f_type_array_uint16s_adjust__parameter_checking(void **state);
+extern void test__f_type_array_uint16s_adjust__works(void **state);
#endif // _TEST__F_type_array__uint16s_adjust
extern "C" {
#endif
+void test__f_type_array_uint16s_append__parameter_checking(void **state) {
+
+ const uint16_t data = 0;
+
+ {
+ const f_status_t status = f_uint16s_append(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
void test__f_type_array_uint16s_append__works(void **state) {
const uint16_t source = 3;
free((void *) destination.array);
}
-void test__f_type_array_uint16s_append__parameter_checking(void **state) {
-
- const uint16_t data = 0;
-
- {
- const f_status_t status = f_uint16s_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__uint16s_append
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint16s_append()
+ * @see f_uint16s_append()
*/
-extern void test__f_type_array_uint16s_append__works(void **state);
+extern void test__f_type_array_uint16s_append__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint16s_append()
+ * @see f_uint16s_append()
*/
-extern void test__f_type_array_uint16s_append__parameter_checking(void **state);
+extern void test__f_type_array_uint16s_append__works(void **state);
#endif // _TEST__F_type_array__uint16s_append
extern "C" {
#endif
-void test__f_type_array_uint16s_append_all__works(void **state) {
+void test__f_type_array_uint16s_append_all__parameter_checking(void **state) {
+
+ const f_uint16s_t data = f_uint16s_t_initialize;
+
+ {
+ const f_status_t status = f_uint16s_append_all(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_uint16s_append_all__returns_data_not(void **state) {
const int length = 5;
- const int length_used = 2;
f_uint16s_t source = f_uint16s_t_initialize;
f_uint16s_t destination = f_uint16s_t_initialize;
assert_int_equal(source.size, length);
}
- for (; source.used < length_used; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
{
const f_status_t status = f_uint16s_append_all(source, &destination);
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_array_length_t i = 0; i < source.used; ++i) {
- assert_int_equal(destination.array[i], i + 1);
- } // for
+ 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);
- free((void *) destination.array);
}
-void test__f_type_array_uint16s_append_all__returns_data_not(void **state) {
+void test__f_type_array_uint16s_append_all__works(void **state) {
const int length = 5;
+ const int length_used = 2;
f_uint16s_t source = f_uint16s_t_initialize;
f_uint16s_t destination = f_uint16s_t_initialize;
assert_int_equal(source.size, length);
}
+ for (; source.used < length_used; ++source.used) {
+ source.array[source.used] = source.used + 1;
+ } // for
+
{
const f_status_t status = f_uint16s_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);
+ assert_int_equal(status, F_none);
+ assert_int_equal(destination.used, source.used);
+ assert_int_equal(destination.size, source.used);
+
+ for (f_array_length_t i = 0; i < source.used; ++i) {
+ assert_int_equal(destination.array[i], i + 1);
+ } // for
}
free((void *) source.array);
-}
-
-void test__f_type_array_uint16s_append_all__parameter_checking(void **state) {
-
- const f_uint16s_t data = f_uint16s_t_initialize;
-
- {
- const f_status_t status = f_uint16s_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
+ free((void *) destination.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__uint16s_append_all
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint16s_append_all()
+ * @see f_uint16s_append_all()
*/
-extern void test__f_type_array_uint16s_append_all__works(void **state);
+extern void test__f_type_array_uint16s_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 returns F_data_not.
*
- * @see f_type_array_uint16s_append_all()
+ * @see f_uint16s_append_all()
*/
extern void test__f_type_array_uint16s_append_all__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint16s_append_all()
+ * @see f_uint16s_append_all()
*/
-extern void test__f_type_array_uint16s_append_all__parameter_checking(void **state);
+extern void test__f_type_array_uint16s_append_all__works(void **state);
#endif // _TEST__F_type_array__uint16s_append_all
extern "C" {
#endif
-void test__f_type_array_uint16s_decimate_by__works(void **state) {
+void test__f_type_array_uint16s_decimate_by__parameter_checking(void **state) {
const int length = 5;
f_uint16s_t data = f_uint16s_t_initialize;
{
- const f_status_t status = f_uint16s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint16s_decimate_by(length, &data);
+ const f_status_t status = f_uint16s_decimate_by(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
assert_null(data.array);
}
-void test__f_type_array_uint16s_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_uint16s_decimate_by__works(void **state) {
const int length = 5;
f_uint16s_t data = f_uint16s_t_initialize;
{
- const f_status_t status = f_uint16s_decimate_by(length, 0);
+ const f_status_t status = f_uint16s_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_uint16s_decimate_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__uint16s_decimate_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint16s_decimate_by()
+ * @see f_uint16s_decimate_by()
*/
-extern void test__f_type_array_uint16s_decimate_by__works(void **state);
+extern void test__f_type_array_uint16s_decimate_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint16s_decimate_by()
+ * @see f_uint16s_decimate_by()
*/
-extern void test__f_type_array_uint16s_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_uint16s_decimate_by__works(void **state);
#endif // _TEST__F_type_array__uint16s_decimate_by
extern "C" {
#endif
-void test__f_type_array_uint16s_decrease_by__works(void **state) {
+void test__f_type_array_uint16s_decrease_by__parameter_checking(void **state) {
const int length = 5;
f_uint16s_t data = f_uint16s_t_initialize;
{
- const f_status_t status = f_uint16s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint16s_decrease_by(length, &data);
+ const f_status_t status = f_uint16s_decrease_by(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
assert_null(data.array);
}
-void test__f_type_array_uint16s_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_uint16s_decrease_by__works(void **state) {
const int length = 5;
f_uint16s_t data = f_uint16s_t_initialize;
{
- const f_status_t status = f_uint16s_decrease_by(length, 0);
+ const f_status_t status = f_uint16s_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_uint16s_decrease_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__uint16s_decrease_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint16s_decrease_by()
+ * @see f_uint16s_decrease_by()
*/
-extern void test__f_type_array_uint16s_decrease_by__works(void **state);
+extern void test__f_type_array_uint16s_decrease_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint16s_decrease_by()
+ * @see f_uint16s_decrease_by()
*/
-extern void test__f_type_array_uint16s_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_uint16s_decrease_by__works(void **state);
#endif // _TEST__F_type_array__uint16s_decrease_by
extern "C" {
#endif
-void test__f_type_array_uint16s_increase__works(void **state) {
+void test__f_type_array_uint16s_increase__parameter_checking(void **state) {
const int length = 5;
f_uint16s_t data = f_uint16s_t_initialize;
{
- const f_status_t status = f_uint16s_resize(length, &data);
+ const f_status_t status = f_uint16s_increase(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_uint16s_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ assert_int_equal(data.size, 0);
}
free((void *) data.array);
free((void *) data.array);
}
-void test__f_type_array_uint16s_increase__parameter_checking(void **state) {
+void test__f_type_array_uint16s_increase__works(void **state) {
const int length = 5;
f_uint16s_t data = f_uint16s_t_initialize;
{
- const f_status_t status = f_uint16s_increase(length, 0);
+ const f_status_t status = f_uint16s_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_uint16s_increase(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
}
free((void *) data.array);
#define _TEST__F_type_array__uint16s_increase
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint16s_increase()
+ * @see f_uint16s_increase()
*/
-extern void test__f_type_array_uint16s_increase__works(void **state);
+extern void test__f_type_array_uint16s_increase__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_uint16s_increase()
+ * @see f_uint16s_increase()
*/
extern void test__f_type_array_uint16s_increase__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint16s_increase()
+ * @see f_uint16s_increase()
*/
-extern void test__f_type_array_uint16s_increase__parameter_checking(void **state);
+extern void test__f_type_array_uint16s_increase__works(void **state);
#endif // _TEST__F_type_array__uint16s_increase
extern "C" {
#endif
+void test__f_type_array_uint16s_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_uint16s_t data = f_uint16s_t_initialize;
+
+ {
+ const f_status_t status = f_uint16s_increase_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
void test__f_type_array_uint16s_increase_by__works(void **state) {
const int length = 5;
free((void *) data.array);
}
-void test__f_type_array_uint16s_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint16s_t data = f_uint16s_t_initialize;
-
- {
- const f_status_t status = f_uint16s_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__uint16s_increase_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint16s_increase_by()
+ * @see f_uint16s_increase_by()
*/
-extern void test__f_type_array_uint16s_increase_by__works(void **state);
+extern void test__f_type_array_uint16s_increase_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint16s_increase_by()
+ * @see f_uint16s_increase_by()
*/
-extern void test__f_type_array_uint16s_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_uint16s_increase_by__works(void **state);
#endif // _TEST__F_type_array__uint16s_increase_by
extern "C" {
#endif
-void test__f_type_array_uint16s_resize__works(void **state) {
+void test__f_type_array_uint16s_resize__parameter_checking(void **state) {
const int length = 5;
f_uint16s_t data = f_uint16s_t_initialize;
{
- const f_status_t status = f_uint16s_resize(length, &data);
+ const f_status_t status = f_uint16s_resize(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_uint16s_resize__parameter_checking(void **state) {
+void test__f_type_array_uint16s_resize__works(void **state) {
const int length = 5;
f_uint16s_t data = f_uint16s_t_initialize;
{
- const f_status_t status = f_uint16s_resize(length, 0);
+ const f_status_t status = f_uint16s_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__uint16s_resize
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint16s_resize()
+ * @see f_uint16s_resize()
*/
-extern void test__f_type_array_uint16s_resize__works(void **state);
+extern void test__f_type_array_uint16s_resize__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint16s_resize()
+ * @see f_uint16s_resize()
*/
-extern void test__f_type_array_uint16s_resize__parameter_checking(void **state);
+extern void test__f_type_array_uint16s_resize__works(void **state);
#endif // _TEST__F_type_array__uint16s_resize
extern "C" {
#endif
-void test__f_type_array_uint16ss_adjust__works(void **state) {
+void test__f_type_array_uint16ss_adjust__parameter_checking(void **state) {
const int length = 5;
f_uint16ss_t data = f_uint16ss_t_initialize;
{
- const f_status_t status = f_uint16ss_adjust(length, &data);
+ const f_status_t status = f_uint16ss_adjust(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_uint16ss_adjust__parameter_checking(void **state) {
+void test__f_type_array_uint16ss_adjust__works(void **state) {
const int length = 5;
f_uint16ss_t data = f_uint16ss_t_initialize;
{
- const f_status_t status = f_uint16ss_adjust(length, 0);
+ const f_status_t status = f_uint16ss_adjust(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__uint16ss_adjust
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint16ss_adjust()
+ * @see f_uint16ss_adjust()
*/
-extern void test__f_type_array_uint16ss_adjust__works(void **state);
+extern void test__f_type_array_uint16ss_adjust__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint16ss_adjust()
+ * @see f_uint16ss_adjust()
*/
-extern void test__f_type_array_uint16ss_adjust__parameter_checking(void **state);
+extern void test__f_type_array_uint16ss_adjust__works(void **state);
#endif // _TEST__F_type_array__uint16ss_adjust
extern "C" {
#endif
-void test__f_type_array_uint16ss_append__works(void **state) {
+void test__f_type_array_uint16ss_append__parameter_checking(void **state) {
+
+ f_uint16s_t data = f_uint16s_t_initialize;
+
+ {
+ const f_status_t status = f_uint16ss_append(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_uint16ss_append__returns_data_not(void **state) {
const int length = 5;
f_uint16s_t source = f_uint16s_t_initialize;
assert_int_equal(source.size, length);
}
- for (; source.used < length; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
{
const f_status_t status = f_uint16ss_append(source, &destination);
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0].used, source.used);
- assert_int_equal(destination.array[0].size, source.used);
-
- for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
- assert_int_equal(destination.array[0].array[i], i + 1);
- } // for
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(destination.used, 0);
+ assert_int_equal(destination.size, 0);
+ assert_null(destination.array);
}
- for (f_array_length_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
free((void *) source.array);
- free((void *) destination.array);
}
-void test__f_type_array_uint16ss_append__returns_data_not(void **state) {
+void test__f_type_array_uint16ss_append__works(void **state) {
const int length = 5;
f_uint16s_t source = f_uint16s_t_initialize;
assert_int_equal(source.size, length);
}
+ for (; source.used < length; ++source.used) {
+ source.array[source.used] = source.used + 1;
+ } // for
+
{
const f_status_t status = f_uint16ss_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_type_array_uint16ss_append__parameter_checking(void **state) {
+ assert_int_equal(status, F_none);
+ assert_int_equal(destination.used, 1);
+ assert_int_equal(destination.array[0].used, source.used);
+ assert_int_equal(destination.array[0].size, source.used);
- f_uint16s_t data = f_uint16s_t_initialize;
+ for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
+ assert_int_equal(destination.array[0].array[i], i + 1);
+ } // for
+ }
- {
- const f_status_t status = f_uint16ss_append(data, 0);
+ for (f_array_length_t i = 0; i < destination.used; ++i) {
+ free((void *) destination.array[i].array);
+ } // for
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
+ free((void *) source.array);
+ free((void *) destination.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__uint16ss_append
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint16ss_append()
+ * @see f_uint16ss_append()
*/
-extern void test__f_type_array_uint16ss_append__works(void **state);
+extern void test__f_type_array_uint16ss_append__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_uint16ss_append()
+ * @see f_uint16ss_append()
*/
extern void test__f_type_array_uint16ss_append__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint16ss_append()
+ * @see f_uint16ss_append()
*/
-extern void test__f_type_array_uint16ss_append__parameter_checking(void **state);
+extern void test__f_type_array_uint16ss_append__works(void **state);
#endif // _TEST__F_type_array__uint16ss_append
extern "C" {
#endif
+void test__f_type_array_uint16ss_append_all__parameter_checking(void **state) {
+
+ const f_uint16ss_t data = f_uint16ss_t_initialize;
+
+ {
+ const f_status_t status = f_uint16ss_append_all(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_uint16ss_append_all__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_uint16ss_t source = f_uint16ss_t_initialize;
+ f_uint16ss_t destination = f_uint16ss_t_initialize;
+
+ {
+ const f_status_t status = f_uint16ss_resize(length, &source);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(source.used, 0);
+ assert_int_equal(source.size, length);
+ }
+
+ {
+ const f_status_t status = f_uint16ss_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_type_array_uint16ss_append_all__works(void **state) {
const int length = 5;
free((void *) destination.array);
}
-void test__f_type_array_uint16ss_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint16ss_t source = f_uint16ss_t_initialize;
- f_uint16ss_t destination = f_uint16ss_t_initialize;
-
- {
- const f_status_t status = f_uint16ss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_uint16ss_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_type_array_uint16ss_append_all__parameter_checking(void **state) {
-
- const f_uint16ss_t data = f_uint16ss_t_initialize;
-
- {
- const f_status_t status = f_uint16ss_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__uint16ss_append_all
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint16ss_append_all()
+ * @see f_uint16ss_append_all()
*/
-extern void test__f_type_array_uint16ss_append_all__works(void **state);
+extern void test__f_type_array_uint16ss_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 returns F_data_not.
*
- * @see f_type_array_uint16ss_append_all()
+ * @see f_uint16ss_append_all()
*/
extern void test__f_type_array_uint16ss_append_all__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint16ss_append_all()
+ * @see f_uint16ss_append_all()
*/
-extern void test__f_type_array_uint16ss_append_all__parameter_checking(void **state);
+extern void test__f_type_array_uint16ss_append_all__works(void **state);
#endif // _TEST__F_type_array__uint16ss_append_all
extern "C" {
#endif
-void test__f_type_array_uint16ss_decimate_by__works(void **state) {
+void test__f_type_array_uint16ss_decimate_by__parameter_checking(void **state) {
const int length = 5;
f_uint16ss_t data = f_uint16s_t_initialize;
{
+ const f_status_t status = f_uint16ss_decimate_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_uint16ss_decimate_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_uint16ss_t data = f_uint16ss_t_initialize;
+
+ {
const f_status_t status = f_uint16ss_resize(length, &data);
assert_int_equal(status, F_none);
}
{
- const f_status_t status = f_uint16ss_decimate_by(length, &data);
+ const f_status_t status = f_uint16ss_decimate_by(0, &data);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_data_not);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
-void test__f_type_array_uint16ss_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_uint16ss_decimate_by__works(void **state) {
const int length = 5;
f_uint16ss_t data = f_uint16s_t_initialize;
{
- const f_status_t status = f_uint16ss_decimate_by(length, 0);
+ const f_status_t status = f_uint16ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_uint16ss_decimate_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__uint16ss_decimate_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint16ss_decimate_by()
+ * @see f_uint16ss_decimate_by()
*/
-extern void test__f_type_array_uint16ss_decimate_by__works(void **state);
+extern void test__f_type_array_uint16ss_decimate_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
* @see f_type_array_uint16ss_decimate_by()
*/
-extern void test__f_type_array_uint16ss_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_uint16ss_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint16ss_decimate_by()
+ */
+extern void test__f_type_array_uint16ss_decimate_by__works(void **state);
#endif // _TEST__F_type_array__uint16ss_decimate_by
extern "C" {
#endif
-void test__f_type_array_uint16ss_decrease_by__works(void **state) {
+void test__f_type_array_uint16ss_decrease_by__parameter_checking(void **state) {
const int length = 5;
f_uint16ss_t data = f_uint16s_t_initialize;
{
+ const f_status_t status = f_uint16ss_decrease_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_uint16ss_decrease_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_uint16ss_t data = f_uint16ss_t_initialize;
+
+ {
const f_status_t status = f_uint16ss_resize(length, &data);
assert_int_equal(status, F_none);
}
{
- const f_status_t status = f_uint16ss_decrease_by(length, &data);
+ const f_status_t status = f_uint16ss_decrease_by(0, &data);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_data_not);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
-void test__f_type_array_uint16ss_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_uint16ss_decrease_by__works(void **state) {
const int length = 5;
f_uint16ss_t data = f_uint16s_t_initialize;
{
- const f_status_t status = f_uint16ss_decrease_by(length, 0);
+ const f_status_t status = f_uint16ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_uint16ss_decrease_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__uint16ss_decrease_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint16ss_decrease_by()
+ * @see f_uint16ss_decrease_by()
*/
-extern void test__f_type_array_uint16ss_decrease_by__works(void **state);
+extern void test__f_type_array_uint16ss_decrease_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_uint16ss_decrease_by()
+ * @see f_uint16ss_decrease_by()
*/
-extern void test__f_type_array_uint16ss_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_uint16ss_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint16ss_decrease_by()
+ */
+extern void test__f_type_array_uint16ss_decrease_by__works(void **state);
#endif // _TEST__F_type_array__uint16ss_decrease_by
extern "C" {
#endif
-void test__f_type_array_uint16ss_increase__works(void **state) {
+void test__f_type_array_uint16ss_increase__parameter_checking(void **state) {
const int length = 5;
f_uint16ss_t data = f_uint16s_t_initialize;
{
- const f_status_t status = f_uint16ss_resize(length, &data);
+ const f_status_t status = f_uint16ss_increase(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_uint16ss_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ assert_int_equal(data.size, 0);
}
free((void *) data.array);
free((void *) data.array);
}
-void test__f_type_array_uint16ss_increase__parameter_checking(void **state) {
+void test__f_type_array_uint16ss_increase__works(void **state) {
const int length = 5;
f_uint16ss_t data = f_uint16s_t_initialize;
{
- const f_status_t status = f_uint16ss_increase(length, 0);
+ const f_status_t status = f_uint16ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_uint16ss_increase(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
}
free((void *) data.array);
#define _TEST__F_type_array__uint16ss_increase
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint16ss_increase()
+ * @see f_uint16ss_increase()
*/
-extern void test__f_type_array_uint16ss_increase__works(void **state);
+extern void test__f_type_array_uint16ss_increase__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_uint16ss_increase()
+ * @see f_uint16ss_increase()
*/
extern void test__f_type_array_uint16ss_increase__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint16ss_increase()
+ * @see f_uint16ss_increase()
*/
-extern void test__f_type_array_uint16ss_increase__parameter_checking(void **state);
+extern void test__f_type_array_uint16ss_increase__works(void **state);
#endif // _TEST__F_type_array__uint16ss_increase
extern "C" {
#endif
-void test__f_type_array_uint16ss_increase_by__works(void **state) {
+void test__f_type_array_uint16ss_increase_by__parameter_checking(void **state) {
const int length = 5;
f_uint16ss_t data = f_uint16s_t_initialize;
{
+ const f_status_t status = f_uint16ss_increase_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_uint16ss_increase_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_uint16ss_t data = f_uint16ss_t_initialize;
+
+ {
const f_status_t status = f_uint16ss_resize(length, &data);
assert_int_equal(status, F_none);
}
{
- data.used = length;
+ const f_status_t status = f_uint16ss_increase_by(0, &data);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+ {
const f_status_t status = f_uint16ss_increase_by(length, &data);
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
}
free((void *) data.array);
}
-void test__f_type_array_uint16ss_increase_by__parameter_checking(void **state) {
+void test__f_type_array_uint16ss_increase_by__works(void **state) {
const int length = 5;
f_uint16ss_t data = f_uint16s_t_initialize;
{
- const f_status_t status = f_uint16ss_increase_by(length, 0);
+ const f_status_t status = f_uint16ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ {
+ data.used = length;
+
+ const f_status_t status = f_uint16ss_increase_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_int_equal(data.size, length * 2);
+ }
+
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__uint16ss_increase_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint16ss_increase_by()
+ * @see f_uint16ss_increase_by()
*/
-extern void test__f_type_array_uint16ss_increase_by__works(void **state);
+extern void test__f_type_array_uint16ss_increase_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_uint16ss_increase_by()
+ * @see f_uint16ss_increase_by()
*/
-extern void test__f_type_array_uint16ss_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_uint16ss_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint16ss_increase_by()
+ */
+extern void test__f_type_array_uint16ss_increase_by__works(void **state);
#endif // _TEST__F_type_array__uint16ss_increase_by
extern "C" {
#endif
-void test__f_type_array_uint16ss_resize__works(void **state) {
+void test__f_type_array_uint16ss_resize__parameter_checking(void **state) {
const int length = 5;
f_uint16ss_t data = f_uint16ss_t_initialize;
{
- const f_status_t status = f_uint16ss_resize(length, &data);
+ const f_status_t status = f_uint16ss_resize(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_uint16ss_resize__parameter_checking(void **state) {
+void test__f_type_array_uint16ss_resize__works(void **state) {
const int length = 5;
f_uint16ss_t data = f_uint16ss_t_initialize;
{
- const f_status_t status = f_uint16ss_resize(length, 0);
+ const f_status_t status = f_uint16ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__uint16ss_resize
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint16ss_resize()
+ * @see f_uint16ss_resize()
*/
-extern void test__f_type_array_uint16ss_resize__works(void **state);
+extern void test__f_type_array_uint16ss_resize__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint16ss_resize()
+ * @see f_uint16ss_resize()
*/
-extern void test__f_type_array_uint16ss_resize__parameter_checking(void **state);
+extern void test__f_type_array_uint16ss_resize__works(void **state);
#endif // _TEST__F_type_array__uint16ss_resize
extern "C" {
#endif
-void test__f_type_array_uint32s_adjust__works(void **state) {
+void test__f_type_array_uint32s_adjust__parameter_checking(void **state) {
const int length = 5;
f_uint32s_t data = f_uint32s_t_initialize;
{
- const f_status_t status = f_uint32s_adjust(length, &data);
+ const f_status_t status = f_uint32s_adjust(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_uint32s_adjust__parameter_checking(void **state) {
+void test__f_type_array_uint32s_adjust__works(void **state) {
const int length = 5;
f_uint32s_t data = f_uint32s_t_initialize;
{
- const f_status_t status = f_uint32s_adjust(length, 0);
+ const f_status_t status = f_uint32s_adjust(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__uint32s_adjust
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint32s_adjust()
+ * @see f_uint32s_adjust()
*/
-extern void test__f_type_array_uint32s_adjust__works(void **state);
+extern void test__f_type_array_uint32s_adjust__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint32s_adjust()
+ * @see f_uint32s_adjust()
*/
-extern void test__f_type_array_uint32s_adjust__parameter_checking(void **state);
+extern void test__f_type_array_uint32s_adjust__works(void **state);
#endif // _TEST__F_type_array__uint32s_adjust
extern "C" {
#endif
+void test__f_type_array_uint32s_append__parameter_checking(void **state) {
+
+ const uint32_t data = 0;
+
+ {
+ const f_status_t status = f_uint32s_append(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
void test__f_type_array_uint32s_append__works(void **state) {
const uint32_t source = 3;
free((void *) destination.array);
}
-void test__f_type_array_uint32s_append__parameter_checking(void **state) {
-
- const uint32_t data = 0;
-
- {
- const f_status_t status = f_uint32s_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
*/
#ifndef _TEST__F_type_array__uint32s_append
#define _TEST__F_type_array__uint32s_append
-
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint32s_append()
+ * @see f_uint32s_append()
*/
-extern void test__f_type_array_uint32s_append__works(void **state);
+extern void test__f_type_array_uint32s_append__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint32s_append()
+ * @see f_uint32s_append()
*/
-extern void test__f_type_array_uint32s_append__parameter_checking(void **state);
+extern void test__f_type_array_uint32s_append__works(void **state);
+
#endif // _TEST__F_type_array__uint32s_append
extern "C" {
#endif
-void test__f_type_array_uint32s_append_all__works(void **state) {
+void test__f_type_array_uint32s_append_all__parameter_checking(void **state) {
+
+ const f_uint32s_t data = f_uint32s_t_initialize;
+
+ {
+ const f_status_t status = f_uint32s_append_all(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_uint32s_append_all__returns_data_not(void **state) {
const int length = 5;
- const int length_used = 2;
f_uint32s_t source = f_uint32s_t_initialize;
f_uint32s_t destination = f_uint32s_t_initialize;
assert_int_equal(source.size, length);
}
- for (; source.used < length_used; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
{
const f_status_t status = f_uint32s_append_all(source, &destination);
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_array_length_t i = 0; i < source.used; ++i) {
- assert_int_equal(destination.array[i], i + 1);
- } // for
+ 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);
- free((void *) destination.array);
}
-void test__f_type_array_uint32s_append_all__returns_data_not(void **state) {
+void test__f_type_array_uint32s_append_all__works(void **state) {
const int length = 5;
+ const int length_used = 2;
f_uint32s_t source = f_uint32s_t_initialize;
f_uint32s_t destination = f_uint32s_t_initialize;
assert_int_equal(source.size, length);
}
+ for (; source.used < length_used; ++source.used) {
+ source.array[source.used] = source.used + 1;
+ } // for
+
{
const f_status_t status = f_uint32s_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);
+ assert_int_equal(status, F_none);
+ assert_int_equal(destination.used, source.used);
+ assert_int_equal(destination.size, source.used);
+
+ for (f_array_length_t i = 0; i < source.used; ++i) {
+ assert_int_equal(destination.array[i], i + 1);
+ } // for
}
free((void *) source.array);
-}
-
-void test__f_type_array_uint32s_append_all__parameter_checking(void **state) {
-
- const f_uint32s_t data = f_uint32s_t_initialize;
-
- {
- const f_status_t status = f_uint32s_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
+ free((void *) destination.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__uint32s_append_all
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint32s_append_all()
+ * @see f_uint32s_append_all()
*/
-extern void test__f_type_array_uint32s_append_all__works(void **state);
+extern void test__f_type_array_uint32s_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 returns F_data_not.
*
- * @see f_type_array_uint32s_append_all()
+ * @see f_uint32s_append_all()
*/
extern void test__f_type_array_uint32s_append_all__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint32s_append_all()
+ * @see f_uint32s_append_all()
*/
-extern void test__f_type_array_uint32s_append_all__parameter_checking(void **state);
+extern void test__f_type_array_uint32s_append_all__works(void **state);
#endif // _TEST__F_type_array__uint32s_append_all
extern "C" {
#endif
-void test__f_type_array_uint32s_decimate_by__works(void **state) {
+void test__f_type_array_uint32s_decimate_by__parameter_checking(void **state) {
const int length = 5;
f_uint32s_t data = f_uint32s_t_initialize;
{
- const f_status_t status = f_uint32s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint32s_decimate_by(length, &data);
+ const f_status_t status = f_uint32s_decimate_by(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
assert_null(data.array);
}
-void test__f_type_array_uint32s_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_uint32s_decimate_by__works(void **state) {
const int length = 5;
f_uint32s_t data = f_uint32s_t_initialize;
{
- const f_status_t status = f_uint32s_decimate_by(length, 0);
+ const f_status_t status = f_uint32s_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_uint32s_decimate_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__uint32s_decimate_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint32s_decimate_by()
+ * @see f_uint32s_decimate_by()
*/
-extern void test__f_type_array_uint32s_decimate_by__works(void **state);
+extern void test__f_type_array_uint32s_decimate_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint32s_decimate_by()
+ * @see f_uint32s_decimate_by()
*/
-extern void test__f_type_array_uint32s_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_uint32s_decimate_by__works(void **state);
#endif // _TEST__F_type_array__uint32s_decimate_by
extern "C" {
#endif
-void test__f_type_array_uint32s_decrease_by__works(void **state) {
+void test__f_type_array_uint32s_decrease_by__parameter_checking(void **state) {
const int length = 5;
f_uint32s_t data = f_uint32s_t_initialize;
{
- const f_status_t status = f_uint32s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint32s_decrease_by(length, &data);
+ const f_status_t status = f_uint32s_decrease_by(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
assert_null(data.array);
}
-void test__f_type_array_uint32s_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_uint32s_decrease_by__works(void **state) {
const int length = 5;
f_uint32s_t data = f_uint32s_t_initialize;
{
- const f_status_t status = f_uint32s_decrease_by(length, 0);
+ const f_status_t status = f_uint32s_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_uint32s_decrease_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__uint32s_decrease_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint32s_decrease_by()
+ * @see f_uint32s_decrease_by()
*/
-extern void test__f_type_array_uint32s_decrease_by__works(void **state);
+extern void test__f_type_array_uint32s_decrease_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint32s_decrease_by()
+ * @see f_uint32s_decrease_by()
*/
-extern void test__f_type_array_uint32s_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_uint32s_decrease_by__works(void **state);
#endif // _TEST__F_type_array__uint32s_decrease_by
extern "C" {
#endif
-void test__f_type_array_uint32s_increase__works(void **state) {
+void test__f_type_array_uint32s_increase__parameter_checking(void **state) {
const int length = 5;
f_uint32s_t data = f_uint32s_t_initialize;
{
- const f_status_t status = f_uint32s_resize(length, &data);
+ const f_status_t status = f_uint32s_increase(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_uint32s_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ assert_int_equal(data.size, 0);
}
free((void *) data.array);
free((void *) data.array);
}
-void test__f_type_array_uint32s_increase__parameter_checking(void **state) {
+void test__f_type_array_uint32s_increase__works(void **state) {
const int length = 5;
f_uint32s_t data = f_uint32s_t_initialize;
{
- const f_status_t status = f_uint32s_increase(length, 0);
+ const f_status_t status = f_uint32s_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_uint32s_increase(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
}
free((void *) data.array);
#define _TEST__F_type_array__uint32s_increase
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint32s_increase()
+ * @see f_uint32s_increase()
*/
-extern void test__f_type_array_uint32s_increase__works(void **state);
+extern void test__f_type_array_uint32s_increase__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_uint32s_increase()
+ * @see f_uint32s_increase()
*/
extern void test__f_type_array_uint32s_increase__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint32s_increase()
+ * @see f_uint32s_increase()
*/
-extern void test__f_type_array_uint32s_increase__parameter_checking(void **state);
+extern void test__f_type_array_uint32s_increase__works(void **state);
#endif // _TEST__F_type_array__uint32s_increase
extern "C" {
#endif
+void test__f_type_array_uint32s_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_uint32s_t data = f_uint32s_t_initialize;
+
+ {
+ const f_status_t status = f_uint32s_increase_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
void test__f_type_array_uint32s_increase_by__works(void **state) {
const int length = 5;
free((void *) data.array);
}
-void test__f_type_array_uint32s_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint32s_t data = f_uint32s_t_initialize;
-
- {
- const f_status_t status = f_uint32s_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__uint32s_increase_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint32s_increase_by()
+ * @see f_uint32s_increase_by()
*/
-extern void test__f_type_array_uint32s_increase_by__works(void **state);
+extern void test__f_type_array_uint32s_increase_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint32s_increase_by()
+ * @see f_uint32s_increase_by()
*/
-extern void test__f_type_array_uint32s_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_uint32s_increase_by__works(void **state);
#endif // _TEST__F_type_array__uint32s_increase_by
extern "C" {
#endif
-void test__f_type_array_uint32s_resize__works(void **state) {
+void test__f_type_array_uint32s_resize__parameter_checking(void **state) {
const int length = 5;
f_uint32s_t data = f_uint32s_t_initialize;
{
- const f_status_t status = f_uint32s_resize(length, &data);
+ const f_status_t status = f_uint32s_resize(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_uint32s_resize__parameter_checking(void **state) {
+void test__f_type_array_uint32s_resize__works(void **state) {
const int length = 5;
f_uint32s_t data = f_uint32s_t_initialize;
{
- const f_status_t status = f_uint32s_resize(length, 0);
+ const f_status_t status = f_uint32s_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__uint32s_resize
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint32s_resize()
+ * @see f_uint32s_resize()
*/
-extern void test__f_type_array_uint32s_resize__works(void **state);
+extern void test__f_type_array_uint32s_resize__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint32s_resize()
+ * @see f_uint32s_resize()
*/
-extern void test__f_type_array_uint32s_resize__parameter_checking(void **state);
+extern void test__f_type_array_uint32s_resize__works(void **state);
#endif // _TEST__F_type_array__uint32s_resize
extern "C" {
#endif
-void test__f_type_array_uint32ss_adjust__works(void **state) {
+void test__f_type_array_uint32ss_adjust__parameter_checking(void **state) {
const int length = 5;
f_uint32ss_t data = f_uint32ss_t_initialize;
{
- const f_status_t status = f_uint32ss_adjust(length, &data);
+ const f_status_t status = f_uint32ss_adjust(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_uint32ss_adjust__parameter_checking(void **state) {
+void test__f_type_array_uint32ss_adjust__works(void **state) {
const int length = 5;
f_uint32ss_t data = f_uint32ss_t_initialize;
{
- const f_status_t status = f_uint32ss_adjust(length, 0);
+ const f_status_t status = f_uint32ss_adjust(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__uint32ss_adjust
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint32ss_adjust()
+ * @see f_uint32ss_adjust()
*/
-extern void test__f_type_array_uint32ss_adjust__works(void **state);
+extern void test__f_type_array_uint32ss_adjust__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint32ss_adjust()
+ * @see f_uint32ss_adjust()
*/
-extern void test__f_type_array_uint32ss_adjust__parameter_checking(void **state);
+extern void test__f_type_array_uint32ss_adjust__works(void **state);
#endif // _TEST__F_type_array__uint32ss_adjust
extern "C" {
#endif
-void test__f_type_array_uint32ss_append__works(void **state) {
+void test__f_type_array_uint32ss_append__parameter_checking(void **state) {
+
+ f_uint32s_t data = f_uint32s_t_initialize;
+
+ {
+ const f_status_t status = f_uint32ss_append(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_uint32ss_append__returns_data_not(void **state) {
const int length = 5;
f_uint32s_t source = f_uint32s_t_initialize;
assert_int_equal(source.size, length);
}
- for (; source.used < length; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
{
const f_status_t status = f_uint32ss_append(source, &destination);
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0].used, source.used);
- assert_int_equal(destination.array[0].size, source.used);
-
- for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
- assert_int_equal(destination.array[0].array[i], i + 1);
- } // for
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(destination.used, 0);
+ assert_int_equal(destination.size, 0);
+ assert_null(destination.array);
}
- for (f_array_length_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
free((void *) source.array);
- free((void *) destination.array);
}
-void test__f_type_array_uint32ss_append__returns_data_not(void **state) {
+void test__f_type_array_uint32ss_append__works(void **state) {
const int length = 5;
f_uint32s_t source = f_uint32s_t_initialize;
assert_int_equal(source.size, length);
}
+ for (; source.used < length; ++source.used) {
+ source.array[source.used] = source.used + 1;
+ } // for
+
{
const f_status_t status = f_uint32ss_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_type_array_uint32ss_append__parameter_checking(void **state) {
+ assert_int_equal(status, F_none);
+ assert_int_equal(destination.used, 1);
+ assert_int_equal(destination.array[0].used, source.used);
+ assert_int_equal(destination.array[0].size, source.used);
- f_uint32s_t data = f_uint32s_t_initialize;
+ for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
+ assert_int_equal(destination.array[0].array[i], i + 1);
+ } // for
+ }
- {
- const f_status_t status = f_uint32ss_append(data, 0);
+ for (f_array_length_t i = 0; i < destination.used; ++i) {
+ free((void *) destination.array[i].array);
+ } // for
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
+ free((void *) source.array);
+ free((void *) destination.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__uint32ss_append
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint32ss_append()
+ * @see f_uint32ss_append()
*/
-extern void test__f_type_array_uint32ss_append__works(void **state);
+extern void test__f_type_array_uint32ss_append__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_uint32ss_append()
+ * @see f_uint32ss_append()
*/
extern void test__f_type_array_uint32ss_append__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint32ss_append()
+ * @see f_uint32ss_append()
*/
-extern void test__f_type_array_uint32ss_append__parameter_checking(void **state);
+extern void test__f_type_array_uint32ss_append__works(void **state);
#endif // _TEST__F_type_array__uint32ss_append
extern "C" {
#endif
+void test__f_type_array_uint32ss_append_all__parameter_checking(void **state) {
+
+ const f_uint32ss_t data = f_uint32ss_t_initialize;
+
+ {
+ const f_status_t status = f_uint32ss_append_all(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_uint32ss_append_all__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_uint32ss_t source = f_uint32ss_t_initialize;
+ f_uint32ss_t destination = f_uint32ss_t_initialize;
+
+ {
+ const f_status_t status = f_uint32ss_resize(length, &source);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(source.used, 0);
+ assert_int_equal(source.size, length);
+ }
+
+ {
+ const f_status_t status = f_uint32ss_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_type_array_uint32ss_append_all__works(void **state) {
const int length = 5;
free((void *) destination.array);
}
-void test__f_type_array_uint32ss_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint32ss_t source = f_uint32ss_t_initialize;
- f_uint32ss_t destination = f_uint32ss_t_initialize;
-
- {
- const f_status_t status = f_uint32ss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_uint32ss_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_type_array_uint32ss_append_all__parameter_checking(void **state) {
-
- const f_uint32ss_t data = f_uint32ss_t_initialize;
-
- {
- const f_status_t status = f_uint32ss_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__uint32ss_append_all
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint32ss_append_all()
+ * @see f_uint32ss_append_all()
*/
-extern void test__f_type_array_uint32ss_append_all__works(void **state);
+extern void test__f_type_array_uint32ss_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 returns F_data_not.
*
- * @see f_type_array_uint32ss_append_all()
+ * @see f_uint32ss_append_all()
*/
extern void test__f_type_array_uint32ss_append_all__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint32ss_append_all()
+ * @see f_uint32ss_append_all()
*/
-extern void test__f_type_array_uint32ss_append_all__parameter_checking(void **state);
+extern void test__f_type_array_uint32ss_append_all__works(void **state);
#endif // _TEST__F_type_array__uint32ss_append_all
extern "C" {
#endif
-void test__f_type_array_uint32ss_decimate_by__works(void **state) {
+void test__f_type_array_uint32ss_decimate_by__parameter_checking(void **state) {
const int length = 5;
f_uint32ss_t data = f_uint32s_t_initialize;
{
+ const f_status_t status = f_uint32ss_decimate_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_uint32ss_decimate_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_uint32ss_t data = f_uint32ss_t_initialize;
+
+ {
const f_status_t status = f_uint32ss_resize(length, &data);
assert_int_equal(status, F_none);
}
{
- const f_status_t status = f_uint32ss_decimate_by(length, &data);
+ const f_status_t status = f_uint32ss_decimate_by(0, &data);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_data_not);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
-void test__f_type_array_uint32ss_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_uint32ss_decimate_by__works(void **state) {
const int length = 5;
f_uint32ss_t data = f_uint32s_t_initialize;
{
- const f_status_t status = f_uint32ss_decimate_by(length, 0);
+ const f_status_t status = f_uint32ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_uint32ss_decimate_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__uint32ss_decimate_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint32ss_decimate_by()
+ * @see f_uint32ss_decimate_by()
*/
-extern void test__f_type_array_uint32ss_decimate_by__works(void **state);
+extern void test__f_type_array_uint32ss_decimate_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
* @see f_type_array_uint32ss_decimate_by()
*/
-extern void test__f_type_array_uint32ss_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_uint32ss_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint32ss_decimate_by()
+ */
+extern void test__f_type_array_uint32ss_decimate_by__works(void **state);
#endif // _TEST__F_type_array__uint32ss_decimate_by
extern "C" {
#endif
-void test__f_type_array_uint32ss_decrease_by__works(void **state) {
+void test__f_type_array_uint32ss_decrease_by__parameter_checking(void **state) {
const int length = 5;
f_uint32ss_t data = f_uint32s_t_initialize;
{
+ const f_status_t status = f_uint32ss_decrease_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_uint32ss_decrease_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_uint32ss_t data = f_uint32ss_t_initialize;
+
+ {
const f_status_t status = f_uint32ss_resize(length, &data);
assert_int_equal(status, F_none);
}
{
- const f_status_t status = f_uint32ss_decrease_by(length, &data);
+ const f_status_t status = f_uint32ss_decrease_by(0, &data);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_data_not);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
-void test__f_type_array_uint32ss_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_uint32ss_decrease_by__works(void **state) {
const int length = 5;
f_uint32ss_t data = f_uint32s_t_initialize;
{
- const f_status_t status = f_uint32ss_decrease_by(length, 0);
+ const f_status_t status = f_uint32ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_uint32ss_decrease_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__uint32ss_decrease_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint32ss_decrease_by()
+ * @see f_uint32ss_decrease_by()
*/
-extern void test__f_type_array_uint32ss_decrease_by__works(void **state);
+extern void test__f_type_array_uint32ss_decrease_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_uint32ss_decrease_by()
+ * @see f_uint32ss_decrease_by()
*/
-extern void test__f_type_array_uint32ss_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_uint32ss_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint32ss_decrease_by()
+ */
+extern void test__f_type_array_uint32ss_decrease_by__works(void **state);
#endif // _TEST__F_type_array__uint32ss_decrease_by
extern "C" {
#endif
-void test__f_type_array_uint32ss_increase__works(void **state) {
+void test__f_type_array_uint32ss_increase__parameter_checking(void **state) {
const int length = 5;
f_uint32ss_t data = f_uint32s_t_initialize;
{
- const f_status_t status = f_uint32ss_resize(length, &data);
+ const f_status_t status = f_uint32ss_increase(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_uint32ss_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ assert_int_equal(data.size, 0);
}
free((void *) data.array);
free((void *) data.array);
}
-void test__f_type_array_uint32ss_increase__parameter_checking(void **state) {
+void test__f_type_array_uint32ss_increase__works(void **state) {
const int length = 5;
f_uint32ss_t data = f_uint32s_t_initialize;
{
- const f_status_t status = f_uint32ss_increase(length, 0);
+ const f_status_t status = f_uint32ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_uint32ss_increase(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
}
free((void *) data.array);
#define _TEST__F_type_array__uint32ss_increase
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint32ss_increase()
+ * @see f_uint32ss_increase()
*/
-extern void test__f_type_array_uint32ss_increase__works(void **state);
+extern void test__f_type_array_uint32ss_increase__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_uint32ss_increase()
+ * @see f_uint32ss_increase()
*/
extern void test__f_type_array_uint32ss_increase__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint32ss_increase()
+ * @see f_uint32ss_increase()
*/
-extern void test__f_type_array_uint32ss_increase__parameter_checking(void **state);
+extern void test__f_type_array_uint32ss_increase__works(void **state);
#endif // _TEST__F_type_array__uint32ss_increase
extern "C" {
#endif
-void test__f_type_array_uint32ss_increase_by__works(void **state) {
+void test__f_type_array_uint32ss_increase_by__parameter_checking(void **state) {
const int length = 5;
f_uint32ss_t data = f_uint32s_t_initialize;
{
+ const f_status_t status = f_uint32ss_increase_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_uint32ss_increase_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_uint32ss_t data = f_uint32ss_t_initialize;
+
+ {
const f_status_t status = f_uint32ss_resize(length, &data);
assert_int_equal(status, F_none);
}
{
- data.used = length;
+ const f_status_t status = f_uint32ss_increase_by(0, &data);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+ {
const f_status_t status = f_uint32ss_increase_by(length, &data);
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
}
free((void *) data.array);
}
-void test__f_type_array_uint32ss_increase_by__parameter_checking(void **state) {
+void test__f_type_array_uint32ss_increase_by__works(void **state) {
const int length = 5;
f_uint32ss_t data = f_uint32s_t_initialize;
{
- const f_status_t status = f_uint32ss_increase_by(length, 0);
+ const f_status_t status = f_uint32ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ {
+ data.used = length;
+
+ const f_status_t status = f_uint32ss_increase_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_int_equal(data.size, length * 2);
+ }
+
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__uint32ss_increase_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint32ss_increase_by()
+ * @see f_uint32ss_increase_by()
*/
-extern void test__f_type_array_uint32ss_increase_by__works(void **state);
+extern void test__f_type_array_uint32ss_increase_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_uint32ss_increase_by()
+ * @see f_uint32ss_increase_by()
*/
-extern void test__f_type_array_uint32ss_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_uint32ss_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint32ss_increase_by()
+ */
+extern void test__f_type_array_uint32ss_increase_by__works(void **state);
#endif // _TEST__F_type_array__uint32ss_increase_by
extern "C" {
#endif
-void test__f_type_array_uint32ss_resize__works(void **state) {
+void test__f_type_array_uint32ss_resize__parameter_checking(void **state) {
const int length = 5;
f_uint32ss_t data = f_uint32ss_t_initialize;
{
- const f_status_t status = f_uint32ss_resize(length, &data);
+ const f_status_t status = f_uint32ss_resize(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_uint32ss_resize__parameter_checking(void **state) {
+void test__f_type_array_uint32ss_resize__works(void **state) {
const int length = 5;
f_uint32ss_t data = f_uint32ss_t_initialize;
{
- const f_status_t status = f_uint32ss_resize(length, 0);
+ const f_status_t status = f_uint32ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__uint32ss_resize
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint32ss_resize()
+ * @see f_uint32ss_resize()
*/
-extern void test__f_type_array_uint32ss_resize__works(void **state);
+extern void test__f_type_array_uint32ss_resize__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint32ss_resize()
+ * @see f_uint32ss_resize()
*/
-extern void test__f_type_array_uint32ss_resize__parameter_checking(void **state);
+extern void test__f_type_array_uint32ss_resize__works(void **state);
#endif // _TEST__F_type_array__uint32ss_resize
extern "C" {
#endif
-void test__f_type_array_uint64s_adjust__works(void **state) {
+void test__f_type_array_uint64s_adjust__parameter_checking(void **state) {
const int length = 5;
f_uint64s_t data = f_uint64s_t_initialize;
{
- const f_status_t status = f_uint64s_adjust(length, &data);
+ const f_status_t status = f_uint64s_adjust(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_uint64s_adjust__parameter_checking(void **state) {
+void test__f_type_array_uint64s_adjust__works(void **state) {
const int length = 5;
f_uint64s_t data = f_uint64s_t_initialize;
{
- const f_status_t status = f_uint64s_adjust(length, 0);
+ const f_status_t status = f_uint64s_adjust(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__uint64s_adjust
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint64s_adjust()
+ * @see f_uint64s_adjust()
*/
-extern void test__f_type_array_uint64s_adjust__works(void **state);
+extern void test__f_type_array_uint64s_adjust__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint64s_adjust()
+ * @see f_uint64s_adjust()
*/
-extern void test__f_type_array_uint64s_adjust__parameter_checking(void **state);
+extern void test__f_type_array_uint64s_adjust__works(void **state);
#endif // _TEST__F_type_array__uint64s_adjust
extern "C" {
#endif
+void test__f_type_array_uint64s_append__parameter_checking(void **state) {
+
+ const uint64_t data = 0;
+
+ {
+ const f_status_t status = f_uint64s_append(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
void test__f_type_array_uint64s_append__works(void **state) {
const uint64_t source = 3;
free((void *) destination.array);
}
-void test__f_type_array_uint64s_append__parameter_checking(void **state) {
-
- const uint64_t data = 0;
-
- {
- const f_status_t status = f_uint64s_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__uint64s_append
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint64s_append()
+ * @see f_uint64s_append()
*/
-extern void test__f_type_array_uint64s_append__works(void **state);
+extern void test__f_type_array_uint64s_append__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint64s_append()
+ * @see f_uint64s_append()
*/
-extern void test__f_type_array_uint64s_append__parameter_checking(void **state);
+extern void test__f_type_array_uint64s_append__works(void **state);
#endif // _TEST__F_type_array__uint64s_append
extern "C" {
#endif
-void test__f_type_array_uint64s_append_all__works(void **state) {
+void test__f_type_array_uint64s_append_all__parameter_checking(void **state) {
+
+ const f_uint64s_t data = f_uint64s_t_initialize;
+
+ {
+ const f_status_t status = f_uint64s_append_all(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_uint64s_append_all__returns_data_not(void **state) {
const int length = 5;
- const int length_used = 2;
f_uint64s_t source = f_uint64s_t_initialize;
f_uint64s_t destination = f_uint64s_t_initialize;
assert_int_equal(source.size, length);
}
- for (; source.used < length_used; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
{
const f_status_t status = f_uint64s_append_all(source, &destination);
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_array_length_t i = 0; i < source.used; ++i) {
- assert_int_equal(destination.array[i], i + 1);
- } // for
+ 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);
- free((void *) destination.array);
}
-void test__f_type_array_uint64s_append_all__returns_data_not(void **state) {
+void test__f_type_array_uint64s_append_all__works(void **state) {
const int length = 5;
+ const int length_used = 2;
f_uint64s_t source = f_uint64s_t_initialize;
f_uint64s_t destination = f_uint64s_t_initialize;
assert_int_equal(source.size, length);
}
+ for (; source.used < length_used; ++source.used) {
+ source.array[source.used] = source.used + 1;
+ } // for
+
{
const f_status_t status = f_uint64s_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);
+ assert_int_equal(status, F_none);
+ assert_int_equal(destination.used, source.used);
+ assert_int_equal(destination.size, source.used);
+
+ for (f_array_length_t i = 0; i < source.used; ++i) {
+ assert_int_equal(destination.array[i], i + 1);
+ } // for
}
free((void *) source.array);
-}
-
-void test__f_type_array_uint64s_append_all__parameter_checking(void **state) {
-
- const f_uint64s_t data = f_uint64s_t_initialize;
-
- {
- const f_status_t status = f_uint64s_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
+ free((void *) destination.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__uint64s_append_all
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint64s_append_all()
+ * @see f_uint64s_append_all()
*/
-extern void test__f_type_array_uint64s_append_all__works(void **state);
+extern void test__f_type_array_uint64s_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 returns F_data_not.
*
- * @see f_type_array_uint64s_append_all()
+ * @see f_uint64s_append_all()
*/
extern void test__f_type_array_uint64s_append_all__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint64s_append_all()
+ * @see f_uint64s_append_all()
*/
-extern void test__f_type_array_uint64s_append_all__parameter_checking(void **state);
+extern void test__f_type_array_uint64s_append_all__works(void **state);
#endif // _TEST__F_type_array__uint64s_append_all
extern "C" {
#endif
-void test__f_type_array_uint64s_decimate_by__works(void **state) {
+void test__f_type_array_uint64s_decimate_by__parameter_checking(void **state) {
const int length = 5;
f_uint64s_t data = f_uint64s_t_initialize;
{
- const f_status_t status = f_uint64s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint64s_decimate_by(length, &data);
+ const f_status_t status = f_uint64s_decimate_by(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
assert_null(data.array);
}
-void test__f_type_array_uint64s_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_uint64s_decimate_by__works(void **state) {
const int length = 5;
f_uint64s_t data = f_uint64s_t_initialize;
{
- const f_status_t status = f_uint64s_decimate_by(length, 0);
+ const f_status_t status = f_uint64s_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_uint64s_decimate_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__uint64s_decimate_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint64s_decimate_by()
+ * @see f_uint64s_decimate_by()
*/
-extern void test__f_type_array_uint64s_decimate_by__works(void **state);
+extern void test__f_type_array_uint64s_decimate_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint64s_decimate_by()
+ * @see f_uint64s_decimate_by()
*/
-extern void test__f_type_array_uint64s_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_uint64s_decimate_by__works(void **state);
#endif // _TEST__F_type_array__uint64s_decimate_by
extern "C" {
#endif
-void test__f_type_array_uint64s_decrease_by__works(void **state) {
+void test__f_type_array_uint64s_decrease_by__parameter_checking(void **state) {
const int length = 5;
f_uint64s_t data = f_uint64s_t_initialize;
{
- const f_status_t status = f_uint64s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint64s_decrease_by(length, &data);
+ const f_status_t status = f_uint64s_decrease_by(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
assert_null(data.array);
}
-void test__f_type_array_uint64s_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_uint64s_decrease_by__works(void **state) {
const int length = 5;
f_uint64s_t data = f_uint64s_t_initialize;
{
- const f_status_t status = f_uint64s_decrease_by(length, 0);
+ const f_status_t status = f_uint64s_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_uint64s_decrease_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__uint64s_decrease_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint64s_decrease_by()
+ * @see f_uint64s_decrease_by()
*/
-extern void test__f_type_array_uint64s_decrease_by__works(void **state);
+extern void test__f_type_array_uint64s_decrease_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint64s_decrease_by()
+ * @see f_uint64s_decrease_by()
*/
-extern void test__f_type_array_uint64s_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_uint64s_decrease_by__works(void **state);
#endif // _TEST__F_type_array__uint64s_decrease_by
extern "C" {
#endif
-void test__f_type_array_uint64s_increase__works(void **state) {
+void test__f_type_array_uint64s_increase__parameter_checking(void **state) {
const int length = 5;
f_uint64s_t data = f_uint64s_t_initialize;
{
- const f_status_t status = f_uint64s_resize(length, &data);
+ const f_status_t status = f_uint64s_increase(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_uint64s_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ assert_int_equal(data.size, 0);
}
free((void *) data.array);
free((void *) data.array);
}
-void test__f_type_array_uint64s_increase__parameter_checking(void **state) {
+void test__f_type_array_uint64s_increase__works(void **state) {
const int length = 5;
f_uint64s_t data = f_uint64s_t_initialize;
{
- const f_status_t status = f_uint64s_increase(length, 0);
+ const f_status_t status = f_uint64s_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_uint64s_increase(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
}
free((void *) data.array);
#define _TEST__F_type_array__uint64s_increase
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint64s_increase()
+ * @see f_uint64s_increase()
*/
-extern void test__f_type_array_uint64s_increase__works(void **state);
+extern void test__f_type_array_uint64s_increase__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_uint64s_increase()
+ * @see f_uint64s_increase()
*/
extern void test__f_type_array_uint64s_increase__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint64s_increase()
+ * @see f_uint64s_increase()
*/
-extern void test__f_type_array_uint64s_increase__parameter_checking(void **state);
+extern void test__f_type_array_uint64s_increase__works(void **state);
#endif // _TEST__F_type_array__uint64s_increase
extern "C" {
#endif
+void test__f_type_array_uint64s_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_uint64s_t data = f_uint64s_t_initialize;
+
+ {
+ const f_status_t status = f_uint64s_increase_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
void test__f_type_array_uint64s_increase_by__works(void **state) {
const int length = 5;
free((void *) data.array);
}
-void test__f_type_array_uint64s_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint64s_t data = f_uint64s_t_initialize;
-
- {
- const f_status_t status = f_uint64s_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__uint64s_increase_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint64s_increase_by()
+ * @see f_uint64s_increase_by()
*/
-extern void test__f_type_array_uint64s_increase_by__works(void **state);
+extern void test__f_type_array_uint64s_increase_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint64s_increase_by()
+ * @see f_uint64s_increase_by()
*/
-extern void test__f_type_array_uint64s_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_uint64s_increase_by__works(void **state);
#endif // _TEST__F_type_array__uint64s_increase_by
extern "C" {
#endif
-void test__f_type_array_uint64s_resize__works(void **state) {
+void test__f_type_array_uint64s_resize__parameter_checking(void **state) {
const int length = 5;
f_uint64s_t data = f_uint64s_t_initialize;
{
- const f_status_t status = f_uint64s_resize(length, &data);
+ const f_status_t status = f_uint64s_resize(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_uint64s_resize__parameter_checking(void **state) {
+void test__f_type_array_uint64s_resize__works(void **state) {
const int length = 5;
f_uint64s_t data = f_uint64s_t_initialize;
{
- const f_status_t status = f_uint64s_resize(length, 0);
+ const f_status_t status = f_uint64s_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__uint64s_resize
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint64s_resize()
+ * @see f_uint64s_resize()
*/
-extern void test__f_type_array_uint64s_resize__works(void **state);
+extern void test__f_type_array_uint64s_resize__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint64s_resize()
+ * @see f_uint64s_resize()
*/
-extern void test__f_type_array_uint64s_resize__parameter_checking(void **state);
+extern void test__f_type_array_uint64s_resize__works(void **state);
#endif // _TEST__F_type_array__uint64s_resize
extern "C" {
#endif
-void test__f_type_array_uint64ss_adjust__works(void **state) {
+void test__f_type_array_uint64ss_adjust__parameter_checking(void **state) {
const int length = 5;
f_uint64ss_t data = f_uint64ss_t_initialize;
{
- const f_status_t status = f_uint64ss_adjust(length, &data);
+ const f_status_t status = f_uint64ss_adjust(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_uint64ss_adjust__parameter_checking(void **state) {
+void test__f_type_array_uint64ss_adjust__works(void **state) {
const int length = 5;
f_uint64ss_t data = f_uint64ss_t_initialize;
{
- const f_status_t status = f_uint64ss_adjust(length, 0);
+ const f_status_t status = f_uint64ss_adjust(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__uint64ss_adjust
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint64ss_adjust()
+ * @see f_uint64ss_adjust()
*/
-extern void test__f_type_array_uint64ss_adjust__works(void **state);
+extern void test__f_type_array_uint64ss_adjust__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint64ss_adjust()
+ * @see f_uint64ss_adjust()
*/
-extern void test__f_type_array_uint64ss_adjust__parameter_checking(void **state);
+extern void test__f_type_array_uint64ss_adjust__works(void **state);
#endif // _TEST__F_type_array__uint64ss_adjust
extern "C" {
#endif
-void test__f_type_array_uint64ss_append__works(void **state) {
+void test__f_type_array_uint64ss_append__parameter_checking(void **state) {
+
+ f_uint64s_t data = f_uint64s_t_initialize;
+
+ {
+ const f_status_t status = f_uint64ss_append(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_uint64ss_append__returns_data_not(void **state) {
const int length = 5;
f_uint64s_t source = f_uint64s_t_initialize;
assert_int_equal(source.size, length);
}
- for (; source.used < length; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
{
const f_status_t status = f_uint64ss_append(source, &destination);
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0].used, source.used);
- assert_int_equal(destination.array[0].size, source.used);
-
- for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
- assert_int_equal(destination.array[0].array[i], i + 1);
- } // for
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(destination.used, 0);
+ assert_int_equal(destination.size, 0);
+ assert_null(destination.array);
}
- for (f_array_length_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
free((void *) source.array);
- free((void *) destination.array);
}
-void test__f_type_array_uint64ss_append__returns_data_not(void **state) {
+void test__f_type_array_uint64ss_append__works(void **state) {
const int length = 5;
f_uint64s_t source = f_uint64s_t_initialize;
assert_int_equal(source.size, length);
}
+ for (; source.used < length; ++source.used) {
+ source.array[source.used] = source.used + 1;
+ } // for
+
{
const f_status_t status = f_uint64ss_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_type_array_uint64ss_append__parameter_checking(void **state) {
+ assert_int_equal(status, F_none);
+ assert_int_equal(destination.used, 1);
+ assert_int_equal(destination.array[0].used, source.used);
+ assert_int_equal(destination.array[0].size, source.used);
- f_uint64s_t data = f_uint64s_t_initialize;
+ for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
+ assert_int_equal(destination.array[0].array[i], i + 1);
+ } // for
+ }
- {
- const f_status_t status = f_uint64ss_append(data, 0);
+ for (f_array_length_t i = 0; i < destination.used; ++i) {
+ free((void *) destination.array[i].array);
+ } // for
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
+ free((void *) source.array);
+ free((void *) destination.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__uint64ss_append
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint64ss_append()
+ * @see f_uint64ss_append()
*/
-extern void test__f_type_array_uint64ss_append__works(void **state);
+extern void test__f_type_array_uint64ss_append__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_uint64ss_append()
+ * @see f_uint64ss_append()
*/
extern void test__f_type_array_uint64ss_append__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint64ss_append()
+ * @see f_uint64ss_append()
*/
-extern void test__f_type_array_uint64ss_append__parameter_checking(void **state);
+extern void test__f_type_array_uint64ss_append__works(void **state);
#endif // _TEST__F_type_array__uint64ss_append
extern "C" {
#endif
+void test__f_type_array_uint64ss_append_all__parameter_checking(void **state) {
+
+ const f_uint64ss_t data = f_uint64ss_t_initialize;
+
+ {
+ const f_status_t status = f_uint64ss_append_all(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_uint64ss_append_all__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_uint64ss_t source = f_uint64ss_t_initialize;
+ f_uint64ss_t destination = f_uint64ss_t_initialize;
+
+ {
+ const f_status_t status = f_uint64ss_resize(length, &source);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(source.used, 0);
+ assert_int_equal(source.size, length);
+ }
+
+ {
+ const f_status_t status = f_uint64ss_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_type_array_uint64ss_append_all__works(void **state) {
const int length = 5;
free((void *) destination.array);
}
-void test__f_type_array_uint64ss_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint64ss_t source = f_uint64ss_t_initialize;
- f_uint64ss_t destination = f_uint64ss_t_initialize;
-
- {
- const f_status_t status = f_uint64ss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_uint64ss_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_type_array_uint64ss_append_all__parameter_checking(void **state) {
-
- const f_uint64ss_t data = f_uint64ss_t_initialize;
-
- {
- const f_status_t status = f_uint64ss_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__uint64ss_append_all
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint64ss_append_all()
+ * @see f_uint64ss_append_all()
*/
-extern void test__f_type_array_uint64ss_append_all__works(void **state);
+extern void test__f_type_array_uint64ss_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 returns F_data_not.
*
- * @see f_type_array_uint64ss_append_all()
+ * @see f_uint64ss_append_all()
*/
extern void test__f_type_array_uint64ss_append_all__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint64ss_append_all()
+ * @see f_uint64ss_append_all()
*/
-extern void test__f_type_array_uint64ss_append_all__parameter_checking(void **state);
+extern void test__f_type_array_uint64ss_append_all__works(void **state);
#endif // _TEST__F_type_array__uint64ss_append_all
extern "C" {
#endif
-void test__f_type_array_uint64ss_decimate_by__works(void **state) {
+void test__f_type_array_uint64ss_decimate_by__parameter_checking(void **state) {
const int length = 5;
f_uint64ss_t data = f_uint64s_t_initialize;
{
+ const f_status_t status = f_uint64ss_decimate_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_uint64ss_decimate_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_uint64ss_t data = f_uint64ss_t_initialize;
+
+ {
const f_status_t status = f_uint64ss_resize(length, &data);
assert_int_equal(status, F_none);
}
{
- const f_status_t status = f_uint64ss_decimate_by(length, &data);
+ const f_status_t status = f_uint64ss_decimate_by(0, &data);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_data_not);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
-void test__f_type_array_uint64ss_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_uint64ss_decimate_by__works(void **state) {
const int length = 5;
f_uint64ss_t data = f_uint64s_t_initialize;
{
- const f_status_t status = f_uint64ss_decimate_by(length, 0);
+ const f_status_t status = f_uint64ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_uint64ss_decimate_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__uint64ss_decimate_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint64ss_decimate_by()
+ * @see f_uint64ss_decimate_by()
*/
-extern void test__f_type_array_uint64ss_decimate_by__works(void **state);
+extern void test__f_type_array_uint64ss_decimate_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
* @see f_type_array_uint64ss_decimate_by()
*/
-extern void test__f_type_array_uint64ss_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_uint64ss_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint64ss_decimate_by()
+ */
+extern void test__f_type_array_uint64ss_decimate_by__works(void **state);
#endif // _TEST__F_type_array__uint64ss_decimate_by
extern "C" {
#endif
-void test__f_type_array_uint64ss_decrease_by__works(void **state) {
+void test__f_type_array_uint64ss_decrease_by__parameter_checking(void **state) {
const int length = 5;
f_uint64ss_t data = f_uint64s_t_initialize;
{
+ const f_status_t status = f_uint64ss_decrease_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_uint64ss_decrease_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_uint64ss_t data = f_uint64ss_t_initialize;
+
+ {
const f_status_t status = f_uint64ss_resize(length, &data);
assert_int_equal(status, F_none);
}
{
- const f_status_t status = f_uint64ss_decrease_by(length, &data);
+ const f_status_t status = f_uint64ss_decrease_by(0, &data);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_data_not);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
-void test__f_type_array_uint64ss_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_uint64ss_decrease_by__works(void **state) {
const int length = 5;
f_uint64ss_t data = f_uint64s_t_initialize;
{
- const f_status_t status = f_uint64ss_decrease_by(length, 0);
+ const f_status_t status = f_uint64ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_uint64ss_decrease_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__uint64ss_decrease_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint64ss_decrease_by()
+ * @see f_uint64ss_decrease_by()
*/
-extern void test__f_type_array_uint64ss_decrease_by__works(void **state);
+extern void test__f_type_array_uint64ss_decrease_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_uint64ss_decrease_by()
+ * @see f_uint64ss_decrease_by()
*/
-extern void test__f_type_array_uint64ss_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_uint64ss_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint64ss_decrease_by()
+ */
+extern void test__f_type_array_uint64ss_decrease_by__works(void **state);
#endif // _TEST__F_type_array__uint64ss_decrease_by
extern "C" {
#endif
-void test__f_type_array_uint64ss_increase__works(void **state) {
+void test__f_type_array_uint64ss_increase__parameter_checking(void **state) {
const int length = 5;
f_uint64ss_t data = f_uint64s_t_initialize;
{
- const f_status_t status = f_uint64ss_resize(length, &data);
+ const f_status_t status = f_uint64ss_increase(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_uint64ss_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ assert_int_equal(data.size, 0);
}
free((void *) data.array);
free((void *) data.array);
}
-void test__f_type_array_uint64ss_increase__parameter_checking(void **state) {
+void test__f_type_array_uint64ss_increase__works(void **state) {
const int length = 5;
f_uint64ss_t data = f_uint64s_t_initialize;
{
- const f_status_t status = f_uint64ss_increase(length, 0);
+ const f_status_t status = f_uint64ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_uint64ss_increase(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
}
free((void *) data.array);
#define _TEST__F_type_array__uint64ss_increase
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint64ss_increase()
+ * @see f_uint64ss_increase()
*/
-extern void test__f_type_array_uint64ss_increase__works(void **state);
+extern void test__f_type_array_uint64ss_increase__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_uint64ss_increase()
+ * @see f_uint64ss_increase()
*/
extern void test__f_type_array_uint64ss_increase__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint64ss_increase()
+ * @see f_uint64ss_increase()
*/
-extern void test__f_type_array_uint64ss_increase__parameter_checking(void **state);
+extern void test__f_type_array_uint64ss_increase__works(void **state);
#endif // _TEST__F_type_array__uint64ss_increase
extern "C" {
#endif
-void test__f_type_array_uint64ss_increase_by__works(void **state) {
+void test__f_type_array_uint64ss_increase_by__parameter_checking(void **state) {
const int length = 5;
f_uint64ss_t data = f_uint64s_t_initialize;
{
+ const f_status_t status = f_uint64ss_increase_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_uint64ss_increase_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_uint64ss_t data = f_uint64ss_t_initialize;
+
+ {
const f_status_t status = f_uint64ss_resize(length, &data);
assert_int_equal(status, F_none);
}
{
- data.used = length;
+ const f_status_t status = f_uint64ss_increase_by(0, &data);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+ {
const f_status_t status = f_uint64ss_increase_by(length, &data);
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
}
free((void *) data.array);
}
-void test__f_type_array_uint64ss_increase_by__parameter_checking(void **state) {
+void test__f_type_array_uint64ss_increase_by__works(void **state) {
const int length = 5;
f_uint64ss_t data = f_uint64s_t_initialize;
{
- const f_status_t status = f_uint64ss_increase_by(length, 0);
+ const f_status_t status = f_uint64ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ {
+ data.used = length;
+
+ const f_status_t status = f_uint64ss_increase_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_int_equal(data.size, length * 2);
+ }
+
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__uint64ss_increase_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint64ss_increase_by()
+ * @see f_uint64ss_increase_by()
*/
-extern void test__f_type_array_uint64ss_increase_by__works(void **state);
+extern void test__f_type_array_uint64ss_increase_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_uint64ss_increase_by()
+ * @see f_uint64ss_increase_by()
*/
-extern void test__f_type_array_uint64ss_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_uint64ss_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint64ss_increase_by()
+ */
+extern void test__f_type_array_uint64ss_increase_by__works(void **state);
#endif // _TEST__F_type_array__uint64ss_increase_by
extern "C" {
#endif
-void test__f_type_array_uint64ss_resize__works(void **state) {
+void test__f_type_array_uint64ss_resize__parameter_checking(void **state) {
const int length = 5;
f_uint64ss_t data = f_uint64ss_t_initialize;
{
- const f_status_t status = f_uint64ss_resize(length, &data);
+ const f_status_t status = f_uint64ss_resize(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_uint64ss_resize__parameter_checking(void **state) {
+void test__f_type_array_uint64ss_resize__works(void **state) {
const int length = 5;
f_uint64ss_t data = f_uint64ss_t_initialize;
{
- const f_status_t status = f_uint64ss_resize(length, 0);
+ const f_status_t status = f_uint64ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__uint64ss_resize
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint64ss_resize()
+ * @see f_uint64ss_resize()
*/
-extern void test__f_type_array_uint64ss_resize__works(void **state);
+extern void test__f_type_array_uint64ss_resize__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint64ss_resize()
+ * @see f_uint64ss_resize()
*/
-extern void test__f_type_array_uint64ss_resize__parameter_checking(void **state);
+extern void test__f_type_array_uint64ss_resize__works(void **state);
#endif // _TEST__F_type_array__uint64ss_resize
extern "C" {
#endif
-void test__f_type_array_uint8s_adjust__works(void **state) {
+void test__f_type_array_uint8s_adjust__parameter_checking(void **state) {
const int length = 5;
f_uint8s_t data = f_uint8s_t_initialize;
{
- const f_status_t status = f_uint8s_adjust(length, &data);
+ const f_status_t status = f_uint8s_adjust(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_uint8s_adjust__parameter_checking(void **state) {
+void test__f_type_array_uint8s_adjust__works(void **state) {
const int length = 5;
f_uint8s_t data = f_uint8s_t_initialize;
{
- const f_status_t status = f_uint8s_adjust(length, 0);
+ const f_status_t status = f_uint8s_adjust(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__uint8s_adjust
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint8s_adjust()
+ * @see f_uint8s_adjust()
*/
-extern void test__f_type_array_uint8s_adjust__works(void **state);
+extern void test__f_type_array_uint8s_adjust__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint8s_adjust()
+ * @see f_uint8s_adjust()
*/
-extern void test__f_type_array_uint8s_adjust__parameter_checking(void **state);
+extern void test__f_type_array_uint8s_adjust__works(void **state);
#endif // _TEST__F_type_array__uint8s_adjust
extern "C" {
#endif
+void test__f_type_array_uint8s_append__parameter_checking(void **state) {
+
+ const uint8_t data = 0;
+
+ {
+ const f_status_t status = f_uint8s_append(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
void test__f_type_array_uint8s_append__works(void **state) {
const uint8_t source = 3;
free((void *) destination.array);
}
-void test__f_type_array_uint8s_append__parameter_checking(void **state) {
-
- const uint8_t data = 0;
-
- {
- const f_status_t status = f_uint8s_append(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__uint8s_append
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint8s_append()
+ * @see f_uint8s_append()
*/
-extern void test__f_type_array_uint8s_append__works(void **state);
+extern void test__f_type_array_uint8s_append__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint8s_append()
+ * @see f_uint8s_append()
*/
-extern void test__f_type_array_uint8s_append__parameter_checking(void **state);
+extern void test__f_type_array_uint8s_append__works(void **state);
#endif // _TEST__F_type_array__uint8s_append
extern "C" {
#endif
-void test__f_type_array_uint8s_append_all__works(void **state) {
+void test__f_type_array_uint8s_append_all__parameter_checking(void **state) {
+
+ const f_uint8s_t data = f_uint8s_t_initialize;
+
+ {
+ const f_status_t status = f_uint8s_append_all(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_uint8s_append_all__returns_data_not(void **state) {
const int length = 5;
- const int length_used = 2;
f_uint8s_t source = f_uint8s_t_initialize;
f_uint8s_t destination = f_uint8s_t_initialize;
assert_int_equal(source.size, length);
}
- for (; source.used < length_used; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
{
const f_status_t status = f_uint8s_append_all(source, &destination);
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, source.used);
- assert_int_equal(destination.size, source.used);
-
- for (f_array_length_t i = 0; i < source.used; ++i) {
- assert_int_equal(destination.array[i], i + 1);
- } // for
+ 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);
- free((void *) destination.array);
}
-void test__f_type_array_uint8s_append_all__returns_data_not(void **state) {
+void test__f_type_array_uint8s_append_all__works(void **state) {
const int length = 5;
+ const int length_used = 2;
f_uint8s_t source = f_uint8s_t_initialize;
f_uint8s_t destination = f_uint8s_t_initialize;
assert_int_equal(source.size, length);
}
+ for (; source.used < length_used; ++source.used) {
+ source.array[source.used] = source.used + 1;
+ } // for
+
{
const f_status_t status = f_uint8s_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);
+ assert_int_equal(status, F_none);
+ assert_int_equal(destination.used, source.used);
+ assert_int_equal(destination.size, source.used);
+
+ for (f_array_length_t i = 0; i < source.used; ++i) {
+ assert_int_equal(destination.array[i], i + 1);
+ } // for
}
free((void *) source.array);
-}
-
-void test__f_type_array_uint8s_append_all__parameter_checking(void **state) {
-
- const f_uint8s_t data = f_uint8s_t_initialize;
-
- {
- const f_status_t status = f_uint8s_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
+ free((void *) destination.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__uint8s_append_all
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint8s_append_all()
+ * @see f_uint8s_append_all()
*/
-extern void test__f_type_array_uint8s_append_all__works(void **state);
+extern void test__f_type_array_uint8s_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 returns F_data_not.
*
- * @see f_type_array_uint8s_append_all()
+ * @see f_uint8s_append_all()
*/
extern void test__f_type_array_uint8s_append_all__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint8s_append_all()
+ * @see f_uint8s_append_all()
*/
-extern void test__f_type_array_uint8s_append_all__parameter_checking(void **state);
+extern void test__f_type_array_uint8s_append_all__works(void **state);
#endif // _TEST__F_type_array__uint8s_append_all
extern "C" {
#endif
-void test__f_type_array_uint8s_decimate_by__works(void **state) {
+void test__f_type_array_uint8s_decimate_by__parameter_checking(void **state) {
const int length = 5;
f_uint8s_t data = f_uint8s_t_initialize;
{
- const f_status_t status = f_uint8s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint8s_decimate_by(length, &data);
+ const f_status_t status = f_uint8s_decimate_by(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
assert_null(data.array);
}
-void test__f_type_array_uint8s_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_uint8s_decimate_by__works(void **state) {
const int length = 5;
f_uint8s_t data = f_uint8s_t_initialize;
{
- const f_status_t status = f_uint8s_decimate_by(length, 0);
+ const f_status_t status = f_uint8s_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_uint8s_decimate_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__uint8s_decimate_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint8s_decimate_by()
+ * @see f_uint8s_decimate_by()
*/
-extern void test__f_type_array_uint8s_decimate_by__works(void **state);
+extern void test__f_type_array_uint8s_decimate_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint8s_decimate_by()
+ * @see f_uint8s_decimate_by()
*/
-extern void test__f_type_array_uint8s_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_uint8s_decimate_by__works(void **state);
#endif // _TEST__F_type_array__uint8s_decimate_by
extern "C" {
#endif
-void test__f_type_array_uint8s_decrease_by__works(void **state) {
+void test__f_type_array_uint8s_decrease_by__parameter_checking(void **state) {
const int length = 5;
f_uint8s_t data = f_uint8s_t_initialize;
{
- const f_status_t status = f_uint8s_resize(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- const f_status_t status = f_uint8s_decrease_by(length, &data);
+ const f_status_t status = f_uint8s_decrease_by(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
assert_null(data.array);
}
-void test__f_type_array_uint8s_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_uint8s_decrease_by__works(void **state) {
const int length = 5;
f_uint8s_t data = f_uint8s_t_initialize;
{
- const f_status_t status = f_uint8s_decrease_by(length, 0);
+ const f_status_t status = f_uint8s_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_uint8s_decrease_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__uint8s_decrease_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint8s_decrease_by()
+ * @see f_uint8s_decrease_by()
*/
-extern void test__f_type_array_uint8s_decrease_by__works(void **state);
+extern void test__f_type_array_uint8s_decrease_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint8s_decrease_by()
+ * @see f_uint8s_decrease_by()
*/
-extern void test__f_type_array_uint8s_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_uint8s_decrease_by__works(void **state);
#endif // _TEST__F_type_array__uint8s_decrease_by
extern "C" {
#endif
-void test__f_type_array_uint8s_increase__works(void **state) {
+void test__f_type_array_uint8s_increase__parameter_checking(void **state) {
const int length = 5;
f_uint8s_t data = f_uint8s_t_initialize;
{
- const f_status_t status = f_uint8s_resize(length, &data);
+ const f_status_t status = f_uint8s_increase(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_uint8s_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ assert_int_equal(data.size, 0);
}
free((void *) data.array);
free((void *) data.array);
}
-void test__f_type_array_uint8s_increase__parameter_checking(void **state) {
+void test__f_type_array_uint8s_increase__works(void **state) {
const int length = 5;
f_uint8s_t data = f_uint8s_t_initialize;
{
- const f_status_t status = f_uint8s_increase(length, 0);
+ const f_status_t status = f_uint8s_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_uint8s_increase(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
}
free((void *) data.array);
#define _TEST__F_type_array__uint8s_increase
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint8s_increase()
+ * @see f_uint8s_increase()
*/
-extern void test__f_type_array_uint8s_increase__works(void **state);
+extern void test__f_type_array_uint8s_increase__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_uint8s_increase()
+ * @see f_uint8s_increase()
*/
extern void test__f_type_array_uint8s_increase__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint8s_increase()
+ * @see f_uint8s_increase()
*/
-extern void test__f_type_array_uint8s_increase__parameter_checking(void **state);
+extern void test__f_type_array_uint8s_increase__works(void **state);
#endif // _TEST__F_type_array__uint8s_increase
extern "C" {
#endif
+
+void test__f_type_array_uint8s_increase_by__parameter_checking(void **state) {
+
+ const int length = 5;
+ f_uint8s_t data = f_uint8s_t_initialize;
+
+ {
+ const f_status_t status = f_uint8s_increase_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
void test__f_type_array_uint8s_increase_by__works(void **state) {
const int length = 5;
free((void *) data.array);
}
-void test__f_type_array_uint8s_increase_by__parameter_checking(void **state) {
-
- const int length = 5;
- f_uint8s_t data = f_uint8s_t_initialize;
-
- {
- const f_status_t status = f_uint8s_increase_by(length, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
- }
-
- assert_null(data.array);
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__uint8s_increase_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint8s_increase_by()
+ * @see f_uint8s_increase_by()
*/
-extern void test__f_type_array_uint8s_increase_by__works(void **state);
+extern void test__f_type_array_uint8s_increase_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint8s_increase_by()
+ * @see f_uint8s_increase_by()
*/
-extern void test__f_type_array_uint8s_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_uint8s_increase_by__works(void **state);
#endif // _TEST__F_type_array__uint8s_increase_by
extern "C" {
#endif
-void test__f_type_array_uint8s_resize__works(void **state) {
+void test__f_type_array_uint8s_resize__parameter_checking(void **state) {
const int length = 5;
f_uint8s_t data = f_uint8s_t_initialize;
{
- const f_status_t status = f_uint8s_resize(length, &data);
+ const f_status_t status = f_uint8s_resize(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_uint8s_resize__parameter_checking(void **state) {
+void test__f_type_array_uint8s_resize__works(void **state) {
const int length = 5;
f_uint8s_t data = f_uint8s_t_initialize;
{
- const f_status_t status = f_uint8s_resize(length, 0);
+ const f_status_t status = f_uint8s_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__uint8s_resize
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint8s_resize()
+ * @see f_uint8s_resize()
*/
-extern void test__f_type_array_uint8s_resize__works(void **state);
+extern void test__f_type_array_uint8s_resize__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint8s_resize()
+ * @see f_uint8s_resize()
*/
-extern void test__f_type_array_uint8s_resize__parameter_checking(void **state);
+extern void test__f_type_array_uint8s_resize__works(void **state);
#endif // _TEST__F_type_array__uint8s_resize
extern "C" {
#endif
-void test__f_type_array_uint8ss_adjust__works(void **state) {
+void test__f_type_array_uint8ss_adjust__parameter_checking(void **state) {
const int length = 5;
f_uint8ss_t data = f_uint8ss_t_initialize;
{
- const f_status_t status = f_uint8ss_adjust(length, &data);
+ const f_status_t status = f_uint8ss_adjust(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_uint8ss_adjust__parameter_checking(void **state) {
+void test__f_type_array_uint8ss_adjust__works(void **state) {
const int length = 5;
f_uint8ss_t data = f_uint8ss_t_initialize;
{
- const f_status_t status = f_uint8ss_adjust(length, 0);
+ const f_status_t status = f_uint8ss_adjust(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__uint8ss_adjust
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint8ss_adjust()
+ * @see f_uint8ss_adjust()
*/
-extern void test__f_type_array_uint8ss_adjust__works(void **state);
+extern void test__f_type_array_uint8ss_adjust__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint8ss_adjust()
+ * @see f_uint8ss_adjust()
*/
-extern void test__f_type_array_uint8ss_adjust__parameter_checking(void **state);
+extern void test__f_type_array_uint8ss_adjust__works(void **state);
#endif // _TEST__F_type_array__uint8ss_adjust
extern "C" {
#endif
-void test__f_type_array_uint8ss_append__works(void **state) {
+void test__f_type_array_uint8ss_append__parameter_checking(void **state) {
+
+ f_uint8s_t data = f_uint8s_t_initialize;
+
+ {
+ const f_status_t status = f_uint8ss_append(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_uint8ss_append__returns_data_not(void **state) {
const int length = 5;
f_uint8s_t source = f_uint8s_t_initialize;
assert_int_equal(source.size, length);
}
- for (; source.used < length; ++source.used) {
- source.array[source.used] = source.used + 1;
- } // for
-
{
const f_status_t status = f_uint8ss_append(source, &destination);
- assert_int_equal(status, F_none);
- assert_int_equal(destination.used, 1);
- assert_int_equal(destination.array[0].used, source.used);
- assert_int_equal(destination.array[0].size, source.used);
-
- for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
- assert_int_equal(destination.array[0].array[i], i + 1);
- } // for
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(destination.used, 0);
+ assert_int_equal(destination.size, 0);
+ assert_null(destination.array);
}
- for (f_array_length_t i = 0; i < destination.used; ++i) {
- free((void *) destination.array[i].array);
- } // for
-
free((void *) source.array);
- free((void *) destination.array);
}
-void test__f_type_array_uint8ss_append__returns_data_not(void **state) {
+void test__f_type_array_uint8ss_append__works(void **state) {
const int length = 5;
f_uint8s_t source = f_uint8s_t_initialize;
assert_int_equal(source.size, length);
}
+ for (; source.used < length; ++source.used) {
+ source.array[source.used] = source.used + 1;
+ } // for
+
{
const f_status_t status = f_uint8ss_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_type_array_uint8ss_append__parameter_checking(void **state) {
+ assert_int_equal(status, F_none);
+ assert_int_equal(destination.used, 1);
+ assert_int_equal(destination.array[0].used, source.used);
+ assert_int_equal(destination.array[0].size, source.used);
- f_uint8s_t data = f_uint8s_t_initialize;
+ for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
+ assert_int_equal(destination.array[0].array[i], i + 1);
+ } // for
+ }
- {
- const f_status_t status = f_uint8ss_append(data, 0);
+ for (f_array_length_t i = 0; i < destination.used; ++i) {
+ free((void *) destination.array[i].array);
+ } // for
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
+ free((void *) source.array);
+ free((void *) destination.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__uint8ss_append
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint8ss_append()
+ * @see f_uint8ss_append()
*/
-extern void test__f_type_array_uint8ss_append__works(void **state);
+extern void test__f_type_array_uint8ss_append__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_uint8ss_append()
+ * @see f_uint8ss_append()
*/
extern void test__f_type_array_uint8ss_append__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint8ss_append()
+ * @see f_uint8ss_append()
*/
-extern void test__f_type_array_uint8ss_append__parameter_checking(void **state);
+extern void test__f_type_array_uint8ss_append__works(void **state);
#endif // _TEST__F_type_array__uint8ss_append
extern "C" {
#endif
+void test__f_type_array_uint8ss_append_all__parameter_checking(void **state) {
+
+ const f_uint8ss_t data = f_uint8ss_t_initialize;
+
+ {
+ const f_status_t status = f_uint8ss_append_all(data, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_type_array_uint8ss_append_all__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_uint8ss_t source = f_uint8ss_t_initialize;
+ f_uint8ss_t destination = f_uint8ss_t_initialize;
+
+ {
+ const f_status_t status = f_uint8ss_resize(length, &source);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(source.used, 0);
+ assert_int_equal(source.size, length);
+ }
+
+ {
+ const f_status_t status = f_uint8ss_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_type_array_uint8ss_append_all__works(void **state) {
const int length = 5;
free((void *) destination.array);
}
-void test__f_type_array_uint8ss_append_all__returns_data_not(void **state) {
-
- const int length = 5;
- f_uint8ss_t source = f_uint8ss_t_initialize;
- f_uint8ss_t destination = f_uint8ss_t_initialize;
-
- {
- const f_status_t status = f_uint8ss_resize(length, &source);
-
- assert_int_equal(status, F_none);
- assert_int_equal(source.used, 0);
- assert_int_equal(source.size, length);
- }
-
- {
- const f_status_t status = f_uint8ss_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_type_array_uint8ss_append_all__parameter_checking(void **state) {
-
- const f_uint8ss_t data = f_uint8ss_t_initialize;
-
- {
- const f_status_t status = f_uint8ss_append_all(data, 0);
-
- assert_int_equal(status, F_status_set_error(F_parameter));
- }
-}
-
#ifdef __cplusplus
} // extern "C"
#endif
#define _TEST__F_type_array__uint8ss_append_all
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint8ss_append_all()
+ * @see f_uint8ss_append_all()
*/
-extern void test__f_type_array_uint8ss_append_all__works(void **state);
+extern void test__f_type_array_uint8ss_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 returns F_data_not.
*
- * @see f_type_array_uint8ss_append_all()
+ * @see f_uint8ss_append_all()
*/
extern void test__f_type_array_uint8ss_append_all__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint8ss_append_all()
+ * @see f_uint8ss_append_all()
*/
-extern void test__f_type_array_uint8ss_append_all__parameter_checking(void **state);
+extern void test__f_type_array_uint8ss_append_all__works(void **state);
#endif // _TEST__F_type_array__uint8ss_append_all
extern "C" {
#endif
-void test__f_type_array_uint8ss_decimate_by__works(void **state) {
+void test__f_type_array_uint8ss_decimate_by__parameter_checking(void **state) {
const int length = 5;
f_uint8ss_t data = f_uint8s_t_initialize;
{
+ const f_status_t status = f_uint8ss_decimate_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_uint8ss_decimate_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_uint8ss_t data = f_uint8ss_t_initialize;
+
+ {
const f_status_t status = f_uint8ss_resize(length, &data);
assert_int_equal(status, F_none);
}
{
- const f_status_t status = f_uint8ss_decimate_by(length, &data);
+ const f_status_t status = f_uint8ss_decimate_by(0, &data);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_data_not);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
-void test__f_type_array_uint8ss_decimate_by__parameter_checking(void **state) {
+void test__f_type_array_uint8ss_decimate_by__works(void **state) {
const int length = 5;
f_uint8ss_t data = f_uint8s_t_initialize;
{
- const f_status_t status = f_uint8ss_decimate_by(length, 0);
+ const f_status_t status = f_uint8ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_uint8ss_decimate_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__uint8ss_decimate_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint8ss_decimate_by()
+ * @see f_uint8ss_decimate_by()
*/
-extern void test__f_type_array_uint8ss_decimate_by__works(void **state);
+extern void test__f_type_array_uint8ss_decimate_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
* @see f_type_array_uint8ss_decimate_by()
*/
-extern void test__f_type_array_uint8ss_decimate_by__parameter_checking(void **state);
+extern void test__f_type_array_uint8ss_decimate_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint8ss_decimate_by()
+ */
+extern void test__f_type_array_uint8ss_decimate_by__works(void **state);
#endif // _TEST__F_type_array__uint8ss_decimate_by
extern "C" {
#endif
-void test__f_type_array_uint8ss_decrease_by__works(void **state) {
+void test__f_type_array_uint8ss_decrease_by__parameter_checking(void **state) {
const int length = 5;
f_uint8ss_t data = f_uint8s_t_initialize;
{
+ const f_status_t status = f_uint8ss_decrease_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_uint8ss_decrease_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_uint8ss_t data = f_uint8ss_t_initialize;
+
+ {
const f_status_t status = f_uint8ss_resize(length, &data);
assert_int_equal(status, F_none);
}
{
- const f_status_t status = f_uint8ss_decrease_by(length, &data);
+ const f_status_t status = f_uint8ss_decrease_by(0, &data);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_data_not);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
-void test__f_type_array_uint8ss_decrease_by__parameter_checking(void **state) {
+void test__f_type_array_uint8ss_decrease_by__works(void **state) {
const int length = 5;
f_uint8ss_t data = f_uint8s_t_initialize;
{
- const f_status_t status = f_uint8ss_decrease_by(length, 0);
+ const f_status_t status = f_uint8ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ const f_status_t status = f_uint8ss_decrease_by(length, &data);
+
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
assert_int_equal(data.size, 0);
}
#define _TEST__F_type_array__uint8ss_decrease_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint8ss_decrease_by()
+ * @see f_uint8ss_decrease_by()
*/
-extern void test__f_type_array_uint8ss_decrease_by__works(void **state);
+extern void test__f_type_array_uint8ss_decrease_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_uint8ss_decrease_by()
+ * @see f_uint8ss_decrease_by()
*/
-extern void test__f_type_array_uint8ss_decrease_by__parameter_checking(void **state);
+extern void test__f_type_array_uint8ss_decrease_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint8ss_decrease_by()
+ */
+extern void test__f_type_array_uint8ss_decrease_by__works(void **state);
#endif // _TEST__F_type_array__uint8ss_decrease_by
extern "C" {
#endif
-void test__f_type_array_uint8ss_increase__works(void **state) {
+void test__f_type_array_uint8ss_increase__parameter_checking(void **state) {
const int length = 5;
f_uint8ss_t data = f_uint8s_t_initialize;
{
- const f_status_t status = f_uint8ss_resize(length, &data);
+ const f_status_t status = f_uint8ss_increase(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
- }
-
- {
- data.used = length;
-
- const f_status_t status = f_uint8ss_increase(length, &data);
-
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+ assert_int_equal(data.size, 0);
}
free((void *) data.array);
free((void *) data.array);
}
-void test__f_type_array_uint8ss_increase__parameter_checking(void **state) {
+void test__f_type_array_uint8ss_increase__works(void **state) {
const int length = 5;
f_uint8ss_t data = f_uint8s_t_initialize;
{
- const f_status_t status = f_uint8ss_increase(length, 0);
+ const f_status_t status = f_uint8ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
+ }
+
+ {
+ data.used = length;
+
+ const f_status_t status = f_uint8ss_increase(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
}
free((void *) data.array);
#define _TEST__F_type_array__uint8ss_increase
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint8ss_increase()
+ * @see f_uint8ss_increase()
*/
-extern void test__f_type_array_uint8ss_increase__works(void **state);
+extern void test__f_type_array_uint8ss_increase__parameter_checking(void **state);
/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_uint8ss_increase()
+ * @see f_uint8ss_increase()
*/
extern void test__f_type_array_uint8ss_increase__returns_data_not(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint8ss_increase()
+ * @see f_uint8ss_increase()
*/
-extern void test__f_type_array_uint8ss_increase__parameter_checking(void **state);
+extern void test__f_type_array_uint8ss_increase__works(void **state);
#endif // _TEST__F_type_array__uint8ss_increase
extern "C" {
#endif
-void test__f_type_array_uint8ss_increase_by__works(void **state) {
+void test__f_type_array_uint8ss_increase_by__parameter_checking(void **state) {
const int length = 5;
f_uint8ss_t data = f_uint8s_t_initialize;
{
+ const f_status_t status = f_uint8ss_increase_by(length, 0);
+
+ assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, 0);
+ }
+
+ assert_null(data.array);
+}
+
+void test__f_type_array_uint8ss_increase_by__returns_data_not(void **state) {
+
+ const int length = 5;
+ f_uint8ss_t data = f_uint8ss_t_initialize;
+
+ {
const f_status_t status = f_uint8ss_resize(length, &data);
assert_int_equal(status, F_none);
}
{
- data.used = length;
+ const f_status_t status = f_uint8ss_increase_by(0, &data);
+
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
+ }
+ {
const f_status_t status = f_uint8ss_increase_by(length, &data);
- assert_int_equal(status, F_none);
- assert_int_equal(data.used, length);
- assert_int_equal(data.size, length * 2);
+ assert_int_equal(status, F_data_not);
+ assert_int_equal(data.used, 0);
+ assert_int_equal(data.size, length);
}
free((void *) data.array);
}
-void test__f_type_array_uint8ss_increase_by__parameter_checking(void **state) {
+void test__f_type_array_uint8ss_increase_by__works(void **state) {
const int length = 5;
f_uint8ss_t data = f_uint8s_t_initialize;
{
- const f_status_t status = f_uint8ss_increase_by(length, 0);
+ const f_status_t status = f_uint8ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ {
+ data.used = length;
+
+ const f_status_t status = f_uint8ss_increase_by(length, &data);
+
+ assert_int_equal(status, F_none);
+ assert_int_equal(data.used, length);
+ assert_int_equal(data.size, length * 2);
+ }
+
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__uint8ss_increase_by
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint8ss_increase_by()
+ * @see f_uint8ss_increase_by()
*/
-extern void test__f_type_array_uint8ss_increase_by__works(void **state);
+extern void test__f_type_array_uint8ss_increase_by__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function returns F_data_not.
*
- * @see f_type_array_uint8ss_increase_by()
+ * @see f_uint8ss_increase_by()
*/
-extern void test__f_type_array_uint8ss_increase_by__parameter_checking(void **state);
+extern void test__f_type_array_uint8ss_increase_by__returns_data_not(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_uint8ss_increase_by()
+ */
+extern void test__f_type_array_uint8ss_increase_by__works(void **state);
#endif // _TEST__F_type_array__uint8ss_increase_by
extern "C" {
#endif
-void test__f_type_array_uint8ss_resize__works(void **state) {
+void test__f_type_array_uint8ss_resize__parameter_checking(void **state) {
const int length = 5;
f_uint8ss_t data = f_uint8ss_t_initialize;
{
- const f_status_t status = f_uint8ss_resize(length, &data);
+ const f_status_t status = f_uint8ss_resize(length, 0);
- assert_int_equal(status, F_none);
+ assert_int_equal(status, F_status_set_error(F_parameter));
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, length);
+ assert_int_equal(data.size, 0);
}
- free((void *) data.array);
+ assert_null(data.array);
}
-void test__f_type_array_uint8ss_resize__parameter_checking(void **state) {
+void test__f_type_array_uint8ss_resize__works(void **state) {
const int length = 5;
f_uint8ss_t data = f_uint8ss_t_initialize;
{
- const f_status_t status = f_uint8ss_resize(length, 0);
+ const f_status_t status = f_uint8ss_resize(length, &data);
- assert_int_equal(status, F_status_set_error(F_parameter));
+ assert_int_equal(status, F_none);
assert_int_equal(data.used, 0);
- assert_int_equal(data.size, 0);
+ assert_int_equal(data.size, length);
}
- assert_null(data.array);
+ free((void *) data.array);
}
#ifdef __cplusplus
#define _TEST__F_type_array__uint8ss_resize
/**
- * Test that the function works.
+ * Test that the function correctly fails on invalid parameter.
*
- * @see f_type_array_uint8ss_resize()
+ * @see f_uint8ss_resize()
*/
-extern void test__f_type_array_uint8ss_resize__works(void **state);
+extern void test__f_type_array_uint8ss_resize__parameter_checking(void **state);
/**
- * Test that the function correctly fails on invalid parameter.
+ * Test that the function works.
*
- * @see f_type_array_uint8ss_resize()
+ * @see f_uint8ss_resize()
*/
-extern void test__f_type_array_uint8ss_resize__parameter_checking(void **state);
+extern void test__f_type_array_uint8ss_resize__works(void **state);
#endif // _TEST__F_type_array__uint8ss_resize
cmocka_unit_test(test__f_type_array_array_lengths_adjust__works),
cmocka_unit_test(test__f_type_array_array_lengths_append__works),
cmocka_unit_test(test__f_type_array_array_lengths_append_all__works),
- cmocka_unit_test(test__f_type_array_array_lengths_append_all__returns_data_not),
cmocka_unit_test(test__f_type_array_array_lengths_decimate_by__works),
cmocka_unit_test(test__f_type_array_array_lengths_decrease_by__works),
cmocka_unit_test(test__f_type_array_array_lengths_increase__works),
- cmocka_unit_test(test__f_type_array_array_lengths_increase__returns_data_not),
cmocka_unit_test(test__f_type_array_array_lengths_increase_by__works),
cmocka_unit_test(test__f_type_array_array_lengths_resize__works),
+ cmocka_unit_test(test__f_type_array_array_lengthss_append__returns_data_not),
+ cmocka_unit_test(test__f_type_array_array_lengthss_append_all__returns_data_not),
+ cmocka_unit_test(test__f_type_array_array_lengthss_decimate_by__returns_data_not),
+ cmocka_unit_test(test__f_type_array_array_lengthss_decrease_by__returns_data_not),
+ cmocka_unit_test(test__f_type_array_array_lengthss_increase__returns_data_not),
+ cmocka_unit_test(test__f_type_array_array_lengthss_increase_by__returns_data_not),
+
cmocka_unit_test(test__f_type_array_array_lengthss_adjust__works),
cmocka_unit_test(test__f_type_array_array_lengthss_append__works),
- cmocka_unit_test(test__f_type_array_array_lengthss_append__returns_data_not),
cmocka_unit_test(test__f_type_array_array_lengthss_append_all__works),
- cmocka_unit_test(test__f_type_array_array_lengthss_append_all__returns_data_not),
cmocka_unit_test(test__f_type_array_array_lengthss_decimate_by__works),
cmocka_unit_test(test__f_type_array_array_lengthss_decrease_by__works),
cmocka_unit_test(test__f_type_array_array_lengthss_increase__works),
- cmocka_unit_test(test__f_type_array_array_lengthss_increase__returns_data_not),
cmocka_unit_test(test__f_type_array_array_lengthss_increase_by__works),
cmocka_unit_test(test__f_type_array_array_lengthss_resize__works),
cmocka_unit_test(test__f_type_array_cells_adjust__works),
cmocka_unit_test(test__f_type_array_cells_append__works),
cmocka_unit_test(test__f_type_array_cells_append_all__works),
- cmocka_unit_test(test__f_type_array_cells_append_all__returns_data_not),
cmocka_unit_test(test__f_type_array_cells_decimate_by__works),
cmocka_unit_test(test__f_type_array_cells_decrease_by__works),
cmocka_unit_test(test__f_type_array_cells_increase__works),
- cmocka_unit_test(test__f_type_array_cells_increase__returns_data_not),
cmocka_unit_test(test__f_type_array_cells_increase_by__works),
cmocka_unit_test(test__f_type_array_cells_resize__works),
+ cmocka_unit_test(test__f_type_array_cellss_append__returns_data_not),
+ cmocka_unit_test(test__f_type_array_cellss_append_all__returns_data_not),
+ cmocka_unit_test(test__f_type_array_cellss_decimate_by__returns_data_not),
+ cmocka_unit_test(test__f_type_array_cellss_decrease_by__returns_data_not),
+ cmocka_unit_test(test__f_type_array_cellss_increase__returns_data_not),
+ cmocka_unit_test(test__f_type_array_cellss_increase_by__returns_data_not),
+
cmocka_unit_test(test__f_type_array_cellss_adjust__works),
cmocka_unit_test(test__f_type_array_cellss_append__works),
- cmocka_unit_test(test__f_type_array_cellss_append__returns_data_not),
cmocka_unit_test(test__f_type_array_cellss_append_all__works),
- cmocka_unit_test(test__f_type_array_cellss_append_all__returns_data_not),
cmocka_unit_test(test__f_type_array_cellss_decimate_by__works),
cmocka_unit_test(test__f_type_array_cellss_decrease_by__works),
cmocka_unit_test(test__f_type_array_cellss_increase__works),
- cmocka_unit_test(test__f_type_array_cellss_increase__returns_data_not),
cmocka_unit_test(test__f_type_array_cellss_increase_by__works),
cmocka_unit_test(test__f_type_array_cellss_resize__works),
cmocka_unit_test(test__f_type_array_fll_ids_adjust__works),
cmocka_unit_test(test__f_type_array_fll_ids_append__works),
cmocka_unit_test(test__f_type_array_fll_ids_append_all__works),
- cmocka_unit_test(test__f_type_array_fll_ids_append_all__returns_data_not),
cmocka_unit_test(test__f_type_array_fll_ids_decimate_by__works),
cmocka_unit_test(test__f_type_array_fll_ids_decrease_by__works),
cmocka_unit_test(test__f_type_array_fll_ids_increase__works),
- cmocka_unit_test(test__f_type_array_fll_ids_increase__returns_data_not),
cmocka_unit_test(test__f_type_array_fll_ids_increase_by__works),
cmocka_unit_test(test__f_type_array_fll_ids_resize__works),
+ cmocka_unit_test(test__f_type_array_fll_idss_append__returns_data_not),
+ cmocka_unit_test(test__f_type_array_fll_idss_append_all__returns_data_not),
+ cmocka_unit_test(test__f_type_array_fll_idss_decimate_by__returns_data_not),
+ cmocka_unit_test(test__f_type_array_fll_idss_decrease_by__returns_data_not),
+ cmocka_unit_test(test__f_type_array_fll_idss_increase__returns_data_not),
+ cmocka_unit_test(test__f_type_array_fll_idss_increase_by__returns_data_not),
+
cmocka_unit_test(test__f_type_array_fll_idss_adjust__works),
cmocka_unit_test(test__f_type_array_fll_idss_append__works),
- cmocka_unit_test(test__f_type_array_fll_idss_append__returns_data_not),
cmocka_unit_test(test__f_type_array_fll_idss_append_all__works),
- cmocka_unit_test(test__f_type_array_fll_idss_append_all__returns_data_not),
cmocka_unit_test(test__f_type_array_fll_idss_decimate_by__works),
cmocka_unit_test(test__f_type_array_fll_idss_decrease_by__works),
cmocka_unit_test(test__f_type_array_fll_idss_increase__works),
- cmocka_unit_test(test__f_type_array_fll_idss_increase__returns_data_not),
cmocka_unit_test(test__f_type_array_fll_idss_increase_by__works),
cmocka_unit_test(test__f_type_array_fll_idss_resize__works),
cmocka_unit_test(test__f_type_array_int8s_adjust__works),
cmocka_unit_test(test__f_type_array_int8s_append__works),
cmocka_unit_test(test__f_type_array_int8s_append_all__works),
- cmocka_unit_test(test__f_type_array_int8s_append_all__returns_data_not),
cmocka_unit_test(test__f_type_array_int8s_decimate_by__works),
cmocka_unit_test(test__f_type_array_int8s_decrease_by__works),
cmocka_unit_test(test__f_type_array_int8s_increase__works),
- cmocka_unit_test(test__f_type_array_int8s_increase__returns_data_not),
cmocka_unit_test(test__f_type_array_int8s_increase_by__works),
cmocka_unit_test(test__f_type_array_int8s_resize__works),
+ cmocka_unit_test(test__f_type_array_int8ss_append__returns_data_not),
+ cmocka_unit_test(test__f_type_array_int8ss_append_all__returns_data_not),
+ cmocka_unit_test(test__f_type_array_int8ss_decimate_by__returns_data_not),
+ cmocka_unit_test(test__f_type_array_int8ss_decrease_by__returns_data_not),
+ cmocka_unit_test(test__f_type_array_int8ss_increase__returns_data_not),
+ cmocka_unit_test(test__f_type_array_int8ss_increase_by__returns_data_not),
+
cmocka_unit_test(test__f_type_array_int8ss_adjust__works),
cmocka_unit_test(test__f_type_array_int8ss_append__works),
- cmocka_unit_test(test__f_type_array_int8ss_append__returns_data_not),
cmocka_unit_test(test__f_type_array_int8ss_append_all__works),
- cmocka_unit_test(test__f_type_array_int8ss_append_all__returns_data_not),
cmocka_unit_test(test__f_type_array_int8ss_decimate_by__works),
cmocka_unit_test(test__f_type_array_int8ss_decrease_by__works),
cmocka_unit_test(test__f_type_array_int8ss_increase__works),
- cmocka_unit_test(test__f_type_array_int8ss_increase__returns_data_not),
cmocka_unit_test(test__f_type_array_int8ss_increase_by__works),
cmocka_unit_test(test__f_type_array_int8ss_resize__works),
cmocka_unit_test(test__f_type_array_int16s_adjust__works),
cmocka_unit_test(test__f_type_array_int16s_append__works),
cmocka_unit_test(test__f_type_array_int16s_append_all__works),
- cmocka_unit_test(test__f_type_array_int16s_append_all__returns_data_not),
cmocka_unit_test(test__f_type_array_int16s_decimate_by__works),
cmocka_unit_test(test__f_type_array_int16s_decrease_by__works),
cmocka_unit_test(test__f_type_array_int16s_increase__works),
- cmocka_unit_test(test__f_type_array_int16s_increase__returns_data_not),
cmocka_unit_test(test__f_type_array_int16s_increase_by__works),
cmocka_unit_test(test__f_type_array_int16s_resize__works),
+ cmocka_unit_test(test__f_type_array_int16ss_append__returns_data_not),
+ cmocka_unit_test(test__f_type_array_int16ss_append_all__returns_data_not),
+ cmocka_unit_test(test__f_type_array_int16ss_decimate_by__returns_data_not),
+ cmocka_unit_test(test__f_type_array_int16ss_decrease_by__returns_data_not),
+ cmocka_unit_test(test__f_type_array_int16ss_increase__returns_data_not),
+ cmocka_unit_test(test__f_type_array_int16ss_increase_by__returns_data_not),
+
cmocka_unit_test(test__f_type_array_int16ss_adjust__works),
cmocka_unit_test(test__f_type_array_int16ss_append__works),
- cmocka_unit_test(test__f_type_array_int16ss_append__returns_data_not),
cmocka_unit_test(test__f_type_array_int16ss_append_all__works),
- cmocka_unit_test(test__f_type_array_int16ss_append_all__returns_data_not),
cmocka_unit_test(test__f_type_array_int16ss_decimate_by__works),
cmocka_unit_test(test__f_type_array_int16ss_decrease_by__works),
cmocka_unit_test(test__f_type_array_int16ss_increase__works),
- cmocka_unit_test(test__f_type_array_int16ss_increase__returns_data_not),
cmocka_unit_test(test__f_type_array_int16ss_increase_by__works),
cmocka_unit_test(test__f_type_array_int16ss_resize__works),
cmocka_unit_test(test__f_type_array_int32s_adjust__works),
cmocka_unit_test(test__f_type_array_int32s_append__works),
cmocka_unit_test(test__f_type_array_int32s_append_all__works),
- cmocka_unit_test(test__f_type_array_int32s_append_all__returns_data_not),
cmocka_unit_test(test__f_type_array_int32s_decimate_by__works),
cmocka_unit_test(test__f_type_array_int32s_decrease_by__works),
cmocka_unit_test(test__f_type_array_int32s_increase__works),
- cmocka_unit_test(test__f_type_array_int32s_increase__returns_data_not),
cmocka_unit_test(test__f_type_array_int32s_increase_by__works),
cmocka_unit_test(test__f_type_array_int32s_resize__works),
+ cmocka_unit_test(test__f_type_array_int32ss_append__returns_data_not),
+ cmocka_unit_test(test__f_type_array_int32ss_append_all__returns_data_not),
+ cmocka_unit_test(test__f_type_array_int32ss_decimate_by__returns_data_not),
+ cmocka_unit_test(test__f_type_array_int32ss_decrease_by__returns_data_not),
+ cmocka_unit_test(test__f_type_array_int32ss_increase__returns_data_not),
+ cmocka_unit_test(test__f_type_array_int32ss_increase_by__returns_data_not),
+
cmocka_unit_test(test__f_type_array_int32ss_adjust__works),
cmocka_unit_test(test__f_type_array_int32ss_append__works),
- cmocka_unit_test(test__f_type_array_int32ss_append__returns_data_not),
cmocka_unit_test(test__f_type_array_int32ss_append_all__works),
- cmocka_unit_test(test__f_type_array_int32ss_append_all__returns_data_not),
cmocka_unit_test(test__f_type_array_int32ss_decimate_by__works),
cmocka_unit_test(test__f_type_array_int32ss_decrease_by__works),
cmocka_unit_test(test__f_type_array_int32ss_increase__works),
- cmocka_unit_test(test__f_type_array_int32ss_increase__returns_data_not),
cmocka_unit_test(test__f_type_array_int32ss_increase_by__works),
cmocka_unit_test(test__f_type_array_int32ss_resize__works),
cmocka_unit_test(test__f_type_array_int64s_adjust__works),
cmocka_unit_test(test__f_type_array_int64s_append__works),
cmocka_unit_test(test__f_type_array_int64s_append_all__works),
- cmocka_unit_test(test__f_type_array_int64s_append_all__returns_data_not),
cmocka_unit_test(test__f_type_array_int64s_decimate_by__works),
cmocka_unit_test(test__f_type_array_int64s_decrease_by__works),
cmocka_unit_test(test__f_type_array_int64s_increase__works),
- cmocka_unit_test(test__f_type_array_int64s_increase__returns_data_not),
cmocka_unit_test(test__f_type_array_int64s_increase_by__works),
cmocka_unit_test(test__f_type_array_int64s_resize__works),
+ cmocka_unit_test(test__f_type_array_int64ss_append__returns_data_not),
+ cmocka_unit_test(test__f_type_array_int64ss_append_all__returns_data_not),
+ cmocka_unit_test(test__f_type_array_int64ss_decimate_by__returns_data_not),
+ cmocka_unit_test(test__f_type_array_int64ss_decrease_by__returns_data_not),
+ cmocka_unit_test(test__f_type_array_int64ss_increase__returns_data_not),
+ cmocka_unit_test(test__f_type_array_int64ss_increase_by__returns_data_not),
+
cmocka_unit_test(test__f_type_array_int64ss_adjust__works),
cmocka_unit_test(test__f_type_array_int64ss_append__works),
- cmocka_unit_test(test__f_type_array_int64ss_append__returns_data_not),
cmocka_unit_test(test__f_type_array_int64ss_append_all__works),
- cmocka_unit_test(test__f_type_array_int64ss_append_all__returns_data_not),
cmocka_unit_test(test__f_type_array_int64ss_decimate_by__works),
cmocka_unit_test(test__f_type_array_int64ss_decrease_by__works),
cmocka_unit_test(test__f_type_array_int64ss_increase__works),
- cmocka_unit_test(test__f_type_array_int64ss_increase__returns_data_not),
cmocka_unit_test(test__f_type_array_int64ss_increase_by__works),
cmocka_unit_test(test__f_type_array_int64ss_resize__works),
cmocka_unit_test(test__f_type_array_int128s_adjust__works),
cmocka_unit_test(test__f_type_array_int128s_append__works),
cmocka_unit_test(test__f_type_array_int128s_append_all__works),
- cmocka_unit_test(test__f_type_array_int128s_append_all__returns_data_not),
cmocka_unit_test(test__f_type_array_int128s_decimate_by__works),
cmocka_unit_test(test__f_type_array_int128s_decrease_by__works),
cmocka_unit_test(test__f_type_array_int128s_increase__works),
- cmocka_unit_test(test__f_type_array_int128s_increase__returns_data_not),
cmocka_unit_test(test__f_type_array_int128s_increase_by__works),
cmocka_unit_test(test__f_type_array_int128s_resize__works),
+ cmocka_unit_test(test__f_type_array_int128ss_append__returns_data_not),
+ cmocka_unit_test(test__f_type_array_int128ss_append_all__returns_data_not),
+ cmocka_unit_test(test__f_type_array_int128ss_decimate_by__returns_data_not),
+ cmocka_unit_test(test__f_type_array_int128ss_decrease_by__returns_data_not),
+ cmocka_unit_test(test__f_type_array_int128ss_increase__returns_data_not),
+ cmocka_unit_test(test__f_type_array_int128ss_increase_by__returns_data_not),
+
cmocka_unit_test(test__f_type_array_int128ss_adjust__works),
cmocka_unit_test(test__f_type_array_int128ss_append__works),
- cmocka_unit_test(test__f_type_array_int128ss_append__returns_data_not),
cmocka_unit_test(test__f_type_array_int128ss_append_all__works),
- cmocka_unit_test(test__f_type_array_int128ss_append_all__returns_data_not),
cmocka_unit_test(test__f_type_array_int128ss_decimate_by__works),
cmocka_unit_test(test__f_type_array_int128ss_decrease_by__works),
cmocka_unit_test(test__f_type_array_int128ss_increase__works),
- cmocka_unit_test(test__f_type_array_int128ss_increase__returns_data_not),
cmocka_unit_test(test__f_type_array_int128ss_increase_by__works),
cmocka_unit_test(test__f_type_array_int128ss_resize__works),
cmocka_unit_test(test__f_type_array_states_adjust__works),
cmocka_unit_test(test__f_type_array_states_append__works),
cmocka_unit_test(test__f_type_array_states_append_all__works),
- cmocka_unit_test(test__f_type_array_states_append_all__returns_data_not),
cmocka_unit_test(test__f_type_array_states_decimate_by__works),
cmocka_unit_test(test__f_type_array_states_decrease_by__works),
cmocka_unit_test(test__f_type_array_states_increase__works),
- cmocka_unit_test(test__f_type_array_states_increase__returns_data_not),
cmocka_unit_test(test__f_type_array_states_increase_by__works),
cmocka_unit_test(test__f_type_array_states_resize__works),
+ cmocka_unit_test(test__f_type_array_statess_append__returns_data_not),
+ cmocka_unit_test(test__f_type_array_statess_append_all__returns_data_not),
+ cmocka_unit_test(test__f_type_array_statess_decimate_by__returns_data_not),
+ cmocka_unit_test(test__f_type_array_statess_decrease_by__returns_data_not),
+ cmocka_unit_test(test__f_type_array_statess_increase__returns_data_not),
+ cmocka_unit_test(test__f_type_array_statess_increase_by__returns_data_not),
+
cmocka_unit_test(test__f_type_array_statess_adjust__works),
cmocka_unit_test(test__f_type_array_statess_append__works),
- cmocka_unit_test(test__f_type_array_statess_append__returns_data_not),
cmocka_unit_test(test__f_type_array_statess_append_all__works),
- cmocka_unit_test(test__f_type_array_statess_append_all__returns_data_not),
cmocka_unit_test(test__f_type_array_statess_decimate_by__works),
cmocka_unit_test(test__f_type_array_statess_decrease_by__works),
cmocka_unit_test(test__f_type_array_statess_increase__works),
- cmocka_unit_test(test__f_type_array_statess_increase__returns_data_not),
cmocka_unit_test(test__f_type_array_statess_increase_by__works),
cmocka_unit_test(test__f_type_array_statess_resize__works),
cmocka_unit_test(test__f_type_array_statuss_adjust__works),
cmocka_unit_test(test__f_type_array_statuss_append__works),
cmocka_unit_test(test__f_type_array_statuss_append_all__works),
- cmocka_unit_test(test__f_type_array_statuss_append_all__returns_data_not),
cmocka_unit_test(test__f_type_array_statuss_decimate_by__works),
cmocka_unit_test(test__f_type_array_statuss_decrease_by__works),
cmocka_unit_test(test__f_type_array_statuss_increase__works),
- cmocka_unit_test(test__f_type_array_statuss_increase__returns_data_not),
cmocka_unit_test(test__f_type_array_statuss_increase_by__works),
cmocka_unit_test(test__f_type_array_statuss_resize__works),
+ cmocka_unit_test(test__f_type_array_statusss_append__returns_data_not),
+ cmocka_unit_test(test__f_type_array_statusss_append_all__returns_data_not),
+ cmocka_unit_test(test__f_type_array_statusss_decimate_by__returns_data_not),
+ cmocka_unit_test(test__f_type_array_statusss_decrease_by__returns_data_not),
+ cmocka_unit_test(test__f_type_array_statusss_increase__returns_data_not),
+ cmocka_unit_test(test__f_type_array_statusss_increase_by__returns_data_not),
+
cmocka_unit_test(test__f_type_array_statusss_adjust__works),
cmocka_unit_test(test__f_type_array_statusss_append__works),
- cmocka_unit_test(test__f_type_array_statusss_append__returns_data_not),
cmocka_unit_test(test__f_type_array_statusss_append_all__works),
- cmocka_unit_test(test__f_type_array_statusss_append_all__returns_data_not),
cmocka_unit_test(test__f_type_array_statusss_decimate_by__works),
cmocka_unit_test(test__f_type_array_statusss_decrease_by__works),
cmocka_unit_test(test__f_type_array_statusss_increase__works),
- cmocka_unit_test(test__f_type_array_statusss_increase__returns_data_not),
cmocka_unit_test(test__f_type_array_statusss_increase_by__works),
cmocka_unit_test(test__f_type_array_statusss_resize__works),
cmocka_unit_test(test__f_type_array_uint8s_adjust__works),
cmocka_unit_test(test__f_type_array_uint8s_append__works),
cmocka_unit_test(test__f_type_array_uint8s_append_all__works),
- cmocka_unit_test(test__f_type_array_uint8s_append_all__returns_data_not),
cmocka_unit_test(test__f_type_array_uint8s_decimate_by__works),
cmocka_unit_test(test__f_type_array_uint8s_decrease_by__works),
cmocka_unit_test(test__f_type_array_uint8s_increase__works),
- cmocka_unit_test(test__f_type_array_uint8s_increase__returns_data_not),
cmocka_unit_test(test__f_type_array_uint8s_increase_by__works),
cmocka_unit_test(test__f_type_array_uint8s_resize__works),
+ cmocka_unit_test(test__f_type_array_uint8ss_append__returns_data_not),
+ cmocka_unit_test(test__f_type_array_uint8ss_append_all__returns_data_not),
+ cmocka_unit_test(test__f_type_array_uint8ss_decimate_by__returns_data_not),
+ cmocka_unit_test(test__f_type_array_uint8ss_decrease_by__returns_data_not),
+ cmocka_unit_test(test__f_type_array_uint8ss_increase__returns_data_not),
+ cmocka_unit_test(test__f_type_array_uint8ss_increase_by__returns_data_not),
+
cmocka_unit_test(test__f_type_array_uint8ss_adjust__works),
cmocka_unit_test(test__f_type_array_uint8ss_append__works),
- cmocka_unit_test(test__f_type_array_uint8ss_append__returns_data_not),
cmocka_unit_test(test__f_type_array_uint8ss_append_all__works),
- cmocka_unit_test(test__f_type_array_uint8ss_append_all__returns_data_not),
cmocka_unit_test(test__f_type_array_uint8ss_decimate_by__works),
cmocka_unit_test(test__f_type_array_uint8ss_decrease_by__works),
cmocka_unit_test(test__f_type_array_uint8ss_increase__works),
- cmocka_unit_test(test__f_type_array_uint8ss_increase__returns_data_not),
cmocka_unit_test(test__f_type_array_uint8ss_increase_by__works),
cmocka_unit_test(test__f_type_array_uint8ss_resize__works),
cmocka_unit_test(test__f_type_array_uint16s_adjust__works),
cmocka_unit_test(test__f_type_array_uint16s_append__works),
cmocka_unit_test(test__f_type_array_uint16s_append_all__works),
- cmocka_unit_test(test__f_type_array_uint16s_append_all__returns_data_not),
cmocka_unit_test(test__f_type_array_uint16s_decimate_by__works),
cmocka_unit_test(test__f_type_array_uint16s_decrease_by__works),
cmocka_unit_test(test__f_type_array_uint16s_increase__works),
- cmocka_unit_test(test__f_type_array_uint16s_increase__returns_data_not),
cmocka_unit_test(test__f_type_array_uint16s_increase_by__works),
cmocka_unit_test(test__f_type_array_uint16s_resize__works),
+ cmocka_unit_test(test__f_type_array_uint16ss_append__returns_data_not),
+ cmocka_unit_test(test__f_type_array_uint16ss_append_all__returns_data_not),
+ cmocka_unit_test(test__f_type_array_uint16ss_decimate_by__returns_data_not),
+ cmocka_unit_test(test__f_type_array_uint16ss_decrease_by__returns_data_not),
+ cmocka_unit_test(test__f_type_array_uint16ss_increase__returns_data_not),
+ cmocka_unit_test(test__f_type_array_uint16ss_increase_by__returns_data_not),
+
cmocka_unit_test(test__f_type_array_uint16ss_adjust__works),
cmocka_unit_test(test__f_type_array_uint16ss_append__works),
- cmocka_unit_test(test__f_type_array_uint16ss_append__returns_data_not),
cmocka_unit_test(test__f_type_array_uint16ss_append_all__works),
- cmocka_unit_test(test__f_type_array_uint16ss_append_all__returns_data_not),
cmocka_unit_test(test__f_type_array_uint16ss_decimate_by__works),
cmocka_unit_test(test__f_type_array_uint16ss_decrease_by__works),
cmocka_unit_test(test__f_type_array_uint16ss_increase__works),
- cmocka_unit_test(test__f_type_array_uint16ss_increase__returns_data_not),
cmocka_unit_test(test__f_type_array_uint16ss_increase_by__works),
cmocka_unit_test(test__f_type_array_uint16ss_resize__works),
cmocka_unit_test(test__f_type_array_uint32s_adjust__works),
cmocka_unit_test(test__f_type_array_uint32s_append__works),
cmocka_unit_test(test__f_type_array_uint32s_append_all__works),
- cmocka_unit_test(test__f_type_array_uint32s_append_all__returns_data_not),
cmocka_unit_test(test__f_type_array_uint32s_decimate_by__works),
cmocka_unit_test(test__f_type_array_uint32s_decrease_by__works),
cmocka_unit_test(test__f_type_array_uint32s_increase__works),
- cmocka_unit_test(test__f_type_array_uint32s_increase__returns_data_not),
cmocka_unit_test(test__f_type_array_uint32s_increase_by__works),
cmocka_unit_test(test__f_type_array_uint32s_resize__works),
+ cmocka_unit_test(test__f_type_array_uint32ss_append__returns_data_not),
+ cmocka_unit_test(test__f_type_array_uint32ss_append_all__returns_data_not),
+ cmocka_unit_test(test__f_type_array_uint32ss_decimate_by__returns_data_not),
+ cmocka_unit_test(test__f_type_array_uint32ss_decrease_by__returns_data_not),
+ cmocka_unit_test(test__f_type_array_uint32ss_increase__returns_data_not),
+ cmocka_unit_test(test__f_type_array_uint32ss_increase_by__returns_data_not),
+
cmocka_unit_test(test__f_type_array_uint32ss_adjust__works),
cmocka_unit_test(test__f_type_array_uint32ss_append__works),
- cmocka_unit_test(test__f_type_array_uint32ss_append__returns_data_not),
cmocka_unit_test(test__f_type_array_uint32ss_append_all__works),
- cmocka_unit_test(test__f_type_array_uint32ss_append_all__returns_data_not),
cmocka_unit_test(test__f_type_array_uint32ss_decimate_by__works),
cmocka_unit_test(test__f_type_array_uint32ss_decrease_by__works),
cmocka_unit_test(test__f_type_array_uint32ss_increase__works),
- cmocka_unit_test(test__f_type_array_uint32ss_increase__returns_data_not),
cmocka_unit_test(test__f_type_array_uint32ss_increase_by__works),
cmocka_unit_test(test__f_type_array_uint32ss_resize__works),
cmocka_unit_test(test__f_type_array_uint64s_adjust__works),
cmocka_unit_test(test__f_type_array_uint64s_append__works),
cmocka_unit_test(test__f_type_array_uint64s_append_all__works),
- cmocka_unit_test(test__f_type_array_uint64s_append_all__returns_data_not),
cmocka_unit_test(test__f_type_array_uint64s_decimate_by__works),
cmocka_unit_test(test__f_type_array_uint64s_decrease_by__works),
cmocka_unit_test(test__f_type_array_uint64s_increase__works),
- cmocka_unit_test(test__f_type_array_uint64s_increase__returns_data_not),
cmocka_unit_test(test__f_type_array_uint64s_increase_by__works),
cmocka_unit_test(test__f_type_array_uint64s_resize__works),
+ cmocka_unit_test(test__f_type_array_uint64ss_append__returns_data_not),
+ cmocka_unit_test(test__f_type_array_uint64ss_append_all__returns_data_not),
+ cmocka_unit_test(test__f_type_array_uint64ss_decimate_by__returns_data_not),
+ cmocka_unit_test(test__f_type_array_uint64ss_decrease_by__returns_data_not),
+ cmocka_unit_test(test__f_type_array_uint64ss_increase__returns_data_not),
+ cmocka_unit_test(test__f_type_array_uint64ss_increase_by__returns_data_not),
+
cmocka_unit_test(test__f_type_array_uint64ss_adjust__works),
cmocka_unit_test(test__f_type_array_uint64ss_append__works),
- cmocka_unit_test(test__f_type_array_uint64ss_append__returns_data_not),
cmocka_unit_test(test__f_type_array_uint64ss_append_all__works),
- cmocka_unit_test(test__f_type_array_uint64ss_append_all__returns_data_not),
cmocka_unit_test(test__f_type_array_uint64ss_decimate_by__works),
cmocka_unit_test(test__f_type_array_uint64ss_decrease_by__works),
cmocka_unit_test(test__f_type_array_uint64ss_increase__works),
- cmocka_unit_test(test__f_type_array_uint64ss_increase__returns_data_not),
cmocka_unit_test(test__f_type_array_uint64ss_increase_by__works),
cmocka_unit_test(test__f_type_array_uint64ss_resize__works),
cmocka_unit_test(test__f_type_array_uint128s_adjust__works),
cmocka_unit_test(test__f_type_array_uint128s_append__works),
cmocka_unit_test(test__f_type_array_uint128s_append_all__works),
- cmocka_unit_test(test__f_type_array_uint128s_append_all__returns_data_not),
cmocka_unit_test(test__f_type_array_uint128s_decimate_by__works),
cmocka_unit_test(test__f_type_array_uint128s_decrease_by__works),
cmocka_unit_test(test__f_type_array_uint128s_increase__works),
- cmocka_unit_test(test__f_type_array_uint128s_increase__returns_data_not),
cmocka_unit_test(test__f_type_array_uint128s_increase_by__works),
cmocka_unit_test(test__f_type_array_uint128s_resize__works),
+ cmocka_unit_test(test__f_type_array_uint128ss_append__returns_data_not),
+ cmocka_unit_test(test__f_type_array_uint128ss_append_all__returns_data_not),
+ cmocka_unit_test(test__f_type_array_uint128ss_decimate_by__returns_data_not),
+ cmocka_unit_test(test__f_type_array_uint128ss_decrease_by__returns_data_not),
+ cmocka_unit_test(test__f_type_array_uint128ss_increase__returns_data_not),
+ cmocka_unit_test(test__f_type_array_uint128ss_increase_by__returns_data_not),
+
cmocka_unit_test(test__f_type_array_uint128ss_adjust__works),
cmocka_unit_test(test__f_type_array_uint128ss_append__works),
- cmocka_unit_test(test__f_type_array_uint128ss_append__returns_data_not),
cmocka_unit_test(test__f_type_array_uint128ss_append_all__works),
- cmocka_unit_test(test__f_type_array_uint128ss_append_all__returns_data_not),
cmocka_unit_test(test__f_type_array_uint128ss_decimate_by__works),
cmocka_unit_test(test__f_type_array_uint128ss_decrease_by__works),
cmocka_unit_test(test__f_type_array_uint128ss_increase__works),
- cmocka_unit_test(test__f_type_array_uint128ss_increase__returns_data_not),
cmocka_unit_test(test__f_type_array_uint128ss_increase_by__works),
cmocka_unit_test(test__f_type_array_uint128ss_resize__works),