Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mcs/class/System.XML/Test/System.Xml/ChangeLog5
-rw-r--r--mcs/class/System.XML/Test/System.Xml/XmlReaderCommonTests.cs30
2 files changed, 35 insertions, 0 deletions
diff --git a/mcs/class/System.XML/Test/System.Xml/ChangeLog b/mcs/class/System.XML/Test/System.Xml/ChangeLog
index 79e060eddb1..55efc053735 100644
--- a/mcs/class/System.XML/Test/System.Xml/ChangeLog
+++ b/mcs/class/System.XML/Test/System.Xml/ChangeLog
@@ -1,3 +1,8 @@
+2004-03-15 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XmlReaderCommonTests.cs : Added tests for ReadInner/OuterXml() on
+ EndElement.
+
2004-03-14 Atsushi Enomoto <atsushi@ximian.com>
* XmlAttributeCollectionTests.cs : Added InsertAfterError().
diff --git a/mcs/class/System.XML/Test/System.Xml/XmlReaderCommonTests.cs b/mcs/class/System.XML/Test/System.Xml/XmlReaderCommonTests.cs
index 0014698966e..31b71b576bc 100644
--- a/mcs/class/System.XML/Test/System.Xml/XmlReaderCommonTests.cs
+++ b/mcs/class/System.XML/Test/System.Xml/XmlReaderCommonTests.cs
@@ -1372,5 +1372,35 @@ namespace MonoTests.System.Xml
AssertEquals (0xD800, (int) xmlReader.Value [0]);
AssertEquals (0xDD00, (int) xmlReader.Value [1]);
}
+
+ [Test]
+ public void ReadOuterXmlOnEndElement ()
+ {
+ string xml = "<root><foo></foo></root>";
+ RunTest (xml, new TestMethod (ReadOuterXmlOnEndElement));
+ }
+
+ public void ReadOuterXmlOnEndElement (XmlReader xmlReader)
+ {
+ xmlReader.Read ();
+ xmlReader.Read ();
+ xmlReader.Read ();
+ AssertEquals (String.Empty, xmlReader.ReadOuterXml ());
+ }
+
+ [Test]
+ public void ReadInnerXmlOnEndElement ()
+ {
+ string xml = "<root><foo></foo></root>";
+ RunTest (xml, new TestMethod (ReadInnerXmlOnEndElement));
+ }
+
+ public void ReadInnerXmlOnEndElement (XmlReader xmlReader)
+ {
+ xmlReader.Read ();
+ xmlReader.Read ();
+ xmlReader.Read ();
+ AssertEquals (String.Empty, xmlReader.ReadInnerXml ());
+ }
}
}