diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2023-10-10 23:51:20 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2023-10-10 23:51:20 +0200 |
| commit | 0032089b5c7dedf057c60fcee17cbdd2b0f8bb87 (patch) | |
| tree | 85cbf344b3ba69c0ac2fcc47fda098909799e8c4 /test/011_io_SRC | |
| parent | 2edc8c01fba711f4410279b59c784a43cf2dde41 (diff) | |
| download | nissy-core-0032089b5c7dedf057c60fcee17cbdd2b0f8bb87.tar.gz nissy-core-0032089b5c7dedf057c60fcee17cbdd2b0f8bb87.zip | |
Added more complete test for SRC_write; renamed tests for clarity
Diffstat (limited to 'test/011_io_SRC')
| -rw-r--r-- | test/011_io_SRC/01_solved.in | 1 | ||||
| -rw-r--r-- | test/011_io_SRC/01_solved.out | 4 | ||||
| -rw-r--r-- | test/011_io_SRC/io_SRC_tests.c | 28 |
3 files changed, 0 insertions, 33 deletions
diff --git a/test/011_io_SRC/01_solved.in b/test/011_io_SRC/01_solved.in deleted file mode 100644 index dff224d..0000000 --- a/test/011_io_SRC/01_solved.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/011_io_SRC/01_solved.out b/test/011_io_SRC/01_solved.out deleted file mode 100644 index 3853027..0000000 --- a/test/011_io_SRC/01_solved.out +++ /dev/null | |||
| @@ -1,4 +0,0 @@ | |||
| 1 | { | ||
| 2 | .c = {0, 1, 2, 3, 4, 5, 6, 7}, | ||
| 3 | .e = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11} | ||
| 4 | } | ||
diff --git a/test/011_io_SRC/io_SRC_tests.c b/test/011_io_SRC/io_SRC_tests.c deleted file mode 100644 index f454b6f..0000000 --- a/test/011_io_SRC/io_SRC_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(H48, str); | ||
| 17 | |||
| 18 | if (iserror(cube)) { | ||
| 19 | printf("Error reading cube\n"); | ||
| 20 | } else if (!issolvable(cube)) { | ||
| 21 | printf("Cube is not solvable\n"); | ||
| 22 | } else { | ||
| 23 | writecube(SRC, cube, str); | ||
| 24 | printf("%s\n", str); | ||
| 25 | } | ||
| 26 | |||
| 27 | return 0; | ||
| 28 | } | ||
