On Sun, 2003-02-09 at 22:49, Nick Drochak wrote:
> Right now that is crashing on linux, but it did work about a week+ ago.
> 

I just had an inspiration as to how to track this down and fix it. The
attached patch makes NUnit 2 work for me. Yay.

Peter

-- 
Peter Williams     [EMAIL PROTECTED] / [EMAIL PROTECTED]

"[Ninjas] are cool; and by cool, I mean totally sweet."
                              -- REAL Ultimate Power
Index: nunit20/framework/ChangeLog
===================================================================
RCS file: /cvs/public/mcs/nunit20/framework/ChangeLog,v
retrieving revision 1.2
diff -u -r1.2 ChangeLog
--- nunit20/framework/ChangeLog	10 Jan 2003 02:12:25 -0000	1.2
+++ nunit20/framework/ChangeLog	10 Feb 2003 06:16:14 -0000
@@ -1,3 +1,7 @@
+2003-02-10  Peter Williams  <[EMAIL PROTECTED]>
+
+	* TestCaseBuilder.cs: The array cast didn't seem to work, so save it until
+	a little later.
 
 2003-01-10  Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
 
Index: nunit20/framework/TestCaseBuilder.cs
===================================================================
RCS file: /cvs/public/mcs/nunit20/framework/TestCaseBuilder.cs,v
retrieving revision 1.1
diff -u -r1.1 TestCaseBuilder.cs
--- nunit20/framework/TestCaseBuilder.cs	9 Dec 2002 14:39:22 -0000	1.1
+++ nunit20/framework/TestCaseBuilder.cs	10 Feb 2003 06:16:14 -0000
@@ -157,10 +157,11 @@
 		private static string GetIgnoreReason(MethodInfo methodToCheck)
 		{
 			Type ignoreMethodAttribute = typeof(NUnit.Framework.IgnoreAttribute);
-			NUnit.Framework.IgnoreAttribute[] attributes = (NUnit.Framework.IgnoreAttribute[])methodToCheck.GetCustomAttributes(ignoreMethodAttribute, false);
+			object[] attributes = methodToCheck.GetCustomAttributes(ignoreMethodAttribute, false);
 			string result = "no reason";
+
 			if(attributes.Length > 0)
-				result = attributes[0].Reason;
+				result = ((NUnit.Framework.IgnoreAttribute) attributes[0]).Reason;
 
 			return result;
 		}

Reply via email to