summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJustin R. Miller <incanus@codesorcery.net>2015-10-23 12:09:36 -0700
committerJustin R. Miller <incanus@codesorcery.net>2015-10-27 10:36:31 -0700
commit7d8655baf3cd976f57d81a873826bb8a0c3e2acb (patch)
treed5acc41add4e0d7070cc0a8ef4023fd54e6fe754 /test
parent43dde0f204ac770feae0ef22c7a4ea67585deb12 (diff)
downloadqtlocation-mapboxgl-7d8655baf3cd976f57d81a873826bb8a0c3e2acb.tar.gz
tighten up non-location tests
Diffstat (limited to 'test')
-rw-r--r--test/ios/MapViewTests.m21
1 files changed, 9 insertions, 12 deletions
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 {