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/040_compose/compose_tests.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 test/040_compose/compose_tests.c (limited to 'test/040_compose/compose_tests.c') diff --git a/test/040_compose/compose_tests.c b/test/040_compose/compose_tests.c new file mode 100644 index 0000000..a4a5f00 --- /dev/null +++ b/test/040_compose/compose_tests.c @@ -0,0 +1,30 @@ +#include +#include +#include + +#include "../../src/cube.h" + +#define STRLENMAX 10000 + +int main() { + char str[STRLENMAX]; + cube_t c1, c2, c3; + + fgets(str, STRLENMAX, stdin); + c1 = readcube(H48, str); + fgets(str, STRLENMAX, stdin); + c2 = readcube(H48, str); + + c3 = compose(c1, c2); + + if (iserror(c3)) { + printf("Error composing cubes\n"); + } else if (!issolvable(c3)) { + printf("Composed cube is not solvable\n"); + } else { + writecube(H48, c3, str); + printf("%s\n", str); + } + + return 0; +} -- cgit v1.3