diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2026-04-06 10:27:05 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2026-04-06 10:27:05 +0100 |
| commit | a2456477f573330bdcb18d974e157da2613e95bf (patch) | |
| tree | 6f5a5b882dccfb37a88f31abace2062028823ff5 | |
| parent | a3f814c63b9422d596931f3e1319d025158df843 (diff) | |
| download | nissy-core-a2456477f573330bdcb18d974e157da2613e95bf.tar.gz nissy-core-a2456477f573330bdcb18d974e157da2613e95bf.zip | |
Fix tests for Microsoft's broken compiler
| -rw-r--r-- | test/010_math_permtoindex/permtoindex_tests.c | 2 | ||||
| -rw-r--r-- | test/011_math_indextoperm/indextoperm_tests.c | 2 | ||||
| -rw-r--r-- | test/012_math_permsign/permsign_tests.c | 2 | ||||
| -rw-r--r-- | test/013_math_digitstosumzero/digitstosumzero_tests.c | 2 | ||||
| -rw-r--r-- | test/014_math_sumzerotodigits/sumzerotodigits.c | 2 | ||||
| -rw-r--r-- | test/033_inverse_move/inverse_move_tests.c | 2 | ||||
| -rw-r--r-- | test/062_transform_move/transform_move_tests.c | 2 | ||||
| -rw-r--r-- | test/090_allowedmoves/allowedmoves_tests.c | 2 | ||||
| -rw-r--r-- | test/140_appendsolution/appendsolution_tests.c | 4 | ||||
| -rw-r--r-- | test/test.h | 2 |
10 files changed, 11 insertions, 11 deletions
diff --git a/test/010_math_permtoindex/permtoindex_tests.c b/test/010_math_permtoindex/permtoindex_tests.c index f246ef3..383150d 100644 --- a/test/010_math_permtoindex/permtoindex_tests.c +++ b/test/010_math_permtoindex/permtoindex_tests.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | #include "../test.h" | 1 | #include "../test.h" |
| 2 | 2 | ||
| 3 | uint64_t permtoindex(size_t n, const uint8_t [n]); | 3 | uint64_t permtoindex(size_t n, const uint8_t *); |
| 4 | 4 | ||
| 5 | void run(void) { | 5 | void run(void) { |
| 6 | char str[STRLENMAX]; | 6 | char str[STRLENMAX]; |
diff --git a/test/011_math_indextoperm/indextoperm_tests.c b/test/011_math_indextoperm/indextoperm_tests.c index e83cbad..1464d7b 100644 --- a/test/011_math_indextoperm/indextoperm_tests.c +++ b/test/011_math_indextoperm/indextoperm_tests.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | #include "../test.h" | 1 | #include "../test.h" |
| 2 | 2 | ||
| 3 | void indextoperm(uint64_t, size_t n, uint8_t [n]); | 3 | void indextoperm(uint64_t, size_t n, uint8_t *); |
| 4 | 4 | ||
| 5 | void run(void) { | 5 | void run(void) { |
| 6 | char str[STRLENMAX]; | 6 | char str[STRLENMAX]; |
diff --git a/test/012_math_permsign/permsign_tests.c b/test/012_math_permsign/permsign_tests.c index 5b4daa3..8c652b5 100644 --- a/test/012_math_permsign/permsign_tests.c +++ b/test/012_math_permsign/permsign_tests.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | #include "../test.h" | 1 | #include "../test.h" |
| 2 | 2 | ||
| 3 | int permsign(size_t n, const uint8_t [n]); | 3 | int permsign(size_t n, const uint8_t *); |
| 4 | 4 | ||
| 5 | void run(void) { | 5 | void run(void) { |
| 6 | char str[STRLENMAX]; | 6 | char str[STRLENMAX]; |
diff --git a/test/013_math_digitstosumzero/digitstosumzero_tests.c b/test/013_math_digitstosumzero/digitstosumzero_tests.c index 5c93083..ced466a 100644 --- a/test/013_math_digitstosumzero/digitstosumzero_tests.c +++ b/test/013_math_digitstosumzero/digitstosumzero_tests.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | #include "../test.h" | 1 | #include "../test.h" |
| 2 | 2 | ||
| 3 | uint64_t digitstosumzero(size_t n, uint8_t [n], uint8_t); | 3 | uint64_t digitstosumzero(size_t n, uint8_t *, uint8_t); |
| 4 | 4 | ||
| 5 | void run(void) { | 5 | void run(void) { |
| 6 | char str[STRLENMAX]; | 6 | char str[STRLENMAX]; |
diff --git a/test/014_math_sumzerotodigits/sumzerotodigits.c b/test/014_math_sumzerotodigits/sumzerotodigits.c index e8d2814..401d157 100644 --- a/test/014_math_sumzerotodigits/sumzerotodigits.c +++ b/test/014_math_sumzerotodigits/sumzerotodigits.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | #include "../test.h" | 1 | #include "../test.h" |
| 2 | 2 | ||
| 3 | void sumzerotodigits(uint64_t, size_t n, uint8_t, uint8_t [n]); | 3 | void sumzerotodigits(uint64_t, size_t n, uint8_t, uint8_t *); |
| 4 | 4 | ||
| 5 | void run(void) { | 5 | void run(void) { |
| 6 | char str[STRLENMAX]; | 6 | char str[STRLENMAX]; |
diff --git a/test/033_inverse_move/inverse_move_tests.c b/test/033_inverse_move/inverse_move_tests.c index 5453f83..86bf741 100644 --- a/test/033_inverse_move/inverse_move_tests.c +++ b/test/033_inverse_move/inverse_move_tests.c | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | extern char *movestr[]; | 3 | extern char *movestr[]; |
| 4 | 4 | ||
| 5 | int64_t readmoves(const char *, size_t n, size_t m, | 5 | int64_t readmoves(const char *, size_t n, size_t m, |
| 6 | size_t *, size_t *, uint8_t [n], uint8_t [m]); | 6 | size_t *, size_t *, uint8_t *, uint8_t *); |
| 7 | uint8_t inverse_move(uint8_t); | 7 | uint8_t inverse_move(uint8_t); |
| 8 | 8 | ||
| 9 | void run(void) { | 9 | void run(void) { |
diff --git a/test/062_transform_move/transform_move_tests.c b/test/062_transform_move/transform_move_tests.c index 0810672..a9beb60 100644 --- a/test/062_transform_move/transform_move_tests.c +++ b/test/062_transform_move/transform_move_tests.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | cube_t applytrans(cube_t, const char *); | 5 | cube_t applytrans(cube_t, const char *); |
| 6 | uint8_t transform_move(uint8_t, uint8_t); | 6 | uint8_t transform_move(uint8_t, uint8_t); |
| 7 | int64_t readmoves(const char *, size_t n, size_t m, | 7 | int64_t readmoves(const char *, size_t n, size_t m, |
| 8 | size_t *, size_t *, uint8_t [n], uint8_t [m]); | 8 | size_t *, size_t *, uint8_t *, uint8_t *); |
| 9 | oriented_cube_t move_extended(oriented_cube_t, uint8_t); | 9 | oriented_cube_t move_extended(oriented_cube_t, uint8_t); |
| 10 | oriented_cube_t applymoves(oriented_cube_t, const char *); | 10 | oriented_cube_t applymoves(oriented_cube_t, const char *); |
| 11 | uint8_t readtrans(const char[SIZE(NISSY_SIZE_TRANSFORMATION)]); | 11 | uint8_t readtrans(const char[SIZE(NISSY_SIZE_TRANSFORMATION)]); |
diff --git a/test/090_allowedmoves/allowedmoves_tests.c b/test/090_allowedmoves/allowedmoves_tests.c index aa6bda7..6bc0e33 100644 --- a/test/090_allowedmoves/allowedmoves_tests.c +++ b/test/090_allowedmoves/allowedmoves_tests.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | #include "../test.h" | 1 | #include "../test.h" |
| 2 | 2 | ||
| 3 | bool allowedmoves(size_t n, const uint8_t [n]); | 3 | bool allowedmoves(size_t n, const uint8_t *); |
| 4 | 4 | ||
| 5 | static char *moves[] = { | 5 | static char *moves[] = { |
| 6 | "U", "U2", "U'", | 6 | "U", "U2", "U'", |
diff --git a/test/140_appendsolution/appendsolution_tests.c b/test/140_appendsolution/appendsolution_tests.c index 483c208..9f9e9f4 100644 --- a/test/140_appendsolution/appendsolution_tests.c +++ b/test/140_appendsolution/appendsolution_tests.c | |||
| @@ -16,9 +16,9 @@ See below for the output format. | |||
| 16 | 16 | ||
| 17 | uint8_t readtrans(const char [NISSY_SIZE_TRANSFORMATION]); | 17 | uint8_t readtrans(const char [NISSY_SIZE_TRANSFORMATION]); |
| 18 | int64_t readmoves(const char *, size_t n, size_t m, | 18 | int64_t readmoves(const char *, size_t n, size_t m, |
| 19 | size_t *, size_t *, uint8_t [n], uint8_t [m]); | 19 | size_t *, size_t *, uint8_t *, uint8_t *); |
| 20 | void solution_moves_reset(solution_moves_t [NON_NULL]); | 20 | void solution_moves_reset(solution_moves_t [NON_NULL]); |
| 21 | bool solution_list_init(solution_list_t [NON_NULL], size_t n, char [n]); | 21 | bool solution_list_init(solution_list_t [NON_NULL], size_t n, char *); |
| 22 | int64_t appendsolution(const solution_moves_t [NON_NULL], | 22 | int64_t appendsolution(const solution_moves_t [NON_NULL], |
| 23 | size_t, const uint64_t *, const solution_settings_t [NON_NULL], | 23 | size_t, const uint64_t *, const solution_settings_t [NON_NULL], |
| 24 | solution_list_t [NON_NULL]); | 24 | solution_list_t [NON_NULL]); |
diff --git a/test/test.h b/test/test.h index 3408130..b8c5922 100644 --- a/test/test.h +++ b/test/test.h | |||
| @@ -28,7 +28,7 @@ bool isconsistent(oriented_cube_t); | |||
| 28 | bool issolvable(oriented_cube_t); | 28 | bool issolvable(oriented_cube_t); |
| 29 | bool issolved(oriented_cube_t); | 29 | bool issolved(oriented_cube_t); |
| 30 | oriented_cube_t readcube(char *); | 30 | oriented_cube_t readcube(char *); |
| 31 | int64_t writecube(oriented_cube_t, size_t n, char [n]); | 31 | int64_t writecube(oriented_cube_t, size_t n, char *); |
| 32 | 32 | ||
| 33 | /* Test function to be implemented by all tests */ | 33 | /* Test function to be implemented by all tests */ |
| 34 | void run(void); | 34 | void run(void); |
