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

Method testNegInt

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

Source from the content-addressed store, hash-verified

82
83
84 @Test
85 public void testNegInt()
86 {
87 IonInt value = (IonInt) oneValue("-1");
88 assertSame(IonType.INT, value.getType());
89 assertFalse(value.isNullValue());
90 assertArrayEquals(new String[0], value.getTypeAnnotations());
91 assertEquals(-1, value.intValue());
92 assertEquals(-1L, value.longValue());
93
94 value = (IonInt)oneValue("-1999");
95 assertSame(IonType.INT, value.getType());
96 assertFalse(value.isNullValue());
97 assertArrayEquals(new String[0], value.getTypeAnnotations());
98 assertEquals(-1999, value.intValue());
99 assertEquals(-1999L, value.longValue());
100 value.toString();
101 }
102
103
104 @Test

Callers

nothing calls this directly

Calls 8

intValueMethod · 0.95
longValueMethod · 0.95
getTypeMethod · 0.65
isNullValueMethod · 0.65
getTypeAnnotationsMethod · 0.65
toStringMethod · 0.65
oneValueMethod · 0.45
assertEqualsMethod · 0.45

Tested by

no test coverage detected