2004-05-17 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Mon, 17 May 2004 15:28:12 +0000 (15:28 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Mon, 17 May 2004 15:28:12 +0000 (15:28 -0000)
* DataSetAssertion.cs : Enabled "Ordinal" check again, unless the test
  value is -1.
* DataSetInferXmlSchemaTest.cs,
  DataSetReadXmlSchemaTest.cs  : Enabled Ordinal check again, as long
  as working. Added IgnoredNamespaces() to inferxmlschema test.

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

mcs/class/System.Data/Test/System.Data/ChangeLog
mcs/class/System.Data/Test/System.Data/DataSetAssertion.cs
mcs/class/System.Data/Test/System.Data/DataSetInferXmlSchemaTest.cs
mcs/class/System.Data/Test/System.Data/DataSetReadXmlSchemaTest.cs

index b435d14c941330f9636d9b70dd397ab9c22403a9..6e216f3b5de8a91f70fdb05741807818e34cb022 100644 (file)
@@ -1,3 +1,11 @@
+2004-05-17  Atsushi Enomoto <atsushi@ximian.com>
+
+       * DataSetAssertion.cs : Enabled "Ordinal" check again, unless the test
+         value is -1.
+       * DataSetInferXmlSchemaTest.cs,
+         DataSetReadXmlSchemaTest.cs  : Enabled Ordinal check again, as long
+         as working. Added IgnoredNamespaces() to inferxmlschema test.
+
 2004-05-14  Atsushi Enomoto <atsushi@ximian.com>
 
        * DataSetReadXmlSchemaTest.cs : Added test014.xsd tes (contains two
index 0867a3bc76d062885104f5aa60391162f2e18a25..b7734da9fc292366b273e2eda3a5088b01702ecb 100755 (executable)
@@ -120,7 +120,8 @@ namespace MonoTests.System.Data
                        AssertEquals (label + "Expression: " , expression, col.Expression);\r
                        AssertEquals (label + "MaxLength: " , maxLength, col.MaxLength);\r
                        AssertEquals (label + "Namespace: " , ns, col.Namespace);\r
-//                     AssertEquals (label + "Ordinal: " , ordinal, col.Ordinal);\r
+                       if (ordinal >= 0)\r
+                               AssertEquals (label + "Ordinal: " , ordinal, col.Ordinal);\r
                        AssertEquals (label + "Prefix: " , prefix, col.Prefix);\r
                        AssertEquals (label + "ReadOnly: " , readOnly, col.ReadOnly);\r
                        AssertEquals (label + "Unique: " , unique, col.Unique);\r
index 11881801fbaed706b2e81e9ee25c35333911a72b..a81644363b39ef7a306dcaeda27f52553a3a4c76 100755 (executable)
@@ -251,33 +251,33 @@ namespace MonoTests.System.Data
                        AssertDataSet ("ds", ds, "NewDataSet", 4, 3);
                        DataTable dt = ds.Tables [0];
 
-                       AssertDataTable ("dt", dt, "el1", 3, 0, 0, 1, 1, 1);
-                       AssertDataColumn ("el1_Id", dt.Columns ["el1_Id"], "el1_Id", false, true, 0, 1, "el1_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, true);
-                       AssertDataColumn ("el1_attr1", dt.Columns ["attr1"], "attr1", true, false, 0, 1, "attr1", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false);
-                       AssertDataColumn ("el1_attrA", dt.Columns ["attrA"], "attrA", true, false, 0, 1, "attrA", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 2, String.Empty, false, false);
+                       AssertDataTable ("dt1", dt, "el1", 3, 0, 0, 1, 1, 1);
+                       AssertDataColumn ("el1_Id", dt.Columns [0], "el1_Id", false, true, 0, 1, "el1_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, true);
+                       AssertDataColumn ("el1_attr1", dt.Columns [1], "attr1", true, false, 0, 1, "attr1", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false);
+                       AssertDataColumn ("el1_attrA", dt.Columns [2], "attrA", true, false, 0, 1, "attrA", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 2, String.Empty, false, false);
 
                        dt = ds.Tables [1];
-                       AssertDataTable ("dt", dt, "el2", 6, 0, 1, 2, 2, 1);
-                       AssertDataColumn ("el2_Id", dt.Columns ["el2_Id"], "el2_Id", false, true, 0, 1, "el2_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, true);
-                       AssertDataColumn ("el2_col2", dt.Columns ["column2"], "column2", true, false, 0, 1, "column2", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false);
-                       AssertDataColumn ("el2_col3", dt.Columns ["column3"], "column3", true, false, 0, 1, "column3", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 2, String.Empty, false, false);
-                       AssertDataColumn ("el2_attr2", dt.Columns ["attr2"], "attr2", true, false, 0, 1, "attr2", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 3, String.Empty, false, false);
-                       AssertDataColumn ("el2_attrB", dt.Columns ["attrB"], "attrB", true, false, 0, 1, "attrB", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 4, String.Empty, false, false);
-                       AssertDataColumn ("el2_el1Id", dt.Columns ["el1_Id"], "el1_Id", true, false, 0, 1, "el1_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 5, String.Empty, false, false);
+                       AssertDataTable ("dt2", dt, "el2", 6, 0, 1, 2, 2, 1);
+                       AssertDataColumn ("el2_Id", dt.Columns [0], "el2_Id", false, true, 0, 1, "el2_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, true);
+                       AssertDataColumn ("el2_col2", dt.Columns [1], "column2", true, false, 0, 1, "column2", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false);
+                       AssertDataColumn ("el2_col3", dt.Columns [2], "column3", true, false, 0, 1, "column3", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 2, String.Empty, false, false);
+                       AssertDataColumn ("el2_attr2", dt.Columns [3], "attr2", true, false, 0, 1, "attr2", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 3, String.Empty, false, false);
+                       AssertDataColumn ("el2_attrB", dt.Columns [4], "attrB", true, false, 0, 1, "attrB", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 4, String.Empty, false, false);
+                       AssertDataColumn ("el2_el1Id", dt.Columns [5], "el1_Id", true, false, 0, 1, "el1_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 5, String.Empty, false, false);
 
                        dt = ds.Tables [2];
-                       AssertDataTable ("dt", dt, "el3", 4, 0, 1, 0, 1, 0);
-                       AssertDataColumn ("el3_attr3", dt.Columns ["attr3"], "attr3", true, false, 0, 1, "attr3", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);
-                       AssertDataColumn ("el3_attrC", dt.Columns ["attrC"], "attrC", true, false, 0, 1, "attrC", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false);
-                       AssertDataColumn ("el3_Text", dt.Columns ["el3_Text"], "el3_Text", true, false, 0, 1, "el3_Text", MappingType.SimpleContent, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 2, String.Empty, false, false);
-                       AssertDataColumn ("el3_el2Id", dt.Columns ["el2_Id"], "el2_Id", true, false, 0, 1, "el2_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 3, String.Empty, false, false);
+                       AssertDataTable ("dt3", dt, "el3", 4, 0, 1, 0, 1, 0);
+                       AssertDataColumn ("el3_attr3", dt.Columns [0], "attr3", true, false, 0, 1, "attr3", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);
+                       AssertDataColumn ("el3_attrC", dt.Columns [1], "attrC", true, false, 0, 1, "attrC", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false);
+                       AssertDataColumn ("el3_Text", dt.Columns [2], "el3_Text", true, false, 0, 1, "el3_Text", MappingType.SimpleContent, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 2, String.Empty, false, false);
+                       AssertDataColumn ("el3_el2Id", dt.Columns [3], "el2_Id", true, false, 0, 1, "el2_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 3, String.Empty, false, false);
 
                        dt = ds.Tables [3];
-                       AssertDataTable ("dt", dt, "el4", 4, 0, 1, 0, 1, 0);
-                       AssertDataColumn ("el3_attr4", dt.Columns ["attr4"], "attr4", true, false, 0, 1, "attr4", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);
-                       AssertDataColumn ("el4_attrD", dt.Columns ["attrD"], "attrD", true, false, 0, 1, "attrD", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false);
-                       AssertDataColumn ("el4_Text", dt.Columns ["el4_Text"], "el4_Text", true, false, 0, 1, "el4_Text", MappingType.SimpleContent, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 2, String.Empty, false, false);
-                       AssertDataColumn ("el4_el2Id", dt.Columns ["el2_Id"], "el2_Id", true, false, 0, 1, "el2_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 3, String.Empty, false, false);
+                       AssertDataTable ("dt4", dt, "el4", 4, 0, 1, 0, 1, 0);
+                       AssertDataColumn ("el3_attr4", dt.Columns [0], "attr4", true, false, 0, 1, "attr4", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);
+                       AssertDataColumn ("el4_attrD", dt.Columns [1], "attrD", true, false, 0, 1, "attrD", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false);
+                       AssertDataColumn ("el4_Text", dt.Columns [2], "el4_Text", true, false, 0, 1, "el4_Text", MappingType.SimpleContent, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 2, String.Empty, false, false);
+                       AssertDataColumn ("el4_el2Id", dt.Columns [3], "el2_Id", true, false, 0, 1, "el2_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 3, String.Empty, false, false);
                }
 
                [Test]
@@ -301,8 +301,8 @@ namespace MonoTests.System.Data
                        AssertDataSet ("ds", ds, "NewDataSet", 1, 0);
                        DataTable dt = ds.Tables [0];
                        AssertDataTable ("dt", dt, "root", 2, 0, 0, 0, 0, 0);
-                       AssertDataColumn ("element", dt.Columns ["child_after_significant_space"], "child_after_significant_space", true, false, 0, 1, "child_after_significant_space", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);
-                       AssertDataColumn ("xml:space", dt.Columns ["space"], "space", true, false, 0, 1, "space", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, "http://www.w3.org/XML/1998/namespace", 1, "xml", false, false);
+                       AssertDataColumn ("element", dt.Columns [0], "child_after_significant_space", true, false, 0, 1, "child_after_significant_space", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);
+                       AssertDataColumn ("xml:space", dt.Columns [1], "space", true, false, 0, 1, "space", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, "http://www.w3.org/XML/1998/namespace", 1, "xml", false, false);
                }
 
                [Test]
@@ -403,8 +403,8 @@ namespace MonoTests.System.Data
 
                        dt = ds.Tables [1];
                        AssertDataTable ("dt", dt, "col", 2, 0, 1, 0, 1, 0);
-                       AssertDataColumn ("table_refId", dt.Columns [0], "table_Id", true, false, 0, 1, "table_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);
-                       AssertDataColumn ("another_col", dt.Columns [1], "another_col", true, false, 0, 1, "another_col", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false);
+                       AssertDataColumn ("table_refId", dt.Columns ["table_Id"], "table_Id", true, false, 0, 1, "table_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, /*0*/-1, String.Empty, false, false);
+                       AssertDataColumn ("another_col", dt.Columns ["another_col"], "another_col", true, false, 0, 1, "another_col", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, /*1*/-1, String.Empty, false, false);
 
                        DataRelation dr = ds.Relations [0];
                        AssertDataRelation ("rel", dr, "table_col", true, new string [] {"table_Id"}, new string [] {"table_Id"}, true, true);
@@ -426,8 +426,8 @@ namespace MonoTests.System.Data
                        dt = ds.Tables [1];
                        AssertDataTable ("dt", dt, "col", 3, 0, 1, 0, 1, 0);
                        AssertDataColumn ("another_col", dt.Columns [0], "another_col", true, false, 0, 1, "another_col", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);
-                       AssertDataColumn ("table_refId", dt.Columns [1], "table_Id", true, false, 0, 1, "table_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false);
-                       AssertDataColumn ("attr", dt.Columns [2], "attr", true, false, 0, 1, "attr", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 2, String.Empty, false, false);
+                       AssertDataColumn ("table_refId", dt.Columns ["table_Id"], "table_Id", true, false, 0, 1, "table_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, /*1*/-1, String.Empty, false, false);
+                       AssertDataColumn ("attr", dt.Columns ["attr"], "attr", true, false, 0, 1, "attr", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, /*2*/-1, String.Empty, false, false);
 
                        DataRelation dr = ds.Relations [0];
                        AssertDataRelation ("rel", dr, "table_col", true, new string [] {"table_Id"}, new string [] {"table_Id"}, true, true);
@@ -459,5 +459,21 @@ namespace MonoTests.System.Data
                        xtr.Read ();\r
                        ds.ReadXml (xtr, XmlReadMode.InferSchema);
                }
+
+               [Test]
+               public void IgnoredNamespaces ()
+               {
+                       string xml = "<root attr='val' xmlns:a='urn:foo' a:foo='hogehoge' />";
+                       DataSet ds = new DataSet ();
+                       ds.InferXmlSchema (new StringReader (xml), null);
+                       AssertDataSet ("ds", ds, "NewDataSet", 1, 0);
+                       AssertDataTable ("dt", ds.Tables [0], "root", 2, 0, 0, 0, 0, 0);
+
+                       ds = new DataSet ();
+                       ds.InferXmlSchema (new StringReader (xml), new string [] {"urn:foo"});
+                       AssertDataSet ("ds", ds, "NewDataSet", 1, 0);
+                       // a:foo is ignored
+                       AssertDataTable ("dt", ds.Tables [0], "root", 1, 0, 0, 0, 0, 0);
+               }
        }
 }
index 8751c22797b18d84635abc594c9ee9712cebcdfb..c6b9b5cfe20d7850767f646fddf3036ea80f01e9 100755 (executable)
@@ -132,9 +132,9 @@ namespace MonoTests.System.Data
                        AssertDataTable ("complex", ds.Tables [0], "Root", 1, 0, 0, 1, 1, 1);\r
                        DataTable dt = ds.Tables [1];\r
                        AssertDataTable ("complex", dt, "Child", 3, 0, 1, 0, 1, 0);\r
-                       AssertDataColumn ("a1", dt.Columns ["a1"], "a1", true, false, 0, 1, "a1", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);\r
-                       AssertDataColumn ("a2", dt.Columns ["a2"], "a2", true, false, 0, 1, "a2", MappingType.Attribute, typeof (long), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false);\r
-                       AssertDataColumn ("Root_Id", dt.Columns ["Root_Id"], "Root_Id", true, false, 0, 1, "Root_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 2, String.Empty, false, false);\r
+                       AssertDataColumn ("a1", dt.Columns ["a1"], "a1", true, false, 0, 1, "a1", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, /*0*/-1, String.Empty, false, false);\r
+                       AssertDataColumn ("a2", dt.Columns ["a2"], "a2", true, false, 0, 1, "a2", MappingType.Attribute, typeof (long), DBNull.Value, String.Empty, -1, String.Empty, /*1*/-1, String.Empty, false, false);\r
+                       AssertDataColumn ("Root_Id", dt.Columns [2], "Root_Id", true, false, 0, 1, "Root_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 2, String.Empty, false, false);\r
 \r
                        // xsbase + complex -> dataset\r
                        ds = new DataSet ();\r
@@ -502,15 +502,15 @@ namespace MonoTests.System.Data
                        DataTable dt = ds.Tables [0];\r
                        AssertDataTable ("tab", dt, "foo", 2, 0, 0, 0, 0, 0);\r
                        AssertDataColumn ("attr", dt.Columns [0], "attr", true, false, 0, 1, "attr", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);\r
-                       AssertDataColumn ("text", dt.Columns [1], "foo_text", false, false, 0, 1, "foo_text", MappingType.SimpleContent, typeof (long), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);\r
+                       AssertDataColumn ("text", dt.Columns [1], "foo_text", false, false, 0, 1, "foo_text", MappingType.SimpleContent, typeof (long), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false);\r
 \r
                        ds = new DataSet ();\r
                        ds.ReadXmlSchema ("Test/System.Data/schemas/test006.xsd");\r
                        AssertDataSet ("006", ds, "NewDataSet", 1, 0);\r
                        dt = ds.Tables [0];\r
                        AssertDataTable ("tab", dt, "foo", 2, 0, 0, 0, 0, 0);\r
-                       AssertDataColumn ("att1", dt.Columns ["att1"], "att1", true, false, 0, 1, "att1", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);\r
-                       AssertDataColumn ("att2", dt.Columns ["att2"], "att2", true, false, 0, 1, "att2", MappingType.Attribute, typeof (int), 2, String.Empty, -1, String.Empty, 1, String.Empty, false, false);\r
+                       AssertDataColumn ("att1", dt.Columns ["att1"], "att1", true, false, 0, 1, "att1", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, /*0*/-1, String.Empty, false, false);\r
+                       AssertDataColumn ("att2", dt.Columns ["att2"], "att2", true, false, 0, 1, "att2", MappingType.Attribute, typeof (int), 2, String.Empty, -1, String.Empty, /*1*/-1, String.Empty, false, false);\r
                }\r
 \r
                [Test]\r
@@ -526,7 +526,7 @@ namespace MonoTests.System.Data
 \r
                        dt = ds.Tables [1];\r
                        AssertDataTable ("tab2", dt, "des", 2, 0, 1, 0, 1, 0);\r
-                       AssertDataColumn ("child", dt.Columns [0], "tres", false, false, 0, 1, "tres", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false);\r
+                       AssertDataColumn ("child", dt.Columns [0], "tres", false, false, 0, 1, "tres", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);\r
                        AssertDataColumn ("id", dt.Columns [1], "uno_Id", true, false, 0, 1, "uno_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false);\r
 \r
                        // External simple type element\r
@@ -539,7 +539,7 @@ namespace MonoTests.System.Data
 \r
                        dt = ds.Tables [1];\r
                        AssertDataTable ("tab2", dt, "des", 2, 0, 1, 0, 1, 0);\r
-                       AssertDataColumn ("child", dt.Columns [0], "tres", false, false, 0, 1, "tres", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, "urn:foo", 1, String.Empty, false, false);\r
+                       AssertDataColumn ("child", dt.Columns [0], "tres", false, false, 0, 1, "tres", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, "urn:foo", 0, String.Empty, false, false);\r
                        AssertDataColumn ("id", dt.Columns [1], "uno_Id", true, false, 0, 1, "uno_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false);\r
 \r
                }\r
@@ -563,15 +563,15 @@ namespace MonoTests.System.Data
                        // Columns[0], even though "local" is defined in prior.\r
                        dt = ds.Tables [1];\r
                        AssertDataTable ("dos", dt, "des", 4, 0, 1, 0, 1, 0);\r
-                       AssertDataColumn ("dos.child", dt.Columns ["local"], "local", true, false, 0, 1, "local", MappingType.Attribute, typeof (string), "san", String.Empty, -1, String.Empty, 1, String.Empty, false, false);\r
+                       AssertDataColumn ("dos.child", dt.Columns ["local"], "local", true, false, 0, 1, "local", MappingType.Attribute, typeof (string), "san", String.Empty, -1, String.Empty, /*0*/-1, String.Empty, false, false);\r
                        // LAMESPEC: (MS BUG) default value is overwritten, but MS.NET is ignorant of that.\r
 #if BUGGY_MS_COMPATIBLE\r
-                       AssertDataColumn ("dos.global", dt.Columns ["global"], "global", true, false, 0, 1, "global", MappingType.Attribute, typeof (string), "er", String.Empty, -1, "urn:foo", 0, String.Empty, false, false);\r
+                       AssertDataColumn ("dos.global", dt.Columns ["global"], "global", true, false, 0, 1, "global", MappingType.Attribute, typeof (string), "er", String.Empty, -1, "urn:foo", /*1*/-1, String.Empty, false, false);\r
 #else\r
-                       AssertDataColumn ("dos.global", dt.Columns ["global"], "global", true, false, 0, 1, "global", MappingType.Attribute, typeof (string), "si", String.Empty, -1, "urn:foo", 0, String.Empty, false, false);\r
+                       AssertDataColumn ("dos.global", dt.Columns ["global"], "global", true, false, 0, 1, "global", MappingType.Attribute, typeof (string), "si", String.Empty, -1, "urn:foo", /*1*/-1, String.Empty, false, false);\r
 #endif\r
-                       AssertDataColumn ("dos.tres", dt.Columns ["tres"], "tres", false, false, 0, 1, "tres", MappingType.Element, typeof (string), "yi", String.Empty, -1, "urn:foo", 1, String.Empty, false, false);\r
-                       AssertDataColumn ("id", dt.Columns ["uno_Id"], "uno_Id", true, false, 0, 1, "uno_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false);\r
+                       AssertDataColumn ("dos.tres", dt.Columns [2], "tres", false, false, 0, 1, "tres", MappingType.Element, typeof (string), "yi", String.Empty, -1, "urn:foo", 2, String.Empty, false, false);\r
+                       AssertDataColumn ("id", dt.Columns [3], "uno_Id", true, false, 0, 1, "uno_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 3, String.Empty, false, false);\r
 \r
                        AssertDataRelation ("rel", ds.Relations [0], "uno_des", true, new string [] {"uno_Id"}, new string [] {"uno_Id"}, true, true);\r
                }\r
@@ -598,8 +598,8 @@ namespace MonoTests.System.Data
                        DataTable dt = ds.Tables [0];\r
                        AssertDataTable ("root", dt, "e", 3, 0, 1, 0, 1, 0);\r
                        AssertDataColumn ("attr", dt.Columns [0], "a", true, false, 0, 1, "a", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, "http://xsdtesting", 0, String.Empty, false, false);\r
-                       AssertDataColumn ("simple", dt.Columns [1], "e_text", false, false, 0, 1, "e_text", MappingType.SimpleContent, typeof (decimal), DBNull.Value, String.Empty, -1, "http://xsdtesting", 0, String.Empty, false, false);\r
-                       AssertDataColumn ("hidden", dt.Columns [2], "root_Id", true, false, 0, 1, "root_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, "http://xsdtesting", 0, String.Empty, false, false);\r
+                       AssertDataColumn ("simple", dt.Columns [1], "e_text", false, false, 0, 1, "e_text", MappingType.SimpleContent, typeof (decimal), DBNull.Value, String.Empty, -1, "http://xsdtesting", 1, String.Empty, false, false);\r
+                       AssertDataColumn ("hidden", dt.Columns [2], "root_Id", true, false, 0, 1, "root_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, "http://xsdtesting", 2, String.Empty, false, false);\r
 \r
                        dt = ds.Tables [1];\r
                        AssertDataTable ("root", dt, "root", 1, 0, 0, 1, 1, 1);\r
@@ -618,7 +618,7 @@ namespace MonoTests.System.Data
                        DataTable dt = ds.Tables [0];\r
                        AssertDataTable ("root", dt, "e", 2, 0, 0, 0, 0, 0);\r
                        AssertDataColumn ("attr", dt.Columns [0], "a", true, false, 0, 1, "a", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);\r
-                       AssertDataColumn ("simple", dt.Columns [1], "e_text", false, false, 0, 1, "e_text", MappingType.SimpleContent, typeof (decimal), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);\r
+                       AssertDataColumn ("simple", dt.Columns [1], "e_text", false, false, 0, 1, "e_text", MappingType.SimpleContent, typeof (decimal), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false);\r
                }\r
 \r
                [Test]\r
@@ -629,11 +629,11 @@ namespace MonoTests.System.Data
                        AssertDataSet ("101", ds, "root", 2, 1);\r
                        DataTable dt = ds.Tables [0];\r
                        AssertDataTable ("parent_table", dt, "p", 2, 0, 0, 1, 0, 0);\r
-                       AssertDataColumn ("pk", dt.Columns ["pk"], "pk", false, false, 0, 1, "pk", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);\r
+                       AssertDataColumn ("pk", dt.Columns [0], "pk", false, false, 0, 1, "pk", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);\r
 \r
                        dt = ds.Tables [1];\r
                        AssertDataTable ("child_table", dt, "c", 2, 0, 1, 0, 0, 0);\r
-                       AssertDataColumn ("fk", dt.Columns ["fk"], "fk", false, false, 0, 1, "fk", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);\r
+                       AssertDataColumn ("fk", dt.Columns [0], "fk", false, false, 0, 1, "fk", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);\r
 \r
                        AssertDataRelation ("rel", ds.Relations [0], "rel", false, new string [] {"pk"}, new string [] {"fk"}, false, false);\r
                }\r
@@ -646,11 +646,11 @@ namespace MonoTests.System.Data
                        AssertDataSet ("102", ds, "ds", 2, 1);\r
                        DataTable dt = ds.Tables [0];\r
                        AssertDataTable ("parent_table", dt, "p", 2, 0, 0, 1, 0, 0);\r
-                       AssertDataColumn ("pk", dt.Columns ["pk"], "pk", false, false, 0, 1, "pk", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);\r
+                       AssertDataColumn ("pk", dt.Columns [0], "pk", false, false, 0, 1, "pk", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);\r
 \r
                        dt = ds.Tables [1];\r
                        AssertDataTable ("child_table", dt, "c", 2, 0, 1, 0, 0, 0);\r
-                       AssertDataColumn ("fk", dt.Columns ["fk"], "fk", false, false, 0, 1, "fk", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);\r
+                       AssertDataColumn ("fk", dt.Columns [0], "fk", false, false, 0, 1, "fk", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);\r
 \r
                        AssertDataRelation ("rel", ds.Relations [0], "rel", true, new string [] {"pk"}, new string [] {"fk"}, false, false);\r
                }\r
@@ -668,7 +668,7 @@ namespace MonoTests.System.Data
                        dt = ds.Tables [1];\r
                        AssertDataTable ("repeated", dt, "Bar", 2, 0, 1, 0, 1, 0);\r
                        AssertDataColumn ("data", dt.Columns [0], "Bar_Column", false, false, 0, 1, "Bar_Column", MappingType.SimpleContent, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);\r
-                       AssertDataColumn ("refkey", dt.Columns [1], "Foo_Id", true, false, 0, 1, "Foo_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);\r
+                       AssertDataColumn ("refkey", dt.Columns [1], "Foo_Id", true, false, 0, 1, "Foo_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false);\r
 \r
                        AssertDataRelation ("rel", ds.Relations [0], "Foo_Bar", true, new string [] {"Foo_Id"}, new string [] {"Foo_Id"}, true, true);\r
                }\r
@@ -687,12 +687,12 @@ namespace MonoTests.System.Data
                        dt = ds.Tables [1];\r
                        AssertDataTable ("repeated", dt, "x", 2, 0, 1, 0, 1, 0);\r
                        AssertDataColumn ("data_1", dt.Columns [0], "x_Column", false, false, 0, 1, "x_Column", MappingType.SimpleContent, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);\r
-                       AssertDataColumn ("refkey_1", dt.Columns [1], "root_Id", true, false, 0, 1, "root_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);\r
+                       AssertDataColumn ("refkey_1", dt.Columns [1], "root_Id", true, false, 0, 1, "root_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false);\r
 \r
                        dt = ds.Tables [2];\r
                        AssertDataTable ("repeated", dt, "y", 2, 0, 1, 0, 1, 0);\r
                        AssertDataColumn ("data", dt.Columns [0], "y_Column", false, false, 0, 1, "y_Column", MappingType.SimpleContent, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);\r
-                       AssertDataColumn ("refkey", dt.Columns [1], "root_Id", true, false, 0, 1, "root_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);\r
+                       AssertDataColumn ("refkey", dt.Columns [1], "root_Id", true, false, 0, 1, "root_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false);\r
 \r
                        AssertDataRelation ("rel", ds.Relations [0], "root_x", true, new string [] {"root_Id"}, new string [] {"root_Id"}, true, true);\r
 \r