aboutsummaryrefslogtreecommitdiff
path: root/test/01_io/io_tests.c
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2023-10-08 14:04:11 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2023-10-08 14:04:11 +0200
commit2edc8c01fba711f4410279b59c784a43cf2dde41 (patch)
tree67d6404c4f768ad8b1b4e4916e3b9af9f892a7aa /test/01_io/io_tests.c
parent9ef630eefb683dcdbe56e96e51b10bf356f20505 (diff)
downloadnissy-core-2edc8c01fba711f4410279b59c784a43cf2dde41.tar.gz
nissy-core-2edc8c01fba711f4410279b59c784a43cf2dde41.zip
Added write to SRC format
Diffstat (limited to 'test/01_io/io_tests.c')
-rw-r--r--test/01_io/io_tests.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/test/01_io/io_tests.c b/test/01_io/io_tests.c
deleted file mode 100644
index 913ec1d..0000000
--- a/test/01_io/io_tests.c
+++ /dev/null
@@ -1,28 +0,0 @@
1#include <stdbool.h>
2#include <stdint.h>
3#include <stdio.h>
4
5#include "../../src/cube.h"
6
7#define STRLENMAX 10000
8
9int main() {
10 char *c, str[STRLENMAX];
11 cube_t cube;
12
13 for (c = str; (*c = getchar()) != EOF; c++) ;
14 *c = '\0';
15
16 cube = readcube(str);
17
18 if (iserror(cube)) {
19 printf("Error reading cube\n");
20 } else if (!issolvable(cube)) {
21 printf("Cube is not solvable\n");
22 } else {
23 writecube(cube, str);
24 printf("%s\n", str);
25 }
26
27 return 0;
28}

Generated with cgit - Back to sebastiano.tronto.net