Skip to content

Commit

Permalink
tests: add regression test for uber/h3-java#131
Browse files Browse the repository at this point in the history
Seems like we aren't affected by it, but it doesn't hurt to have a test
against it for future refactor.
  • Loading branch information
grim7reaper committed Jun 6, 2023
1 parent 54d282d commit fa90fdb
Showing 1 changed file with 105 additions and 0 deletions.
105 changes: 105 additions & 0 deletions tests/api/cell_index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,3 +181,108 @@ fn last() {
);
}
}

// https://github.com/uber/h3-java/issues/131
#[test]
fn bug_h3_java_131() {
let cells = [
581487719465615359,
582222193232969727,
581193050349371391,
582613619372457983,
581927524116725759,
581584476488859647,
581241428860993535,
581289807372615679,
581681233512103935,
581729612023726079,
581434942907482111,
582169416674836479,
581483321419104255,
582217795186458623,
581188652302860287,
581923126070214655,
581580078442348543,
581237030814482431,
581285409326104575,
581676835465592831,
581725213977214975,
581087497233104895,
582165018628325375,
581478923372593151,
581184254256349183,
582604823279435775,
581918728023703551,
581575680395837439,
581232632767971327,
582015485046947839,
581672437419081727,
581720815930703871,
581426146814459903,
581083099186593791,
581474525326082047,
581179856209838079,
581571282349326335,
581228234721460223,
581716417884192767,
581078701140082687,
581470127279570943,
582204601046925311,
581566884302815231,
581223836674949119,
582006688953925631,
581663641326059519,
581712019837681663,
581025924581949439,
581074303093571583,
582200203000414207,
582248581512036351,
581219438628438015,
581659243279548415,
580973148023816191,
581707621791170559,
581461331186548735,
582244183465525247,
581215040581926911,
581654845233037311,
581311797605171199,
582389319000391679,
581017128488927231,
581945116302770175,
581650447186526207,
581307399558660095,
581698825698148351,
581012730442416127,
581452535093526527,
581940718256259071,
581646049140015103,
581303001512148991,
581694427651637247,
581008332395905023,
581448137047015423,
581201846442393599,
581936320209747967,
581593272581881855,
581641651093503999,
581298603465637887,
581690029605126143,
581003934349393919,
581443739000504319,
581100691372638207,
582178212767858687,
582226591279480831,
581197448395882495,
581931922163236863,
581588874535370751,
582323348302725119,
581637253046992895,
581294205419126783,
581685631558615039,
581734010070237183,
581439340953993215,
]
.into_iter()
.map(|value| CellIndex::try_from(value).expect("valid cell index"));

assert!(CellIndex::compact(cells).is_ok());
}

0 comments on commit fa90fdb

Please sign in to comment.