diff options
Diffstat (limited to 'test/130_appendsolution')
23 files changed, 0 insertions, 171 deletions
diff --git a/test/130_appendsolution/00_empty.in b/test/130_appendsolution/00_empty.in deleted file mode 100644 index 1100b95..0000000 --- a/test/130_appendsolution/00_empty.in +++ /dev/null | |||
| @@ -1,5 +0,0 @@ | |||
| 1 | |||
| 2 | 0 | ||
| 3 | 1 | ||
| 4 | rotation UF | ||
| 5 | 0 | ||
diff --git a/test/130_appendsolution/00_empty.out b/test/130_appendsolution/00_empty.out deleted file mode 100644 index 8581416..0000000 --- a/test/130_appendsolution/00_empty.out +++ /dev/null | |||
| @@ -1,4 +0,0 @@ | |||
| 1 | |||
| 2 | Number of solutions: 1 | ||
| 3 | Shortest solution length: 0 | ||
| 4 | Used bytes: 1 | ||
diff --git a/test/130_appendsolution/01_simple_onlynormal_nounniss.in b/test/130_appendsolution/01_simple_onlynormal_nounniss.in deleted file mode 100644 index fb1eaed..0000000 --- a/test/130_appendsolution/01_simple_onlynormal_nounniss.in +++ /dev/null | |||
| @@ -1,5 +0,0 @@ | |||
| 1 | U F R D2 B' | ||
| 2 | 0 | ||
| 3 | 1 | ||
| 4 | rotation UF | ||
| 5 | 0 | ||
diff --git a/test/130_appendsolution/01_simple_onlynormal_nounniss.out b/test/130_appendsolution/01_simple_onlynormal_nounniss.out deleted file mode 100644 index b577962..0000000 --- a/test/130_appendsolution/01_simple_onlynormal_nounniss.out +++ /dev/null | |||
| @@ -1,4 +0,0 @@ | |||
| 1 | U F R D2 B' | ||
| 2 | Number of solutions: 1 | ||
| 3 | Shortest solution length: 5 | ||
| 4 | Used bytes: 12 | ||
diff --git a/test/130_appendsolution/02_simple_onlynormal_nounnis_multitrans.in b/test/130_appendsolution/02_simple_onlynormal_nounnis_multitrans.in deleted file mode 100644 index db5f074..0000000 --- a/test/130_appendsolution/02_simple_onlynormal_nounnis_multitrans.in +++ /dev/null | |||
| @@ -1,8 +0,0 @@ | |||
| 1 | U F R | ||
| 2 | 0 | ||
| 3 | 4 | ||
| 4 | rotation UF | ||
| 5 | mirrored UR | ||
| 6 | rotation BD | ||
| 7 | mirrored LB | ||
| 8 | 0 | ||
diff --git a/test/130_appendsolution/02_simple_onlynormal_nounnis_multitrans.out b/test/130_appendsolution/02_simple_onlynormal_nounnis_multitrans.out deleted file mode 100644 index e1b5631..0000000 --- a/test/130_appendsolution/02_simple_onlynormal_nounnis_multitrans.out +++ /dev/null | |||
| @@ -1,7 +0,0 @@ | |||
| 1 | U F R | ||
| 2 | B D L | ||
| 3 | U' L' B' | ||
| 4 | R' B' D' | ||
| 5 | Number of solutions: 4 | ||
| 6 | Shortest solution length: 3 | ||
| 7 | Used bytes: 30 | ||
diff --git a/test/130_appendsolution/03_simple_unniss.in b/test/130_appendsolution/03_simple_unniss.in deleted file mode 100644 index 2c5a331..0000000 --- a/test/130_appendsolution/03_simple_unniss.in +++ /dev/null | |||
| @@ -1,5 +0,0 @@ | |||
| 1 | U F B2 (R' F D) | ||
| 2 | 1 | ||
| 3 | 1 | ||
| 4 | rotation UF | ||
| 5 | 0 | ||
diff --git a/test/130_appendsolution/03_simple_unniss.out b/test/130_appendsolution/03_simple_unniss.out deleted file mode 100644 index 3ca210e..0000000 --- a/test/130_appendsolution/03_simple_unniss.out +++ /dev/null | |||
| @@ -1,4 +0,0 @@ | |||
| 1 | U F B2 D' F' R | ||
| 2 | Number of solutions: 1 | ||
| 3 | Shortest solution length: 6 | ||
| 4 | Used bytes: 15 | ||
diff --git a/test/130_appendsolution/04_niss_nounniss.in b/test/130_appendsolution/04_niss_nounniss.in deleted file mode 100644 index b07f970..0000000 --- a/test/130_appendsolution/04_niss_nounniss.in +++ /dev/null | |||
| @@ -1,5 +0,0 @@ | |||
| 1 | U F B2 (R' F D) | ||
| 2 | 0 | ||
| 3 | 1 | ||
| 4 | rotation UF | ||
| 5 | 0 | ||
diff --git a/test/130_appendsolution/04_niss_nounniss.out b/test/130_appendsolution/04_niss_nounniss.out deleted file mode 100644 index a616b4c..0000000 --- a/test/130_appendsolution/04_niss_nounniss.out +++ /dev/null | |||
| @@ -1,4 +0,0 @@ | |||
| 1 | U F B2 (R' F D) | ||
| 2 | Number of solutions: 1 | ||
| 3 | Shortest solution length: 6 | ||
| 4 | Used bytes: 16 | ||
diff --git a/test/130_appendsolution/05_sort_parallel.in b/test/130_appendsolution/05_sort_parallel.in deleted file mode 100644 index bc1cf0f..0000000 --- a/test/130_appendsolution/05_sort_parallel.in +++ /dev/null | |||
| @@ -1,5 +0,0 @@ | |||
| 1 | L R' B2 F | ||
| 2 | 0 | ||
| 3 | 1 | ||
| 4 | rotation UF | ||
| 5 | 0 | ||
diff --git a/test/130_appendsolution/05_sort_parallel.out b/test/130_appendsolution/05_sort_parallel.out deleted file mode 100644 index fc09830..0000000 --- a/test/130_appendsolution/05_sort_parallel.out +++ /dev/null | |||
| @@ -1,4 +0,0 @@ | |||
| 1 | R' L F B2 | ||
| 2 | Number of solutions: 1 | ||
| 3 | Shortest solution length: 4 | ||
| 4 | Used bytes: 10 | ||
diff --git a/test/130_appendsolution/06_unniss_trans_sort.in b/test/130_appendsolution/06_unniss_trans_sort.in deleted file mode 100644 index 2ffab93..0000000 --- a/test/130_appendsolution/06_unniss_trans_sort.in +++ /dev/null | |||
| @@ -1,5 +0,0 @@ | |||
| 1 | B (R2 F2) | ||
| 2 | 1 | ||
| 3 | 1 | ||
| 4 | rotation UR | ||
| 5 | 0 | ||
diff --git a/test/130_appendsolution/06_unniss_trans_sort.out b/test/130_appendsolution/06_unniss_trans_sort.out deleted file mode 100644 index 28d7827..0000000 --- a/test/130_appendsolution/06_unniss_trans_sort.out +++ /dev/null | |||
| @@ -1,4 +0,0 @@ | |||
| 1 | R2 L B2 | ||
| 2 | Number of solutions: 1 | ||
| 3 | Shortest solution length: 3 | ||
| 4 | Used bytes: 8 | ||
diff --git a/test/130_appendsolution/07_unniss_cancel_nosol.in b/test/130_appendsolution/07_unniss_cancel_nosol.in deleted file mode 100644 index 6883d05..0000000 --- a/test/130_appendsolution/07_unniss_cancel_nosol.in +++ /dev/null | |||
| @@ -1,5 +0,0 @@ | |||
| 1 | B' F (R2 B2) | ||
| 2 | 1 | ||
| 3 | 1 | ||
| 4 | rotation UF | ||
| 5 | 0 | ||
diff --git a/test/130_appendsolution/07_unniss_cancel_nosol.out b/test/130_appendsolution/07_unniss_cancel_nosol.out deleted file mode 100644 index ed5ea65..0000000 --- a/test/130_appendsolution/07_unniss_cancel_nosol.out +++ /dev/null | |||
| @@ -1,3 +0,0 @@ | |||
| 1 | Number of solutions: 0 | ||
| 2 | Shortest solution length: 21 | ||
| 3 | Used bytes: 0 | ||
diff --git a/test/130_appendsolution/08_unniss_cancel_nosol_v2.in b/test/130_appendsolution/08_unniss_cancel_nosol_v2.in deleted file mode 100644 index 3d461f0..0000000 --- a/test/130_appendsolution/08_unniss_cancel_nosol_v2.in +++ /dev/null | |||
| @@ -1,5 +0,0 @@ | |||
| 1 | F' B (R2 F2) | ||
| 2 | 1 | ||
| 3 | 1 | ||
| 4 | rotation UF | ||
| 5 | 0 | ||
diff --git a/test/130_appendsolution/08_unniss_cancel_nosol_v2.out b/test/130_appendsolution/08_unniss_cancel_nosol_v2.out deleted file mode 100644 index ed5ea65..0000000 --- a/test/130_appendsolution/08_unniss_cancel_nosol_v2.out +++ /dev/null | |||
| @@ -1,3 +0,0 @@ | |||
| 1 | Number of solutions: 0 | ||
| 2 | Shortest solution length: 21 | ||
| 3 | Used bytes: 0 | ||
diff --git a/test/130_appendsolution/09_fullinverse_niss.in b/test/130_appendsolution/09_fullinverse_niss.in deleted file mode 100644 index bb2b640..0000000 --- a/test/130_appendsolution/09_fullinverse_niss.in +++ /dev/null | |||
| @@ -1,5 +0,0 @@ | |||
| 1 | (F) | ||
| 2 | 0 | ||
| 3 | 1 | ||
| 4 | rotation UF | ||
| 5 | 0 | ||
diff --git a/test/130_appendsolution/09_fullinverse_niss.out b/test/130_appendsolution/09_fullinverse_niss.out deleted file mode 100644 index 9721085..0000000 --- a/test/130_appendsolution/09_fullinverse_niss.out +++ /dev/null | |||
| @@ -1,4 +0,0 @@ | |||
| 1 | (F) | ||
| 2 | Number of solutions: 1 | ||
| 3 | Shortest solution length: 1 | ||
| 4 | Used bytes: 4 | ||
diff --git a/test/130_appendsolution/10_rotated.in b/test/130_appendsolution/10_rotated.in deleted file mode 100644 index 5210cd5..0000000 --- a/test/130_appendsolution/10_rotated.in +++ /dev/null | |||
| @@ -1,5 +0,0 @@ | |||
| 1 | U2 F B L' | ||
| 2 | 1 | ||
| 3 | 1 | ||
| 4 | rotation UF | ||
| 5 | 7 | ||
diff --git a/test/130_appendsolution/10_rotated.out b/test/130_appendsolution/10_rotated.out deleted file mode 100644 index e70b2fe..0000000 --- a/test/130_appendsolution/10_rotated.out +++ /dev/null | |||
| @@ -1,4 +0,0 @@ | |||
| 1 | D2 R L F' | ||
| 2 | Number of solutions: 1 | ||
| 3 | Shortest solution length: 4 | ||
| 4 | Used bytes: 10 | ||
diff --git a/test/130_appendsolution/appendsolution_tests.c b/test/130_appendsolution/appendsolution_tests.c deleted file mode 100644 index e1b7e98..0000000 --- a/test/130_appendsolution/appendsolution_tests.c +++ /dev/null | |||
| @@ -1,68 +0,0 @@ | |||
| 1 | /* | ||
| 2 | Input format for appendsolution tests: | ||
| 3 | |||
| 4 | moves on normal (with NISS notation) | ||
| 5 | unniss flag (0=false, 1=true) | ||
| 6 | number of transformations | ||
| 7 | transformations, one per line | ||
| 8 | the orientation of the cube, as a number from 0 to 23 | ||
| 9 | |||
| 10 | See below for the output format. | ||
| 11 | */ | ||
| 12 | |||
| 13 | #include "../test.h" | ||
| 14 | |||
| 15 | uint8_t readtrans(const char [NISSY_SIZE_TRANSFORMATION]); | ||
| 16 | int64_t readmoves(const char *, size_t n, size_t m, | ||
| 17 | uint64_t *, uint64_t *, uint8_t [n], uint8_t [m]); | ||
| 18 | void solution_moves_reset(solution_moves_t [static 1]); | ||
| 19 | bool solution_list_init(solution_list_t [static 1], size_t n, char [n]); | ||
| 20 | int64_t appendsolution(const solution_moves_t [static 1], | ||
| 21 | const solution_settings_t [static 1], solution_list_t [static 1], bool, | ||
| 22 | const char *); | ||
| 23 | |||
| 24 | void run(void) { | ||
| 25 | int i, ntrans; | ||
| 26 | int64_t tot; | ||
| 27 | uint64_t nm, np; | ||
| 28 | char str[STRLENMAX], buf[STRLENMAX]; | ||
| 29 | solution_moves_t moves; | ||
| 30 | solution_settings_t settings; | ||
| 31 | solution_list_t list; | ||
| 32 | |||
| 33 | solution_moves_reset(&moves); | ||
| 34 | solution_list_init(&list, STRLENMAX, buf); | ||
| 35 | settings = (solution_settings_t) { | ||
| 36 | .tmask = UINT64_C(0), | ||
| 37 | .unniss = false, | ||
| 38 | .maxmoves = 20, | ||
| 39 | .maxsolutions = 100, | ||
| 40 | .optimal = -1, | ||
| 41 | }; | ||
| 42 | |||
| 43 | fgets(str, STRLENMAX, stdin); | ||
| 44 | tot = readmoves(str, 20, 20, &nm, &np, moves.moves, moves.premoves); | ||
| 45 | if (tot < 0) { | ||
| 46 | printf("Test error reading moves\n"); | ||
| 47 | return; | ||
| 48 | } | ||
| 49 | moves.nmoves = nm; | ||
| 50 | moves.npremoves = np; | ||
| 51 | fgets(str, STRLENMAX, stdin); | ||
| 52 | settings.unniss = (bool)atoi(str); | ||
| 53 | fgets(str, STRLENMAX, stdin); | ||
| 54 | ntrans = atoi(str); | ||
| 55 | for (i = 0; i < ntrans; i++) { | ||
| 56 | fgets(str, STRLENMAX, stdin); | ||
| 57 | settings.tmask |= UINT64_C(1) << (uint64_t)readtrans(str); | ||
| 58 | } | ||
| 59 | fgets(str, STRLENMAX, stdin); | ||
| 60 | settings.orientation = atoi(str); | ||
| 61 | |||
| 62 | appendsolution(&moves, &settings, &list, false, "Test"); | ||
| 63 | |||
| 64 | printf("%s", list.buf); | ||
| 65 | printf("Number of solutions: %" PRIu64 "\n", list.nsols); | ||
| 66 | printf("Shortest solution length: %" PRIu8 "\n", list.shortest_sol); | ||
| 67 | printf("Used bytes: %zu\n", list.used); | ||
| 68 | } | ||
