diff --git a/src/clue-matches-tests.c b/src/clue-matches-tests.c index e7dd49e0663d7cbe26b53b24e7e379f40b187590..18fb7c8c41378b89b41b68108b6d3e09ddd74ee0 100644 --- a/src/clue-matches-tests.c +++ b/src/clue-matches-tests.c @@ -25,9 +25,13 @@ #include "word-list-test-utils.h" #include "test-utils.h" -#define EGG_IPUZ "tests/clue-matches/egg.ipuz" -#define VALID_INTERSECTION_IPUZ "tests/clue-matches/valid-intersection.ipuz" -#define INVALID_INTERSECTION_IPUZ "tests/clue-matches/invalid-intersection.ipuz" +#define ADD_IPUZ_TEST(test_name, file_name) \ + g_test_add ("/clue_matches/" #test_name, \ + Fixture, \ + "tests/clue-matches/" #file_name, \ + fixture_set_up, \ + test_name, \ + fixture_tear_down) typedef struct { WordList *word_list; @@ -151,23 +155,8 @@ int main (int argc, char **argv) { g_test_init (&argc, &argv, NULL); - g_test_add ("/clue_matches/test_egg_ipuz", - Fixture, - EGG_IPUZ, - fixture_set_up, - test_egg_ipuz, - fixture_tear_down); - g_test_add ("/clue_matches/valid_intersection_ipuz", - Fixture, - VALID_INTERSECTION_IPUZ, - fixture_set_up, - test_valid_intersection_ipuz, - fixture_tear_down); - g_test_add ("/clue_matches/invalid_intersection_ipuz", - Fixture, - INVALID_INTERSECTION_IPUZ, - fixture_set_up, - test_invalid_intersection_ipuz, - fixture_tear_down); + ADD_IPUZ_TEST (test_egg_ipuz, egg.ipuz); + ADD_IPUZ_TEST (test_valid_intersection_ipuz, valid-intersection.ipuz); + ADD_IPUZ_TEST (test_invalid_intersection_ipuz, invalid-intersection.ipuz); return g_test_run (); }