diff options
author | Fabian Guerra Soto <fabian.guerra@mapbox.com> | 2018-05-04 12:49:58 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-04 12:49:58 -0400 |
commit | 86a2e93294b472898cfd005a4c34818551de0728 (patch) | |
tree | dac975b129668e4b118c8ea47920ea34f78b7c8d /platform/darwin/test/MGLGeometryTests.mm | |
parent | 167a2321d98b0733527fd4f94c11a2f33fb243e5 (diff) | |
download | qtlocation-mapboxgl-86a2e93294b472898cfd005a4c34818551de0728.tar.gz |
[ios, macos] Fix overlay bounds that span the antimeridian. (#11783)
* [ios, macos] Fix overlay bounds that span the antimeridian.
* [ios, macos] Update changelogs.
* [ios, macos] Make MGLLocationCoordinate2DIsValid private.
* [ios, macos] Update changelogs.
Diffstat (limited to 'platform/darwin/test/MGLGeometryTests.mm')
-rw-r--r-- | platform/darwin/test/MGLGeometryTests.mm | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/platform/darwin/test/MGLGeometryTests.mm b/platform/darwin/test/MGLGeometryTests.mm index a0ddecf77e..1489fefea9 100644 --- a/platform/darwin/test/MGLGeometryTests.mm +++ b/platform/darwin/test/MGLGeometryTests.mm @@ -172,4 +172,40 @@ XCTAssertEqual(point.y, roundTrippedPoint.y); XCTAssertEqual(point.zoomLevel, roundTrippedPoint.zoomLevel); } + +- (void)testMGLLocationCoordinate2DIsValid { + { + CLLocationCoordinate2D coordinate = CLLocationCoordinate2DMake(37.936, -71.516); + XCTAssertTrue(MGLLocationCoordinate2DIsValid(coordinate)); + } + { + CLLocationCoordinate2D coordinate = CLLocationCoordinate2DMake(46.816368, 5.844469); + XCTAssertTrue(MGLLocationCoordinate2DIsValid(coordinate)); + } + { + CLLocationCoordinate2D coordinate = CLLocationCoordinate2DMake(-21.512680, 23.334703); + XCTAssertTrue(MGLLocationCoordinate2DIsValid(coordinate)); + } + { + CLLocationCoordinate2D coordinate = CLLocationCoordinate2DMake(-44.947936, -73.081313); + XCTAssertTrue(MGLLocationCoordinate2DIsValid(coordinate)); + } + { + CLLocationCoordinate2D coordinate = CLLocationCoordinate2DMake(19.333630, 203.555405); + XCTAssertTrue(MGLLocationCoordinate2DIsValid(coordinate)); + } + { + CLLocationCoordinate2D coordinate = CLLocationCoordinate2DMake(23.254696, -240.795323); + XCTAssertTrue(MGLLocationCoordinate2DIsValid(coordinate)); + } + { + CLLocationCoordinate2D coordinate = CLLocationCoordinate2DMake(91, 361); + XCTAssertFalse(MGLLocationCoordinate2DIsValid(coordinate)); + } + { + CLLocationCoordinate2D coordinate = CLLocationCoordinate2DMake(-91, -361); + XCTAssertFalse(MGLLocationCoordinate2DIsValid(coordinate)); + } +} + @end |