* exceptions.cs: Add more tests for double->int conversion.
svn path=/trunk/mono/; revision=22438
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.
if (failed)
return 8;
+ {
+ int i;
+ float f = 1.1f;
+ checked {
+ i = (int) f;
+ }
+ }
+
return 0;
}
}
if (failed)
return 8;
+
+ {
+ uint i;
+ float f = 1.1f;
+ checked {
+ i = (uint) f;
+ }
+ }
return 0;
}
if (failed)
return 4;
+ {
+ long i;
+ float f = 1.1f;
+ checked {
+ i = (long) f;
+ }
+ }
+
return 0;
}
if (failed)
return 4;
+ {
+ ulong i;
+ float f = 1.1f;
+ checked {
+ i = (ulong) f;
+ }
+ }
+
return 0;
}