@@ -60,7 +60,7 @@ - (void)testUppercaseTitleNo {
60
60
XCTAssertEqualObjects (button.currentTitle , originalTitle);
61
61
}
62
62
63
- - (void )testUppercaseTitleNOChangedToYes {
63
+ - (void )testUppercaseTitleNoChangedToYes {
64
64
// Given
65
65
MDCButton *button = [[MDCButton alloc ] init ];
66
66
NSString *originalTitle = @" some Text" ;
@@ -74,7 +74,7 @@ - (void)testUppercaseTitleNOChangedToYes {
74
74
XCTAssertEqualObjects (button.currentTitle , [originalTitle uppercaseStringWithLocale: [NSLocale currentLocale ]]);
75
75
}
76
76
77
- - (void )testSetEnabledAnimatedNO {
77
+ - (void )testSetEnabledAnimatedNo {
78
78
// Given
79
79
MDCButton *button = [[MDCButton alloc ] init ];
80
80
@@ -123,9 +123,11 @@ - (void)testResetElevationForState {
123
123
124
124
// Then
125
125
if (controlState & UIControlStateSelected) {
126
- XCTAssertNotEqualWithAccuracy ([button elevationForState: controlState], MDCShadowElevationNone, kEpsilonAccuracy );
126
+ XCTAssertNotEqualWithAccuracy ([button elevationForState: controlState], MDCShadowElevationNone,
127
+ kEpsilonAccuracy );
127
128
} else {
128
- XCTAssertEqualWithAccuracy ([button elevationForState: controlState], MDCShadowElevationNone, kEpsilonAccuracy );
129
+ XCTAssertEqualWithAccuracy ([button elevationForState: controlState], MDCShadowElevationNone,
130
+ kEpsilonAccuracy );
129
131
}
130
132
}
131
133
}
@@ -155,7 +157,7 @@ - (void)testCurrentBackgroundColor {
155
157
button.highlighted = (controlState & UIControlStateHighlighted) == UIControlStateHighlighted;
156
158
button.selected = (controlState & UIControlStateSelected) == UIControlStateSelected;
157
159
button.enabled = (controlState & UIControlStateDisabled) != UIControlStateDisabled;
158
- NSLog (@" controlstate:%i " , button.state );
160
+ NSLog (@" controlstate:%lu " , ( unsigned long ) button.state );
159
161
160
162
// Then
161
163
XCTAssertEqual (button.state , controlState);
@@ -225,7 +227,8 @@ - (UIControlState)randomControlState {
225
227
return UIControlStateSelected; // Test selected the second most.
226
228
}
227
229
// Everything else including overlapping states.
228
- return arc4random_uniform (UIControlStateDisabled | UIControlStateHighlighted | UIControlStateSelected + 1 );
230
+ return arc4random_uniform (UIControlStateDisabled | UIControlStateHighlighted |
231
+ UIControlStateSelected + 1 );
229
232
// UIButton *button = [[UIButton alloc] init];
230
233
// button.enabled = arc4random_uniform(2);
231
234
// button.highlighted = arc4random_uniform(2);
@@ -371,7 +374,8 @@ - (void)testButtonState {
371
374
button.enabled = (controlState & UIControlStateDisabled) != UIControlStateDisabled;
372
375
373
376
// Then
374
- NSLog (@" controlstate:%i ==%i highlight:%i enabled:%i selected:%i " , controlState, button.state , button.highlighted , button.enabled , button.selected );
377
+ NSLog (@" controlstate:%lu ==%lu highlight:%i enabled:%i selected:%i " , (unsigned long )controlState,
378
+ (unsigned long )button.state , button.highlighted , button.enabled , button.selected );
375
379
XCTAssertEqual (button.state , controlState);
376
380
}
377
381
}
0 commit comments