aboutsummaryrefslogtreecommitdiff
path: root/test/077_copy_edges/copy_edges_tests.c
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/copy_edges_tests.c
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/copy_edges_tests.c')
-rw-r--r--test/077_copy_edges/copy_edges_tests.c33
1 files changed, 33 insertions, 0 deletions
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