File tree 1 file changed +14
-1
lines changed
src/test/java/com/fasterxml/jackson/core/json
1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ public class JsonParserGeneratorTest
12
12
extends BaseTest {
13
13
final JsonFactory JSON_F = newStreamFactory ();
14
14
15
- public void testRoundtripBigDecimal () throws Exception {
15
+ public void testCopyCurrentEventBigDecimal () throws Exception {
16
16
String input = "1e999" ;
17
17
JsonParser parser = JSON_F .createParser (input );
18
18
parser .nextToken ();
@@ -24,4 +24,17 @@ public void testRoundtripBigDecimal() throws Exception {
24
24
String actual = stringWriter .toString ();
25
25
assertEquals (input , actual );
26
26
}
27
+
28
+ public void testCopyCurrentStructureBigDecimal () throws Exception {
29
+ String input = "[1e999]" ;
30
+ JsonParser parser = JSON_F .createParser (input );
31
+ parser .nextToken ();
32
+ StringWriter stringWriter = new StringWriter ();
33
+ JsonGenerator generator = JSON_F .createGenerator (stringWriter );
34
+ generator .copyCurrentStructure (parser );
35
+ parser .close ();
36
+ generator .close ();
37
+ String actual = stringWriter .toString ();
38
+ assertEquals (input , actual );
39
+ }
27
40
}
You can’t perform that action at this time.
0 commit comments