From 1809d7b212128fcdcb481002a17db5dc97a15e03 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Fri, 17 May 2024 17:42:43 +0200 Subject: Added inverse eo and copy_{edges,corners} --- test/077_copy_edges/copy_edges_tests.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 test/077_copy_edges/copy_edges_tests.c (limited to 'test/077_copy_edges/copy_edges_tests.c') 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 @@ +#include "../test.h" + +void copy_edges_fast(cube_fast_t *, cube_fast_t); +cube_fast_t cubetofast(cube_t); +cube_t fasttocube(cube_fast_t); + +int main(void) { + char str[STRLENMAX]; + cube_t c1, c2; + cube_fast_t f1, f2; + + fgets(str, STRLENMAX, stdin); + c1 = readcube("H48", str); + f1 = cubetofast(c1); + + fgets(str, STRLENMAX, stdin); + c2 = readcube("H48", str); + f2 = cubetofast(c2); + + copy_edges_fast(&f1, f2); + + c1 = fasttocube(f1); + if (iserror(c1)) { + printf("Error setting EO\n"); + } else if (!isconsistent(c1)) { + printf("Setting EO resulted in inconsistent cube\n"); + } else { + writecube("H48", c1, str); + printf("%s\n", str); + } + + return 0; +} -- cgit v1.3