Skip to content

Commit

Permalink
[ JSTEP-10 ] Migrate failing tests to tofix (#529)
Browse files Browse the repository at this point in the history
  • Loading branch information
JooHyukKim authored Jan 14, 2025
1 parent c702930 commit b0a718f
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
package com.fasterxml.jackson.dataformat.csv.failing;
package com.fasterxml.jackson.dataformat.csv.tofix;

import org.junit.jupiter.api.Test;

import com.fasterxml.jackson.databind.MappingIterator;
import com.fasterxml.jackson.dataformat.csv.*;
import com.fasterxml.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 com.fasterxml.jackson.dataformat.csv.failing;
package com.fasterxml.jackson.dataformat.csv.tofix;

import java.io.StringWriter;

Expand All @@ -7,6 +7,7 @@
import com.fasterxml.jackson.databind.ObjectWriter;
import com.fasterxml.jackson.databind.SequenceWriter;
import com.fasterxml.jackson.dataformat.csv.*;
import com.fasterxml.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,4 +1,4 @@
package com.fasterxml.jackson.dataformat.csv.failing;
package com.fasterxml.jackson.dataformat.csv.tofix;

import java.io.StringWriter;

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

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

Expand All @@ -15,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,9 +1,10 @@
package com.fasterxml.jackson.dataformat.csv.failing;
package com.fasterxml.jackson.dataformat.csv.tofix;

import org.junit.jupiter.api.Test;

import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.dataformat.csv.*;
import com.fasterxml.jackson.dataformat.csv.testutil.failure.JacksonTestFailureExpected;

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

Expand All @@ -22,6 +23,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,4 +1,4 @@
package com.fasterxml.jackson.dataformat.csv.failing;
package com.fasterxml.jackson.dataformat.csv.tofix;

import java.nio.charset.StandardCharsets;

Expand All @@ -7,6 +7,7 @@
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.dataformat.csv.CsvMapper;
import com.fasterxml.jackson.dataformat.csv.ModuleTestBase;
import com.fasterxml.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
10 changes: 0 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,6 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
<exclude>com/fasterxml/jackson/**/failing/*.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</pluginManagement>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fasterxml.jackson.dataformat.yaml.failing;
package com.fasterxml.jackson.dataformat.yaml.tofix;

import org.junit.jupiter.api.Test;

Expand All @@ -7,6 +7,7 @@
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.dataformat.yaml.ModuleTestBase;
import com.fasterxml.jackson.dataformat.yaml.testutil.failure.JacksonTestFailureExpected;

import static org.junit.jupiter.api.Assertions.*;
/**
Expand Down Expand Up @@ -44,6 +45,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,10 +1,11 @@
package com.fasterxml.jackson.dataformat.yaml.failing;
package com.fasterxml.jackson.dataformat.yaml.tofix;

import org.junit.jupiter.api.Test;

import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.dataformat.yaml.ModuleTestBase;
import com.fasterxml.jackson.dataformat.yaml.testutil.failure.JacksonTestFailureExpected;

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

Expand Down Expand Up @@ -39,6 +40,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,17 +1,19 @@
package com.fasterxml.jackson.dataformat.yaml.failing;
package com.fasterxml.jackson.dataformat.yaml.tofix;

import java.util.Collections;

import org.junit.jupiter.api.Test;

import com.fasterxml.jackson.dataformat.yaml.*;
import com.fasterxml.jackson.dataformat.yaml.testutil.failure.JacksonTestFailureExpected;

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
@JacksonTestFailureExpected
@Test
public void testStartMarkerViaWriter() throws Exception
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
package com.fasterxml.jackson.dataformat.yaml.failing;
package com.fasterxml.jackson.dataformat.yaml.tofix;

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

import org.junit.jupiter.api.Test;

import com.fasterxml.jackson.dataformat.yaml.*;
import com.fasterxml.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 com.fasterxml.jackson.dataformat.yaml.failing;
package com.fasterxml.jackson.dataformat.yaml.tofix;

import java.nio.charset.StandardCharsets;

Expand All @@ -8,6 +8,7 @@
import com.fasterxml.jackson.core.JsonToken;
import com.fasterxml.jackson.dataformat.yaml.ModuleTestBase;
import com.fasterxml.jackson.dataformat.yaml.YAMLMapper;
import com.fasterxml.jackson.dataformat.yaml.testutil.failure.JacksonTestFailureExpected;

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

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

// [dataformats-text#497]
@JacksonTestFailureExpected
@Test
public void testUnicodeAtEnd() throws Exception
{
Expand Down

0 comments on commit b0a718f

Please sign in to comment.