aboutsummaryrefslogtreecommitdiff
path: root/tests/fst_tests.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/fst_tests.c')
-rw-r--r--tests/fst_tests.c48
1 files changed, 48 insertions, 0 deletions
diff --git a/tests/fst_tests.c b/tests/fst_tests.c
index 14aee1c..493f628 100644
--- a/tests/fst_tests.c
+++ b/tests/fst_tests.c
@@ -1,5 +1,10 @@
1#include "fst_tests.h" 1#include "fst_tests.h"
2 2
3static bool testmethod_fst_is_consistent(void *);
4static bool testmethod_cube_to_fst_to_cube(void *);
5static bool testmethod_fst_move(void *);
6static bool testmethod_fst_inverse(void *);
7
3static bool check_equal_and_log(Cube *, Cube *); 8static bool check_equal_and_log(Cube *, Cube *);
4static void void_to_cube(void *, Cube *); 9static void void_to_cube(void *, Cube *);
5 10
@@ -18,6 +23,49 @@ char *algs[] = {
18 NULL, 23 NULL,
19}; 24};
20 25
26Test test_fst_is_consistent = {
27 .name = "Consitency of FST (converted from cube)",
28 .t = testmethod_fst_is_consistent,
29 .cases = (void **)algs,
30};
31Test test_cube_to_fst_to_cube = {
32 .name = "Cube to FST to cube",
33 .t = testmethod_cube_to_fst_to_cube,
34 .cases = (void **)algs,
35};
36Test test_fst_move = {
37 .name = "FST move",
38 .t = testmethod_fst_move,
39 .cases = (void **)algs,
40};
41Test test_fst_inverse = {
42 .name = "FST inverse",
43 .t = testmethod_fst_inverse,
44 .cases = (void **)algs,
45};
46
47Test *pre_init[] = {
48 &test_fst_is_consistent,
49 &test_cube_to_fst_to_cube,
50 NULL
51};
52TestSuite fst_pre_init_suite = {
53 .setup = NULL,
54 .tests = pre_init,
55 .teardown = NULL,
56};
57
58Test *post_init[] = {
59 &test_fst_move,
60 &test_fst_inverse,
61 NULL
62};
63TestSuite fst_post_init_suite = {
64 .setup = init_fst,
65 .tests = post_init,
66 .teardown = NULL,
67};
68
21static bool 69static bool
22check_equal_and_log(Cube *c, Cube *d) 70check_equal_and_log(Cube *c, Cube *d)
23{ 71{

Generated with cgit - Back to sebastiano.tronto.net