Author: gert
Date: 2007-08-08 07:00:17 -0400 (Wed, 08 Aug 2007)
New Revision: 83653

Added:
   trunk/gert/standalone/bug82362/
   trunk/gert/standalone/bug82362/default.build
   trunk/gert/standalone/bug82362/test.cs
   trunk/gert/standalone/bug82363/
   trunk/gert/standalone/bug82363/default.build
   trunk/gert/standalone/bug82363/test.cs
Log:
Added tests for bug #82363 and bug #82362.


Added: trunk/gert/standalone/bug82362/default.build
===================================================================
--- trunk/gert/standalone/bug82362/default.build        2007-08-08 10:52:10 UTC 
(rev 83652)
+++ trunk/gert/standalone/bug82362/default.build        2007-08-08 11:00:17 UTC 
(rev 83653)
@@ -0,0 +1,48 @@
+<project name="bug82362" default="rebuild">
+       <target name="mono-1.0">
+               <property name="csc.defines" 
value="NET_1_0,NET_1_1,ONLY_1_1,MONO" />
+       </target>
+
+       <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-1.0,mono-2.0,net-2.0" />
+
+       <target name="clean">
+               <delete>
+                       <fileset>
+                               <include name="test.dll" />
+                       </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="compile" />
+                               <call target="clean" />
+                       </if>
+               </foreach>
+
+               <property name="nant.settings.currentframework" 
value="${original.targetframework}" />
+       </target>
+
+       <target name="compile">
+               <csc target="library" define="${csc.defines}" output="test.dll" 
warnaserror="true" warninglevel="4">
+                       <sources>
+                               <include name="test.cs" />
+                       </sources>
+               </csc>
+       </target>
+
+       <target name="rebuild" depends="clean, build" />
+</project>


Property changes on: trunk/gert/standalone/bug82362/default.build
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/gert/standalone/bug82362/test.cs
===================================================================
--- trunk/gert/standalone/bug82362/test.cs      2007-08-08 10:52:10 UTC (rev 
83652)
+++ trunk/gert/standalone/bug82362/test.cs      2007-08-08 11:00:17 UTC (rev 
83653)
@@ -0,0 +1,19 @@
+using System;
+using System.Reflection;
+
+class Program
+{
+       public void Run (MethodInfo mi)
+       {
+               AddConversion (
+                       delegate (object from) {
+                               return mi.Invoke (null, new object [] { from });
+                       });
+       }
+
+       void AddConversion (CallTarget converter)
+       {
+       }
+}
+
+public delegate object CallTarget (object arg0);


Property changes on: trunk/gert/standalone/bug82362/test.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/gert/standalone/bug82363/default.build
===================================================================
--- trunk/gert/standalone/bug82363/default.build        2007-08-08 10:52:10 UTC 
(rev 83652)
+++ trunk/gert/standalone/bug82363/default.build        2007-08-08 11:00:17 UTC 
(rev 83653)
@@ -0,0 +1,54 @@
+<project name="bug82363" default="rebuild">
+       <target name="mono-1.0">
+               <property name="csc.defines" 
value="NET_1_0,NET_1_1,ONLY_1_1,MONO" />
+       </target>
+
+       <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-1.0,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" define="${csc.defines}" output="test.exe" 
warnaserror="true" warninglevel="4">
+                       <sources>
+                               <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/bug82363/default.build
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/gert/standalone/bug82363/test.cs
===================================================================
--- trunk/gert/standalone/bug82363/test.cs      2007-08-08 10:52:10 UTC (rev 
83652)
+++ trunk/gert/standalone/bug82363/test.cs      2007-08-08 11:00:17 UTC (rev 
83653)
@@ -0,0 +1,18 @@
+using System;
+using System.Reflection;
+
+class Program
+{
+       delegate object test (MethodInfo x);
+
+       static void Main ()
+       {
+               DoCall (delegate (MethodInfo from) {
+                       return from.Invoke (null, new object [] { from });
+               });
+       }
+
+       static void DoCall (test t)
+       {
+       }
+}


Property changes on: trunk/gert/standalone/bug82363/test.cs
___________________________________________________________________
Name: svn:eol-style
   + native

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to