From 13a7c902c051fa8da1e476687c17bb5431d258e1 Mon Sep 17 00:00:00 2001 From: sanine Date: Tue, 3 Jan 2023 23:31:48 -0600 Subject: add kai_expand_array --- src/geometry/geometry.test.c | 49 -------------------------------------------- 1 file changed, 49 deletions(-) delete mode 100644 src/geometry/geometry.test.c (limited to 'src/geometry/geometry.test.c') diff --git a/src/geometry/geometry.test.c b/src/geometry/geometry.test.c deleted file mode 100644 index f400540..0000000 --- a/src/geometry/geometry.test.c +++ /dev/null @@ -1,49 +0,0 @@ -#include -#include -#include -#include "test/test.h" -#include "geometry.h" - - -void parse_float_array(); - - -void suite_geometry() -{ - lily_run_test(parse_float_array); -} - - -void parse_float_array() -{ - char str[1024]; - strncpy( - str, - "\n" - " -0.5 0.5 0.5\n" - " 0.5 0.5 0.5\n" - " -0.5 -0.5 0.5\n" - " 0.5 -0.5 0.5\n" - " -0.5 0.5 -0.5\n" - " 0.5 0.5 -0.5\n" - " -0.5 -0.5 -0.5\n" - " 0.5 -0.5 -0.5\n" - "\n", - 1024 - ); - ezxml_t tag = ezxml_parse_str(str, strlen(str)); - - ka_float_array_t *a = kai_parse_float_array(tag); - ezxml_free(tag); - - lily_assert_not_null(a); - lily_assert_string_equal(a->id, "box-Pos-array"); - lily_assert_int_equal(a->count, 24); - - int i; - for (i=0; i<24; i++) { - lily_assert_float_equal(fabs(a->array[i]), 0.5, 1e-3); - } - - kai_free_float_array(a); -} -- cgit v1.2.1