Author: atsushi
Date: 2005-12-14 03:25:40 -0500 (Wed, 14 Dec 2005)
New Revision: 54351
Modified:
trunk/mcs/class/System.XML/Test/System.Xml/ChangeLog
trunk/mcs/class/System.XML/Test/System.Xml/XmlAttributeTests.cs
trunk/mcs/class/System.XML/Test/System.Xml/XmlDocumentTests.cs
trunk/mcs/class/System.XML/Test/System.Xml/XmlNodeTests.cs
Log:
2005-12-14 Atsushi Enomoto <[EMAIL PROTECTED]>
* XmlDocumentTests.cs : (CreateNodeNodeTypeName) the previous fix was
wrong; ArgumentException is the expected exception (it anyways won't
work under MS.NET 2.0).
* XmlNodeTests.cs : added labels to assertions. another NotDotNet case.
* XmlAttributeTests.cs : ditto.
Modified: trunk/mcs/class/System.XML/Test/System.Xml/ChangeLog
===================================================================
--- trunk/mcs/class/System.XML/Test/System.Xml/ChangeLog 2005-12-14
08:20:54 UTC (rev 54350)
+++ trunk/mcs/class/System.XML/Test/System.Xml/ChangeLog 2005-12-14
08:25:40 UTC (rev 54351)
@@ -1,5 +1,13 @@
2005-12-14 Atsushi Enomoto <[EMAIL PROTECTED]>
+ * XmlDocumentTests.cs : (CreateNodeNodeTypeName) the previous fix was
+ wrong; ArgumentException is the expected exception (it anyways won't
+ work under MS.NET 2.0).
+ * XmlNodeTests.cs : added labels to assertions. another NotDotNet case.
+ * XmlAttributeTests.cs : ditto.
+
+2005-12-14 Atsushi Enomoto <[EMAIL PROTECTED]>
+
* XmlDocumentTests.cs, XmlAttributeCollectionTests.cs
XmlElementTests.cs, XmlCharacterDataTests.cs :
Marked NotDotNet for some tests broken under 2.0 (MS bugs).
Modified: trunk/mcs/class/System.XML/Test/System.Xml/XmlAttributeTests.cs
===================================================================
--- trunk/mcs/class/System.XML/Test/System.Xml/XmlAttributeTests.cs
2005-12-14 08:20:54 UTC (rev 54350)
+++ trunk/mcs/class/System.XML/Test/System.Xml/XmlAttributeTests.cs
2005-12-14 08:25:40 UTC (rev 54351)
@@ -151,6 +151,9 @@
}
[Test]
+#if NET_2_0
+ [Category ("NotDotNet")] // enbug in 2.0
+#endif
public void SetInnerTextAndXml ()
{
string original = doc.OuterXml;
@@ -164,9 +167,10 @@
AssertEquals ("setInnerXml.InnerXml", "'a&b'",
attr.InnerXml);
AssertEquals ("setInnerXml.Value", "'a&b'", attr.Value);
attr.InnerXml = "\"a&b\"";
- AssertEquals ("\"a&b\"", attr.InnerXml);
+ AssertEquals ("Double_Quote", "\"a&b\"",
attr.InnerXml);
attr.InnerXml = "\"a&b'";
- AssertEquals ("\"a&b'", attr.InnerXml);
+ AssertEquals ("DoubleQuoteStart_SingleQuoteEnd",
+ "\"a&b'", attr.InnerXml);
attr.Value = "";
XmlNodeChangedEventHandler evInserted = new
XmlNodeChangedEventHandler (EventNodeInserted);
Modified: trunk/mcs/class/System.XML/Test/System.Xml/XmlDocumentTests.cs
===================================================================
--- trunk/mcs/class/System.XML/Test/System.Xml/XmlDocumentTests.cs
2005-12-14 08:20:54 UTC (rev 54350)
+++ trunk/mcs/class/System.XML/Test/System.Xml/XmlDocumentTests.cs
2005-12-14 08:25:40 UTC (rev 54351)
@@ -213,11 +213,7 @@
try {
node = document.CreateNode ("foo", null, null);
Fail ("Expected an ArgumentException to be
thrown.");
-#if NET_2_0
- } catch (ArgumentNullException) {}
-#else
- } catch (ArgumentException) {} // makes less sense
-#endif
+ } catch (ArgumentException) {}
// .NET 2.0 fails here.
node = document.CreateNode("attribute", "foo", null);
Modified: trunk/mcs/class/System.XML/Test/System.Xml/XmlNodeTests.cs
===================================================================
--- trunk/mcs/class/System.XML/Test/System.Xml/XmlNodeTests.cs 2005-12-14
08:20:54 UTC (rev 54350)
+++ trunk/mcs/class/System.XML/Test/System.Xml/XmlNodeTests.cs 2005-12-14
08:25:40 UTC (rev 54351)
@@ -126,18 +126,28 @@
document.LoadXml ("<root xmlns='urn:default'
attr='value' "
+ "xml:lang='en' xmlns:foo='urn:foo'
foo:att='fooatt'>text node</root>");
XmlNode n = document.DocumentElement;
- AssertEquals ("urn:default", n.GetNamespaceOfPrefix
(String.Empty));
- AssertEquals ("urn:foo", n.GetNamespaceOfPrefix
("foo"));
- AssertEquals (String.Empty, n.GetNamespaceOfPrefix
("bar"));
- AssertEquals (String.Empty, n.GetNamespaceOfPrefix
("xml"));
- AssertEquals (String.Empty, n.GetNamespaceOfPrefix
("xmlns"));
+ AssertEquals ("#1", "urn:default",
n.GetNamespaceOfPrefix (String.Empty));
+ AssertEquals ("#2", "urn:foo", n.GetNamespaceOfPrefix
("foo"));
+ AssertEquals ("#3", String.Empty,
n.GetNamespaceOfPrefix ("bar"));
+#if NET_2_0
+ AssertEquals ("#4",
"http://www.w3.org/XML/1998/namespace", n.GetNamespaceOfPrefix ("xml"));
+ AssertEquals ("#5", "http://www.w3.org/2000/xmlns/",
n.GetNamespaceOfPrefix ("xmlns"));
+#else
+ AssertEquals ("#4", String.Empty,
n.GetNamespaceOfPrefix ("xml"));
+ AssertEquals ("#5", String.Empty,
n.GetNamespaceOfPrefix ("xmlns"));
+#endif
n = document.DocumentElement.FirstChild;
- AssertEquals ("urn:default", n.GetNamespaceOfPrefix
(String.Empty));
- AssertEquals ("urn:foo", n.GetNamespaceOfPrefix
("foo"));
- AssertEquals (String.Empty, n.GetNamespaceOfPrefix
("bar"));
- AssertEquals (String.Empty, n.GetNamespaceOfPrefix
("xml"));
- AssertEquals (String.Empty, n.GetNamespaceOfPrefix
("xmlns"));
+ AssertEquals ("#6", "urn:default",
n.GetNamespaceOfPrefix (String.Empty));
+ AssertEquals ("#7", "urn:foo", n.GetNamespaceOfPrefix
("foo"));
+ AssertEquals ("#8", String.Empty,
n.GetNamespaceOfPrefix ("bar"));
+#if NET_2_0
+ AssertEquals ("#9",
"http://www.w3.org/XML/1998/namespace", n.GetNamespaceOfPrefix ("xml"));
+ AssertEquals ("#10", "http://www.w3.org/2000/xmlns/",
n.GetNamespaceOfPrefix ("xmlns"));
+#else
+ AssertEquals ("#9", String.Empty,
n.GetNamespaceOfPrefix ("xml"));
+ AssertEquals ("#10", String.Empty,
n.GetNamespaceOfPrefix ("xmlns"));
+#endif
}
[Test]
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches