From 84d1232477f398339e48ea504c45048e9328ef9b Mon Sep 17 00:00:00 2001 From: "thomasvl@gmail.com" Date: Mon, 29 Dec 2008 18:57:18 +0000 Subject: - Updated some tests for 10.5.6. - Updated some tests for debug vs. release differences. (added help on log validation for this). - Some fixes build issues w/ different os versions. --- AppKit/GTMCarbonEventTest.m | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'AppKit/GTMCarbonEventTest.m') 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 -- cgit v1.2.3