diff options
author | Kasimier T. Buchcik <kbuchcik@src.gnome.org> | 2005-12-09 10:03:27 +0000 |
---|---|---|
committer | Kasimier T. Buchcik <kbuchcik@src.gnome.org> | 2005-12-09 10:03:27 +0000 |
commit | dcac4fce1dc25e44437acf041e324d759af932a3 (patch) | |
tree | 637db3dc621acfd5439364479562cba00097c6fc /runsuite.c | |
parent | bdadaedd8865affa6d09779571daca593ba50d9d (diff) | |
download | libxml2-dcac4fce1dc25e44437acf041e324d759af932a3.tar.gz |
Changed to instantly mark instance-tests as failed if the corresponding
* runsuite.c: Changed to instantly mark instance-tests as
failed if the corresponding schema was invalid. This
reflects the side of the Python code for the XML Schema test
suite. We now get the same number of failed tests on both
sides.
Diffstat (limited to 'runsuite.c')
-rw-r--r-- | runsuite.c | 27 |
1 files changed, 20 insertions, 7 deletions
@@ -36,11 +36,16 @@ #define LOGFILE "runsuite.log" static FILE *logfile = NULL; -static int verbose = 0;
-
-#if defined(_WIN32) && !defined(__CYGWIN__)
-#define vsnprintf _vsnprintf
-#define snprintf _snprintf
+static int verbose = 0; + + + +#if defined(_WIN32) && !defined(__CYGWIN__) + +#define vsnprintf _vsnprintf + +#define snprintf _snprintf + #endif /************************************************************************ @@ -936,9 +941,17 @@ xstcTestGroup(xmlNodePtr cur, const char *base) { } instance = getNext(cur, "./ts:instanceTest[1]"); while (instance != NULL) { - xstcTestInstance(instance, schemas, path, base); + if (schemas != NULL) { + xstcTestInstance(instance, schemas, path, base); + } else { + /* + * We'll automatically mark the instances as failed + * if the schema was broken. + */ + nb_errors++; + } instance = getNext(instance, - "following-sibling::ts:instanceTest[1]"); + "following-sibling::ts:instanceTest[1]"); } } else if (xmlStrEqual(validity, BAD_CAST "invalid")) { nb_schematas++; |