diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2024-07-14 21:28:37 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2024-07-14 21:28:37 +0200 |
| commit | 61e03f9f4eecf3d5811b11c44c9ef778f0a93bc7 (patch) | |
| tree | a7a6edc2e44689ed62472bdece1d9bf6a300419f /test/101_cocsep_selfsim | |
| parent | a016aa7f78c86c59bab3ae4970f8cc339186bc91 (diff) | |
| download | nissy-core-61e03f9f4eecf3d5811b11c44c9ef778f0a93bc7.tar.gz nissy-core-61e03f9f4eecf3d5811b11c44c9ef778f0a93bc7.zip | |
Found a sneaky bug (it's all a mess now)
Diffstat (limited to 'test/101_cocsep_selfsim')
| -rw-r--r-- | test/101_cocsep_selfsim/00_all.in | 2 | ||||
| -rw-r--r-- | test/101_cocsep_selfsim/00_all.out | 2 | ||||
| -rw-r--r-- | test/101_cocsep_selfsim/cocsep_selfsim_tests.c | 38 |
3 files changed, 0 insertions, 42 deletions
diff --git a/test/101_cocsep_selfsim/00_all.in b/test/101_cocsep_selfsim/00_all.in deleted file mode 100644 index 07bda04..0000000 --- a/test/101_cocsep_selfsim/00_all.in +++ /dev/null | |||
| @@ -1,2 +0,0 @@ | |||
| 1 | UF0 UB0 DB0 DF0 UR0 UL0 DL0 DR0 FR0 FL0 BL0 BR0 UFR0 UBL0 DFL0 DBR0 UFL0 UBR0 DFR0 DBL0 | ||
| 2 | UF0 UB0 DB0 DF0 FR0 UL0 DL0 BR0 DR0 FL0 BL0 UR0 DFR2 UBL0 DFL0 UBR2 UFL0 UFR1 DBR1 DBL0 | ||
diff --git a/test/101_cocsep_selfsim/00_all.out b/test/101_cocsep_selfsim/00_all.out deleted file mode 100644 index cc96363..0000000 --- a/test/101_cocsep_selfsim/00_all.out +++ /dev/null | |||
| @@ -1,2 +0,0 @@ | |||
| 1 | 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | ||
| 2 | 0 1 2 3 24 25 26 27 | ||
diff --git a/test/101_cocsep_selfsim/cocsep_selfsim_tests.c b/test/101_cocsep_selfsim/cocsep_selfsim_tests.c deleted file mode 100644 index 9d9a8b2..0000000 --- a/test/101_cocsep_selfsim/cocsep_selfsim_tests.c +++ /dev/null | |||
| @@ -1,38 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * This test is tricky, we only have two cases for now: the solved cube | ||
| 3 | * and the cube that is one quarter-turn-move off (all such cases are | ||
| 4 | * equivalent due to symmetry). Adding more tests requires figuring out | ||
| 5 | * by hand which one is the first position in its class to be reached. | ||
| 6 | * Note that the .out file need a space before each newline. | ||
| 7 | */ | ||
| 8 | #include "../test.h" | ||
| 9 | |||
| 10 | #define COCSEP_CLASSES 3393 | ||
| 11 | |||
| 12 | size_t gendata_cocsep(void *, uint64_t *, cube_t *); | ||
| 13 | int64_t coord_cocsep(cube_t); | ||
| 14 | |||
| 15 | void run(void) { | ||
| 16 | char str[STRLENMAX]; | ||
| 17 | uint32_t buf[300000], data; | ||
| 18 | int64_t coord, coclass; | ||
| 19 | uint64_t selfsim[COCSEP_CLASSES], sim, t; | ||
| 20 | cube_t cube, rep[COCSEP_CLASSES]; | ||
| 21 | |||
| 22 | gendata_cocsep(buf, selfsim, rep); | ||
| 23 | |||
| 24 | /* All cases in the same test so we do not generate data many times */ | ||
| 25 | |||
| 26 | while (fgets(str, STRLENMAX, stdin) != NULL) { | ||
| 27 | cube = readcube("H48", str); | ||
| 28 | coord = coord_cocsep(cube); | ||
| 29 | data = buf[coord]; | ||
| 30 | coclass = (data & (0xFFFU << 16)) >> 16; | ||
| 31 | sim = selfsim[coclass]; | ||
| 32 | for (t = 0; t < 48 && sim; t++, sim >>= 1) { | ||
| 33 | if (sim & 1) | ||
| 34 | printf("%" PRId64 " ", t); | ||
| 35 | } | ||
| 36 | printf("\n"); | ||
| 37 | } | ||
| 38 | } | ||
