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/060_transform/transform_tests.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 test/060_transform/transform_tests.c (limited to 'test/060_transform/transform_tests.c') diff --git a/test/060_transform/transform_tests.c b/test/060_transform/transform_tests.c new file mode 100644 index 0000000..c1bc5af --- /dev/null +++ b/test/060_transform/transform_tests.c @@ -0,0 +1,25 @@ +#include "../test.h" + +cube_t applytrans(cube_t, char *); + +int main() { + char cubestr[STRLENMAX], transtr[STRLENMAX]; + cube_t cube; + + fgets(transtr, STRLENMAX, stdin); + fgets(cubestr, STRLENMAX, stdin); + cube = readcube("H48", cubestr); + + cube = applytrans(cube, transtr); + + if (iserror(cube)) { + printf("Error transforming cube\n"); + } else if (!issolvable(cube)) { + printf("Transformed cube is not solvable\n"); + } else { + writecube("H48", cube, cubestr); + printf("%s\n", cubestr); + } + + return 0; +} -- cgit v1.3