Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 69bdd04
Showing
64 changed files
with
3,625 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
build/ | ||
*.pbxuser | ||
*.perspectivev3 | ||
xcuserdata/ |
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,27 @@ | ||
BSD License | ||
|
||
Copyright 2011 hamcrest.org | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
Redistributions of source code must retain the above copyright notice, this list of | ||
conditions and the following disclaimer. Redistributions in binary form must reproduce | ||
the above copyright notice, this list of conditions and the following disclaimer in | ||
the documentation and/or other materials provided with the distribution. | ||
|
||
Neither the name of Hamcrest nor the names of its contributors may be used to endorse | ||
or promote products derived from this software without specific prior written | ||
permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY | ||
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | ||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT | ||
SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED | ||
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR | ||
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY | ||
WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH | ||
DAMAGE. |
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 @@ | ||
Versions/Current/Headers |
1 change: 1 addition & 0 deletions
1
Frameworks/OCHamcrest-1.4/OCHamcrestIOS.framework/OCHamcrestIOS
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 @@ | ||
Versions/Current/OCHamcrestIOS |
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 @@ | ||
Versions/Current/Resources |
53 changes: 53 additions & 0 deletions
53
Frameworks/OCHamcrest-1.4/OCHamcrestIOS.framework/Versions/A/Headers/HCAllOf.h
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,53 @@ | ||
// | ||
// OCHamcrest - HCAllOf.h | ||
// Copyright 2011 hamcrest.org. See LICENSE.txt | ||
// | ||
// Created by: Jon Reid | ||
// | ||
|
||
// Inherited | ||
#import <OCHamcrestIOS/HCBaseMatcher.h> | ||
|
||
|
||
/** | ||
Calculates the logical conjunction of multiple matchers. | ||
Evaluation is shortcut, so subsequent matchers are not called if an earlier matcher returns | ||
@c NO. | ||
@ingroup core_matchers | ||
*/ | ||
@interface HCAllOf : HCBaseMatcher | ||
{ | ||
NSArray *matchers; | ||
} | ||
|
||
+ (id)allOf:(NSArray *)theMatchers; | ||
- (id)initWithMatchers:(NSArray *)theMatchers; | ||
|
||
@end | ||
|
||
//-------------------------------------------------------------------------------------------------- | ||
|
||
/** | ||
Evaluates to @c YES only if @em all of the given matchers evaluate to @c YES. | ||
@b Synonym: @ref allOf | ||
@param matcher1 Comma-separated list of matchers ending with @c nil. | ||
@see HCAllOf | ||
@ingroup core_matchers | ||
*/ | ||
OBJC_EXPORT id<HCMatcher> HC_allOf(id<HCMatcher> matcher1, ...); | ||
|
||
/** | ||
allOf(matcher1, ...) - | ||
Evaluates to @c YES only if @em all of the given matchers evaluate to @c YES. | ||
Synonym for @ref HC_allOf, available if @c HC_SHORTHAND is defined. | ||
@param matcher1 Comma-separated list of matchers ending with @c nil. | ||
@see HCAllOf | ||
@ingroup core_matchers | ||
*/ | ||
#ifdef HC_SHORTHAND | ||
#define allOf HC_allOf | ||
#endif |
53 changes: 53 additions & 0 deletions
53
Frameworks/OCHamcrest-1.4/OCHamcrestIOS.framework/Versions/A/Headers/HCAnyOf.h
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,53 @@ | ||
// | ||
// OCHamcrest - HCAnyOf.h | ||
// Copyright 2011 hamcrest.org. See LICENSE.txt | ||
// | ||
// Created by: Jon Reid | ||
// | ||
|
||
// Inherited | ||
#import <OCHamcrestIOS/HCBaseMatcher.h> | ||
|
||
|
||
/** | ||
Calculates the logical disjunction of multiple matchers. | ||
Evaluation is shortcut, so the subsequent matchers are not called if an earlier matcher returns | ||
@c YES. | ||
@ingroup core_matchers | ||
*/ | ||
@interface HCAnyOf : HCBaseMatcher | ||
{ | ||
NSArray *matchers; | ||
} | ||
|
||
+ (id)anyOf:(NSArray *)theMatchers; | ||
- (id)initWithMatchers:(NSArray *)theMatchers; | ||
|
||
@end | ||
|
||
//-------------------------------------------------------------------------------------------------- | ||
|
||
/** | ||
Evaluates to @c YES if @em any of the given matchers evaluate to @c YES. | ||
@b Synonym: @ref anyOf | ||
@param matcher1 Comma-separated list of matchers ending with @c nil. | ||
@see HCAnyOf | ||
@ingroup core_matchers | ||
*/ | ||
OBJC_EXPORT id<HCMatcher> HC_anyOf(id<HCMatcher> matcher1, ...); | ||
|
||
/** | ||
anyOf(matcher1, ...) - | ||
Evaluates to @c YES if @em any of the given matchers evaluate to @c YES. | ||
Synonym for @ref HC_anyOf, available if @c HC_SHORTHAND is defined. | ||
@param matcher1 Comma-separated list of matchers ending with @c nil. | ||
@see HCAnyOf | ||
@ingroup core_matchers | ||
*/ | ||
#ifdef HC_SHORTHAND | ||
#define anyOf HC_anyOf | ||
#endif |
50 changes: 50 additions & 0 deletions
50
Frameworks/OCHamcrest-1.4/OCHamcrestIOS.framework/Versions/A/Headers/HCAssertThat.h
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,50 @@ | ||
// | ||
// OCHamcrest - HCAssertThat.h | ||
// Copyright 2011 hamcrest.org. See LICENSE.txt | ||
// | ||
// Created by: Jon Reid | ||
// | ||
|
||
#import <objc/objc-api.h> | ||
|
||
@protocol HCMatcher; | ||
|
||
|
||
/** | ||
Asserts that actual value satisfies matcher. | ||
If the matcher is not satisfied, an exception describing the mismatch is thrown. If you have | ||
linked against a OCUnit-compatible testing framework, this exception is a test failure. | ||
@param testCase A test case object that answers to @c -failWithException: | ||
@ingroup integration | ||
*/ | ||
OBJC_EXPORT void HC_assertThatWithLocation(id testCase, id actual, id<HCMatcher> matcher, | ||
const char *fileName, int lineNumber); | ||
|
||
/** | ||
Asserts that actual value satisfies matcher. | ||
If the matcher is not satisfied, an exception describing the mismatch is thrown. | ||
@b Synonym: @ref assertThat | ||
@see HC_assertThatWithLocation | ||
@ingroup integration | ||
*/ | ||
#define HC_assertThat(actual, matcher) \ | ||
HC_assertThatWithLocation(self, actual, matcher, __FILE__, __LINE__) | ||
|
||
/** | ||
assertThat(actual, matcher) - | ||
Asserts that actual value satisfies matcher. | ||
If the matcher is not satisfied, an exception describing the mismatch is thrown. | ||
Synonym for @ref HC_assertThat, available if @c HC_SHORTHAND is defined. | ||
@see HC_assertThatWithLocation | ||
@ingroup integration | ||
*/ | ||
#ifdef HC_SHORTHAND | ||
#define assertThat HC_assertThat | ||
#endif |
32 changes: 32 additions & 0 deletions
32
Frameworks/OCHamcrest-1.4/OCHamcrestIOS.framework/Versions/A/Headers/HCBaseDescription.h
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 @@ | ||
// | ||
// OCHamcrest - HCBaseDescription.h | ||
// Copyright 2011 hamcrest.org. See LICENSE.txt | ||
// | ||
// Created by: Jon Reid | ||
// | ||
|
||
// Inherited | ||
#import <Foundation/Foundation.h> | ||
#import <OCHamcrestIOS/HCDescription.h> | ||
|
||
|
||
/** | ||
Base class for all HCDescription implementations. | ||
@ingroup core | ||
*/ | ||
@interface HCBaseDescription : NSObject <HCDescription> | ||
@end | ||
|
||
|
||
/** | ||
Methods that must be provided by subclasses of HCBaseDescription. | ||
*/ | ||
@interface HCBaseDescription (SubclassMustImplement) | ||
|
||
/** | ||
Append the string @a str to the description. | ||
*/ | ||
- (void)append:(NSString *)str; | ||
|
||
@end |
27 changes: 27 additions & 0 deletions
27
Frameworks/OCHamcrest-1.4/OCHamcrestIOS.framework/Versions/A/Headers/HCBaseMatcher.h
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,27 @@ | ||
// | ||
// OCHamcrest - HCBaseMatcher.h | ||
// Copyright 2011 hamcrest.org. See LICENSE.txt | ||
// | ||
// Created by: Jon Reid | ||
// | ||
|
||
// Inherited | ||
#import <Foundation/Foundation.h> | ||
#import <OCHamcrestIOS/HCMatcher.h> | ||
|
||
// Convenience header, to provide OBJC_EXPORT | ||
#import <objc/objc-api.h> | ||
|
||
|
||
/** | ||
Base class for all HCMatcher implementations. | ||
Most implementations can just implement @c -matches: and let | ||
<tt>-matches:describingMismatchTo:</tt> call it. But if it makes more sense to generate the | ||
mismatch description during the matching, override <tt>-matches:describingMismatchTo:</tt> and | ||
have @c -matches: call it with a @c nil description. | ||
@ingroup core | ||
*/ | ||
@interface HCBaseMatcher : NSObject <HCMatcher> | ||
@end |
88 changes: 88 additions & 0 deletions
88
Frameworks/OCHamcrest-1.4/OCHamcrestIOS.framework/Versions/A/Headers/HCBoxNumber.h
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,88 @@ | ||
// | ||
// OCHamcrest - HCBoxNumber.h | ||
// Copyright 2011 hamcrest.org. See LICENSE.txt | ||
// | ||
// Created by: Jon Reid | ||
// | ||
|
||
#ifdef __cplusplus | ||
|
||
namespace hamcrest { | ||
|
||
/** | ||
Boxes scalar value in NSNumber, specialized per type. | ||
@ingroup number_matchers | ||
*/ | ||
template <typename T> | ||
inline | ||
NSNumber *boxNumber(T value) | ||
{ return nil; } | ||
|
||
template <> | ||
inline | ||
NSNumber *boxNumber(BOOL value) | ||
{ return [NSNumber numberWithBool:value]; } | ||
|
||
template <> | ||
inline | ||
NSNumber *boxNumber(char value) | ||
{ return [NSNumber numberWithChar:value]; } | ||
|
||
template <> | ||
inline | ||
NSNumber *boxNumber(double value) | ||
{ return [NSNumber numberWithDouble:value]; } | ||
|
||
template <> | ||
inline | ||
NSNumber *boxNumber(float value) | ||
{ return [NSNumber numberWithFloat:value]; } | ||
|
||
template <> | ||
inline | ||
NSNumber *boxNumber(int value) | ||
{ return [NSNumber numberWithInt:value]; } | ||
|
||
template <> | ||
inline | ||
NSNumber *boxNumber(long value) | ||
{ return [NSNumber numberWithLong:value]; } | ||
|
||
template <> | ||
inline | ||
NSNumber *boxNumber(long long value) | ||
{ return [NSNumber numberWithLongLong:value]; } | ||
|
||
template <> | ||
inline | ||
NSNumber *boxNumber(short value) | ||
{ return [NSNumber numberWithShort:value]; } | ||
|
||
template <> | ||
inline | ||
NSNumber *boxNumber(unsigned char value) | ||
{ return [NSNumber numberWithUnsignedChar:value]; } | ||
|
||
template <> | ||
inline | ||
NSNumber *boxNumber(unsigned int value) | ||
{ return [NSNumber numberWithUnsignedInt:value]; } | ||
|
||
template <> | ||
inline | ||
NSNumber *boxNumber(unsigned long value) | ||
{ return [NSNumber numberWithUnsignedLong:value]; } | ||
|
||
template <> | ||
inline | ||
NSNumber *boxNumber(unsigned long long value) | ||
{ return [NSNumber numberWithUnsignedLongLong:value]; } | ||
|
||
template <> | ||
inline | ||
NSNumber *boxNumber(unsigned short value) | ||
{ return [NSNumber numberWithUnsignedShort:value]; } | ||
|
||
} // namespace hamcrest | ||
|
||
#endif // __cplusplus |
21 changes: 21 additions & 0 deletions
21
Frameworks/OCHamcrest-1.4/OCHamcrestIOS.framework/Versions/A/Headers/HCCollectMatchers.h
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,21 @@ | ||
// | ||
// OCHamcrest - HCCollectMatchers.h | ||
// Copyright 2011 hamcrest.org. See LICENSE.txt | ||
// | ||
// Created by: Jon Reid | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
#import <objc/objc-api.h> | ||
|
||
// C | ||
#import <stdarg.h> | ||
|
||
@protocol HCMatcher; | ||
|
||
|
||
/** | ||
Returns an array of matchers from a variable-length comma-separated list terminated by @c nil. | ||
@ingroup helpers | ||
*/ | ||
OBJC_EXPORT NSMutableArray *HCCollectMatchers(id<HCMatcher> matcher1, va_list args); |
Oops, something went wrong.