Skip to content

Commit

Permalink
[Tabs] Add explicit cast in MDCTabBarViewTests.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 316096871
  • Loading branch information
Wenyu Zhang authored and material-automation committed Jun 12, 2020
1 parent c302339 commit 7c4dab6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions components/Tabs/tests/unit/MDCItemBarTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,10 @@ - (void)testItemBarAddsPointerInteractionsToCells {
for (NSUInteger itemIndex = 0; itemIndex < visibleCells.count; itemIndex++) {
UICollectionViewCell *cell = visibleCells[itemIndex];
XCTAssertEqual(cell.interactions.count, 1,
@"cell at index %lu should only have one UIInteraction.", itemIndex);
@"cell at index %lu should only have one UIInteraction.",
(unsigned long)itemIndex);
XCTAssert([cell.interactions.firstObject isKindOfClass:[UIPointerInteraction class]],
@"cell at index %lu should have a UIPointerInteraction.", itemIndex);
@"cell at index %lu should have a UIPointerInteraction.", (unsigned long)itemIndex);
}
}
#endif
Expand Down
6 changes: 4 additions & 2 deletions components/Tabs/tests/unit/TabBarView/MDCTabBarViewTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -1337,9 +1337,11 @@ - (void)testItemViewsHavePointerInteractions {
for (NSUInteger itemIndex = 0; itemIndex < itemViews.count; itemIndex++) {
MDCTabBarViewItemView *itemView = itemViews[itemIndex];
XCTAssertEqual(itemView.interactions.count, 1,
@"itemView at index %lu should only have one UIInteraction.", itemIndex);
@"itemView at index %lu should only have one UIInteraction.",
(unsigned long)itemIndex);
XCTAssert([itemView.interactions.firstObject isKindOfClass:[UIPointerInteraction class]],
@"itemView at index %lu should have a UIPointerInteraction.", itemIndex);
@"itemView at index %lu should have a UIPointerInteraction.",
(unsigned long)itemIndex);
}
}
#endif
Expand Down

0 comments on commit 7c4dab6

Please sign in to comment.