aboutsummaryrefslogtreecommitdiff
path: root/test/110_coord_invcoord_h48
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2025-04-22 16:12:21 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2025-04-22 16:12:21 +0200
commitbab22e1946a656088804b61cf765461b48744971 (patch)
tree43ae3798e5c2f4fc63e68df72d134e742fcaf834 /test/110_coord_invcoord_h48
parent93522effba2f200257141189de5925a23fca93b8 (diff)
downloadnissy-core-bab22e1946a656088804b61cf765461b48744971.tar.gz
nissy-core-bab22e1946a656088804b61cf765461b48744971.zip
Update tests for oriented_cube_t
Diffstat (limited to 'test/110_coord_invcoord_h48')
-rw-r--r--test/110_coord_invcoord_h48/coord_invcoord_h48_tests.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/110_coord_invcoord_h48/coord_invcoord_h48_tests.c b/test/110_coord_invcoord_h48/coord_invcoord_h48_tests.c
index 458ad31..0333f27 100644
--- a/test/110_coord_invcoord_h48/coord_invcoord_h48_tests.c
+++ b/test/110_coord_invcoord_h48/coord_invcoord_h48_tests.c
@@ -14,7 +14,8 @@ void run(void) {
14 uint32_t *cocsepdata; 14 uint32_t *cocsepdata;
15 uint64_t selfsim[COCSEP_CLASSES]; 15 uint64_t selfsim[COCSEP_CLASSES];
16 int64_t c, cc; 16 int64_t c, cc;
17 cube_t cube, invc, rep[COCSEP_CLASSES]; 17 oriented_cube_t cube;
18 cube_t invc, rep[COCSEP_CLASSES];
18 19
19 gendata_cocsep(buf, selfsim, rep); 20 gendata_cocsep(buf, selfsim, rep);
20 cocsepdata = (uint32_t *)(buf + INFOSIZE); 21 cocsepdata = (uint32_t *)(buf + INFOSIZE);
@@ -23,11 +24,11 @@ void run(void) {
23 h = 11; 24 h = 11;
24 while (fgets(str, STRLENMAX, stdin) != NULL) { 25 while (fgets(str, STRLENMAX, stdin) != NULL) {
25 cube = readcube(str); 26 cube = readcube(str);
26 c = coord_h48(cube, cocsepdata, h); 27 c = coord_h48(cube.cube, cocsepdata, h);
27 invc = invcoord_h48(c, rep, h); 28 invc = invcoord_h48(c, rep, h);
28 for (t = 0, found = false; t < 48; t++) { 29 for (t = 0, found = false; t < 48; t++) {
29 cube = transform(invc, t); 30 cube.cube = transform(invc, t);
30 cc = coord_h48(cube, cocsepdata, h); 31 cc = coord_h48(cube.cube, cocsepdata, h);
31 found = found || cc == c; 32 found = found || cc == c;
32 } 33 }
33 printf("%d %s\n", i, found ? "ok" : "ERROR"); 34 printf("%d %s\n", i, found ? "ok" : "ERROR");

Generated with cgit - Back to sebastiano.tronto.net