Merge pull request #601 from knocte/sock_improvements
[mono.git] / mono / mini / basic-long.cs
index c34316c7f9d424ffc8db354f38f590b7803325f7..45c67fe2c3a49188bf9b38ccfa2b12d9f8f65d86 100644 (file)
@@ -25,8 +25,8 @@ using System.Reflection;
 
 class Tests {
 
-       public static int Main () {
-               return TestDriver.RunTests (typeof (Tests));
+       public static int Main (string[] args) {
+               return TestDriver.RunTests (typeof (Tests), args);
        }
 
        public static int test_10_simple_cast () {
@@ -1014,26 +1014,6 @@ class Tests {
                return 0;
        }
 
-       static long return_5low () {
-               return 5;
-       }
-       
-       static long return_5high () {
-               return 0x500000000;
-       }
-
-       public static int test_3_long_ret () {
-               long val = return_5low ();
-               return (int) (val - 2);
-       }
-
-       public static int test_1_long_ret2 () {
-               long val = return_5high ();
-               if (val > 0xffffffff)
-                       return 1;
-               return 0;
-       }
-
        public static int test_3_byte_cast () {
                ulong val = 0xff00ff00f0f0f0f0;
                byte b;
@@ -1202,5 +1182,19 @@ class Tests {
                        return (i == 0xdeadbeaf) ? 0 : 1;
                }
        }
+
+       public static int test_0_lconv_to_u2 () {
+               unchecked { 
+                       ulong value = (ulong)(short)-10;
+                       value = (ushort)value;
+                   return (value == 65526) ? 0 : 1;
+               }
+       }
+
+       public static int test_0_lneg_regress_10320 () {
+               long a = 0x100000000;
+               ulong c = ((ulong) (-(-a))) >> 32;
+               return c == 1 ? 0 : 1;
+       }
 }