summaryrefslogtreecommitdiff
path: root/platform/darwin/test/MGLGeometryTests.mm
diff options
context:
space:
mode:
authorAsheem Mamoowala <asheem.mamoowala@mapbox.com>2017-12-18 17:11:43 -0800
committerAsheem Mamoowala <asheem.mamoowala@mapbox.com>2018-04-05 18:04:25 -0700
commitcc01781db7281032f8c0c5eae54281187522a861 (patch)
treec12b23f6b69f8499a4d3db476b0f30c693c654e2 /platform/darwin/test/MGLGeometryTests.mm
parentdc495e1c9d831ccf928381845ffcb409c5d91271 (diff)
downloadqtlocation-mapboxgl-cc01781db7281032f8c0c5eae54281187522a861.tar.gz
[ios, macos] Projection Matrix and LatLng projection to Mercator methods
Diffstat (limited to 'platform/darwin/test/MGLGeometryTests.mm')
-rw-r--r--platform/darwin/test/MGLGeometryTests.mm9
1 files changed, 9 insertions, 0 deletions
diff --git a/platform/darwin/test/MGLGeometryTests.mm b/platform/darwin/test/MGLGeometryTests.mm
index 1c85470188..57840d9953 100644
--- a/platform/darwin/test/MGLGeometryTests.mm
+++ b/platform/darwin/test/MGLGeometryTests.mm
@@ -163,4 +163,13 @@
[NSValue valueWithMGLCoordinate:quad.bottomRight],
@"Quad bottom right should be computed correctly.");
}
+
+- (void)testMGLMapPoint {
+ MGLMapPoint point = MGLMapPointMake(CLLocationCoordinate2DMake(37.936, -80.425), 0.0);
+
+ MGLMapPoint roundTrippedPoint = [NSValue valueWithMGLMapPoint:point].MGLMapPointValue;
+ XCTAssertEqual(point.x, roundTrippedPoint.x);
+ XCTAssertEqual(point.y, roundTrippedPoint.y);
+ XCTAssertEqual(point.zoomLevel, roundTrippedPoint.zoomLevel);
+}
@end