MCPcopy Create free account
hub / github.com/amazon-ion/ion-java / checkFloat

Method checkFloat

src/test/java/com/amazon/ion/IonTestCase.java:728–741  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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 {

Callers 1

Calls 4

checkTypeMethod · 0.95
assertEqualsMethod · 0.95
doubleValueMethod · 0.95
isNullValueMethod · 0.65

Tested by

no test coverage detected