From 874ff24d8cda6be1a3463b9614862ec186db6f40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Thu, 21 Jan 2016 14:09:36 -0800 Subject: [ios] Removed testDelegateRegionDidChange Also failing randomly on Bitrise. /ref #3555 --- test/ios/MapViewTests.m | 54 ------------------------------------------------- 1 file changed, 54 deletions(-) (limited to 'test/ios') 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 -- cgit v1.2.1