diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2024-04-13 15:31:32 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2024-04-13 15:31:32 +0200 |
| commit | a18d4b0ba97b301193597a963a77a40ef7c2254b (patch) | |
| tree | e2137f21fd162380a2cf8ec6e54af959ad4c4d90 /test/000_basic | |
| parent | ae055f1fc993d406939f57f11553d218e1efde82 (diff) | |
| download | cubecore-a18d4b0ba97b301193597a963a77a40ef7c2254b.tar.gz cubecore-a18d4b0ba97b301193597a963a77a40ef7c2254b.zip | |
Some renaming
Diffstat (limited to 'test/000_basic')
| -rw-r--r-- | test/000_basic/basic_tests.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/test/000_basic/basic_tests.c b/test/000_basic/basic_tests.c index c4434c5..53ccc9f 100644 --- a/test/000_basic/basic_tests.c +++ b/test/000_basic/basic_tests.c | |||
| @@ -1,27 +1,24 @@ | |||
| 1 | #include "../test.h" | 1 | #include "../test.h" |
| 2 | 2 | ||
| 3 | bool issolved(cube_t); | ||
| 4 | bool equal(cube_t, cube_t); | ||
| 5 | |||
| 6 | void | 3 | void |
| 7 | check(cube_t cube, char *name) | 4 | check(cube_t cube, char *name) |
| 8 | { | 5 | { |
| 9 | printf("%s is%s solvable\n", name, issolvable(cube) ? "" : " NOT"); | 6 | printf("%s is%s solvable\n", name, cube_solvable(cube) ? "" : " NOT"); |
| 10 | printf("%s is%s solved\n", name, issolved(cube) ? "" : " NOT"); | 7 | printf("%s is%s solved\n", name, cube_solved(cube) ? "" : " NOT"); |
| 11 | } | 8 | } |
| 12 | 9 | ||
| 13 | void | 10 | void |
| 14 | check2(cube_t cube1, char *name1, cube_t cube2, char *name2) | 11 | check2(cube_t cube1, char *name1, cube_t cube2, char *name2) |
| 15 | { | 12 | { |
| 16 | printf("%s and %s are%s equal\n", name1, name2, | 13 | printf("%s and %s are%s equal\n", name1, name2, |
| 17 | equal(cube1, cube2) ? "" : " NOT"); | 14 | cube_equal(cube1, cube2) ? "" : " NOT"); |
| 18 | } | 15 | } |
| 19 | 16 | ||
| 20 | int main(void) { | 17 | int main(void) { |
| 21 | cube_t zero, solved; | 18 | cube_t zero, solved; |
| 22 | 19 | ||
| 23 | memset(&zero, 0, sizeof(cube_t)); | 20 | memset(&zero, 0, sizeof(cube_t)); |
| 24 | solved = solvedcube(); | 21 | solved = cube_new(); |
| 25 | check(solved, "Solved"); | 22 | check(solved, "Solved"); |
| 26 | check(zero, "Zero"); | 23 | check(zero, "Zero"); |
| 27 | 24 | ||
