Skip to content

Commit

Permalink
Minor clean up for #616 test
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed May 12, 2020
1 parent 3e0e853 commit ad08ff6
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,30 @@

public class TrailingCommas616Test extends BaseTest
{
final JsonFactory f = JsonFactory.builder()
private final JsonFactory JSON_F_ALLOW_MISSING = JsonFactory.builder()
.enable(JsonReadFeature.ALLOW_MISSING_VALUES)
.build();

// [core#616]
public void testRootLevelComma616() throws Exception
{
_testRootLevel616(f, MODE_READER);
_testRootLevel616(MODE_READER);
}

public void testRootLevelComma616Bytes() throws Exception
{
_testRootLevel616(f, MODE_INPUT_STREAM);
_testRootLevel616(f, MODE_INPUT_STREAM_THROTTLED);
_testRootLevel616(MODE_INPUT_STREAM);
_testRootLevel616(MODE_INPUT_STREAM_THROTTLED);
}

public void testRootLevelComma616DataInput() throws Exception
{
_testRootLevel616(f, MODE_DATA_INPUT);
_testRootLevel616(MODE_DATA_INPUT);
}

private void _testRootLevel616(JsonFactory f, int mode) throws Exception
private void _testRootLevel616(int mode) throws Exception
{
JsonParser p = createParser(f, mode, ",");
JsonParser p = createParser(JSON_F_ALLOW_MISSING, mode, ",");
try {
p.nextToken();
fail("Should not pass");
Expand Down

0 comments on commit ad08ff6

Please sign in to comment.