Add tests
authorMiguel de Icaza <miguel@gnome.org>
Tue, 8 Nov 2005 00:56:44 +0000 (00:56 -0000)
committerMiguel de Icaza <miguel@gnome.org>
Tue, 8 Nov 2005 00:56:44 +0000 (00:56 -0000)
svn path=/trunk/mcs/; revision=52672

mcs/tests/test-467.cs [new file with mode: 0644]
mcs/tests/test-468.cs [new file with mode: 0644]

diff --git a/mcs/tests/test-467.cs b/mcs/tests/test-467.cs
new file mode 100644 (file)
index 0000000..4079595
--- /dev/null
@@ -0,0 +1,32 @@
+using System;
+
+public class ExceptionWithAnonMethod
+{
+       public delegate void EmptyCallback();
+       static string res;
+       
+       public static int Main()
+       {
+               try {
+                       throw new Exception("e is afraid to enter anonymous land");
+               } catch(Exception e) {
+                       AnonHandler(delegate {
+                               Console.WriteLine(e.Message); 
+                               res = e.Message;
+                       });
+               }
+               if (res == "e is afraid to enter anonymous land"){
+                   Console.WriteLine ("Test passed");
+                   return 0;
+               }
+               Console.WriteLine ("Test failed");
+               return 1;
+       }
+
+       public static void AnonHandler(EmptyCallback handler)
+       {
+               if(handler != null) {
+                       handler();
+               }
+       }
+}
diff --git a/mcs/tests/test-468.cs b/mcs/tests/test-468.cs
new file mode 100644 (file)
index 0000000..83cfe7a
--- /dev/null
@@ -0,0 +1,16 @@
+using System;
+using System.Runtime.InteropServices;
+
+    [ComImport, GuidAttribute("E5CB7A31-7512-11D2-89CE-0080C792E5D8")]
+    public class CorMetaDataDispenserExClass { }
+
+    [ComImport, GuidAttribute("31BCFCE2-DAFB-11D2-9F81-00C04F79A0A3"),
+CoClass(typeof(CorMetaDataDispenserExClass))]
+    public interface MetaDataDispenserEx { }
+
+public class Test {
+       
+       public static void Main () {
+               Object o = new MetaDataDispenserEx ();
+       }
+}