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

Method testLongs

src/test/java/com/amazon/ion/IntTest.java:176–192  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

174 }
175
176 @Test
177 public void testLongs()
178 {
179 IonInt value = (IonInt) oneValue(String.valueOf(A_LONG_INT));
180 assertFalse(value.isNullValue());
181 assertArrayEquals(new String[0], value.getTypeAnnotations());
182 assertEquals(A_LONG_INT, value.longValue());
183
184 value = (IonInt) oneValue("a::" + Long.MAX_VALUE);
185 assertFalse(value.isNullValue());
186 checkAnnotation("a", value);
187 assertEquals(Long.MAX_VALUE, value.longValue());
188
189 // Ensure that annotation makes it through value mods
190 modifyInt(value);
191 checkAnnotation("a", value);
192 }
193
194 private static final BigInteger SUPER_BIG = new BigInteger("10123456789ABCDEF", 16);
195 private static final long SUPER_BIG_TRUNC_64 = 0x0123456789ABCDEFL;

Callers

nothing calls this directly

Calls 8

longValueMethod · 0.95
modifyIntMethod · 0.95
isNullValueMethod · 0.65
getTypeAnnotationsMethod · 0.65
oneValueMethod · 0.45
valueOfMethod · 0.45
assertEqualsMethod · 0.45
checkAnnotationMethod · 0.45

Tested by

no test coverage detected