summaryrefslogtreecommitdiff
path: root/runsuite.c
diff options
context:
space:
mode:
authorKasimier T. Buchcik <kbuchcik@src.gnome.org>2005-12-09 10:03:27 +0000
committerKasimier T. Buchcik <kbuchcik@src.gnome.org>2005-12-09 10:03:27 +0000
commitdcac4fce1dc25e44437acf041e324d759af932a3 (patch)
tree637db3dc621acfd5439364479562cba00097c6fc /runsuite.c
parentbdadaedd8865affa6d09779571daca593ba50d9d (diff)
downloadlibxml2-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.c27
1 files changed, 20 insertions, 7 deletions
diff --git a/runsuite.c b/runsuite.c
index 280c0880..debf456a 100644
--- a/runsuite.c
+++ b/runsuite.c
@@ -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++;