Skip to content

Commit 132f2e7

Browse files
committed
Fix some missed failing->tofix cases
1 parent 74eecd3 commit 132f2e7

File tree

6 files changed

+36
-47
lines changed

6 files changed

+36
-47
lines changed

pom.xml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -110,16 +110,6 @@
110110
</execution>
111111
</executions>
112112
</plugin>
113-
114-
<plugin>
115-
<groupId>org.apache.maven.plugins</groupId>
116-
<artifactId>maven-surefire-plugin</artifactId>
117-
<configuration>
118-
<excludes>
119-
<exclude>tools/jackson/**/failing/*.java</exclude>
120-
</excludes>
121-
</configuration>
122-
</plugin>
123113
</plugins>
124114
</pluginManagement>
125115

yaml/pom.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@
3232
</properties>
3333

3434
<dependencies>
35-
<!-- Extends Jackson core, databind (optional); uses SnakeYAML for parsing, generation -->
35+
<!-- Extends Jackson core, databind; uses SnakeYAML for parsing, generation -->
36+
<dependency>
37+
<groupId>tools.jackson.core</groupId>
38+
<artifactId>jackson-core</artifactId>
39+
</dependency>
3640
<dependency>
3741
<groupId>tools.jackson.core</groupId>
3842
<artifactId>jackson-databind</artifactId>

yaml/src/test/java/tools/jackson/dataformat/yaml/failing/StreamingParse146Test.java

Lines changed: 0 additions & 26 deletions
This file was deleted.

yaml/src/test/java/tools/jackson/dataformat/yaml/failing/IntegerWithUnderscoresReadTest.java renamed to yaml/src/test/java/tools/jackson/dataformat/yaml/tofix/IntegerWithUnderscoresReadTest.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
package tools.jackson.dataformat.yaml.failing;
1+
package tools.jackson.dataformat.yaml.tofix;
2+
3+
import org.junit.jupiter.api.Test;
24

35
import tools.jackson.databind.ObjectMapper;
46
import tools.jackson.dataformat.yaml.ModuleTestBase;
7+
import tools.jackson.dataformat.yaml.testutil.failure.JacksonTestFailureExpected;
58

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

@@ -22,10 +25,13 @@ public void setV(Integer v)
2225
}
2326
}
2427

28+
private final ObjectMapper MAPPER = newObjectMapper();
29+
30+
@JacksonTestFailureExpected
31+
@Test
2532
public void testJsonIntegerWithUnderscores() throws Exception
2633
{
27-
ObjectMapper mapper = new ObjectMapper();
28-
IntegerHolder integerHolder = mapper.readValue("{\"v\": \"1_000_000\"}", IntegerHolder.class);
34+
IntegerHolder integerHolder = MAPPER.readValue("{\"v\": \"1_000_000\"}", IntegerHolder.class);
2935
assertNotNull(integerHolder);
3036
assertEquals(Integer.valueOf(1000000), integerHolder.getV());
3137
}

yaml/src/test/java/tools/jackson/dataformat/yaml/failing/LongWithUnderscoresReadTest.java renamed to yaml/src/test/java/tools/jackson/dataformat/yaml/tofix/LongWithUnderscoresReadTest.java

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
package tools.jackson.dataformat.yaml.failing;
1+
package tools.jackson.dataformat.yaml.tofix;
2+
3+
import org.junit.jupiter.api.Test;
24

35
import tools.jackson.databind.ObjectMapper;
6+
47
import tools.jackson.dataformat.yaml.ModuleTestBase;
5-
import tools.jackson.dataformat.yaml.YAMLFactory;
8+
import tools.jackson.dataformat.yaml.testutil.failure.JacksonTestFailureExpected;
69

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

@@ -24,19 +27,23 @@ public void setV(Long v)
2427
}
2528
}
2629

30+
private final ObjectMapper MAPPER = newObjectMapper();
31+
32+
@JacksonTestFailureExpected
33+
@Test
2734
public void testYamlLongWithUnderscores() throws Exception
2835
{
29-
ObjectMapper mapper = new ObjectMapper(new YAMLFactory());
30-
LongHolder longHolder = mapper.readValue("v: 1_000_000", LongHolder.class);
36+
LongHolder longHolder = MAPPER.readValue("v: 1_000_000", LongHolder.class);
3137
assertNotNull(longHolder);
3238
assertEquals(LongHolder.class, longHolder.getClass());
3339
assertEquals(Long.valueOf(1000000), longHolder.getV());
3440
}
3541

42+
@JacksonTestFailureExpected
43+
@Test
3644
public void testJsonLongWithUnderscores() throws Exception
3745
{
38-
ObjectMapper mapper = new ObjectMapper();
39-
LongHolder longHolder = mapper.readValue("{\"v\": \"1_000_000\"}", LongHolder.class);
46+
LongHolder longHolder = MAPPER.readValue("{\"v\": \"1_000_000\"}", LongHolder.class);
4047
assertNotNull(longHolder);
4148
assertEquals(Long.valueOf(1000000), longHolder.getV());
4249
}

yaml/src/test/java/tools/jackson/dataformat/yaml/failing/NumberAltIntRead71Test.java renamed to yaml/src/test/java/tools/jackson/dataformat/yaml/tofix/NumberAltIntRead71Test.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
package tools.jackson.dataformat.yaml.failing;
1+
package tools.jackson.dataformat.yaml.tofix;
22

33
import java.math.BigInteger;
44

55
import org.junit.jupiter.api.Test;
66

77
import tools.jackson.databind.ObjectMapper;
88
import tools.jackson.dataformat.yaml.ModuleTestBase;
9+
import tools.jackson.dataformat.yaml.testutil.failure.JacksonTestFailureExpected;
910

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

@@ -32,6 +33,7 @@ static class BigHolder {
3233
private final ObjectMapper MAPPER = newObjectMapper();
3334

3435
// [dataformats-text#71]
36+
@JacksonTestFailureExpected
3537
@Test
3638
public void testDeserHexInt71() throws Exception
3739
{
@@ -46,6 +48,7 @@ public void testDeserHexInt71() throws Exception
4648
_verifyNumber(new BigInteger("-11112222333344445555ACDC", 16), "-0x11112222333344445555acdc");
4749
}
4850

51+
@JacksonTestFailureExpected
4952
@Test
5053
public void testDeserHexUnderscores() throws Exception
5154
{
@@ -57,6 +60,7 @@ public void testDeserHexUnderscores() throws Exception
5760
_verifyNumber(-Long.parseLong("12345678c0", 16), "-0x12_3456_78c0");
5861
}
5962

63+
@JacksonTestFailureExpected
6064
@Test
6165
public void testDeserOctal() throws Exception
6266
{
@@ -71,6 +75,7 @@ public void testDeserOctal() throws Exception
7175
_verifyNumber(new BigInteger("-123456771234567712345677", 8), "-0123456771234567712345677");
7276
}
7377

78+
@JacksonTestFailureExpected
7479
@Test
7580
public void testDeserOctalUnderscores() throws Exception
7681
{
@@ -82,6 +87,7 @@ public void testDeserOctalUnderscores() throws Exception
8287
_verifyNumber(-Long.parseLong("1234567712345677", 8), "-01_234_567_712_345_677");
8388
}
8489

90+
@JacksonTestFailureExpected
8591
@Test
8692
public void testDeserBinary() throws Exception
8793
{
@@ -90,6 +96,7 @@ public void testDeserBinary() throws Exception
9096
_verifyNumber(-Integer.parseInt("1010", 2), "-0b1010");
9197
}
9298

99+
@JacksonTestFailureExpected
93100
@Test
94101
public void testDeserBinaryUnderscores() throws Exception
95102
{
@@ -102,6 +109,7 @@ public void testDeserBinaryUnderscores() throws Exception
102109
// least not yet, due to likely backwards-compatibility issues
103110
// with IP numbers
104111
/*
112+
@JacksonTestFailureExpected
105113
@Test
106114
public void testDeserBase60() throws Exception
107115
{

0 commit comments

Comments
 (0)