Improve this test to test bug 32429
authorMiguel de Icaza <miguel@gnome.org>
Sat, 19 Oct 2002 19:18:56 +0000 (19:18 -0000)
committerMiguel de Icaza <miguel@gnome.org>
Sat, 19 Oct 2002 19:18:56 +0000 (19:18 -0000)
svn path=/trunk/mcs/; revision=8397

mcs/tests/test-149.cs

index 006b8fed358cedf83970cca94330484903b3bf43..a3d49b35dda9dd1b8cbdde29953702a31a5b15d1 100644 (file)
@@ -70,14 +70,29 @@ public class Y : X
 
 public class Z : Y
 {
+       public delegate int SomeEventHandler();
+        public static event SomeEventHandler BuildStarted;
+
+       static int a ()
+       {
+               return 1;
+       }
        public static int Main ()
        {
                Z z = new Z ();
 
                int result = z.Test ();
 
-               Console.WriteLine ("TEST RESULT: " + result);
+               if (result != 0)
+                       return result;
 
-               return result;
+               if (BuildStarted != null) {
+                       BuildStarted();
+               }
+               BuildStarted = new SomeEventHandler (a);
+               if (BuildStarted () != 1)
+                       return 50; 
+
+               return 0;
        }
 }