From: Fred L. Drake, Jr. Date: Wed, 12 Mar 2003 19:25:03 +0000 (+0000) Subject: - be more specific about the errors we expect to see reported X-Git-Tag: R_1_95_7~54 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2ff7f92016f1bc6293a0b7d0414d08ea95b1ee1c;p=libexpat - be more specific about the errors we expect to see reported - change the name of make_basic_suite() to make_suite(), since there's only one make_*_suite() function --- diff --git a/expat/tests/runtests.c b/expat/tests/runtests.c index b173ab39..b84f1afd 100644 --- a/expat/tests/runtests.c +++ b/expat/tests/runtests.c @@ -1261,8 +1261,9 @@ START_TEST(test_ns_duplicate_attrs_diff_prefixes) ""; - if (XML_Parse(parser, text, strlen(text), XML_TRUE) != XML_STATUS_ERROR) - fail("did not report multiple attributes with same URI+name"); + expect_failure(text, + XML_ERROR_DUPLICATE_ATTRIBUTE, + "did not report multiple attributes with same URI+name"); } END_TEST @@ -1270,8 +1271,9 @@ END_TEST START_TEST(test_ns_unbound_prefix_on_attribute) { char *text = ""; - if (XML_Parse(parser, text, strlen(text), XML_TRUE) != XML_STATUS_ERROR) - fail("did not report unbound prefix on attribute"); + expect_failure(text, + XML_ERROR_UNBOUND_PREFIX, + "did not report unbound prefix on attribute"); } END_TEST @@ -1279,13 +1281,14 @@ END_TEST START_TEST(test_ns_unbound_prefix_on_element) { char *text = ""; - if (XML_Parse(parser, text, strlen(text), XML_TRUE) != XML_STATUS_ERROR) - fail("did not report unbound prefix on element"); + expect_failure(text, + XML_ERROR_UNBOUND_PREFIX, + "did not report unbound prefix on element"); } END_TEST static Suite * -make_basic_suite(void) +make_suite(void) { Suite *s = suite_create("basic"); TCase *tc_basic = tcase_create("basic tests"); @@ -1359,7 +1362,7 @@ main(int argc, char *argv[]) int i, nf; int forking = 0, forking_set = 0; int verbosity = CK_NORMAL; - Suite *s = make_basic_suite(); + Suite *s = make_suite(); SRunner *sr = srunner_create(s); /* run the tests for internal helper functions */