diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2024-06-09 12:43:49 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2024-06-09 12:43:49 +0200 |
| commit | c5c5017a335208881e27fc8f72c1d0145a04622a (patch) | |
| tree | 7a1518e5b05f3fbde810fa3080c41099ba7d5ae8 /test/075_set_eo | |
| parent | 28ad019d62583b7e89b4e76922aa73857d5876eb (diff) | |
| download | nissy-core-c5c5017a335208881e27fc8f72c1d0145a04622a.tar.gz nissy-core-c5c5017a335208881e27fc8f72c1d0145a04622a.zip | |
Remvoed cube_fast_t and more. More cleaning up to do.
Diffstat (limited to 'test/075_set_eo')
| -rw-r--r-- | test/075_set_eo/set_eo_tests.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/075_set_eo/set_eo_tests.c b/test/075_set_eo/set_eo_tests.c index cd4868c..9c01a50 100644 --- a/test/075_set_eo/set_eo_tests.c +++ b/test/075_set_eo/set_eo_tests.c | |||
| @@ -1,32 +1,32 @@ | |||
| 1 | #include "../test.h" | 1 | #include "../test.h" |
| 2 | 2 | ||
| 3 | int64_t coord_fast_eo(cube_fast_t); | 3 | int64_t coord_eo(cube_t); |
| 4 | void set_eo_fast(cube_fast_t *, int64_t); | 4 | void set_eo(cube_t *, int64_t); |
| 5 | void pieces(cube_t *, uint8_t [static 8], uint8_t [static 12]); | ||
| 5 | 6 | ||
| 6 | int main(void) { | 7 | int main(void) { |
| 7 | char str[STRLENMAX]; | 8 | char str[STRLENMAX]; |
| 8 | cube_t cube; | 9 | cube_t cube; |
| 9 | cube_fast_t fast; | 10 | uint8_t edge[12], corner[8]; |
| 10 | int64_t eo; | 11 | int64_t eo; |
| 11 | 12 | ||
| 12 | fgets(str, STRLENMAX, stdin); | 13 | fgets(str, STRLENMAX, stdin); |
| 13 | cube = readcube("H48", str); | 14 | cube = readcube("H48", str); |
| 14 | fast = cubetofast(cube); | ||
| 15 | fgets(str, STRLENMAX, stdin); | 15 | fgets(str, STRLENMAX, stdin); |
| 16 | eo = atoi(str); | 16 | eo = atoi(str); |
| 17 | 17 | ||
| 18 | set_eo_fast(&fast, eo); | 18 | set_eo(&cube, eo); |
| 19 | 19 | ||
| 20 | cube = fasttocube(fast); | ||
| 21 | if (iserror(cube)) { | 20 | if (iserror(cube)) { |
| 22 | printf("Error setting EO\n"); | 21 | printf("Error setting EO\n"); |
| 23 | } else if (!isconsistent(cube)) { | 22 | } else if (!isconsistent(cube)) { |
| 23 | pieces(&cube, corner, edge); | ||
| 24 | fprintf(stderr, "edges: "); | 24 | fprintf(stderr, "edges: "); |
| 25 | for (int i = 0; i < 12; i++) | 25 | for (int i = 0; i < 12; i++) |
| 26 | fprintf(stderr, "%d ", cube.edge[i]); | 26 | fprintf(stderr, "%d ", edge[i]); |
| 27 | fprintf(stderr, "\n"); | 27 | fprintf(stderr, "\n"); |
| 28 | for (int i = 0; i < 8; i++) | 28 | for (int i = 0; i < 8; i++) |
| 29 | fprintf(stderr, "%d ", cube.corner[i]); | 29 | fprintf(stderr, "%d ", corner[i]); |
| 30 | fprintf(stderr, "\n"); | 30 | fprintf(stderr, "\n"); |
| 31 | printf("Setting EO resulted in inconsistent cube\n"); | 31 | printf("Setting EO resulted in inconsistent cube\n"); |
| 32 | } else { | 32 | } else { |
