forked from pivotalforks/OCMock
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added block constraints and invocation handler
git-svn-id: http://svn.mulle-kybernetik.com/OCMock/trunk@56 12620d81-68e2-0310-ae40-e3f550779089
- Loading branch information
erik
committed
Apr 18, 2010
1 parent
ba5ff76
commit 088f2e1
Showing
12 changed files
with
207 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
//--------------------------------------------------------------------------------------- | ||
// $Id$ | ||
// Copyright (c) 2010 by Mulle Kybernetik. See License file for details. | ||
//--------------------------------------------------------------------------------------- | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
#ifdef MAC_OS_X_VERSION_10_6 | ||
|
||
@interface OCMBlockCaller : NSObject | ||
{ | ||
void (^block)(NSInvocation *); | ||
} | ||
|
||
-(id)initWithCallBlock:(void (^)(NSInvocation *))theBlock; | ||
|
||
@end | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
//--------------------------------------------------------------------------------------- | ||
// $Id$ | ||
// Copyright (c) 2010 by Mulle Kybernetik. See License file for details. | ||
//--------------------------------------------------------------------------------------- | ||
|
||
#import "OCMBlockCaller.h" | ||
|
||
#ifdef MAC_OS_X_VERSION_10_6 | ||
|
||
@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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters