summaryrefslogtreecommitdiff
path: root/platform/ios/test
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/test
parenta662508ddde4043ece36d8ea9b424368891d892c (diff)
downloadqtlocation-mapboxgl-62ea1f21858c69f6921c775ba7a3de201f0514d8.tar.gz
[core] remove trailing whitespace, add trailing newlines, add space after //
Diffstat (limited to 'platform/ios/test')
-rw-r--r--platform/ios/test/MGLAnnotationViewTests.m8
-rw-r--r--platform/ios/test/MGLNSDataAdditionsTests.m12
-rw-r--r--platform/ios/test/MGLSourceTests.m4
3 files changed, 12 insertions, 12 deletions
diff --git a/platform/ios/test/MGLAnnotationViewTests.m b/platform/ios/test/MGLAnnotationViewTests.m
index 59f6956a95..212de9a405 100644
--- a/platform/ios/test/MGLAnnotationViewTests.m
+++ b/platform/ios/test/MGLAnnotationViewTests.m
@@ -74,7 +74,7 @@ static NSString * const MGLTestAnnotationReuseIdentifer = @"MGLTestAnnotationReu
XCTAssertTrue(testCalloutView.didCallDismissCalloutAnimated, @"callout view was not dismissed");
[_mapView removeAnnotation:_annotationView.annotation];
-
+
XCTAssert(_mapView.annotations.count == 0, @"number of annotations should be 0");
XCTAssertNil(_annotationView.annotation, @"annotation property should be nil");
}
@@ -82,14 +82,14 @@ static NSString * const MGLTestAnnotationReuseIdentifer = @"MGLTestAnnotationReu
- (MGLAnnotationView *)mapView:(MGLMapView *)mapView viewForAnnotation:(id<MGLAnnotation>)annotation
{
MGLAnnotationView *annotationView = [mapView dequeueReusableAnnotationViewWithIdentifier:MGLTestAnnotationReuseIdentifer];
-
+
if (!annotationView)
{
annotationView = [[MGLAnnotationView alloc] initWithReuseIdentifier:MGLTestAnnotationReuseIdentifer];
}
-
+
_annotationView = annotationView;
-
+
return annotationView;
}
diff --git a/platform/ios/test/MGLNSDataAdditionsTests.m b/platform/ios/test/MGLNSDataAdditionsTests.m
index b01db25812..8d145be4a0 100644
--- a/platform/ios/test/MGLNSDataAdditionsTests.m
+++ b/platform/ios/test/MGLNSDataAdditionsTests.m
@@ -10,28 +10,28 @@
- (void)testCompressDecompress
{
NSArray *originalArray = [self mockDataWithCount:180];
-
+
NSData *originalData = [NSJSONSerialization dataWithJSONObject:originalArray options:0 error:nil];
-
+
NSData *compressedData = [originalData mgl_compressedData];
NSData *decompressedData = [compressedData mgl_decompressedData];
-
+
NSArray *decompressedArray = [NSJSONSerialization JSONObjectWithData:decompressedData options:0 error:nil];
-
+
XCTAssertTrue([originalArray isEqualToArray:decompressedArray], @"originalArray and decompressedArray should be equal");
}
- (NSArray *)mockDataWithCount:(NSUInteger)count
{
NSMutableArray *array = [NSMutableArray array];
-
+
for (NSUInteger i=0;i<count;i++)
{
[array addObject:@{@"lat": @([self safeValueBetween:-90 and:90]),
@"lng": @([self safeValueBetween:-180 and:180]),
@"timestamp": @((floor([NSDate date].timeIntervalSince1970) * 100) / 100)}];
}
-
+
return array;
}
diff --git a/platform/ios/test/MGLSourceTests.m b/platform/ios/test/MGLSourceTests.m
index 90ec4e3a0b..2e4942cbe9 100644
--- a/platform/ios/test/MGLSourceTests.m
+++ b/platform/ios/test/MGLSourceTests.m
@@ -9,9 +9,9 @@
- (void)testDuplicateSources {
MGLVectorSource *source1 = [[MGLVectorSource alloc] initWithIdentifier:@"my-source" URL:[NSURL URLWithString:@"mapbox://mapbox.mapbox-terrain-v2"]];
MGLVectorSource *source2 = [[MGLVectorSource alloc] initWithIdentifier:@"my-source" URL:[NSURL URLWithString:@"mapbox://mapbox.mapbox-terrain-v2"]];
-
+
[self.mapView.style addSource: source1];
-
+
@try {
[self.mapView.style addSource: source2];
XCTFail(@"Should not have reached this point");