diff options
Diffstat (limited to 'tests/fst_tests.h')
| -rw-r--r-- | tests/fst_tests.h | 54 |
1 files changed, 7 insertions, 47 deletions
diff --git a/tests/fst_tests.h b/tests/fst_tests.h index 2e11069..3a7496e 100644 --- a/tests/fst_tests.h +++ b/tests/fst_tests.h | |||
| @@ -2,56 +2,16 @@ | |||
| 2 | #define FST_TESTS_H | 2 | #define FST_TESTS_H |
| 3 | 3 | ||
| 4 | #include "../src/fst.h" | 4 | #include "../src/fst.h" |
| 5 | #include "test.h" | 5 | #include "test_common.h" |
| 6 | |||
| 7 | bool testmethod_fst_is_consistent(void *); | ||
| 8 | bool testmethod_cube_to_fst_to_cube(void *); | ||
| 9 | bool testmethod_fst_move(void *); | ||
| 10 | bool testmethod_fst_inverse(void *); | ||
| 11 | 6 | ||
| 12 | extern char *algs[]; | 7 | extern char *algs[]; |
| 13 | 8 | ||
| 14 | Test test_fst_is_consistent = { | 9 | extern Test test_fst_is_consistent; |
| 15 | .name = "Consitency of FST (converted from cube)", | 10 | extern Test test_cube_to_fst_to_cube; |
| 16 | .t = testmethod_fst_is_consistent, | 11 | extern Test test_fst_move; |
| 17 | .cases = (void **)algs, | 12 | extern Test test_fst_inverse; |
| 18 | }; | ||
| 19 | Test test_cube_to_fst_to_cube = { | ||
| 20 | .name = "Cube to FST to cube", | ||
| 21 | .t = testmethod_cube_to_fst_to_cube, | ||
| 22 | .cases = (void **)algs, | ||
| 23 | }; | ||
| 24 | Test test_fst_move = { | ||
| 25 | .name = "FST move", | ||
| 26 | .t = testmethod_fst_move, | ||
| 27 | .cases = (void **)algs, | ||
| 28 | }; | ||
| 29 | Test test_fst_inverse = { | ||
| 30 | .name = "FST inverse", | ||
| 31 | .t = testmethod_fst_inverse, | ||
| 32 | .cases = (void **)algs, | ||
| 33 | }; | ||
| 34 | |||
| 35 | Test *pre_init[] = { | ||
| 36 | &test_fst_is_consistent, | ||
| 37 | &test_cube_to_fst_to_cube, | ||
| 38 | NULL | ||
| 39 | }; | ||
| 40 | TestSuite fst_pre_init_suite = { | ||
| 41 | .setup = NULL, | ||
| 42 | .tests = pre_init, | ||
| 43 | .teardown = NULL, | ||
| 44 | }; | ||
| 45 | 13 | ||
| 46 | Test *post_init[] = { | 14 | extern TestSuite fst_pre_init_suite; |
| 47 | &test_fst_move, | 15 | extern TestSuite fst_post_init_suite; |
| 48 | &test_fst_inverse, | ||
| 49 | NULL | ||
| 50 | }; | ||
| 51 | TestSuite fst_post_init_suite = { | ||
| 52 | .setup = init_fst, | ||
| 53 | .tests = post_init, | ||
| 54 | .teardown = NULL, | ||
| 55 | }; | ||
| 56 | 16 | ||
| 57 | #endif | 17 | #endif |
