2006-07-27 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Thu, 27 Jul 2006 14:40:45 +0000 (14:40 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Thu, 27 Jul 2006 14:40:45 +0000 (14:40 -0000)
* 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).

svn path=/trunk/mcs/; revision=63040

mcs/class/System.XML/Test/System.Xml.Schema/standalone_tests/ChangeLog
mcs/class/System.XML/Test/System.Xml.Schema/standalone_tests/xsdtest.cs

index 332221666abfe4de4485fcbf95edd83a4d3e16ec..ce5430bdac2f4221782edb57028187e40a075b2d 100644 (file)
@@ -1,3 +1,12 @@
+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.
index d3809e6a3db931853df7b7ab006f8c4647bca69e..1c1fb8ac4702bfc1f79ea6eac69d7b435ff6df55 100644 (file)
@@ -123,7 +123,7 @@ USAGE: mono xsdtest.exe options target-pattern
                        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
@@ -140,12 +140,13 @@ USAGE: mono xsdtest.exe options target-pattern
                                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
@@ -202,13 +203,15 @@ USAGE: mono xsdtest.exe options target-pattern
                                        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