diff options
Diffstat (limited to 'AppKit')
-rw-r--r-- | AppKit/GTMCarbonEventTest.m | 9 | ||||
-rw-r--r-- | AppKit/GTMGetURLHandlerTest.m | 6 | ||||
-rw-r--r-- | AppKit/GTMNSImage+Scaling.h | 1 |
3 files changed, 10 insertions, 6 deletions
diff --git a/AppKit/GTMCarbonEventTest.m b/AppKit/GTMCarbonEventTest.m index 0615271..a1a8b2b 100644 --- a/AppKit/GTMCarbonEventTest.m +++ b/AppKit/GTMCarbonEventTest.m @@ -208,7 +208,7 @@ static const UInt32 kTestParameterValue = 'bam '; } - (void)testEventHandler { - [GTMUnitTestDevLog expectPattern: + [GTMUnitTestDevLogDebug expectPattern: @"DebugAssert: GoogleToolboxForMac: event CantUseParams .*"]; STAssertErr([handler_ handleEvent:nil handler:nil], eventNotHandledErr, nil); } @@ -265,7 +265,7 @@ static const UInt32 kTestParameterValue = 'bam '; UInt32 keyMods = (NSShiftKeyMask | NSControlKeyMask | NSAlternateKeyMask | NSCommandKeyMask); EventHotKeyRef hotKey; - [GTMUnitTestDevLog expectPattern:@"DebugAssert: GoogleToolboxForMac: " + [GTMUnitTestDevLogDebug expectPattern:@"DebugAssert: GoogleToolboxForMac: " @"newKey CantCreateKey .*"]; STAssertNULL([dispatcher registerHotKey:0x5 modifiers:keyMods @@ -273,13 +273,16 @@ static const UInt32 kTestParameterValue = 'bam '; action:nil whenPressed:YES], @"Shouldn't have created hotkey"); +#if DEBUG + // This test debug selector validation, so we only can do it in debug. STAssertThrowsSpecificNamed([dispatcher registerHotKey:0x5 modifiers:keyMods target:self action:@selector(badSelector:) whenPressed:YES], NSException, NSInternalInconsistencyException, - hotKey, @"Shouldn't have created hotkey"); + @"Shouldn't have created hotkey"); +#endif hotKey = [dispatcher registerHotKey:0x5 modifiers:keyMods target:self diff --git a/AppKit/GTMGetURLHandlerTest.m b/AppKit/GTMGetURLHandlerTest.m index 98d3c89..30aa82f 100644 --- a/AppKit/GTMGetURLHandlerTest.m +++ b/AppKit/GTMGetURLHandlerTest.m @@ -59,12 +59,12 @@ static BOOL sURLHandlerWasHit; - (void)testURLCall { sURLHandlerWasHit = NO; - [GTMUnitTestDevLog expectPattern:@"Class GTMGetURLHandlerBadClassWarning " + [GTMUnitTestDevLogDebug expectPattern:@"Class GTMGetURLHandlerBadClassWarning " @"for URL handler GTMGetURLHandlerBadClassURL .*"]; - [GTMUnitTestDevLog expectPattern:@"Unable to get class " + [GTMUnitTestDevLogDebug expectPattern:@"Unable to get class " @"GTMGetURLHandlerMissingClassWarning for URL handler " @"GTMGetURLHandlerMissingClassURL .*"]; - [GTMUnitTestDevLog expectPattern:@"Missing GTMBundleURLClass for URL handler " + [GTMUnitTestDevLogDebug expectPattern:@"Missing GTMBundleURLClass for URL handler " @"GTMGetURLHandlerMissingHandlerURL .*"]; STAssertTrue([self openURLString:@"gtmgeturlhandlertest://test.foo"], nil); STAssertTrue(sURLHandlerWasHit, @"URL handler not called"); diff --git a/AppKit/GTMNSImage+Scaling.h b/AppKit/GTMNSImage+Scaling.h index 6bf2dd5..7d48577 100644 --- a/AppKit/GTMNSImage+Scaling.h +++ b/AppKit/GTMNSImage+Scaling.h @@ -20,6 +20,7 @@ #import <Foundation/Foundation.h> +#import "GTMDefines.h" @interface NSImage (GTMNSImageScaling) |