Skip to content

Commit 2ecff1b

Browse files
committed
Fix some coverage issues
1 parent 9c0efb4 commit 2ecff1b

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

build-logic/src/main/kotlin/org/enginehub/gradle/JvmPlugin.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ class JvmPlugin : Plugin<Project> {
6868
executionData(jacocoExecData)
6969
sourceSets(src)
7070
dependsOn(project.tasks.named("test"))
71+
// Add this dependency, not because it's necessary, but because it helps when figuring out
72+
// what is wrong with the coverage
73+
dependsOn(project.tasks.named("jacocoTestReport"))
7174
}
7275
tasks.named("check") {
7376
dependsOn(jacocoTestCoverageVerification)

tree/src/main/java/org/enginehub/linbus/tree/LinTagType.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -250,14 +250,6 @@ public T cast(LinTag<?> tag) {
250250
return javaType.cast(tag);
251251
}
252252

253-
@Override
254-
public boolean equals(Object o) {
255-
if (this == o) return true;
256-
if (o == null || getClass() != o.getClass()) return false;
257-
LinTagType<?> that = (LinTagType<?>) o;
258-
return id == that.id;
259-
}
260-
261253
@Override
262254
public int hashCode() {
263255
return id.hashCode();

tree/src/test/java/org/enginehub/linbus/tree/LinListTagTest.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,20 @@ void roundTripBuilder() {
5050
assertThat(initial).isEqualTo(initial.toBuilder().build());
5151
}
5252

53+
@Test
54+
void setOnBuilder() {
55+
var initial = LinListTag.of(LinTagType.stringTag(), List.of(
56+
LinStringTag.of("Hello"),
57+
LinStringTag.of("World!")
58+
));
59+
assertThat(
60+
LinListTag.of(LinTagType.stringTag(), List.of(
61+
LinStringTag.of("Goodbye..."),
62+
LinStringTag.of("World!")
63+
))
64+
).isEqualTo(initial.toBuilder().set(0, LinStringTag.of("Goodbye...")).build());
65+
}
66+
5367
@Test
5468
void emptyImplementation() {
5569
var empty = LinListTag.empty(LinTagType.stringTag());

0 commit comments

Comments
 (0)