浏览代码

2003-06-10 Zoltan Varga <[email protected]>

	* XmlDocumentTests.cs: New test for null prefix and namespaceURI in
	CreateAttribute.

svn path=/trunk/mcs/; revision=15271
Zoltan Varga 22 年之前
父节点
当前提交
3f5732eb75

+ 5 - 0
mcs/class/System.XML/Test/System.Xml/ChangeLog

@@ -1,3 +1,8 @@
+2003-06-10  Zoltan Varga  <[email protected]>
+
+	* XmlDocumentTests.cs: New test for null prefix and namespaceURI in
+	CreateAttribute.
+
 2003-06-01  Atsushi Enomoto <[email protected]>
 
 	* XmlConvertTests.cs : added VerifyNCName().

+ 11 - 0
mcs/class/System.XML/Test/System.Xml/XmlDocumentTests.cs

@@ -904,6 +904,17 @@ namespace MonoTests.System.Xml
 			AssertEquals (XmlNodeType.Element, dom.FirstChild.NextSibling.NextSibling.NodeType);
 		}
 
+		[Test]
+		public void CreateAttribute () {
+			XmlDocument dom = new XmlDocument ();
+
+			// Check that null prefix and namespace are allowed and
+			// equivalent to ""
+			XmlAttribute attr = dom.CreateAttribute (null, "FOO", null);
+			AssertEquals (attr.Prefix, "");
+			AssertEquals (attr.NamespaceURI, "");
+		}
+
 //		[Test]  Comment out in the meantime.
 //		public void LoadExternalUri ()
 //		{