[Sys.Data] fix wrong test in XmlDataDocument.
authorAtsushi Eno <atsushieno@gmail.com>
Tue, 20 Jan 2015 09:42:15 +0000 (18:42 +0900)
committerAtsushi Eno <atsushieno@gmail.com>
Mon, 2 Mar 2015 03:36:40 +0000 (11:36 +0800)
This doesn't match .NET behavior.
(Found by referencesource import, verified w/ .NET 4.5.)

mcs/class/System.Data/Test/System.Xml/XmlDataDocumentTest2.cs

index b9a4a2c2a5e04de3d2e8b3f602714e530e40111e..cc8196e0c9681eb1f568b93e8cc7f6ccb8e2b72c 100644 (file)
@@ -287,12 +287,8 @@ namespace MonoTests.System.Xml
                        // No exception shud be thrown
                        XmlDataDocument doc = new XmlDataDocument (ds);
 
-                       // Should fail to save as there are no rows
-                       try {
-                               doc.Save (new StringWriter ());
-                               Fail ("#1");
-                       } catch (InvalidOperationException) {
-                       }
+                       // Should not fail to save because of "no rows"
+                       doc.Save (new StringWriter ());
 
                        table1.Rows.Add (new object[] {0});
                        table1.Rows.Add (new object[] {1});