aboutsummaryrefslogtreecommitdiff
path: root/test/077_copy_edges/copy_edges_tests.c
blob: b428f89a611195bca84a2588a357d5fcd599528b (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
26
27
28
29
30
31
#include "../test.h"

void copy_edges_fast(cube_fast_t *, 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;
}

Generated with cgit - Back to sebastiano.tronto.net