From e0f38c7e42d9e48ac654f9dcedf8722ff1136106 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Tue, 14 Nov 2023 22:18:45 +0100 Subject: Renamed tests, added tests for permsign --- test/050_compose/compose_tests.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 test/050_compose/compose_tests.c (limited to 'test/050_compose/compose_tests.c') diff --git a/test/050_compose/compose_tests.c b/test/050_compose/compose_tests.c new file mode 100644 index 0000000..d28b225 --- /dev/null +++ b/test/050_compose/compose_tests.c @@ -0,0 +1,26 @@ +#include "../test.h" + +cube_t compose(cube_t, cube_t); + +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