+2008-12-09 Atsushi Enomoto <atsushi@ximian.com>
+
+ * Iterator.cs : DescendantIterator.Clone() was not cloning current
+ node in new code. Fixed bug #456103.
+
2008-10-08 Atsushi Enomoto <atsushi@ximian.com>
* Expression.cs : fix WeakReference usage for such case that it
public DescendantIterator (BaseIterator iter) : base (iter) {}
- private DescendantIterator (DescendantIterator other) : base (other)
+ private DescendantIterator (DescendantIterator other) : base (other, true)
{
_depth = other._depth;
_finished = other._finished;
+2008-12-09 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XPathNavigatorTests.cs : added test fo bug #456103.
+
2008-10-02 Atsushi Enomoto <atsushi@ximian.com>
* XPathNavigatorEvaluateTests.cs : corrected couple of misconception
AssertEquals ("#2", true, nav.Matches ("text()"));
}
+ [Test]
+ public void Bug456103 ()
+ {
+ XmlDocument doc = new XmlDocument ();
+ doc.LoadXml ("<root><X/></root>");
+
+ XPathNavigator nav = doc.DocumentElement.CreateNavigator ();
+ // ".//*" does not reproduce the bug.
+ var i = nav.Select ("descendant::*");
+
+ // without this call to get_Count() the bug does not reproduce.
+ AssertEquals ("#1", 1, i.Count);
+
+ Assert ("#2", i.MoveNext ());
+ }
+
#if NET_2_0
[Test]
public void ValueAsBoolean ()