Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[core] Add unit test for grid index
Browse files Browse the repository at this point in the history
  • Loading branch information
alexshalamov committed Jul 29, 2019
1 parent 032783e commit 8a936aa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/util/grid_index.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,8 @@ TEST(GridIndex, CircleBox) {
EXPECT_EQ(grid.query({{0, 80}, {20, 100}}), (std::vector<int16_t>{2}));
}

TEST(GridIndex, IndexesFeaturesOverflow) {
GridIndex<int16_t> grid(5000, 5000, 25);
grid.insert(0, {{4500, 4500}, {4900, 4900}});
EXPECT_EQ(grid.query({{4000, 4000}, {5000, 5000}}), (std::vector<int16_t>{0}));
}

0 comments on commit 8a936aa

Please sign in to comment.