Skip to content
Permalink
Browse files

[Buttons] Fix up test (#7461)

Fix up test comments added in #7452 and the error messages when the test fail.
  • Loading branch information
codeman7 committed May 23, 2019
1 parent 864621c commit face6eac24ce2e21642e21a30cd52db755a1ebdd
Showing with 6 additions and 4 deletions.
  1. +6 −4 components/Buttons/tests/unit/ButtonsTests.m
@@ -1136,8 +1136,9 @@ - (void)testLegacyDynamicTypeDisabled {
self.button.adjustsFontForContentSizeCategoryWhenScaledFontIsUnavailable = NO;
[self.button updateTitleFont];

// Given
XCTAssertTrue([self.button.titleLabel.font mdc_isSimplyEqual:originalFont]);
// Then
XCTAssertTrue([self.button.titleLabel.font mdc_isSimplyEqual:originalFont],
@"%@ is not equal to %@", self.button.titleLabel.font, originalFont);
}

/**
@@ -1155,8 +1156,9 @@ - (void)testLegacyDynamicTypeEnabled {
self.button.adjustsFontForContentSizeCategoryWhenScaledFontIsUnavailable = YES;
[self.button updateTitleFont];

// Given
XCTAssertFalse([self.button.titleLabel.font mdc_isSimplyEqual:originalFont]);
// Then
XCTAssertFalse([self.button.titleLabel.font mdc_isSimplyEqual:originalFont], @"%@ is equal to %@",
self.button.titleLabel.font, originalFont);
}

#pragma mark - Size-related tests

0 comments on commit face6ea

Please sign in to comment.
You can’t perform that action at this time.