-
-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wrap possible AssertionError from Ion class (#418)
Signed-off-by: Arthur Chan <[email protected]>
- Loading branch information
1 parent
0e76830
commit be8d29e
Showing
2 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
ion/src/test/java/com/fasterxml/jackson/dataformat/ion/fuzz/Fuzz64721InvalidIonTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.fasterxml.jackson.dataformat.ion.fuzz; | ||
|
||
import com.fasterxml.jackson.core.JsonParseException; | ||
import com.fasterxml.jackson.dataformat.ion.*; | ||
|
||
import java.io.IOException; | ||
|
||
import org.junit.Assert; | ||
import org.junit.Test; | ||
|
||
@SuppressWarnings("resource") | ||
public class Fuzz64721InvalidIonTest | ||
{ | ||
@Test(expected = JsonParseException.class) | ||
public void testFuzz64721AssertionException() throws IOException { | ||
IonFactory f = IonFactory | ||
.builderForBinaryWriters() | ||
.enable(IonParser.Feature.USE_NATIVE_TYPE_ID) | ||
.build(); | ||
IonObjectMapper mapper = IonObjectMapper.builder(f).build(); | ||
mapper.readValue("$0/", EnumFuzz.class); | ||
} | ||
|
||
private static enum EnumFuzz { | ||
A, B, C, D, E; | ||
} | ||
} |