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/io | |
| parent | 7e9afaa14ca293a7e9d5a76af36d9a0aecbb031d (diff) | |
| download | nissy-core-c5dfc897160bc9bbc6a91c77b5d58d421fd1cfe1.tar.gz nissy-core-c5dfc897160bc9bbc6a91c77b5d58d421fd1cfe1.zip | |
Renamed test folders to keep order
Diffstat (limited to 'test/io')
| -rw-r--r-- | test/io/00_garbage.in | 3 | ||||
| -rw-r--r-- | test/io/00_garbage.out | 1 | ||||
| -rw-r--r-- | test/io/01_solved_oneline.in | 1 | ||||
| -rw-r--r-- | test/io/01_solved_oneline.out | 1 | ||||
| -rw-r--r-- | test/io/02_solved_oneline_whitespace.in | 1 | ||||
| -rw-r--r-- | test/io/02_solved_oneline_whitespace.out | 1 | ||||
| -rw-r--r-- | test/io/03_solved_multiline.in | 9 | ||||
| -rw-r--r-- | test/io/03_solved_multiline.out | 1 | ||||
| -rw-r--r-- | test/io/04_inconsistent_ep.in | 1 | ||||
| -rw-r--r-- | test/io/04_inconsistent_ep.out | 1 | ||||
| -rw-r--r-- | test/io/05_inconsistent_eo.in | 1 | ||||
| -rw-r--r-- | test/io/05_inconsistent_eo.out | 1 | ||||
| -rw-r--r-- | test/io/06_inconsistent_cp.in | 1 | ||||
| -rw-r--r-- | test/io/06_inconsistent_cp.out | 1 | ||||
| -rw-r--r-- | test/io/07_inconsistent_co.in | 1 | ||||
| -rw-r--r-- | test/io/07_inconsistent_co.out | 1 | ||||
| -rw-r--r-- | test/io/08_unsolved.in | 6 | ||||
| -rw-r--r-- | test/io/08_unsolved.out | 1 | ||||
| -rw-r--r-- | test/io/io_tests.c | 28 |
19 files changed, 0 insertions, 61 deletions
diff --git a/test/io/00_garbage.in b/test/io/00_garbage.in deleted file mode 100644 index 9ac203a..0000000 --- a/test/io/00_garbage.in +++ /dev/null | |||
| @@ -1,3 +0,0 @@ | |||
| 1 | FUF0 UBBBR2 k4 | ||
| 2 | hello | ||
| 3 | garbage | ||
diff --git a/test/io/00_garbage.out b/test/io/00_garbage.out deleted file mode 100644 index 5b9114e..0000000 --- a/test/io/00_garbage.out +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | Error reading cube | ||
diff --git a/test/io/01_solved_oneline.in b/test/io/01_solved_oneline.in deleted file mode 100644 index dff224d..0000000 --- a/test/io/01_solved_oneline.in +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | UF0 UB0 DB0 DF0 UR0 UL0 DL0 DR0 FR0 FL0 BL0 BR0 UFR0 UBL0 DFL0 DBR0 UFL0 UBR0 DFR0 DBL0 | ||
diff --git a/test/io/01_solved_oneline.out b/test/io/01_solved_oneline.out deleted file mode 100644 index dff224d..0000000 --- a/test/io/01_solved_oneline.out +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | UF0 UB0 DB0 DF0 UR0 UL0 DL0 DR0 FR0 FL0 BL0 BR0 UFR0 UBL0 DFL0 DBR0 UFL0 UBR0 DFR0 DBL0 | ||
diff --git a/test/io/02_solved_oneline_whitespace.in b/test/io/02_solved_oneline_whitespace.in deleted file mode 100644 index 5d10368..0000000 --- a/test/io/02_solved_oneline_whitespace.in +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | UF0 UB0 DB0 DF0 UR0 UL0 DL0 DR0 FR0 FL0 BL0 BR0 UFR0 UBL0 DFL0 DBR0 UFL0 UBR0 DFR0 DBL0 | ||
diff --git a/test/io/02_solved_oneline_whitespace.out b/test/io/02_solved_oneline_whitespace.out deleted file mode 100644 index dff224d..0000000 --- a/test/io/02_solved_oneline_whitespace.out +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | UF0 UB0 DB0 DF0 UR0 UL0 DL0 DR0 FR0 FL0 BL0 BR0 UFR0 UBL0 DFL0 DBR0 UFL0 UBR0 DFR0 DBL0 | ||
diff --git a/test/io/03_solved_multiline.in b/test/io/03_solved_multiline.in deleted file mode 100644 index 9f9652b..0000000 --- a/test/io/03_solved_multiline.in +++ /dev/null | |||
| @@ -1,9 +0,0 @@ | |||
| 1 | UF0 UB0 | ||
| 2 | DB0 DF0 UR0 UL0 DL0 | ||
| 3 | DR0 FR0 FL0 BL0 BR0 UFR0 | ||
| 4 | |||
| 5 | UBL0 DFL0 DBR0 | ||
| 6 | |||
| 7 | |||
| 8 | UFL0 UBR0 DFR0 | ||
| 9 | DBL0 | ||
diff --git a/test/io/03_solved_multiline.out b/test/io/03_solved_multiline.out deleted file mode 100644 index dff224d..0000000 --- a/test/io/03_solved_multiline.out +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | UF0 UB0 DB0 DF0 UR0 UL0 DL0 DR0 FR0 FL0 BL0 BR0 UFR0 UBL0 DFL0 DBR0 UFL0 UBR0 DFR0 DBL0 | ||
diff --git a/test/io/04_inconsistent_ep.in b/test/io/04_inconsistent_ep.in deleted file mode 100644 index 8483962..0000000 --- a/test/io/04_inconsistent_ep.in +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | UB0 UF0 DB0 DF0 UR0 UL0 DL0 DR0 FR0 FL0 BL0 BR0 UFR0 UBL0 DFL0 DBR0 UFL0 UBR0 DFR0 DBL0 | ||
diff --git a/test/io/04_inconsistent_ep.out b/test/io/04_inconsistent_ep.out deleted file mode 100644 index cb70902..0000000 --- a/test/io/04_inconsistent_ep.out +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | Cube is inconsistent | ||
diff --git a/test/io/05_inconsistent_eo.in b/test/io/05_inconsistent_eo.in deleted file mode 100644 index a92089d..0000000 --- a/test/io/05_inconsistent_eo.in +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | UF1 UB0 DB0 DF0 UR0 UL0 DL0 DR0 FR0 FL0 BL0 BR0 UFR0 UBL0 DFL0 DBR0 UFL0 UBR0 DFR0 DBL0 | ||
diff --git a/test/io/05_inconsistent_eo.out b/test/io/05_inconsistent_eo.out deleted file mode 100644 index cb70902..0000000 --- a/test/io/05_inconsistent_eo.out +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | Cube is inconsistent | ||
diff --git a/test/io/06_inconsistent_cp.in b/test/io/06_inconsistent_cp.in deleted file mode 100644 index 2085dd5..0000000 --- a/test/io/06_inconsistent_cp.in +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | UF0 UB0 DB0 DF0 UR0 UL0 DL0 DR0 FR0 FL0 BL0 BR0 UBL0 UFR0 DFL0 DBR0 UFL0 UBR0 DFR0 DBL0 | ||
diff --git a/test/io/06_inconsistent_cp.out b/test/io/06_inconsistent_cp.out deleted file mode 100644 index cb70902..0000000 --- a/test/io/06_inconsistent_cp.out +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | Cube is inconsistent | ||
diff --git a/test/io/07_inconsistent_co.in b/test/io/07_inconsistent_co.in deleted file mode 100644 index abd74e2..0000000 --- a/test/io/07_inconsistent_co.in +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | UF0 UB0 DB0 DF0 UR0 UL0 DL0 DR0 FR0 FL0 BL0 BR0 UFR1 UBL0 DFL0 DBR0 UFL0 UBR0 DFR0 DBL0 | ||
diff --git a/test/io/07_inconsistent_co.out b/test/io/07_inconsistent_co.out deleted file mode 100644 index cb70902..0000000 --- a/test/io/07_inconsistent_co.out +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | Cube is inconsistent | ||
diff --git a/test/io/08_unsolved.in b/test/io/08_unsolved.in deleted file mode 100644 index c992ce7..0000000 --- a/test/io/08_unsolved.in +++ /dev/null | |||
| @@ -1,6 +0,0 @@ | |||
| 1 | UL1 DR0 UB0 DL1 | ||
| 2 | UR0 FR1 DB0 BR0 | ||
| 3 | UF1 DF0 BL0 FL0 | ||
| 4 | |||
| 5 | UBL0 DLF1 DBR2 UFR1 | ||
| 6 | DFR1 UBR1 UFL0 DBL0 | ||
diff --git a/test/io/08_unsolved.out b/test/io/08_unsolved.out deleted file mode 100644 index 8c132cf..0000000 --- a/test/io/08_unsolved.out +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | UL1 DR0 UB0 DL1 UR0 FR1 DB0 BR0 UF1 DF0 BL0 FL0 UBL0 DFL1 DBR2 UFR1 DFR1 UBR1 UFL0 DBL0 | ||
diff --git a/test/io/io_tests.c b/test/io/io_tests.c deleted file mode 100644 index 1ef99d0..0000000 --- a/test/io/io_tests.c +++ /dev/null | |||
| @@ -1,28 +0,0 @@ | |||
| 1 | #include <stdbool.h> | ||
| 2 | #include <stdint.h> | ||
| 3 | #include <stdio.h> | ||
| 4 | |||
| 5 | #include "../../src/cube.h" | ||
| 6 | |||
| 7 | #define STRLENMAX 10000 | ||
| 8 | |||
| 9 | int main() { | ||
| 10 | char *c, str[STRLENMAX]; | ||
| 11 | cube_t cube; | ||
| 12 | |||
| 13 | for (c = str; (*c = getchar()) != EOF; c++) ; | ||
| 14 | *c = '\0'; | ||
| 15 | |||
| 16 | cube = readcube(str); | ||
| 17 | |||
| 18 | if (cube.e == errorcube.e && cube.c == errorcube.c) { | ||
| 19 | printf("Error reading cube\n"); | ||
| 20 | } else if (!isconsistent(cube)) { | ||
| 21 | printf("Cube is inconsistent\n"); | ||
| 22 | } else { | ||
| 23 | writecube(cube, str); | ||
| 24 | printf("%s\n", str); | ||
| 25 | } | ||
| 26 | |||
| 27 | return 0; | ||
| 28 | } | ||
