From bec019925c1b33bac003847c9c8ce59c8be613a1 Mon Sep 17 00:00:00 2001 From: Tim Oliver Date: Mon, 17 Apr 2023 20:41:49 -0700 Subject: [PATCH] Added remaining test coverage for IGListSectionMap Summary: Added remaining test coverage to IGListSectionMap Reviewed By: candance Differential Revision: D45004860 fbshipit-source-id: 30e4988a8b3ce56551aceb52c0cd99be2286fffa --- Tests/IGListSectionMapTests.m | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Tests/IGListSectionMapTests.m b/Tests/IGListSectionMapTests.m index 47a800fc..abc45c08 100644 --- a/Tests/IGListSectionMapTests.m +++ b/Tests/IGListSectionMapTests.m @@ -100,4 +100,11 @@ XCTAssertFalse(one.isFirstSection); } +- (void)test_whenQueryingItems_thatNilReturnsNotFound { + NSObject *object = [NSObject new]; + object = nil; + IGListSectionMap *map = [[IGListSectionMap alloc] initWithMapTable:[NSMapTable strongToStrongObjectsMapTable]]; + XCTAssertEqual([map sectionForObject:object], NSNotFound); +} + @end