Fix crash if batch update blocks are nil although method declaration allows nullable (#2599)

This commit is contained in:
Michael Schneider
2016-11-13 17:15:11 -08:00
committed by Adlai Holler
parent ae11fc755e
commit 44aa582ceb
4 changed files with 25 additions and 2 deletions

View File

@@ -705,6 +705,15 @@
}
}
- (void)testThatNilBatchUpdatesCanBeSubmitted
{
ASTableNode *node = [[ASTableNode alloc] initWithStyle:UITableViewStylePlain];
// Passing nil blocks should not crash
[node performBatchUpdates:nil completion:nil];
[node performBatchAnimated:NO updates:nil completion:nil];
}
@end
@implementation UITableView (Testing)