IGListKit/Tests
Maxime Ollivier cd3f84f227 fix crash when calling reloadObjects during an update
Summary:
Follow up to D47263265

## What's happening
We're calling `listAdapter.reloadObjects(...)` in the middle of the IGListKit's internal data update, so it's using the new section index path, instead of the old one. So we're going from a list of 2, insert at 0, and try to reload index 1, then we crash (it'll try to update index 2, which doesn't exist in the old array)

## Fix
Just like for `[IGListAdapter performBatchAnimated:updates:completion:]`, lets use the old index. To get this working, lets ask the updater if we're in an update, rather than `IGListAdapter` try to keep track of it.

Sorry the diff is a bit long, but in case this feels reasonable to pick, I might

Differential Revision: D47281472

fbshipit-source-id: 193153cfc15c87084b67f58c50e921db459d6800
2023-07-07 11:36:50 -07:00
..
Assets Support supplementaryViews created from nibs (continued) 2016-11-05 16:29:06 -07:00
Objects Added extra test case to IGTestDelegateController 2023-04-17 20:41:49 -07:00
IGListAdapterE2ETests.m fix crash when calling reloadObjects during an update 2023-07-07 11:36:50 -07:00
IGListAdapterProxyTests.m Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListAdapterStoryboardTests.m Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListAdapterTests.m fix crash when calling reloadObjects during an update 2023-07-07 11:36:50 -07:00
IGListAdapterUpdaterTests.m Added more coverage cases to list adapter tests 2023-04-17 20:41:49 -07:00
IGListBatchUpdateDataTests.m Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListBindingSectionControllerTests.m Added remaining test coverage to IGListBindingSectionController 2023-04-17 20:41:49 -07:00
IGListBindingSingleSectionControllerTests.m Add remaining test coverage for IGListBindingSingleSectionController 2023-04-20 14:26:11 -07:00
IGListCollectionScrollingTraitsTests.m Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListCollectionViewLayoutTests.m Added test coverage to collection view and collection view layout 2023-04-17 20:41:49 -07:00
IGListCollectionViewTests.m Added test coverage to collection view and collection view layout 2023-04-17 20:41:49 -07:00
IGListContentInsetTests.m Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListDebugDescriptionTests.m Add new test files to IGListKit 2023-04-17 20:41:49 -07:00
IGListDebuggerTests.m Add test coverage for list adapter debugger class 2023-04-17 20:41:49 -07:00
IGListDiffDescriptionStringTests.m Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListDiffResultTests.m Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListDiffSwiftTests.swift Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListDiffTests.h Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListDiffTests.m Bring IGListDiffKit test coverage to 100% 2023-04-17 20:41:49 -07:00
IGListDisplayHandlerTests.m Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListGenericSectionControllerTests.m Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListInteractiveMovingTests.m Add new test files to IGListKit 2023-04-17 20:41:49 -07:00
IGListKitTests-Bridging-Header.h Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListReloadDataUpdaterTests.m Renamed IGReloadDataUpdaterTests to IGListReloadDataUpdaterTests 2023-04-17 20:41:49 -07:00
IGListSectionControllerTests.m Split out checks for methods that throw 2023-04-20 14:26:11 -07:00
IGListSectionMapTests.m Added remaining test coverage for IGListSectionMap 2023-04-17 20:41:49 -07:00
IGListSingleNibItemControllerTests.m Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListSingleSectionControllerTests.m Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListSingleStoryboardItemControllerTests.m Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListTestCase.h Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListTestCase.m Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListTestHelpers.h Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListTransactionTests.m Add new test files to IGListKit 2023-04-17 20:41:49 -07:00
IGListWorkingRangeHandlerTests.m Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
Info.plist Update deployment targets to silence Xcode 14 warnings (#1573) 2023-05-01 22:48:23 -07:00