summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2016-01-21 14:09:36 -0800
committerMinh Nguyễn <mxn@1ec5.org>2016-01-21 14:09:36 -0800
commit874ff24d8cda6be1a3463b9614862ec186db6f40 (patch)
tree3fc90fc233d2e4b4586610e1615f3dfc27e1ca68 /test
parent698eb674a7c7dce1c44dbc9b0197ee2e162c232e (diff)
downloadqtlocation-mapboxgl-874ff24d8cda6be1a3463b9614862ec186db6f40.tar.gz
[ios] Removed testDelegateRegionDidChange
Also failing randomly on Bitrise. /ref #3555
Diffstat (limited to 'test')
-rw-r--r--test/ios/MapViewTests.m54
1 files changed, 0 insertions, 54 deletions
diff --git a/test/ios/MapViewTests.m b/test/ios/MapViewTests.m
index 4813f57d04..198888ee6e 100644
--- a/test/ios/MapViewTests.m
+++ b/test/ios/MapViewTests.m
@@ -484,60 +484,6 @@
userInfo:@{ @"animated" : @(animated) }];
}
-- (void)testDelegateRegionDidChange {
- __block NSUInteger unanimatedCount;
- __block NSUInteger animatedCount;
- [[NSNotificationCenter defaultCenter] addObserverForName:@"regionDidChangeAnimated"
- object:tester.mapView
- queue:nil
- usingBlock:^(NSNotification *note) {
- if ([note.userInfo[@"animated"] boolValue]) {
- animatedCount++;
- } else {
- unanimatedCount++;
- }
- }];
-
- [tester waitForTimeInterval:1];
-
- unanimatedCount = 0;
- animatedCount = 0;
-
- NSNotification *notification = [system waitForNotificationName:@"regionDidChangeAnimated"
- object:tester.mapView
- whileExecutingBlock:^{
- tester.mapView.centerCoordinate = CLLocationCoordinate2DMake(0, 0);
- }];
-
- [tester waitForTimeInterval:1];
-
- XCTAssertEqual([notification.userInfo[@"animated"] boolValue],
- NO,
- @"regionDidChange delegate should not indicate animated change");
- XCTAssertEqual(unanimatedCount,
- 1,
- @"regionDidChange delegate should indicate one unanimated change");
-
- notification = [system waitForNotificationName:@"regionDidChangeAnimated"
- object:tester.mapView
- whileExecutingBlock:^{
- [tester.mapView setCenterCoordinate:CLLocationCoordinate2DMake(45, 100) animated:YES];
- }];
-
- [tester waitForTimeInterval:1];
-
- XCTAssertEqual([notification.userInfo[@"animated"] boolValue],
- YES,
- @"regionDidChange delegate should indicate animated change");
- XCTAssertEqual(animatedCount,
- 1,
- @"regionDidChange delegate should indicate one animated change");
-
- [[NSNotificationCenter defaultCenter] removeObserver:self
- name:@"regionDidChangeAnimated"
- object:tester.mapView];
-}
-
- (void)mapView:(MGLMapView *)mapView regionDidChangeAnimated:(BOOL)animated {
[[NSNotificationCenter defaultCenter] postNotificationName:@"regionDidChangeAnimated"
object:mapView