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:40:39 +0300
committermpimenov <mpimenov@users.noreply.github.com>2019-01-23 12:38:58 +0300
commit36379662df177769ef7254965e01080f920b5599 (patch)
treeb5066d59b908915af9a3ade623182f97b89bcc44 /indexer
parentb70495de7a9322ca0cd5cfb7e5c07e00cbddf340 (diff)
[indexer:tests] Add max depth variants in test MaxDepthCoverSpiral
Diffstat (limited to 'indexer')
-rw-r--r--indexer/indexer_tests/cell_coverer_test.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/indexer/indexer_tests/cell_coverer_test.cpp b/indexer/indexer_tests/cell_coverer_test.cpp
index 0d46d03ea7..27312051c9 100644
--- a/indexer/indexer_tests/cell_coverer_test.cpp
+++ b/indexer/indexer_tests/cell_coverer_test.cpp
@@ -50,11 +50,14 @@ UNIT_TEST(MaxDepthCoverSpiral)
{
using TestBounds = Bounds<0, 0, 8, 8>;
- auto cells = vector<m2::CellId<3>>{};
+ for (auto depthMax = 1; depthMax <= 3; ++depthMax)
+ {
+ auto cells = vector<m2::CellId<3>>{};
- CoverSpiral<TestBounds, m2::CellId<3>>({2.1, 4.1, 2.1, 4.1}, 2, cells);
+ CoverSpiral<TestBounds, m2::CellId<3>>({2.1, 4.1, 2.1, 4.1}, depthMax, cells);
- TEST_EQUAL(cells.size(), 1, ());
- TEST_EQUAL(cells[0].Level(), 1, ());
+ TEST_EQUAL(cells.size(), 1, ());
+ TEST_EQUAL(cells[0].Level(), depthMax - 1, ());
+ }
}