From a2456477f573330bdcb18d974e157da2613e95bf Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Mon, 6 Apr 2026 10:27:05 +0100 Subject: Fix tests for Microsoft's broken compiler --- test/010_math_permtoindex/permtoindex_tests.c | 2 +- test/011_math_indextoperm/indextoperm_tests.c | 2 +- test/012_math_permsign/permsign_tests.c | 2 +- test/013_math_digitstosumzero/digitstosumzero_tests.c | 2 +- test/014_math_sumzerotodigits/sumzerotodigits.c | 2 +- test/033_inverse_move/inverse_move_tests.c | 2 +- test/062_transform_move/transform_move_tests.c | 2 +- test/090_allowedmoves/allowedmoves_tests.c | 2 +- test/140_appendsolution/appendsolution_tests.c | 4 ++-- 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 @@ #include "../test.h" -uint64_t permtoindex(size_t n, const uint8_t [n]); +uint64_t permtoindex(size_t n, const uint8_t *); void run(void) { 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 @@ #include "../test.h" -void indextoperm(uint64_t, size_t n, uint8_t [n]); +void indextoperm(uint64_t, size_t n, uint8_t *); void run(void) { 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 @@ #include "../test.h" -int permsign(size_t n, const uint8_t [n]); +int permsign(size_t n, const uint8_t *); void run(void) { 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 @@ #include "../test.h" -uint64_t digitstosumzero(size_t n, uint8_t [n], uint8_t); +uint64_t digitstosumzero(size_t n, uint8_t *, uint8_t); void run(void) { 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 @@ #include "../test.h" -void sumzerotodigits(uint64_t, size_t n, uint8_t, uint8_t [n]); +void sumzerotodigits(uint64_t, size_t n, uint8_t, uint8_t *); void run(void) { 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 @@ extern char *movestr[]; int64_t readmoves(const char *, size_t n, size_t m, - size_t *, size_t *, uint8_t [n], uint8_t [m]); + size_t *, size_t *, uint8_t *, uint8_t *); uint8_t inverse_move(uint8_t); 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 @@ cube_t applytrans(cube_t, const char *); uint8_t transform_move(uint8_t, uint8_t); int64_t readmoves(const char *, size_t n, size_t m, - size_t *, size_t *, uint8_t [n], uint8_t [m]); + size_t *, size_t *, uint8_t *, uint8_t *); oriented_cube_t move_extended(oriented_cube_t, uint8_t); oriented_cube_t applymoves(oriented_cube_t, const char *); 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 @@ #include "../test.h" -bool allowedmoves(size_t n, const uint8_t [n]); +bool allowedmoves(size_t n, const uint8_t *); static char *moves[] = { "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. uint8_t readtrans(const char [NISSY_SIZE_TRANSFORMATION]); int64_t readmoves(const char *, size_t n, size_t m, - size_t *, size_t *, uint8_t [n], uint8_t [m]); + size_t *, size_t *, uint8_t *, uint8_t *); void solution_moves_reset(solution_moves_t [NON_NULL]); -bool solution_list_init(solution_list_t [NON_NULL], size_t n, char [n]); +bool solution_list_init(solution_list_t [NON_NULL], size_t n, char *); int64_t appendsolution(const solution_moves_t [NON_NULL], size_t, const uint64_t *, const solution_settings_t [NON_NULL], 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); bool issolvable(oriented_cube_t); bool issolved(oriented_cube_t); oriented_cube_t readcube(char *); -int64_t writecube(oriented_cube_t, size_t n, char [n]); +int64_t writecube(oriented_cube_t, size_t n, char *); /* Test function to be implemented by all tests */ void run(void); -- cgit v1.3