diff options
Diffstat (limited to 'AppKit/GTMCarbonEventTest.m')
-rw-r--r-- | AppKit/GTMCarbonEventTest.m | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/AppKit/GTMCarbonEventTest.m b/AppKit/GTMCarbonEventTest.m index 261b2d3..ff7fca5 100644 --- a/AppKit/GTMCarbonEventTest.m +++ b/AppKit/GTMCarbonEventTest.m @@ -36,6 +36,9 @@ @interface GTMCarbonEventMonitorHandlerTest : GTMTestCase @end +@interface GTMCarbonEventApplicationEventHandlerTest : GTMTestCase +@end + @interface GTMCarbonEventDispatcherHandlerTest : GTMTestCase { @private BOOL hotKeyHit_; @@ -237,6 +240,22 @@ static const UInt32 kTestParameterValue = 'bam '; @end +#if (MAC_OS_X_VERSION_MAX_ALLOWED == MAC_OS_X_VERSION_10_5) +// Accidentally marked as !LP64 in the 10.5sdk, it's back in the 10.6 sdk. +// If you remove this decl, please remove it from GTMCarbonEvent.m as well. +extern EventTargetRef GetApplicationEventTarget(void); +#endif // (MAC_OS_X_VERSION_MAX_ALLOWED == MAC_OS_X_VERSION_10_5) + +@implementation GTMCarbonEventApplicationEventHandlerTest + +- (void)testEventHandler { + GTMCarbonEventApplicationEventHandler *handler + = [GTMCarbonEventApplicationEventHandler sharedApplicationEventHandler]; + STAssertEquals([handler eventTarget], GetApplicationEventTarget(), nil); +} + +@end + @implementation GTMCarbonEventDispatcherHandlerTest - (void)testEventHandler { |