aboutsummaryrefslogtreecommitdiff
path: root/test/00_basic
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2023-11-14 22:01:38 +0100
committerSebastiano Tronto <sebastiano@tronto.net>2023-11-14 22:01:38 +0100
commitad9bdca9741b5f038610cbe0536131ab0dc7b511 (patch)
tree9c1817f6fca0a529a72bebdd7ed1f75a6e35bf3d /test/00_basic
parent41e31b84a9adeae0b6bdbc4c9438bfa5e782c9da (diff)
downloadnissy-core-ad9bdca9741b5f038610cbe0536131ab0dc7b511.tar.gz
nissy-core-ad9bdca9741b5f038610cbe0536131ab0dc7b511.zip
Added tests for conversion
Diffstat (limited to 'test/00_basic')
-rw-r--r--test/00_basic/all.in0
-rw-r--r--test/00_basic/all.out7
-rw-r--r--test/00_basic/basic_tests.c33
3 files changed, 0 insertions, 40 deletions
diff --git a/test/00_basic/all.in b/test/00_basic/all.in
deleted file mode 100644
index e69de29..0000000
--- a/test/00_basic/all.in
+++ /dev/null
diff --git a/test/00_basic/all.out b/test/00_basic/all.out
deleted file mode 100644
index 892ad22..0000000
--- a/test/00_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/00_basic/basic_tests.c b/test/00_basic/basic_tests.c
deleted file mode 100644
index 17f1b2b..0000000
--- a/test/00_basic/basic_tests.c
+++ /dev/null
@@ -1,33 +0,0 @@
1#include "../test.h"
2
3bool issolved(cube_t);
4bool equal(cube_t, cube_t);
5
6void
7check(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(cube_t cube1, char *name1, cube_t cube2, char *name2)
15{
16 printf("%s and %s are%s equal\n", name1, name2,
17 equal(cube1, cube2) ? "" : " NOT");
18}
19
20int main() {
21 cube_t zero, solved;
22
23 memset(&zero, 0, sizeof(cube_t));
24 solved = solvedcube();
25 check(solved, "Solved");
26 check(zero, "Zero");
27
28 check2(solved, "Solved", solved, "Solved");
29 check2(solved, "Solved", zero, "Zero");
30 check2(zero, "Zero", solved, "Solved");
31
32 return 0;
33}

Generated with cgit - Back to sebastiano.tronto.net