aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/001_pieces/pieces_tests.c2
-rw-r--r--test/010_math_permtoindex/permtoindex_tests.c2
-rw-r--r--test/011_math_indextoperm/indextoperm_tests.c2
-rw-r--r--test/012_math_permsign/permsign_tests.c2
-rw-r--r--test/013_math_digitstosumzero/digitstosumzero_tests.c2
-rw-r--r--test/014_math_sumzerotodigits/sumzerotodigits.c2
-rw-r--r--test/033_inverse_move/inverse_move_tests.c2
-rw-r--r--test/061_inverse_trans/inverse_trans_tests.c2
-rw-r--r--test/062_transform_move/transform_move_tests.c4
-rw-r--r--test/075_set_eo/set_eo_tests.c2
-rw-r--r--test/076_copy_co/copy_co_tests.c2
-rw-r--r--test/090_allowedmoves/allowedmoves_tests.c2
-rw-r--r--test/115_gendata_eoesep/gendata_eoesep_tests.c2
-rw-r--r--test/121_h48map/h48map_tests.c10
-rw-r--r--test/122_gendata_h48short/gendata_h48short_tests.c8
-rw-r--r--test/140_appendsolution/appendsolution_tests.c12
-rw-r--r--test/test.h3
17 files changed, 31 insertions, 30 deletions
diff --git a/test/001_pieces/pieces_tests.c b/test/001_pieces/pieces_tests.c
index f46a143..7937fb1 100644
--- a/test/001_pieces/pieces_tests.c
+++ b/test/001_pieces/pieces_tests.c
@@ -1,6 +1,6 @@
1#include "../test.h" 1#include "../test.h"
2 2
3void pieces(cube_t *, uint8_t [static 8], uint8_t [static 12]); 3void pieces(cube_t *, uint8_t [SIZE(8)], uint8_t [SIZE(12)]);
4 4
5void run(void) { 5void run(void) {
6 int i; 6 int i;
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
3uint64_t permtoindex(size_t n, const uint8_t [n]); 3uint64_t permtoindex(size_t n, const uint8_t *);
4 4
5void run(void) { 5void 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
3void indextoperm(uint64_t, size_t n, uint8_t [n]); 3void indextoperm(uint64_t, size_t n, uint8_t *);
4 4
5void run(void) { 5void 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
3int permsign(size_t n, const uint8_t [n]); 3int permsign(size_t n, const uint8_t *);
4 4
5void run(void) { 5void 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
3uint64_t digitstosumzero(size_t n, uint8_t [n], uint8_t); 3uint64_t digitstosumzero(size_t n, uint8_t *, uint8_t);
4 4
5void run(void) { 5void 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
3void sumzerotodigits(uint64_t, size_t n, uint8_t, uint8_t [n]); 3void sumzerotodigits(uint64_t, size_t n, uint8_t, uint8_t *);
4 4
5void run(void) { 5void 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 @@
3extern char *movestr[]; 3extern char *movestr[];
4 4
5int64_t readmoves(const char *, size_t n, size_t m, 5int64_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 *);
7uint8_t inverse_move(uint8_t); 7uint8_t inverse_move(uint8_t);
8 8
9void run(void) { 9void run(void) {
diff --git a/test/061_inverse_trans/inverse_trans_tests.c b/test/061_inverse_trans/inverse_trans_tests.c
index bad39fa..bb2a271 100644
--- a/test/061_inverse_trans/inverse_trans_tests.c
+++ b/test/061_inverse_trans/inverse_trans_tests.c
@@ -1,6 +1,6 @@
1#include "../test.h" 1#include "../test.h"
2 2
3uint8_t readtrans(char [static NISSY_SIZE_TRANSFORMATION]); 3uint8_t readtrans(char [SIZE(NISSY_SIZE_TRANSFORMATION)]);
4uint8_t inverse_trans(uint8_t); 4uint8_t inverse_trans(uint8_t);
5oriented_cube_t applymoves(oriented_cube_t, char *); 5oriented_cube_t applymoves(oriented_cube_t, char *);
6oriented_cube_t applytrans(oriented_cube_t, char *); 6oriented_cube_t applytrans(oriented_cube_t, char *);
diff --git a/test/062_transform_move/transform_move_tests.c b/test/062_transform_move/transform_move_tests.c
index 218c6a1..a9beb60 100644
--- a/test/062_transform_move/transform_move_tests.c
+++ b/test/062_transform_move/transform_move_tests.c
@@ -5,10 +5,10 @@
5cube_t applytrans(cube_t, const char *); 5cube_t applytrans(cube_t, const char *);
6uint8_t transform_move(uint8_t, uint8_t); 6uint8_t transform_move(uint8_t, uint8_t);
7int64_t readmoves(const char *, size_t n, size_t m, 7int64_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 *);
9oriented_cube_t move_extended(oriented_cube_t, uint8_t); 9oriented_cube_t move_extended(oriented_cube_t, uint8_t);
10oriented_cube_t applymoves(oriented_cube_t, const char *); 10oriented_cube_t applymoves(oriented_cube_t, const char *);
11uint8_t readtrans(const char[static NISSY_SIZE_TRANSFORMATION]); 11uint8_t readtrans(const char[SIZE(NISSY_SIZE_TRANSFORMATION)]);
12 12
13void run(void) { 13void run(void) {
14 char movestr[STRLENMAX], transtr[STRLENMAX], cubestr[STRLENMAX]; 14 char movestr[STRLENMAX], transtr[STRLENMAX], cubestr[STRLENMAX];
diff --git a/test/075_set_eo/set_eo_tests.c b/test/075_set_eo/set_eo_tests.c
index a0ad3fe..0ce22e0 100644
--- a/test/075_set_eo/set_eo_tests.c
+++ b/test/075_set_eo/set_eo_tests.c
@@ -2,7 +2,7 @@
2 2
3uint64_t coord_eo(cube_t); 3uint64_t coord_eo(cube_t);
4void set_eo(cube_t *, uint64_t); 4void set_eo(cube_t *, uint64_t);
5void pieces(cube_t *, uint8_t [static 8], uint8_t [static 12]); 5void pieces(cube_t *, uint8_t [SIZE(8)], uint8_t [SIZE(12)]);
6 6
7void run(void) { 7void run(void) {
8 char str[STRLENMAX]; 8 char str[STRLENMAX];
diff --git a/test/076_copy_co/copy_co_tests.c b/test/076_copy_co/copy_co_tests.c
index 3ca109b..4127022 100644
--- a/test/076_copy_co/copy_co_tests.c
+++ b/test/076_copy_co/copy_co_tests.c
@@ -1,7 +1,7 @@
1#include "../test.h" 1#include "../test.h"
2 2
3void copy_co(cube_t *, cube_t); 3void copy_co(cube_t *, cube_t);
4void pieces(cube_t *, uint8_t [static 8], uint8_t [static 12]); 4void pieces(cube_t *, uint8_t [SIZE(8)], uint8_t [SIZE(12)]);
5 5
6void run(void) { 6void run(void) {
7 char str[STRLENMAX]; 7 char str[STRLENMAX];
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
3bool allowedmoves(size_t n, const uint8_t [n]); 3bool allowedmoves(size_t n, const uint8_t *);
4 4
5static char *moves[] = { 5static char *moves[] = {
6 "U", "U2", "U'", 6 "U", "U2", "U'",
diff --git a/test/115_gendata_eoesep/gendata_eoesep_tests.c b/test/115_gendata_eoesep/gendata_eoesep_tests.c
index 7ed9778..76de323 100644
--- a/test/115_gendata_eoesep/gendata_eoesep_tests.c
+++ b/test/115_gendata_eoesep/gendata_eoesep_tests.c
@@ -25,7 +25,7 @@ The test does not generate the full table. For reference, these are the values:
25 25
26unsigned char buf[FULLSIZE]; 26unsigned char buf[FULLSIZE];
27 27
28size_t gendata_eoesep(unsigned char [static FULLSIZE], uint8_t); 28size_t gendata_eoesep(unsigned char [SIZE(FULLSIZE)], uint8_t);
29int64_t readtableinfo(size_t, const unsigned char *, tableinfo_t *); 29int64_t readtableinfo(size_t, const unsigned char *, tableinfo_t *);
30 30
31void run(void) { 31void run(void) {
diff --git a/test/121_h48map/h48map_tests.c b/test/121_h48map/h48map_tests.c
index 927b157..e06c395 100644
--- a/test/121_h48map/h48map_tests.c
+++ b/test/121_h48map/h48map_tests.c
@@ -2,11 +2,11 @@
2 2
3#define MAXPOS 1000 3#define MAXPOS 1000
4 4
5void h48map_create(h48map_t [static 1], uint64_t, uint64_t); 5void h48map_create(h48map_t [NON_NULL], uint64_t, uint64_t);
6void h48map_destroy(h48map_t [static 1]); 6void h48map_destroy(h48map_t [NON_NULL]);
7void h48map_insertmin(h48map_t [static 1], uint64_t, uint64_t); 7void h48map_insertmin(h48map_t [NON_NULL], uint64_t, uint64_t);
8uint64_t h48map_value(h48map_t [static 1], uint64_t); 8uint64_t h48map_value(h48map_t [NON_NULL], uint64_t);
9kvpair_t h48map_nextkvpair(h48map_t [static 1], uint64_t [static 1]); 9kvpair_t h48map_nextkvpair(h48map_t [NON_NULL], uint64_t [NON_NULL]);
10 10
11char str[STRLENMAX]; 11char str[STRLENMAX];
12 12
diff --git a/test/122_gendata_h48short/gendata_h48short_tests.c b/test/122_gendata_h48short/gendata_h48short_tests.c
index 0de9408..efd378b 100644
--- a/test/122_gendata_h48short/gendata_h48short_tests.c
+++ b/test/122_gendata_h48short/gendata_h48short_tests.c
@@ -2,11 +2,11 @@
2 2
3#define MAXPOS 200 3#define MAXPOS 200
4 4
5void h48map_create(h48map_t [static 1], uint64_t, uint64_t); 5void h48map_create(h48map_t [NON_NULL], uint64_t, uint64_t);
6void h48map_destroy(h48map_t [static 1]); 6void h48map_destroy(h48map_t [NON_NULL]);
7kvpair_t h48map_nextkvpair(h48map_t [static 1], uint64_t [static 1]); 7kvpair_t h48map_nextkvpair(h48map_t [NON_NULL], uint64_t [NON_NULL]);
8size_t gendata_cocsep(unsigned char *, uint64_t *, cube_t *); 8size_t gendata_cocsep(unsigned char *, uint64_t *, cube_t *);
9uint64_t gendata_h48short(gendata_h48short_arg_t [static 1]); 9uint64_t gendata_h48short(gendata_h48short_arg_t [NON_NULL]);
10 10
11char str[STRLENMAX]; 11char str[STRLENMAX];
12 12
diff --git a/test/140_appendsolution/appendsolution_tests.c b/test/140_appendsolution/appendsolution_tests.c
index f9620ab..9f9e9f4 100644
--- a/test/140_appendsolution/appendsolution_tests.c
+++ b/test/140_appendsolution/appendsolution_tests.c
@@ -16,12 +16,12 @@ See below for the output format.
16 16
17uint8_t readtrans(const char [NISSY_SIZE_TRANSFORMATION]); 17uint8_t readtrans(const char [NISSY_SIZE_TRANSFORMATION]);
18int64_t readmoves(const char *, size_t n, size_t m, 18int64_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 *);
20void solution_moves_reset(solution_moves_t [static 1]); 20void solution_moves_reset(solution_moves_t [NON_NULL]);
21bool solution_list_init(solution_list_t [static 1], size_t n, char [n]); 21bool solution_list_init(solution_list_t [NON_NULL], size_t n, char *);
22int64_t appendsolution(const solution_moves_t [static 1], 22int64_t appendsolution(const solution_moves_t [NON_NULL],
23 size_t, const uint64_t *, const solution_settings_t [static 1], 23 size_t, const uint64_t *, const solution_settings_t [NON_NULL],
24 solution_list_t [static 1]); 24 solution_list_t [NON_NULL]);
25 25
26void run(void) { 26void run(void) {
27 int i, j, nnt, ntrans; 27 int i, j, nnt, ntrans;
diff --git a/test/test.h b/test/test.h
index 60e340f..b8c5922 100644
--- a/test/test.h
+++ b/test/test.h
@@ -7,6 +7,7 @@
7#include <stdlib.h> 7#include <stdlib.h>
8#include <string.h> 8#include <string.h>
9 9
10#include "../src/utils/compilers.h"
10#include "../src/utils/wrapthread.h" 11#include "../src/utils/wrapthread.h"
11#include "../src/nissy.h" 12#include "../src/nissy.h"
12#include "../src/arch/arch.h" 13#include "../src/arch/arch.h"
@@ -27,7 +28,7 @@ bool isconsistent(oriented_cube_t);
27bool issolvable(oriented_cube_t); 28bool issolvable(oriented_cube_t);
28bool issolved(oriented_cube_t); 29bool issolved(oriented_cube_t);
29oriented_cube_t readcube(char *); 30oriented_cube_t readcube(char *);
30int64_t writecube(oriented_cube_t, size_t n, char [n]); 31int64_t writecube(oriented_cube_t, size_t n, char *);
31 32
32/* Test function to be implemented by all tests */ 33/* Test function to be implemented by all tests */
33void run(void); 34void run(void);

Generated with cgit - Back to sebastiano.tronto.net