mirror of
https://github.com/corda/corda.git
synced 2025-01-04 04:04:27 +00:00
add a few more tests to Floats.java
This commit is contained in:
parent
dbcd42e70c
commit
ed9e54bca1
@ -23,16 +23,29 @@ public class Floats {
|
||||
expect(multiply(0.5d, 0.5d) == 0.25d);
|
||||
expect(multiply(0.5f, 0.5f) == 0.25f);
|
||||
|
||||
expect(multiply(0.5d, 0.1d) == 0.05d);
|
||||
expect(multiply(0.5f, 0.1f) == 0.05f);
|
||||
|
||||
expect(multiply(0.5d, 0.5d) < 0.5d);
|
||||
expect(multiply(0.5f, 0.5f) < 0.5f);
|
||||
|
||||
expect(multiply(0.5d, 0.1d) < 0.5d);
|
||||
expect(multiply(0.5f, 0.1f) < 0.5f);
|
||||
|
||||
expect(multiply(0.5d, 0.5d) > 0.1d);
|
||||
expect(multiply(0.5f, 0.5f) > 0.1f);
|
||||
|
||||
expect(multiply(0.5d, 0.1d) > 0.01d);
|
||||
expect(multiply(0.5f, 0.1f) > 0.01f);
|
||||
|
||||
expect(divide(0.5d, 0.5d) == 1.0d);
|
||||
|
||||
expect(divide(0.5d, 0.1d) == 5.0d);
|
||||
|
||||
expect(subtract(0.5d, 0.5d) == 0.0d);
|
||||
|
||||
expect(subtract(0.5d, 0.1d) == 0.4d);
|
||||
|
||||
double d = 1d;
|
||||
expect(((int) d) == 1);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user