From 42124b3691197c3c4f52f069775fa0390a8ff942 Mon Sep 17 00:00:00 2001 From: dmaclach Date: Fri, 7 Oct 2016 12:10:23 -0400 Subject: 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. --- iPhone/GTMUILocalizerTest.m | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) (limited to 'iPhone/GTMUILocalizerTest.m') 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 } -- cgit v1.2.3