Skip to content

Commit bac78c0

Browse files
committed
Fix minor test annotation issue
1 parent 54872d3 commit bac78c0

File tree

4 files changed

+36
-0
lines changed

4 files changed

+36
-0
lines changed

src/test/java/tools/jackson/core/unittest/sym/BinaryNameHashTest.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
import java.util.Arrays;
55
import java.util.List;
66

7+
import org.junit.jupiter.api.Test;
8+
79
import tools.jackson.core.sym.BinaryNameMatcher;
810
import tools.jackson.core.unittest.JacksonCoreTestBase;
911

@@ -12,42 +14,52 @@
1214
// Specific tests that try to verify proper hashing goodness
1315
public class BinaryNameHashTest extends JacksonCoreTestBase
1416
{
17+
@Test
1518
public void testSuffix1() {
1619
// 14-Nov-2017, tatu: Slightly optimized hashing with shifting, to reduce
1720
// default collision counts
1821
_testSpillEfficiency(generate("", 99), 77, 16, 6, 0);
1922
}
2023

24+
@Test
2125
public void testSuffix2() {
2226
_testSpillEfficiency(generate("base", 39), 33, 6, 0, 0);
2327
}
2428

29+
@Test
2530
public void testSuffix3() {
2631
_testSpillEfficiency(generate("Of ", 139), 122, 16, 1, 0);
2732
}
2833

34+
@Test
2935
public void testSuffix4() {
3036
_testSpillEfficiency(generate("ACE-", 499), 422, 66, 11, 0);
3137
}
3238

39+
@Test
3340
public void testSuffix5() {
3441
// similarly, not so great...
3542
_testSpillEfficiency(generate("SlartiBartFast#", 3000), 1112, 761, 897, 230);
3643
}
3744

45+
@Test
3846
public void testPrefix1() {
3947
_testSpillEfficiency(generate2("", 99), 77, 16, 6, 0);
4048
}
49+
@Test
4150
public void testPrefix2() {
4251
_testSpillEfficiency(generate2("base", 39), 29, 8, 2, 0);
4352
}
53+
@Test
4454
public void testPrefix3() {
4555
_testSpillEfficiency(generate2("Of ", 139), 116, 16, 7, 0);
4656
}
57+
@Test
4758
public void testPrefix4() {
4859
_testSpillEfficiency(generate2("ACE-", 499), 384, 92, 23, 0);
4960
}
5061

62+
@Test
5163
public void testMisc11() {
5264
_testSpillEfficiency(Arrays.asList(
5365
"player", "uri", "title", "width",

src/test/java/tools/jackson/core/unittest/sym/BinaryNameMatcherTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,16 @@
44
import java.util.Arrays;
55
import java.util.List;
66

7+
import org.junit.jupiter.api.Test;
8+
79
import tools.jackson.core.sym.BinaryNameMatcher;
810
import tools.jackson.core.unittest.JacksonCoreTestBase;
911

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

1214
public class BinaryNameMatcherTest extends JacksonCoreTestBase
1315
{
16+
@Test
1417
public void testSmallMatching()
1518
{
1619
// First small (1 - 4)
@@ -19,6 +22,7 @@ public void testSmallMatching()
1922
_testMatching("first", "secondlong", "3rd");
2023
}
2124

25+
@Test
2226
public void testMediumMatching()
2327
{
2428
_testMatching("a", "bcd", "Fittipaldi", "goober");
@@ -32,6 +36,7 @@ public void testMediumMatching()
3236
"subjectNames", "topicNames", "topicSubTopics", "venueNames", "events", "performances");
3337
}
3438

39+
@Test
3540
public void testLargeMatching()
3641
{
3742
// And then generate even bigger

src/test/java/tools/jackson/core/unittest/sym/PropertyNameMatchersTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import java.util.*;
44
import java.util.stream.Collectors;
55

6+
import org.junit.jupiter.api.Test;
7+
68
import tools.jackson.core.sym.PropertyNameMatcher;
79
import tools.jackson.core.sym.SimpleNameMatcher;
810
import tools.jackson.core.unittest.JacksonCoreTestBase;
@@ -15,6 +17,7 @@
1517
*/
1618
public class PropertyNameMatchersTest extends JacksonCoreTestBase
1719
{
20+
@Test
1821
public void testSmallMatching()
1922
{
2023
// First small (1 - 4)
@@ -25,6 +28,7 @@ public void testSmallMatching()
2528
_testMatching(null, "b", null);
2629
}
2730

31+
@Test
2832
public void testMediumMatching()
2933
{
3034
_testMatching("a", "bcd", "Fittipaldi", "goober");
@@ -39,6 +43,7 @@ public void testMediumMatching()
3943
_testMatching("a", "b", null, "d", "E", "f", "G", null);
4044
}
4145

46+
@Test
4247
public void testLargeMatching()
4348
{
4449
// And then generate even bigger

src/test/java/tools/jackson/core/unittest/sym/TextualNameHashTest.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,49 +4,61 @@
44
import java.util.Arrays;
55
import java.util.List;
66

7+
import org.junit.jupiter.api.Test;
8+
79
import tools.jackson.core.sym.SimpleNameMatcher;
810
import tools.jackson.core.unittest.JacksonCoreTestBase;
911

1012
import static org.junit.jupiter.api.Assertions.fail;
1113

1214
public class TextualNameHashTest extends JacksonCoreTestBase
1315
{
16+
@Test
1417
public void testSuffix1() {
1518
// 14-Nov-2017, tatu: Slightly optimized hashing with shifting, to reduce
1619
// default collision counts
1720
_testSpillEfficiency(generate("", 99), 0, 0);
1821
}
1922

23+
@Test
2024
public void testSuffix2() {
2125
_testSpillEfficiency(generate("base", 39), 7, 1);
2226
}
2327

28+
@Test
2429
public void testSuffix3() {
2530
_testSpillEfficiency(generate("Of ", 139), 14, 6);
2631
}
2732

33+
@Test
2834
public void testSuffix4() {
2935
_testSpillEfficiency(generate("ACE-", 499), 71, 34);
3036
}
3137

38+
@Test
3239
public void testSuffix5() {
3340
// similarly, not so great...
3441
_testSpillEfficiency(generate("SlartiBartFast#", 3000), 479, 291);
3542
}
3643

44+
@Test
3745
public void testPrefix1() {
3846
_testSpillEfficiency(generate2("", 99), 0, 0);
3947
}
48+
@Test
4049
public void testPrefix2() {
4150
_testSpillEfficiency(generate2("base", 39), 5, 0);
4251
}
52+
@Test
4353
public void testPrefix3() {
4454
_testSpillEfficiency(generate2("Of ", 139), 15, 0);
4555
}
56+
@Test
4657
public void testPrefix4() {
4758
_testSpillEfficiency(generate2("ACE-", 499), 54, 3);
4859
}
4960

61+
@Test
5062
public void testMisc11() {
5163
_testSpillEfficiency(Arrays.asList(
5264
"player", "uri", "title", "width",
@@ -55,11 +67,13 @@ public void testMisc11() {
5567
1, 0);
5668
}
5769

70+
@Test
5871
public void testMisc5() {
5972
_testSpillEfficiency(Arrays.asList("uri", "title", "width", "height", "size"),
6073
2, 0);
6174
}
6275

76+
@Test
6377
public void testMisc2() {
6478
_testSpillEfficiency(Arrays.asList("content", "images"), 0, 0);
6579
}

0 commit comments

Comments
 (0)