Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

2005-12-14 Atsushi Enomoto <atsushi@ximian.com>

	* 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.


svn path=/trunk/mcs/; revision=54345
  • Loading branch information...
commit 55336d158107f15a3755adfe03616dcc44490e14 1 parent 9546c78
@atsushieno atsushieno authored
View
8 mcs/class/System.XML/Test/System.Xml/ChangeLog
@@ -1,3 +1,11 @@
+2005-12-14 Atsushi Enomoto <atsushi@ximian.com>
+
+ * 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 <atsushi@ximian.com>
* XmlAssert.cs : new file.
View
3  mcs/class/System.XML/Test/System.Xml/XmlAttributeCollectionTests.cs
@@ -193,6 +193,9 @@ public void Remove ()
}
[Test]
+#if NET_2_0
+ [Category ("NotDotNet")] // enbug
+#endif
public void RemoveDefaultAttribute ()
{
string dtd = "<!DOCTYPE root [<!ELEMENT root EMPTY><!ATTLIST root attr CDATA 'default'>]>";
View
6 mcs/class/System.XML/Test/System.Xml/XmlCharacterDataTests.cs
@@ -86,6 +86,9 @@ public void DeleteData ()
}
[Test]
+#if NET_2_0
+ [Category ("NotDotNet")] // enbug in 2.0
+#endif
public void InsertData ()
{
comment.Value = "foobaz";
@@ -126,6 +129,9 @@ public void InsertData ()
}
[Test]
+#if NET_2_0
+ [Category ("NotDotNet")] // enbug in 2.0
+#endif
public void ReplaceData ()
{
changed = false;
View
27 mcs/class/System.XML/Test/System.Xml/XmlDocumentTests.cs
@@ -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 @@ public void CreateNodeInvalidXmlNodeType ()
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 @@ public void CreateNodeWhichParamIsUsed ()
}
[Test]
+#if NET_2_0
+ [Category ("NotDotNet")] // enbug in 2.0
+#endif
public void CreateNodeNodeTypeName ()
{
XmlNode node;
@@ -204,8 +213,13 @@ public void CreateNodeNodeTypeName ()
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 @@ public void CreateNodeNodeTypeName ()
// 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);
View
3  mcs/class/System.XML/Test/System.Xml/XmlElementTests.cs
@@ -317,6 +317,9 @@ public void RemoveAllAttributes ()
}
[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>]>";
Please sign in to comment.
Something went wrong with that request. Please try again.