/* A comparison made to same variable. */
#pragma warning disable 1718
-#if MOBILE
+#if __MOBILE__
class FloatTests
#else
class Tests
#endif
{
-#if !MOBILE
+#if !__MOBILE__
public static int Main (string[] args) {
return TestDriver.RunTests (typeof (Tests), args);
}
public static int test_0_float_precision () {
float f1 = 3.40282346638528859E+38f;
float f2 = 3.40282346638528859E+38f;
- float PositiveInfinity = 1.0f / 0.0f;
- float f = f1 + f2;
+ float PositiveInfinity = (float)(1.0f / 0.0f);
+ float f = (float)(f1 + f2);
return f == PositiveInfinity ? 0 : 1;
}
return (int)(f1 / f2);
}
+ public static int test_1_frem_r4 () {
+ float f1 = 7.0f;
+ float f2 = 2.0f;
+ return (int)(f1 % f2);
+ }
+
public static int test_0_fcmp_eq_r4 () {
float f1 = 1.0f;
float f2 = 1.0f;
short b = (short)a;
return b == 127 ? 0 : 1;
}
+
+ public static int test_10_rconv_to_u8 () {
+ ulong l = 10;
+ float f = (float)l;
+ l = (ulong)f;
+ return (int)l;
+ }
+
}