diff options
Diffstat (limited to 'AppKit/GTMUILocalizerAndLayoutTweakerTest.m')
-rw-r--r-- | AppKit/GTMUILocalizerAndLayoutTweakerTest.m | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/AppKit/GTMUILocalizerAndLayoutTweakerTest.m b/AppKit/GTMUILocalizerAndLayoutTweakerTest.m index d5b111c..8905e82 100644 --- a/AppKit/GTMUILocalizerAndLayoutTweakerTest.m +++ b/AppKit/GTMUILocalizerAndLayoutTweakerTest.m @@ -212,6 +212,7 @@ static NSUInteger gTestPass = 0; } #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 + - (void)testSizeToFitFixedHeightTextField { struct { const char *name; @@ -266,6 +267,19 @@ static NSUInteger gTestPass = 0; } } } + +- (void)testSizeToFitFixedHeightTextFieldIntegral { + NSTextField* textField = + [[NSTextField alloc] initWithFrame:NSMakeRect(0, 0, 100, 50)]; + [textField setBezeled:NO]; + [textField setStringValue:@"The quick brown fox jumps over the lazy dog."]; + [GTMUILocalizerAndLayoutTweaker sizeToFitFixedHeightTextField:textField]; + STAssertTrue( + NSEqualRects([textField bounds], NSIntegralRect([textField bounds])), + nil); + [textField release]; +} + #endif // MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 @end |