From 832ad3dcf3818e57c53304ea9b09a943e785a16b Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Mon, 10 Jun 2024 19:26:47 +0200 Subject: Added tests for B32 --- test/024_io_LST_read/io_LST_read_tests.c | 24 ++++++++++++++++++++++++ test/024_io_LST_read/io_LST_tests.c | 24 ------------------------ 2 files changed, 24 insertions(+), 24 deletions(-) create mode 100644 test/024_io_LST_read/io_LST_read_tests.c delete mode 100644 test/024_io_LST_read/io_LST_tests.c (limited to 'test/024_io_LST_read') diff --git a/test/024_io_LST_read/io_LST_read_tests.c b/test/024_io_LST_read/io_LST_read_tests.c new file mode 100644 index 0000000..506a23d --- /dev/null +++ b/test/024_io_LST_read/io_LST_read_tests.c @@ -0,0 +1,24 @@ +#include "../test.h" + +int main(void) { + char str[STRLENMAX], *aux; + cube_t cube; + + aux = str; + while (fgets(aux, STRLENMAX, stdin) != NULL) + while (*aux != '\n') + aux++; + + cube = readcube("LST", str); + + if (iserror(cube)) { + printf("Error reading cube\n"); + } else if (!issolvable(cube)) { + printf("Cube is not solvable\n"); + } else { + writecube("H48", cube, str); + printf("%s\n", str); + } + + return 0; +} diff --git a/test/024_io_LST_read/io_LST_tests.c b/test/024_io_LST_read/io_LST_tests.c deleted file mode 100644 index 506a23d..0000000 --- a/test/024_io_LST_read/io_LST_tests.c +++ /dev/null @@ -1,24 +0,0 @@ -#include "../test.h" - -int main(void) { - char str[STRLENMAX], *aux; - cube_t cube; - - aux = str; - while (fgets(aux, STRLENMAX, stdin) != NULL) - while (*aux != '\n') - aux++; - - cube = readcube("LST", str); - - if (iserror(cube)) { - printf("Error reading cube\n"); - } else if (!issolvable(cube)) { - printf("Cube is not solvable\n"); - } else { - writecube("H48", cube, str); - printf("%s\n", str); - } - - return 0; -} -- cgit v1.3