[Expat-checkins] CVS: expat/tests runtests.c,1.2,1.3
Fred L. Drake
fdrake@users.sourceforge.net
Mon Nov 12 21:05:01 2001
Update of /cvsroot/expat/expat/tests
In directory usw-pr-cvs1:/tmp/cvs-serv7285/tests
Modified Files:
runtests.c
Log Message:
Update to work with check 0.8.
Index: runtests.c
===================================================================
RCS file: /cvsroot/expat/expat/tests/runtests.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** runtests.c 2001/11/13 04:49:52 1.2
--- runtests.c 2001/11/13 05:04:02 1.3
***************
*** 12,15 ****
--- 12,17 ----
{
parser = XML_ParserCreate("us-ascii");
+ if (parser == NULL)
+ fail("Parser not created.");
}
***************
*** 27,33 ****
char *text = "<doc>\0</doc>";
- if (parser == NULL)
- fail("Parser not created.");
-
/* test that a NUL byte (in US-ASCII data) is an error */
if (XML_Parse(parser, text, 12, 1))
--- 29,32 ----
***************
*** 43,49 ****
char *text = "<doc>�</doc>";
- if (parser == NULL)
- fail("Parser not created.");
-
/* test that a NUL byte (in US-ASCII data) is an error */
if (XML_Parse(parser, text, strlen(text), 1))
--- 42,45 ----
***************
*** 62,68 ****
"<a>&eee;</a>";
- if (parser == NULL)
- fail("Parser not created.");
-
if (!XML_Parse(parser, text, strlen(text), 1)) {
fail_unless(XML_GetErrorCode(parser) == XML_ERROR_MISPLACED_XML_PI,
--- 58,61 ----
***************
*** 84,93 ****
suite_add_tcase(s, tc_nulls);
! tcase_set_fixture(tc_nulls, basic_setup, basic_teardown);
tcase_add_test(tc_nulls, test_nul_byte);
tcase_add_test(tc_nulls, test_u0000_char);
suite_add_tcase(s, tc_xmldecl);
! tcase_set_fixture(tc_xmldecl, basic_setup, basic_teardown);
tcase_add_test(tc_xmldecl, test_xmldecl_misplaced);
--- 77,86 ----
suite_add_tcase(s, tc_nulls);
! tcase_add_checked_fixture(tc_nulls, basic_setup, basic_teardown);
tcase_add_test(tc_nulls, test_nul_byte);
tcase_add_test(tc_nulls, test_u0000_char);
suite_add_tcase(s, tc_xmldecl);
! tcase_add_checked_fixture(tc_xmldecl, basic_setup, basic_teardown);
tcase_add_test(tc_xmldecl, test_xmldecl_misplaced);
***************
*** 100,104 ****
{
int nf;
! int verbosity = CRNORMAL;
Suite *s = make_basic_suite();
SRunner *sr = srunner_create(s);
--- 93,97 ----
{
int nf;
! int verbosity = CK_NORMAL;
Suite *s = make_basic_suite();
SRunner *sr = srunner_create(s);
***************
*** 107,113 ****
char *opt = argv[1];
if (strcmp(opt, "-v") == 0 || strcmp(opt, "--verbose") == 0)
! verbosity = CRVERBOSE;
else if (strcmp(opt, "-q") == 0 || strcmp(opt, "--quiet") == 0)
! verbosity = CRSILENT;
}
srunner_run_all(sr, verbosity);
--- 100,106 ----
char *opt = argv[1];
if (strcmp(opt, "-v") == 0 || strcmp(opt, "--verbose") == 0)
! verbosity = CK_VERBOSE;
else if (strcmp(opt, "-q") == 0 || strcmp(opt, "--quiet") == 0)
! verbosity = CK_SILENT;
}
srunner_run_all(sr, verbosity);