Skip to content

Commit

Permalink
Merge branch '2.19'
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Jan 14, 2025
2 parents d9d4e95 + b0a718f commit 615cc25
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 26 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
package tools.jackson.dataformat.csv.failing;
package tools.jackson.dataformat.csv.tofix;

import org.junit.jupiter.api.Test;

import tools.jackson.databind.*;
import tools.jackson.databind.MappingIterator;
import tools.jackson.dataformat.csv.*;
import tools.jackson.dataformat.csv.testutil.failure.JacksonTestFailureExpected;

import static org.junit.jupiter.api.Assertions.*;

public class MappingIteratorEnd9Test extends ModuleTestBase
{
// for [dataformats-text#9] (was [dataformat-csv#119])
@JacksonTestFailureExpected
@Test
public void testDefaultSimpleQuotes() throws Exception
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package tools.jackson.dataformat.csv.failing;
package tools.jackson.dataformat.csv.tofix;

import java.io.StringWriter;

Expand All @@ -7,6 +7,7 @@
import tools.jackson.databind.ObjectWriter;
import tools.jackson.databind.SequenceWriter;
import tools.jackson.dataformat.csv.*;
import tools.jackson.dataformat.csv.testutil.failure.JacksonTestFailureExpected;

import static org.junit.jupiter.api.Assertions.assertEquals;

Expand All @@ -15,6 +16,7 @@ public class MissingNullsOnObjectArrayWrite10Test extends ModuleTestBase
private final CsvMapper MAPPER = mapperForCsv();

// for [dataformats-text#10]
@JacksonTestFailureExpected
@Test
public void testNullsOnObjectArrayWrites2Col() throws Exception
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package tools.jackson.dataformat.csv.failing;
package tools.jackson.dataformat.csv.tofix;

import java.io.StringWriter;

import org.junit.jupiter.api.Test;

import tools.jackson.databind.*;
import tools.jackson.databind.ObjectWriter;
import tools.jackson.databind.SequenceWriter;
import tools.jackson.dataformat.csv.*;
import tools.jackson.dataformat.csv.testutil.failure.JacksonTestFailureExpected;

import static org.junit.jupiter.api.Assertions.assertEquals;

Expand All @@ -14,6 +16,7 @@ public class NullWriting116Test extends ModuleTestBase
private final CsvMapper csv = mapperForCsv();

// [dataformat#116]
@JacksonTestFailureExpected
@Test
public void testWithObjectArray() throws Exception
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package tools.jackson.dataformat.csv.failing;
package tools.jackson.dataformat.csv.tofix;

import org.junit.jupiter.api.Test;

import com.fasterxml.jackson.annotation.JsonPropertyOrder;

import tools.jackson.dataformat.csv.*;
import tools.jackson.dataformat.csv.testutil.failure.JacksonTestFailureExpected;

import static org.junit.jupiter.api.Assertions.assertEquals;

Expand All @@ -23,6 +24,7 @@ protected static class ThreeString {
*/

// For #19: need to handle spaces outside quotes, even if not trimming?
@JacksonTestFailureExpected
@Test
public void testSimpleQuotesWithSpaces() throws Exception
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package tools.jackson.dataformat.csv.failing;
package tools.jackson.dataformat.csv.tofix;

import java.nio.charset.StandardCharsets;

import org.junit.jupiter.api.Test;

import tools.jackson.databind.*;
import tools.jackson.databind.JsonNode;

import tools.jackson.dataformat.csv.*;
import tools.jackson.dataformat.csv.testutil.failure.JacksonTestFailureExpected;

import static org.junit.jupiter.api.Assertions.*;

Expand All @@ -16,6 +17,7 @@ public class UnicodeCSVRead497Test extends ModuleTestBase
private final CsvMapper MAPPER = mapperForCsv();

// [dataformats-text#497]
@JacksonTestFailureExpected
@Test
public void testUnicodeAtEnd() throws Exception
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,16 @@

import org.junit.jupiter.api.Test;

import tools.jackson.dataformat.yaml.ModuleTestBase;
import tools.jackson.dataformat.yaml.YAMLFactory;
import tools.jackson.dataformat.yaml.YAMLMapper;
import tools.jackson.dataformat.yaml.YAMLWriteFeature;
import tools.jackson.dataformat.yaml.*;

import static org.junit.jupiter.api.Assertions.assertEquals;

// NOTE: fails only on 2.x (2.12) -- fixed for 3.0
public class SimpleGeneration215Test extends ModuleTestBase
{
// [dataformats-text#215]: trying to disable WRITE_DOC_START_MARKER
// via ObjectWriter does not work
// (works for 3.0, fails with 2.x like 2.19)
//@JacksonTestFailureExpected
@Test
public void testStartMarkerViaWriter() throws Exception
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
package tools.jackson.dataformat.yaml.failing;
package tools.jackson.dataformat.yaml.tofix;

import org.junit.jupiter.api.Test;

import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
import com.fasterxml.jackson.annotation.ObjectIdGenerators;

import tools.jackson.databind.JsonNode;
import tools.jackson.databind.ObjectMapper;
import tools.jackson.dataformat.yaml.ModuleTestBase;

import tools.jackson.dataformat.yaml.testutil.failure.JacksonTestFailureExpected;

import static org.junit.jupiter.api.Assertions.*;
/**
* Although native Object Ids work in general, Tree Model currently
Expand Down Expand Up @@ -44,6 +47,7 @@ public Node(String name) {
;

// [dataformats-text#2]
@JacksonTestFailureExpected
@Test
public void testRoundtripViaTree() throws Exception
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
package tools.jackson.dataformat.yaml.failing;
package tools.jackson.dataformat.yaml.tofix;

import org.junit.jupiter.api.Test;

import com.fasterxml.jackson.annotation.JsonIdentityInfo;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
import com.fasterxml.jackson.annotation.*;

import tools.jackson.databind.ObjectMapper;

import tools.jackson.dataformat.yaml.ModuleTestBase;
import tools.jackson.dataformat.yaml.testutil.failure.JacksonTestFailureExpected;

import static org.junit.jupiter.api.Assertions.*;

Expand Down Expand Up @@ -44,6 +42,7 @@ static class SubNodeWithStringId extends NodeWithStringId { }
private final ObjectMapper MAPPER = newObjectMapper();

// [dataformats-text#25]
@JacksonTestFailureExpected
@Test
public void testPolymorphicAndObjectId25() throws Exception
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
package tools.jackson.dataformat.yaml.failing;
package tools.jackson.dataformat.yaml.tofix;

import java.util.HashMap;
import java.util.Map;

import org.junit.jupiter.api.Test;

import tools.jackson.dataformat.yaml.*;
import tools.jackson.dataformat.yaml.testutil.failure.JacksonTestFailureExpected;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;

public class SimpleGeneration366Test extends ModuleTestBase
{
// [dataformats-text#366]: multiline literal block with trailing spaces does not work
@JacksonTestFailureExpected
@Test
public void testLiteralBlockStyleMultilineWithTrailingSpace() throws Exception
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package tools.jackson.dataformat.yaml.failing;
package tools.jackson.dataformat.yaml.tofix;

import java.nio.charset.StandardCharsets;

Expand All @@ -8,6 +8,7 @@
import tools.jackson.core.JsonToken;

import tools.jackson.dataformat.yaml.*;
import tools.jackson.dataformat.yaml.testutil.failure.JacksonTestFailureExpected;

import static org.junit.jupiter.api.Assertions.assertEquals;

Expand All @@ -17,15 +18,16 @@ public class UnicodeYAMLRead497Test extends ModuleTestBase
private final YAMLMapper MAPPER = newObjectMapper();

// [dataformats-text#497]
@JacksonTestFailureExpected
@Test
public void testUnicodeAtEnd() throws Exception
{
// Had to find edge condition, these would do:
// (NOTE: off-by-one-per-1k compared to Jackson 2.x)
_testUnicodeAtEnd(1023);
_testUnicodeAtEnd(2046);
_testUnicodeAtEnd(3069);
_testUnicodeAtEnd(4092);
_testUnicodeAtEnd(1025);
_testUnicodeAtEnd(2050);
_testUnicodeAtEnd(3075);
_testUnicodeAtEnd(4100);
}

void _testUnicodeAtEnd(int LEN) throws Exception
Expand Down

0 comments on commit 615cc25

Please sign in to comment.