From 270e5b0444f67781856bf80db51650af9cb89b0c Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Thu, 17 Jul 2025 08:54:44 +0200 Subject: Renamed tests to make space for more coordinate tests --- test/121_coorddata_dr/00_all.in | 0 test/121_coorddata_dr/00_all.out | 1 - test/121_coorddata_dr/coorddata_dr.c | 61 ------------------------------------ 3 files changed, 62 deletions(-) delete mode 100644 test/121_coorddata_dr/00_all.in delete mode 100644 test/121_coorddata_dr/00_all.out delete mode 100644 test/121_coorddata_dr/coorddata_dr.c (limited to 'test/121_coorddata_dr') diff --git a/test/121_coorddata_dr/00_all.in b/test/121_coorddata_dr/00_all.in deleted file mode 100644 index e69de29..0000000 diff --git a/test/121_coorddata_dr/00_all.out b/test/121_coorddata_dr/00_all.out deleted file mode 100644 index d6109db..0000000 --- a/test/121_coorddata_dr/00_all.out +++ /dev/null @@ -1 +0,0 @@ -All good diff --git a/test/121_coorddata_dr/coorddata_dr.c b/test/121_coorddata_dr/coorddata_dr.c deleted file mode 100644 index d8ac94a..0000000 --- a/test/121_coorddata_dr/coorddata_dr.c +++ /dev/null @@ -1,61 +0,0 @@ -#include "../test.h" - -#define POW_3_7 2187 -#define BOUND (64430 * POW_3_7 / 100) -#define TGROUP UINT64_C(4278190335) - -cube_t transform(cube_t, uint8_t); -uint64_t coordinate_dr_coord(cube_t, const unsigned char *); -cube_t coordinate_dr_cube(uint64_t, const unsigned char *); -size_t coordinate_dr_gendata(unsigned char *); - -void run(void) { - bool found; - uint64_t t; - char str[STRLENMAX]; - unsigned char *data; - size_t size; - cube_t cube; - oriented_cube_t oc; - uint64_t coord, coord2; - - size = coordinate_dr_gendata(NULL); - data = malloc(size); - coordinate_dr_gendata(data); - - for (coord = 0; coord < BOUND; coord++) { - cube = coordinate_dr_cube(coord, data); - - oc = (oriented_cube_t) { .cube = cube, .orientation = 0 }; - if (!isconsistent(oc)) { - printf("Error: invcoord of %" PRId64 - " is not consistent\n", coord); - goto cleanup; - } - - for (t = 0, found = false; t < 48; t++) { - if (!((UINT64_C(1) << t) & TGROUP)) - continue; - - coord2 = coordinate_dr_coord(transform(cube, t), data); - if (coord == coord2) { - found = true; - break; - } - } - - if (!found) { - oc = (oriented_cube_t){.cube = cube, .orientation = 0}; - printf("Error: invcoord of %" PRId64 " returns %" - PRId64 " with cube:\n", coord, coord2); - writecube(oc, STRLENMAX, str); - printf("%s\n", str); - goto cleanup; - } - } - - printf("All good\n"); - -cleanup: - free(data); -} -- cgit v1.3