diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2024-05-17 17:42:43 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2024-05-17 17:42:43 +0200 |
| commit | 1809d7b212128fcdcb481002a17db5dc97a15e03 (patch) | |
| tree | 4e045b4fefc5e229969891b0e1963dd683bd46ad /test/076_copy_corners | |
| parent | d26d9e46d305b3ab3c6ae3b55f1859cf413a1c94 (diff) | |
| download | nissy-core-1809d7b212128fcdcb481002a17db5dc97a15e03.tar.gz nissy-core-1809d7b212128fcdcb481002a17db5dc97a15e03.zip | |
Added inverse eo and copy_{edges,corners}
Diffstat (limited to 'test/076_copy_corners')
| -rw-r--r-- | test/076_copy_corners/00_solved_scrambled.in | 2 | ||||
| -rw-r--r-- | test/076_copy_corners/00_solved_scrambled.out | 1 | ||||
| -rw-r--r-- | test/076_copy_corners/copy_corners_tests.c | 33 |
3 files changed, 36 insertions, 0 deletions
diff --git a/test/076_copy_corners/00_solved_scrambled.in b/test/076_copy_corners/00_solved_scrambled.in new file mode 100644 index 0000000..2ff0e6a --- /dev/null +++ b/test/076_copy_corners/00_solved_scrambled.in | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | UF0 UB0 DB0 DF0 UR0 UL0 DL0 DR0 FR0 FL0 BL0 BR0 UFR0 UBL0 DFL0 DBR0 UFL0 UBR0 DFR0 DBL0 | ||
| 2 | UL0 BL0 BR1 DL0 FR0 DF0 DB1 DR1 UB0 FL0 UF0 UR1 DFL0 UFR1 DBR1 UBR2 DBL2 DFR0 UFL1 UBL2 | ||
diff --git a/test/076_copy_corners/00_solved_scrambled.out b/test/076_copy_corners/00_solved_scrambled.out new file mode 100644 index 0000000..9c53bcc --- /dev/null +++ b/test/076_copy_corners/00_solved_scrambled.out | |||
| @@ -0,0 +1 @@ | |||
| UF0 UB0 DB0 DF0 UR0 UL0 DL0 DR0 FR0 FL0 BL0 BR0 DFL0 UFR1 DBR1 UBR2 DBL2 DFR0 UFL1 UBL2 | |||
diff --git a/test/076_copy_corners/copy_corners_tests.c b/test/076_copy_corners/copy_corners_tests.c new file mode 100644 index 0000000..fecf14a --- /dev/null +++ b/test/076_copy_corners/copy_corners_tests.c | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | #include "../test.h" | ||
| 2 | |||
| 3 | void copy_corners_fast(cube_fast_t *, cube_fast_t); | ||
| 4 | cube_fast_t cubetofast(cube_t); | ||
| 5 | cube_t fasttocube(cube_fast_t); | ||
| 6 | |||
| 7 | int main(void) { | ||
| 8 | char str[STRLENMAX]; | ||
| 9 | cube_t c1, c2; | ||
| 10 | cube_fast_t f1, f2; | ||
| 11 | |||
| 12 | fgets(str, STRLENMAX, stdin); | ||
| 13 | c1 = readcube("H48", str); | ||
| 14 | f1 = cubetofast(c1); | ||
| 15 | |||
| 16 | fgets(str, STRLENMAX, stdin); | ||
| 17 | c2 = readcube("H48", str); | ||
| 18 | f2 = cubetofast(c2); | ||
| 19 | |||
| 20 | copy_corners_fast(&f1, f2); | ||
| 21 | |||
| 22 | c1 = fasttocube(f1); | ||
| 23 | if (iserror(c1)) { | ||
| 24 | printf("Error setting EO\n"); | ||
| 25 | } else if (!isconsistent(c1)) { | ||
| 26 | printf("Setting EO resulted in inconsistent cube\n"); | ||
| 27 | } else { | ||
| 28 | writecube("H48", c1, str); | ||
| 29 | printf("%s\n", str); | ||
| 30 | } | ||
| 31 | |||
| 32 | return 0; | ||
| 33 | } | ||
