projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
2007-07-09 Mark Probst <mark.probst@gmail.com>
[mono.git]
/
mono
/
mini
/
basic-float.cs
diff --git
a/mono/mini/basic-float.cs
b/mono/mini/basic-float.cs
index 7a797b03aab30fea9050ce8478f2b6f926f5655f..fb731f687789ef1547c1504cd5221dba3eab6fde 100644
(file)
--- a/
mono/mini/basic-float.cs
+++ b/
mono/mini/basic-float.cs
@@
-67,6
+67,9
@@
class Tests {
byte b = (byte)a;
if (b != 2)
return 5;
byte b = (byte)a;
if (b != 2)
return 5;
+ sbyte sb = (sbyte)a;
+ if (sb != 2)
+ return 6;
return 0;
}
return 0;
}
@@
-189,6
+192,20
@@
class Tests {
return 4;
}
return 4;
}
+ static int test_4_single_long_cast () {
+ long a = 1000;
+ float d = (float)a;
+ long b = (long)d;
+ if (b != 1000)
+ return 0;
+ a = -1;
+ d = (float)a;
+ b = (long)d;
+ if (b != -1)
+ return 1;
+ return 4;
+ }
+
public static int test_0_rounding () {
long ticks = 631502475130080000L;
long ticksperday = 864000000000L;
public static int test_0_rounding () {
long ticks = 631502475130080000L;
long ticksperday = 864000000000L;
@@
-531,5
+548,13
@@
class Tests {
return result;
}
return result;
}
+ 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;
+
+ return f == PositiveInfinity ? 0 : 1;
+ }
}
}