From 6f7cee534548b1d70bd2a7137e377978380ff7dd Mon Sep 17 00:00:00 2001 From: Krzysztof Jordan Date: Tue, 13 Apr 2021 02:10:59 -0700 Subject: [PATCH] FastMod @(number) to @number to for efficiency in .m, .mm, .h files Summary: fastmod --extensions m,mm,h '@\((-)?([\d\.]+)\)([\s\)\],])' '@${1}${2}${3}' --dir fbobjc/*/ Regex updated to capture cases for @(number), and @(number)] Reviewed By: adamjernst Differential Revision: D27513888 fbshipit-source-id: aacfc12ad46fef90fe7a7cb46cc8c7a68b2b8c32 --- Tests/IGListAdapterTests.m | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Tests/IGListAdapterTests.m b/Tests/IGListAdapterTests.m index 8cdcd594..d21e041a 100644 --- a/Tests/IGListAdapterTests.m +++ b/Tests/IGListAdapterTests.m @@ -348,7 +348,7 @@ ((IGListTestAdapterDataSource *)self.dataSource).backgroundView = [UIView new]; [self.adapter reloadDataWithCompletion:nil]; XCTAssertFalse(self.collectionView.backgroundView.hidden); - IGListTestSection *sectionController = [self.adapter sectionControllerForObject:@(0)]; + IGListTestSection *sectionController = [self.adapter sectionControllerForObject:@0]; sectionController.items = 1; [self.adapter insertInSectionController:sectionController atIndexes:[NSIndexSet indexSetWithIndex:0]]; XCTAssertTrue(self.collectionView.backgroundView.hidden); @@ -360,7 +360,7 @@ [self.adapter reloadDataWithCompletion:nil]; UIView *backgroundView = self.adapter.collectionView.backgroundView; XCTAssertTrue(!backgroundView || backgroundView.hidden); - IGListTestSection *sectionController = [self.adapter sectionControllerForObject:@(1)]; + IGListTestSection *sectionController = [self.adapter sectionControllerForObject:@1]; sectionController.items = 0; [self.adapter deleteInSectionController:sectionController atIndexes:[NSIndexSet indexSetWithIndex:0]]; XCTAssertFalse(self.collectionView.backgroundView.hidden); @@ -371,7 +371,7 @@ ((IGListTestAdapterDataSource *)self.dataSource).backgroundView = [UIView new]; [self.adapter reloadDataWithCompletion:nil]; XCTAssertFalse(self.collectionView.backgroundView.hidden); - IGListTestSection *sectionController = [self.adapter sectionControllerForObject:@(0)]; + IGListTestSection *sectionController = [self.adapter sectionControllerForObject:@0]; sectionController.items = 2; [self.adapter reloadSectionController:sectionController]; XCTAssertTrue(self.collectionView.backgroundView.hidden); @@ -383,8 +383,8 @@ [self.adapter reloadDataWithCompletion:nil]; UIView *backgroundView = self.adapter.collectionView.backgroundView; XCTAssertTrue(!backgroundView || backgroundView.hidden); - IGListTestSection *firstSectionController = [self.adapter sectionControllerForObject:@(1)]; - IGListTestSection *secondSectionController = [self.adapter sectionControllerForObject:@(2)]; + IGListTestSection *firstSectionController = [self.adapter sectionControllerForObject:@1]; + IGListTestSection *secondSectionController = [self.adapter sectionControllerForObject:@2]; XCTestExpectation *expectation = [self expectationWithDescription:NSStringFromSelector(_cmd)]; [self.adapter performBatchAnimated:YES updates:^(id batchContext) { firstSectionController.items = 0;