aboutsummaryrefslogtreecommitdiff
path: root/test/077_copy_edges/copy_edges_tests.c
blob: 50778615cfac00ad0fa40e74cc0860e9720c4ceb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include "../test.h"

void copy_edges(cube_t *, cube_t);

void run(void) {
	char str[STRLENMAX];
	cube_t c1, c2;

	fgets(str, STRLENMAX, stdin);
	c1 = readcube("H48", str);

	fgets(str, STRLENMAX, stdin);
	c2 = readcube("H48", str);

	copy_edges(&c1, c2);

	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);
	}
}

Generated with cgit - Back to sebastiano.tronto.net