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

Method checkDecimal

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

Checks that the value is an IonDecimal with the given value. @param expected may be null to check for null.decimal

(Double expected, IonValue actual)

Source from the content-addressed store, hash-verified

644 * @param expected may be null to check for null.decimal
645 */
646 public static void checkDecimal(Double expected, IonValue actual)
647 {
648 checkType(IonType.DECIMAL, actual);
649 IonDecimal i = (IonDecimal) actual;
650
651 if (expected == null) {
652 assertTrue("expected null value", actual.isNullValue());
653 }
654 else
655 {
656 assertEquals("decimal content",
657 expected.doubleValue(), i.doubleValue(), 0d);
658 }
659 }
660
661
662 public static void checkTimestamp(String expected, Timestamp actual)

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected