[jit] Make the exceptions.cs test suite runnable in mobile.
authorZoltan Varga <vargaz@gmail.com>
Fri, 15 Nov 2013 00:41:22 +0000 (01:41 +0100)
committerZoltan Varga <vargaz@gmail.com>
Fri, 15 Nov 2013 00:41:33 +0000 (01:41 +0100)
mono/mini/exceptions.cs

index 49dca8d1ba12e720ceb0b07cf3fd67595e88c161..8144641273d407f1f930cdafbfc6250a9176894f 100644 (file)
@@ -24,11 +24,18 @@ using System.Runtime.CompilerServices;
  * the IL code looks.
  */
 
-class Tests {
-
+#if MOBILE
+class ExceptionTests
+#else
+class Tests
+#endif
+{
+
+#if !MOBILE
        public static int Main (string[] args) {
                return TestDriver.RunTests (typeof (Tests), args);
        }
+#endif
 
        public static int test_0_catch () {
                Exception x = new Exception ();
@@ -2408,7 +2415,7 @@ class Tests {
        }
 
        public static int test_0_nonvirt_nullref_at_clause_start () {
-               Tests t = null;
+               ExceptionTests t = null;
                try {
                        t.amethod ();
                } catch (NullReferenceException) {
@@ -2528,7 +2535,11 @@ class Tests {
        public static int test_0_lmf_filter () {
                try {
                        // The invoke calls a runtime-invoke wrapper which has a filter clause
+#if MOBILE
+                       typeof (ExceptionTests).GetMethod ("lmf_filter").Invoke (null, new object [] { });
+#else
                        typeof (Tests).GetMethod ("lmf_filter").Invoke (null, new object [] { });
+#endif
                } catch (TargetInvocationException) {
                }
                return 0;
@@ -2732,3 +2743,8 @@ class Tests {
        }
 }
 
+#if !MOBILE
+class ExceptionTests : Tests
+{
+}
+#endif
\ No newline at end of file