From 086a06fe3d84ac8b2e74c824e05f9d23f0b292ab Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Mon, 22 Dec 2025 18:07:06 +0100 Subject: Added tests for copy_co, renamed some tests --- test/079_invcoord_co/00_all.in | 0 test/079_invcoord_co/00_all.out | 1 - test/079_invcoord_co/invcoord_co_tests.c | 36 -------------------------------- 3 files changed, 37 deletions(-) delete mode 100644 test/079_invcoord_co/00_all.in delete mode 100644 test/079_invcoord_co/00_all.out delete mode 100644 test/079_invcoord_co/invcoord_co_tests.c (limited to 'test/079_invcoord_co') diff --git a/test/079_invcoord_co/00_all.in b/test/079_invcoord_co/00_all.in deleted file mode 100644 index e69de29..0000000 diff --git a/test/079_invcoord_co/00_all.out b/test/079_invcoord_co/00_all.out deleted file mode 100644 index d6109db..0000000 --- a/test/079_invcoord_co/00_all.out +++ /dev/null @@ -1 +0,0 @@ -All good diff --git a/test/079_invcoord_co/invcoord_co_tests.c b/test/079_invcoord_co/invcoord_co_tests.c deleted file mode 100644 index dd5853e..0000000 --- a/test/079_invcoord_co/invcoord_co_tests.c +++ /dev/null @@ -1,36 +0,0 @@ -#include "../test.h" - -#define POW_3_7 2187 - -uint64_t coord_co(cube_t); -cube_t invcoord_co(uint64_t); - -void run(void) { - oriented_cube_t cube; - uint64_t coord, coord2; - - cube.orientation = 0; - - /* Test all possible values for CO coordinate */ - for (coord = 0; coord < POW_3_7; coord++) { - cube.cube = invcoord_co(coord); - - if (!isconsistent(cube)) { - printf("Not consistent\n"); - return; - } - if (!issolvable(cube)) { - printf("Not solvable\n"); - return; - } - - coord2 = coord_co(cube.cube); - if (coord != coord2) { - printf("Error: invcoord of %" PRIu64 - " returns %" PRIu64 "\n", coord, coord2); - return; - } - } - - printf("All good\n"); -} -- cgit v1.3