[core] Update unit tests for viewport collision.

Add 'GridIndex' unit test.
This commit is contained in:
Chris Loer
2017-11-09 13:24:43 -08:00
committed by Chris Loer
parent ff58848cfd
commit 54b990eb33
9 changed files with 71 additions and 110 deletions

View File

@@ -366,8 +366,8 @@ TEST(Annotations, QueryFractionalZoomLevels) {
test.map.addAnnotationImage(namedMarker("default_marker"));
std::vector<mbgl::AnnotationID> ids;
for (int longitude = 0; longitude < 10; ++longitude) {
for (int latitude = 0; latitude < 10; ++latitude) {
for (int longitude = 0; longitude < 10; longitude += 2) {
for (int latitude = 0; latitude < 10; latitude += 2) {
ids.push_back(test.map.addAnnotation(SymbolAnnotation { { double(latitude), double(longitude) }, "default_marker" }));
}
}
@@ -399,8 +399,8 @@ TEST(Annotations, VisibleFeatures) {
test.map.setLatLngZoom({ 5, 5 }, 3);
std::vector<mbgl::AnnotationID> ids;
for (int longitude = 0; longitude < 10; ++longitude) {
for (int latitude = 0; latitude <= 10; ++latitude) {
for (int longitude = 0; longitude < 10; longitude += 2) {
for (int latitude = 0; latitude <= 10; latitude += 2) {
ids.push_back(test.map.addAnnotation(SymbolAnnotation { { double(latitude), double(longitude) }, "default_marker" }));
}
}