()
| 102 | |
| 103 | |
| 104 | @Test |
| 105 | public void testInts() |
| 106 | { |
| 107 | IonInt value = (IonInt) oneValue("1"); |
| 108 | assertFalse(value.isNullValue()); |
| 109 | assertArrayEquals(new String[0], value.getTypeAnnotations()); |
| 110 | assertEquals(1, value.intValue()); |
| 111 | assertEquals(1L, value.longValue()); |
| 112 | |
| 113 | value = (IonInt) oneValue("a::" + Integer.MAX_VALUE); |
| 114 | assertFalse(value.isNullValue()); |
| 115 | checkAnnotation("a", value); |
| 116 | assertEquals(Integer.MAX_VALUE, value.intValue()); |
| 117 | assertEquals(Integer.MAX_VALUE, value.longValue()); |
| 118 | |
| 119 | // Ensure that annotation makes it through value mods |
| 120 | modifyInt(value); |
| 121 | checkAnnotation("a", value); |
| 122 | |
| 123 | value = (IonInt) oneValue("" + Integer.MIN_VALUE); |
| 124 | assertFalse(value.isNullValue()); |
| 125 | assertArrayEquals(new String[0], value.getTypeAnnotations()); |
| 126 | assertEquals(Integer.MIN_VALUE, value.intValue()); |
| 127 | } |
| 128 | |
| 129 | @Test |
| 130 | public void testPositiveSign() |
nothing calls this directly
no test coverage detected