diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2024-05-27 12:04:53 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2024-05-27 12:04:53 +0200 |
| commit | 49b9c4a516f72e03d53277075f4580e2df8f0e63 (patch) | |
| tree | dea68649391d14d63a96e742b450c59681ac4305 /test | |
| parent | fde8dfa9df8df1e3d42a9a8840836e33817cd498 (diff) | |
| download | nissy-core-49b9c4a516f72e03d53277075f4580e2df8f0e63.tar.gz nissy-core-49b9c4a516f72e03d53277075f4580e2df8f0e63.zip | |
Some type fixes and some cleanup
Diffstat (limited to 'test')
| -rw-r--r-- | test/075_set_eo/set_eo_tests.c | 6 | ||||
| -rw-r--r-- | test/100_gendata_cocsep/gendata_cocsep_tests.c | 2 | ||||
| -rw-r--r-- | test/101_cocsep_selfsim/cocsep_selfsim_tests.c | 8 | ||||
| -rw-r--r-- | test/102_coord_invcoord_h48/00_all.in (renamed from test/101_coord_invcoord_h48/00_all.in) | 0 | ||||
| -rw-r--r-- | test/102_coord_invcoord_h48/00_all.out (renamed from test/101_coord_invcoord_h48/00_all.out) | 0 | ||||
| -rw-r--r-- | test/102_coord_invcoord_h48/coord_invcoord_h48_tests.c (renamed from test/101_coord_invcoord_h48/coord_invcoord_h48_tests.c) | 2 | ||||
| -rw-r--r-- | test/103_gendata_h48/00_h_0.in (renamed from test/102_gendata_h48/00_h_0.in) | 0 | ||||
| -rw-r--r-- | test/103_gendata_h48/00_h_0.out (renamed from test/102_gendata_h48/00_h_0.out) | 0 | ||||
| -rw-r--r-- | test/103_gendata_h48/01_h_1.in (renamed from test/102_gendata_h48/01_h_1.in) | 0 | ||||
| -rw-r--r-- | test/103_gendata_h48/01_h_1.out (renamed from test/102_gendata_h48/01_h_1.out) | 0 | ||||
| -rw-r--r-- | test/103_gendata_h48/gendata_h48_tests.c (renamed from test/102_gendata_h48/gendata_h48_tests.c) | 2 |
11 files changed, 11 insertions, 9 deletions
diff --git a/test/075_set_eo/set_eo_tests.c b/test/075_set_eo/set_eo_tests.c index 08c8ae8..cd4868c 100644 --- a/test/075_set_eo/set_eo_tests.c +++ b/test/075_set_eo/set_eo_tests.c | |||
| @@ -22,9 +22,11 @@ int main(void) { | |||
| 22 | printf("Error setting EO\n"); | 22 | printf("Error setting EO\n"); |
| 23 | } else if (!isconsistent(cube)) { | 23 | } else if (!isconsistent(cube)) { |
| 24 | fprintf(stderr, "edges: "); | 24 | fprintf(stderr, "edges: "); |
| 25 | for (int i = 0; i < 12; i++) fprintf(stderr, "%d ", cube.edge[i]); | 25 | for (int i = 0; i < 12; i++) |
| 26 | fprintf(stderr, "%d ", cube.edge[i]); | ||
| 26 | fprintf(stderr, "\n"); | 27 | fprintf(stderr, "\n"); |
| 27 | for (int i = 0; i < 8; i++) fprintf(stderr, "%d ", cube.corner[i]); | 28 | for (int i = 0; i < 8; i++) |
| 29 | fprintf(stderr, "%d ", cube.corner[i]); | ||
| 28 | fprintf(stderr, "\n"); | 30 | fprintf(stderr, "\n"); |
| 29 | printf("Setting EO resulted in inconsistent cube\n"); | 31 | printf("Setting EO resulted in inconsistent cube\n"); |
| 30 | } else { | 32 | } else { |
diff --git a/test/100_gendata_cocsep/gendata_cocsep_tests.c b/test/100_gendata_cocsep/gendata_cocsep_tests.c index 4e0dce5..bba261b 100644 --- a/test/100_gendata_cocsep/gendata_cocsep_tests.c +++ b/test/100_gendata_cocsep/gendata_cocsep_tests.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | #include "../test.h" | 1 | #include "../test.h" |
| 2 | 2 | ||
| 3 | #define COCSEP_CLASSES 3393U | 3 | #define COCSEP_CLASSES 3393 |
| 4 | 4 | ||
| 5 | size_t gendata_cocsep(void *, uint64_t *, cube_fast_t *); | 5 | size_t gendata_cocsep(void *, uint64_t *, cube_fast_t *); |
| 6 | 6 | ||
diff --git a/test/101_cocsep_selfsim/cocsep_selfsim_tests.c b/test/101_cocsep_selfsim/cocsep_selfsim_tests.c index 3fc7a60..02b5377 100644 --- a/test/101_cocsep_selfsim/cocsep_selfsim_tests.c +++ b/test/101_cocsep_selfsim/cocsep_selfsim_tests.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | */ | 7 | */ |
| 8 | #include "../test.h" | 8 | #include "../test.h" |
| 9 | 9 | ||
| 10 | #define COCSEP_CLASSES 3393U | 10 | #define COCSEP_CLASSES 3393 |
| 11 | 11 | ||
| 12 | size_t gendata_cocsep(void *, uint64_t *, cube_fast_t *); | 12 | size_t gendata_cocsep(void *, uint64_t *, cube_fast_t *); |
| 13 | int64_t coord_fast_cocsep(cube_fast_t); | 13 | int64_t coord_fast_cocsep(cube_fast_t); |
| @@ -27,10 +27,10 @@ int main(void) { | |||
| 27 | fast = cubetofast(readcube("H48", str)); | 27 | fast = cubetofast(readcube("H48", str)); |
| 28 | coord = coord_fast_cocsep(fast); | 28 | coord = coord_fast_cocsep(fast); |
| 29 | data = buf[coord]; | 29 | data = buf[coord]; |
| 30 | coclass = (data & (0xFFFU << 16U)) >> 16U; | 30 | coclass = (data & (0xFFFU << 16)) >> 16; |
| 31 | sim = selfsim[coclass]; | 31 | sim = selfsim[coclass]; |
| 32 | for (t = 0; t < 48 && sim; t++, sim >>= 1ULL) { | 32 | for (t = 0; t < 48 && sim; t++, sim >>= 1) { |
| 33 | if (sim & 1ULL) | 33 | if (sim & 1) |
| 34 | printf("%" PRId64 " ", t); | 34 | printf("%" PRId64 " ", t); |
| 35 | } | 35 | } |
| 36 | printf("\n"); | 36 | printf("\n"); |
diff --git a/test/101_coord_invcoord_h48/00_all.in b/test/102_coord_invcoord_h48/00_all.in index a2f9540..a2f9540 100644 --- a/test/101_coord_invcoord_h48/00_all.in +++ b/test/102_coord_invcoord_h48/00_all.in | |||
diff --git a/test/101_coord_invcoord_h48/00_all.out b/test/102_coord_invcoord_h48/00_all.out index e84be4b..e84be4b 100644 --- a/test/101_coord_invcoord_h48/00_all.out +++ b/test/102_coord_invcoord_h48/00_all.out | |||
diff --git a/test/101_coord_invcoord_h48/coord_invcoord_h48_tests.c b/test/102_coord_invcoord_h48/coord_invcoord_h48_tests.c index e7858df..5022608 100644 --- a/test/101_coord_invcoord_h48/coord_invcoord_h48_tests.c +++ b/test/102_coord_invcoord_h48/coord_invcoord_h48_tests.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | #include "../test.h" | 1 | #include "../test.h" |
| 2 | 2 | ||
| 3 | #define COCSEP_CLASSES 3393U | 3 | #define COCSEP_CLASSES 3393 |
| 4 | 4 | ||
| 5 | size_t gendata_cocsep(void *, uint64_t *, cube_fast_t *); | 5 | size_t gendata_cocsep(void *, uint64_t *, cube_fast_t *); |
| 6 | int64_t coord_h48(cube_fast_t, const uint32_t *, uint8_t); | 6 | int64_t coord_h48(cube_fast_t, const uint32_t *, uint8_t); |
diff --git a/test/102_gendata_h48/00_h_0.in b/test/103_gendata_h48/00_h_0.in index 573541a..573541a 100644 --- a/test/102_gendata_h48/00_h_0.in +++ b/test/103_gendata_h48/00_h_0.in | |||
diff --git a/test/102_gendata_h48/00_h_0.out b/test/103_gendata_h48/00_h_0.out index db6e121..db6e121 100644 --- a/test/102_gendata_h48/00_h_0.out +++ b/test/103_gendata_h48/00_h_0.out | |||
diff --git a/test/102_gendata_h48/01_h_1.in b/test/103_gendata_h48/01_h_1.in index d00491f..d00491f 100644 --- a/test/102_gendata_h48/01_h_1.in +++ b/test/103_gendata_h48/01_h_1.in | |||
diff --git a/test/102_gendata_h48/01_h_1.out b/test/103_gendata_h48/01_h_1.out index 456305d..456305d 100644 --- a/test/102_gendata_h48/01_h_1.out +++ b/test/103_gendata_h48/01_h_1.out | |||
diff --git a/test/102_gendata_h48/gendata_h48_tests.c b/test/103_gendata_h48/gendata_h48_tests.c index 9d96e75..f0910cc 100644 --- a/test/102_gendata_h48/gendata_h48_tests.c +++ b/test/103_gendata_h48/gendata_h48_tests.c | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | #define MAXDEPTH 5 | 3 | #define MAXDEPTH 5 |
| 4 | #define COCSEPSIZE 1119792 | 4 | #define COCSEPSIZE 1119792 |
| 5 | #define ETABLESIZE(h) (((3393 * 495 * 70) >> 1) << (h)) | 5 | #define ETABLESIZE(h) (((3393 * 495 * 70) >> 1) << (size_t)(h)) |
| 6 | 6 | ||
| 7 | size_t gendata_h48(void *, uint8_t, uint8_t); | 7 | size_t gendata_h48(void *, uint8_t, uint8_t); |
| 8 | 8 | ||
