Skip to content

Commit

Permalink
Fix unit test regression wrt #223-related change to defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Sep 21, 2024
1 parent 47e5a60 commit bd08605
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import org.junit.jupiter.api.Test;

import tools.jackson.core.*;
import tools.jackson.core.json.JsonFactory;
import tools.jackson.core.json.JsonWriteFeature;

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

protected TokenStreamFactory jsonFactory() {
return FACTORY;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@

import tools.jackson.core.StreamWriteFeature;
import tools.jackson.core.json.JsonFactory;
import tools.jackson.core.json.JsonWriteFeature;

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

@Override
protected JsonFactory jsonFactory() {
Expand Down

0 comments on commit bd08605

Please sign in to comment.