diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2023-11-13 23:47:00 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2023-11-13 23:47:00 +0100 |
| commit | 41e31b84a9adeae0b6bdbc4c9438bfa5e782c9da (patch) | |
| tree | b6e9ae4db711e6b902ce5ae0f04e0b83c193cd26 /test/test.h | |
| parent | 4444e53eaadf33aa309a40849730be332ca6d0de (diff) | |
| download | nissy-core-41e31b84a9adeae0b6bdbc4c9438bfa5e782c9da.tar.gz nissy-core-41e31b84a9adeae0b6bdbc4c9438bfa5e782c9da.zip | |
Test cleanup
Diffstat (limited to 'test/test.h')
| -rw-r--r-- | test/test.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/test/test.h b/test/test.h index 607a52d..7c5400e 100644 --- a/test/test.h +++ b/test/test.h | |||
| @@ -1,7 +1,26 @@ | |||
| 1 | #include "../cube.h" | 1 | #include <inttypes.h> |
| 2 | #include <stdbool.h> | ||
| 3 | #include <stdio.h> | ||
| 4 | #include <stdlib.h> | ||
| 5 | #include <string.h> | ||
| 6 | |||
| 7 | #define STRLENMAX 10000 | ||
| 8 | |||
| 9 | typedef struct { | ||
| 10 | uint8_t corner[8]; | ||
| 11 | uint8_t edge[12]; | ||
| 12 | } cube_t; | ||
| 2 | 13 | ||
| 3 | #ifdef CUBE_AVX2 | 14 | #ifdef CUBE_AVX2 |
| 15 | #include <immintrin.h> | ||
| 4 | typedef __m256i cube_fast_t; | 16 | typedef __m256i cube_fast_t; |
| 5 | #else | 17 | #else |
| 6 | typedef cube_t cube_fast_t; | 18 | typedef cube_t cube_fast_t; |
| 7 | #endif | 19 | #endif |
| 20 | |||
| 21 | /* Basic functions used in most tests */ | ||
| 22 | cube_t solvedcube(void); | ||
| 23 | bool iserror(cube_t); | ||
| 24 | bool issolvable(cube_t); | ||
| 25 | cube_t readcube(char *, char *); | ||
| 26 | void writecube(char *, cube_t, char *); | ||
