diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2017-01-26 18:52:44 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2017-01-27 11:44:16 +0100 |
commit | 62ea1f21858c69f6921c775ba7a3de201f0514d8 (patch) | |
tree | 7a4da88706e8a5513e1e13e993b2acc212cae3b1 /platform/darwin/test/MGLTileSetTests.mm | |
parent | a662508ddde4043ece36d8ea9b424368891d892c (diff) | |
download | qtlocation-mapboxgl-62ea1f21858c69f6921c775ba7a3de201f0514d8.tar.gz |
[core] remove trailing whitespace, add trailing newlines, add space after //
Diffstat (limited to 'platform/darwin/test/MGLTileSetTests.mm')
-rw-r--r-- | platform/darwin/test/MGLTileSetTests.mm | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/platform/darwin/test/MGLTileSetTests.mm b/platform/darwin/test/MGLTileSetTests.mm index 06901a0e96..40eab5f974 100644 --- a/platform/darwin/test/MGLTileSetTests.mm +++ b/platform/darwin/test/MGLTileSetTests.mm @@ -15,40 +15,40 @@ // a tile set that provides an mbgl tile set NSArray *tileURLTemplates = @[@"tile.1", @"tile.2", @"tile.3"]; mbgl::Tileset tileSet = MGLTileSetFromTileURLTemplates(tileURLTemplates, nil); - + // has the correct URL templates XCTAssertEqual(tileSet.tiles.size(), 3); XCTAssertEqual(tileSet.tiles[0], "tile.1"); XCTAssertEqual(tileSet.tiles[1], "tile.2"); XCTAssertEqual(tileSet.tiles[2], "tile.3"); - + // has the default scheme XCTAssertEqual(tileSet.scheme, mbgl::Tileset::Scheme::XYZ); - + // when the tile set has no min or max zoom level set // the mbgl object has default values for min and max zoom level XCTAssertEqual(tileSet.zoomRange.min, 0); XCTAssertEqual(tileSet.zoomRange.max, 22); - + // when the tile set has min and/or max zoom level set tileSet = MGLTileSetFromTileURLTemplates(@[@"tile.1"], @{ MGLTileSourceOptionMinimumZoomLevel: @1, MGLTileSourceOptionMaximumZoomLevel: @2, }); - + // the mbgl object reflects the set values for min and max zoom level XCTAssertEqual(tileSet.zoomRange.min, 1); XCTAssertEqual(tileSet.zoomRange.max, 2); - + // when the tile set has an attribution NSString *attribution = @"my tileset © ©️🎈"; tileSet = MGLTileSetFromTileURLTemplates(tileURLTemplates, @{ MGLTileSourceOptionAttributionHTMLString: attribution, }); - + // the attribution is reflected by the mbgl tileset XCTAssertEqual(tileSet.attribution, attribution.UTF8String); - + // when the tile set has attribution infos MGLAttributionInfo *mapboxInfo = [[MGLAttributionInfo alloc] initWithTitle:[[NSAttributedString alloc] initWithString:@"Mapbox"] URL:[NSURL URLWithString:@"https://www.mapbox.com/"]]; @@ -59,7 +59,7 @@ tileSet = MGLTileSetFromTileURLTemplates(tileURLTemplates, @{ MGLTileSourceOptionAttributionInfos: @[mapboxInfo, glInfo], }); - + // the attribution is reflected by the mbgl tileset #if TARGET_OS_IPHONE NSString *html = (@"<font style=\"font-family: 'Helvetica'; font-weight: normal; font-style: normal; font-size: 12.00pt\">" @@ -71,21 +71,21 @@ @"<font face=\"Helvetica\" size=\"3\" style=\"font: 12.0px Helvetica; background-color: #ff2600\">GL</font>\n"); #endif XCTAssertEqualObjects(@(tileSet.attribution.c_str()), html); - + // when the tile coordinate system is changed using an NSNumber tileSet = MGLTileSetFromTileURLTemplates(tileURLTemplates, @{ MGLTileSourceOptionTileCoordinateSystem: @(MGLTileCoordinateSystemTMS), }); - + // the scheme is reflected by the mbgl tileset XCTAssertEqual(tileSet.scheme, mbgl::Tileset::Scheme::TMS); - + // when the tile coordinate system is changed using an NSValue MGLTileCoordinateSystem tms = MGLTileCoordinateSystemTMS; tileSet = MGLTileSetFromTileURLTemplates(tileURLTemplates, @{ MGLTileSourceOptionTileCoordinateSystem: [NSValue value:&tms withObjCType:@encode(MGLTileCoordinateSystem)], }); - + // the scheme is reflected by the mbgl tileset XCTAssertEqual(tileSet.scheme, mbgl::Tileset::Scheme::TMS); } |