aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/021_io_SRC_write/01_solved.out4
-rw-r--r--test/021_io_SRC_write/02_scrambled.out4
-rw-r--r--test/023_io_LST_write/io_LST_tests.c7
-rw-r--r--test/024_io_LST_read/01_solved.in1
-rw-r--r--test/024_io_LST_read/01_solved.out (renamed from test/021_io_SRC_write/01_solved.in)0
-rw-r--r--test/024_io_LST_read/02_scrambled.in1
-rw-r--r--test/024_io_LST_read/02_scrambled.out (renamed from test/021_io_SRC_write/02_scrambled.in)0
-rw-r--r--test/024_io_LST_read/io_LST_tests.c (renamed from test/021_io_SRC_write/io_SRC_tests.c)4
8 files changed, 4 insertions, 17 deletions
diff --git a/test/021_io_SRC_write/01_solved.out b/test/021_io_SRC_write/01_solved.out
deleted file mode 100644
index 3c21bcc..0000000
--- a/test/021_io_SRC_write/01_solved.out
+++ /dev/null
@@ -1,4 +0,0 @@
1{
2 .corner = {0, 1, 2, 3, 4, 5, 6, 7},
3 .edge = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}
4}
diff --git a/test/021_io_SRC_write/02_scrambled.out b/test/021_io_SRC_write/02_scrambled.out
deleted file mode 100644
index b899386..0000000
--- a/test/021_io_SRC_write/02_scrambled.out
+++ /dev/null
@@ -1,4 +0,0 @@
1{
2 .corner = {38, 32, 37, 68, 67, 2, 71, 1},
3 .edge = {9, 2, 17, 8, 4, 3, 0, 27, 21, 26, 6, 7}
4}
diff --git a/test/023_io_LST_write/io_LST_tests.c b/test/023_io_LST_write/io_LST_tests.c
index 45cc203..df35632 100644
--- a/test/023_io_LST_write/io_LST_tests.c
+++ b/test/023_io_LST_write/io_LST_tests.c
@@ -1,12 +1,5 @@
1#include "../test.h" 1#include "../test.h"
2 2
3#define STRLENMAX 10000
4
5bool iserror(cube_t);
6bool issolvable(cube_t);
7cube_t readcube(char *, char *);
8void writecube(char *, cube_t, char *);
9
10int main(void) { 3int main(void) {
11 char str[STRLENMAX], *aux; 4 char str[STRLENMAX], *aux;
12 cube_t cube; 5 cube_t cube;
diff --git a/test/024_io_LST_read/01_solved.in b/test/024_io_LST_read/01_solved.in
new file mode 100644
index 0000000..c5b394b
--- /dev/null
+++ b/test/024_io_LST_read/01_solved.in
@@ -0,0 +1 @@
0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
diff --git a/test/021_io_SRC_write/01_solved.in b/test/024_io_LST_read/01_solved.out
index dff224d..dff224d 100644
--- a/test/021_io_SRC_write/01_solved.in
+++ b/test/024_io_LST_read/01_solved.out
diff --git a/test/024_io_LST_read/02_scrambled.in b/test/024_io_LST_read/02_scrambled.in
new file mode 100644
index 0000000..9fcb603
--- /dev/null
+++ b/test/024_io_LST_read/02_scrambled.in
@@ -0,0 +1 @@
38, 32, 37, 68, 67, 2, 71, 1, 9, 2, 17, 8, 4, 3, 0, 27, 21, 26, 6, 7
diff --git a/test/021_io_SRC_write/02_scrambled.in b/test/024_io_LST_read/02_scrambled.out
index 6a05bbc..6a05bbc 100644
--- a/test/021_io_SRC_write/02_scrambled.in
+++ b/test/024_io_LST_read/02_scrambled.out
diff --git a/test/021_io_SRC_write/io_SRC_tests.c b/test/024_io_LST_read/io_LST_tests.c
index c427c6c..506a23d 100644
--- a/test/021_io_SRC_write/io_SRC_tests.c
+++ b/test/024_io_LST_read/io_LST_tests.c
@@ -9,14 +9,14 @@ int main(void) {
9 while (*aux != '\n') 9 while (*aux != '\n')
10 aux++; 10 aux++;
11 11
12 cube = readcube("H48", str); 12 cube = readcube("LST", str);
13 13
14 if (iserror(cube)) { 14 if (iserror(cube)) {
15 printf("Error reading cube\n"); 15 printf("Error reading cube\n");
16 } else if (!issolvable(cube)) { 16 } else if (!issolvable(cube)) {
17 printf("Cube is not solvable\n"); 17 printf("Cube is not solvable\n");
18 } else { 18 } else {
19 writecube("SRC", cube, str); 19 writecube("H48", cube, str);
20 printf("%s\n", str); 20 printf("%s\n", str);
21 } 21 }
22 22

Generated with cgit - Back to sebastiano.tronto.net