diff options
Diffstat (limited to 'test/05_transform/transform_tests.c')
| -rw-r--r-- | test/05_transform/transform_tests.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/test/05_transform/transform_tests.c b/test/05_transform/transform_tests.c deleted file mode 100644 index 1e49037..0000000 --- a/test/05_transform/transform_tests.c +++ /dev/null | |||
| @@ -1,37 +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 str[STRLENMAX]; | ||
| 11 | trans_t t; | ||
| 12 | cube_t cube; | ||
| 13 | |||
| 14 | fgets(str, STRLENMAX, stdin); | ||
| 15 | t = readtrans(str); | ||
| 16 | |||
| 17 | if (t == errortrans) { | ||
| 18 | printf("Error reading trans\n"); | ||
| 19 | return 1; | ||
| 20 | } | ||
| 21 | |||
| 22 | fgets(str, STRLENMAX, stdin); | ||
| 23 | cube = readcube(H48, str); | ||
| 24 | |||
| 25 | cube = transform(cube, t); | ||
| 26 | |||
| 27 | if (iserror(cube)) { | ||
| 28 | printf("Error transforming cube\n"); | ||
| 29 | } else if (!issolvable(cube)) { | ||
| 30 | printf("Transformed cube is not solvable\n"); | ||
| 31 | } else { | ||
| 32 | writecube(H48, cube, str); | ||
| 33 | printf("%s\n", str); | ||
| 34 | } | ||
| 35 | |||
| 36 | return 0; | ||
| 37 | } | ||
