Skip to content
This repository was archived by the owner on Jan 17, 2019. It is now read-only.

Commit 8a02a62

Browse files
authored
Merge pull request #268 from cerihughes/use-XCTAssertEqualObjects-for-index-paths
Don’t use XCTAssertEqual for NSIndexPath equivalence.
2 parents c707533 + a7e1144 commit 8a02a62

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/HUBComponentModelTests.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,16 +170,16 @@ - (void)testIndexPaths
170170
parent.children = @[childA, childB];
171171
childB.children = @[grandchild];
172172

173-
XCTAssertEqual(parent.indexPath, [NSIndexPath indexPathWithIndex:0]);
173+
XCTAssertEqualObjects(parent.indexPath, [NSIndexPath indexPathWithIndex:0]);
174174

175175
NSUInteger childAIndexPathArray[] = {0,0};
176-
XCTAssertEqual(childA.indexPath, [NSIndexPath indexPathWithIndexes:childAIndexPathArray length:2]);
176+
XCTAssertEqualObjects(childA.indexPath, [NSIndexPath indexPathWithIndexes:childAIndexPathArray length:2]);
177177

178178
NSUInteger childBIndexPathArray[] = {0,1};
179-
XCTAssertEqual(childB.indexPath, [NSIndexPath indexPathWithIndexes:childBIndexPathArray length:2]);
179+
XCTAssertEqualObjects(childB.indexPath, [NSIndexPath indexPathWithIndexes:childBIndexPathArray length:2]);
180180

181181
NSUInteger grandchildIndexPathArray[] = {0,1,0};
182-
XCTAssertEqual(grandchild.indexPath, [NSIndexPath indexPathWithIndexes:grandchildIndexPathArray length:3]);
182+
XCTAssertEqualObjects(grandchild.indexPath, [NSIndexPath indexPathWithIndexes:grandchildIndexPathArray length:3]);
183183
}
184184

185185
- (void)testPropertiesThatDoNotAffectEquality

0 commit comments

Comments
 (0)