+2006-07-27 Atsushi Enomoto <atsushi@ximian.com>
+
+ * xsdtest.cs :
+ It has been running some extra instance validation and reporting
+ errors where a schema is invalid and therefore no instance
+ validation could be done.
+ Now --reportsuccess works fine for tests that should fail (reports
+ "OK" when it successfully failed).
+
2005-12-01 Atsushi Enomoto <atsushi@ximian.com>
* Makefile : Use MONO_PATH. Remove extraneous make variables.
if (schemaFile.Length > 2)\r
schemaFile = schemaFile.Substring (2);\r
if (verbose)\r
- Report (schemaFile, false, "compiling", "");\r
+ Report (schemaFile, true, "compiling", "");\r
bool isValidSchema = test.SelectSingleNode ("@out_s").InnerText == "1";\r
XmlSchema schema = null;\r
XmlTextReader sxr = null;\r
if (reportSuccess)\r
Report (schemaFile, true, "OK", "");\r
} catch (XmlSchemaException ex) {\r
- if (isValidSchema) {\r
+ if (isValidSchema)\r
Report (schemaFile, true, "should succeed", \r
reportDetails ?\r
ex.ToString () : ex.Message);\r
- continue;\r
- }\r
+ else if (reportSuccess)\r
+ Report (schemaFile, true, "OK", "");\r
+ continue;\r
} catch (Exception ex) {\r
if (stopOnError)\r
throw;\r
xvr.Read ();\r
if (!isValidInstance && !noValidate)\r
Report (instanceFile, false, "should fail", "");\r
- if (reportSuccess)\r
+ else if (reportSuccess)\r
Report (instanceFile, false, "OK", "");\r
} catch (XmlSchemaException ex) {\r
if (isValidInstance)\r
Report (instanceFile, false, "should succeed",\r
reportDetails ?\r
ex.ToString () : ex.Message);\r
+ else if (reportSuccess)\r
+ Report (instanceFile, false, "OK", "");\r
} catch (Exception ex) {\r
if (stopOnError)\r
throw;\r