From 7d8655baf3cd976f57d81a873826bb8a0c3e2acb Mon Sep 17 00:00:00 2001 From: "Justin R. Miller" Date: Fri, 23 Oct 2015 12:09:36 -0700 Subject: tighten up non-location tests --- test/ios/MapViewTests.m | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'test/ios') diff --git a/test/ios/MapViewTests.m b/test/ios/MapViewTests.m index 9dd5821768..591d8e7121 100644 --- a/test/ios/MapViewTests.m +++ b/test/ios/MapViewTests.m @@ -52,14 +52,13 @@ } - (void)testDirectionSet { - tester.mapView.direction = 270; + [tester.mapView setDirection:270 animated:YES]; + [tester waitForAnimationsToFinish]; XCTAssertEqual(tester.mapView.direction, 270, @"setting direction should take effect"); - [tester waitForTimeInterval:2]; - XCTAssertEqual(tester.compass.alpha, 1, @"compass should be visible when map is rotated"); @@ -70,15 +69,15 @@ } - (void)testCompassTap { - tester.mapView.direction = 180; + [tester.mapView setDirection:180 animated:YES]; + [tester waitForAnimationsToFinish]; XCTAssertEqual(tester.mapView.direction, 180, @"setting direction should take effect"); [tester.compass tap]; - - [tester waitForTimeInterval:2]; + [tester waitForAnimationsToFinish]; XCTAssertEqual(tester.mapView.direction, 0, @@ -93,15 +92,15 @@ } - (void)testDirectionReset { - tester.mapView.direction = 90; + [tester.mapView setDirection:90 animated:YES]; + [tester waitForAnimationsToFinish]; XCTAssertEqual(tester.mapView.direction, 90, @"setting direction should take effect"); [tester.mapView resetNorth]; - - [tester waitForTimeInterval:2]; + [tester waitForAnimationsToFinish]; XCTAssertEqual(tester.mapView.direction, 0, @@ -254,9 +253,7 @@ [cameraIsInDCExpectation fulfill]; }); - [self waitForExpectationsWithTimeout:1.0 handler:^(NSError *error) { - ; - }]; + [self waitForExpectationsWithTimeout:1.0 handler:nil]; } - (void)testPanDisabled { -- cgit v1.2.1