2004-01-23 Zoltan Varga <vargaz@freemail.hu>
authorZoltan Varga <vargaz@gmail.com>
Fri, 23 Jan 2004 17:21:32 +0000 (17:21 -0000)
committerZoltan Varga <vargaz@gmail.com>
Fri, 23 Jan 2004 17:21:32 +0000 (17:21 -0000)
* exceptions.cs: Add more tests for double->int conversion.

svn path=/trunk/mono/; revision=22438

mono/mini/ChangeLog
mono/mini/exceptions.cs

index 836147771987979e61a341049b1d1d72952680fe..e039a74a2300a92ffbd216afe14e95aa0f271a16 100644 (file)
@@ -1,5 +1,7 @@
 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
 
+       * exceptions.cs: Add more tests for double->int conversion.
+
        * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
        we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
 
index 48974fa187082d30cf40c8d560c96dda228cb1e1..4dca2a3fd972add6748ef568f0bb81d2966ff790 100644 (file)
@@ -1009,6 +1009,14 @@ class Tests {
                if (failed)
                        return 8;
 
+               {
+                       int i; 
+                       float f = 1.1f;
+                       checked {
+                               i = (int) f;
+                       }
+               }
+
                return 0;
        }
 
@@ -1112,6 +1120,14 @@ class Tests {
                }
                if (failed)
                        return 8;
+
+               {
+                       uint i; 
+                       float f = 1.1f;
+                       checked {
+                               i = (uint) f;
+                       }
+               }
                
                return 0;
        }
@@ -1169,6 +1185,14 @@ class Tests {
                if (failed)
                        return 4;
 
+               {
+                       long i; 
+                       float f = 1.1f;
+                       checked {
+                               i = (long) f;
+                       }
+               }
+
                return 0;
        }
 
@@ -1225,6 +1249,14 @@ class Tests {
                if (failed)
                        return 4;
 
+               {
+                       ulong i; 
+                       float f = 1.1f;
+                       checked {
+                               i = (ulong) f;
+                       }
+               }
+
                return 0;
        }