Skip to content

Commit 1c80497

Browse files
committed
fix coverage, fix jacoco error about java 24
1 parent eb2de43 commit 1c80497

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ spotless {
133133
}
134134

135135
jacoco {
136-
toolVersion = '0.8.12'
136+
toolVersion = '0.8.14'
137137
}
138138

139139
jacocoTestReport {

src/test/java/com/uber/h3core/TestInspection.java

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,12 @@ void constructCell() {
109109
assertEquals(
110110
h3.constructCell(15, 100, ImmutableList.of(1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 1, 2, 3)),
111111
0x8fc8539714e5c53L);
112-
// Too many digits -- ignored
113-
h3.constructCell(15, 20, ImmutableList.of(1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 1, 2, 3));
112+
assertThrows(
113+
IllegalArgumentException.class,
114+
() ->
115+
// Too many digits
116+
h3.constructCell(
117+
15, 20, ImmutableList.of(1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 1, 2, 3, 0, 0, 0)));
114118
}
115119

116120
@Test
@@ -148,8 +152,12 @@ void constructCellAddress() {
148152
h3.constructCellAddress(
149153
15, 100, ImmutableList.of(1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 1, 2, 3)),
150154
"8fc8539714e5c53");
151-
// Too many digits -- ignored
152-
h3.constructCellAddress(15, 20, ImmutableList.of(1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 1, 2, 3));
155+
assertThrows(
156+
IllegalArgumentException.class,
157+
() ->
158+
// Too many digits
159+
h3.constructCellAddress(
160+
15, 20, ImmutableList.of(1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 1, 2, 3, 0, 0, 0)));
153161
}
154162

155163
@Test

0 commit comments

Comments
 (0)