From ec72a2bc500a716369c383837bffdc7d2a22855b Mon Sep 17 00:00:00 2001 From: Mark Mentovai Date: Mon, 10 Jul 2017 17:24:25 -0400 Subject: 10.13 SDK (and iOS 11 equivalent) compatibility for GTM Starting in the 10.6 SDK, the non-underscored and all-lowercase macro names in were deprecated. In the 10.13 SDK shipping in Xcode 9 beta 3 (but not previous betas of Xcode 9), Apple has made good on its promise to eventually disable these names. Update GTM to use the new underscored mixed-case names. Provided that nobody needs to target anything older than the 10.5 SDK anymore, this should be a safe change. Aside from GTMCarbonEvent.m, which is used by Chrome, this change is untested, and was made by mechanically replacing uses of the various check, require, and verify macros found in GTM. --- UnitTesting/GTMAppKitUnitTestingUtilities.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'UnitTesting') diff --git a/UnitTesting/GTMAppKitUnitTestingUtilities.m b/UnitTesting/GTMAppKitUnitTestingUtilities.m index d90d608..8a83f81 100644 --- a/UnitTesting/GTMAppKitUnitTestingUtilities.m +++ b/UnitTesting/GTMAppKitUnitTestingUtilities.m @@ -62,12 +62,12 @@ static CGKeyCode GTMKeyCodeForCharCode(CGCharCode charCode); + (void)postKeyEvent:(NSEventType)type character:(CGCharCode)keyChar modifiers:(UInt32)cocoaModifiers { - require(![self isScreenSaverActive], CantWorkWithScreenSaver); - require(type == NSKeyDown || type == NSKeyUp, CantDoEvent); + __Require(![self isScreenSaverActive], CantWorkWithScreenSaver); + __Require(type == NSKeyDown || type == NSKeyUp, CantDoEvent); CGKeyCode code = GTMKeyCodeForCharCode(keyChar); - verify(code != 256); + __Verify(code != 256); CGEventRef event = CGEventCreateKeyboardEvent(NULL, code, type == NSKeyDown); - require(event, CantCreateEvent); + __Require(event, CantCreateEvent); CGEventSetFlags(event, cocoaModifiers); CGEventPost(kCGSessionEventTap, event); CFRelease(event); -- cgit v1.2.3