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/023_io_LST_write/io_LST_tests.c | 24 ------------------------ test/023_io_LST_write/io_LST_write_tests.c | 24 ++++++++++++++++++++++++ 2 files changed, 24 insertions(+), 24 deletions(-) delete mode 100644 test/023_io_LST_write/io_LST_tests.c create mode 100644 test/023_io_LST_write/io_LST_write_tests.c (limited to 'test/023_io_LST_write') diff --git a/test/023_io_LST_write/io_LST_tests.c b/test/023_io_LST_write/io_LST_tests.c deleted file mode 100644 index df35632..0000000 --- a/test/023_io_LST_write/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("H48", str); - - if (iserror(cube)) { - printf("Error reading cube\n"); - } else if (!issolvable(cube)) { - printf("Cube is not solvable\n"); - } else { - writecube("LST", cube, str); - printf("%s\n", str); - } - - return 0; -} diff --git a/test/023_io_LST_write/io_LST_write_tests.c b/test/023_io_LST_write/io_LST_write_tests.c new file mode 100644 index 0000000..df35632 --- /dev/null +++ b/test/023_io_LST_write/io_LST_write_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("H48", str); + + if (iserror(cube)) { + printf("Error reading cube\n"); + } else if (!issolvable(cube)) { + printf("Cube is not solvable\n"); + } else { + writecube("LST", cube, str); + printf("%s\n", str); + } + + return 0; +} -- cgit v1.3