diff options
Diffstat (limited to 'tests/fst_post_init_tests.c')
| -rw-r--r-- | tests/fst_post_init_tests.c | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/tests/fst_post_init_tests.c b/tests/fst_post_init_tests.c index 653e379..9d8d554 100644 --- a/tests/fst_post_init_tests.c +++ b/tests/fst_post_init_tests.c | |||
| @@ -4,19 +4,16 @@ static bool fst_move_testcase(Cube *c, Alg *a); | |||
| 4 | static bool fst_inverse_testcase(Cube *c, Alg *a); | 4 | static bool fst_inverse_testcase(Cube *c, Alg *a); |
| 5 | 5 | ||
| 6 | static bool fst_move_test(); | 6 | static bool fst_move_test(); |
| 7 | static bool fst_where_is_edge_test(); | ||
| 8 | static bool fst_inverse_test(); | 7 | static bool fst_inverse_test(); |
| 9 | 8 | ||
| 10 | static Tester test[] = { | 9 | static Tester test[] = { |
| 11 | fst_move_test, | 10 | fst_move_test, |
| 12 | fst_where_is_edge_test, | ||
| 13 | fst_inverse_test, | 11 | fst_inverse_test, |
| 14 | NULL | 12 | NULL |
| 15 | }; | 13 | }; |
| 16 | 14 | ||
| 17 | static char *name[] = { | 15 | static char *name[] = { |
| 18 | "FST move", | 16 | "FST move", |
| 19 | "FST where is edge", | ||
| 20 | "FST inverse", | 17 | "FST inverse", |
| 21 | }; | 18 | }; |
| 22 | 19 | ||
| @@ -62,36 +59,6 @@ fst_move_test() | |||
| 62 | } | 59 | } |
| 63 | 60 | ||
| 64 | static bool | 61 | static bool |
| 65 | fst_where_is_edge_test() | ||
| 66 | { | ||
| 67 | int i; | ||
| 68 | Alg *scr; | ||
| 69 | Cube c, d; | ||
| 70 | FstCube fst; | ||
| 71 | |||
| 72 | /* Testing on a single scramble is fine for now */ | ||
| 73 | scr = new_alg("RUFDL2B2FRD"); | ||
| 74 | make_solved(&c); | ||
| 75 | apply_alg(scr, &c); | ||
| 76 | fst = cube_to_fst(&c); | ||
| 77 | |||
| 78 | for (i = 0; i < 12; i++) { | ||
| 79 | if (fst_where_is_edge(c.ep[i], fst) != i) { | ||
| 80 | fst_to_cube(fst, &d); | ||
| 81 | printf("Alg: "); | ||
| 82 | print_alg(scr, false); | ||
| 83 | printf("Expected:\n"); | ||
| 84 | print_cube(&c); | ||
| 85 | printf("But got:\n"); | ||
| 86 | print_cube(&d); | ||
| 87 | return false; | ||
| 88 | } | ||
| 89 | } | ||
| 90 | |||
| 91 | return true; | ||
| 92 | } | ||
| 93 | |||
| 94 | static bool | ||
| 95 | fst_inverse_test() | 62 | fst_inverse_test() |
| 96 | { | 63 | { |
| 97 | return try_all_str(fst_inverse_testcase, "FST test incorrect"); | 64 | return try_all_str(fst_inverse_testcase, "FST test incorrect"); |
