Author: gert
Date: 2007-09-01 03:45:48 -0400 (Sat, 01 Sep 2007)
New Revision: 85159

Added:
   trunk/gert/standalone/bug82528/
   trunk/gert/standalone/bug82528/default.build
   trunk/gert/standalone/bug82528/test.cs
   trunk/gert/standalone/bug82652/
   trunk/gert/standalone/bug82652/default.build
   trunk/gert/standalone/bug82652/test.cs
Modified:
   trunk/gert/standalone/known-issues
Log:
Added tests for bug #82528 and #82652.


Added: trunk/gert/standalone/bug82528/default.build
===================================================================
--- trunk/gert/standalone/bug82528/default.build        2007-09-01 02:35:55 UTC 
(rev 85158)
+++ trunk/gert/standalone/bug82528/default.build        2007-09-01 07:45:48 UTC 
(rev 85159)
@@ -0,0 +1,72 @@
+<project name="bug82528" default="rebuild">
+       <target name="mono-1.0">
+               <property name="csc.defines" 
value="NET_1_0,NET_1_1,ONLY_1_1,MONO" />
+               <property name="compiler.version" value="1.0" />
+       </target>
+
+       <target name="mono-2.0">
+               <property name="csc.defines" 
value="NET_1_0,NET_1_1,NET_2_0,ONLY_2_0,MONO" />
+               <property name="compiler.version" value="2.0" />
+       </target>
+
+       <target name="net-1.1">
+               <property name="csc.defines" value="NET_1_0,NET_1_1,ONLY_1_1" />
+               <property name="compiler.version" value="1.0" />
+       </target>
+
+       <target name="net-2.0">
+               <property name="csc.defines" 
value="NET_1_0,NET_1_1,NET_2_0,ONLY_2_0" />
+               <property name="compiler.version" value="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" />
+               <choose>
+                       <when test="${compiler.version == '1.0'}">
+                               <fail if="${string::index-of(out,'error CS0123: 
Method ''Program.ParseA(string, System.IFormatProvider)'' does not match 
delegate ''object ParseFun(string, System.IFormatProvider)''') == -1}">#3</fail>
+                               <fail if="${string::index-of(out,'error CS0123: 
Method ''Program.ParseB(string, System.IFormatProvider)'' does not match 
delegate ''object ParseFun(string, System.IFormatProvider)''') == -1}">#4</fail>
+                       </when>
+                       <otherwise>
+                               <fail if="${string::index-of(out,'error CS0407: 
''bool Program.ParseA(string, System.IFormatProvider)'' has the wrong return 
type') == -1}">#3</fail>
+                               <fail if="${string::index-of(out,'error CS0407: 
''void Program.ParseB(string, System.IFormatProvider)'' has the wrong return 
type') == -1}">#4</fail>
+                       </otherwise>
+               </choose>
+       </target>
+
+       <target name="rebuild" depends="clean, build" />
+</project>


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

Added: trunk/gert/standalone/bug82528/test.cs
===================================================================
--- trunk/gert/standalone/bug82528/test.cs      2007-09-01 02:35:55 UTC (rev 
85158)
+++ trunk/gert/standalone/bug82528/test.cs      2007-09-01 07:45:48 UTC (rev 
85159)
@@ -0,0 +1,25 @@
+using System;
+using System.Globalization;
+
+delegate object ParseFun (string text, IFormatProvider provider);
+
+class Program
+{
+       static void Main ()
+       {
+               ParseFun runner = new ParseFun (ParseA);
+               runner ("a", CultureInfo.InvariantCulture);
+
+               runner = new ParseFun (ParseB);
+               runner ("b", CultureInfo.InvariantCulture);
+       }
+
+       static bool ParseA (string text, IFormatProvider provider)
+       {
+               return false;
+       }
+
+       static void ParseB (string text, IFormatProvider provider)
+       {
+       }
+}


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

Added: trunk/gert/standalone/bug82652/default.build
===================================================================
--- trunk/gert/standalone/bug82652/default.build        2007-09-01 02:35:55 UTC 
(rev 85158)
+++ trunk/gert/standalone/bug82652/default.build        2007-09-01 07:45:48 UTC 
(rev 85159)
@@ -0,0 +1,45 @@
+<project name="bug82652" 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.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/bug82652/default.build
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/gert/standalone/bug82652/test.cs
===================================================================
--- trunk/gert/standalone/bug82652/test.cs      2007-09-01 02:35:55 UTC (rev 
85158)
+++ trunk/gert/standalone/bug82652/test.cs      2007-09-01 07:45:48 UTC (rev 
85159)
@@ -0,0 +1,9 @@
+using System;
+
+public static class A : Object
+{
+}
+
+public static class B : object
+{
+}


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

Modified: trunk/gert/standalone/known-issues
===================================================================
--- trunk/gert/standalone/known-issues  2007-09-01 02:35:55 UTC (rev 85158)
+++ trunk/gert/standalone/known-issues  2007-09-01 07:45:48 UTC (rev 85159)
@@ -78,3 +78,4 @@
 bug82595/**
 bug82616/**
 bug82620/**
+bug82652/**

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

Reply via email to