diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2023-11-19 22:03:17 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2023-11-19 22:03:17 +0100 |
| commit | 2c8ad86805516211103df1ef7552d882f54748c3 (patch) | |
| tree | fd3b1927a94c8aea02e6090cb9b441997fd7206d /test | |
| parent | bb5abea645a31832e9d6a94cea09714a9b1632e3 (diff) | |
| download | nissy-core-2c8ad86805516211103df1ef7552d882f54748c3.tar.gz nissy-core-2c8ad86805516211103df1ef7552d882f54748c3.zip | |
Removed src cube type, kept only H48 and LST (for now)
Diffstat (limited to 'test')
| -rw-r--r-- | test/021_io_SRC_write/01_solved.out | 4 | ||||
| -rw-r--r-- | test/021_io_SRC_write/02_scrambled.out | 4 | ||||
| -rw-r--r-- | test/023_io_LST_write/io_LST_tests.c | 7 | ||||
| -rw-r--r-- | test/024_io_LST_read/01_solved.in | 1 | ||||
| -rw-r--r-- | test/024_io_LST_read/01_solved.out (renamed from test/021_io_SRC_write/01_solved.in) | 0 | ||||
| -rw-r--r-- | test/024_io_LST_read/02_scrambled.in | 1 | ||||
| -rw-r--r-- | test/024_io_LST_read/02_scrambled.out (renamed from test/021_io_SRC_write/02_scrambled.in) | 0 | ||||
| -rw-r--r-- | test/024_io_LST_read/io_LST_tests.c (renamed from test/021_io_SRC_write/io_SRC_tests.c) | 4 |
8 files changed, 4 insertions, 17 deletions
diff --git a/test/021_io_SRC_write/01_solved.out b/test/021_io_SRC_write/01_solved.out deleted file mode 100644 index 3c21bcc..0000000 --- a/test/021_io_SRC_write/01_solved.out +++ /dev/null | |||
| @@ -1,4 +0,0 @@ | |||
| 1 | { | ||
| 2 | .corner = {0, 1, 2, 3, 4, 5, 6, 7}, | ||
| 3 | .edge = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11} | ||
| 4 | } | ||
diff --git a/test/021_io_SRC_write/02_scrambled.out b/test/021_io_SRC_write/02_scrambled.out deleted file mode 100644 index b899386..0000000 --- a/test/021_io_SRC_write/02_scrambled.out +++ /dev/null | |||
| @@ -1,4 +0,0 @@ | |||
| 1 | { | ||
| 2 | .corner = {38, 32, 37, 68, 67, 2, 71, 1}, | ||
| 3 | .edge = {9, 2, 17, 8, 4, 3, 0, 27, 21, 26, 6, 7} | ||
| 4 | } | ||
diff --git a/test/023_io_LST_write/io_LST_tests.c b/test/023_io_LST_write/io_LST_tests.c index 45cc203..df35632 100644 --- a/test/023_io_LST_write/io_LST_tests.c +++ b/test/023_io_LST_write/io_LST_tests.c | |||
| @@ -1,12 +1,5 @@ | |||
| 1 | #include "../test.h" | 1 | #include "../test.h" |
| 2 | 2 | ||
| 3 | #define STRLENMAX 10000 | ||
| 4 | |||
| 5 | bool iserror(cube_t); | ||
| 6 | bool issolvable(cube_t); | ||
| 7 | cube_t readcube(char *, char *); | ||
| 8 | void writecube(char *, cube_t, char *); | ||
| 9 | |||
| 10 | int main(void) { | 3 | int main(void) { |
| 11 | char str[STRLENMAX], *aux; | 4 | char str[STRLENMAX], *aux; |
| 12 | cube_t cube; | 5 | cube_t cube; |
diff --git a/test/024_io_LST_read/01_solved.in b/test/024_io_LST_read/01_solved.in new file mode 100644 index 0000000..c5b394b --- /dev/null +++ b/test/024_io_LST_read/01_solved.in | |||
| @@ -0,0 +1 @@ | |||
| 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 | |||
diff --git a/test/021_io_SRC_write/01_solved.in b/test/024_io_LST_read/01_solved.out index dff224d..dff224d 100644 --- a/test/021_io_SRC_write/01_solved.in +++ b/test/024_io_LST_read/01_solved.out | |||
diff --git a/test/024_io_LST_read/02_scrambled.in b/test/024_io_LST_read/02_scrambled.in new file mode 100644 index 0000000..9fcb603 --- /dev/null +++ b/test/024_io_LST_read/02_scrambled.in | |||
| @@ -0,0 +1 @@ | |||
| 38, 32, 37, 68, 67, 2, 71, 1, 9, 2, 17, 8, 4, 3, 0, 27, 21, 26, 6, 7 | |||
diff --git a/test/021_io_SRC_write/02_scrambled.in b/test/024_io_LST_read/02_scrambled.out index 6a05bbc..6a05bbc 100644 --- a/test/021_io_SRC_write/02_scrambled.in +++ b/test/024_io_LST_read/02_scrambled.out | |||
diff --git a/test/021_io_SRC_write/io_SRC_tests.c b/test/024_io_LST_read/io_LST_tests.c index c427c6c..506a23d 100644 --- a/test/021_io_SRC_write/io_SRC_tests.c +++ b/test/024_io_LST_read/io_LST_tests.c | |||
| @@ -9,14 +9,14 @@ int main(void) { | |||
| 9 | while (*aux != '\n') | 9 | while (*aux != '\n') |
| 10 | aux++; | 10 | aux++; |
| 11 | 11 | ||
| 12 | cube = readcube("H48", str); | 12 | cube = readcube("LST", str); |
| 13 | 13 | ||
| 14 | if (iserror(cube)) { | 14 | if (iserror(cube)) { |
| 15 | printf("Error reading cube\n"); | 15 | printf("Error reading cube\n"); |
| 16 | } else if (!issolvable(cube)) { | 16 | } else if (!issolvable(cube)) { |
| 17 | printf("Cube is not solvable\n"); | 17 | printf("Cube is not solvable\n"); |
| 18 | } else { | 18 | } else { |
| 19 | writecube("SRC", cube, str); | 19 | writecube("H48", cube, str); |
| 20 | printf("%s\n", str); | 20 | printf("%s\n", str); |
| 21 | } | 21 | } |
| 22 | 22 | ||
