Skip to content

Commit fa90fdb

Browse files
committed
tests: add regression test for uber/h3-java#131
Seems like we aren't affected by it, but it doesn't hurt to have a test against it for future refactor.
1 parent 54d282d commit fa90fdb

File tree

1 file changed

+105
-0
lines changed

1 file changed

+105
-0
lines changed

tests/api/cell_index.rs

+105
Original file line numberDiff line numberDiff line change
@@ -181,3 +181,108 @@ fn last() {
181181
);
182182
}
183183
}
184+
185+
// https://github.com/uber/h3-java/issues/131
186+
#[test]
187+
fn bug_h3_java_131() {
188+
let cells = [
189+
581487719465615359,
190+
582222193232969727,
191+
581193050349371391,
192+
582613619372457983,
193+
581927524116725759,
194+
581584476488859647,
195+
581241428860993535,
196+
581289807372615679,
197+
581681233512103935,
198+
581729612023726079,
199+
581434942907482111,
200+
582169416674836479,
201+
581483321419104255,
202+
582217795186458623,
203+
581188652302860287,
204+
581923126070214655,
205+
581580078442348543,
206+
581237030814482431,
207+
581285409326104575,
208+
581676835465592831,
209+
581725213977214975,
210+
581087497233104895,
211+
582165018628325375,
212+
581478923372593151,
213+
581184254256349183,
214+
582604823279435775,
215+
581918728023703551,
216+
581575680395837439,
217+
581232632767971327,
218+
582015485046947839,
219+
581672437419081727,
220+
581720815930703871,
221+
581426146814459903,
222+
581083099186593791,
223+
581474525326082047,
224+
581179856209838079,
225+
581571282349326335,
226+
581228234721460223,
227+
581716417884192767,
228+
581078701140082687,
229+
581470127279570943,
230+
582204601046925311,
231+
581566884302815231,
232+
581223836674949119,
233+
582006688953925631,
234+
581663641326059519,
235+
581712019837681663,
236+
581025924581949439,
237+
581074303093571583,
238+
582200203000414207,
239+
582248581512036351,
240+
581219438628438015,
241+
581659243279548415,
242+
580973148023816191,
243+
581707621791170559,
244+
581461331186548735,
245+
582244183465525247,
246+
581215040581926911,
247+
581654845233037311,
248+
581311797605171199,
249+
582389319000391679,
250+
581017128488927231,
251+
581945116302770175,
252+
581650447186526207,
253+
581307399558660095,
254+
581698825698148351,
255+
581012730442416127,
256+
581452535093526527,
257+
581940718256259071,
258+
581646049140015103,
259+
581303001512148991,
260+
581694427651637247,
261+
581008332395905023,
262+
581448137047015423,
263+
581201846442393599,
264+
581936320209747967,
265+
581593272581881855,
266+
581641651093503999,
267+
581298603465637887,
268+
581690029605126143,
269+
581003934349393919,
270+
581443739000504319,
271+
581100691372638207,
272+
582178212767858687,
273+
582226591279480831,
274+
581197448395882495,
275+
581931922163236863,
276+
581588874535370751,
277+
582323348302725119,
278+
581637253046992895,
279+
581294205419126783,
280+
581685631558615039,
281+
581734010070237183,
282+
581439340953993215,
283+
]
284+
.into_iter()
285+
.map(|value| CellIndex::try_from(value).expect("valid cell index"));
286+
287+
assert!(CellIndex::compact(cells).is_ok());
288+
}

0 commit comments

Comments
 (0)