diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2017-01-26 17:56:46 -0800 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2017-01-26 17:56:46 -0800 |
commit | a662508ddde4043ece36d8ea9b424368891d892c (patch) | |
tree | a6d7b857d59a2d9ea638bd68fe2b4b38392ef576 /platform/ios/uitest | |
parent | 00598432b0cc7b8aefd63b5162ad317917eb1154 (diff) | |
parent | 042831604bab0983262146047d6be0e453b0d55d (diff) | |
download | qtlocation-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.m | 17 |
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; |