Skip to content

Commit bd08605

Browse files
committed
Fix unit test regression wrt #223-related change to defaults
1 parent 47e5a60 commit bd08605

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

src/test/java/tools/jackson/core/write/ArrayGenerationTest.java

+7-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
import org.junit.jupiter.api.Test;
99

1010
import tools.jackson.core.*;
11+
import tools.jackson.core.json.JsonFactory;
12+
import tools.jackson.core.json.JsonWriteFeature;
1113

1214
import static org.junit.jupiter.api.Assertions.assertEquals;
1315
import static org.junit.jupiter.api.Assertions.fail;
@@ -17,7 +19,11 @@
1719
*/
1820
class ArrayGenerationTest extends JUnit5TestBase
1921
{
20-
private final TokenStreamFactory FACTORY = newStreamFactory();
22+
// 17-Sep-2024, tatu: [core#223] change to surrogates, let's use old behavior
23+
// for now for simpler testing
24+
private final JsonFactory FACTORY = streamFactoryBuilder()
25+
.disable(JsonWriteFeature.COMBINE_UNICODE_SURROGATES_IN_UTF8)
26+
.build();
2127

2228
protected TokenStreamFactory jsonFactory() {
2329
return FACTORY;

src/test/java/tools/jackson/core/write/FastDoubleArrayGenerationTest.java

+7-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@
22

33
import tools.jackson.core.StreamWriteFeature;
44
import tools.jackson.core.json.JsonFactory;
5+
import tools.jackson.core.json.JsonWriteFeature;
56

67
public class FastDoubleArrayGenerationTest extends ArrayGenerationTest {
7-
private final JsonFactory FACTORY = JsonFactory.builder().enable(StreamWriteFeature.USE_FAST_DOUBLE_WRITER).build();
8+
private final JsonFactory FACTORY = streamFactoryBuilder()
9+
.enable(StreamWriteFeature.USE_FAST_DOUBLE_WRITER)
10+
// 17-Sep-2024, tatu: [core#223] change to surrogates, let's use old behavior
11+
// for now for simpler testing
12+
.disable(JsonWriteFeature.COMBINE_UNICODE_SURROGATES_IN_UTF8)
13+
.build();
814

915
@Override
1016
protected JsonFactory jsonFactory() {

0 commit comments

Comments
 (0)