Skip to content

Commit dc3d688

Browse files
committed
bump jacoco tool version
1 parent b4b3fbb commit dc3d688

File tree

2 files changed

+10
-31
lines changed

2 files changed

+10
-31
lines changed

src/test/kotlin/com/nfeld/jsonpathkt/TokenTest.kt

+5-28
Original file line numberDiff line numberDiff line change
@@ -364,39 +364,16 @@ class TokenTest : DescribeSpec({
364364
WildcardToken().toString() shouldBe "WildcardToken"
365365
WildcardToken().hashCode() shouldBe "WildcardToken".hashCode()
366366
WildcardToken().equals(WildcardToken()) shouldBe true
367-
WildcardToken().equals(RootLevelArrayNode()) shouldBe false
367+
WildcardToken().equals(ArrayAccessorToken(0)) shouldBe false
368368
}
369369
}
370370

371371
describe("DeepScanWildcardToken") {
372-
it("should handle empty cases") {
373-
WildcardToken().read(createArrayNode()).toString() shouldBe """[]"""
374-
WildcardToken().read(createObjectNode()).toString() shouldBe """[]"""
375-
}
376-
377-
it("should get values from objects and strip") {
378-
val objectNode = readTree("""{ "some": "string", "int": 42, "object": { "key": "value" }, "array": [0, 1] }""")
379-
WildcardToken().read(objectNode).toString() shouldBe """["string",42,{"key":"value"},[0,1]]"""
380-
}
381-
382-
it("should return a RootLevelArrayNode if root list replaced with another list before modifying values") {
383-
val arrayNode = readTree("""["string", 42, { "key": "value" }, [0, 1] ]""")
384-
WildcardToken().read(arrayNode).toString() shouldBe """["string",42,{"key":"value"},[0,1]]"""
385-
}
386-
387-
it("should drop scalars and move everything down on root RootLevelArrayNode") {
388-
val arrayNode = readTree("""["string", 42, { "key": "value" }, [0, 1] ]""")
389-
val res1 = WildcardToken().read(arrayNode)
390-
(res1 is RootLevelArrayNode) shouldBe true
391-
val res2 = WildcardToken().read(res1!!)
392-
res2.toString() shouldBe """["value",0,1]"""
393-
}
394-
395372
it("should override toString, hashCode, and equals") {
396-
WildcardToken().toString() shouldBe "WildcardToken"
397-
WildcardToken().hashCode() shouldBe "WildcardToken".hashCode()
398-
WildcardToken().equals(WildcardToken()) shouldBe true
399-
WildcardToken().equals(RootLevelArrayNode()) shouldBe false
373+
DeepScanWildcardToken().toString() shouldBe "DeepScanWildcardToken"
374+
DeepScanWildcardToken().hashCode() shouldBe "DeepScanWildcardToken".hashCode()
375+
DeepScanWildcardToken().equals(DeepScanWildcardToken()) shouldBe true
376+
DeepScanWildcardToken().equals(ArrayAccessorToken(0)) shouldBe false
400377
}
401378
}
402379
}

tests_codecov.gradle

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11

22
ext {
3-
shouldBenchmark = false
43
readmeFormat = false // pass -DreadmeFormat to format benchmark results to update readme
54
kotestVersion = '4.1.0.RC2'
65
}
@@ -110,7 +109,7 @@ test {
110109
}
111110

112111
jacoco {
113-
toolVersion = "0.8.3"
112+
toolVersion = "0.8.5"
114113
reportsDir = file("$buildDir/reports")
115114
}
116115

@@ -135,7 +134,10 @@ jacocoTestReport {
135134
afterEvaluate {
136135
classDirectories = files(classDirectories.files.collect {
137136
// Exclude simple LinkedHashMap subclass from report
138-
fileTree(dir: it, exclude: '**/LRUCache$LRUMap*')
137+
fileTree(dir: it, excludes: [
138+
'**/LRUCache$LRUMap*',
139+
'**/JsonNodeKt*'
140+
])
139141
})
140142
}
141143
}

0 commit comments

Comments
 (0)