summaryrefslogtreecommitdiff
path: root/platform/darwin/test/MGLOfflineRegionTests.m
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2016-05-02 15:34:46 -0700
committerMinh Nguyễn <mxn@1ec5.org>2016-05-06 11:06:52 -0700
commit2ec95bc490c5793b7b8a3aa9999f48d196ca8085 (patch)
tree413367e75df10a728a455d93cbfca80dda3b9662 /platform/darwin/test/MGLOfflineRegionTests.m
parent5ccb43477fc1d2028aef283d0db64848ebc9a347 (diff)
downloadqtlocation-mapboxgl-2ec95bc490c5793b7b8a3aa9999f48d196ca8085.tar.gz
[ios, osx] Renamed version constant, linked to more info
Renamed MGLStyleCurrentVersion to MGLStyleDefaultVersion to emphasize the constant’s role as an indicator of the default version used by SDK classes, which may be behind depending on release schedules. In the documentation for each style URL method, include the actual version number instead of the constant. In unit tests, verify that this documentation is in sync with the constant. Link each style URL method’s documentation to a forthcoming webpage on mapbox.com that describes the style in rich detail.
Diffstat (limited to 'platform/darwin/test/MGLOfflineRegionTests.m')
-rw-r--r--platform/darwin/test/MGLOfflineRegionTests.m4
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/darwin/test/MGLOfflineRegionTests.m b/platform/darwin/test/MGLOfflineRegionTests.m
index a578bf0824..bb467dd35b 100644
--- a/platform/darwin/test/MGLOfflineRegionTests.m
+++ b/platform/darwin/test/MGLOfflineRegionTests.m
@@ -11,7 +11,7 @@
- (void)testStyleURLs {
MGLCoordinateBounds bounds = MGLCoordinateBoundsMake(kCLLocationCoordinate2DInvalid, kCLLocationCoordinate2DInvalid);
MGLTilePyramidOfflineRegion *region = [[MGLTilePyramidOfflineRegion alloc] initWithStyleURL:nil bounds:bounds fromZoomLevel:0 toZoomLevel:DBL_MAX];
- XCTAssertEqualObjects(region.styleURL, [MGLStyle streetsStyleURLWithVersion:MGLStyleCurrentVersion], @"Streets isn’t the default style.");
+ XCTAssertEqualObjects(region.styleURL, [MGLStyle streetsStyleURLWithVersion:MGLStyleDefaultVersion], @"Streets isn’t the default style.");
NSURL *localURL = [NSURL URLWithString:@"beautiful.style"];
XCTAssertThrowsSpecificNamed([[MGLTilePyramidOfflineRegion alloc] initWithStyleURL:localURL bounds:bounds fromZoomLevel:0 toZoomLevel:DBL_MAX], NSException, @"Invalid style URL", @"No exception raised when initializing region with a local file URL as the style URL.");
@@ -19,7 +19,7 @@
- (void)testEquality {
MGLCoordinateBounds bounds = MGLCoordinateBoundsMake(kCLLocationCoordinate2DInvalid, kCLLocationCoordinate2DInvalid);
- MGLTilePyramidOfflineRegion *original = [[MGLTilePyramidOfflineRegion alloc] initWithStyleURL:[MGLStyle lightStyleURLWithVersion:MGLStyleCurrentVersion] bounds:bounds fromZoomLevel:5 toZoomLevel:10];
+ MGLTilePyramidOfflineRegion *original = [[MGLTilePyramidOfflineRegion alloc] initWithStyleURL:[MGLStyle lightStyleURLWithVersion:MGLStyleDefaultVersion] bounds:bounds fromZoomLevel:5 toZoomLevel:10];
MGLTilePyramidOfflineRegion *copy = [original copy];
XCTAssertEqualObjects(original, copy, @"Tile pyramid region should be equal to its copy.");