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. --- AppKit/GTMFadeTruncatingTextFieldCellTest.m | 33 ----------------------------- 1 file changed, 33 deletions(-) (limited to 'AppKit/GTMFadeTruncatingTextFieldCellTest.m') diff --git a/AppKit/GTMFadeTruncatingTextFieldCellTest.m b/AppKit/GTMFadeTruncatingTextFieldCellTest.m index c201d27..a3098d8 100644 --- a/AppKit/GTMFadeTruncatingTextFieldCellTest.m +++ b/AppKit/GTMFadeTruncatingTextFieldCellTest.m @@ -20,7 +20,6 @@ #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 #import "GTMSenTestCase.h" -#import "GTMAppKit+UnitTesting.h" #import "GTMFadeTruncatingTextFieldCell.h" @interface GTMFadeTruncatingTextFieldCellTest : GTMTestCase @@ -35,14 +34,7 @@ autorelease]]; [field setStringValue:@"A very long string that won't fit"]; - GTMAssertObjectImageEqualToImageNamed(field, - @"GTMFadeTruncatingTextFieldCellTest1", - nil); - [field setStringValue:@"A short string"]; - GTMAssertObjectImageEqualToImageNamed(field, - @"GTMFadeTruncatingTextFieldCellTest2", - nil); // Dark background, light text (force the background to draw (which is odd // for a text cell), but this is to make sure the support for light on dark @@ -52,13 +44,7 @@ [field setBackgroundColor:[NSColor blackColor]]; [field setStringValue:@"A very long string that won't fit"]; - GTMAssertObjectImageEqualToImageNamed(field, - @"GTMFadeTruncatingTextFieldCellTest3", - nil); [field setStringValue:@"A short string"]; - GTMAssertObjectImageEqualToImageNamed(field, - @"GTMFadeTruncatingTextFieldCellTest4", - nil); } - (void)testFadeCellLeftAndRight { @@ -71,36 +57,17 @@ [field setCell:cell]; [field setStringValue:@"Fade on both left and right AAAA"]; - GTMAssertObjectImageEqualToImageNamed(field, - @"GTMFadeTruncatingTextFieldCellTest5", - nil); - [field setStringValue:@"Fade on left only A"]; - GTMAssertObjectImageEqualToImageNamed(field, - @"GTMFadeTruncatingTextFieldCellTest6", - nil); - [field setStringValue:@"A short string"]; - GTMAssertObjectImageEqualToImageNamed(field, - @"GTMFadeTruncatingTextFieldCellTest2", - nil); - // Test the case where the number of characters to truncate from head is not // specified. This should cause the string to be drawn centered. [cell setDesiredCharactersToTruncateFromHead:0]; [field setStringValue:@"Fade on both left and right AAAA"]; - GTMAssertObjectImageEqualToImageNamed(field, - @"GTMFadeTruncatingTextFieldCellTest7", - nil); - // Border with a solid background color. [field setTextColor:[NSColor whiteColor]]; [field setDrawsBackground:YES]; [field setBackgroundColor:[NSColor blackColor]]; [field setBordered:YES]; - GTMAssertObjectImageEqualToImageNamed(field, - @"GTMFadeTruncatingTextFieldCellTest8", - nil); } @end -- cgit v1.2.3