Minor test changes prepping for
@@ -111,7 +111,7 @@ public class NonStandardNumberParsingTest
public void testLeadingPlusSignInDecimalAllowedReader() throws Exception {
_testLeadingPlusSignInDecimalAllowed(jsonFactory(), MODE_READER);
-// _testLeadingPlusSignInDecimalAllowed(jsonFactory(), MODE_READER_THROTTLED);
+ _testLeadingPlusSignInDecimalAllowed(jsonFactory(), MODE_READER_THROTTLED);
}
public void testLeadingDotInNegativeDecimalAllowedAsync() throws Exception {
@@ -144,6 +144,8 @@ public class NonStandardNumberParsingTest
assertEquals(JsonToken.VALUE_NUMBER_INT, p.nextToken());
assertEquals(125.0, p.getValueAsDouble());
assertEquals("125", p.getDecimalValue().toString());
+ // 27-Jun-2022, tatu: As per [core#784] this SHOULD include leading
+ // plug sign
assertEquals("125", p.getText());
}
try (JsonParser p = createParser(f, mode, " +0.125 ")) {
@@ -156,7 +158,12 @@ public class NonStandardNumberParsingTest
assertEquals(JsonToken.VALUE_NUMBER_FLOAT, p.nextToken());
assertEquals(0.125, p.getValueAsDouble());
assertEquals("0.125", p.getDecimalValue().toString());
- assertEquals("+.125", p.getText());
+ // 27-Jun-2022, tatu: As per [core#784] this SHOULD include leading
+ // plug sign. But worse, looks like sometimes it does sometimes not
+ final String text = p.getText();
+ if (!"+.125".equals(text) && !".125".equals(text)) {
+ fail("Bad textual representation: ["+text+"]");
+ }
}
}
