Author: gert
Date: 2007-10-07 14:01:46 -0400 (Sun, 07 Oct 2007)
New Revision: 87054

Added:
   trunk/gert/standalone/bug329685/
   trunk/gert/standalone/bug329685/default.build
   trunk/gert/standalone/bug329685/test.cs
Log:
Added test for bug #329685.


Added: trunk/gert/standalone/bug329685/default.build
===================================================================
--- trunk/gert/standalone/bug329685/default.build       2007-10-07 15:48:48 UTC 
(rev 87053)
+++ trunk/gert/standalone/bug329685/default.build       2007-10-07 18:01:46 UTC 
(rev 87054)
@@ -0,0 +1,56 @@
+<project name="bug329685" 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="moonlight-1.1">
+               <property name="csc.defines" 
value="NET_1_0,NET_1_1,NET_2_0,NET_2_1,ONLY_2_1,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>
+
+       <target name="silverlight-1.1">
+               <property name="csc.defines" 
value="NET_1_0,NET_1_1,NET_2_0,NET_2_1,ONLY_2_1" />
+       </target>
+
+       <property name="frameworks" 
value="mono-2.0,moonlight-1.1,net-2.0,silverlight-1.1" />
+
+       <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="compile" />
+                               <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>
+                       <references>
+                               <include name="mscorlib.dll" />
+                       </references>
+               </csc>
+       </target>
+
+       <target name="rebuild" depends="clean, build" />
+</project>


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

Added: trunk/gert/standalone/bug329685/test.cs
===================================================================
--- trunk/gert/standalone/bug329685/test.cs     2007-10-07 15:48:48 UTC (rev 
87053)
+++ trunk/gert/standalone/bug329685/test.cs     2007-10-07 18:01:46 UTC (rev 
87054)
@@ -0,0 +1,30 @@
+using System;
+using System.IO;
+using System.Reflection;
+
+class Program
+{
+       public static T [] FindAll<T> (T [] array, Predicate<T> match)
+       {
+               return new T [0];
+       }
+
+       private bool ProtectedOnly (MemberInfo input)
+       {
+               return false;
+       }
+
+       public MemberInfo [] foo ()
+       {
+               string name = "FOO";
+               MemberInfo [] res = FindAll (typeof (int).GetMember (name,
+                       BindingFlags.Static | BindingFlags.Instance | 
BindingFlags.NonPublic),
+                       ProtectedOnly);
+               return res;
+       }
+
+       static void Main (String [] args)
+       {
+               new Program ().foo ();
+       }
+}


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

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

Reply via email to