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

Method checkInt

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

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

(BigInteger expected, IonValue actual)

Source from the content-addressed store, hash-verified

598 * @param expected may be null to check for null.int
599 */
600 public static void checkInt(BigInteger expected, IonValue actual)
601 {
602 checkType(IonType.INT, actual);
603 IonInt i = (IonInt) actual;
604
605 if (expected == null) {
606 assertTrue("expected null value", actual.isNullValue());
607 }
608 else
609 {
610 assertEquals("int content", expected, i.bigIntegerValue());
611 }
612 }
613
614 /**
615 * Checks that the value is an IonInt with the given value.

Callers 15

testLoadOneValueMethod · 0.45
testCloneMethod · 0.45
testRemoveByIndexMethod · 0.45
testAddFactoryMethod · 0.45
checkGzipDetectionMethod · 0.45

Calls 5

checkTypeMethod · 0.95
assertEqualsMethod · 0.95
bigIntegerValueMethod · 0.95
longValueMethod · 0.95
isNullValueMethod · 0.65

Tested by

no test coverage detected