From 0032089b5c7dedf057c60fcee17cbdd2b0f8bb87 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Tue, 10 Oct 2023 23:51:20 +0200 Subject: Added more complete test for SRC_write; renamed tests for clarity --- test/010_io_H48/00_garbage.in | 3 --- test/010_io_H48/00_garbage.out | 1 - test/010_io_H48/01_solved_oneline.in | 1 - test/010_io_H48/01_solved_oneline.out | 1 - test/010_io_H48/02_solved_oneline_whitespace.in | 1 - test/010_io_H48/02_solved_oneline_whitespace.out | 1 - test/010_io_H48/03_solved_multiline.in | 9 -------- test/010_io_H48/03_solved_multiline.out | 1 - test/010_io_H48/04_unsolvable_ep.in | 1 - test/010_io_H48/04_unsolvable_ep.out | 1 - test/010_io_H48/05_unsolvable_eo.in | 1 - test/010_io_H48/05_unsolvable_eo.out | 1 - test/010_io_H48/06_unsolvable_cp.in | 1 - test/010_io_H48/06_unsolvable_cp.out | 1 - test/010_io_H48/07_unsolvable_co.in | 1 - test/010_io_H48/07_unsolvable_co.out | 1 - test/010_io_H48/08_unsolved.in | 6 ----- test/010_io_H48/08_unsolved.out | 1 - test/010_io_H48/io_H48_tests.c | 28 ------------------------ 19 files changed, 61 deletions(-) delete mode 100644 test/010_io_H48/00_garbage.in delete mode 100644 test/010_io_H48/00_garbage.out delete mode 100644 test/010_io_H48/01_solved_oneline.in delete mode 100644 test/010_io_H48/01_solved_oneline.out delete mode 100644 test/010_io_H48/02_solved_oneline_whitespace.in delete mode 100644 test/010_io_H48/02_solved_oneline_whitespace.out delete mode 100644 test/010_io_H48/03_solved_multiline.in delete mode 100644 test/010_io_H48/03_solved_multiline.out delete mode 100644 test/010_io_H48/04_unsolvable_ep.in delete mode 100644 test/010_io_H48/04_unsolvable_ep.out delete mode 100644 test/010_io_H48/05_unsolvable_eo.in delete mode 100644 test/010_io_H48/05_unsolvable_eo.out delete mode 100644 test/010_io_H48/06_unsolvable_cp.in delete mode 100644 test/010_io_H48/06_unsolvable_cp.out delete mode 100644 test/010_io_H48/07_unsolvable_co.in delete mode 100644 test/010_io_H48/07_unsolvable_co.out delete mode 100644 test/010_io_H48/08_unsolved.in delete mode 100644 test/010_io_H48/08_unsolved.out delete mode 100644 test/010_io_H48/io_H48_tests.c (limited to 'test/010_io_H48') diff --git a/test/010_io_H48/00_garbage.in b/test/010_io_H48/00_garbage.in deleted file mode 100644 index 9ac203a..0000000 --- a/test/010_io_H48/00_garbage.in +++ /dev/null @@ -1,3 +0,0 @@ -FUF0 UBBBR2 k4 -hello -garbage diff --git a/test/010_io_H48/00_garbage.out b/test/010_io_H48/00_garbage.out deleted file mode 100644 index 5b9114e..0000000 --- a/test/010_io_H48/00_garbage.out +++ /dev/null @@ -1 +0,0 @@ -Error reading cube diff --git a/test/010_io_H48/01_solved_oneline.in b/test/010_io_H48/01_solved_oneline.in deleted file mode 100644 index dff224d..0000000 --- a/test/010_io_H48/01_solved_oneline.in +++ /dev/null @@ -1 +0,0 @@ -UF0 UB0 DB0 DF0 UR0 UL0 DL0 DR0 FR0 FL0 BL0 BR0 UFR0 UBL0 DFL0 DBR0 UFL0 UBR0 DFR0 DBL0 diff --git a/test/010_io_H48/01_solved_oneline.out b/test/010_io_H48/01_solved_oneline.out deleted file mode 100644 index dff224d..0000000 --- a/test/010_io_H48/01_solved_oneline.out +++ /dev/null @@ -1 +0,0 @@ -UF0 UB0 DB0 DF0 UR0 UL0 DL0 DR0 FR0 FL0 BL0 BR0 UFR0 UBL0 DFL0 DBR0 UFL0 UBR0 DFR0 DBL0 diff --git a/test/010_io_H48/02_solved_oneline_whitespace.in b/test/010_io_H48/02_solved_oneline_whitespace.in deleted file mode 100644 index 5d10368..0000000 --- a/test/010_io_H48/02_solved_oneline_whitespace.in +++ /dev/null @@ -1 +0,0 @@ -UF0 UB0 DB0 DF0 UR0 UL0 DL0 DR0 FR0 FL0 BL0 BR0 UFR0 UBL0 DFL0 DBR0 UFL0 UBR0 DFR0 DBL0 diff --git a/test/010_io_H48/02_solved_oneline_whitespace.out b/test/010_io_H48/02_solved_oneline_whitespace.out deleted file mode 100644 index dff224d..0000000 --- a/test/010_io_H48/02_solved_oneline_whitespace.out +++ /dev/null @@ -1 +0,0 @@ -UF0 UB0 DB0 DF0 UR0 UL0 DL0 DR0 FR0 FL0 BL0 BR0 UFR0 UBL0 DFL0 DBR0 UFL0 UBR0 DFR0 DBL0 diff --git a/test/010_io_H48/03_solved_multiline.in b/test/010_io_H48/03_solved_multiline.in deleted file mode 100644 index 9f9652b..0000000 --- a/test/010_io_H48/03_solved_multiline.in +++ /dev/null @@ -1,9 +0,0 @@ -UF0 UB0 -DB0 DF0 UR0 UL0 DL0 -DR0 FR0 FL0 BL0 BR0 UFR0 - -UBL0 DFL0 DBR0 - - -UFL0 UBR0 DFR0 - DBL0 diff --git a/test/010_io_H48/03_solved_multiline.out b/test/010_io_H48/03_solved_multiline.out deleted file mode 100644 index dff224d..0000000 --- a/test/010_io_H48/03_solved_multiline.out +++ /dev/null @@ -1 +0,0 @@ -UF0 UB0 DB0 DF0 UR0 UL0 DL0 DR0 FR0 FL0 BL0 BR0 UFR0 UBL0 DFL0 DBR0 UFL0 UBR0 DFR0 DBL0 diff --git a/test/010_io_H48/04_unsolvable_ep.in b/test/010_io_H48/04_unsolvable_ep.in deleted file mode 100644 index 8483962..0000000 --- a/test/010_io_H48/04_unsolvable_ep.in +++ /dev/null @@ -1 +0,0 @@ -UB0 UF0 DB0 DF0 UR0 UL0 DL0 DR0 FR0 FL0 BL0 BR0 UFR0 UBL0 DFL0 DBR0 UFL0 UBR0 DFR0 DBL0 diff --git a/test/010_io_H48/04_unsolvable_ep.out b/test/010_io_H48/04_unsolvable_ep.out deleted file mode 100644 index e35c6e4..0000000 --- a/test/010_io_H48/04_unsolvable_ep.out +++ /dev/null @@ -1 +0,0 @@ -Cube is not solvable diff --git a/test/010_io_H48/05_unsolvable_eo.in b/test/010_io_H48/05_unsolvable_eo.in deleted file mode 100644 index a92089d..0000000 --- a/test/010_io_H48/05_unsolvable_eo.in +++ /dev/null @@ -1 +0,0 @@ -UF1 UB0 DB0 DF0 UR0 UL0 DL0 DR0 FR0 FL0 BL0 BR0 UFR0 UBL0 DFL0 DBR0 UFL0 UBR0 DFR0 DBL0 diff --git a/test/010_io_H48/05_unsolvable_eo.out b/test/010_io_H48/05_unsolvable_eo.out deleted file mode 100644 index e35c6e4..0000000 --- a/test/010_io_H48/05_unsolvable_eo.out +++ /dev/null @@ -1 +0,0 @@ -Cube is not solvable diff --git a/test/010_io_H48/06_unsolvable_cp.in b/test/010_io_H48/06_unsolvable_cp.in deleted file mode 100644 index 2085dd5..0000000 --- a/test/010_io_H48/06_unsolvable_cp.in +++ /dev/null @@ -1 +0,0 @@ -UF0 UB0 DB0 DF0 UR0 UL0 DL0 DR0 FR0 FL0 BL0 BR0 UBL0 UFR0 DFL0 DBR0 UFL0 UBR0 DFR0 DBL0 diff --git a/test/010_io_H48/06_unsolvable_cp.out b/test/010_io_H48/06_unsolvable_cp.out deleted file mode 100644 index e35c6e4..0000000 --- a/test/010_io_H48/06_unsolvable_cp.out +++ /dev/null @@ -1 +0,0 @@ -Cube is not solvable diff --git a/test/010_io_H48/07_unsolvable_co.in b/test/010_io_H48/07_unsolvable_co.in deleted file mode 100644 index abd74e2..0000000 --- a/test/010_io_H48/07_unsolvable_co.in +++ /dev/null @@ -1 +0,0 @@ -UF0 UB0 DB0 DF0 UR0 UL0 DL0 DR0 FR0 FL0 BL0 BR0 UFR1 UBL0 DFL0 DBR0 UFL0 UBR0 DFR0 DBL0 diff --git a/test/010_io_H48/07_unsolvable_co.out b/test/010_io_H48/07_unsolvable_co.out deleted file mode 100644 index e35c6e4..0000000 --- a/test/010_io_H48/07_unsolvable_co.out +++ /dev/null @@ -1 +0,0 @@ -Cube is not solvable diff --git a/test/010_io_H48/08_unsolved.in b/test/010_io_H48/08_unsolved.in deleted file mode 100644 index c992ce7..0000000 --- a/test/010_io_H48/08_unsolved.in +++ /dev/null @@ -1,6 +0,0 @@ -UL1 DR0 UB0 DL1 -UR0 FR1 DB0 BR0 -UF1 DF0 BL0 FL0 - -UBL0 DLF1 DBR2 UFR1 -DFR1 UBR1 UFL0 DBL0 diff --git a/test/010_io_H48/08_unsolved.out b/test/010_io_H48/08_unsolved.out deleted file mode 100644 index 8c132cf..0000000 --- a/test/010_io_H48/08_unsolved.out +++ /dev/null @@ -1 +0,0 @@ -UL1 DR0 UB0 DL1 UR0 FR1 DB0 BR0 UF1 DF0 BL0 FL0 UBL0 DFL1 DBR2 UFR1 DFR1 UBR1 UFL0 DBL0 diff --git a/test/010_io_H48/io_H48_tests.c b/test/010_io_H48/io_H48_tests.c deleted file mode 100644 index 7c3978e..0000000 --- a/test/010_io_H48/io_H48_tests.c +++ /dev/null @@ -1,28 +0,0 @@ -#include -#include -#include - -#include "../../src/cube.h" - -#define STRLENMAX 10000 - -int main() { - char *c, str[STRLENMAX]; - cube_t cube; - - for (c = str; (*c = getchar()) != EOF; c++) ; - *c = '\0'; - - cube = readcube(H48, str); - - if (iserror(cube)) { - printf("Error reading cube\n"); - } else if (!issolvable(cube)) { - printf("Cube is not solvable\n"); - } else { - writecube(H48, cube, str); - printf("%s\n", str); - } - - return 0; -} -- cgit v1.3