aboutsummaryrefslogtreecommitdiff
path: root/test/000_basic/basic_tests.c
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2024-04-13 15:31:32 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2024-04-13 15:31:32 +0200
commita18d4b0ba97b301193597a963a77a40ef7c2254b (patch)
treee2137f21fd162380a2cf8ec6e54af959ad4c4d90 /test/000_basic/basic_tests.c
parentae055f1fc993d406939f57f11553d218e1efde82 (diff)
downloadcubecore-a18d4b0ba97b301193597a963a77a40ef7c2254b.tar.gz
cubecore-a18d4b0ba97b301193597a963a77a40ef7c2254b.zip
Some renaming
Diffstat (limited to 'test/000_basic/basic_tests.c')
-rw-r--r--test/000_basic/basic_tests.c11
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
3bool issolved(cube_t);
4bool equal(cube_t, cube_t);
5
6void 3void
7check(cube_t cube, char *name) 4check(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
13void 10void
14check2(cube_t cube1, char *name1, cube_t cube2, char *name2) 11check2(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
20int main(void) { 17int 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

Generated with cgit - Back to sebastiano.tronto.net