Author: gert
Date: 2007-10-31 17:11:52 -0500 (Wed, 31 Oct 2007)
New Revision: 88612
Added:
trunk/gert/standalone/bug337712/
trunk/gert/standalone/bug337712/default.build
trunk/gert/standalone/bug337712/test.cs
Modified:
trunk/gert/standalone/known-issues
Log:
Added test for bug #337712.
Added: trunk/gert/standalone/bug337712/default.build
===================================================================
--- trunk/gert/standalone/bug337712/default.build 2007-10-31 22:10:11 UTC
(rev 88611)
+++ trunk/gert/standalone/bug337712/default.build 2007-10-31 22:11:52 UTC
(rev 88612)
@@ -0,0 +1,51 @@
+<project name="bug337712" default="rebuild">
+ <target name="mono-2.0">
+ <property name="csc.defines"
value="NET_1_0,NET_1_1,NET_2_0,ONLY_2_0,MONO" />
+ </target>
+
+ <target name="net-2.0">
+ <property name="csc.defines"
value="NET_1_0,NET_1_1,NET_2_0,ONLY_2_0" />
+ </target>
+
+ <property name="frameworks" value="mono-2.0,net-2.0" />
+
+ <target name="clean">
+ <delete>
+ <fileset>
+ <include name="out" />
+ <include name="test.exe" />
+ </fileset>
+ </delete>
+ </target>
+
+ <target name="build">
+ <property name="original.targetframework"
value="${nant.settings.currentframework}" />
+
+ <foreach property="framework" item="String" in="${frameworks}"
delim=",">
+ <if test="${framework::exists(framework)}">
+ <property name="nant.settings.currentframework"
value="${framework}" />
+ <call
target="${nant.settings.currentframework}" />
+ <call target="run" />
+ <call target="clean" />
+ </if>
+ </foreach>
+
+ <property name="nant.settings.currentframework"
value="${original.targetframework}" />
+ </target>
+
+ <target name="compile">
+ <csc target="exe" output="test.exe" define="${csc.defines}"
warnaserror="true" warninglevel="4">
+ <sources>
+ <include name="../../build/common/Assert.cs" />
+ <include name="test.cs" />
+ </sources>
+ </csc>
+ </target>
+
+ <target name="run" depends="compile">
+ <exec program="test.exe" managed="true" output="out" />
+ <fail if="${file::exists('out')}" />
+ </target>
+
+ <target name="rebuild" depends="clean, build" />
+</project>
Property changes on: trunk/gert/standalone/bug337712/default.build
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/gert/standalone/bug337712/test.cs
===================================================================
--- trunk/gert/standalone/bug337712/test.cs 2007-10-31 22:10:11 UTC (rev
88611)
+++ trunk/gert/standalone/bug337712/test.cs 2007-10-31 22:11:52 UTC (rev
88612)
@@ -0,0 +1,32 @@
+using System;
+using System.Reflection;
+
+class Program
+{
+ public delegate R Function<T1, T2, R> (T1 arg1, T2 arg2);
+
+ static void Main ()
+ {
+ Delegate [] d = new Delegate [] { new Function<int, int, bool>
(f1) };
+ Assert.AreEqual (1, d.Length, "#1");
+ MethodInfo mi = d [0].Method;
+ Assert.AreEqual (typeof (Program), mi.DeclaringType, "#2");
+ Assert.AreEqual ("Boolean f1(Int32, Int32)", mi.ToString (),
"#2");
+ }
+
+ static bool f1 (int a, int b)
+ {
+ return false;
+ }
+
+ static bool f1 (int a, object b)
+ {
+ return false;
+ }
+
+ public static void Run ()
+ {
+ f1 (5, 6);
+ f1 (5, (object) 7);
+ }
+}
Property changes on: trunk/gert/standalone/bug337712/test.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/gert/standalone/known-issues
===================================================================
--- trunk/gert/standalone/known-issues 2007-10-31 22:10:11 UTC (rev 88611)
+++ trunk/gert/standalone/known-issues 2007-10-31 22:11:52 UTC (rev 88612)
@@ -37,7 +37,6 @@
bug81662/**
bug81673/**
bug81691/**
-bug81815/**
bug81818/**
bug81850/**
bug81948/**
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches