aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/000_basic/all.in0
-rw-r--r--test/000_basic/all.out7
-rw-r--r--test/000_basic/basic_tests.c33
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 @@
1Solved is solvable
2Solved is solved
3Zero is NOT solvable
4Zero is NOT solved
5Solved and Solved are equal
6Solved and Zero are NOT equal
7Zero 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
3bool issolved(oriented_cube_t);
4bool equal(cube_t, cube_t);
5
6void
7check(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
13void
14check2(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
21void 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}

Generated with cgit - Back to sebastiano.tronto.net