diff options
author | Fabian Guerra <fabian.guerra@mapbox.com> | 2017-03-06 16:28:48 -0800 |
---|---|---|
committer | Justin R. Miller <incanus@codesorcery.net> | 2017-03-06 17:09:26 -0800 |
commit | 7cedbff88d8ad206ed19e3adfa675ec348b7f265 (patch) | |
tree | 25216efcff914e5b6ce649d36aae13f67f622b75 /platform/darwin/test/MGLStyleLayerTests.mm.ejs | |
parent | b591062ef5c02ae67fad581fe4c6598d4d8848b8 (diff) | |
download | qtlocation-mapboxgl-upstream/incanus-fabian-rebase.tar.gz |
[ios, macos] added transition properties testupstream/incanus-fabian-rebase
Diffstat (limited to 'platform/darwin/test/MGLStyleLayerTests.mm.ejs')
-rw-r--r-- | platform/darwin/test/MGLStyleLayerTests.mm.ejs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/platform/darwin/test/MGLStyleLayerTests.mm.ejs b/platform/darwin/test/MGLStyleLayerTests.mm.ejs index 810d7fbd3b..77d02b6a39 100644 --- a/platform/darwin/test/MGLStyleLayerTests.mm.ejs +++ b/platform/darwin/test/MGLStyleLayerTests.mm.ejs @@ -53,6 +53,16 @@ XCTAssertNotEqual(layer.rawLayer, nullptr); XCTAssertTrue(layer.rawLayer->is<mbgl::style::<%- camelize(type) %>Layer>()); auto rawLayer = layer.rawLayer->as<mbgl::style::<%- camelize(type) %>Layer>(); + + NSArray *transitionKeys = [MGL<%- camelize(type) %>StyleLayer transitionKeys]; + MGLTransition transitionTest = {.delay = 4, .duration = 5}; + + for (NSString *property in transitionKeys) { + [layer setTransition:transitionTest forKey:property]; + MGLTransition transition = [layer transitionForKey:property]; + XCTAssertEqual(transition.delay, transitionTest.delay); + XCTAssertEqual(transition.duration, transitionTest.duration); + } <% for (const property of properties) { -%> // <%- originalPropertyName(property) %> |