Author: atsushi
Date: 2005-12-14 01:54:23 -0500 (Wed, 14 Dec 2005)
New Revision: 54345
Modified:
trunk/mcs/class/System.XML/Test/System.Xml/ChangeLog
trunk/mcs/class/System.XML/Test/System.Xml/XmlAttributeCollectionTests.cs
trunk/mcs/class/System.XML/Test/System.Xml/XmlCharacterDataTests.cs
trunk/mcs/class/System.XML/Test/System.Xml/XmlDocumentTests.cs
trunk/mcs/class/System.XML/Test/System.Xml/XmlElementTests.cs
Log:
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).
Marked Ignore for some tests which originally does not make sense.
Changed types in ExpectedException for some tests under 2.0.
Modified: trunk/mcs/class/System.XML/Test/System.Xml/ChangeLog
===================================================================
--- trunk/mcs/class/System.XML/Test/System.Xml/ChangeLog 2005-12-14
06:52:29 UTC (rev 54344)
+++ trunk/mcs/class/System.XML/Test/System.Xml/ChangeLog 2005-12-14
06:54:23 UTC (rev 54345)
@@ -1,3 +1,11 @@
+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).
+ Marked Ignore for some tests which originally does not make sense.
+ Changed types in ExpectedException for some tests under 2.0.
+
2005-12-12 Atsushi Enomoto <[EMAIL PROTECTED]>
* XmlAssert.cs : new file.
Modified:
trunk/mcs/class/System.XML/Test/System.Xml/XmlAttributeCollectionTests.cs
===================================================================
--- trunk/mcs/class/System.XML/Test/System.Xml/XmlAttributeCollectionTests.cs
2005-12-14 06:52:29 UTC (rev 54344)
+++ trunk/mcs/class/System.XML/Test/System.Xml/XmlAttributeCollectionTests.cs
2005-12-14 06:54:23 UTC (rev 54345)
@@ -193,6 +193,9 @@
}
[Test]
+#if NET_2_0
+ [Category ("NotDotNet")] // enbug
+#endif
public void RemoveDefaultAttribute ()
{
string dtd = "<!DOCTYPE root [<!ELEMENT root
EMPTY><!ATTLIST root attr CDATA 'default'>]>";
Modified: trunk/mcs/class/System.XML/Test/System.Xml/XmlCharacterDataTests.cs
===================================================================
--- trunk/mcs/class/System.XML/Test/System.Xml/XmlCharacterDataTests.cs
2005-12-14 06:52:29 UTC (rev 54344)
+++ trunk/mcs/class/System.XML/Test/System.Xml/XmlCharacterDataTests.cs
2005-12-14 06:54:23 UTC (rev 54345)
@@ -86,6 +86,9 @@
}
[Test]
+#if NET_2_0
+ [Category ("NotDotNet")] // enbug in 2.0
+#endif
public void InsertData ()
{
comment.Value = "foobaz";
@@ -126,6 +129,9 @@
}
[Test]
+#if NET_2_0
+ [Category ("NotDotNet")] // enbug in 2.0
+#endif
public void ReplaceData ()
{
changed = false;
Modified: trunk/mcs/class/System.XML/Test/System.Xml/XmlDocumentTests.cs
===================================================================
--- trunk/mcs/class/System.XML/Test/System.Xml/XmlDocumentTests.cs
2005-12-14 06:52:29 UTC (rev 54344)
+++ trunk/mcs/class/System.XML/Test/System.Xml/XmlDocumentTests.cs
2005-12-14 06:54:23 UTC (rev 54345)
@@ -18,6 +18,12 @@
using NUnit.Framework;
+#if NET_2_0
+using InvalidNodeTypeArgException = System.ArgumentException;
+#else // it makes less sense
+using InvalidNodeTypeArgException = System.ArgumentOutOfRangeException;
+#endif
+
namespace MonoTests.System.Xml
{
[TestFixture]
@@ -132,27 +138,27 @@
try {
node = document.CreateNode
(XmlNodeType.EndElement, null, null);
Fail ("Expected an ArgumentOutOfRangeException
to be thrown.");
- } catch (ArgumentOutOfRangeException) {}
+ } catch (InvalidNodeTypeArgException) {}
try {
node = document.CreateNode
(XmlNodeType.EndEntity, null, null);
Fail ("Expected an ArgumentOutOfRangeException
to be thrown.");
- } catch (ArgumentOutOfRangeException) {}
+ } catch (InvalidNodeTypeArgException) {}
try {
node = document.CreateNode (XmlNodeType.Entity,
null, null);
Fail ("Expected an ArgumentOutOfRangeException
to be thrown.");
- } catch (ArgumentOutOfRangeException) {}
+ } catch (InvalidNodeTypeArgException) {}
try {
node = document.CreateNode (XmlNodeType.None,
null, null);
Fail ("Expected an ArgumentOutOfRangeException
to be thrown.");
- } catch (ArgumentOutOfRangeException) {}
+ } catch (InvalidNodeTypeArgException) {}
try {
node = document.CreateNode
(XmlNodeType.Notation, null, null);
Fail ("Expected an ArgumentOutOfRangeException
to be thrown.");
- } catch (ArgumentOutOfRangeException) {}
+ } catch (InvalidNodeTypeArgException) {}
// TODO: undocumented allowable type.
node = document.CreateNode (XmlNodeType.XmlDeclaration,
null, null);
@@ -197,6 +203,9 @@
}
[Test]
+#if NET_2_0
+ [Category ("NotDotNet")] // enbug in 2.0
+#endif
public void CreateNodeNodeTypeName ()
{
XmlNode node;
@@ -204,8 +213,13 @@
try {
node = document.CreateNode ("foo", null, null);
Fail ("Expected an ArgumentException to be
thrown.");
- } catch (ArgumentException) {}
+#if NET_2_0
+ } catch (ArgumentNullException) {}
+#else
+ } catch (ArgumentException) {} // makes less sense
+#endif
+ // .NET 2.0 fails here.
node = document.CreateNode("attribute", "foo", null);
AssertEquals (XmlNodeType.Attribute, node.NodeType);
@@ -220,7 +234,6 @@
// TODO: test which constructor this ended up calling,
// i.e. reuse underlying NameTable or not?
-// TODO: add this back in to test when it's implemented.
node = document.CreateNode("documentfragment", null,
null);
AssertEquals (XmlNodeType.DocumentFragment,
node.NodeType);
Modified: trunk/mcs/class/System.XML/Test/System.Xml/XmlElementTests.cs
===================================================================
--- trunk/mcs/class/System.XML/Test/System.Xml/XmlElementTests.cs
2005-12-14 06:52:29 UTC (rev 54344)
+++ trunk/mcs/class/System.XML/Test/System.Xml/XmlElementTests.cs
2005-12-14 06:54:23 UTC (rev 54345)
@@ -317,6 +317,9 @@
}
[Test]
+#if NET_2_0
+ [Ignore ("This test is very implementation dependent and thus
.NET 2.0 does not pass. That's why I said
http://primates.ximian.com/~atsushi/blog/archives/000416.html and
http://svn.myrealbox.com/viewcvs/trunk/mono/web/xml-classes?rev=23598")]
+#endif
public void RemoveDoesNotRemoveDefaultAttributes ()
{
string dtd = "<!DOCTYPE root [<!ELEMENT root
EMPTY><!ATTLIST root foo CDATA 'def' bar CDATA #IMPLIED>]>";
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches