From c53ec5520e39096e0804ce8d89a21378c0904481 Mon Sep 17 00:00:00 2001 From: thomasvl Date: Fri, 13 Jun 2008 19:21:50 +0000 Subject: Landing a log of AppleScript/AppleEvent support code. Landing GTMHTTPServer as a simple server but mainly for use in unittesting. _GTMCompileAssert for doing compile time assertions to GTMDefines.h Lots of improvments for UnitTesting, Dave's gonna put up a wiki page shortly with the full details of what can be done. --- DebugUtils/GTMMethodCheck.m | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'DebugUtils/GTMMethodCheck.m') diff --git a/DebugUtils/GTMMethodCheck.m b/DebugUtils/GTMMethodCheck.m index f91b1a9..300022b 100644 --- a/DebugUtils/GTMMethodCheck.m +++ b/DebugUtils/GTMMethodCheck.m @@ -41,9 +41,14 @@ static BOOL ConformsToNSObjectProtocol(Class cls) { // work for you. // Some classes (like _NSZombie) start with _NS. // On Leopard we have to look for CFObject as well. - if ((strncmp(className, "NS", 2) == 0) || - (strncmp(className, "_NS", 3) == 0) || - (strcmp(className, "CFObject") == 0)) { + // On iPhone we check Object as well + if ((strncmp(className, "NS", 2) == 0) + || (strncmp(className, "_NS", 3) == 0) + || (strcmp(className, "CFObject") == 0) +#if GTM_IPHONE_SDK + || (strcmp(className, "Object") == 0) +#endif + ) { return YES; } @@ -88,10 +93,12 @@ void GTMMethodCheckMethodChecker(void) { // @protocol(NSObject), or else we will tumble into a _objc_msgForward // recursive loop when we try and call a function by name. if (!ConformsToNSObjectProtocol(cls)) { + // COV_NF_START _GTMDevLog(@"GTMMethodCheckMethodChecker: Class %s does not conform to " "@protocol(NSObject), so won't be checked", class_getName(cls)); continue; + // COV_NF_END } // Since we are looking for a class method (+xxGMMethodCheckMethod...) // we need to query the isa pointer to see what methods it support, but -- cgit v1.2.3