OLD | NEW |
1 //------------------------------------------------------------------------------
--------- | 1 //------------------------------------------------------------------------------
--------- |
2 // $Id: OCMockObject.m 72 2011-01-28 18:45:19Z erik $ | 2 // $Id$ |
3 // Copyright (c) 2004-2009 by Mulle Kybernetik. See License file for details. | 3 // Copyright (c) 2004-2009 by Mulle Kybernetik. See License file for details. |
4 //------------------------------------------------------------------------------
--------- | 4 //------------------------------------------------------------------------------
--------- |
5 | 5 |
6 #import <OCMock/OCMockObject.h> | 6 #import <OCMock/OCMockObject.h> |
7 #import "OCClassMockObject.h" | 7 #import "OCClassMockObject.h" |
8 #import "OCProtocolMockObject.h" | 8 #import "OCProtocolMockObject.h" |
9 #import "OCPartialMockObject.h" | 9 #import "OCPartialMockObject.h" |
10 #import "OCObserverMockObject.h" | 10 #import "OCObserverMockObject.h" |
11 #import <OCMock/OCMockRecorder.h> | 11 #import <OCMock/OCMockRecorder.h> |
12 #import "NSInvocation+OCMAdditions.h" | 12 #import "NSInvocation+OCMAdditions.h" |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 | 157 |
158 - (void)forwardInvocation:(NSInvocation *)anInvocation | 158 - (void)forwardInvocation:(NSInvocation *)anInvocation |
159 { | 159 { |
160 if([self handleInvocation:anInvocation] == NO) | 160 if([self handleInvocation:anInvocation] == NO) |
161 [self handleUnRecordedInvocation:anInvocation]; | 161 [self handleUnRecordedInvocation:anInvocation]; |
162 } | 162 } |
163 | 163 |
164 - (BOOL)handleInvocation:(NSInvocation *)anInvocation | 164 - (BOOL)handleInvocation:(NSInvocation *)anInvocation |
165 { | 165 { |
166 OCMockRecorder *recorder = nil; | 166 OCMockRecorder *recorder = nil; |
167 » int» » » i; | 167 » unsigned int» » » i; |
168 | 168 |
169 for(i = 0; i < [recorders count]; i++) | 169 for(i = 0; i < [recorders count]; i++) |
170 { | 170 { |
171 recorder = [recorders objectAtIndex:i]; | 171 recorder = [recorders objectAtIndex:i]; |
172 if([recorder matchesInvocation:anInvocation]) | 172 if([recorder matchesInvocation:anInvocation]) |
173 break; | 173 break; |
174 } | 174 } |
175 | 175 |
176 if(i == [recorders count]) | 176 if(i == [recorders count]) |
177 return NO; | 177 return NO; |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 prefix = @"stubbed: "; | 247 prefix = @"stubbed: "; |
248 } | 248 } |
249 [outputString appendFormat:@"\n\t%@\t%@", prefix, [currentObject
description]]; | 249 [outputString appendFormat:@"\n\t%@\t%@", prefix, [currentObject
description]]; |
250 } | 250 } |
251 | 251 |
252 return outputString; | 252 return outputString; |
253 } | 253 } |
254 | 254 |
255 | 255 |
256 @end | 256 @end |
OLD | NEW |