diff options
Diffstat (limited to '')
| -rw-r--r-- | test/000_basic/all.in | 0 | ||||
| -rw-r--r-- | test/000_basic/all.out | 7 | ||||
| -rw-r--r-- | test/000_basic/basic_tests.c | 33 |
3 files changed, 0 insertions, 40 deletions
diff --git a/test/000_basic/all.in b/test/000_basic/all.in deleted file mode 100644 index e69de29..0000000 --- a/test/000_basic/all.in +++ /dev/null | |||
diff --git a/test/000_basic/all.out b/test/000_basic/all.out deleted file mode 100644 index 892ad22..0000000 --- a/test/000_basic/all.out +++ /dev/null | |||
| @@ -1,7 +0,0 @@ | |||
| 1 | Solved is solvable | ||
| 2 | Solved is solved | ||
| 3 | Zero is NOT solvable | ||
| 4 | Zero is NOT solved | ||
| 5 | Solved and Solved are equal | ||
| 6 | Solved and Zero are NOT equal | ||
| 7 | Zero and Solved are NOT equal | ||
diff --git a/test/000_basic/basic_tests.c b/test/000_basic/basic_tests.c deleted file mode 100644 index df38e88..0000000 --- a/test/000_basic/basic_tests.c +++ /dev/null | |||
| @@ -1,33 +0,0 @@ | |||
| 1 | #include "../test.h" | ||
| 2 | |||
| 3 | bool issolved(oriented_cube_t); | ||
| 4 | bool equal(cube_t, cube_t); | ||
| 5 | |||
| 6 | void | ||
| 7 | check(oriented_cube_t cube, char *name) | ||
| 8 | { | ||
| 9 | printf("%s is%s solvable\n", name, issolvable(cube) ? "" : " NOT"); | ||
| 10 | printf("%s is%s solved\n", name, issolved(cube) ? "" : " NOT"); | ||
| 11 | } | ||
| 12 | |||
| 13 | void | ||
| 14 | check2(oriented_cube_t cube1, char *name1, oriented_cube_t cube2, char *name2) | ||
| 15 | { | ||
| 16 | bool eq = equal(cube1.cube, cube2.cube) && | ||
| 17 | cube1.orientation == cube2.orientation; | ||
| 18 | printf("%s and %s are%s equal\n", name1, name2, eq ? "" : " NOT"); | ||
| 19 | } | ||
| 20 | |||
| 21 | void run(void) { | ||
| 22 | oriented_cube_t zero, solved; | ||
| 23 | |||
| 24 | memset(&zero, 0, sizeof(oriented_cube_t)); | ||
| 25 | solved = solvedcube(); | ||
| 26 | |||
| 27 | check(solved, "Solved"); | ||
| 28 | check(zero, "Zero"); | ||
| 29 | |||
| 30 | check2(solved, "Solved", solved, "Solved"); | ||
| 31 | check2(solved, "Solved", zero, "Zero"); | ||
| 32 | check2(zero, "Zero", solved, "Solved"); | ||
| 33 | } | ||
