/* A comparison made to same variable. */
#pragma warning disable 1718
-class Tests {
-
- public static int Main () {
- return TestDriver.RunTests (typeof (Tests));
+#if MOBILE
+class FloatTests
+#else
+class Tests
+#endif
+{
+
+#if !MOBILE
+ public static int Main (string[] args) {
+ return TestDriver.RunTests (typeof (Tests), args);
}
+#endif
public static int test_0_beq () {
double a = 2.0;
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;
}
return (int)f;
}
+ public static int test_0_conv_r4_m1 () {
+ int i = -1;
+ float f = (float)i;
+ return (int)f + 1;
+ }
+
public static int test_5_double_conv_r4 () {
double d = 5.0;
float f = (float)d;
ulong b = (ulong)d;
if (b != 1000)
return 0;
+ a = 0xffffffffffffffff;
+ float f = (float)a;
+ if (!(f > 0f))
+ return 1;
return 4;
}