From 7cedbff88d8ad206ed19e3adfa675ec348b7f265 Mon Sep 17 00:00:00 2001 From: Fabian Guerra Date: Mon, 6 Mar 2017 16:28:48 -0800 Subject: [ios, macos] added transition properties test --- platform/darwin/test/MGLBackgroundStyleLayerTests.mm | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'platform/darwin/test/MGLBackgroundStyleLayerTests.mm') diff --git a/platform/darwin/test/MGLBackgroundStyleLayerTests.mm b/platform/darwin/test/MGLBackgroundStyleLayerTests.mm index 92c0ac7cbc..97ddefe7dc 100644 --- a/platform/darwin/test/MGLBackgroundStyleLayerTests.mm +++ b/platform/darwin/test/MGLBackgroundStyleLayerTests.mm @@ -22,6 +22,16 @@ XCTAssertTrue(layer.rawLayer->is()); auto rawLayer = layer.rawLayer->as(); + NSArray *transitionKeys = [MGLBackgroundStyleLayer 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); + } + // background-color { XCTAssertTrue(rawLayer->getBackgroundColor().isUndefined(), -- cgit v1.2.1