aboutsummaryrefslogtreecommitdiff
path: root/test/081_getcube
diff options
context:
space:
mode:
Diffstat (limited to 'test/081_getcube')
-rw-r--r--test/081_getcube/00_solved_0.in4
-rw-r--r--test/081_getcube/00_solved_0.out1
-rw-r--r--test/081_getcube/02_scrambled.in4
-rw-r--r--test/081_getcube/02_scrambled.out1
-rw-r--r--test/081_getcube/getcube_tests.c29
5 files changed, 39 insertions, 0 deletions
diff --git a/test/081_getcube/00_solved_0.in b/test/081_getcube/00_solved_0.in
new file mode 100644
index 0000000..44e0be8
--- /dev/null
+++ b/test/081_getcube/00_solved_0.in
@@ -0,0 +1,4 @@
10
20
30
40
diff --git a/test/081_getcube/00_solved_0.out b/test/081_getcube/00_solved_0.out
new file mode 100644
index 0000000..dff224d
--- /dev/null
+++ b/test/081_getcube/00_solved_0.out
@@ -0,0 +1 @@
UF0 UB0 DB0 DF0 UR0 UL0 DL0 DR0 FR0 FL0 BL0 BR0 UFR0 UBL0 DFL0 DBR0 UFL0 UBR0 DFR0 DBL0
diff --git a/test/081_getcube/02_scrambled.in b/test/081_getcube/02_scrambled.in
new file mode 100644
index 0000000..b24bfbf
--- /dev/null
+++ b/test/081_getcube/02_scrambled.in
@@ -0,0 +1,4 @@
1367124500
2450
330807
4562
diff --git a/test/081_getcube/02_scrambled.out b/test/081_getcube/02_scrambled.out
new file mode 100644
index 0000000..6a05bbc
--- /dev/null
+++ b/test/081_getcube/02_scrambled.out
@@ -0,0 +1 @@
FL0 DB0 UB1 FR0 UR0 DF0 UF0 BR1 UL1 BL1 DL0 DR0 DFR1 UFR1 UBR1 UFL2 DBR2 DFL0 DBL2 UBL0
diff --git a/test/081_getcube/getcube_tests.c b/test/081_getcube/getcube_tests.c
new file mode 100644
index 0000000..7eb59dc
--- /dev/null
+++ b/test/081_getcube/getcube_tests.c
@@ -0,0 +1,29 @@
1#include "../test.h"
2
3cube_t getcube(int64_t, int64_t, int64_t, int64_t);
4
5void run(void) {
6 char str[STRLENMAX];
7 cube_t cube;
8 int64_t ep, eo, cp, co;
9
10 fgets(str, STRLENMAX, stdin);
11 ep = atoll(str);
12 fgets(str, STRLENMAX, stdin);
13 eo = atoll(str);
14 fgets(str, STRLENMAX, stdin);
15 cp = atoll(str);
16 fgets(str, STRLENMAX, stdin);
17 co = atoll(str);
18
19 cube = getcube(ep, eo, cp, co);
20
21 if (iserror(cube)) {
22 printf("Error cube\n");
23 } else if (!isconsistent(cube)) {
24 printf("Inconsistent cube\n");
25 } else {
26 writecube("H48", cube, str);
27 printf("%s\n", str);
28 }
29}

Generated with cgit - Back to sebastiano.tronto.net