diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2023-06-19 15:06:11 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2023-06-19 15:06:11 +0200 |
| commit | c5dfc897160bc9bbc6a91c77b5d58d421fd1cfe1 (patch) | |
| tree | ad73b01c37697c8b7392c85ffc7a02fb6a08e5f6 /test/00_basic | |
| parent | 7e9afaa14ca293a7e9d5a76af36d9a0aecbb031d (diff) | |
| download | nissy-core-c5dfc897160bc9bbc6a91c77b5d58d421fd1cfe1.tar.gz nissy-core-c5dfc897160bc9bbc6a91c77b5d58d421fd1cfe1.zip | |
Renamed test folders to keep order
Diffstat (limited to 'test/00_basic')
| -rw-r--r-- | test/00_basic/all.in | 0 | ||||
| -rw-r--r-- | test/00_basic/all.out | 4 | ||||
| -rw-r--r-- | test/00_basic/basic_tests.c | 19 |
3 files changed, 23 insertions, 0 deletions
diff --git a/test/00_basic/all.in b/test/00_basic/all.in new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/00_basic/all.in | |||
diff --git a/test/00_basic/all.out b/test/00_basic/all.out new file mode 100644 index 0000000..d77f7f4 --- /dev/null +++ b/test/00_basic/all.out | |||
| @@ -0,0 +1,4 @@ | |||
| 1 | Solved is consistent | ||
| 2 | Solved is solved | ||
| 3 | Zero is NOT consistent | ||
| 4 | Zero is NOT solved | ||
diff --git a/test/00_basic/basic_tests.c b/test/00_basic/basic_tests.c new file mode 100644 index 0000000..cc2a55c --- /dev/null +++ b/test/00_basic/basic_tests.c | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | #include <stdbool.h> | ||
| 2 | #include <stdint.h> | ||
| 3 | #include <stdio.h> | ||
| 4 | |||
| 5 | #include "../../src/cube.h" | ||
| 6 | |||
| 7 | int main() { | ||
| 8 | cube_t z, s; | ||
| 9 | |||
| 10 | s = solvedcube; | ||
| 11 | printf("Solved %s consistent\n", isconsistent(s) ? "is" : "is NOT"); | ||
| 12 | printf("Solved %s solved\n", issolved(s) ? "is" : "is NOT"); | ||
| 13 | |||
| 14 | z = (cube_t){0}; | ||
| 15 | printf("Zero %s consistent\n", isconsistent(z) ? "is" : "is NOT"); | ||
| 16 | printf("Zero %s solved\n", issolved(z) ? "is" : "is NOT"); | ||
| 17 | |||
| 18 | return 0; | ||
| 19 | } | ||
