Add new test
authorMarek Safar <marek.safar@gmail.com>
Thu, 28 Jun 2012 17:14:13 +0000 (18:14 +0100)
committerMarek Safar <marek.safar@gmail.com>
Thu, 28 Jun 2012 17:15:10 +0000 (18:15 +0100)
mcs/class/System.Xml.Linq/Test/System.Xml.XPath/ExtensionsTest.cs

index a3c07501abd97d50a79f024f2285dd3f6f8c262e..c86f06b13ef2b2b1e3a4e4cf345165a23b3181ed 100644 (file)
@@ -37,6 +37,7 @@ using System.Xml;
 using System.Xml.Linq;
 using System.Xml.XPath;
 using NUnit.Framework;
+using System.Collections.Generic;
 
 namespace MonoTests.System.Xml
 {
@@ -463,6 +464,13 @@ namespace MonoTests.System.Xml
                        att.Cast<XAttribute> ().FirstOrDefault ();
                }
 
+               [Test] // bug #5902
+               public void EvaluateNodeSetAsEnumerableOfObject ()
+               {
+                       var root = XDocument.Parse("<config><item name=\"A\" /></config>");
+                       Assert.IsTrue (root.XPathSelectElements ("config/*").First ().XPathEvaluate (".") is IEnumerable<object>);
+               }
+
                [Test] // bug #2146
                public void RemoveDoesSnapshotCopy ()
                {