Merge pull request #1174 from rhapsodyn/patch-1
[mono.git] / mono / tests / delegate7.cs
index e98ea40df774619e87cd3257760ab464a3ae10a8..6e1fe94e17ae896af4f52d07276956143371704f 100644 (file)
@@ -1,7 +1,7 @@
 using System;
 using System.Runtime.InteropServices;
 
-class Test {
+class Tests {
        delegate void SimpleDelegate ();
 
        public static int v = 0;
@@ -19,7 +19,11 @@ class Test {
                Console.WriteLine ("Test.F3");
        }
 
-       static int Main () {
+       public static int Main () {
+               return TestDriver.RunTests (typeof (Tests));
+       }
+
+       static public int test_0_test () {
                SimpleDelegate t;
                SimpleDelegate d1 = new SimpleDelegate (F1);
                SimpleDelegate d2 = new SimpleDelegate (F2);
@@ -51,4 +55,12 @@ class Test {
                
                return 0;
        }
+
+       // Regression test for bug #50366
+       static public int test_0_delegate_equality () {
+               if (new SimpleDelegate (F1) == new SimpleDelegate (F1))
+                       return 0;
+               else
+                       return 1;
+       }
 }