aboutsummaryrefslogtreecommitdiff
path: root/test/077_copy_edges
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2024-05-17 17:42:43 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2024-05-17 17:42:43 +0200
commit1809d7b212128fcdcb481002a17db5dc97a15e03 (patch)
tree4e045b4fefc5e229969891b0e1963dd683bd46ad /test/077_copy_edges
parentd26d9e46d305b3ab3c6ae3b55f1859cf413a1c94 (diff)
downloadnissy-core-1809d7b212128fcdcb481002a17db5dc97a15e03.tar.gz
nissy-core-1809d7b212128fcdcb481002a17db5dc97a15e03.zip
Added inverse eo and copy_{edges,corners}
Diffstat (limited to 'test/077_copy_edges')
-rw-r--r--test/077_copy_edges/00_solved_scrambled.in2
-rw-r--r--test/077_copy_edges/00_solved_scrambled.out1
-rw-r--r--test/077_copy_edges/copy_edges_tests.c33
3 files changed, 36 insertions, 0 deletions
diff --git a/test/077_copy_edges/00_solved_scrambled.in b/test/077_copy_edges/00_solved_scrambled.in
new file mode 100644
index 0000000..2ff0e6a
--- /dev/null
+++ b/test/077_copy_edges/00_solved_scrambled.in
@@ -0,0 +1,2 @@
1UF0 UB0 DB0 DF0 UR0 UL0 DL0 DR0 FR0 FL0 BL0 BR0 UFR0 UBL0 DFL0 DBR0 UFL0 UBR0 DFR0 DBL0
2UL0 BL0 BR1 DL0 FR0 DF0 DB1 DR1 UB0 FL0 UF0 UR1 DFL0 UFR1 DBR1 UBR2 DBL2 DFR0 UFL1 UBL2
diff --git a/test/077_copy_edges/00_solved_scrambled.out b/test/077_copy_edges/00_solved_scrambled.out
new file mode 100644
index 0000000..3af84f4
--- /dev/null
+++ b/test/077_copy_edges/00_solved_scrambled.out
@@ -0,0 +1 @@
UL0 BL0 BR1 DL0 FR0 DF0 DB1 DR1 UB0 FL0 UF0 UR1 UFR0 UBL0 DFL0 DBR0 UFL0 UBR0 DFR0 DBL0
diff --git a/test/077_copy_edges/copy_edges_tests.c b/test/077_copy_edges/copy_edges_tests.c
new file mode 100644
index 0000000..c3e70a3
--- /dev/null
+++ b/test/077_copy_edges/copy_edges_tests.c
@@ -0,0 +1,33 @@
1#include "../test.h"
2
3void copy_edges_fast(cube_fast_t *, cube_fast_t);
4cube_fast_t cubetofast(cube_t);
5cube_t fasttocube(cube_fast_t);
6
7int main(void) {
8 char str[STRLENMAX];
9 cube_t c1, c2;
10 cube_fast_t f1, f2;
11
12 fgets(str, STRLENMAX, stdin);
13 c1 = readcube("H48", str);
14 f1 = cubetofast(c1);
15
16 fgets(str, STRLENMAX, stdin);
17 c2 = readcube("H48", str);
18 f2 = cubetofast(c2);
19
20 copy_edges_fast(&f1, f2);
21
22 c1 = fasttocube(f1);
23 if (iserror(c1)) {
24 printf("Error setting EO\n");
25 } else if (!isconsistent(c1)) {
26 printf("Setting EO resulted in inconsistent cube\n");
27 } else {
28 writecube("H48", c1, str);
29 printf("%s\n", str);
30 }
31
32 return 0;
33}

Generated with cgit - Back to sebastiano.tronto.net