[sgen] When out of memory, finish concurrent with scanning whole nursery. Fixes...
[mono.git] / mono / mini / basic-float.cs
index 9a48e772f13697afed6f587cb98679ede03cd4da..694a1d37d0aa11037d95006b08266d3e50467fd8 100644 (file)
@@ -80,6 +80,20 @@ class Tests
                sbyte sb = (sbyte)a;
                if (sb != 2)
                        return 6;
+               /* MS.NET special cases these */
+               double d = Double.NaN;
+               ui = (uint)d;
+               if (ui != 0)
+                       return 7;
+               d = Double.PositiveInfinity;
+               ui = (uint)d;
+               if (ui != 0)
+                       return 8;
+               d = Double.NegativeInfinity;
+               ui = (uint)d;
+               if (ui != 0)
+                       return 9;
+
                return 0;
        }
 
@@ -616,9 +630,6 @@ class Tests
                return f == PositiveInfinity ? 0 : 1;
        }
 
-       /* 
-          Disabled until they can be fixed to run on amd64
-
        static double VALUE = 0.19975845134874831D;
 
        public static int test_0_float_conversion_reduces_double_precision () {
@@ -629,7 +640,8 @@ class Tests
                return 0;
        }
 
-
+       /* This doesn't work with llvm */
+       /*
     public static int test_0_long_to_double_conversion ()
     {
                long l = 9223372036854775807L;
@@ -639,6 +651,7 @@ class Tests
 
                return 0;
     }
+       */
 
        public static int INT_VAL = 0x13456799;
 
@@ -650,6 +663,14 @@ class Tests
                        return 1;
                return 0;
        }
-       */
+
+       public static int test_0_int8_to_float_convertion ()
+    {
+               double d = (double)(float)(long)INT_VAL;
+
+               if (d != 323315616)
+                       return 1;
+               return 0;
+       }
 }