From 4da48094d65b4269be7a4d7d2dc9c7d72f2e6869 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Sun, 9 Oct 2022 18:29:00 +0200 Subject: Added some failing tests --- tests/test_fst.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/test_fst.c b/tests/test_fst.c index fc1185c..5f48f6c 100644 --- a/tests/test_fst.c +++ b/tests/test_fst.c @@ -26,7 +26,17 @@ test_cube_to_fst_to_cube(Cube *c) fst = cube_to_fst(c); fst_to_cube(fst, &d); - return equal(c, &d); + if (!equal(c, &d)) { + printf("Cubes are different:\n\n"); + printf("Cube 1:\n"); + print_cube(c); + printf("\nCube 2:\n"); + print_cube(&d); + printf("\n"); + return false; + } + + return true; } static bool @@ -64,7 +74,8 @@ test_cube_to_fst_to_cube_unsolved() b = test_cube_to_fst_to_cube(&c); free_alg(a); if (!b) { - printf("Failed with alg %s\n", algs[i]); + printf("Cube to FST to cube failed with alg %s\n", + algs[i]); return false; } } @@ -74,7 +85,7 @@ test_cube_to_fst_to_cube_unsolved() void test_fst_all() { int i; - init_fst(); + init_trans(); for (i = 0; test[i] != NULL; i++) { printf("Test: %s\n", name[i]); @@ -82,7 +93,7 @@ void test_fst_all() { printf("Failed!\n"); exit(1); } - printf("Passed.\n"); + printf("Passed.\n\n"); } printf("All FST tests passed.\n\n"); } -- cgit v1.3