Author: gert
Date: 2006-11-26 08:51:50 -0500 (Sun, 26 Nov 2006)
New Revision: 68475

Modified:
   trunk/mcs/class/System.Data/Test/System.Data/ChangeLog
   trunk/mcs/class/System.Data/Test/System.Data/DataSetReadXmlTest.cs
Log:
* DataSetReadXmlTest.cs: Added NotWorking test for bug #80045.


Modified: trunk/mcs/class/System.Data/Test/System.Data/ChangeLog
===================================================================
--- trunk/mcs/class/System.Data/Test/System.Data/ChangeLog      2006-11-26 
13:49:21 UTC (rev 68474)
+++ trunk/mcs/class/System.Data/Test/System.Data/ChangeLog      2006-11-26 
13:51:50 UTC (rev 68475)
@@ -1,3 +1,7 @@
+2006-11-26  Gert Driesen  <[EMAIL PROTECTED]>
+
+       * DataSetReadXmlTest.cs: Added NotWorking test for bug #80045.
+
 2006-11-21  Nagappan A  <[EMAIL PROTECTED]>
 
        * DataViewTest.cs (BeginInit2): Checks for the data view public

Modified: trunk/mcs/class/System.Data/Test/System.Data/DataSetReadXmlTest.cs
===================================================================
--- trunk/mcs/class/System.Data/Test/System.Data/DataSetReadXmlTest.cs  
2006-11-26 13:49:21 UTC (rev 68474)
+++ trunk/mcs/class/System.Data/Test/System.Data/DataSetReadXmlTest.cs  
2006-11-26 13:51:50 UTC (rev 68475)
@@ -4,37 +4,37 @@
 // Author:
 //     Atsushi Enomoto <[EMAIL PROTECTED]>
 //
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
 
+//
+// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
 
 using System;
+using System.Data;
 using System.IO;
-using System.Data;
 using System.Text;
 using System.Xml;
 using System.Xml.Serialization;
+
 using NUnit.Framework;
 
 namespace MonoTests.System.Data
@@ -668,5 +668,46 @@
                        ds.ReadXml (new StringReader (xml));
                        AssertNotNull (ds.Tables ["PriceListDetails"]);
                }
+
+               [Test] // bug #80045
+               [Category ("NotWorking")]
+               public void ColumnOrder ()
+               {
+                       string xml = "<?xml version=\"1.0\" 
standalone=\"yes\"?>" +
+                               "<NewDataSet>" +
+                               "  <Table>" +
+                               "    <Name>Miguel</Name>" +
+                               "    <FirstName>de Icaza</FirstName>" +
+                               "    <Income>4000</Income>" +
+                               "  </Table>" +
+                               "  <Table>" +
+                               "    <Name>25</Name>" +
+                               "    <FirstName>250</FirstName>" +
+                               "    <Address>Belgium</Address>" +
+                               "    <Income>5000</Income>" +
+                               "</Table>" +
+                               "</NewDataSet>";
+
+                       DataSet ds = new DataSet ();
+                       ds.ReadXml (new StringReader (xml));
+                       AssertEquals ("#1", 1, ds.Tables.Count);
+                       AssertNotNull ("#2", ds.Tables ["Table"]);
+                       AssertEquals ("#3", 4, ds.Tables [0].Columns.Count);
+                       AssertEquals ("#4a", "Name", ds.Tables [0].Columns 
[0].ColumnName);
+                       AssertEquals ("#4b", 0, ds.Tables [0].Columns 
[0].Ordinal);
+                       AssertEquals ("#5a", "FirstName", ds.Tables [0].Columns 
[1].ColumnName);
+                       AssertEquals ("#5b", 1, ds.Tables [0].Columns 
[1].Ordinal);
+#if NET_2_0
+                       AssertEquals ("#6a", "Address", ds.Tables [0].Columns 
[2].ColumnName);
+                       AssertEquals ("#6b", 2, ds.Tables [0].Columns 
[2].Ordinal);
+                       AssertEquals ("#7a", "Income", ds.Tables [0].Columns 
[3].ColumnName);
+                       AssertEquals ("#7b", 3, ds.Tables [0].Columns 
[3].Ordinal);
+#else
+                       AssertEquals ("#6a", "Income", ds.Tables [0].Columns 
[2].ColumnName);
+                       AssertEquals ("#6b", 2, ds.Tables [0].Columns 
[2].Ordinal);
+                       AssertEquals ("#7a", "Address", ds.Tables [0].Columns 
[3].ColumnName);
+                       AssertEquals ("#7b", 3, ds.Tables [0].Columns 
[3].Ordinal);
+#endif
+               }
        }
 }


Property changes on: 
trunk/mcs/class/System.Data/Test/System.Data/DataSetReadXmlTest.cs
___________________________________________________________________
Name: svn:eol-style
   + CRLF

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to