summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-02 18:57:44 +0000
committerrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-02 18:57:44 +0000
commit2d267a97b94164c901898b393756ba2c1f2de893 (patch)
tree15e93595e95739e46f3d7a8678eb40d17d482d90
parentfd8ca5208c2035467253b5f8613c46745688d655 (diff)
downloadchromium_src-2d267a97b94164c901898b393756ba2c1f2de893.zip
chromium_src-2d267a97b94164c901898b393756ba2c1f2de893.tar.gz
chromium_src-2d267a97b94164c901898b393756ba2c1f2de893.tar.bz2
Roll OCMock r55:77.
BUG=none TEST=unit_tests Review URL: http://codereview.chromium.org/6904168 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83752 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--third_party/ocmock/OCMock/Changes.txt48
-rw-r--r--third_party/ocmock/OCMock/License.txt2
-rw-r--r--third_party/ocmock/OCMock/NSInvocation+OCMAdditions.m4
-rw-r--r--third_party/ocmock/OCMock/NSMethodSignature+OCMAdditions.h2
-rw-r--r--third_party/ocmock/OCMock/NSMethodSignature+OCMAdditions.m2
-rw-r--r--third_party/ocmock/OCMock/NSNotificationCenter+OCMAdditions.h2
-rw-r--r--third_party/ocmock/OCMock/NSNotificationCenter+OCMAdditions.m3
-rw-r--r--third_party/ocmock/OCMock/OCMArg.h9
-rw-r--r--third_party/ocmock/OCMock/OCMArg.m18
-rw-r--r--third_party/ocmock/OCMock/OCMBlockCaller.h21
-rw-r--r--third_party/ocmock/OCMock/OCMBlockCaller.m32
-rw-r--r--third_party/ocmock/OCMock/OCMConstraint.h22
-rw-r--r--third_party/ocmock/OCMock/OCMConstraint.m28
-rw-r--r--third_party/ocmock/OCMock/OCMConstraintTests.h2
-rw-r--r--third_party/ocmock/OCMock/OCMConstraintTests.m40
-rw-r--r--third_party/ocmock/OCMock/OCMIndirectReturnValueProvider.h4
-rw-r--r--third_party/ocmock/OCMock/OCMObserverRecorder.h2
-rw-r--r--third_party/ocmock/OCMock/OCMObserverRecorder.m2
-rw-r--r--third_party/ocmock/OCMock/OCMPassByRefSetter.h2
-rw-r--r--third_party/ocmock/OCMock/OCMPassByRefSetter.m2
-rw-r--r--third_party/ocmock/OCMock/OCMRealObjectForwarder.h14
-rw-r--r--third_party/ocmock/OCMock/OCMRealObjectForwarder.m29
-rw-r--r--third_party/ocmock/OCMock/OCMock.xcodeproj/project.pbxproj535
-rw-r--r--third_party/ocmock/OCMock/OCMockObject.h4
-rw-r--r--third_party/ocmock/OCMock/OCMockObject.m31
-rw-r--r--third_party/ocmock/OCMock/OCMockObjectHamcrestTests.h2
-rw-r--r--third_party/ocmock/OCMock/OCMockObjectTests.m114
-rw-r--r--third_party/ocmock/OCMock/OCMockRecorder.h8
-rw-r--r--third_party/ocmock/OCMock/OCMockRecorder.m23
-rw-r--r--third_party/ocmock/OCMock/OCMockRecorderTests.m6
-rw-r--r--third_party/ocmock/OCMock/OCObserverMockObject.h4
-rw-r--r--third_party/ocmock/OCMock/OCObserverMockObject.m2
-rw-r--r--third_party/ocmock/OCMock/OCObserverMockObjectTest.h2
-rw-r--r--third_party/ocmock/OCMock/OCObserverMockObjectTest.m2
-rw-r--r--third_party/ocmock/OCMock/OCPartialMockObject.h7
-rw-r--r--third_party/ocmock/OCMock/OCPartialMockObject.m30
-rw-r--r--third_party/ocmock/OCMock/OCPartialMockRecorder.h2
-rw-r--r--third_party/ocmock/OCMock/OCPartialMockRecorder.m12
-rw-r--r--third_party/ocmock/README.chromium3
-rw-r--r--third_party/ocmock/ocmock.gyp6
40 files changed, 993 insertions, 90 deletions
diff --git a/third_party/ocmock/OCMock/Changes.txt b/third_party/ocmock/OCMock/Changes.txt
index 6654223..c260412 100644
--- a/third_party/ocmock/OCMock/Changes.txt
+++ b/third_party/ocmock/OCMock/Changes.txt
@@ -1,5 +1,53 @@
Chronological listing of changes. If a particular SVN revision has no entry, that
check-in did not involve any code or feature changes.
+
+2011-02-15 (r74)
+
+* Added feature to explicitly disable a partial mock
+
+
+2011-01-28 (r71)
+
+* Updated example to work with iOS 4.2.
+
+
+2010-08-21 (r69)
+
+* Added feature to explicitly reject methods on nice mocks (thanks to Heath Borders)
+
+
+2010-08-20 (r68)
+
+* Added feature to forward method to real object from partial mock (thanks to Marco Sandrini)
+
+
+2010-08-02 (r67)
+
+* Fix to allow block arguments (thanks to Justin DeWind)
+
+
+2010-07-28 (r62-r65)
+
+* Now building OCMock library for simulator (i386) and device (armv7)
+* Updated example to run tests on device
+* Changed OCMOCK_VALUE macro to be iOS compatible (thanks to Derek Clarkson)
+
+
+2010-07-21 (r61)
+
+* Added a new target to build a static library for iOS use
+* Created an example showing how to use OCMock in an iOS project
+
+
+2010-05-19 (r57)
+
+* Various small clean-ups; no change in functionality (thanks to Jonah Williams)
+
+
+2010-04-18 (r56)
+
+* Added block constraints and invocation handler (thanks to Justin DeWind)
+
2009-10-16 (r55)
diff --git a/third_party/ocmock/OCMock/License.txt b/third_party/ocmock/OCMock/License.txt
index e2c1396..2caf9d0 100644
--- a/third_party/ocmock/OCMock/License.txt
+++ b/third_party/ocmock/OCMock/License.txt
@@ -1,5 +1,5 @@
- Copyright (c) 2004-2009 by Mulle Kybernetik. All rights reserved.
+ Copyright (c) 2004-2011 by Mulle Kybernetik. All rights reserved.
Permission to use, copy, modify and distribute this software and its documentation
is hereby granted, provided that both the copyright notice and this permission
diff --git a/third_party/ocmock/OCMock/NSInvocation+OCMAdditions.m b/third_party/ocmock/OCMock/NSInvocation+OCMAdditions.m
index 7d0b68c..df99912 100644
--- a/third_party/ocmock/OCMock/NSInvocation+OCMAdditions.m
+++ b/third_party/ocmock/OCMock/NSInvocation+OCMAdditions.m
@@ -1,5 +1,5 @@
//---------------------------------------------------------------------------------------
-// $Id: NSInvocation+OCMAdditions.m 55 2009-10-16 06:42:18Z erik $
+// $Id: NSInvocation+OCMAdditions.m 67 2010-08-02 03:25:16Z erik $
// Copyright (c) 2006-2009 by Mulle Kybernetik. See License file for details.
//---------------------------------------------------------------------------------------
@@ -16,7 +16,7 @@
while(strchr("rnNoORV", argType[0]) != NULL)
argType += 1;
- if((strlen(argType) > 1) && (strchr("{^", argType[0]) == NULL))
+ if((strlen(argType) > 1) && (strchr("{^", argType[0]) == NULL) && (strcmp("@?", argType) != 0))
[NSException raise:NSInvalidArgumentException format:@"Cannot handle argument type '%s'.", argType];
switch (argType[0])
diff --git a/third_party/ocmock/OCMock/NSMethodSignature+OCMAdditions.h b/third_party/ocmock/OCMock/NSMethodSignature+OCMAdditions.h
index 23741e3..0357f6f 100644
--- a/third_party/ocmock/OCMock/NSMethodSignature+OCMAdditions.h
+++ b/third_party/ocmock/OCMock/NSMethodSignature+OCMAdditions.h
@@ -1,5 +1,5 @@
//---------------------------------------------------------------------------------------
-// $Id$
+// $Id: NSMethodSignature+OCMAdditions.h 57 2010-07-19 06:14:27Z erik $
// Copyright (c) 2009 by Mulle Kybernetik. See License file for details.
//---------------------------------------------------------------------------------------
diff --git a/third_party/ocmock/OCMock/NSMethodSignature+OCMAdditions.m b/third_party/ocmock/OCMock/NSMethodSignature+OCMAdditions.m
index a69bb14..fc40301 100644
--- a/third_party/ocmock/OCMock/NSMethodSignature+OCMAdditions.m
+++ b/third_party/ocmock/OCMock/NSMethodSignature+OCMAdditions.m
@@ -1,5 +1,5 @@
//---------------------------------------------------------------------------------------
-// $Id$
+// $Id: NSMethodSignature+OCMAdditions.m 57 2010-07-19 06:14:27Z erik $
// Copyright (c) 2009 by Mulle Kybernetik. See License file for details.
//---------------------------------------------------------------------------------------
diff --git a/third_party/ocmock/OCMock/NSNotificationCenter+OCMAdditions.h b/third_party/ocmock/OCMock/NSNotificationCenter+OCMAdditions.h
index ae2e37d..7d5d6d1 100644
--- a/third_party/ocmock/OCMock/NSNotificationCenter+OCMAdditions.h
+++ b/third_party/ocmock/OCMock/NSNotificationCenter+OCMAdditions.h
@@ -1,5 +1,5 @@
//---------------------------------------------------------------------------------------
-// $Id: NSNotificationCenter+OCMAdditions.h$
+// $Id: NSNotificationCenter+OCMAdditions.h 57 2010-07-19 06:14:27Z erik $
// Copyright (c) 2009 by Mulle Kybernetik. See License file for details.
//---------------------------------------------------------------------------------------
diff --git a/third_party/ocmock/OCMock/NSNotificationCenter+OCMAdditions.m b/third_party/ocmock/OCMock/NSNotificationCenter+OCMAdditions.m
index 68bc0be..117deb0 100644
--- a/third_party/ocmock/OCMock/NSNotificationCenter+OCMAdditions.m
+++ b/third_party/ocmock/OCMock/NSNotificationCenter+OCMAdditions.m
@@ -1,9 +1,10 @@
//---------------------------------------------------------------------------------------
-// $Id: NSNotificationCenter+OCMAdditions.m$
+// $Id: NSNotificationCenter+OCMAdditions.m 57 2010-07-19 06:14:27Z erik $
// Copyright (c) 2009 by Mulle Kybernetik. See License file for details.
//---------------------------------------------------------------------------------------
#import "NSNotificationCenter+OCMAdditions.h"
+#import "OCObserverMockObject.h"
@implementation NSNotificationCenter(OCMAdditions)
diff --git a/third_party/ocmock/OCMock/OCMArg.h b/third_party/ocmock/OCMock/OCMArg.h
index b327512..94ede8f 100644
--- a/third_party/ocmock/OCMock/OCMArg.h
+++ b/third_party/ocmock/OCMock/OCMArg.h
@@ -1,6 +1,6 @@
//---------------------------------------------------------------------------------------
-// $Id: $
-// Copyright (c) 2009 by Mulle Kybernetik. See License file for details.
+// $Id: OCMArg.h 65 2010-07-28 01:49:42Z erik $
+// Copyright (c) 2009-2010 by Mulle Kybernetik. See License file for details.
//---------------------------------------------------------------------------------------
#import <Foundation/Foundation.h>
@@ -15,6 +15,9 @@
+ (id)isNotNil;
+ (id)isNotEqual:(id)value;
+ (id)checkWithSelector:(SEL)selector onObject:(id)anObject;
+#if NS_BLOCKS_AVAILABLE
++ (id)checkWithBlock:(BOOL (^)(id))block;
+#endif
// manipulating arguments
@@ -27,4 +30,4 @@
@end
#define OCMOCK_ANY [OCMArg any]
-#define OCMOCK_VALUE(variable) [NSValue value:&variable withObjCType:@encode(typeof(variable))]
+#define OCMOCK_VALUE(variable) [NSValue value:&variable withObjCType:@encode(__typeof__(variable))]
diff --git a/third_party/ocmock/OCMock/OCMArg.m b/third_party/ocmock/OCMock/OCMArg.m
index f8778bf..66b526b 100644
--- a/third_party/ocmock/OCMock/OCMArg.m
+++ b/third_party/ocmock/OCMock/OCMArg.m
@@ -1,11 +1,12 @@
//---------------------------------------------------------------------------------------
-// $Id: $
-// Copyright (c) 2009 by Mulle Kybernetik. See License file for details.
+// $Id: OCMArg.m 77 2011-03-17 21:33:59Z erik $
+// Copyright (c) 2009-2010 by Mulle Kybernetik. See License file for details.
//---------------------------------------------------------------------------------------
#import <OCMock/OCMArg.h>
#import <OCMock/OCMConstraint.h>
#import "OCMPassByRefSetter.h"
+#import "OCMConstraint.h"
@implementation OCMArg
@@ -41,9 +42,18 @@
return [OCMConstraint constraintWithSelector:selector onObject:anObject];
}
-+ (id *)setTo:(id)value;
+#if NS_BLOCKS_AVAILABLE
+
++ (id)checkWithBlock:(BOOL (^)(id))block
+{
+ return [[[OCMBlockConstraint alloc] initWithConstraintBlock:block] autorelease];
+}
+
+#endif
+
++ (id *)setTo:(id)value
{
- return (id *)[[OCMPassByRefSetter alloc] initWithValue:value];
+ return (id *)[[[OCMPassByRefSetter alloc] initWithValue:value] autorelease];
}
+ (id)resolveSpecialValues:(NSValue *)value
diff --git a/third_party/ocmock/OCMock/OCMBlockCaller.h b/third_party/ocmock/OCMock/OCMBlockCaller.h
new file mode 100644
index 0000000..44feb15
--- /dev/null
+++ b/third_party/ocmock/OCMock/OCMBlockCaller.h
@@ -0,0 +1,21 @@
+//---------------------------------------------------------------------------------------
+// $Id: OCMBlockCaller.h 68 2010-08-20 13:20:52Z erik $
+// Copyright (c) 2010 by Mulle Kybernetik. See License file for details.
+//---------------------------------------------------------------------------------------
+
+#import <Foundation/Foundation.h>
+
+#if NS_BLOCKS_AVAILABLE
+
+@interface OCMBlockCaller : NSObject
+{
+ void (^block)(NSInvocation *);
+}
+
+- (id)initWithCallBlock:(void (^)(NSInvocation *))theBlock;
+
+- (void)handleInvocation:(NSInvocation *)anInvocation;
+
+@end
+
+#endif
diff --git a/third_party/ocmock/OCMock/OCMBlockCaller.m b/third_party/ocmock/OCMock/OCMBlockCaller.m
new file mode 100644
index 0000000..97fd866
--- /dev/null
+++ b/third_party/ocmock/OCMock/OCMBlockCaller.m
@@ -0,0 +1,32 @@
+//---------------------------------------------------------------------------------------
+// $Id: OCMBlockCaller.m 57 2010-07-19 06:14:27Z erik $
+// Copyright (c) 2010 by Mulle Kybernetik. See License file for details.
+//---------------------------------------------------------------------------------------
+
+#import "OCMBlockCaller.h"
+
+#if NS_BLOCKS_AVAILABLE
+
+@implementation OCMBlockCaller
+
+-(id)initWithCallBlock:(void (^)(NSInvocation *))theBlock
+{
+ [super init];
+ block = [theBlock copy];
+ return self;
+}
+
+-(void)dealloc
+{
+ [block release];
+ [super dealloc];
+}
+
+- (void)handleInvocation:(NSInvocation *)anInvocation
+{
+ block(anInvocation);
+}
+
+@end
+
+#endif
diff --git a/third_party/ocmock/OCMock/OCMConstraint.h b/third_party/ocmock/OCMock/OCMConstraint.h
index 8381dab..72b23e8 100644
--- a/third_party/ocmock/OCMock/OCMConstraint.h
+++ b/third_party/ocmock/OCMock/OCMConstraint.h
@@ -1,10 +1,11 @@
//---------------------------------------------------------------------------------------
-// $Id: $
-// Copyright (c) 2007-2009 by Mulle Kybernetik. See License file for details.
+// $Id: OCMConstraint.h 57 2010-07-19 06:14:27Z erik $
+// Copyright (c) 2007-2010 by Mulle Kybernetik. See License file for details.
//---------------------------------------------------------------------------------------
#import <Foundation/Foundation.h>
+
@interface OCMConstraint : NSObject
+ (id)constraint;
@@ -12,10 +13,11 @@
// if you are looking for any, isNil, etc, they have moved to OCMArg
+// try to use [OCMArg checkWith...] instead of the constraintWith... methods below
+
+ (id)constraintWithSelector:(SEL)aSelector onObject:(id)anObject;
+ (id)constraintWithSelector:(SEL)aSelector onObject:(id)anObject withValue:(id)aValue;
-// try to use [OCMArg checkWith...] instead of constraintWithSelector in here
@end
@@ -44,5 +46,19 @@
@end
+#if NS_BLOCKS_AVAILABLE
+
+@interface OCMBlockConstraint : OCMConstraint
+{
+ BOOL (^block)(id);
+}
+
+- (id)initWithConstraintBlock:(BOOL (^)(id))block;
+
+@end
+
+#endif
+
+
#define CONSTRAINT(aSelector) [OCMConstraint constraintWithSelector:aSelector onObject:self]
#define CONSTRAINTV(aSelector, aValue) [OCMConstraint constraintWithSelector:aSelector onObject:self withValue:(aValue)]
diff --git a/third_party/ocmock/OCMock/OCMConstraint.m b/third_party/ocmock/OCMock/OCMConstraint.m
index d04c9ce..6202747 100644
--- a/third_party/ocmock/OCMock/OCMConstraint.m
+++ b/third_party/ocmock/OCMock/OCMConstraint.m
@@ -1,6 +1,6 @@
//---------------------------------------------------------------------------------------
-// $Id: $
-// Copyright (c) 2007-2008 by Mulle Kybernetik. See License file for details.
+// $Id: OCMConstraint.m 57 2010-07-19 06:14:27Z erik $
+// Copyright (c) 2007-2010 by Mulle Kybernetik. See License file for details.
//---------------------------------------------------------------------------------------
#import <OCMock/OCMConstraint.h>
@@ -41,6 +41,7 @@
return constraint;
}
+
@end
@@ -90,7 +91,7 @@
- (BOOL)evaluate:(id)value
{
- return ![value isEqualTo:testValue];
+ return ![value isEqual:testValue];
}
@end
@@ -112,3 +113,24 @@
@end
+#pragma mark -
+
+#if NS_BLOCKS_AVAILABLE
+
+@implementation OCMBlockConstraint
+
+- (id)initWithConstraintBlock:(BOOL (^)(id))aBlock;
+{
+ [super init];
+ block = aBlock;
+ return self;
+}
+
+- (BOOL)evaluate:(id)value
+{
+ return block(value);
+}
+
+@end
+
+#endif
diff --git a/third_party/ocmock/OCMock/OCMConstraintTests.h b/third_party/ocmock/OCMock/OCMConstraintTests.h
index ce5822f..309ab85 100644
--- a/third_party/ocmock/OCMock/OCMConstraintTests.h
+++ b/third_party/ocmock/OCMock/OCMConstraintTests.h
@@ -1,5 +1,5 @@
//---------------------------------------------------------------------------------------
-// $Id: OCMockRecorderTests.h 2 2004-08-24 17:00:05Z erik $
+// $Id: OCMConstraintTests.h 57 2010-07-19 06:14:27Z erik $
// Copyright (c) 2004-2008 by Mulle Kybernetik. See License file for details.
//---------------------------------------------------------------------------------------
diff --git a/third_party/ocmock/OCMock/OCMConstraintTests.m b/third_party/ocmock/OCMock/OCMConstraintTests.m
index b3a04e8..0d5042a 100644
--- a/third_party/ocmock/OCMock/OCMConstraintTests.m
+++ b/third_party/ocmock/OCMock/OCMConstraintTests.m
@@ -1,6 +1,6 @@
//---------------------------------------------------------------------------------------
-// $Id: OCMockRecorderTests.m 12 2006-06-11 02:41:31Z erik $
-// Copyright (c) 2004-2008 by Mulle Kybernetik. See License file for details.
+// $Id: OCMConstraintTests.m 57 2010-07-19 06:14:27Z erik $
+// Copyright (c) 2004-2010 by Mulle Kybernetik. See License file for details.
//---------------------------------------------------------------------------------------
#import "OCMConstraintTests.h"
@@ -69,7 +69,7 @@
- (BOOL)checkArg:(id)theArg withValue:(id)value
{
didCallCustomConstraint = YES;
- return [theArg isEqualTo:value];
+ return [theArg isEqual:value];
}
- (void)testUsesMethodWithValue
@@ -94,4 +94,38 @@
}
+#if NS_BLOCKS_AVAILABLE
+
+-(void)testUsesBlock
+{
+ BOOL (^checkForFooBlock)(id) = ^(id value)
+ {
+ return [value isEqualToString:@"foo"];
+ };
+
+ OCMBlockConstraint *constraint = [[[OCMBlockConstraint alloc] initWithConstraintBlock:checkForFooBlock] autorelease];
+
+ STAssertTrue([constraint evaluate:@"foo"], @"Should have accepted foo.");
+ STAssertFalse([constraint evaluate:@"bar"], @"Should not have accepted bar.");
+}
+
+-(void)testBlockConstraintCanCaptureArgument
+{
+ __block NSString *captured;
+ BOOL (^captureArgBlock)(id) = ^(id value)
+ {
+ captured = value;
+ return YES;
+ };
+
+ OCMBlockConstraint *constraint = [[[OCMBlockConstraint alloc] initWithConstraintBlock:captureArgBlock] autorelease];
+
+ [constraint evaluate:@"foo"];
+ STAssertEqualObjects(@"foo", captured, @"Should have captured value from last invocation.");
+ [constraint evaluate:@"bar"];
+ STAssertEqualObjects(@"bar", captured, @"Should have captured value from last invocation.");
+}
+
+#endif
+
@end
diff --git a/third_party/ocmock/OCMock/OCMIndirectReturnValueProvider.h b/third_party/ocmock/OCMock/OCMIndirectReturnValueProvider.h
index 8fe8747..490eb47f 100644
--- a/third_party/ocmock/OCMock/OCMIndirectReturnValueProvider.h
+++ b/third_party/ocmock/OCMock/OCMIndirectReturnValueProvider.h
@@ -1,5 +1,5 @@
//---------------------------------------------------------------------------------------
-// $Id: OCMIndirectReturnValueProvider.h 54 2009-08-18 06:27:36Z erik $
+// $Id: OCMIndirectReturnValueProvider.h 68 2010-08-20 13:20:52Z erik $
// Copyright (c) 2009 by Mulle Kybernetik. See License file for details.
//---------------------------------------------------------------------------------------
@@ -13,4 +13,6 @@
- (id)initWithProvider:(id)aProvider andSelector:(SEL)aSelector;
+- (void)handleInvocation:(NSInvocation *)anInvocation;
+
@end
diff --git a/third_party/ocmock/OCMock/OCMObserverRecorder.h b/third_party/ocmock/OCMock/OCMObserverRecorder.h
index 556da3c..0e1cd02 100644
--- a/third_party/ocmock/OCMock/OCMObserverRecorder.h
+++ b/third_party/ocmock/OCMock/OCMObserverRecorder.h
@@ -1,5 +1,5 @@
//---------------------------------------------------------------------------------------
-// $Id$
+// $Id: OCMObserverRecorder.h 57 2010-07-19 06:14:27Z erik $
// Copyright (c) 2009 by Mulle Kybernetik. See License file for details.
//---------------------------------------------------------------------------------------
diff --git a/third_party/ocmock/OCMock/OCMObserverRecorder.m b/third_party/ocmock/OCMock/OCMObserverRecorder.m
index e50be50..57b9a79 100644
--- a/third_party/ocmock/OCMock/OCMObserverRecorder.m
+++ b/third_party/ocmock/OCMock/OCMObserverRecorder.m
@@ -1,5 +1,5 @@
//---------------------------------------------------------------------------------------
-// $Id$
+// $Id: OCMObserverRecorder.m 57 2010-07-19 06:14:27Z erik $
// Copyright (c) 2009 by Mulle Kybernetik. See License file for details.
//---------------------------------------------------------------------------------------
diff --git a/third_party/ocmock/OCMock/OCMPassByRefSetter.h b/third_party/ocmock/OCMock/OCMPassByRefSetter.h
index 3934c1a..476bfe3 100644
--- a/third_party/ocmock/OCMock/OCMPassByRefSetter.h
+++ b/third_party/ocmock/OCMock/OCMPassByRefSetter.h
@@ -1,5 +1,5 @@
//---------------------------------------------------------------------------------------
-// $Id: $
+// $Id: OCMPassByRefSetter.h 57 2010-07-19 06:14:27Z erik $
// Copyright (c) 2009 by Mulle Kybernetik. See License file for details.
//---------------------------------------------------------------------------------------
diff --git a/third_party/ocmock/OCMock/OCMPassByRefSetter.m b/third_party/ocmock/OCMock/OCMPassByRefSetter.m
index aae3cf3..17071f3 100644
--- a/third_party/ocmock/OCMock/OCMPassByRefSetter.m
+++ b/third_party/ocmock/OCMock/OCMPassByRefSetter.m
@@ -1,5 +1,5 @@
//---------------------------------------------------------------------------------------
-// $Id: $
+// $Id: OCMPassByRefSetter.m 57 2010-07-19 06:14:27Z erik $
// Copyright (c) 2009 by Mulle Kybernetik. See License file for details.
//---------------------------------------------------------------------------------------
diff --git a/third_party/ocmock/OCMock/OCMRealObjectForwarder.h b/third_party/ocmock/OCMock/OCMRealObjectForwarder.h
new file mode 100644
index 0000000..114c91d
--- /dev/null
+++ b/third_party/ocmock/OCMock/OCMRealObjectForwarder.h
@@ -0,0 +1,14 @@
+//---------------------------------------------------------------------------------------
+// $Id: OCMRealObjectForwarder.h 68 2010-08-20 13:20:52Z erik $
+// Copyright (c) 2010 by Mulle Kybernetik. See License file for details.
+//---------------------------------------------------------------------------------------
+
+#import <Foundation/Foundation.h>
+
+@interface OCMRealObjectForwarder : NSObject
+{
+}
+
+- (void)handleInvocation:(NSInvocation *)anInvocation;
+
+@end
diff --git a/third_party/ocmock/OCMock/OCMRealObjectForwarder.m b/third_party/ocmock/OCMock/OCMRealObjectForwarder.m
new file mode 100644
index 0000000..1db22d7
--- /dev/null
+++ b/third_party/ocmock/OCMock/OCMRealObjectForwarder.m
@@ -0,0 +1,29 @@
+//---------------------------------------------------------------------------------------
+// $Id: OCMRealObjectForwarder.m 70 2010-08-20 16:06:51Z erik $
+// Copyright (c) 2010 by Mulle Kybernetik. See License file for details.
+//---------------------------------------------------------------------------------------
+
+#import <objc/runtime.h>
+#import "OCPartialMockObject.h"
+#import "OCMRealObjectForwarder.h"
+
+
+@implementation OCMRealObjectForwarder
+
+- (void)handleInvocation:(NSInvocation *)anInvocation
+{
+ id invocationTarget = [anInvocation target];
+ SEL invocationSelector = [anInvocation selector];
+ SEL aliasedSelector = NSSelectorFromString([OCMRealMethodAliasPrefix stringByAppendingString:NSStringFromSelector(invocationSelector)]);
+
+ [anInvocation setSelector:aliasedSelector];
+ if([invocationTarget isProxy] && (class_getInstanceMethod([invocationTarget class], @selector(realObject))))
+ {
+ // the method has been invoked on the mock, we need to change the target to the real object
+ [anInvocation setTarget:[(OCPartialMockObject *)invocationTarget realObject]];
+ }
+ [anInvocation invoke];
+}
+
+
+@end
diff --git a/third_party/ocmock/OCMock/OCMock.xcodeproj/project.pbxproj b/third_party/ocmock/OCMock/OCMock.xcodeproj/project.pbxproj
index 3e28313..1d6806b 100644
--- a/third_party/ocmock/OCMock/OCMock.xcodeproj/project.pbxproj
+++ b/third_party/ocmock/OCMock/OCMock.xcodeproj/project.pbxproj
@@ -6,6 +6,22 @@
objectVersion = 44;
objects = {
+/* Begin PBXAggregateTarget section */
+ 03DAC03611FEB870007AF17B /* OCMockLib */ = {
+ isa = PBXAggregateTarget;
+ buildConfigurationList = 03DAC03E11FEB87D007AF17B /* Build configuration list for PBXAggregateTarget "OCMockLib" */;
+ buildPhases = (
+ 03DAC04011FEB897007AF17B /* ShellScript */,
+ );
+ dependencies = (
+ 03DAC03A11FEB87B007AF17B /* PBXTargetDependency */,
+ 03DAC03C11FEB87B007AF17B /* PBXTargetDependency */,
+ );
+ name = OCMockLib;
+ productName = OCMockLib;
+ };
+/* End PBXAggregateTarget section */
+
/* Begin PBXBuildFile section */
030106730A3B9B240049FED7 /* NSInvocationOCMAdditionsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 030106470A3B99F20049FED7 /* NSInvocationOCMAdditionsTests.m */; };
032797870E09F40E006CA665 /* OCHamcrest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 032797860E09F40E006CA665 /* OCHamcrest.framework */; };
@@ -14,6 +30,14 @@
0338A99907BE7C100066DE8A /* OCClassMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 0338A99707BE7C100066DE8A /* OCClassMockObject.m */; };
0338A9F007BE83B50066DE8A /* OCProtocolMockObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 0338A9EE07BE83B50066DE8A /* OCProtocolMockObject.h */; settings = {ATTRIBUTES = (); }; };
0338A9F107BE83B50066DE8A /* OCProtocolMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 0338A9EF07BE83B50066DE8A /* OCProtocolMockObject.m */; };
+ 033C857411F58C110009B9CD /* NSNotificationCenter+OCMAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 03D880D40F8DA4750087D071 /* NSNotificationCenter+OCMAdditions.m */; };
+ 033C857511F58C130009B9CD /* NSNotificationCenter+OCMAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 03D880D30F8DA4750087D071 /* NSNotificationCenter+OCMAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 0340A5BB121E973000158484 /* OCMRealObjectForwarder.h in Headers */ = {isa = PBXBuildFile; fileRef = 0340A5B9121E973000158484 /* OCMRealObjectForwarder.h */; };
+ 0340A5BC121E973000158484 /* OCMRealObjectForwarder.m in Sources */ = {isa = PBXBuildFile; fileRef = 0340A5BA121E973000158484 /* OCMRealObjectForwarder.m */; };
+ 0340A5BD121E973000158484 /* OCMRealObjectForwarder.h in Headers */ = {isa = PBXBuildFile; fileRef = 0340A5B9121E973000158484 /* OCMRealObjectForwarder.h */; };
+ 0340A5BE121E973000158484 /* OCMRealObjectForwarder.m in Sources */ = {isa = PBXBuildFile; fileRef = 0340A5BA121E973000158484 /* OCMRealObjectForwarder.m */; };
+ 0340A5BF121E973000158484 /* OCMRealObjectForwarder.h in Headers */ = {isa = PBXBuildFile; fileRef = 0340A5B9121E973000158484 /* OCMRealObjectForwarder.h */; };
+ 0340A5C0121E973000158484 /* OCMRealObjectForwarder.m in Sources */ = {isa = PBXBuildFile; fileRef = 0340A5BA121E973000158484 /* OCMRealObjectForwarder.m */; };
0343133E0CCA771800A2E080 /* OCMConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 0343133B0CCA771800A2E080 /* OCMConstraint.h */; settings = {ATTRIBUTES = (Public, ); }; };
0343133F0CCA771800A2E080 /* OCMConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = 0343133C0CCA771800A2E080 /* OCMConstraint.m */; };
034313EA0CCA7BC700A2E080 /* OCMConstraintTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 034313E90CCA7BC700A2E080 /* OCMConstraintTests.m */; };
@@ -39,6 +63,8 @@
03C3672F100D6D0F00BE9731 /* OCMIndirectReturnValueProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 03C3672D100D6D0F00BE9731 /* OCMIndirectReturnValueProvider.m */; };
03C36775100D744700BE9731 /* OCMNotificationPoster.h in Headers */ = {isa = PBXBuildFile; fileRef = 03C36773100D744700BE9731 /* OCMNotificationPoster.h */; };
03C36776100D744700BE9731 /* OCMNotificationPoster.m in Sources */ = {isa = PBXBuildFile; fileRef = 03C36774100D744700BE9731 /* OCMNotificationPoster.m */; };
+ 03CFB08C117B308C00935C1E /* OCMBlockCaller.h in Headers */ = {isa = PBXBuildFile; fileRef = 03CFB089117B308C00935C1E /* OCMBlockCaller.h */; };
+ 03CFB08D117B308C00935C1E /* OCMBlockCaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 03CFB08A117B308C00935C1E /* OCMBlockCaller.m */; };
03D880550F8C75980087D071 /* OCObserverMockObjectTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 03D880540F8C75980087D071 /* OCObserverMockObjectTest.m */; };
03D880610F8C81DE0087D071 /* OCObserverMockObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 03D8805E0F8C81DE0087D071 /* OCObserverMockObject.h */; };
03D880620F8C81DE0087D071 /* OCObserverMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 03D8805F0F8C81DE0087D071 /* OCObserverMockObject.m */; };
@@ -48,6 +74,47 @@
03D8815B0F8DB37B0087D071 /* OCMObserverRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 03D8815A0F8DB37B0087D071 /* OCMObserverRecorder.m */; };
03D8822F0FA151E20087D071 /* OCPartialMockObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 03D8822D0FA151E10087D071 /* OCPartialMockObject.h */; };
03D882300FA151E20087D071 /* OCPartialMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 03D8822E0FA151E20087D071 /* OCPartialMockObject.m */; };
+ 03DABFF111FEB771007AF17B /* NSNotificationCenter+OCMAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 03D880D30F8DA4750087D071 /* NSNotificationCenter+OCMAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 03DABFF211FEB771007AF17B /* NSMethodSignature+OCMAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 03F1FE8710353A5F00E4962C /* NSMethodSignature+OCMAdditions.h */; };
+ 03DABFF311FEB771007AF17B /* NSInvocation+OCMAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 03A2D0C909F01D13008A1AFD /* NSInvocation+OCMAdditions.h */; };
+ 03DABFF411FEB771007AF17B /* OCMPassByRefSetter.h in Headers */ = {isa = PBXBuildFile; fileRef = 037860E00F6A3D4600A4D9A0 /* OCMPassByRefSetter.h */; };
+ 03DABFF511FEB771007AF17B /* OCMConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 0343133B0CCA771800A2E080 /* OCMConstraint.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 03DABFF611FEB771007AF17B /* OCMArg.h in Headers */ = {isa = PBXBuildFile; fileRef = 0378606B0F6A32F800A4D9A0 /* OCMArg.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 03DABFF711FEB771007AF17B /* OCMObserverRecorder.h in Headers */ = {isa = PBXBuildFile; fileRef = 03D881070F8DB0BB0087D071 /* OCMObserverRecorder.h */; };
+ 03DABFF811FEB771007AF17B /* OCObserverMockObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 03D8805E0F8C81DE0087D071 /* OCObserverMockObject.h */; };
+ 03DABFF911FEB771007AF17B /* OCPartialMockRecorder.h in Headers */ = {isa = PBXBuildFile; fileRef = 037C13420FCC474D00257C8C /* OCPartialMockRecorder.h */; };
+ 03DABFFA11FEB771007AF17B /* OCPartialMockObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 03D8822D0FA151E10087D071 /* OCPartialMockObject.h */; };
+ 03DABFFB11FEB771007AF17B /* OCMockRecorder.h in Headers */ = {isa = PBXBuildFile; fileRef = 03DE1F5606DB911300E5A2A8 /* OCMockRecorder.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 03DABFFC11FEB771007AF17B /* OCProtocolMockObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 0338A9EE07BE83B50066DE8A /* OCProtocolMockObject.h */; };
+ 03DABFFD11FEB771007AF17B /* OCClassMockObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 0338A99607BE7C100066DE8A /* OCClassMockObject.h */; };
+ 03DABFFE11FEB771007AF17B /* OCMockObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 03DE1F5406DB911300E5A2A8 /* OCMockObject.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 03DABFFF11FEB771007AF17B /* OCMock.h in Headers */ = {isa = PBXBuildFile; fileRef = 03DE21B206DB95C500E5A2A8 /* OCMock.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 03DAC00011FEB771007AF17B /* OCMBlockCaller.h in Headers */ = {isa = PBXBuildFile; fileRef = 03CFB089117B308C00935C1E /* OCMBlockCaller.h */; };
+ 03DAC00111FEB771007AF17B /* OCMNotificationPoster.h in Headers */ = {isa = PBXBuildFile; fileRef = 03C36773100D744700BE9731 /* OCMNotificationPoster.h */; };
+ 03DAC00211FEB771007AF17B /* OCMIndirectReturnValueProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 03C3672C100D6D0F00BE9731 /* OCMIndirectReturnValueProvider.h */; };
+ 03DAC00311FEB771007AF17B /* OCMExceptionReturnValueProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 03C36727100D6C7D00BE9731 /* OCMExceptionReturnValueProvider.h */; };
+ 03DAC00411FEB771007AF17B /* OCMBoxedReturnValueProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 03C36722100D6B9600BE9731 /* OCMBoxedReturnValueProvider.h */; };
+ 03DAC00511FEB771007AF17B /* OCMReturnValueProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 03C36701100D69EB00BE9731 /* OCMReturnValueProvider.h */; };
+ 03DAC00711FEB771007AF17B /* NSNotificationCenter+OCMAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 03D880D40F8DA4750087D071 /* NSNotificationCenter+OCMAdditions.m */; };
+ 03DAC00811FEB771007AF17B /* NSMethodSignature+OCMAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 03F1FE8810353A5F00E4962C /* NSMethodSignature+OCMAdditions.m */; };
+ 03DAC00911FEB771007AF17B /* NSInvocation+OCMAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 03A2D0CA09F01D13008A1AFD /* NSInvocation+OCMAdditions.m */; };
+ 03DAC00A11FEB771007AF17B /* OCMPassByRefSetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 037860E10F6A3D4600A4D9A0 /* OCMPassByRefSetter.m */; };
+ 03DAC00B11FEB771007AF17B /* OCMConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = 0343133C0CCA771800A2E080 /* OCMConstraint.m */; };
+ 03DAC00C11FEB771007AF17B /* OCMArg.m in Sources */ = {isa = PBXBuildFile; fileRef = 0378606C0F6A32F800A4D9A0 /* OCMArg.m */; };
+ 03DAC00D11FEB771007AF17B /* OCMObserverRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 03D8815A0F8DB37B0087D071 /* OCMObserverRecorder.m */; };
+ 03DAC00E11FEB771007AF17B /* OCObserverMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 03D8805F0F8C81DE0087D071 /* OCObserverMockObject.m */; };
+ 03DAC00F11FEB771007AF17B /* OCPartialMockRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 037C13430FCC474D00257C8C /* OCPartialMockRecorder.m */; };
+ 03DAC01011FEB771007AF17B /* OCPartialMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 03D8822E0FA151E20087D071 /* OCPartialMockObject.m */; };
+ 03DAC01111FEB771007AF17B /* OCMockRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 03DE1F5706DB911300E5A2A8 /* OCMockRecorder.m */; };
+ 03DAC01211FEB771007AF17B /* OCProtocolMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 0338A9EF07BE83B50066DE8A /* OCProtocolMockObject.m */; };
+ 03DAC01311FEB771007AF17B /* OCClassMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 0338A99707BE7C100066DE8A /* OCClassMockObject.m */; };
+ 03DAC01411FEB771007AF17B /* OCMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 03DE1F5506DB911300E5A2A8 /* OCMockObject.m */; };
+ 03DAC01511FEB771007AF17B /* OCMBlockCaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 03CFB08A117B308C00935C1E /* OCMBlockCaller.m */; };
+ 03DAC01611FEB771007AF17B /* OCMNotificationPoster.m in Sources */ = {isa = PBXBuildFile; fileRef = 03C36774100D744700BE9731 /* OCMNotificationPoster.m */; };
+ 03DAC01711FEB771007AF17B /* OCMIndirectReturnValueProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 03C3672D100D6D0F00BE9731 /* OCMIndirectReturnValueProvider.m */; };
+ 03DAC01811FEB771007AF17B /* OCMExceptionReturnValueProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 03C36728100D6C7D00BE9731 /* OCMExceptionReturnValueProvider.m */; };
+ 03DAC01911FEB771007AF17B /* OCMBoxedReturnValueProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 03C36723100D6B9600BE9731 /* OCMBoxedReturnValueProvider.m */; };
+ 03DAC01A11FEB771007AF17B /* OCMReturnValueProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 03C36702100D69EB00BE9731 /* OCMReturnValueProvider.m */; };
03DE1F5806DB911300E5A2A8 /* OCMockObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 03DE1F5406DB911300E5A2A8 /* OCMockObject.h */; settings = {ATTRIBUTES = (Public, ); }; };
03DE1F5906DB911300E5A2A8 /* OCMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 03DE1F5506DB911300E5A2A8 /* OCMockObject.m */; };
03DE1F5A06DB911300E5A2A8 /* OCMockRecorder.h in Headers */ = {isa = PBXBuildFile; fileRef = 03DE1F5606DB911300E5A2A8 /* OCMockRecorder.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -55,6 +122,45 @@
03DE219006DB91CF00E5A2A8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 03DE218F06DB91CF00E5A2A8 /* Foundation.framework */; };
03DE21B306DB95C500E5A2A8 /* OCMock.h in Headers */ = {isa = PBXBuildFile; fileRef = 03DE21B206DB95C500E5A2A8 /* OCMock.h */; settings = {ATTRIBUTES = (Public, ); }; };
03DE221706DB97DA00E5A2A8 /* License.txt in Resources */ = {isa = PBXBuildFile; fileRef = 03DE221606DB97DA00E5A2A8 /* License.txt */; };
+ 03E41D9611F5A83D00147791 /* NSMethodSignature+OCMAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 03F1FE8810353A5F00E4962C /* NSMethodSignature+OCMAdditions.m */; };
+ 03E41D9711F5A83E00147791 /* NSMethodSignature+OCMAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 03F1FE8710353A5F00E4962C /* NSMethodSignature+OCMAdditions.h */; };
+ 03E41D9811F5A83E00147791 /* NSInvocation+OCMAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 03A2D0CA09F01D13008A1AFD /* NSInvocation+OCMAdditions.m */; };
+ 03E41D9911F5A83F00147791 /* NSInvocation+OCMAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 03A2D0C909F01D13008A1AFD /* NSInvocation+OCMAdditions.h */; };
+ 03E41D9A11F5A84000147791 /* OCMPassByRefSetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 037860E10F6A3D4600A4D9A0 /* OCMPassByRefSetter.m */; };
+ 03E41D9B11F5A84100147791 /* OCMPassByRefSetter.h in Headers */ = {isa = PBXBuildFile; fileRef = 037860E00F6A3D4600A4D9A0 /* OCMPassByRefSetter.h */; };
+ 03E41D9C11F5A84200147791 /* OCMConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = 0343133C0CCA771800A2E080 /* OCMConstraint.m */; };
+ 03E41D9D11F5A84200147791 /* OCMConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 0343133B0CCA771800A2E080 /* OCMConstraint.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 03E41D9E11F5A84300147791 /* OCMArg.m in Sources */ = {isa = PBXBuildFile; fileRef = 0378606C0F6A32F800A4D9A0 /* OCMArg.m */; };
+ 03E41D9F11F5A84400147791 /* OCMArg.h in Headers */ = {isa = PBXBuildFile; fileRef = 0378606B0F6A32F800A4D9A0 /* OCMArg.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 03E41DA011F5A84500147791 /* OCMObserverRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 03D8815A0F8DB37B0087D071 /* OCMObserverRecorder.m */; };
+ 03E41DA111F5A84600147791 /* OCMObserverRecorder.h in Headers */ = {isa = PBXBuildFile; fileRef = 03D881070F8DB0BB0087D071 /* OCMObserverRecorder.h */; };
+ 03E41DA211F5A84700147791 /* OCObserverMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 03D8805F0F8C81DE0087D071 /* OCObserverMockObject.m */; };
+ 03E41DA311F5A84800147791 /* OCObserverMockObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 03D8805E0F8C81DE0087D071 /* OCObserverMockObject.h */; };
+ 03E41DA411F5A84F00147791 /* OCPartialMockRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 037C13430FCC474D00257C8C /* OCPartialMockRecorder.m */; };
+ 03E41DA511F5A85000147791 /* OCPartialMockRecorder.h in Headers */ = {isa = PBXBuildFile; fileRef = 037C13420FCC474D00257C8C /* OCPartialMockRecorder.h */; };
+ 03E41DA611F5A85100147791 /* OCPartialMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 03D8822E0FA151E20087D071 /* OCPartialMockObject.m */; };
+ 03E41DA711F5A85200147791 /* OCPartialMockObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 03D8822D0FA151E10087D071 /* OCPartialMockObject.h */; };
+ 03E41DA811F5A85600147791 /* OCMockRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 03DE1F5706DB911300E5A2A8 /* OCMockRecorder.m */; };
+ 03E41DA911F5A85600147791 /* OCMockRecorder.h in Headers */ = {isa = PBXBuildFile; fileRef = 03DE1F5606DB911300E5A2A8 /* OCMockRecorder.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 03E41DAA11F5A85800147791 /* OCProtocolMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 0338A9EF07BE83B50066DE8A /* OCProtocolMockObject.m */; };
+ 03E41DAB11F5A85800147791 /* OCProtocolMockObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 0338A9EE07BE83B50066DE8A /* OCProtocolMockObject.h */; };
+ 03E41DAC11F5A85900147791 /* OCClassMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 0338A99707BE7C100066DE8A /* OCClassMockObject.m */; };
+ 03E41DAD11F5A85900147791 /* OCClassMockObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 0338A99607BE7C100066DE8A /* OCClassMockObject.h */; };
+ 03E41DAE11F5A85A00147791 /* OCMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 03DE1F5506DB911300E5A2A8 /* OCMockObject.m */; };
+ 03E41DAF11F5A85B00147791 /* OCMockObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 03DE1F5406DB911300E5A2A8 /* OCMockObject.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 03E41DB011F5A85E00147791 /* OCMock.h in Headers */ = {isa = PBXBuildFile; fileRef = 03DE21B206DB95C500E5A2A8 /* OCMock.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 03E41DB111F5A86300147791 /* OCMBlockCaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 03CFB08A117B308C00935C1E /* OCMBlockCaller.m */; };
+ 03E41DB211F5A86300147791 /* OCMBlockCaller.h in Headers */ = {isa = PBXBuildFile; fileRef = 03CFB089117B308C00935C1E /* OCMBlockCaller.h */; };
+ 03E41DB311F5A86400147791 /* OCMNotificationPoster.m in Sources */ = {isa = PBXBuildFile; fileRef = 03C36774100D744700BE9731 /* OCMNotificationPoster.m */; };
+ 03E41DB411F5A86400147791 /* OCMNotificationPoster.h in Headers */ = {isa = PBXBuildFile; fileRef = 03C36773100D744700BE9731 /* OCMNotificationPoster.h */; };
+ 03E41DB511F5A86500147791 /* OCMIndirectReturnValueProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 03C3672D100D6D0F00BE9731 /* OCMIndirectReturnValueProvider.m */; };
+ 03E41DB611F5A86600147791 /* OCMIndirectReturnValueProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 03C3672C100D6D0F00BE9731 /* OCMIndirectReturnValueProvider.h */; };
+ 03E41DB711F5A86800147791 /* OCMExceptionReturnValueProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 03C36728100D6C7D00BE9731 /* OCMExceptionReturnValueProvider.m */; };
+ 03E41DB811F5A86800147791 /* OCMExceptionReturnValueProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 03C36727100D6C7D00BE9731 /* OCMExceptionReturnValueProvider.h */; };
+ 03E41DB911F5A86900147791 /* OCMBoxedReturnValueProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 03C36723100D6B9600BE9731 /* OCMBoxedReturnValueProvider.m */; };
+ 03E41DBA11F5A86A00147791 /* OCMBoxedReturnValueProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 03C36722100D6B9600BE9731 /* OCMBoxedReturnValueProvider.h */; };
+ 03E41DBB11F5A86B00147791 /* OCMReturnValueProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 03C36702100D69EB00BE9731 /* OCMReturnValueProvider.m */; };
+ 03E41DBC11F5A86C00147791 /* OCMReturnValueProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 03C36701100D69EB00BE9731 /* OCMReturnValueProvider.h */; };
03F1FE8A10353A5F00E4962C /* NSMethodSignature+OCMAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 03F1FE8710353A5F00E4962C /* NSMethodSignature+OCMAdditions.h */; };
03F1FE8B10353A5F00E4962C /* NSMethodSignature+OCMAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 03F1FE8810353A5F00E4962C /* NSMethodSignature+OCMAdditions.m */; };
8DC2EF510486A6940098B216 /* OCMock_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = 32DBCF5E0370ADEE00C91783 /* OCMock_Prefix.pch */; };
@@ -62,6 +168,20 @@
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
+ 03DAC03911FEB87B007AF17B /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 033C84AE11F585CB0009B9CD;
+ remoteInfo = OCMockPhoneSim;
+ };
+ 03DAC03B11FEB87B007AF17B /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 03DABFEF11FEB771007AF17B;
+ remoteInfo = OCMockPhoneDevice;
+ };
9F35D3D40D349B5300C05E52 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
@@ -80,6 +200,9 @@
0338A99707BE7C100066DE8A /* OCClassMockObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCClassMockObject.m; sourceTree = "<group>"; };
0338A9EE07BE83B50066DE8A /* OCProtocolMockObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCProtocolMockObject.h; sourceTree = "<group>"; };
0338A9EF07BE83B50066DE8A /* OCProtocolMockObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCProtocolMockObject.m; sourceTree = "<group>"; };
+ 033C84AF11F585CB0009B9CD /* libOCMock.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libOCMock.a; sourceTree = BUILT_PRODUCTS_DIR; };
+ 0340A5B9121E973000158484 /* OCMRealObjectForwarder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMRealObjectForwarder.h; sourceTree = "<group>"; };
+ 0340A5BA121E973000158484 /* OCMRealObjectForwarder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCMRealObjectForwarder.m; sourceTree = "<group>"; };
0343133B0CCA771800A2E080 /* OCMConstraint.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = OCMConstraint.h; sourceTree = "<group>"; };
0343133C0CCA771800A2E080 /* OCMConstraint.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = OCMConstraint.m; sourceTree = "<group>"; };
034313E80CCA7BC700A2E080 /* OCMConstraintTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMConstraintTests.h; sourceTree = "<group>"; };
@@ -106,6 +229,8 @@
03C3672D100D6D0F00BE9731 /* OCMIndirectReturnValueProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCMIndirectReturnValueProvider.m; sourceTree = "<group>"; };
03C36773100D744700BE9731 /* OCMNotificationPoster.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMNotificationPoster.h; sourceTree = "<group>"; };
03C36774100D744700BE9731 /* OCMNotificationPoster.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCMNotificationPoster.m; sourceTree = "<group>"; };
+ 03CFB089117B308C00935C1E /* OCMBlockCaller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCMBlockCaller.h; sourceTree = "<group>"; };
+ 03CFB08A117B308C00935C1E /* OCMBlockCaller.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCMBlockCaller.m; sourceTree = "<group>"; };
03D65B47094CA23B00DF6687 /* Changes.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Changes.txt; sourceTree = "<group>"; };
03D880530F8C75980087D071 /* OCObserverMockObjectTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCObserverMockObjectTest.h; sourceTree = "<group>"; };
03D880540F8C75980087D071 /* OCObserverMockObjectTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCObserverMockObjectTest.m; sourceTree = "<group>"; };
@@ -117,6 +242,7 @@
03D8815A0F8DB37B0087D071 /* OCMObserverRecorder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCMObserverRecorder.m; sourceTree = "<group>"; };
03D8822D0FA151E10087D071 /* OCPartialMockObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCPartialMockObject.h; sourceTree = "<group>"; };
03D8822E0FA151E20087D071 /* OCPartialMockObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCPartialMockObject.m; sourceTree = "<group>"; };
+ 03DAC01F11FEB771007AF17B /* libOCMock.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libOCMock.a; sourceTree = BUILT_PRODUCTS_DIR; };
03DE1F5406DB911300E5A2A8 /* OCMockObject.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = OCMockObject.h; sourceTree = "<group>"; };
03DE1F5506DB911300E5A2A8 /* OCMockObject.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = OCMockObject.m; sourceTree = "<group>"; };
03DE1F5606DB911300E5A2A8 /* OCMockRecorder.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = OCMockRecorder.h; sourceTree = "<group>"; };
@@ -136,6 +262,13 @@
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
+ 033C84AD11F585CB0009B9CD /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
03BF2D3408F1C69500978C59 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
@@ -147,6 +280,13 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
+ 03DAC01B11FEB771007AF17B /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
8DC2EF560486A6940098B216 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
@@ -158,11 +298,22 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
+ 0340A5CD121E9BF500158484 /* Invocation Handler */ = {
+ isa = PBXGroup;
+ children = (
+ 0340A5B9121E973000158484 /* OCMRealObjectForwarder.h */,
+ 0340A5BA121E973000158484 /* OCMRealObjectForwarder.m */,
+ );
+ name = "Invocation Handler";
+ sourceTree = "<group>";
+ };
034768DFFF38A50411DB9C8B /* Products */ = {
isa = PBXGroup;
children = (
8DC2EF5B0486A6940098B216 /* OCMock.framework */,
03BF2D3708F1C69500978C59 /* OCMockTests.octest */,
+ 033C84AF11F585CB0009B9CD /* libOCMock.a */,
+ 03DAC01F11FEB771007AF17B /* libOCMock.a */,
);
name = Products;
sourceTree = "<group>";
@@ -190,6 +341,7 @@
03D8822E0FA151E20087D071 /* OCPartialMockObject.m */,
037C13420FCC474D00257C8C /* OCPartialMockRecorder.h */,
037C13430FCC474D00257C8C /* OCPartialMockRecorder.m */,
+ 0340A5CD121E9BF500158484 /* Invocation Handler */,
);
name = "Partial Mocks";
sourceTree = "<group>";
@@ -244,6 +396,8 @@
03C3672D100D6D0F00BE9731 /* OCMIndirectReturnValueProvider.m */,
03C36773100D744700BE9731 /* OCMNotificationPoster.h */,
03C36774100D744700BE9731 /* OCMNotificationPoster.m */,
+ 03CFB089117B308C00935C1E /* OCMBlockCaller.h */,
+ 03CFB08A117B308C00935C1E /* OCMBlockCaller.m */,
);
name = "Invocation Handler";
sourceTree = "<group>";
@@ -263,7 +417,6 @@
034313E90CCA7BC700A2E080 /* OCMConstraintTests.m */,
03A2D1F809F1533C008A1AFD /* NSInvocationOCMAdditionsTests.h */,
030106470A3B99F20049FED7 /* NSInvocationOCMAdditionsTests.m */,
- 32C88DFF0371C24200C91783 /* Other Sources */,
);
name = Tests;
sourceTree = "<group>";
@@ -282,6 +435,7 @@
03DE21B506DB95CB00E5A2A8 /* Public Headers */,
08FB77AEFE84172EC02AAC07 /* Implementation */,
03DE1F5D06DB911C00E5A2A8 /* Tests */,
+ 32C88DFF0371C24200C91783 /* Other Sources */,
089C1665FE841158C02AAC07 /* Resources */,
0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */,
034768DFFF38A50411DB9C8B /* Products */,
@@ -349,6 +503,64 @@
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
+ 033C84AB11F585CB0009B9CD /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 033C857511F58C130009B9CD /* NSNotificationCenter+OCMAdditions.h in Headers */,
+ 03E41D9711F5A83E00147791 /* NSMethodSignature+OCMAdditions.h in Headers */,
+ 03E41D9911F5A83F00147791 /* NSInvocation+OCMAdditions.h in Headers */,
+ 03E41D9B11F5A84100147791 /* OCMPassByRefSetter.h in Headers */,
+ 03E41D9D11F5A84200147791 /* OCMConstraint.h in Headers */,
+ 03E41D9F11F5A84400147791 /* OCMArg.h in Headers */,
+ 03E41DA111F5A84600147791 /* OCMObserverRecorder.h in Headers */,
+ 03E41DA311F5A84800147791 /* OCObserverMockObject.h in Headers */,
+ 03E41DA511F5A85000147791 /* OCPartialMockRecorder.h in Headers */,
+ 03E41DA711F5A85200147791 /* OCPartialMockObject.h in Headers */,
+ 03E41DA911F5A85600147791 /* OCMockRecorder.h in Headers */,
+ 03E41DAB11F5A85800147791 /* OCProtocolMockObject.h in Headers */,
+ 03E41DAD11F5A85900147791 /* OCClassMockObject.h in Headers */,
+ 03E41DAF11F5A85B00147791 /* OCMockObject.h in Headers */,
+ 03E41DB011F5A85E00147791 /* OCMock.h in Headers */,
+ 03E41DB211F5A86300147791 /* OCMBlockCaller.h in Headers */,
+ 03E41DB411F5A86400147791 /* OCMNotificationPoster.h in Headers */,
+ 03E41DB611F5A86600147791 /* OCMIndirectReturnValueProvider.h in Headers */,
+ 03E41DB811F5A86800147791 /* OCMExceptionReturnValueProvider.h in Headers */,
+ 03E41DBA11F5A86A00147791 /* OCMBoxedReturnValueProvider.h in Headers */,
+ 03E41DBC11F5A86C00147791 /* OCMReturnValueProvider.h in Headers */,
+ 0340A5BB121E973000158484 /* OCMRealObjectForwarder.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 03DABFF011FEB771007AF17B /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 03DABFF111FEB771007AF17B /* NSNotificationCenter+OCMAdditions.h in Headers */,
+ 03DABFF211FEB771007AF17B /* NSMethodSignature+OCMAdditions.h in Headers */,
+ 03DABFF311FEB771007AF17B /* NSInvocation+OCMAdditions.h in Headers */,
+ 03DABFF411FEB771007AF17B /* OCMPassByRefSetter.h in Headers */,
+ 03DABFF511FEB771007AF17B /* OCMConstraint.h in Headers */,
+ 03DABFF611FEB771007AF17B /* OCMArg.h in Headers */,
+ 03DABFF711FEB771007AF17B /* OCMObserverRecorder.h in Headers */,
+ 03DABFF811FEB771007AF17B /* OCObserverMockObject.h in Headers */,
+ 03DABFF911FEB771007AF17B /* OCPartialMockRecorder.h in Headers */,
+ 03DABFFA11FEB771007AF17B /* OCPartialMockObject.h in Headers */,
+ 03DABFFB11FEB771007AF17B /* OCMockRecorder.h in Headers */,
+ 03DABFFC11FEB771007AF17B /* OCProtocolMockObject.h in Headers */,
+ 03DABFFD11FEB771007AF17B /* OCClassMockObject.h in Headers */,
+ 03DABFFE11FEB771007AF17B /* OCMockObject.h in Headers */,
+ 03DABFFF11FEB771007AF17B /* OCMock.h in Headers */,
+ 03DAC00011FEB771007AF17B /* OCMBlockCaller.h in Headers */,
+ 03DAC00111FEB771007AF17B /* OCMNotificationPoster.h in Headers */,
+ 03DAC00211FEB771007AF17B /* OCMIndirectReturnValueProvider.h in Headers */,
+ 03DAC00311FEB771007AF17B /* OCMExceptionReturnValueProvider.h in Headers */,
+ 03DAC00411FEB771007AF17B /* OCMBoxedReturnValueProvider.h in Headers */,
+ 03DAC00511FEB771007AF17B /* OCMReturnValueProvider.h in Headers */,
+ 0340A5BD121E973000158484 /* OCMRealObjectForwarder.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
8DC2EF500486A6940098B216 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
@@ -374,12 +586,31 @@
03C3672E100D6D0F00BE9731 /* OCMIndirectReturnValueProvider.h in Headers */,
03C36775100D744700BE9731 /* OCMNotificationPoster.h in Headers */,
03F1FE8A10353A5F00E4962C /* NSMethodSignature+OCMAdditions.h in Headers */,
+ 03CFB08C117B308C00935C1E /* OCMBlockCaller.h in Headers */,
+ 0340A5BF121E973000158484 /* OCMRealObjectForwarder.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
+ 033C84AE11F585CB0009B9CD /* OCMockPhoneSim */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 033C84B211F586310009B9CD /* Build configuration list for PBXNativeTarget "OCMockPhoneSim" */;
+ buildPhases = (
+ 033C84AB11F585CB0009B9CD /* Headers */,
+ 033C84AC11F585CB0009B9CD /* Sources */,
+ 033C84AD11F585CB0009B9CD /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = OCMockPhoneSim;
+ productName = OCMockPhoneSim;
+ productReference = 033C84AF11F585CB0009B9CD /* libOCMock.a */;
+ productType = "com.apple.product-type.library.static";
+ };
03BF2D3608F1C69500978C59 /* OCMockTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 03BF2D3B08F1C69600978C59 /* Build configuration list for PBXNativeTarget "OCMockTests" */;
@@ -388,7 +619,7 @@
03BF2D3208F1C69500978C59 /* Resources */,
03BF2D3308F1C69500978C59 /* Sources */,
03BF2D3408F1C69500978C59 /* Frameworks */,
- 03BF2D3508F1C69500978C59 /* ShellScript */,
+ 03BF2D3508F1C69500978C59 /* Run Script */,
);
buildRules = (
);
@@ -400,6 +631,23 @@
productReference = 03BF2D3708F1C69500978C59 /* OCMockTests.octest */;
productType = "com.apple.product-type.bundle";
};
+ 03DABFEF11FEB771007AF17B /* OCMockPhoneDevice */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 03DAC01C11FEB771007AF17B /* Build configuration list for PBXNativeTarget "OCMockPhoneDevice" */;
+ buildPhases = (
+ 03DABFF011FEB771007AF17B /* Headers */,
+ 03DAC00611FEB771007AF17B /* Sources */,
+ 03DAC01B11FEB771007AF17B /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = OCMockPhoneDevice;
+ productName = OCMockPhoneSim;
+ productReference = 03DAC01F11FEB771007AF17B /* libOCMock.a */;
+ productType = "com.apple.product-type.library.static";
+ };
8DC2EF4F0486A6940098B216 /* OCMock */ = {
isa = PBXNativeTarget;
buildConfigurationList = 03DFEE0808F04987002E8661 /* Build configuration list for PBXNativeTarget "OCMock" */;
@@ -425,9 +673,19 @@
/* Begin PBXProject section */
0867D690FE84028FC02AAC07 /* Project object */ = {
isa = PBXProject;
+ attributes = {
+ ORGANIZATIONNAME = "Mulle Kybernetik";
+ };
buildConfigurationList = 03DFEE1208F04987002E8661 /* Build configuration list for PBXProject "OCMock" */;
compatibilityVersion = "Xcode 3.0";
+ developmentRegion = English;
hasScannedForEncodings = 1;
+ knownRegions = (
+ English,
+ Japanese,
+ French,
+ German,
+ );
mainGroup = 0867D691FE84028FC02AAC07 /* OCMock */;
productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
projectDirPath = "";
@@ -435,6 +693,9 @@
targets = (
8DC2EF4F0486A6940098B216 /* OCMock */,
03BF2D3608F1C69500978C59 /* OCMockTests */,
+ 033C84AE11F585CB0009B9CD /* OCMockPhoneSim */,
+ 03DABFEF11FEB771007AF17B /* OCMockPhoneDevice */,
+ 03DAC03611FEB870007AF17B /* OCMockLib */,
);
};
/* End PBXProject section */
@@ -479,9 +740,23 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "# Unpack frameworks required for this target\npushd \"${TEMP_ROOT}\"\nif [ ! -d Frameworks ]; then\n\tmkdir Frameworks\nfi\ncd Frameworks\nif [ ! -d OCHamcrest.framework ]; then\n gnutar xjf \"${PROJECT_DIR}/Frameworks/OCHamcrest.tar.bz2\"\nfi\npopd\n";
+ shellScript = "# Unpack frameworks required for this target\npushd \"${TARGET_BUILD_DIR}\"\nif [ ! -d Frameworks ]; then\n\tmkdir Frameworks\nfi\ncd Frameworks\nif [ ! -d OCHamcrest.framework ]; then\n gnutar xjf \"${PROJECT_DIR}/Frameworks/OCHamcrest.tar.bz2\"\nfi\npopd\n";
+ };
+ 03BF2D3508F1C69500978C59 /* Run Script */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Run Script";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "# Run the unit tests in this test bundle.\nexport DYLD_FRAMEWORK_PATH=\"${TARGET_BUILD_DIR}/Frameworks\"\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n";
};
- 03BF2D3508F1C69500978C59 /* ShellScript */ = {
+ 03DAC04011FEB897007AF17B /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
@@ -492,11 +767,39 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "# Run the unit tests in this test bundle.\nexport DYLD_FRAMEWORK_PATH=\"${TEMP_ROOT}/Frameworks\"\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n";
+ shellScript = "# make a new output folder\nmkdir -p \"${BUILD_DIR}/${BUILD_STYLE}/Library\"\n \n# combine lib files for device and simulator platforms into one\nlipo -create \"${BUILD_DIR}/${BUILD_STYLE}-iphoneos/libOCMock.a\" \"${BUILD_DIR}/${BUILD_STYLE}-iphonesimulator/libOCMock.a\" -output \"${TARGET_BUILD_DIR}/Library/libOCMock.a\"\n\n# copy the headers (we could have used a copy files build phase, too)\ncp -R \"${BUILD_DIR}/${BUILD_STYLE}-iphoneos/Headers\" \"${TARGET_BUILD_DIR}/Library\"\n";
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
+ 033C84AC11F585CB0009B9CD /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 033C857411F58C110009B9CD /* NSNotificationCenter+OCMAdditions.m in Sources */,
+ 03E41D9611F5A83D00147791 /* NSMethodSignature+OCMAdditions.m in Sources */,
+ 03E41D9811F5A83E00147791 /* NSInvocation+OCMAdditions.m in Sources */,
+ 03E41D9A11F5A84000147791 /* OCMPassByRefSetter.m in Sources */,
+ 03E41D9C11F5A84200147791 /* OCMConstraint.m in Sources */,
+ 03E41D9E11F5A84300147791 /* OCMArg.m in Sources */,
+ 03E41DA011F5A84500147791 /* OCMObserverRecorder.m in Sources */,
+ 03E41DA211F5A84700147791 /* OCObserverMockObject.m in Sources */,
+ 03E41DA411F5A84F00147791 /* OCPartialMockRecorder.m in Sources */,
+ 03E41DA611F5A85100147791 /* OCPartialMockObject.m in Sources */,
+ 03E41DA811F5A85600147791 /* OCMockRecorder.m in Sources */,
+ 03E41DAA11F5A85800147791 /* OCProtocolMockObject.m in Sources */,
+ 03E41DAC11F5A85900147791 /* OCClassMockObject.m in Sources */,
+ 03E41DAE11F5A85A00147791 /* OCMockObject.m in Sources */,
+ 03E41DB111F5A86300147791 /* OCMBlockCaller.m in Sources */,
+ 03E41DB311F5A86400147791 /* OCMNotificationPoster.m in Sources */,
+ 03E41DB511F5A86500147791 /* OCMIndirectReturnValueProvider.m in Sources */,
+ 03E41DB711F5A86800147791 /* OCMExceptionReturnValueProvider.m in Sources */,
+ 03E41DB911F5A86900147791 /* OCMBoxedReturnValueProvider.m in Sources */,
+ 03E41DBB11F5A86B00147791 /* OCMReturnValueProvider.m in Sources */,
+ 0340A5BC121E973000158484 /* OCMRealObjectForwarder.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
03BF2D3308F1C69500978C59 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
@@ -510,6 +813,34 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
+ 03DAC00611FEB771007AF17B /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 03DAC00711FEB771007AF17B /* NSNotificationCenter+OCMAdditions.m in Sources */,
+ 03DAC00811FEB771007AF17B /* NSMethodSignature+OCMAdditions.m in Sources */,
+ 03DAC00911FEB771007AF17B /* NSInvocation+OCMAdditions.m in Sources */,
+ 03DAC00A11FEB771007AF17B /* OCMPassByRefSetter.m in Sources */,
+ 03DAC00B11FEB771007AF17B /* OCMConstraint.m in Sources */,
+ 03DAC00C11FEB771007AF17B /* OCMArg.m in Sources */,
+ 03DAC00D11FEB771007AF17B /* OCMObserverRecorder.m in Sources */,
+ 03DAC00E11FEB771007AF17B /* OCObserverMockObject.m in Sources */,
+ 03DAC00F11FEB771007AF17B /* OCPartialMockRecorder.m in Sources */,
+ 03DAC01011FEB771007AF17B /* OCPartialMockObject.m in Sources */,
+ 03DAC01111FEB771007AF17B /* OCMockRecorder.m in Sources */,
+ 03DAC01211FEB771007AF17B /* OCProtocolMockObject.m in Sources */,
+ 03DAC01311FEB771007AF17B /* OCClassMockObject.m in Sources */,
+ 03DAC01411FEB771007AF17B /* OCMockObject.m in Sources */,
+ 03DAC01511FEB771007AF17B /* OCMBlockCaller.m in Sources */,
+ 03DAC01611FEB771007AF17B /* OCMNotificationPoster.m in Sources */,
+ 03DAC01711FEB771007AF17B /* OCMIndirectReturnValueProvider.m in Sources */,
+ 03DAC01811FEB771007AF17B /* OCMExceptionReturnValueProvider.m in Sources */,
+ 03DAC01911FEB771007AF17B /* OCMBoxedReturnValueProvider.m in Sources */,
+ 03DAC01A11FEB771007AF17B /* OCMReturnValueProvider.m in Sources */,
+ 0340A5BE121E973000158484 /* OCMRealObjectForwarder.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
8DC2EF540486A6940098B216 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
@@ -533,12 +864,24 @@
03C3672F100D6D0F00BE9731 /* OCMIndirectReturnValueProvider.m in Sources */,
03C36776100D744700BE9731 /* OCMNotificationPoster.m in Sources */,
03F1FE8B10353A5F00E4962C /* NSMethodSignature+OCMAdditions.m in Sources */,
+ 03CFB08D117B308C00935C1E /* OCMBlockCaller.m in Sources */,
+ 0340A5C0121E973000158484 /* OCMRealObjectForwarder.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
+ 03DAC03A11FEB87B007AF17B /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 033C84AE11F585CB0009B9CD /* OCMockPhoneSim */;
+ targetProxy = 03DAC03911FEB87B007AF17B /* PBXContainerItemProxy */;
+ };
+ 03DAC03C11FEB87B007AF17B /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 03DABFEF11FEB771007AF17B /* OCMockPhoneDevice */;
+ targetProxy = 03DAC03B11FEB87B007AF17B /* PBXContainerItemProxy */;
+ };
9F35D3D50D349B5300C05E52 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 8DC2EF4F0486A6940098B216 /* OCMock */;
@@ -547,15 +890,59 @@
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
+ 033C84B011F585CB0009B9CD /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)";
+ ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386";
+ COPY_PHASE_STRIP = NO;
+ FRAMEWORK_SEARCH_PATHS = "";
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_OBJC_GC = unsupported;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ IPHONEOS_DEPLOYMENT_TARGET = 3.2;
+ LD_RUNPATH_SEARCH_PATHS = "";
+ PREBINDING = NO;
+ PRODUCT_NAME = OCMock;
+ PUBLIC_HEADERS_FOLDER_PATH = Headers/OCMock;
+ SDKROOT = iphonesimulator4.1;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Debug;
+ };
+ 033C84B111F585CB0009B9CD /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)";
+ ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386";
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ FRAMEWORK_SEARCH_PATHS = "";
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_ENABLE_OBJC_GC = unsupported;
+ IPHONEOS_DEPLOYMENT_TARGET = 3.2;
+ LD_RUNPATH_SEARCH_PATHS = "";
+ PREBINDING = NO;
+ PRODUCT_NAME = OCMock;
+ PUBLIC_HEADERS_FOLDER_PATH = Headers/OCMock;
+ SDKROOT = iphonesimulator4.1;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Release;
+ };
03BF2D3C08F1C69600978C59 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ ARCHS = "$(NATIVE_ARCH_ACTUAL)";
COPY_PHASE_STRIP = NO;
FRAMEWORK_SEARCH_PATHS = (
- "$(value)",
+ "$(TARGET_BUILD_DIR)/Frameworks",
"$(DEVELOPER_FRAMEWORKS_DIR_QUOTED)",
);
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_ENABLE_OBJC_GC = supported;
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
@@ -563,12 +950,14 @@
GCC_PREFIX_HEADER = OCMock_Prefix.pch;
INFOPLIST_FILE = "Test-Info.plist";
INSTALL_PATH = "$(USER_LIBRARY_DIR)/Bundles";
- LD_RUNPATH_SEARCH_PATHS = "$(BUILD_DIR)/Frameworks";
+ LD_RUNPATH_SEARCH_PATHS = "@loader_path/../../../Frameworks";
LIBRARY_STYLE = BUNDLE;
+ ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = "";
OTHER_REZFLAGS = "";
PREBINDING = NO;
PRODUCT_NAME = OCMockTests;
+ SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk";
SECTORDER_FLAGS = "";
WARNING_CFLAGS = (
"-Wmost",
@@ -582,12 +971,15 @@
03BF2D3D08F1C69600978C59 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)";
+ ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc";
COPY_PHASE_STRIP = YES;
FRAMEWORK_SEARCH_PATHS = (
- "$(value)",
+ "$(TARGET_BUILD_DIR)/Frameworks",
"$(DEVELOPER_FRAMEWORKS_DIR_QUOTED)",
);
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_ENABLE_OBJC_GC = supported;
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
@@ -595,12 +987,13 @@
GCC_PREFIX_HEADER = OCMock_Prefix.pch;
INFOPLIST_FILE = "Test-Info.plist";
INSTALL_PATH = "$(USER_LIBRARY_DIR)/Bundles";
- LD_RUNPATH_SEARCH_PATHS = "$(BUILD_DIR)/Frameworks";
+ LD_RUNPATH_SEARCH_PATHS = "@loader_path/../../../Frameworks";
LIBRARY_STYLE = BUNDLE;
OTHER_CFLAGS = "";
OTHER_REZFLAGS = "";
PREBINDING = NO;
PRODUCT_NAME = OCMockTests;
+ SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk";
SECTORDER_FLAGS = "";
WARNING_CFLAGS = (
"-Wmost",
@@ -611,9 +1004,73 @@
};
name = Release;
};
+ 03DAC01D11FEB771007AF17B /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)";
+ ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386";
+ COPY_PHASE_STRIP = NO;
+ FRAMEWORK_SEARCH_PATHS = "";
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_OBJC_GC = unsupported;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ IPHONEOS_DEPLOYMENT_TARGET = 3.2;
+ LD_RUNPATH_SEARCH_PATHS = "";
+ PREBINDING = NO;
+ PRODUCT_NAME = OCMock;
+ PUBLIC_HEADERS_FOLDER_PATH = Headers/OCMock;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Debug;
+ };
+ 03DAC01E11FEB771007AF17B /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)";
+ ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386";
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ FRAMEWORK_SEARCH_PATHS = "";
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_ENABLE_OBJC_GC = unsupported;
+ IPHONEOS_DEPLOYMENT_TARGET = 3.2;
+ LD_RUNPATH_SEARCH_PATHS = "";
+ PREBINDING = NO;
+ PRODUCT_NAME = OCMock;
+ PUBLIC_HEADERS_FOLDER_PATH = Headers/OCMock;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Release;
+ };
+ 03DAC03711FEB870007AF17B /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ PRODUCT_NAME = OCMockLib;
+ };
+ name = Debug;
+ };
+ 03DAC03811FEB870007AF17B /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ PRODUCT_NAME = OCMockLib;
+ ZERO_LINK = NO;
+ };
+ name = Release;
+ };
03DFEE0908F04987002E8661 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ ARCHS = "$(NATIVE_ARCH_ACTUAL)";
COPY_PHASE_STRIP = NO;
DEBUGGING_SYMBOLS = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
@@ -623,23 +1080,29 @@
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_ENABLE_OBJC_GC = supported;
GCC_ENABLE_TRIGRAPHS = NO;
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = OCMock_Prefix.pch;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO;
GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
GCC_WARN_UNKNOWN_PRAGMAS = NO;
HEADER_SEARCH_PATHS = "";
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = /Library/Frameworks;
+ LD_DYLIB_INSTALL_NAME = "@rpath/$(EXECUTABLE_PATH)";
LIBRARY_SEARCH_PATHS = "";
LIBRARY_STYLE = Dynamic;
MACH_O_TYPE = mh_dylib;
+ ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = "-fobjc-exceptions";
OTHER_LDFLAGS = "";
PRODUCT_NAME = OCMock;
+ RUN_CLANG_STATIC_ANALYZER = YES;
+ SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk";
SECTORDER_FLAGS = "";
TEST_AFTER_BUILD = YES;
WARNING_CFLAGS = (
@@ -655,6 +1118,8 @@
03DFEE0A08F04987002E8661 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)";
+ ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc";
COPY_PHASE_STRIP = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
@@ -662,22 +1127,27 @@
FRAMEWORK_VERSION = A;
GCC_ENABLE_FIX_AND_CONTINUE = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_ENABLE_OBJC_GC = supported;
GCC_ENABLE_TRIGRAPHS = NO;
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = OCMock_Prefix.pch;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO;
GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
GCC_WARN_UNKNOWN_PRAGMAS = NO;
HEADER_SEARCH_PATHS = "";
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = /Library/Frameworks;
+ LD_DYLIB_INSTALL_NAME = "@rpath/$(EXECUTABLE_PATH)";
LIBRARY_SEARCH_PATHS = "";
LIBRARY_STYLE = Dynamic;
MACH_O_TYPE = mh_dylib;
OTHER_CFLAGS = "-fobjc-exceptions";
OTHER_LDFLAGS = "";
PRODUCT_NAME = OCMock;
+ RUN_CLANG_STATIC_ANALYZER = YES;
+ SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk";
SECTORDER_FLAGS = "";
TEST_AFTER_BUILD = YES;
WARNING_CFLAGS = (
@@ -693,41 +1163,30 @@
03DFEE1308F04987002E8661 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ARCHS = "$(NATIVE_ARCH_32_BIT)";
- FRAMEWORK_SEARCH_PATHS = "$(TEMP_ROOT)/Frameworks";
- GCC_ENABLE_OBJC_GC = supported;
- GCC_INPUT_FILETYPE = automatic;
GCC_WARN_SHADOW = YES;
- LD_DYLIB_INSTALL_NAME = "@rpath/$(EXECUTABLE_PATH)";
- LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks";
- MACOSX_DEPLOYMENT_TARGET = 10.5;
- SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
};
name = Debug;
};
03DFEE1408F04987002E8661 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ARCHS = (
- i386,
- ppc,
- ppc64,
- x86_64,
- );
- FRAMEWORK_SEARCH_PATHS = "$(TEMP_ROOT)/Frameworks";
- GCC_ENABLE_OBJC_GC = supported;
GCC_INPUT_FILETYPE = automatic;
GCC_WARN_SHADOW = YES;
- LD_DYLIB_INSTALL_NAME = "@rpath/$(EXECUTABLE_PATH)";
- LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks";
- MACOSX_DEPLOYMENT_TARGET = 10.5;
- SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
+ 033C84B211F586310009B9CD /* Build configuration list for PBXNativeTarget "OCMockPhoneSim" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 033C84B011F585CB0009B9CD /* Debug */,
+ 033C84B111F585CB0009B9CD /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
03BF2D3B08F1C69600978C59 /* Build configuration list for PBXNativeTarget "OCMockTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
@@ -737,6 +1196,24 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
+ 03DAC01C11FEB771007AF17B /* Build configuration list for PBXNativeTarget "OCMockPhoneDevice" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 03DAC01D11FEB771007AF17B /* Debug */,
+ 03DAC01E11FEB771007AF17B /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 03DAC03E11FEB87D007AF17B /* Build configuration list for PBXAggregateTarget "OCMockLib" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 03DAC03711FEB870007AF17B /* Debug */,
+ 03DAC03811FEB870007AF17B /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
03DFEE0808F04987002E8661 /* Build configuration list for PBXNativeTarget "OCMock" */ = {
isa = XCConfigurationList;
buildConfigurations = (
diff --git a/third_party/ocmock/OCMock/OCMockObject.h b/third_party/ocmock/OCMock/OCMockObject.h
index a334b57..24477c7 100644
--- a/third_party/ocmock/OCMock/OCMockObject.h
+++ b/third_party/ocmock/OCMock/OCMockObject.h
@@ -1,5 +1,5 @@
//---------------------------------------------------------------------------------------
-// $Id: OCMockObject.h 52 2009-08-14 07:21:10Z erik $
+// $Id: OCMockObject.h 69 2010-08-20 16:05:58Z erik $
// Copyright (c) 2004-2008 by Mulle Kybernetik. See License file for details.
//---------------------------------------------------------------------------------------
@@ -11,6 +11,7 @@
BOOL expectationOrderMatters;
NSMutableArray *recorders;
NSMutableArray *expectations;
+ NSMutableArray *rejections;
NSMutableArray *exceptions;
}
@@ -29,6 +30,7 @@
- (id)stub;
- (id)expect;
+- (id)reject;
- (void)verify;
diff --git a/third_party/ocmock/OCMock/OCMockObject.m b/third_party/ocmock/OCMock/OCMockObject.m
index 930216d..efdaeb0 100644
--- a/third_party/ocmock/OCMock/OCMockObject.m
+++ b/third_party/ocmock/OCMock/OCMockObject.m
@@ -1,5 +1,5 @@
//---------------------------------------------------------------------------------------
-// $Id: OCMockObject.m 53 2009-08-14 07:37:55Z erik $
+// $Id: OCMockObject.m 72 2011-01-28 18:45:19Z erik $
// Copyright (c) 2004-2009 by Mulle Kybernetik. See License file for details.
//---------------------------------------------------------------------------------------
@@ -19,9 +19,17 @@
#pragma mark -
-
@implementation OCMockObject
+#pragma mark Class initialisation
+
++ (void)initialize
+{
+ if([[NSInvocation class] instanceMethodSignatureForSelector:@selector(getArgumentAtIndexAsObject:)] == NULL)
+ [NSException raise:NSInternalInconsistencyException format:@"** Expected method not present; the method getArgumentAtIndexAsObject: is not implemented by NSInvocation. If you see this exception it is likely that you are using the static library version of OCMock and your project is not configured correctly to load categories from static libraries. Did you forget to add the -force_load linker flag?"];
+}
+
+
#pragma mark Factory methods
+ (id)mockForClass:(Class)aClass
@@ -73,6 +81,7 @@
expectationOrderMatters = NO;
recorders = [[NSMutableArray alloc] init];
expectations = [[NSMutableArray alloc] init];
+ rejections = [[NSMutableArray alloc] init];
exceptions = [[NSMutableArray alloc] init];
return self;
}
@@ -81,6 +90,7 @@
{
[recorders release];
[expectations release];
+ [rejections release];
[exceptions release];
[super dealloc];
}
@@ -115,6 +125,14 @@
}
+- (id)reject
+{
+ OCMockRecorder *recorder = [self stub];
+ [rejections addObject:recorder];
+ return recorder;
+}
+
+
- (void)verify
{
if([expectations count] == 1)
@@ -158,6 +176,15 @@
if(i == [recorders count])
return NO;
+ if([rejections containsObject:recorder])
+ {
+ NSException *exception = [NSException exceptionWithName:NSInternalInconsistencyException reason:
+ [NSString stringWithFormat:@"%@: explicitly disallowed method invoked: %@", [self description],
+ [anInvocation invocationDescription]] userInfo:nil];
+ [exceptions addObject:exception];
+ [exception raise];
+ }
+
if([expectations containsObject:recorder])
{
if(expectationOrderMatters && ([expectations objectAtIndex:0] != recorder))
diff --git a/third_party/ocmock/OCMock/OCMockObjectHamcrestTests.h b/third_party/ocmock/OCMock/OCMockObjectHamcrestTests.h
index fe494ed..1c40e9e 100644
--- a/third_party/ocmock/OCMock/OCMockObjectHamcrestTests.h
+++ b/third_party/ocmock/OCMock/OCMockObjectHamcrestTests.h
@@ -1,5 +1,5 @@
//---------------------------------------------------------------------------------------
-// $Id: OCMockObjectTests.h 21 2008-01-24 18:59:39Z erik $
+// $Id: OCMockObjectHamcrestTests.h 57 2010-07-19 06:14:27Z erik $
// Copyright (c) 2004-2008 by Mulle Kybernetik. See License file for details.
//---------------------------------------------------------------------------------------
diff --git a/third_party/ocmock/OCMock/OCMockObjectTests.m b/third_party/ocmock/OCMock/OCMockObjectTests.m
index cd8dbe3..0f00ec1 100644
--- a/third_party/ocmock/OCMock/OCMockObjectTests.m
+++ b/third_party/ocmock/OCMock/OCMockObjectTests.m
@@ -1,6 +1,6 @@
//---------------------------------------------------------------------------------------
-// $Id: OCMockObjectTests.m 55 2009-10-16 06:42:18Z erik $
-// Copyright (c) 2004-2008 by Mulle Kybernetik. See License file for details.
+// $Id: OCMockObjectTests.m 74 2011-02-15 12:59:47Z erik $
+// Copyright (c) 2004-2010 by Mulle Kybernetik. See License file for details.
//---------------------------------------------------------------------------------------
#import <OCMock/OCMock.h>
@@ -111,6 +111,25 @@ static NSString *TestNotification = @"TestNotification";
[mock hasSuffix:@"bar"];
}
+#if NS_BLOCKS_AVAILABLE
+
+- (void)testAcceptsStubbedMethodWithBlockArgument
+{
+ mock = [OCMockObject mockForClass:[NSArray class]];
+ [[mock stub] indexesOfObjectsPassingTest:[OCMArg any]];
+ [mock indexesOfObjectsPassingTest:^(id obj, NSUInteger idx, BOOL *stop) { return YES; }];
+}
+
+
+- (void)testAcceptsStubbedMethodWithBlockConstraint
+{
+ [[mock stub] hasSuffix:[OCMArg checkWithBlock:^(id value) { return [value isEqualToString:@"foo"]; }]];
+
+ STAssertNoThrow([mock hasSuffix:@"foo"], @"Should not have thrown a exception");
+ STAssertThrows([mock hasSuffix:@"bar"], @"Should have thrown a exception");
+}
+
+#endif
- (void)testAcceptsStubbedMethodWithNilArgument
{
@@ -343,6 +362,53 @@ static NSString *TestNotification = @"TestNotification";
STAssertEqualObjects(@"[FOO, 1]", returnValue, @"Should have passed and returned invocation.");
}
+#if NS_BLOCKS_AVAILABLE
+
+- (void)testCallsBlockWhichCanSetUpReturnValue
+{
+ void (^theBlock)(NSInvocation *) = ^(NSInvocation *invocation)
+ {
+ NSString *value;
+ [invocation getArgument:&value atIndex:2];
+ value = [NSString stringWithFormat:@"MOCK %@", value];
+ [invocation setReturnValue:&value];
+ };
+
+ [[[mock stub] andDo:theBlock] stringByAppendingString:[OCMArg any]];
+
+ STAssertEqualObjects(@"MOCK foo", [mock stringByAppendingString:@"foo"], @"Should have called block.");
+ STAssertEqualObjects(@"MOCK bar", [mock stringByAppendingString:@"bar"], @"Should have called block.");
+}
+
+#endif
+
+- (void)testThrowsWhenTryingToUseForwardToRealObjectOnNonPartialMock
+{
+ STAssertThrows([[[mock expect] andForwardToRealObject] method2], @"Should have raised and exception.");
+}
+
+- (void)testForwardsToRealObjectWhenSetUpAndCalledOnMock
+{
+ TestClassThatCallsSelf *realObject = [[[TestClassThatCallsSelf alloc] init] autorelease];
+ mock = [OCMockObject partialMockForObject:realObject];
+
+ [[[mock expect] andForwardToRealObject] method2];
+ STAssertEquals(@"Foo", [mock method2], @"Should have called method on real object.");
+
+ [mock verify];
+}
+
+- (void)testForwardsToRealObjectWhenSetUpAndCalledOnRealObject
+{
+ TestClassThatCallsSelf *realObject = [[[TestClassThatCallsSelf alloc] init] autorelease];
+ mock = [OCMockObject partialMockForObject:realObject];
+
+ [[[mock expect] andForwardToRealObject] method2];
+ STAssertEquals(@"Foo", [realObject method2], @"Should have called method on real object.");
+
+ [mock verify];
+}
+
// --------------------------------------------------------------------------------------
// returning values in pass-by-reference arguments
@@ -504,6 +570,19 @@ static NSString *TestNotification = @"TestNotification";
// --------------------------------------------------------------------------------------
+// explicitly rejecting methods (mostly for nice mocks, see below)
+// --------------------------------------------------------------------------------------
+
+- (void)testThrowsWhenRejectedMethodIsCalledOnNiceMock
+{
+ mock = [OCMockObject niceMockForClass:[NSString class]];
+
+ [[mock reject] uppercaseString];
+ STAssertThrows([mock uppercaseString], @"Should have complained about rejected method being called.");
+}
+
+
+// --------------------------------------------------------------------------------------
// protocol mocks
// --------------------------------------------------------------------------------------
@@ -618,10 +697,21 @@ static NSString *TestNotification = @"TestNotification";
{
TestClassThatCallsSelf *realObject = [[[TestClassThatCallsSelf alloc] init] autorelease];
mock = [OCMockObject partialMockForObject:realObject];
- [[[mock stub] andReturn:@"FooFoo"] method1];
- STAssertEqualObjects(@"FooFoo", [realObject method1], @"Should have stubbed method.");
+ [[[mock stub] andReturn:@"TestFoo"] method1];
+ STAssertEqualObjects(@"TestFoo", [realObject method1], @"Should have stubbed method.");
+}
+
+- (void)testRestoresObjectWhenStopped
+{
+ TestClassThatCallsSelf *realObject = [[[TestClassThatCallsSelf alloc] init] autorelease];
+ mock = [OCMockObject partialMockForObject:realObject];
+ [[[mock stub] andReturn:@"TestFoo"] method2];
+ STAssertEqualObjects(@"TestFoo", [realObject method2], @"Should have stubbed method.");
+ [mock stop];
+ STAssertEqualObjects(@"Foo", [realObject method2], @"Should have 'unstubbed' method.");
}
+
- (void)testCallsToSelfInRealObjectAreShadowedByPartialMock
{
TestClassThatCallsSelf *foo = [[[TestClassThatCallsSelf alloc] init] autorelease];
@@ -630,7 +720,6 @@ static NSString *TestNotification = @"TestNotification";
STAssertEqualObjects(@"FooFoo", [mock method1], @"Should have called through to stubbed method.");
}
-
- (NSString *)differentMethodInDifferentClass
{
return @"swizzled!";
@@ -711,6 +800,21 @@ static NSString *TestNotification = @"TestNotification";
STAssertThrows([mock verify], @"Should have reraised the exception.");
}
+- (void)testReRaisesRejectExceptionsOnVerify
+{
+ mock = [OCMockObject niceMockForClass:[NSString class]];
+ [[mock reject] uppercaseString];
+ @try
+ {
+ [mock uppercaseString];
+ }
+ @catch(NSException *exception)
+ {
+ // expected
+ }
+ STAssertThrows([mock verify], @"Should have reraised the exception.");
+}
+
- (void)testCanCreateExpectationsAfterInvocations
{
diff --git a/third_party/ocmock/OCMock/OCMockRecorder.h b/third_party/ocmock/OCMock/OCMockRecorder.h
index fea7b86..af68b17 100644
--- a/third_party/ocmock/OCMock/OCMockRecorder.h
+++ b/third_party/ocmock/OCMock/OCMockRecorder.h
@@ -1,6 +1,6 @@
//---------------------------------------------------------------------------------------
-// $Id: OCMockRecorder.h 50 2009-07-16 06:48:19Z erik $
-// Copyright (c) 2004-2009 by Mulle Kybernetik. See License file for details.
+// $Id: OCMockRecorder.h 68 2010-08-20 13:20:52Z erik $
+// Copyright (c) 2004-2010 by Mulle Kybernetik. See License file for details.
//---------------------------------------------------------------------------------------
#import <Foundation/Foundation.h>
@@ -22,6 +22,10 @@
- (id)andThrow:(NSException *)anException;
- (id)andPost:(NSNotification *)aNotification;
- (id)andCall:(SEL)selector onObject:(id)anObject;
+#if NS_BLOCKS_AVAILABLE
+- (id)andDo:(void (^)(NSInvocation *))block;
+#endif
+- (id)andForwardToRealObject;
- (NSArray *)invocationHandlers;
diff --git a/third_party/ocmock/OCMock/OCMockRecorder.m b/third_party/ocmock/OCMock/OCMockRecorder.m
index e31883e..9969a2c 100644
--- a/third_party/ocmock/OCMock/OCMockRecorder.m
+++ b/third_party/ocmock/OCMock/OCMockRecorder.m
@@ -1,6 +1,6 @@
//---------------------------------------------------------------------------------------
-// $Id: OCMockRecorder.m 55 2009-10-16 06:42:18Z erik $
-// Copyright (c) 2004-2009 by Mulle Kybernetik. See License file for details.
+// $Id: OCMockRecorder.m 68 2010-08-20 13:20:52Z erik $
+// Copyright (c) 2004-2010 by Mulle Kybernetik. See License file for details.
//---------------------------------------------------------------------------------------
#import <objc/runtime.h>
@@ -13,6 +13,7 @@
#import "OCMExceptionReturnValueProvider.h"
#import "OCMIndirectReturnValueProvider.h"
#import "OCMNotificationPoster.h"
+#import "OCMBlockCaller.h"
#import "NSInvocation+OCMAdditions.h"
@interface NSObject(HCMatcherDummy)
@@ -84,6 +85,24 @@
return self;
}
+#if NS_BLOCKS_AVAILABLE
+
+- (id)andDo:(void (^)(NSInvocation *))aBlock
+{
+ [invocationHandlers addObject:[[[OCMBlockCaller alloc] initWithCallBlock:aBlock] autorelease]];
+ return self;
+}
+
+#endif
+
+- (id)andForwardToRealObject
+{
+ [NSException raise:NSInternalInconsistencyException format:@"Method %@ can only be used with partial mocks.",
+ NSStringFromSelector(_cmd)];
+ return self; // keep compiler happy
+}
+
+
- (NSArray *)invocationHandlers
{
return invocationHandlers;
diff --git a/third_party/ocmock/OCMock/OCMockRecorderTests.m b/third_party/ocmock/OCMock/OCMockRecorderTests.m
index 8742034..a20fa54 100644
--- a/third_party/ocmock/OCMock/OCMockRecorderTests.m
+++ b/third_party/ocmock/OCMock/OCMockRecorderTests.m
@@ -1,5 +1,5 @@
//---------------------------------------------------------------------------------------
-// $Id: OCMockRecorderTests.m 50 2009-07-16 06:48:19Z erik $
+// $Id: OCMockRecorderTests.m 61 2010-07-21 02:38:57Z erik $
// Copyright (c) 2004-2009 by Mulle Kybernetik. See License file for details.
//---------------------------------------------------------------------------------------
@@ -60,7 +60,7 @@
[recorder andReturn:@"foo"];
handlerList = [recorder invocationHandlers];
- STAssertEquals(1u, [handlerList count], @"Should have added one handler.");
+ STAssertEquals((NSUInteger)1, [handlerList count], @"Should have added one handler.");
STAssertEqualObjects([OCMReturnValueProvider class], [[handlerList objectAtIndex:0] class], @"Should have added correct handler.");
}
@@ -73,7 +73,7 @@
[recorder andThrow:[NSException exceptionWithName:@"TestException" reason:@"A reason" userInfo:nil]];
handlerList = [recorder invocationHandlers];
- STAssertEquals(1u, [handlerList count], @"Should have added one handler.");
+ STAssertEquals((NSUInteger)1, [handlerList count], @"Should have added one handler.");
STAssertEqualObjects([OCMExceptionReturnValueProvider class], [[handlerList objectAtIndex:0] class], @"Should have added correct handler.");
}
diff --git a/third_party/ocmock/OCMock/OCObserverMockObject.h b/third_party/ocmock/OCMock/OCObserverMockObject.h
index 2e4398b..2ff416a 100644
--- a/third_party/ocmock/OCMock/OCObserverMockObject.h
+++ b/third_party/ocmock/OCMock/OCObserverMockObject.h
@@ -1,5 +1,5 @@
//---------------------------------------------------------------------------------------
-// $Id$
+// $Id: OCObserverMockObject.h 57 2010-07-19 06:14:27Z erik $
// Copyright (c) 2009 by Mulle Kybernetik. See License file for details.
//---------------------------------------------------------------------------------------
@@ -17,4 +17,6 @@
- (void)verify;
+- (void)handleNotification:(NSNotification *)aNotification;
+
@end
diff --git a/third_party/ocmock/OCMock/OCObserverMockObject.m b/third_party/ocmock/OCMock/OCObserverMockObject.m
index 7e410c2..56ddf99 100644
--- a/third_party/ocmock/OCMock/OCObserverMockObject.m
+++ b/third_party/ocmock/OCMock/OCObserverMockObject.m
@@ -1,5 +1,5 @@
//---------------------------------------------------------------------------------------
-// $Id$
+// $Id: OCObserverMockObject.m 57 2010-07-19 06:14:27Z erik $
// Copyright (c) 2009 by Mulle Kybernetik. See License file for details.
//---------------------------------------------------------------------------------------
diff --git a/third_party/ocmock/OCMock/OCObserverMockObjectTest.h b/third_party/ocmock/OCMock/OCObserverMockObjectTest.h
index 2ed46c3..de4fc5e 100644
--- a/third_party/ocmock/OCMock/OCObserverMockObjectTest.h
+++ b/third_party/ocmock/OCMock/OCObserverMockObjectTest.h
@@ -1,5 +1,5 @@
//---------------------------------------------------------------------------------------
-// $Id: OCObserverMockObject.h $
+// $Id: OCObserverMockObjectTest.h 57 2010-07-19 06:14:27Z erik $
// Copyright (c) 2009 by Mulle Kybernetik. See License file for details.
//---------------------------------------------------------------------------------------
diff --git a/third_party/ocmock/OCMock/OCObserverMockObjectTest.m b/third_party/ocmock/OCMock/OCObserverMockObjectTest.m
index 0399807..b058434 100644
--- a/third_party/ocmock/OCMock/OCObserverMockObjectTest.m
+++ b/third_party/ocmock/OCMock/OCObserverMockObjectTest.m
@@ -1,5 +1,5 @@
//---------------------------------------------------------------------------------------
-// $Id: OCObserverMockObjectTest.m $
+// $Id: OCObserverMockObjectTest.m 57 2010-07-19 06:14:27Z erik $
// Copyright (c) 2009 by Mulle Kybernetik. See License file for details.
//---------------------------------------------------------------------------------------
diff --git a/third_party/ocmock/OCMock/OCPartialMockObject.h b/third_party/ocmock/OCMock/OCPartialMockObject.h
index b27c938..03ad101 100644
--- a/third_party/ocmock/OCMock/OCPartialMockObject.h
+++ b/third_party/ocmock/OCMock/OCPartialMockObject.h
@@ -1,5 +1,5 @@
//---------------------------------------------------------------------------------------
-// $Id: $
+// $Id: OCPartialMockObject.h 74 2011-02-15 12:59:47Z erik $
// Copyright (c) 2009 by Mulle Kybernetik. See License file for details.
//---------------------------------------------------------------------------------------
@@ -14,7 +14,12 @@
- (NSObject *)realObject;
+- (void)stop;
+
- (void)setupSubclassForObject:(id)anObject;
- (void)setupForwarderForSelector:(SEL)selector;
@end
+
+
+extern NSString *OCMRealMethodAliasPrefix;
diff --git a/third_party/ocmock/OCMock/OCPartialMockObject.m b/third_party/ocmock/OCMock/OCPartialMockObject.m
index 0ea8735..89e8a6c 100644
--- a/third_party/ocmock/OCMock/OCPartialMockObject.m
+++ b/third_party/ocmock/OCMock/OCPartialMockObject.m
@@ -1,13 +1,20 @@
//---------------------------------------------------------------------------------------
-// $Id: $
+// $Id: OCPartialMockObject.m 74 2011-02-15 12:59:47Z erik $
// Copyright (c) 2009 by Mulle Kybernetik. See License file for details.
//---------------------------------------------------------------------------------------
-#import <objc/objc-runtime.h>
+#import <objc/runtime.h>
#import "OCPartialMockRecorder.h"
#import "OCPartialMockObject.h"
+@interface OCPartialMockObject (Private)
+- (void)forwardInvocationForRealObject:(NSInvocation *)anInvocation;
+@end
+
+
+NSString *OCMRealMethodAliasPrefix = @"ocmock_replaced_";
+
@implementation OCPartialMockObject
@@ -54,9 +61,8 @@ static NSMutableDictionary *mockTable;
- (void)dealloc
{
- object_setClass(realObject, [self mockedClass]);
- [realObject release];
- [[self class] forgetPartialMockForObject:realObject];
+ if(realObject != nil)
+ [self stop];
[super dealloc];
}
@@ -70,6 +76,13 @@ static NSMutableDictionary *mockTable;
return realObject;
}
+- (void)stop
+{
+ object_setClass(realObject, [self mockedClass]);
+ [realObject release];
+ [[self class] forgetPartialMockForObject:realObject];
+ realObject = nil;
+}
#pragma mark Subclass management
@@ -92,9 +105,14 @@ static NSMutableDictionary *mockTable;
- (void)setupForwarderForSelector:(SEL)selector
{
Class subclass = [[self realObject] class];
- Method originalMethod = class_getInstanceMethod(subclass, selector);
+ Method originalMethod = class_getInstanceMethod([subclass superclass], selector);
+ IMP originalImp = method_getImplementation(originalMethod);
+
IMP forwarderImp = [subclass instanceMethodForSelector:@selector(aMethodThatMustNotExist)];
class_addMethod(subclass, method_getName(originalMethod), forwarderImp, method_getTypeEncoding(originalMethod));
+
+ SEL aliasSelector = NSSelectorFromString([OCMRealMethodAliasPrefix stringByAppendingString:NSStringFromSelector(selector)]);
+ class_addMethod(subclass, aliasSelector, originalImp, method_getTypeEncoding(originalMethod));
}
- (void)forwardInvocationForRealObject:(NSInvocation *)anInvocation
diff --git a/third_party/ocmock/OCMock/OCPartialMockRecorder.h b/third_party/ocmock/OCMock/OCPartialMockRecorder.h
index 409a3a4..c6d3972 100644
--- a/third_party/ocmock/OCMock/OCPartialMockRecorder.h
+++ b/third_party/ocmock/OCMock/OCPartialMockRecorder.h
@@ -1,5 +1,5 @@
//---------------------------------------------------------------------------------------
-// $Id: $
+// $Id: OCPartialMockRecorder.h 57 2010-07-19 06:14:27Z erik $
// Copyright (c) 2009 by Mulle Kybernetik. See License file for details.
//---------------------------------------------------------------------------------------
diff --git a/third_party/ocmock/OCMock/OCPartialMockRecorder.m b/third_party/ocmock/OCMock/OCPartialMockRecorder.m
index 3dd4a93..696310f 100644
--- a/third_party/ocmock/OCMock/OCPartialMockRecorder.m
+++ b/third_party/ocmock/OCMock/OCPartialMockRecorder.m
@@ -1,14 +1,22 @@
//---------------------------------------------------------------------------------------
-// $Id: $
-// Copyright (c) 2009 by Mulle Kybernetik. See License file for details.
+// $Id: OCPartialMockRecorder.m 68 2010-08-20 13:20:52Z erik $
+// Copyright (c) 2009-2010 by Mulle Kybernetik. See License file for details.
//---------------------------------------------------------------------------------------
#import "OCPartialMockObject.h"
+#import "OCMRealObjectForwarder.h"
#import "OCPartialMockRecorder.h"
@implementation OCPartialMockRecorder
+- (id)andForwardToRealObject
+{
+ [invocationHandlers addObject:[[[OCMRealObjectForwarder alloc] init] autorelease]];
+ return self;
+}
+
+
- (void)forwardInvocation:(NSInvocation *)anInvocation
{
[super forwardInvocation:anInvocation];
diff --git a/third_party/ocmock/README.chromium b/third_party/ocmock/README.chromium
index 1882bc9..a778fe7 100644
--- a/third_party/ocmock/README.chromium
+++ b/third_party/ocmock/README.chromium
@@ -1,9 +1,10 @@
Name: ocmock
URL: http://www.mulle-kybernetik.com/software/OCMock/
Version: unknown
-Revision: 55
+Revision: 77
License: BSD with advertising clause
License File: OCMock/License.txt
+Security Critical: no
Description:
OCMock is an Objective-C implementation of mock objects. If you are unfamiliar
diff --git a/third_party/ocmock/ocmock.gyp b/third_party/ocmock/ocmock.gyp
index a1d790d..be069bd 100644
--- a/third_party/ocmock/ocmock.gyp
+++ b/third_party/ocmock/ocmock.gyp
@@ -1,4 +1,4 @@
-# Copyright (c) 2009 The Chromium Authors. All rights reserved.
+# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -27,6 +27,8 @@
'OCMock/OCClassMockObject.m',
'OCMock/OCMArg.h',
'OCMock/OCMArg.m',
+ 'OCMock/OCMBlockCaller.h',
+ 'OCMock/OCMBlockCaller.m',
'OCMock/OCMBoxedReturnValueProvider.h',
'OCMock/OCMBoxedReturnValueProvider.m',
'OCMock/OCMConstraint.h',
@@ -40,6 +42,8 @@
'OCMock/OCMObserverRecorder.h',
'OCMock/OCMPassByRefSetter.h',
'OCMock/OCMPassByRefSetter.m',
+ 'OCMock/OCMRealObjectForwarder.h',
+ 'OCMock/OCMRealObjectForwarder.m',
'OCMock/OCMReturnValueProvider.h',
'OCMock/OCMReturnValueProvider.m',
'OCMock/OCMock.h',