diff options
author | Jason Wray <jason@mapbox.com> | 2019-08-20 17:26:35 -0700 |
---|---|---|
committer | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-08-21 11:08:44 +0300 |
commit | 00d4f812acb3a513fd70f4e15a71ae47662bf292 (patch) | |
tree | 46c8206822f6b3e2cebd8ae1aa709476cd8546b2 | |
parent | 6f78560f249ef057f95d16fb1f55de6d97295681 (diff) | |
download | qtlocation-mapboxgl-00d4f812acb3a513fd70f4e15a71ae47662bf292.tar.gz |
[ios] Update MGLTileSetTests.testTileSetFromTileURLTemplates for Xcode 11
-rw-r--r-- | platform/darwin/test/MGLTileSetTests.mm | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/platform/darwin/test/MGLTileSetTests.mm b/platform/darwin/test/MGLTileSetTests.mm index 998d4baee6..65e096ae7f 100644 --- a/platform/darwin/test/MGLTileSetTests.mm +++ b/platform/darwin/test/MGLTileSetTests.mm @@ -84,9 +84,18 @@ // 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\">" - @"<a href=\"https://www.mapbox.com/\">Mapbox</a> </font>" - @"<font style=\"font-family: 'Helvetica'; font-weight: normal; font-style: normal; font-size: 12.00pt; background-color: #ff0000\">GL</font>\n"); + NSString *html; + if (@available(iOS 13.0, *)) { + // TODO: investigate visual impact + // iOS 13 evidently changes font size from points to pixels + html = (@"<font style=\"font-family: 'Helvetica'; font-weight: normal; font-style: normal; font-size: 12.00px\">" + @"<a href=\"https://www.mapbox.com/\">Mapbox</a> </font>" + @"<font style=\"font-family: 'Helvetica'; font-weight: normal; font-style: normal; font-size: 12.00px; background-color: #ff0000\">GL</font>\n"); + } else { + html = (@"<font style=\"font-family: 'Helvetica'; font-weight: normal; font-style: normal; font-size: 12.00pt\">" + @"<a href=\"https://www.mapbox.com/\">Mapbox</a> </font>" + @"<font style=\"font-family: 'Helvetica'; font-weight: normal; font-style: normal; font-size: 12.00pt; background-color: #ff0000\">GL</font>\n"); + } #else NSString *html = (@"<font face=\"Helvetica\" size=\"3\" style=\"font: 12.0px Helvetica\">" @"<a href=\"https://www.mapbox.com/\">Mapbox</a> </font>" @@ -111,7 +120,7 @@ // the scheme is reflected by the mbgl tileset XCTAssertEqual(tileSet.scheme, mbgl::Tileset::Scheme::TMS); - // when the dem enciding is changed using an NSNumber + // when the dem encoding is changed using an NSNumber tileSet = MGLTileSetFromTileURLTemplates(tileURLTemplates, @{ MGLTileSourceOptionDEMEncoding: @(MGLDEMEncodingTerrarium), }); @@ -119,7 +128,7 @@ // the encoding is reflected by the mbgl tileset XCTAssertEqual(tileSet.encoding, mbgl::Tileset::DEMEncoding::Terrarium); - // when the dem enciding is changed using an NSValue + // when the dem encoding is changed using an NSValue MGLDEMEncoding terrarium = MGLDEMEncodingTerrarium; tileSet = MGLTileSetFromTileURLTemplates(tileURLTemplates, @{ MGLTileSourceOptionDEMEncoding: [NSValue value:&terrarium withObjCType:@encode(MGLDEMEncoding)], |