aboutsummaryrefslogtreecommitdiff
path: root/DebugUtils/GTMMethodCheck.m
diff options
context:
space:
mode:
authorGravatar thomasvl <thomasvl@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2008-06-13 19:21:50 +0000
committerGravatar thomasvl <thomasvl@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2008-06-13 19:21:50 +0000
commitc53ec5520e39096e0804ce8d89a21378c0904481 (patch)
treed36a0055b59b1376d86c4ba4a01f9c479c2101a7 /DebugUtils/GTMMethodCheck.m
parent80d493da05c8d461d74bfaa919ffc487be03ffe6 (diff)
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.
Diffstat (limited to 'DebugUtils/GTMMethodCheck.m')
-rw-r--r--DebugUtils/GTMMethodCheck.m13
1 files changed, 10 insertions, 3 deletions
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