diff options
Diffstat (limited to 'test/078_copy_edges/copy_edges_tests.c')
| -rw-r--r-- | test/078_copy_edges/copy_edges_tests.c | 25 |
1 files changed, 25 insertions, 0 deletions
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 | |||
| 3 | void copy_edges(cube_t *, cube_t); | ||
| 4 | |||
| 5 | void 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 | } | ||
