From e09284a6b1c34178d0e6817f3ffeae9342f13786 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Fri, 17 Jan 2020 15:35:27 +0100 Subject: [PATCH] Explicitly define tests cases and add them to tests --- tests/non_regression_tests.c | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/tests/non_regression_tests.c b/tests/non_regression_tests.c index d2993ecd..a03b458f 100644 --- a/tests/non_regression_tests.c +++ b/tests/non_regression_tests.c @@ -233,29 +233,28 @@ START_TEST(malformed_logout_request) } END_TEST -struct { - char *name; - void *function; -} tests[] = { - { "Googleapps error from coudot@ on 27-09-2010", test01_googleapps_27092010}, - { "Wrong assertionConsumer ordering on 08-10-2010", indexed_endpoints_20101008}, - { "Warning when parsing AttributeValue node containing unknown namespace nodes", remove_warning_when_parssing_unknown_SNIPPET_LIST_NODES_20111007 }, - { "Wrong endpoint index in artifacts", wrong_endpoint_index_in_artifacts }, - { "Malformed logout request", malformed_logout_request }, -}; - Suite* non_regression_suite() { Suite *s = suite_create("Non regression tests"); - unsigned int i = 0; - for (i = 0 ; i < G_N_ELEMENTS(tests); i++) { - TCase *c = tcase_create(tests[i].name); - void *f = tests[i].function; - tcase_add_test(c, f); - suite_add_tcase(s, c); - } + TCase *tc_googleapps_27092010 = tcase_create("Create server from empty string"); + TCase *tc_indexed_endpoints_20101008 = tcase_create("Wrong assertionConsumer ordering on 08-10-2010"); + TCase *tc_remove_warning_when_parssing_unknown_SNIPPET_LIST_NODES_20111007 = tcase_create("Warning when parsing AttributeValue node containing unknown namespace nodes"); + TCase *tc_wrong_endpoint_index_in_artifacts = tcase_create("Wrong endpoint index in artifacts"); + TCase *tc_malformed_logout_request = tcase_create("Malformed logout request"); + + tcase_add_test(tc_googleapps_27092010, test01_googleapps_27092010); + tcase_add_test(tc_googleapps_27092010, indexed_endpoints_20101008); + tcase_add_test(tc_googleapps_27092010, remove_warning_when_parssing_unknown_SNIPPET_LIST_NODES_20111007); + tcase_add_test(tc_googleapps_27092010, wrong_endpoint_index_in_artifacts); + tcase_add_test(tc_googleapps_27092010, malformed_logout_request); + + suite_add_tcase(s, tc_googleapps_27092010); + suite_add_tcase(s, tc_indexed_endpoints_20101008); + suite_add_tcase(s, tc_remove_warning_when_parssing_unknown_SNIPPET_LIST_NODES_20111007); + suite_add_tcase(s, tc_wrong_endpoint_index_in_artifacts); + suite_add_tcase(s, tc_malformed_logout_request); return s; } -- 2.21.0