diff options
author | thomasvl@gmail.com <thomasvl@gmail.com@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2008-12-29 18:57:18 +0000 |
---|---|---|
committer | thomasvl@gmail.com <thomasvl@gmail.com@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2008-12-29 18:57:18 +0000 |
commit | 84d1232477f398339e48ea504c45048e9328ef9b (patch) | |
tree | a9d48903e6bf318840eba1f38b26f68a7560f0ed /AppKit/GTMCarbonEventTest.m | |
parent | 2e8516354aacef064d01425808da06d2cdcb4791 (diff) |
- 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.
Diffstat (limited to 'AppKit/GTMCarbonEventTest.m')
-rw-r--r-- | AppKit/GTMCarbonEventTest.m | 9 |
1 files changed, 6 insertions, 3 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 |