Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatoly Serdtcev <serdtcev@maps.me>2018-12-25 19:25:50 +0300
committermpimenov <mpimenov@users.noreply.github.com>2019-01-23 12:38:58 +0300
commitb70495de7a9322ca0cd5cfb7e5c07e00cbddf340 (patch)
tree9207361b21741a4138b23483b24dd2c959845fa4 /indexer
parent8fbb1cfe1c6233b7979bad2da94e16fe0b03e1ad (diff)
[indexer] Add test MaxDepthCoverSpiral
Diffstat (limited to 'indexer')
-rw-r--r--indexer/indexer_tests/cell_coverer_test.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/indexer/indexer_tests/cell_coverer_test.cpp b/indexer/indexer_tests/cell_coverer_test.cpp
index 72eecda785..0d46d03ea7 100644
--- a/indexer/indexer_tests/cell_coverer_test.cpp
+++ b/indexer/indexer_tests/cell_coverer_test.cpp
@@ -45,3 +45,16 @@ UNIT_TEST(ArtificialCoverRect)
TEST_EQUAL(cells[2].ToString(), "21", ());
TEST_EQUAL(cells[3].ToString(), "30", ());
}
+
+UNIT_TEST(MaxDepthCoverSpiral)
+{
+ using TestBounds = Bounds<0, 0, 8, 8>;
+
+ auto cells = vector<m2::CellId<3>>{};
+
+ CoverSpiral<TestBounds, m2::CellId<3>>({2.1, 4.1, 2.1, 4.1}, 2, cells);
+
+ TEST_EQUAL(cells.size(), 1, ());
+ TEST_EQUAL(cells[0].Level(), 1, ());
+}
+