summaryrefslogtreecommitdiff
path: root/platform/ios/uitest
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2017-01-26 17:56:46 -0800
committerMinh Nguyễn <mxn@1ec5.org>2017-01-26 17:56:46 -0800
commita662508ddde4043ece36d8ea9b424368891d892c (patch)
treea6d7b857d59a2d9ea638bd68fe2b4b38392ef576 /platform/ios/uitest
parent00598432b0cc7b8aefd63b5162ad317917eb1154 (diff)
parent042831604bab0983262146047d6be0e453b0d55d (diff)
downloadqtlocation-mapboxgl-a662508ddde4043ece36d8ea9b424368891d892c.tar.gz
Merge branch 'release-ios-v3.4.0' into 1ec5-release-ios-v3.4.1-master
Diffstat (limited to 'platform/ios/uitest')
-rw-r--r--platform/ios/uitest/MapViewTests.m17
1 files changed, 16 insertions, 1 deletions
diff --git a/platform/ios/uitest/MapViewTests.m b/platform/ios/uitest/MapViewTests.m
index 41ea5446ef..21310b47a6 100644
--- a/platform/ios/uitest/MapViewTests.m
+++ b/platform/ios/uitest/MapViewTests.m
@@ -260,7 +260,7 @@
@"disabling pan gesture should disallow horizontal panning");
}
-- (void)testRotate {
+- (void)testRotateClockwise {
CLLocationDirection startAngle = tester.mapView.direction;
XCTAssertNotEqual(startAngle,
@@ -274,6 +274,21 @@
@"rotating map should change angle");
}
+- (void)testRotateCounterclockwise {
+ CLLocationDirection startAngle = tester.mapView.direction;
+
+ XCTAssertNotEqual(startAngle,
+ -45,
+ @"start angle must not be destination angle");
+
+ [tester.mapView twoFingerRotateAtPoint:tester.mapView.center angle:-45];
+
+ XCTAssertGreaterThanOrEqual(fabs(startAngle - tester.mapView.direction),
+ 20,
+ @"rotating map should change angle");
+ XCTAssertGreaterThan(tester.mapView.camera.heading, 0, @"camera should not go negative");
+}
+
- (void)testRotateDisabled {
tester.mapView.rotateEnabled = NO;
CLLocationDirection startAngle = tester.mapView.direction;