Checks that the value is an IonFloat with the given value. @param expected may be null to check for null.float
(Double expected, IonValue actual)
| 726 | * @param expected may be null to check for null.float |
| 727 | */ |
| 728 | public static void checkFloat(Double expected, IonValue actual) |
| 729 | { |
| 730 | checkType(IonType.FLOAT, actual); |
| 731 | IonFloat i = (IonFloat) actual; |
| 732 | |
| 733 | if (expected == null) { |
| 734 | assertTrue("expected null value", actual.isNullValue()); |
| 735 | } |
| 736 | else |
| 737 | { |
| 738 | assertEquals("decimal content", |
| 739 | expected.doubleValue(), i.doubleValue(), 0d); |
| 740 | } |
| 741 | } |
| 742 | |
| 743 | public static void checkNullNull(IonValue actual) |
| 744 | { |
no test coverage detected