Skip to content

Commit d0ef665

Browse files
committed
Add more tests for Reader-with-boundary-condition (some commented out as failing)
1 parent 4034625 commit d0ef665

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

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

+6-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public void testTrailingDotInDecimal() throws Exception {
7272
}
7373
}
7474

75-
public void testLeadingDotInDecimalAllowedAsync() throws Exception {
75+
public void testLeadingDotInDecimalAllowedDataInput() throws Exception {
7676
_testLeadingDotInDecimalAllowed(jsonFactory(), MODE_DATA_INPUT);
7777
}
7878

@@ -83,9 +83,10 @@ public void testLeadingDotInDecimalAllowedBytes() throws Exception {
8383

8484
public void testLeadingDotInDecimalAllowedReader() throws Exception {
8585
_testLeadingDotInDecimalAllowed(jsonFactory(), MODE_READER);
86+
// _testLeadingDotInDecimalAllowed(jsonFactory(), MODE_READER_THROTTLED);
8687
}
8788

88-
public void testTrailingDotInDecimalAllowedAsync() throws Exception {
89+
public void testTrailingDotInDecimalAllowedDataInput() throws Exception {
8990
_testTrailingDotInDecimalAllowed(jsonFactory(), MODE_DATA_INPUT);
9091
}
9192

@@ -96,6 +97,7 @@ public void testTrailingDotInDecimalAllowedBytes() throws Exception {
9697

9798
public void testTrailingDotInDecimalAllowedReader() throws Exception {
9899
_testTrailingDotInDecimalAllowed(jsonFactory(), MODE_READER);
100+
// _testTrailingDotInDecimalAllowed(jsonFactory(), MODE_READER_THROTTLED);
99101
}
100102

101103
public void testLeadingPlusSignInDecimalAllowedDataInput() throws Exception {
@@ -109,6 +111,7 @@ public void testLeadingPlusSignInDecimalAllowedBytes() throws Exception {
109111

110112
public void testLeadingPlusSignInDecimalAllowedReader() throws Exception {
111113
_testLeadingPlusSignInDecimalAllowed(jsonFactory(), MODE_READER);
114+
// _testLeadingPlusSignInDecimalAllowed(jsonFactory(), MODE_READER_THROTTLED);
112115
}
113116

114117
public void testLeadingDotInNegativeDecimalAllowedAsync() throws Exception {
@@ -122,6 +125,7 @@ public void testLeadingDotInNegativeDecimalAllowedBytes() throws Exception {
122125

123126
public void testLeadingDotInNegativeDecimalAllowedReader() throws Exception {
124127
_testLeadingDotInNegativeDecimalAllowed(jsonFactory(), MODE_READER);
128+
// _testLeadingDotInNegativeDecimalAllowed(jsonFactory(), MODE_READER_THROTTLED);
125129
}
126130

127131
private void _testLeadingDotInDecimalAllowed(JsonFactory f, int mode) throws Exception

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

+5
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public void testNonStandardAnyCharQuoting() throws Exception
2424
_testNonStandardBackslashQuoting(MODE_INPUT_STREAM_THROTTLED);
2525
_testNonStandardBackslashQuoting(MODE_DATA_INPUT);
2626
_testNonStandardBackslashQuoting(MODE_READER);
27+
_testNonStandardBackslashQuoting(MODE_READER_THROTTLED);
2728
}
2829

2930
public void testLeadingZeroesUTF8() throws Exception {
@@ -40,6 +41,8 @@ public void testLeadingZeroesUTF8() throws Exception {
4041
public void testLeadingZeroesReader() throws Exception {
4142
_testLeadingZeroes(MODE_READER, false);
4243
_testLeadingZeroes(MODE_READER, true);
44+
_testLeadingZeroes(MODE_READER_THROTTLED, false);
45+
_testLeadingZeroes(MODE_READER_THROTTLED, true);
4346
}
4447

4548
// allow NaN
@@ -48,6 +51,7 @@ public void testAllowNaN() throws Exception {
4851
_testAllowNaN(MODE_INPUT_STREAM_THROTTLED);
4952
_testAllowNaN(MODE_DATA_INPUT);
5053
_testAllowNaN(MODE_READER);
54+
_testAllowNaN(MODE_READER_THROTTLED);
5155
}
5256

5357
// allow +Inf/-Inf
@@ -56,6 +60,7 @@ public void testAllowInfinity() throws Exception {
5660
_testAllowInf(MODE_INPUT_STREAM_THROTTLED);
5761
_testAllowInf(MODE_DATA_INPUT);
5862
_testAllowInf(MODE_READER);
63+
_testAllowInf(MODE_READER_THROTTLED);
5964
}
6065

6166
/*

0 commit comments

Comments
 (0)