Author: gert
Date: 2007-06-09 04:36:29 -0400 (Sat, 09 Jun 2007)
New Revision: 79039
Added:
trunk/gert/standalone/bug81818/
trunk/gert/standalone/bug81818/default.build
trunk/gert/standalone/bug81818/test.cs
Modified:
trunk/gert/standalone/known-issues
Log:
Added test for bug #81818.
Added: trunk/gert/standalone/bug81818/default.build
===================================================================
--- trunk/gert/standalone/bug81818/default.build 2007-06-09 08:30:59 UTC
(rev 79038)
+++ trunk/gert/standalone/bug81818/default.build 2007-06-09 08:36:29 UTC
(rev 79039)
@@ -0,0 +1,60 @@
+<project name="bug81818" 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="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 unless="${file::exists('out')}">#1</fail>
+ <loadfile file="out" property="out" />
+ <fail unless="${string::starts-with(out,'This should be
printed')}">#2</fail>
+ </target>
+
+ <target name="rebuild" depends="clean, build" />
+</project>
Property changes on: trunk/gert/standalone/bug81818/default.build
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/gert/standalone/bug81818/test.cs
===================================================================
--- trunk/gert/standalone/bug81818/test.cs 2007-06-09 08:30:59 UTC (rev
79038)
+++ trunk/gert/standalone/bug81818/test.cs 2007-06-09 08:36:29 UTC (rev
79039)
@@ -0,0 +1,40 @@
+using System;
+
+public class MyClass
+{
+ public class A
+ {
+ public event EventHandler MouseClick;
+
+ public virtual void Fire ()
+ {
+ if (MouseClick != null)
+ MouseClick (this, new EventArgs ());
+ }
+ }
+
+ public class B : A
+ {
+ public new event EventHandler MouseClick;
+
+ public override void Fire ()
+ {
+ if (MouseClick != null)
+ MouseClick (this, new EventArgs ());
+ }
+ }
+
+ public class C : B
+ {
+ public new void MouseClick ()
+ {
+ Console.Write ("This should be printed");
+ }
+ }
+
+ static public void Main ()
+ {
+ C myclass = new C ();
+ myclass.MouseClick ();
+ }
+}
Property changes on: trunk/gert/standalone/bug81818/test.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/gert/standalone/known-issues
===================================================================
--- trunk/gert/standalone/known-issues 2007-06-09 08:30:59 UTC (rev 79038)
+++ trunk/gert/standalone/known-issues 2007-06-09 08:36:29 UTC (rev 79039)
@@ -20,3 +20,4 @@
bug81697/**
bug81748/**
bug81757/**
+bug81818/**
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches