[Expat-checkins] expat/tests runtests.c,1.49,1.50

Fred L. Drake fdrake at users.sourceforge.net
Wed Mar 12 11:25:11 EST 2003


Update of /cvsroot/expat/expat/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv1303

Modified Files:
	runtests.c 
Log Message:
- 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


Index: runtests.c
===================================================================
RCS file: /cvsroot/expat/expat/tests/runtests.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- runtests.c	12 Mar 2003 19:17:18 -0000	1.49
+++ runtests.c	12 Mar 2003 19:25:03 -0000	1.50
@@ -1261,8 +1261,9 @@
         "<doc xmlns:a='http://xml.libexpat.org/a'\n"
         "     xmlns:b='http://xml.libexpat.org/a'\n"
         "     a:a='v' b:a='v' />";
-    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 @@
 START_TEST(test_ns_unbound_prefix_on_attribute)
 {
     char *text = "<doc a:attr=''/>";
-    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 @@
 START_TEST(test_ns_unbound_prefix_on_element)
 {
     char *text = "<a:doc/>";
-    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 @@
     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 */





More information about the Expat-checkins mailing list