From 1bd4691d9cc46ec75adbe899b289a1ebc5460721 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Fri, 1 Aug 2025 16:52:44 +0200 Subject: Added CPEPE coordinate in preparation of full DRFIN solver --- test/082_invcoord_epe/00_all.in | 0 test/082_invcoord_epe/00_all.out | 1 + test/082_invcoord_epe/invcoord_epe_tests.c | 32 ++++++++++++++++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 test/082_invcoord_epe/00_all.in create mode 100644 test/082_invcoord_epe/00_all.out create mode 100644 test/082_invcoord_epe/invcoord_epe_tests.c (limited to 'test') diff --git a/test/082_invcoord_epe/00_all.in b/test/082_invcoord_epe/00_all.in new file mode 100644 index 0000000..e69de29 diff --git a/test/082_invcoord_epe/00_all.out b/test/082_invcoord_epe/00_all.out new file mode 100644 index 0000000..d6109db --- /dev/null +++ b/test/082_invcoord_epe/00_all.out @@ -0,0 +1 @@ +All good diff --git a/test/082_invcoord_epe/invcoord_epe_tests.c b/test/082_invcoord_epe/invcoord_epe_tests.c new file mode 100644 index 0000000..69c3c50 --- /dev/null +++ b/test/082_invcoord_epe/invcoord_epe_tests.c @@ -0,0 +1,32 @@ +#include "../test.h" + +#define FACT_4 24 + +uint64_t coord_epe(cube_t); +cube_t invcoord_epe(uint64_t); + +void run(void) { + oriented_cube_t cube; + uint64_t coord, coord2; + + cube.orientation = 0; + + /* Test all possible values for CP coordinate */ + for (coord = 0; coord < FACT_4; coord++) { + cube.cube = invcoord_epe(coord); + + if (!isconsistent(cube)) { + printf("Not consistent\n"); + return; + } + + coord2 = coord_epe(cube.cube); + if (coord != coord2) { + printf("Error: invcoord of %" PRIu64 + " returns %" PRIu64 "\n", coord, coord2); + return; + } + } + + printf("All good\n"); +} -- cgit v1.3