diff options
author | dmaclach <dmaclach@google.com> | 2016-10-07 12:10:23 -0400 |
---|---|---|
committer | Thomas Van Lenten <thomasvl@google.com> | 2016-10-07 12:21:06 -0400 |
commit | 42124b3691197c3c4f52f069775fa0390a8ff942 (patch) | |
tree | ebd373d398ea64b45bdc1d196fa0a2c5f57cabfd /iPhone/GTMUILocalizerTest.m | |
parent | 57eeab4193210df8ab0c81e9d3f1ee1ad3e24492 (diff) |
First cut at pruning things/updating things.
Remove a bunch of code that Google stopped using/maintaining rather than trying
to update it it. Some would be hard to update, some actually has system provided
replacements; others are patterns that just don't seem as common now.
Prune out the code related to macOS <= 10.5, start pruning some of the really
old iOS support also.
Get the projects mostly limping again with modern Xcodes so tests can be run.
If someone ends up on this commit via history for something they still find
as useful, feel free to do a pull request to bring the snippet of code back to
life and update it for current SDKs.
Diffstat (limited to 'iPhone/GTMUILocalizerTest.m')
-rw-r--r-- | iPhone/GTMUILocalizerTest.m | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/iPhone/GTMUILocalizerTest.m b/iPhone/GTMUILocalizerTest.m index a53c249..434e890 100644 --- a/iPhone/GTMUILocalizerTest.m +++ b/iPhone/GTMUILocalizerTest.m @@ -58,7 +58,7 @@ - (void)checkValues:(NSString *)value onController:(GTMUILocalizerTestViewController *)controller { // Label - STAssertEqualStrings(value, [[controller label] text], nil); + XCTAssertEqualStrings(value, [[controller label] text]); // Button UIControlState allStates[] = { UIControlStateNormal, UIControlStateHighlighted, @@ -66,33 +66,29 @@ UIControlStateSelected }; for (size_t idx = 0; idx < (sizeof(allStates)/sizeof(allStates[0])); ++idx) { UIControlState state = allStates[idx]; - STAssertEqualStrings(value, [[controller button] titleForState:state], nil); + XCTAssertEqualStrings(value, [[controller button] titleForState:state]); } // SegementedControl for (NSUInteger i = 0; i < [[controller segmentedControl] numberOfSegments]; ++i) { - STAssertEqualStrings(value, - [[controller segmentedControl] titleForSegmentAtIndex:i], nil); + XCTAssertEqualStrings(value, + [[controller segmentedControl] titleForSegmentAtIndex:i]); } // SearchBar - STAssertEqualStrings(value, [[controller searchBar] text], nil); - STAssertEqualStrings(value, [[controller searchBar] placeholder], nil); - STAssertEqualStrings(value, [[controller searchBar] prompt], nil); + XCTAssertEqualStrings(value, [[controller searchBar] text]); + XCTAssertEqualStrings(value, [[controller searchBar] placeholder]); + XCTAssertEqualStrings(value, [[controller searchBar] prompt]); // Accessibility label seems to not be working at all. They always are nil. // Even when setting those explicitly there, the getter always returns nil. // This might be because the gobal accessibility switch is not on during the // tests. #if 0 - STAssertEqualStrings(value, [[controller view] accessibilityLabel], - nil); - STAssertEqualStrings(value, [[controller view] accessibilityHint], - nil); - STAssertEqualStrings(value, [[controller label] accessibilityLabel], - nil); - STAssertEqualStrings(value, [[controller label] accessibilityHint], - nil); + XCTAssertEqualStrings(value, [[controller view] accessibilityLabel]); + XCTAssertEqualStrings(value, [[controller view] accessibilityHint]); + XCTAssertEqualStrings(value, [[controller label] accessibilityLabel]); + XCTAssertEqualStrings(value, [[controller label] accessibilityHint]); #endif } |