[mini] Adjust some test suites to work under mobile.
authorRodrigo Kumpera <kumpera@gmail.com>
Tue, 26 Sep 2017 21:57:45 +0000 (14:57 -0700)
committerRodrigo Kumpera <kumpera@gmail.com>
Tue, 26 Sep 2017 21:57:45 +0000 (14:57 -0700)
mono/mini/builtin-types.cs
mono/mini/devirtualization.cs
mono/mini/gc-test.cs
mono/mini/test.cs

index ff4f689290d9c57474d3848c39959e94096333d3..de06a0dc579cdc79bdf2ff481ec06379cb09834d 100644 (file)
@@ -792,9 +792,11 @@ public class BuiltinTests {
                return 0;
        }
 
+#if !__MOBILE__
        public static int Main (String[] args) {
                return TestDriver.RunTests (typeof (BuiltinTests), args);
        }
+#endif
 }
 
 
index bf1134be6bb765cbed3bab6e178cd595a00106d3..14b3f9b15719f2b4ae8449455ee9711501120d1d 100644 (file)
@@ -86,11 +86,13 @@ sealed public class SealedFinal : Middle {
 }
 
 
-class Tests {
+class DevirtualizationTests {
 
+#if !__MOBILE__
        static int Main  (string[] args) {
                return TestDriver.RunTests (typeof (Tests), args);
        }
+#endif
        
        static public int test_0_sealed_class_devirt_right_method () {
                SealedFinal x = new SealedFinal ();
index 023a56d716507bda15dc1dc604531d94b82090eb..91234b6eec8da38a58334dc3a7f04e00c5ea9864 100644 (file)
@@ -7,12 +7,17 @@ using System.Threading;
 /*
  * Regression tests for the GC support in the JIT
  */
-
-class Tests {
-
-       static int Main () {
-               return TestDriver.RunTests (typeof (Tests));
-       }
+#if __MOBILE__
+class GcTests
+#else
+class Tests
+#endif
+{
+#if !__MOBILE__
+       public static int Main (string[] args) {
+               return TestDriver.RunTests (typeof (Tests), args);
+       }
+#endif
 
        public static int test_36_simple () {
                // Overflow the registers
@@ -525,9 +530,16 @@ class Tests {
                return 0;
        }
 
+       class ObjWithShiftOp {
+               public static ObjWithShiftOp operator >> (ObjWithShiftOp bi1, int shiftVal) {
+                       clobber_regs_and_gc ();
+                       return bi1;
+               }
+       }
+
        // Liveness for spill slots holding managed pointers
        public static int test_0_liveness_11 () {
-               Tests[] arr = new Tests [10];
+               ObjWithShiftOp[] arr = new ObjWithShiftOp [10];
                // This uses an ldelema internally
                // FIXME: This doesn't crash if mp-s are not correctly tracked, just writes to
                // an old object.
@@ -536,10 +548,6 @@ class Tests {
                return 0;
        }
 
-       public static Tests operator >> (Tests bi1, int shiftVal) {
-               clobber_regs_and_gc ();
-               return bi1;
-       }
 
        [MethodImplAttribute (MethodImplOptions.NoInlining)]
        public static void liveness_12_inner (int a, int b, int c, int d, int e, int f, object o, ref string s) {
index 49e17ad14dd3ff89e2be6ecec526b15e041dcd6a..956a6310169bbee2492c869577ad25c580ba7a99 100644 (file)
@@ -338,11 +338,17 @@ namespace SSA {
                        return a;
                }
 
+#if __MOBILE__
+               public static test_2_old_test_suite () {
+                       return test1 (1);
+               }
+#else
                static int Main() {
                        if (test1 (1) != 2)
                                return 1;
                        return 0;
                }
+#endif
        }
 }