From 80ec600701aae54350679bbf5e0ce874c915506e Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Sun, 29 Oct 2023 10:29:27 +0100 Subject: AVX2 compiles, fails all tests; + some renaming --- test/050_transform/transform_tests.c | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 test/050_transform/transform_tests.c (limited to 'test/050_transform/transform_tests.c') diff --git a/test/050_transform/transform_tests.c b/test/050_transform/transform_tests.c new file mode 100644 index 0000000..1e49037 --- /dev/null +++ b/test/050_transform/transform_tests.c @@ -0,0 +1,37 @@ +#include +#include +#include + +#include "../../src/cube.h" + +#define STRLENMAX 10000 + +int main() { + char str[STRLENMAX]; + trans_t t; + cube_t cube; + + fgets(str, STRLENMAX, stdin); + t = readtrans(str); + + if (t == errortrans) { + printf("Error reading trans\n"); + return 1; + } + + fgets(str, STRLENMAX, stdin); + cube = readcube(H48, str); + + cube = transform(cube, t); + + if (iserror(cube)) { + printf("Error transforming cube\n"); + } else if (!issolvable(cube)) { + printf("Transformed cube is not solvable\n"); + } else { + writecube(H48, cube, str); + printf("%s\n", str); + } + + return 0; +} -- cgit v1.3