From bf44088d4373a9520e860152c56a958332819c4b Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Mon, 1 May 2023 16:33:51 +0200 Subject: Split nissy in other repos, see README.md --- tests/coord_tests.c | 50 -------------------------------------------------- 1 file changed, 50 deletions(-) delete mode 100644 tests/coord_tests.c (limited to 'tests/coord_tests.c') diff --git a/tests/coord_tests.c b/tests/coord_tests.c deleted file mode 100644 index 8d6b6d3..0000000 --- a/tests/coord_tests.c +++ /dev/null @@ -1,50 +0,0 @@ -#include "coord_tests.h" - -bool testmethod_indexes_consistent(void *); - -Test test_indexes_consistent = { - .name = "Consitency of index and anti-index", - .t = testmethod_indexes_consistent, - .cases = (void **)all_coordinates, -}; -Test *coord_pre_init[] = { - &test_indexes_consistent, - NULL -}; -TestSuite coord_pre_init_suite = { - .setup = NULL, - .tests = coord_pre_init, - .teardown = NULL, -}; - -TestSuite *coord_suites[] = { - &coord_pre_init_suite, - NULL -}; - -bool -testmethod_indexes_consistent(void *a) -{ - uint64_t ui, uj; - Cube c; - Coordinate *coord; - - coord = (Coordinate *)a; - - if (coord->type != COMP_COORD) - return true; /* Not applicable */ - - gen_coord(coord); - for (ui = 0; ui < coord->max; ui++) { - indexers_makecube(coord->i, ui, &c); - uj = indexers_getind(coord->i, &c); - if (ui != uj) { - fprintf(stderr, "Error with coordinate %s: " - "%" PRIu64 " != %" PRIu64 "\n", - coord->name, uj, ui); - return false; - } - } - - return true; -} -- cgit v1.3