expat/tests runtests.c,1.45,1.46

"Fred L. Drake" <[email protected]>
Newsgroups gmane.text.xml.expat.cvs
Message-ID <[email protected]>
Update of /cvsroot/expat/expat/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv657

Modified Files:
	runtests.c 
Log Message:
Thread the proper file name and line number to make determination of
which test is failing easier.


Index: runtests.c
===================================================================
RCS file: /cvsroot/expat/expat/tests/runtests.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- runtests.c	24 Jan 2003 05:39:16 -0000	1.45
+++ runtests.c	25 Jan 2003 04:57:44 -0000	1.46
@@ -40,7 +40,7 @@
             XML_GetCurrentLineNumber(parser),
             XML_GetCurrentColumnNumber(parser),
             file, line);
-    fail(buffer);
+    _fail_unless(0, file, line, buffer);
 }
 
 #define xml_failure(parser) _xml_failure((parser), __FILE__, __LINE__)
@@ -199,7 +199,8 @@
 
 
 static void
-run_character_check(XML_Char *text, XML_Char *expected)
+_run_character_check(XML_Char *text, XML_Char *expected,
+                     const char *file, int line)
 {
     CharData storage;
 
@@ -207,12 +208,16 @@
     XML_SetUserData(parser, &storage);
     XML_SetCharacterDataHandler(parser, accumulate_characters);
     if (XML_Parse(parser, text, strlen(text), 1) == XML_STATUS_ERROR)
-        xml_failure(parser);
+        _xml_failure(parser, file, line);
     CharData_CheckXMLChars(&storage, expected);
 }
 
+#define run_character_check(text, expected) \
+        _run_character_check(text, expected, __FILE__, __LINE__)
+
 static void
-run_attribute_check(XML_Char *text, XML_Char *expected)
+_run_attribute_check(XML_Char *text, XML_Char *expected,
+                     const char *file, int line)
 {
     CharData storage;
 
@@ -220,9 +225,12 @@
     XML_SetUserData(parser, &storage);
     XML_SetStartElementHandler(parser, accumulate_attribute);
     if (XML_Parse(parser, text, strlen(text), 1) == XML_STATUS_ERROR)
-        xml_failure(parser);
+        _xml_failure(parser, file, line);
     CharData_CheckXMLChars(&storage, expected);
 }
+
+#define run_attribute_check(text, expected) \
+        _run_attribute_check(text, expected, __FILE__, __LINE__)
 
 /* Regression test for SF bug #491986. */
 START_TEST(test_danish_latin1)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.