Merge pull request #757 from mlintner/master
[mono.git] / mono / mini / basic.cs
index 917137971cc5b60e399e04ea2f872edf470ca71b..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)
@@ -1359,4 +1368,4 @@ class Tests {
 
                return k == -32768 ? 0 : 1;
        }
-}
\ No newline at end of file
+}