Author: gert
Date: 2007-06-09 04:41:55 -0400 (Sat, 09 Jun 2007)
New Revision: 79040

Added:
   trunk/gert/standalone/bug81815/
   trunk/gert/standalone/bug81815/default.build
   trunk/gert/standalone/bug81815/test.cs
Modified:
   trunk/gert/standalone/bug81818/test.cs
   trunk/gert/standalone/known-issues
Log:
Added test for bug #81815.


Added: trunk/gert/standalone/bug81815/default.build
===================================================================
--- trunk/gert/standalone/bug81815/default.build        2007-06-09 08:36:29 UTC 
(rev 79039)
+++ trunk/gert/standalone/bug81815/default.build        2007-06-09 08:41:55 UTC 
(rev 79040)
@@ -0,0 +1,59 @@
+<project name="bug81815" 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-1.1">
+               <property name="csc.defines" value="NET_1_0,NET_1_1,ONLY_1_1" />
+       </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-1.1,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="compile" />
+                               <call target="clean" />
+                       </if>
+               </foreach>
+
+               <property name="nant.settings.currentframework" 
value="${original.targetframework}" />
+       </target>
+
+       <target name="compile">
+               <record name="out" action="Start" />
+               <csc target="exe" define="${csc.defines}" output="test.exe" 
warnaserror="true" warninglevel="4" failonerror="false">
+                       <sources>
+                               <include name="test.cs" />
+                       </sources>
+               </csc>
+               <record name="out" action="Close" />
+               <fail if="${file::exists('test.exe')}">#1</fail>
+               <fail unless="${file::exists('out')}">#2</fail>
+               <loadfile file="out" property="out" />
+               <fail if="${string::index-of(out,'CS0407') == -1}">#3</fail>
+       </target>
+
+       <target name="rebuild" depends="clean, build" />
+</project>


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

Added: trunk/gert/standalone/bug81815/test.cs
===================================================================
--- trunk/gert/standalone/bug81815/test.cs      2007-06-09 08:36:29 UTC (rev 
79039)
+++ trunk/gert/standalone/bug81815/test.cs      2007-06-09 08:41:55 UTC (rev 
79040)
@@ -0,0 +1,24 @@
+using System;
+
+class Program
+{
+       delegate object Conv (string str);
+
+       static void Main ()
+       {
+               string str = "123";
+
+               object o = int.Parse (str);
+               Console.WriteLine ("1: {0}", o != null);
+               Console.WriteLine ("2: {0}", o.GetType ().FullName);
+               Console.WriteLine ("3: {0}", o.ToString ());
+               Console.WriteLine ();
+
+               Conv c = new Conv (int.Parse);
+
+               o = c (str);
+               Console.WriteLine ("4: {0}", o != null);
+               Console.WriteLine ("5: {0}", o.GetType ().FullName);
+               Console.WriteLine ("6: {0}", o.ToString ());
+       }
+}


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

Modified: trunk/gert/standalone/bug81818/test.cs
===================================================================
--- trunk/gert/standalone/bug81818/test.cs      2007-06-09 08:36:29 UTC (rev 
79039)
+++ trunk/gert/standalone/bug81818/test.cs      2007-06-09 08:41:55 UTC (rev 
79040)
@@ -1,6 +1,6 @@
 using System;
 
-public class MyClass
+class Program
 {
        public class A
        {
@@ -32,7 +32,7 @@
                }
        }
 
-       static public void Main ()
+       static void Main ()
        {
                C myclass = new C ();
                myclass.MouseClick ();

Modified: trunk/gert/standalone/known-issues
===================================================================
--- trunk/gert/standalone/known-issues  2007-06-09 08:36:29 UTC (rev 79039)
+++ trunk/gert/standalone/known-issues  2007-06-09 08:41:55 UTC (rev 79040)
@@ -20,4 +20,5 @@
 bug81697/**
 bug81748/**
 bug81757/**
+bug81815/**
 bug81818/**

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

Reply via email to