[runtime] Fix a few more places which accessed jinfo->method directly.
[mono.git] / mono / mini / basic.cs
index eeb564bbd809a0290f601f0c5cc8a5342f8965f2..477af333e9b4a8401a8b6ec5ab4e7646e6044ac3 100644 (file)
@@ -23,11 +23,18 @@ using System.Reflection;
  * the IL code looks.
  */
 
-class Tests {
-
-       static int Main () {
-               return TestDriver.RunTests (typeof (Tests));
-       }
+#if MOBILE
+class BasicTests
+#else
+class Tests
+#endif
+{
+
+#if !MOBILE
+       public static int Main (string[] args) {
+               return TestDriver.RunTests (typeof (Tests), args);
+       }
+#endif
        
        public static int test_0_return () {
                return 0;
@@ -1240,8 +1247,9 @@ class Tests {
 
                // Avoid cfolding this
                i = 0;
-               for (int j = 0; j < 1234567; ++j)
+               for (int j = 0; j < 567; ++j)
                        i ++;
+               i += 1234000;
                if ((i / 2) != 617283)
                        return 1;
                if ((i / 4) != 308641)
@@ -1253,8 +1261,9 @@ class Tests {
 
                // Avoid cfolding this
                i = 0;
-               for (int j = 0; j < 1234567; ++j)
+               for (int j = 0; j < 567; ++j)
                        i --;
+               i -= 1234000;
                if ((i / 2) != -617283)
                        return 5;
                if ((i / 4) != -308641)
@@ -1352,4 +1361,11 @@ class Tests {
                return 0;
        }
 
+       public static unsafe int test_0_ishr_sign_extend_cfold () {
+               int i = 32768;
+               int j = i << 16;
+               int k = j >> 16;
+
+               return k == -32768 ? 0 : 1;
+       }
 }