aboutsummaryrefslogtreecommitdiff
path: root/test/078_copy_edges
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2025-12-22 18:07:06 +0100
committerSebastiano Tronto <sebastiano@tronto.net>2025-12-22 18:07:06 +0100
commit086a06fe3d84ac8b2e74c824e05f9d23f0b292ab (patch)
tree596034b2283b053e023d0988d875396946b9384d /test/078_copy_edges
parent0c5e4730c699ac006feec4efe25c390977fe372f (diff)
downloadnissy-core-086a06fe3d84ac8b2e74c824e05f9d23f0b292ab.tar.gz
nissy-core-086a06fe3d84ac8b2e74c824e05f9d23f0b292ab.zip
Added tests for copy_co, renamed some tests
Diffstat (limited to 'test/078_copy_edges')
-rw-r--r--test/078_copy_edges/00_solved_scrambled.in2
-rw-r--r--test/078_copy_edges/00_solved_scrambled.out1
-rw-r--r--test/078_copy_edges/copy_edges_tests.c25
3 files changed, 28 insertions, 0 deletions
diff --git a/test/078_copy_edges/00_solved_scrambled.in b/test/078_copy_edges/00_solved_scrambled.in
new file mode 100644
index 0000000..38c1566
--- /dev/null
+++ b/test/078_copy_edges/00_solved_scrambled.in
@@ -0,0 +1,2 @@
1ABCDEFGH=ABCDEFGHIJKL=A
2CILVXGMR=FKbGIDSXBJAU=A
diff --git a/test/078_copy_edges/00_solved_scrambled.out b/test/078_copy_edges/00_solved_scrambled.out
new file mode 100644
index 0000000..0d38603
--- /dev/null
+++ b/test/078_copy_edges/00_solved_scrambled.out
@@ -0,0 +1 @@
ABCDEFGH=FKbGIDSXBJAU=A
diff --git a/test/078_copy_edges/copy_edges_tests.c b/test/078_copy_edges/copy_edges_tests.c
new file mode 100644
index 0000000..f3b0589
--- /dev/null
+++ b/test/078_copy_edges/copy_edges_tests.c
@@ -0,0 +1,25 @@
1#include "../test.h"
2
3void copy_edges(cube_t *, cube_t);
4
5void run(void) {
6 char str[STRLENMAX];
7 oriented_cube_t c1, c2;
8
9 fgets(str, STRLENMAX, stdin);
10 c1 = readcube(str);
11
12 fgets(str, STRLENMAX, stdin);
13 c2 = readcube(str);
14
15 copy_edges(&c1.cube, c2.cube);
16
17 if (iserror(c1)) {
18 printf("Error setting EO\n");
19 } else if (!isconsistent(c1)) {
20 printf("Setting EO resulted in inconsistent cube\n");
21 } else {
22 writecube(c1, NISSY_SIZE_CUBE, str);
23 printf("%s\n", str);
24 }
25}

Generated with cgit - Back to sebastiano.tronto.net