summaryrefslogtreecommitdiff
path: root/platform/ios/uitest
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2017-01-26 18:52:44 +0100
committerKonstantin Käfer <mail@kkaefer.com>2017-01-27 11:44:16 +0100
commit62ea1f21858c69f6921c775ba7a3de201f0514d8 (patch)
tree7a4da88706e8a5513e1e13e993b2acc212cae3b1 /platform/ios/uitest
parenta662508ddde4043ece36d8ea9b424368891d892c (diff)
downloadqtlocation-mapboxgl-62ea1f21858c69f6921c775ba7a3de201f0514d8.tar.gz
[core] remove trailing whitespace, add trailing newlines, add space after //
Diffstat (limited to 'platform/ios/uitest')
-rw-r--r--platform/ios/uitest/MapViewTests.m26
-rw-r--r--platform/ios/uitest/OCMock/OCMock/OCMArg.h2
-rw-r--r--platform/ios/uitest/OCMock/OCMock/OCMConstraint.h2
3 files changed, 15 insertions, 15 deletions
diff --git a/platform/ios/uitest/MapViewTests.m b/platform/ios/uitest/MapViewTests.m
index 21310b47a6..3ed8c840f4 100644
--- a/platform/ios/uitest/MapViewTests.m
+++ b/platform/ios/uitest/MapViewTests.m
@@ -155,7 +155,7 @@
XCTAssertEqualObjects(MGLStringFromCoordinateBounds(initialBounds),
MGLStringFromCoordinateBounds(tester.mapView.visibleCoordinateBounds),
@"setting visible coordinate bounds to currently visible coordinate bounds should be a no-op");
-
+
// Roundtrip after zooming
tester.mapView.zoomLevel -= 3;
[tester.mapView setVisibleCoordinateBounds:initialBounds animated:NO];
@@ -171,7 +171,7 @@
@"after zooming in, setting visible coordinate bounds back to %@ should not leave them at %@",
MGLStringFromCoordinateBounds(initialBounds),
MGLStringFromCoordinateBounds(tester.mapView.visibleCoordinateBounds));
-
+
// Roundtrip after panning
MGLCoordinateBounds offsetBounds = MGLCoordinateBoundsOffset(initialBounds, MGLCoordinateSpanMake(0, 30));
[tester.mapView setVisibleCoordinateBounds:offsetBounds animated:NO];
@@ -181,7 +181,7 @@
@"after panning 30° to the east, setting visible coordinate bounds back to %@ should not leave them at %@",
MGLStringFromCoordinateBounds(initialBounds),
MGLStringFromCoordinateBounds(tester.mapView.visibleCoordinateBounds));
-
+
// Inscribed shapes with rotation
tester.mapView.direction = 45;
// https://en.wikipedia.org/wiki/Boundary_Markers_of_the_Original_District_of_Columbia
@@ -220,7 +220,7 @@
- (void)testSetCenterCancelsTransitions {
XCTestExpectation *cameraIsInDCExpectation = [self expectationWithDescription:@"camera reset to DC"];
-
+
CLLocationCoordinate2D dc = CLLocationCoordinate2DMake(38.894368, -77.036487);
CLLocationCoordinate2D dc_west = CLLocationCoordinate2DMake(38.894368, -77.076487);
[tester.mapView setCenterCoordinate:dc animated:NO];
@@ -239,7 +239,7 @@
@"setting center coordinate should cancel transitions");
[cameraIsInDCExpectation fulfill];
});
-
+
[self waitForExpectationsWithTimeout:1.0 handler:nil];
}
@@ -276,13 +276,13 @@
- (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");
@@ -419,20 +419,20 @@
- (void)testInsetMapView {
[tester.viewController insetMapView];
[tester waitForAnimationsToFinish];
-
+
UIView *logoBug = (UIView *)[tester waitForViewWithAccessibilityLabel:@"Mapbox"];
UIView *attributionButton = (UIView *)[tester waitForViewWithAccessibilityLabel:@"About this map"];
-
+
CGRect mapViewFrame = [tester.mapView.superview convertRect:tester.mapView.frame toView:nil];
-
+
CGRect logoBugFrame = [logoBug.superview convertRect:logoBug.frame toView:nil];
XCTAssertTrue(CGRectIntersectsRect(logoBugFrame, mapViewFrame),
@"logo bug should lie inside shrunken map view");
-
+
CGRect attributionButtonFrame = [attributionButton.superview convertRect:attributionButton.frame toView:nil];
XCTAssertTrue(CGRectIntersectsRect(attributionButtonFrame, mapViewFrame),
@"attribution button should lie inside shrunken map view");
-
+
CGRect compassFrame = [tester.compass.superview convertRect:tester.compass.frame toView:nil];
XCTAssertTrue(CGRectIntersectsRect(compassFrame, mapViewFrame),
@"compass should lie inside shrunken map view");
diff --git a/platform/ios/uitest/OCMock/OCMock/OCMArg.h b/platform/ios/uitest/OCMock/OCMock/OCMArg.h
index d53437cb7d..2b5f9c7a4e 100644
--- a/platform/ios/uitest/OCMock/OCMock/OCMArg.h
+++ b/platform/ios/uitest/OCMock/OCMock/OCMArg.h
@@ -16,7 +16,7 @@
#import <Foundation/Foundation.h>
-@interface OCMArg : NSObject
+@interface OCMArg : NSObject
// constraining arguments
diff --git a/platform/ios/uitest/OCMock/OCMock/OCMConstraint.h b/platform/ios/uitest/OCMock/OCMock/OCMConstraint.h
index 777966ab7d..25aa8bf497 100644
--- a/platform/ios/uitest/OCMock/OCMock/OCMConstraint.h
+++ b/platform/ios/uitest/OCMock/OCMock/OCMConstraint.h
@@ -17,7 +17,7 @@
#import <Foundation/Foundation.h>
-@interface OCMConstraint : NSObject
+@interface OCMConstraint : NSObject
+ (instancetype)constraint;
- (BOOL)evaluate:(id)value;