Skip to content

Commit 4b20c1f

Browse files
authored
Update NumberParsingTest.java (#976)
1 parent 9309439 commit 4b20c1f

File tree

1 file changed

+3
-27
lines changed

1 file changed

+3
-27
lines changed

src/test/java/com/fasterxml/jackson/core/read/NumberParsingTest.java

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -448,15 +448,7 @@ public void testBigNumbers() throws Exception
448448

449449
public void testBigIntegerWithENotation() throws Exception {
450450
final String DOC = "1e5 ";
451-
452-
final int[] modes = new int[]{
453-
MODE_INPUT_STREAM,
454-
MODE_INPUT_STREAM_THROTTLED,
455-
MODE_READER,
456-
MODE_READER_THROTTLED,
457-
MODE_DATA_INPUT
458-
};
459-
for (int mode : modes) {
451+
for (int mode : ALL_MODES) {
460452
try (JsonParser p = createParser(jsonFactory(), mode, DOC)) {
461453
assertToken(JsonToken.VALUE_NUMBER_FLOAT, p.nextToken());
462454
assertEquals(100000L, p.getBigIntegerValue().longValue());
@@ -466,15 +458,7 @@ public void testBigIntegerWithENotation() throws Exception {
466458

467459
public void testLongWithENotation() throws Exception {
468460
final String DOC = "1e5 ";
469-
470-
final int[] modes = new int[]{
471-
MODE_INPUT_STREAM,
472-
MODE_INPUT_STREAM_THROTTLED,
473-
MODE_READER,
474-
MODE_READER_THROTTLED,
475-
MODE_DATA_INPUT
476-
};
477-
for (int mode : modes) {
461+
for (int mode : ALL_MODES) {
478462
try (JsonParser p = createParser(jsonFactory(), mode, DOC)) {
479463
assertToken(JsonToken.VALUE_NUMBER_FLOAT, p.nextToken());
480464
assertEquals(100000L, p.getLongValue());
@@ -484,15 +468,7 @@ public void testLongWithENotation() throws Exception {
484468

485469
public void testIntWithENotation() throws Exception {
486470
final String DOC = "1e5 ";
487-
488-
final int[] modes = new int[]{
489-
MODE_INPUT_STREAM,
490-
MODE_INPUT_STREAM_THROTTLED,
491-
MODE_READER,
492-
MODE_READER_THROTTLED,
493-
MODE_DATA_INPUT
494-
};
495-
for (int mode : modes) {
471+
for (int mode : ALL_MODES) {
496472
try (JsonParser p = createParser(jsonFactory(), mode, DOC)) {
497473
assertToken(JsonToken.VALUE_NUMBER_FLOAT, p.nextToken());
498474
assertEquals(100000, p.getIntValue());

0 commit comments

Comments
 (0)