diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2023-10-05 15:28:45 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2023-10-05 15:30:21 +0200 |
| commit | ffb67c9dcd22c4c3258b9ef78301e404e7d9a796 (patch) | |
| tree | 67f90a2c988a08a14fc31de1731bf9fcc7439816 /test | |
| parent | 9e698917cb5b332cdbf1969ddfe3840239106c8d (diff) | |
| download | nissy-core-ffb67c9dcd22c4c3258b9ef78301e404e7d9a796.tar.gz nissy-core-ffb67c9dcd22c4c3258b9ef78301e404e7d9a796.zip | |
Split isconsistent() and issolvable()
Diffstat (limited to 'test')
| -rw-r--r-- | test/00_basic/all.out | 4 | ||||
| -rw-r--r-- | test/00_basic/basic_tests.c | 2 | ||||
| -rw-r--r-- | test/01_io/04_inconsistent_ep.out | 1 | ||||
| -rw-r--r-- | test/01_io/04_unsolvable_ep.in (renamed from test/01_io/04_inconsistent_ep.in) | 0 | ||||
| -rw-r--r-- | test/01_io/04_unsolvable_ep.out | 1 | ||||
| -rw-r--r-- | test/01_io/05_inconsistent_eo.out | 1 | ||||
| -rw-r--r-- | test/01_io/05_unsolvable_eo.in (renamed from test/01_io/05_inconsistent_eo.in) | 0 | ||||
| -rw-r--r-- | test/01_io/05_unsolvable_eo.out | 1 | ||||
| -rw-r--r-- | test/01_io/06_inconsistent_cp.out | 1 | ||||
| -rw-r--r-- | test/01_io/06_unsolvable_cp.in (renamed from test/01_io/06_inconsistent_cp.in) | 0 | ||||
| -rw-r--r-- | test/01_io/06_unsolvable_cp.out | 1 | ||||
| -rw-r--r-- | test/01_io/07_inconsistent_co.out | 1 | ||||
| -rw-r--r-- | test/01_io/07_unsolvable_co.in (renamed from test/01_io/07_inconsistent_co.in) | 0 | ||||
| -rw-r--r-- | test/01_io/07_unsolvable_co.out | 1 | ||||
| -rw-r--r-- | test/01_io/io_tests.c | 4 | ||||
| -rw-r--r-- | test/02_move/move_tests.c | 4 | ||||
| -rw-r--r-- | test/03_inverse/inverse_tests.c | 4 | ||||
| -rw-r--r-- | test/04_compose/compose_tests.c | 4 |
18 files changed, 15 insertions, 15 deletions
diff --git a/test/00_basic/all.out b/test/00_basic/all.out index aad167e..892ad22 100644 --- a/test/00_basic/all.out +++ b/test/00_basic/all.out | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | Solved is consistent | 1 | Solved is solvable |
| 2 | Solved is solved | 2 | Solved is solved |
| 3 | Zero is NOT consistent | 3 | Zero is NOT solvable |
| 4 | Zero is NOT solved | 4 | Zero is NOT solved |
| 5 | Solved and Solved are equal | 5 | Solved and Solved are equal |
| 6 | Solved and Zero are NOT equal | 6 | Solved and Zero are NOT equal |
diff --git a/test/00_basic/basic_tests.c b/test/00_basic/basic_tests.c index 8c52941..a3ae0b9 100644 --- a/test/00_basic/basic_tests.c +++ b/test/00_basic/basic_tests.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | void | 7 | void |
| 8 | check(cube_t cube, char *name) | 8 | check(cube_t cube, char *name) |
| 9 | { | 9 | { |
| 10 | printf("%s is%s consistent\n", name, isconsistent(cube) ? "" : " NOT"); | 10 | printf("%s is%s solvable\n", name, issolvable(cube) ? "" : " NOT"); |
| 11 | printf("%s is%s solved\n", name, issolved(cube) ? "" : " NOT"); | 11 | printf("%s is%s solved\n", name, issolved(cube) ? "" : " NOT"); |
| 12 | } | 12 | } |
| 13 | 13 | ||
diff --git a/test/01_io/04_inconsistent_ep.out b/test/01_io/04_inconsistent_ep.out deleted file mode 100644 index cb70902..0000000 --- a/test/01_io/04_inconsistent_ep.out +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | Cube is inconsistent | ||
diff --git a/test/01_io/04_inconsistent_ep.in b/test/01_io/04_unsolvable_ep.in index 8483962..8483962 100644 --- a/test/01_io/04_inconsistent_ep.in +++ b/test/01_io/04_unsolvable_ep.in | |||
diff --git a/test/01_io/04_unsolvable_ep.out b/test/01_io/04_unsolvable_ep.out new file mode 100644 index 0000000..e35c6e4 --- /dev/null +++ b/test/01_io/04_unsolvable_ep.out | |||
| @@ -0,0 +1 @@ | |||
| Cube is not solvable | |||
diff --git a/test/01_io/05_inconsistent_eo.out b/test/01_io/05_inconsistent_eo.out deleted file mode 100644 index cb70902..0000000 --- a/test/01_io/05_inconsistent_eo.out +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | Cube is inconsistent | ||
diff --git a/test/01_io/05_inconsistent_eo.in b/test/01_io/05_unsolvable_eo.in index a92089d..a92089d 100644 --- a/test/01_io/05_inconsistent_eo.in +++ b/test/01_io/05_unsolvable_eo.in | |||
diff --git a/test/01_io/05_unsolvable_eo.out b/test/01_io/05_unsolvable_eo.out new file mode 100644 index 0000000..e35c6e4 --- /dev/null +++ b/test/01_io/05_unsolvable_eo.out | |||
| @@ -0,0 +1 @@ | |||
| Cube is not solvable | |||
diff --git a/test/01_io/06_inconsistent_cp.out b/test/01_io/06_inconsistent_cp.out deleted file mode 100644 index cb70902..0000000 --- a/test/01_io/06_inconsistent_cp.out +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | Cube is inconsistent | ||
diff --git a/test/01_io/06_inconsistent_cp.in b/test/01_io/06_unsolvable_cp.in index 2085dd5..2085dd5 100644 --- a/test/01_io/06_inconsistent_cp.in +++ b/test/01_io/06_unsolvable_cp.in | |||
diff --git a/test/01_io/06_unsolvable_cp.out b/test/01_io/06_unsolvable_cp.out new file mode 100644 index 0000000..e35c6e4 --- /dev/null +++ b/test/01_io/06_unsolvable_cp.out | |||
| @@ -0,0 +1 @@ | |||
| Cube is not solvable | |||
diff --git a/test/01_io/07_inconsistent_co.out b/test/01_io/07_inconsistent_co.out deleted file mode 100644 index cb70902..0000000 --- a/test/01_io/07_inconsistent_co.out +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | Cube is inconsistent | ||
diff --git a/test/01_io/07_inconsistent_co.in b/test/01_io/07_unsolvable_co.in index abd74e2..abd74e2 100644 --- a/test/01_io/07_inconsistent_co.in +++ b/test/01_io/07_unsolvable_co.in | |||
diff --git a/test/01_io/07_unsolvable_co.out b/test/01_io/07_unsolvable_co.out new file mode 100644 index 0000000..e35c6e4 --- /dev/null +++ b/test/01_io/07_unsolvable_co.out | |||
| @@ -0,0 +1 @@ | |||
| Cube is not solvable | |||
diff --git a/test/01_io/io_tests.c b/test/01_io/io_tests.c index 42ef9b8..913ec1d 100644 --- a/test/01_io/io_tests.c +++ b/test/01_io/io_tests.c | |||
| @@ -17,8 +17,8 @@ int main() { | |||
| 17 | 17 | ||
| 18 | if (iserror(cube)) { | 18 | if (iserror(cube)) { |
| 19 | printf("Error reading cube\n"); | 19 | printf("Error reading cube\n"); |
| 20 | } else if (!isconsistent(cube)) { | 20 | } else if (!issolvable(cube)) { |
| 21 | printf("Cube is inconsistent\n"); | 21 | printf("Cube is not solvable\n"); |
| 22 | } else { | 22 | } else { |
| 23 | writecube(cube, str); | 23 | writecube(cube, str); |
| 24 | printf("%s\n", str); | 24 | printf("%s\n", str); |
diff --git a/test/02_move/move_tests.c b/test/02_move/move_tests.c index ac25de3..333c8ee 100644 --- a/test/02_move/move_tests.c +++ b/test/02_move/move_tests.c | |||
| @@ -29,8 +29,8 @@ int main() { | |||
| 29 | 29 | ||
| 30 | if (iserror(cube)) { | 30 | if (iserror(cube)) { |
| 31 | printf("Error moving cube\n"); | 31 | printf("Error moving cube\n"); |
| 32 | } else if (!isconsistent(cube)) { | 32 | } else if (!issolvable(cube)) { |
| 33 | printf("Moved cube is inconsistent\n"); | 33 | printf("Moved cube is not solvable\n"); |
| 34 | } else { | 34 | } else { |
| 35 | writecube(cube, str); | 35 | writecube(cube, str); |
| 36 | printf("%s\n", str); | 36 | printf("%s\n", str); |
diff --git a/test/03_inverse/inverse_tests.c b/test/03_inverse/inverse_tests.c index 5fab71a..c8d8d95 100644 --- a/test/03_inverse/inverse_tests.c +++ b/test/03_inverse/inverse_tests.c | |||
| @@ -16,8 +16,8 @@ int main() { | |||
| 16 | 16 | ||
| 17 | if (iserror(inv)) { | 17 | if (iserror(inv)) { |
| 18 | printf("Error inverting cube\n"); | 18 | printf("Error inverting cube\n"); |
| 19 | } else if (!isconsistent(inv)) { | 19 | } else if (!issolvable(inv)) { |
| 20 | printf("Inverted cube is inconsistent\n"); | 20 | printf("Inverted cube is not solvable\n"); |
| 21 | } else { | 21 | } else { |
| 22 | writecube(inv, str); | 22 | writecube(inv, str); |
| 23 | printf("%s\n", str); | 23 | printf("%s\n", str); |
diff --git a/test/04_compose/compose_tests.c b/test/04_compose/compose_tests.c index ae34f6d..575c2c9 100644 --- a/test/04_compose/compose_tests.c +++ b/test/04_compose/compose_tests.c | |||
| @@ -19,8 +19,8 @@ int main() { | |||
| 19 | 19 | ||
| 20 | if (iserror(c3)) { | 20 | if (iserror(c3)) { |
| 21 | printf("Error composing cubes\n"); | 21 | printf("Error composing cubes\n"); |
| 22 | } else if (!isconsistent(c3)) { | 22 | } else if (!issolvable(c3)) { |
| 23 | printf("Composed cube is inconsistent\n"); | 23 | printf("Composed cube is not solvable\n"); |
| 24 | } else { | 24 | } else { |
| 25 | writecube(c3, str); | 25 | writecube(c3, str); |
| 26 | printf("%s\n", str); | 26 | printf("%s\n", str); |
