[Mono-devel-list] Patch for simplifing Test XmlWhitespaceBadConstructor

Martin Willemoes Hansen mwh at sysrq.dk
Tue Jul 1 09:36:38 EDT 2003


Hi!

I just felt over this method puublic void XmlWhitespaceBadConstructor ()
in /mcs/class/System.XML/Test/System.Xml/XmlWhiteSpaceTests.cs

Okay to commit?
-- 
Martin Willemoes Hansen

--------------------------------------------------------
E-Mail	mwh at sysrq.dk	Website	mwh.sysrq.dk
IRC     MWH, freenode.net
--------------------------------------------------------               

-------------- next part --------------
? XmlWhiteSpaceTests.cs.diff
Index: XmlWhiteSpaceTests.cs
===================================================================
RCS file: /cvs/public/mcs/class/System.XML/Test/System.Xml/XmlWhiteSpaceTests.cs,v
retrieving revision 1.2
diff -u -r1.2 XmlWhiteSpaceTests.cs
--- XmlWhiteSpaceTests.cs	13 May 2003 20:41:55 -0000	1.2
+++ XmlWhiteSpaceTests.cs	1 Jul 2003 13:46:54 -0000
@@ -60,17 +60,10 @@
 		}
 
 		[Test]
+		[ExpectedException (typeof (ArgumentException))]
 		public void XmlWhitespaceBadConstructor ()
 		{
-			try {
-				broken = document.CreateWhitespace ("black");				
-
-			} catch (ArgumentException) {
-				return;
-
-			} catch (Exception) {
-				Fail ("Incorrect Exception thrown.");
-			}
+			broken = document.CreateWhitespace ("black");				
 		}
 
 		[Test]


More information about the Mono-devel-list mailing list