forked from kiwi-bdd/Kiwi
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request kiwi-bdd#105 from MattesGroeger/master
Add support for any() argument matcher
- Loading branch information
Showing
10 changed files
with
136 additions
and
1 deletion.
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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,18 @@ | |||
// | |||
// Licensed under the terms in License.txt | |||
// | |||
// Copyright 2010 Allen Ding. All rights reserved. | |||
// | |||
|
|||
#import "KiwiConfiguration.h" | |||
|
|||
// KWAny exists to determine arguments in a message pattern that should | |||
// match any value. Used for pointers as well as for scalar values. | |||
@interface KWAny : NSObject | |||
|
|||
#pragma mark - | |||
#pragma mark Initializing | |||
|
|||
+ (id)any; | |||
|
|||
@end |
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,47 @@ | |||
// | |||
// Licensed under the terms in License.txt | |||
// | |||
// Copyright 2010 Allen Ding. All rights reserved. | |||
// | |||
|
|||
#import "KWAny.h" | |||
|
|||
@implementation KWAny | |||
|
|||
#pragma mark - | |||
#pragma mark Initializing | |||
|
|||
static KWAny *sharedAny = nil; | |||
|
|||
+ (id)any { | |||
if (sharedAny == nil) { | |||
sharedAny = [[super allocWithZone:nil] init]; | |||
} | |||
|
|||
return sharedAny; | |||
} | |||
|
|||
+ (id)allocWithZone:(NSZone *)zone { | |||
return [[self any] retain]; | |||
} | |||
|
|||
- (id)copyWithZone:(NSZone *)zone { | |||
return self; | |||
} | |||
|
|||
- (id)retain { | |||
return self; | |||
} | |||
|
|||
- (NSUInteger)retainCount { | |||
return NSUIntegerMax; | |||
} | |||
|
|||
- (oneway void)release { | |||
} | |||
|
|||
- (id)autorelease { | |||
return self; | |||
} | |||
|
|||
@end |
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