()
| 116 | } |
| 117 | |
| 118 | @Test |
| 119 | public void testDecimals() |
| 120 | { |
| 121 | IonDecimal value = (IonDecimal) oneValue("1.0"); |
| 122 | assertSame(IonType.DECIMAL, value.getType()); |
| 123 | assertFalse(value.isNullValue()); |
| 124 | assertArrayEquals(new String[0], value.getTypeAnnotations()); |
| 125 | assertEquals(1.0F, value.floatValue()); |
| 126 | assertEquals(1.0D, value.doubleValue()); |
| 127 | |
| 128 | assertEquals(new BigDecimal(1).setScale(1), value.bigDecimalValue()); |
| 129 | // TODO more... |
| 130 | |
| 131 | value = (IonDecimal) oneValue("a::1.0"); |
| 132 | assertFalse(value.isNullValue()); |
| 133 | checkAnnotation("a", value); |
| 134 | |
| 135 | // Ensure that annotation makes it through value mods |
| 136 | modifyDecimal(value); |
| 137 | checkAnnotation("a", value); |
| 138 | } |
| 139 | |
| 140 | @Test |
| 141 | public void testDFormat() |
nothing calls this directly
no test coverage detected