New test.
[mono.git] / mono / mini / basic-long.cs
index dafea297df564c713d8361ab7b1c23d3b6b0a0df..63fa64db490d83bbfe08690752416ed36f81e487 100644 (file)
@@ -197,6 +197,23 @@ class Tests {
                return 0;
        }
 
+       public static int test_0_conv_to_r8 () {
+               long a = 150;
+               double b = (double) a;
+
+               if (b != 150.0)
+                       return 1;
+               return 0;
+       }
+
+       public static int test_0_conv_to_r4 () {
+               long a = 3000;
+               float b = (float) a;
+
+               if (b != 3000.0F)
+                       return 1;
+               return 0;
+       }
        /*
        public static int test_0_conv_from_r8 () {
                double b = 2.0;
@@ -506,6 +523,22 @@ class Tests {
                return count;
        }
 
+       public static int test_1_shift_u_32 ()
+       {
+               ulong a;
+               int count = 0;
+
+               a = UInt64.MaxValue;
+               // Avoid constant folding
+               for (int i = 0; i < 32; ++i)
+                       count ++;
+
+               if ((a >> count) != 0xFFFFFFFFUL)
+                       return 0;
+               else
+                       return 1;
+       }
+
        public static int test_1_simple_neg () {
                long a = 9;
                
@@ -1035,5 +1068,14 @@ class Tests {
 
                return ((a >> (b - c)) == 0) ? 0 : 1;
        }
+
+       public static int test_1234_conv_ovf_u8 () {
+               int i = 1234;
+
+               checked {
+                       ulong l = (ulong)i;
+                       return (int)l;
+               }
+       }
 }