[Mono-list] Re: OS/X build error for glib-2.0
Peter Williams
peter@newton.cx
10 Feb 2003 01:15:14 -0500
--=-aY2riBLLfisDoGh2cSDS
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
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 peter@newton.cx / peterw@ximian.com
"[Ninjas] are cool; and by cool, I mean totally sweet."
-- REAL Ultimate Power
--=-aY2riBLLfisDoGh2cSDS
Content-Disposition: inline; filename=fix-nunit.diff
Content-Type: text/x-patch; name=fix-nunit.diff; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
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 <peterw@ximian.com>
+
+ * TestCaseBuilder.cs: The array cast didn't seem to work, so save it until
+ a little later.
2003-01-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
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;
}
--=-aY2riBLLfisDoGh2cSDS--