diff options
Diffstat (limited to 'test/070_solve_simple')
| -rw-r--r-- | test/070_solve_simple/solve_simple_tests.c | 38 |
1 files changed, 15 insertions, 23 deletions
diff --git a/test/070_solve_simple/solve_simple_tests.c b/test/070_solve_simple/solve_simple_tests.c index 14a1674..4756dc0 100644 --- a/test/070_solve_simple/solve_simple_tests.c +++ b/test/070_solve_simple/solve_simple_tests.c | |||
| @@ -1,33 +1,25 @@ | |||
| 1 | #include <stdbool.h> | 1 | #include "../test.h" |
| 2 | #include <stdint.h> | ||
| 3 | #include <stdio.h> | ||
| 4 | #include <stdlib.h> | ||
| 5 | #include <string.h> | ||
| 6 | 2 | ||
| 7 | #ifdef CUBE_AVX2 | 3 | int64_t solve(cube_t, char *, char *, char *, int8_t, int8_t, int64_t, int8_t, |
| 8 | #include <immintrin.h> | 4 | void *, char *); |
| 9 | #endif | ||
| 10 | |||
| 11 | #include "../../cube.h" | ||
| 12 | |||
| 13 | #define S 10000 | ||
| 14 | 5 | ||
| 15 | int main() { | 6 | int main() { |
| 16 | char cubestr[S], solverstr[S], optionsstr[S], nisstypestr[S]; | 7 | char cubestr[STRLENMAX], solverstr[STRLENMAX], optionsstr[STRLENMAX]; |
| 17 | char minmovesstr[S], maxmovesstr[S], maxsolsstr[S], optimalstr[S]; | 8 | char nisstypestr[STRLENMAX], minmovesstr[STRLENMAX]; |
| 18 | char solutionsstr[S]; | 9 | char maxmovesstr[STRLENMAX], maxsolsstr[STRLENMAX]; |
| 10 | char optimalstr[STRLENMAX], solutionsstr[STRLENMAX]; | ||
| 19 | cube_t cube; | 11 | cube_t cube; |
| 20 | int64_t maxsols; | 12 | int64_t maxsols; |
| 21 | int8_t minmoves, maxmoves, optimal; | 13 | int8_t minmoves, maxmoves, optimal; |
| 22 | 14 | ||
| 23 | fgets(cubestr, S, stdin); | 15 | fgets(cubestr, STRLENMAX, stdin); |
| 24 | fgets(solverstr, S, stdin); | 16 | fgets(solverstr, STRLENMAX, stdin); |
| 25 | fgets(optionsstr, S, stdin); | 17 | fgets(optionsstr, STRLENMAX, stdin); |
| 26 | fgets(nisstypestr, S, stdin); | 18 | fgets(nisstypestr, STRLENMAX, stdin); |
| 27 | fgets(minmovesstr, S, stdin); | 19 | fgets(minmovesstr, STRLENMAX, stdin); |
| 28 | fgets(maxmovesstr, S, stdin); | 20 | fgets(maxmovesstr, STRLENMAX, stdin); |
| 29 | fgets(maxsolsstr, S, stdin); | 21 | fgets(maxsolsstr, STRLENMAX, stdin); |
| 30 | fgets(optimalstr, S, stdin); | 22 | fgets(optimalstr, STRLENMAX, stdin); |
| 31 | 23 | ||
| 32 | solverstr[strcspn(solverstr, "\n")] = 0; | 24 | solverstr[strcspn(solverstr, "\n")] = 0; |
| 33 | optionsstr[strcspn(optionsstr, "\n")] = 0; | 25 | optionsstr[strcspn(optionsstr, "\n")] = 0; |
