mirror of
https://github.com/corda/corda.git
synced 2025-01-04 04:04:27 +00:00
Added another floatToIntBits test
This commit is contained in:
parent
f5a168f584
commit
a0c12ad259
@ -211,7 +211,8 @@ public class Floats {
|
||||
double d = (double) z;
|
||||
expect(d == 12345.0);
|
||||
}
|
||||
|
||||
|
||||
// Test floatToIntBits
|
||||
{
|
||||
int orig = 0x7f800001;
|
||||
float NaN = Float.intBitsToFloat(orig);
|
||||
@ -220,6 +221,14 @@ public class Floats {
|
||||
expect(result == expected);
|
||||
}
|
||||
|
||||
{
|
||||
int orig = 0x7f801001;
|
||||
float NaN = Float.intBitsToFloat(orig);
|
||||
int result = Float.floatToIntBits(NaN);
|
||||
int expected = 0x7fc00000;
|
||||
expect(result == expected);
|
||||
}
|
||||
|
||||
{
|
||||
int orig = 0x00800001;
|
||||
float number = Float.intBitsToFloat(orig);
|
||||
|
Loading…
Reference in New Issue
Block a user