diff options
Diffstat (limited to 'test')
20 files changed, 63 insertions, 64 deletions
diff --git a/test/010_math_permtoindex/permtoindex_tests.c b/test/010_math_permtoindex/permtoindex_tests.c index ff61945..f246ef3 100644 --- a/test/010_math_permtoindex/permtoindex_tests.c +++ b/test/010_math_permtoindex/permtoindex_tests.c | |||
| @@ -1,11 +1,11 @@ | |||
| 1 | #include "../test.h" | 1 | #include "../test.h" |
| 2 | 2 | ||
| 3 | int64_t permtoindex(size_t n, const uint8_t [n]); | 3 | uint64_t permtoindex(size_t n, const uint8_t [n]); |
| 4 | 4 | ||
| 5 | void run(void) { | 5 | void run(void) { |
| 6 | char str[STRLENMAX]; | 6 | char str[STRLENMAX]; |
| 7 | uint8_t a[100]; | 7 | uint8_t a[100]; |
| 8 | int64_t n, i, p; | 8 | uint64_t n, i, p; |
| 9 | 9 | ||
| 10 | fgets(str, STRLENMAX, stdin); | 10 | fgets(str, STRLENMAX, stdin); |
| 11 | n = atoll(str); | 11 | n = atoll(str); |
| @@ -15,5 +15,5 @@ void run(void) { | |||
| 15 | } | 15 | } |
| 16 | 16 | ||
| 17 | p = permtoindex(n, a); | 17 | p = permtoindex(n, a); |
| 18 | printf("%" PRId64 "\n", p); | 18 | printf("%" PRIu64 "\n", p); |
| 19 | } | 19 | } |
diff --git a/test/011_math_indextoperm/indextoperm_tests.c b/test/011_math_indextoperm/indextoperm_tests.c index 87399ef..e83cbad 100644 --- a/test/011_math_indextoperm/indextoperm_tests.c +++ b/test/011_math_indextoperm/indextoperm_tests.c | |||
| @@ -1,11 +1,11 @@ | |||
| 1 | #include "../test.h" | 1 | #include "../test.h" |
| 2 | 2 | ||
| 3 | void indextoperm(int64_t, size_t n, uint8_t [n]); | 3 | void indextoperm(uint64_t, size_t n, uint8_t [n]); |
| 4 | 4 | ||
| 5 | void run(void) { | 5 | void run(void) { |
| 6 | char str[STRLENMAX]; | 6 | char str[STRLENMAX]; |
| 7 | uint8_t a[100]; | 7 | uint8_t a[100]; |
| 8 | int64_t n, p, i; | 8 | uint64_t n, p, i; |
| 9 | 9 | ||
| 10 | fgets(str, STRLENMAX, stdin); | 10 | fgets(str, STRLENMAX, stdin); |
| 11 | n = atoll(str); | 11 | n = atoll(str); |
diff --git a/test/012_math_permsign/permsign_tests.c b/test/012_math_permsign/permsign_tests.c index 0ec22af..5b4daa3 100644 --- a/test/012_math_permsign/permsign_tests.c +++ b/test/012_math_permsign/permsign_tests.c | |||
| @@ -6,7 +6,7 @@ void run(void) { | |||
| 6 | char str[STRLENMAX]; | 6 | char str[STRLENMAX]; |
| 7 | uint8_t a[100]; | 7 | uint8_t a[100]; |
| 8 | int p; | 8 | int p; |
| 9 | int64_t n, i; | 9 | uint64_t n, i; |
| 10 | 10 | ||
| 11 | fgets(str, STRLENMAX, stdin); | 11 | fgets(str, STRLENMAX, stdin); |
| 12 | n = atoll(str); | 12 | n = atoll(str); |
diff --git a/test/013_math_digitstosumzero/digitstosumzero_tests.c b/test/013_math_digitstosumzero/digitstosumzero_tests.c index 795bd9b..5c93083 100644 --- a/test/013_math_digitstosumzero/digitstosumzero_tests.c +++ b/test/013_math_digitstosumzero/digitstosumzero_tests.c | |||
| @@ -1,12 +1,12 @@ | |||
| 1 | #include "../test.h" | 1 | #include "../test.h" |
| 2 | 2 | ||
| 3 | int64_t digitstosumzero(size_t n, uint8_t [n], uint8_t); | 3 | uint64_t digitstosumzero(size_t n, uint8_t [n], uint8_t); |
| 4 | 4 | ||
| 5 | void run(void) { | 5 | void run(void) { |
| 6 | char str[STRLENMAX]; | 6 | char str[STRLENMAX]; |
| 7 | uint8_t i, b, a[100]; | 7 | uint8_t i, b, a[100]; |
| 8 | size_t n; | 8 | size_t n; |
| 9 | int64_t p; | 9 | uint64_t p; |
| 10 | 10 | ||
| 11 | fgets(str, STRLENMAX, stdin); | 11 | fgets(str, STRLENMAX, stdin); |
| 12 | n = atoi(str); | 12 | n = atoi(str); |
| @@ -18,5 +18,5 @@ void run(void) { | |||
| 18 | } | 18 | } |
| 19 | 19 | ||
| 20 | p = digitstosumzero(n, a, b); | 20 | p = digitstosumzero(n, a, b); |
| 21 | printf("%" PRId64 "\n", p); | 21 | printf("%" PRIu64 "\n", p); |
| 22 | } | 22 | } |
diff --git a/test/014_math_sumzerotodigits/sumzerotodigits.c b/test/014_math_sumzerotodigits/sumzerotodigits.c index 19272ea..e8d2814 100644 --- a/test/014_math_sumzerotodigits/sumzerotodigits.c +++ b/test/014_math_sumzerotodigits/sumzerotodigits.c | |||
| @@ -1,11 +1,11 @@ | |||
| 1 | #include "../test.h" | 1 | #include "../test.h" |
| 2 | 2 | ||
| 3 | void sumzerotodigits(int64_t, size_t n, uint8_t, uint8_t [n]); | 3 | void sumzerotodigits(uint64_t, size_t n, uint8_t, uint8_t [n]); |
| 4 | 4 | ||
| 5 | void run(void) { | 5 | void run(void) { |
| 6 | char str[STRLENMAX]; | 6 | char str[STRLENMAX]; |
| 7 | uint8_t i, n, b, a[100]; | 7 | uint8_t i, n, b, a[100]; |
| 8 | int64_t d; | 8 | uint64_t d; |
| 9 | 9 | ||
| 10 | fgets(str, STRLENMAX, stdin); | 10 | fgets(str, STRLENMAX, stdin); |
| 11 | n = atoi(str); | 11 | n = atoi(str); |
diff --git a/test/071_coord_eo/coord_eo_tests.c b/test/071_coord_eo/coord_eo_tests.c index 360720e..be64ed2 100644 --- a/test/071_coord_eo/coord_eo_tests.c +++ b/test/071_coord_eo/coord_eo_tests.c | |||
| @@ -1,16 +1,16 @@ | |||
| 1 | #include "../test.h" | 1 | #include "../test.h" |
| 2 | 2 | ||
| 3 | int64_t coord_eo(cube_t); | 3 | uint64_t coord_eo(cube_t); |
| 4 | 4 | ||
| 5 | void run(void) { | 5 | void run(void) { |
| 6 | char str[STRLENMAX]; | 6 | char str[STRLENMAX]; |
| 7 | oriented_cube_t cube; | 7 | oriented_cube_t cube; |
| 8 | int64_t result; | 8 | uint64_t result; |
| 9 | 9 | ||
| 10 | fgets(str, STRLENMAX, stdin); | 10 | fgets(str, STRLENMAX, stdin); |
| 11 | cube = readcube(str); | 11 | cube = readcube(str); |
| 12 | 12 | ||
| 13 | result = coord_eo(cube.cube); | 13 | result = coord_eo(cube.cube); |
| 14 | 14 | ||
| 15 | printf("%" PRId64 "\n", result); | 15 | printf("%" PRIu64 "\n", result); |
| 16 | } | 16 | } |
diff --git a/test/072_coord_co/coord_co_tests.c b/test/072_coord_co/coord_co_tests.c index 440ad2e..e24f145 100644 --- a/test/072_coord_co/coord_co_tests.c +++ b/test/072_coord_co/coord_co_tests.c | |||
| @@ -1,16 +1,16 @@ | |||
| 1 | #include "../test.h" | 1 | #include "../test.h" |
| 2 | 2 | ||
| 3 | int64_t coord_co(cube_t); | 3 | uint64_t coord_co(cube_t); |
| 4 | 4 | ||
| 5 | void run(void) { | 5 | void run(void) { |
| 6 | char str[STRLENMAX]; | 6 | char str[STRLENMAX]; |
| 7 | oriented_cube_t cube; | 7 | oriented_cube_t cube; |
| 8 | int64_t result; | 8 | uint64_t result; |
| 9 | 9 | ||
| 10 | fgets(str, STRLENMAX, stdin); | 10 | fgets(str, STRLENMAX, stdin); |
| 11 | cube = readcube(str); | 11 | cube = readcube(str); |
| 12 | 12 | ||
| 13 | result = coord_co(cube.cube); | 13 | result = coord_co(cube.cube); |
| 14 | 14 | ||
| 15 | printf("%" PRId64 "\n", result); | 15 | printf("%" PRIu64 "\n", result); |
| 16 | } | 16 | } |
diff --git a/test/073_coord_csep/coord_csep_tests.c b/test/073_coord_csep/coord_csep_tests.c index 21a3b3a..588e469 100644 --- a/test/073_coord_csep/coord_csep_tests.c +++ b/test/073_coord_csep/coord_csep_tests.c | |||
| @@ -1,16 +1,16 @@ | |||
| 1 | #include "../test.h" | 1 | #include "../test.h" |
| 2 | 2 | ||
| 3 | int64_t coord_csep(cube_t); | 3 | uint64_t coord_csep(cube_t); |
| 4 | 4 | ||
| 5 | void run(void) { | 5 | void run(void) { |
| 6 | char str[STRLENMAX]; | 6 | char str[STRLENMAX]; |
| 7 | oriented_cube_t cube; | 7 | oriented_cube_t cube; |
| 8 | int64_t result; | 8 | uint64_t result; |
| 9 | 9 | ||
| 10 | fgets(str, STRLENMAX, stdin); | 10 | fgets(str, STRLENMAX, stdin); |
| 11 | cube = readcube(str); | 11 | cube = readcube(str); |
| 12 | 12 | ||
| 13 | result = coord_csep(cube.cube); | 13 | result = coord_csep(cube.cube); |
| 14 | 14 | ||
| 15 | printf("%" PRId64 "\n", result); | 15 | printf("%" PRIu64 "\n", result); |
| 16 | } | 16 | } |
diff --git a/test/074_coord_esep/coord_esep_tests.c b/test/074_coord_esep/coord_esep_tests.c index 679e1c6..289bdb6 100644 --- a/test/074_coord_esep/coord_esep_tests.c +++ b/test/074_coord_esep/coord_esep_tests.c | |||
| @@ -1,16 +1,16 @@ | |||
| 1 | #include "../test.h" | 1 | #include "../test.h" |
| 2 | 2 | ||
| 3 | int64_t coord_esep(cube_t); | 3 | uint64_t coord_esep(cube_t); |
| 4 | 4 | ||
| 5 | void run(void) { | 5 | void run(void) { |
| 6 | char str[STRLENMAX]; | 6 | char str[STRLENMAX]; |
| 7 | oriented_cube_t cube; | 7 | oriented_cube_t cube; |
| 8 | int64_t result; | 8 | uint64_t result; |
| 9 | 9 | ||
| 10 | fgets(str, STRLENMAX, stdin); | 10 | fgets(str, STRLENMAX, stdin); |
| 11 | cube = readcube(str); | 11 | cube = readcube(str); |
| 12 | 12 | ||
| 13 | result = coord_esep(cube.cube); | 13 | result = coord_esep(cube.cube); |
| 14 | 14 | ||
| 15 | printf("%" PRId64 "\n", result); | 15 | printf("%" PRIu64 "\n", result); |
| 16 | } | 16 | } |
diff --git a/test/075_set_eo/set_eo_tests.c b/test/075_set_eo/set_eo_tests.c index ef2156d..a0ad3fe 100644 --- a/test/075_set_eo/set_eo_tests.c +++ b/test/075_set_eo/set_eo_tests.c | |||
| @@ -1,14 +1,14 @@ | |||
| 1 | #include "../test.h" | 1 | #include "../test.h" |
| 2 | 2 | ||
| 3 | int64_t coord_eo(cube_t); | 3 | uint64_t coord_eo(cube_t); |
| 4 | void set_eo(cube_t *, int64_t); | 4 | void set_eo(cube_t *, uint64_t); |
| 5 | void pieces(cube_t *, uint8_t [static 8], uint8_t [static 12]); | 5 | void pieces(cube_t *, uint8_t [static 8], uint8_t [static 12]); |
| 6 | 6 | ||
| 7 | void run(void) { | 7 | void run(void) { |
| 8 | char str[STRLENMAX]; | 8 | char str[STRLENMAX]; |
| 9 | oriented_cube_t cube; | 9 | oriented_cube_t cube; |
| 10 | uint8_t edge[12], corner[8]; | 10 | uint8_t edge[12], corner[8]; |
| 11 | int64_t eo; | 11 | uint64_t eo; |
| 12 | 12 | ||
| 13 | fgets(str, STRLENMAX, stdin); | 13 | fgets(str, STRLENMAX, stdin); |
| 14 | cube = readcube(str); | 14 | cube = readcube(str); |
diff --git a/test/078_invcoord_esep/invcoord_esep_tests.c b/test/078_invcoord_esep/invcoord_esep_tests.c index 9945e77..16db3a0 100644 --- a/test/078_invcoord_esep/invcoord_esep_tests.c +++ b/test/078_invcoord_esep/invcoord_esep_tests.c | |||
| @@ -1,12 +1,12 @@ | |||
| 1 | #include "../test.h" | 1 | #include "../test.h" |
| 2 | 2 | ||
| 3 | int64_t coord_esep(cube_t); | 3 | uint64_t coord_esep(cube_t); |
| 4 | cube_t invcoord_esep(int64_t); | 4 | cube_t invcoord_esep(uint64_t); |
| 5 | 5 | ||
| 6 | void run(void) { | 6 | void run(void) { |
| 7 | char str[STRLENMAX]; | 7 | char str[STRLENMAX]; |
| 8 | oriented_cube_t cube; | 8 | oriented_cube_t cube; |
| 9 | int64_t i; | 9 | uint64_t i; |
| 10 | 10 | ||
| 11 | fgets(str, STRLENMAX, stdin); | 11 | fgets(str, STRLENMAX, stdin); |
| 12 | cube = readcube(str); | 12 | cube = readcube(str); |
| @@ -15,5 +15,5 @@ void run(void) { | |||
| 15 | cube.cube = invcoord_esep(i); | 15 | cube.cube = invcoord_esep(i); |
| 16 | i = coord_esep(cube.cube); | 16 | i = coord_esep(cube.cube); |
| 17 | 17 | ||
| 18 | printf("%" PRId64 "\n", i); | 18 | printf("%" PRIu64 "\n", i); |
| 19 | } | 19 | } |
diff --git a/test/079_invcoord_co/invcoord_co_tests.c b/test/079_invcoord_co/invcoord_co_tests.c index fcd68d0..dd5853e 100644 --- a/test/079_invcoord_co/invcoord_co_tests.c +++ b/test/079_invcoord_co/invcoord_co_tests.c | |||
| @@ -2,12 +2,12 @@ | |||
| 2 | 2 | ||
| 3 | #define POW_3_7 2187 | 3 | #define POW_3_7 2187 |
| 4 | 4 | ||
| 5 | int64_t coord_co(cube_t); | 5 | uint64_t coord_co(cube_t); |
| 6 | cube_t invcoord_co(int64_t); | 6 | cube_t invcoord_co(uint64_t); |
| 7 | 7 | ||
| 8 | void run(void) { | 8 | void run(void) { |
| 9 | oriented_cube_t cube; | 9 | oriented_cube_t cube; |
| 10 | int64_t coord, coord2; | 10 | uint64_t coord, coord2; |
| 11 | 11 | ||
| 12 | cube.orientation = 0; | 12 | cube.orientation = 0; |
| 13 | 13 | ||
| @@ -26,8 +26,8 @@ void run(void) { | |||
| 26 | 26 | ||
| 27 | coord2 = coord_co(cube.cube); | 27 | coord2 = coord_co(cube.cube); |
| 28 | if (coord != coord2) { | 28 | if (coord != coord2) { |
| 29 | printf("Error: invcoord of %" PRId64 | 29 | printf("Error: invcoord of %" PRIu64 |
| 30 | " returns %" PRId64 "\n", coord, coord2); | 30 | " returns %" PRIu64 "\n", coord, coord2); |
| 31 | return; | 31 | return; |
| 32 | } | 32 | } |
| 33 | } | 33 | } |
diff --git a/test/080_invcoord_cp/invcoord_cp_tests.c b/test/080_invcoord_cp/invcoord_cp_tests.c index 2eb9ae2..7d1e33f 100644 --- a/test/080_invcoord_cp/invcoord_cp_tests.c +++ b/test/080_invcoord_cp/invcoord_cp_tests.c | |||
| @@ -2,12 +2,12 @@ | |||
| 2 | 2 | ||
| 3 | #define FACT_8 40320 | 3 | #define FACT_8 40320 |
| 4 | 4 | ||
| 5 | int64_t coord_cp(cube_t); | 5 | uint64_t coord_cp(cube_t); |
| 6 | cube_t invcoord_cp(int64_t); | 6 | cube_t invcoord_cp(uint64_t); |
| 7 | 7 | ||
| 8 | void run(void) { | 8 | void run(void) { |
| 9 | oriented_cube_t cube; | 9 | oriented_cube_t cube; |
| 10 | int64_t coord, coord2; | 10 | uint64_t coord, coord2; |
| 11 | 11 | ||
| 12 | cube.orientation = 0; | 12 | cube.orientation = 0; |
| 13 | 13 | ||
| @@ -22,8 +22,8 @@ void run(void) { | |||
| 22 | 22 | ||
| 23 | coord2 = coord_cp(cube.cube); | 23 | coord2 = coord_cp(cube.cube); |
| 24 | if (coord != coord2) { | 24 | if (coord != coord2) { |
| 25 | printf("Error: invcoord of %" PRId64 | 25 | printf("Error: invcoord of %" PRIu64 |
| 26 | " returns %" PRId64 "\n", coord, coord2); | 26 | " returns %" PRIu64 "\n", coord, coord2); |
| 27 | return; | 27 | return; |
| 28 | } | 28 | } |
| 29 | } | 29 | } |
diff --git a/test/081_invcoord_epud/invcoord_epud_tests.c b/test/081_invcoord_epud/invcoord_epud_tests.c index bf444cc..6d7672b 100644 --- a/test/081_invcoord_epud/invcoord_epud_tests.c +++ b/test/081_invcoord_epud/invcoord_epud_tests.c | |||
| @@ -2,12 +2,12 @@ | |||
| 2 | 2 | ||
| 3 | #define FACT_8 40320 | 3 | #define FACT_8 40320 |
| 4 | 4 | ||
| 5 | int64_t coord_epud(cube_t); | 5 | uint64_t coord_epud(cube_t); |
| 6 | cube_t invcoord_epud(int64_t); | 6 | cube_t invcoord_epud(uint64_t); |
| 7 | 7 | ||
| 8 | void run(void) { | 8 | void run(void) { |
| 9 | oriented_cube_t cube; | 9 | oriented_cube_t cube; |
| 10 | int64_t coord, coord2; | 10 | uint64_t coord, coord2; |
| 11 | 11 | ||
| 12 | cube.orientation = 0; | 12 | cube.orientation = 0; |
| 13 | 13 | ||
| @@ -22,8 +22,8 @@ void run(void) { | |||
| 22 | 22 | ||
| 23 | coord2 = coord_epud(cube.cube); | 23 | coord2 = coord_epud(cube.cube); |
| 24 | if (coord != coord2) { | 24 | if (coord != coord2) { |
| 25 | printf("Error: invcoord of %" PRId64 | 25 | printf("Error: invcoord of %" PRIu64 |
| 26 | " returns %" PRId64 "\n", coord, coord2); | 26 | " returns %" PRIu64 "\n", coord, coord2); |
| 27 | return; | 27 | return; |
| 28 | } | 28 | } |
| 29 | } | 29 | } |
diff --git a/test/091_getcube/getcube_tests.c b/test/091_getcube/getcube_tests.c index 07e621e..324cbeb 100644 --- a/test/091_getcube/getcube_tests.c +++ b/test/091_getcube/getcube_tests.c | |||
| @@ -1,11 +1,11 @@ | |||
| 1 | #include "../test.h" | 1 | #include "../test.h" |
| 2 | 2 | ||
| 3 | cube_t getcube(int64_t, int64_t, int64_t, int64_t); | 3 | cube_t getcube(uint64_t, uint64_t, uint64_t, uint64_t); |
| 4 | 4 | ||
| 5 | void run(void) { | 5 | void run(void) { |
| 6 | char str[STRLENMAX]; | 6 | char str[STRLENMAX]; |
| 7 | oriented_cube_t cube; | 7 | oriented_cube_t cube; |
| 8 | int64_t ep, eo, cp, co; | 8 | uint64_t ep, eo, cp, co; |
| 9 | 9 | ||
| 10 | fgets(str, STRLENMAX, stdin); | 10 | fgets(str, STRLENMAX, stdin); |
| 11 | ep = atoll(str); | 11 | ep = atoll(str); |
diff --git a/test/111_cocsep_transform_invariant/cocsep_transform_invariant.c b/test/111_cocsep_transform_invariant/cocsep_transform_invariant.c index 5553fd1..5dbfbe1 100644 --- a/test/111_cocsep_transform_invariant/cocsep_transform_invariant.c +++ b/test/111_cocsep_transform_invariant/cocsep_transform_invariant.c | |||
| @@ -2,14 +2,14 @@ | |||
| 2 | 2 | ||
| 3 | size_t gendata_cocsep(unsigned char *, uint64_t *, cube_t *); | 3 | size_t gendata_cocsep(unsigned char *, uint64_t *, cube_t *); |
| 4 | cube_t transform(cube_t, uint8_t); | 4 | cube_t transform(cube_t, uint8_t); |
| 5 | int64_t coord_cocsep(cube_t); | 5 | uint64_t coord_cocsep(cube_t); |
| 6 | 6 | ||
| 7 | void run(void) { | 7 | void run(void) { |
| 8 | uint8_t t; | 8 | uint8_t t; |
| 9 | unsigned char buf[2000000]; | 9 | unsigned char buf[2000000]; |
| 10 | uint32_t *cocsepdata; | 10 | uint32_t *cocsepdata; |
| 11 | uint64_t selfsim[COCSEP_CLASSES]; | 11 | uint64_t selfsim[COCSEP_CLASSES]; |
| 12 | int64_t coord, tcoord; | 12 | uint64_t coord, tcoord; |
| 13 | char str[STRLENMAX]; | 13 | char str[STRLENMAX]; |
| 14 | oriented_cube_t cube; | 14 | oriented_cube_t cube; |
| 15 | cube_t rep[COCSEP_CLASSES], transd; | 15 | cube_t rep[COCSEP_CLASSES], transd; |
| @@ -20,12 +20,12 @@ void run(void) { | |||
| 20 | gendata_cocsep(buf, selfsim, rep); | 20 | gendata_cocsep(buf, selfsim, rep); |
| 21 | cocsepdata = (uint32_t *)((char *)buf + INFOSIZE); | 21 | cocsepdata = (uint32_t *)((char *)buf + INFOSIZE); |
| 22 | 22 | ||
| 23 | coord = (int64_t)COCLASS(cocsepdata[coord_cocsep(cube.cube)]); | 23 | coord = COCLASS(cocsepdata[coord_cocsep(cube.cube)]); |
| 24 | for (t = 0; t < 48; t++) { | 24 | for (t = 0; t < 48; t++) { |
| 25 | transd = transform(cube.cube, t); | 25 | transd = transform(cube.cube, t); |
| 26 | tcoord = (int64_t)COCLASS(cocsepdata[coord_cocsep(transd)]); | 26 | tcoord = COCLASS(cocsepdata[coord_cocsep(transd)]); |
| 27 | if (coord != tcoord) | 27 | if (coord != tcoord) |
| 28 | printf("Error: expected %" PRId64 | 28 | printf("Error: expected %" PRIu64 |
| 29 | " but got %" PRId64 "\n", coord, tcoord); | 29 | " but got %" PRIu64 "\n", coord, tcoord); |
| 30 | } | 30 | } |
| 31 | } | 31 | } |
diff --git a/test/112_cocsep_selfsim/cocsep_selfsim_tests.c b/test/112_cocsep_selfsim/cocsep_selfsim_tests.c index 1a1c6f2..2abe476 100644 --- a/test/112_cocsep_selfsim/cocsep_selfsim_tests.c +++ b/test/112_cocsep_selfsim/cocsep_selfsim_tests.c | |||
| @@ -8,13 +8,13 @@ | |||
| 8 | #include "../test.h" | 8 | #include "../test.h" |
| 9 | 9 | ||
| 10 | size_t gendata_cocsep(unsigned char *, uint64_t *, cube_t *); | 10 | size_t gendata_cocsep(unsigned char *, uint64_t *, cube_t *); |
| 11 | int64_t coord_cocsep(cube_t); | 11 | uint64_t coord_cocsep(cube_t); |
| 12 | 12 | ||
| 13 | void run(void) { | 13 | void run(void) { |
| 14 | char str[STRLENMAX]; | 14 | char str[STRLENMAX]; |
| 15 | unsigned char buf[2000000]; | 15 | unsigned char buf[2000000]; |
| 16 | uint32_t *cocsepdata, data; | 16 | uint32_t *cocsepdata, data; |
| 17 | int64_t coord, coclass; | 17 | uint64_t coord, coclass; |
| 18 | uint64_t selfsim[COCSEP_CLASSES], sim, t; | 18 | uint64_t selfsim[COCSEP_CLASSES], sim, t; |
| 19 | oriented_cube_t cube; | 19 | oriented_cube_t cube; |
| 20 | cube_t rep[COCSEP_CLASSES]; | 20 | cube_t rep[COCSEP_CLASSES]; |
| @@ -32,7 +32,7 @@ void run(void) { | |||
| 32 | sim = selfsim[coclass]; | 32 | sim = selfsim[coclass]; |
| 33 | for (t = 0; t < 48 && sim; t++, sim >>= 1) { | 33 | for (t = 0; t < 48 && sim; t++, sim >>= 1) { |
| 34 | if (sim & 1) | 34 | if (sim & 1) |
| 35 | printf("%" PRId64 " ", t); | 35 | printf("%" PRIu64 " ", t); |
| 36 | } | 36 | } |
| 37 | printf("\n"); | 37 | printf("\n"); |
| 38 | } | 38 | } |
diff --git a/test/113_cocsep_selfsim_distribution/cocsep_selfsim_distribution_tests.c b/test/113_cocsep_selfsim_distribution/cocsep_selfsim_distribution_tests.c index 90208eb..25cd0b6 100644 --- a/test/113_cocsep_selfsim_distribution/cocsep_selfsim_distribution_tests.c +++ b/test/113_cocsep_selfsim_distribution/cocsep_selfsim_distribution_tests.c | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | #include "../test.h" | 1 | #include "../test.h" |
| 2 | 2 | ||
| 3 | size_t gendata_cocsep(unsigned char *, uint64_t *, cube_t *); | 3 | size_t gendata_cocsep(unsigned char *, uint64_t *, cube_t *); |
| 4 | int64_t coord_cocsep(cube_t); | ||
| 5 | 4 | ||
| 6 | int bcount(uint64_t x) { | 5 | int bcount(uint64_t x) { |
| 7 | int ret; | 6 | int ret; |
diff --git a/test/114_cocsep_ttrep/cocsep_ttrep_tests.c b/test/114_cocsep_ttrep/cocsep_ttrep_tests.c index 87975a4..c5c1bb5 100644 --- a/test/114_cocsep_ttrep/cocsep_ttrep_tests.c +++ b/test/114_cocsep_ttrep/cocsep_ttrep_tests.c | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | uint8_t inverse_trans(uint8_t); | 3 | uint8_t inverse_trans(uint8_t); |
| 4 | cube_t transform_corners(cube_t, uint8_t); | 4 | cube_t transform_corners(cube_t, uint8_t); |
| 5 | int64_t coord_cocsep(cube_t); | 5 | uint64_t coord_cocsep(cube_t); |
| 6 | size_t gendata_cocsep(unsigned char *, uint64_t *, cube_t *); | 6 | size_t gendata_cocsep(unsigned char *, uint64_t *, cube_t *); |
| 7 | 7 | ||
| 8 | void run(void) { | 8 | void run(void) { |
| @@ -10,7 +10,7 @@ void run(void) { | |||
| 10 | unsigned char buf[2000000]; | 10 | unsigned char buf[2000000]; |
| 11 | uint32_t *cocsepdata, tt; | 11 | uint32_t *cocsepdata, tt; |
| 12 | uint64_t i, selfsim[COCSEP_CLASSES]; | 12 | uint64_t i, selfsim[COCSEP_CLASSES]; |
| 13 | int64_t j, k, l; | 13 | uint64_t j, k, l; |
| 14 | cube_t rep[COCSEP_CLASSES], c, d; | 14 | cube_t rep[COCSEP_CLASSES], c, d; |
| 15 | 15 | ||
| 16 | gendata_cocsep(buf, selfsim, rep); | 16 | gendata_cocsep(buf, selfsim, rep); |
| @@ -26,8 +26,8 @@ void run(void) { | |||
| 26 | k = coord_cocsep(d); | 26 | k = coord_cocsep(d); |
| 27 | l = coord_cocsep(c); | 27 | l = coord_cocsep(c); |
| 28 | if (k != l) | 28 | if (k != l) |
| 29 | printf("cocsep %" PRId64 " (%" PRId64 "): " | 29 | printf("cocsep %" PRIu64 " (%" PRIu64 "): " |
| 30 | "%" PRId64 " ttrep %" PRIu32 | 30 | "%" PRIu64 " ttrep %" PRIu32 |
| 31 | " -> %" PRId64 "\n", i, l, j, tt, k); | 31 | " -> %" PRId64 "\n", i, l, j, tt, k); |
| 32 | } | 32 | } |
| 33 | } | 33 | } |
diff --git a/test/120_coord_invcoord_h48/coord_invcoord_h48_tests.c b/test/120_coord_invcoord_h48/coord_invcoord_h48_tests.c index 0333f27..b79d31d 100644 --- a/test/120_coord_invcoord_h48/coord_invcoord_h48_tests.c +++ b/test/120_coord_invcoord_h48/coord_invcoord_h48_tests.c | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | #include "../test.h" | 1 | #include "../test.h" |
| 2 | 2 | ||
| 3 | size_t gendata_cocsep(unsigned char *, uint64_t *, cube_t *); | 3 | size_t gendata_cocsep(unsigned char *, uint64_t *, cube_t *); |
| 4 | int64_t coord_h48(cube_t, const uint32_t *, uint8_t); | 4 | uint64_t coord_h48(cube_t, const uint32_t *, uint8_t); |
| 5 | cube_t invcoord_h48(int64_t, const cube_t *, uint8_t); | 5 | cube_t invcoord_h48(uint64_t, const cube_t *, uint8_t); |
| 6 | cube_t transform(cube_t, uint8_t); | 6 | cube_t transform(cube_t, uint8_t); |
| 7 | 7 | ||
| 8 | void run(void) { | 8 | void run(void) { |
| @@ -13,7 +13,7 @@ void run(void) { | |||
| 13 | unsigned char buf[2000000]; | 13 | unsigned char buf[2000000]; |
| 14 | uint32_t *cocsepdata; | 14 | uint32_t *cocsepdata; |
| 15 | uint64_t selfsim[COCSEP_CLASSES]; | 15 | uint64_t selfsim[COCSEP_CLASSES]; |
| 16 | int64_t c, cc; | 16 | uint64_t c, cc; |
| 17 | oriented_cube_t cube; | 17 | oriented_cube_t cube; |
| 18 | cube_t invc, rep[COCSEP_CLASSES]; | 18 | cube_t invc, rep[COCSEP_CLASSES]; |
| 19 | 19 | ||
