summaryrefslogtreecommitdiff
path: root/platform/darwin/test/MGLTileSetTests.mm
diff options
context:
space:
mode:
authorMolly Lloyd <mollymerp@users.noreply.github.com>2018-02-27 15:12:25 -0800
committerGitHub <noreply@github.com>2018-02-27 15:12:25 -0800
commit2dddcba3fc6f99de3046a6b5c69651a690b58509 (patch)
tree6fd04277705f981756cec98a6383ad365f603320 /platform/darwin/test/MGLTileSetTests.mm
parent848d7dff4e682c3d2485366f95649a5de4b1bd75 (diff)
downloadqtlocation-mapboxgl-2dddcba3fc6f99de3046a6b5c69651a690b58509.tar.gz
[ios, macos] cherry-pick darwin changes to tileset encoding param onto boba (#11324)
* [ios, macos] add tileset encoding option to darwin sources (#11274) * add tileset encoding option to darwin sources * correct style guide * link out to dem encoding docs * markdownify comments * correct changelog
Diffstat (limited to 'platform/darwin/test/MGLTileSetTests.mm')
-rw-r--r--platform/darwin/test/MGLTileSetTests.mm17
1 files changed, 17 insertions, 0 deletions
diff --git a/platform/darwin/test/MGLTileSetTests.mm b/platform/darwin/test/MGLTileSetTests.mm
index 4d5e1fcd05..74c84184e1 100644
--- a/platform/darwin/test/MGLTileSetTests.mm
+++ b/platform/darwin/test/MGLTileSetTests.mm
@@ -102,6 +102,23 @@
// the scheme is reflected by the mbgl tileset
XCTAssertEqual(tileSet.scheme, mbgl::Tileset::Scheme::TMS);
+
+ // when the dem enciding is changed using an NSNumber
+ tileSet = MGLTileSetFromTileURLTemplates(tileURLTemplates, @{
+ MGLTileSourceOptionDEMEncoding: @(MGLDEMEncodingTerrarium),
+ });
+
+ // the encoding is reflected by the mbgl tileset
+ XCTAssertEqual(tileSet.encoding, mbgl::Tileset::DEMEncoding::Terrarium);
+
+ // when the dem enciding is changed using an NSValue
+ MGLDEMEncoding terrarium = MGLDEMEncodingTerrarium;
+ tileSet = MGLTileSetFromTileURLTemplates(tileURLTemplates, @{
+ MGLTileSourceOptionDEMEncoding: [NSValue value:&terrarium withObjCType:@encode(MGLDEMEncoding)],
+ });
+
+ // the encoding is reflected by the mbgl tileset
+ XCTAssertEqual(tileSet.encoding, mbgl::Tileset::DEMEncoding::Terrarium);
}
- (void)testInvalidTileSet {