diff --git a/ConciseKitSpecs/Frameworks/Cedar.framework/Cedar b/ConciseKitSpecs/Frameworks/Cedar.framework/Cedar deleted file mode 120000 index 83cbd31..0000000 --- a/ConciseKitSpecs/Frameworks/Cedar.framework/Cedar +++ /dev/null @@ -1 +0,0 @@ -Versions/Current/Cedar \ No newline at end of file diff --git a/ConciseKitSpecs/Frameworks/Cedar.framework/Cedar b/ConciseKitSpecs/Frameworks/Cedar.framework/Cedar new file mode 100755 index 0000000..927c9bb Binary files /dev/null and b/ConciseKitSpecs/Frameworks/Cedar.framework/Cedar differ diff --git a/ConciseKitSpecs/Frameworks/Cedar.framework/Headers b/ConciseKitSpecs/Frameworks/Cedar.framework/Headers deleted file mode 120000 index a177d2a..0000000 --- a/ConciseKitSpecs/Frameworks/Cedar.framework/Headers +++ /dev/null @@ -1 +0,0 @@ -Versions/Current/Headers \ No newline at end of file diff --git a/ConciseKitSpecs/Frameworks/Cedar.framework/Resources b/ConciseKitSpecs/Frameworks/Cedar.framework/Resources deleted file mode 120000 index 953ee36..0000000 --- a/ConciseKitSpecs/Frameworks/Cedar.framework/Resources +++ /dev/null @@ -1 +0,0 @@ -Versions/Current/Resources \ No newline at end of file diff --git a/ConciseKitSpecs/Frameworks/Cedar.framework/Versions/Current b/ConciseKitSpecs/Frameworks/Cedar.framework/Versions/Current deleted file mode 120000 index 8c7e5a6..0000000 --- a/ConciseKitSpecs/Frameworks/Cedar.framework/Versions/Current +++ /dev/null @@ -1 +0,0 @@ -A \ No newline at end of file diff --git a/ConciseKitSpecs/Frameworks/Cedar.framework/Versions/current/Cedar b/ConciseKitSpecs/Frameworks/Cedar.framework/Versions/current/Cedar new file mode 100755 index 0000000..927c9bb Binary files /dev/null and b/ConciseKitSpecs/Frameworks/Cedar.framework/Versions/current/Cedar differ diff --git a/ConciseKitSpecs/Frameworks/Cedar.framework/Versions/current/Headers/CDRExampleBase.h b/ConciseKitSpecs/Frameworks/Cedar.framework/Versions/current/Headers/CDRExampleBase.h new file mode 100644 index 0000000..4aa9969 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/Cedar.framework/Versions/current/Headers/CDRExampleBase.h @@ -0,0 +1,40 @@ +#import +#import "CDRExampleParent.h" + +@protocol CDRExampleReporter; + +typedef void (^CDRSpecBlock)(void); + +enum CDRExampleState { + CDRExampleStateIncomplete = 0x00, + CDRExampleStatePassed = 0x01, + CDRExampleStatePending = 0x03, + CDRExampleStateFailed = 0x07, + CDRExampleStateError = 0x0F +}; +typedef enum CDRExampleState CDRExampleState; + +@interface CDRSpecFailure : NSException ++ (id)specFailureWithReason:(NSString *)reason; +@end + +@interface CDRExampleBase : NSObject { + NSString *text_; + id parent_; +} + +@property (nonatomic, readonly) NSString *text; +@property (nonatomic, assign) id parent; + +- (id)initWithText:(NSString *)text; + +- (void)run; +- (BOOL)hasChildren; +- (NSString *)message; +- (NSString *)fullText; +@end + +@interface CDRExampleBase (RunReporting) +- (CDRExampleState)state; +- (float)progress; +@end diff --git a/ConciseKitSpecs/Frameworks/Cedar.framework/Versions/current/Headers/CDRExampleParent.h b/ConciseKitSpecs/Frameworks/Cedar.framework/Versions/current/Headers/CDRExampleParent.h new file mode 100644 index 0000000..11ae533 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/Cedar.framework/Versions/current/Headers/CDRExampleParent.h @@ -0,0 +1,12 @@ +#import + +@protocol CDRExampleParent + +- (void)setUp; +- (void)tearDown; + +@optional +- (BOOL)hasFullText; +- (NSString *)fullText; + +@end diff --git a/ConciseKitSpecs/Frameworks/Cedar.framework/Versions/current/Headers/CDRExampleReporter.h b/ConciseKitSpecs/Frameworks/Cedar.framework/Versions/current/Headers/CDRExampleReporter.h new file mode 100644 index 0000000..952cd55 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/Cedar.framework/Versions/current/Headers/CDRExampleReporter.h @@ -0,0 +1,9 @@ +#import + +@protocol CDRExampleReporter + +- (void)runWillStartWithGroups:(NSArray *)groups; +- (void)runDidComplete; +- (int)result; + +@end diff --git a/ConciseKitSpecs/Frameworks/Cedar.framework/Versions/current/Headers/CDRFunctions.h b/ConciseKitSpecs/Frameworks/Cedar.framework/Versions/current/Headers/CDRFunctions.h new file mode 100644 index 0000000..8a036a2 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/Cedar.framework/Versions/current/Headers/CDRFunctions.h @@ -0,0 +1,7 @@ +#import + +@protocol CDRExampleReporter; + +int runSpecsWithCustomExampleReporter(NSArray *specClasses, id runner); +int runAllSpecs(); +int runAllSpecsWithCustomExampleReporter(id runner); diff --git a/ConciseKitSpecs/Frameworks/Cedar.framework/Versions/current/Headers/CDRSharedExampleGroupPool.h b/ConciseKitSpecs/Frameworks/Cedar.framework/Versions/current/Headers/CDRSharedExampleGroupPool.h new file mode 100644 index 0000000..d650cfc --- /dev/null +++ b/ConciseKitSpecs/Frameworks/Cedar.framework/Versions/current/Headers/CDRSharedExampleGroupPool.h @@ -0,0 +1,32 @@ +#import + +@protocol CDRSharedExampleGroupPool +@end + +typedef void (^CDRSharedExampleGroupBlock)(NSDictionary *); + +#ifdef __cplusplus +extern "C" { +#endif +void sharedExamplesFor(NSString *, CDRSharedExampleGroupBlock); +void itShouldBehaveLike(NSString *); +#ifdef __cplusplus +} +#endif + +@interface CDRSharedExampleGroupPool : NSObject +@end + +@interface CDRSharedExampleGroupPool (SharedExampleGroupDeclaration) +- (void)declareSharedExampleGroups; +@end + +#define SHARED_EXAMPLE_GROUPS_BEGIN(name) \ +@interface SharedExampleGroupPoolFor##name : CDRSharedExampleGroupPool \ +@end \ +@implementation SharedExampleGroupPoolFor##name \ +- (void)declareSharedExampleGroups { + +#define SHARED_EXAMPLE_GROUPS_END \ +} \ +@end diff --git a/ConciseKitSpecs/Frameworks/Cedar.framework/Versions/current/Headers/CDRSpec.h b/ConciseKitSpecs/Frameworks/Cedar.framework/Versions/current/Headers/CDRSpec.h new file mode 100644 index 0000000..b2f2d5a --- /dev/null +++ b/ConciseKitSpecs/Frameworks/Cedar.framework/Versions/current/Headers/CDRSpec.h @@ -0,0 +1,54 @@ +#import +#import "CDRExampleBase.h" + +@protocol CDRExampleReporter; +@class CDRExampleGroup, SpecHelper; + +@protocol CDRSpec +@end + +extern CDRSpecBlock PENDING; + +#ifdef __cplusplus +extern "C" { +#endif +void describe(NSString *, CDRSpecBlock); +void beforeEach(CDRSpecBlock); +void afterEach(CDRSpecBlock); +void it(NSString *, CDRSpecBlock); +void fail(NSString *); +#ifdef __cplusplus +} +#endif + +@interface CDRSpec : NSObject { + CDRExampleGroup *rootGroup_; + CDRExampleGroup *currentGroup_; +} + +@property (nonatomic, retain) CDRExampleGroup *currentGroup, *rootGroup; +- (void)defineBehaviors; +@end + +@interface CDRSpec (SpecDeclaration) +- (void)declareBehaviors; +@end + +#define SPEC_BEGIN(name) \ +@interface name : CDRSpec \ +@end \ +@implementation name \ +- (void)declareBehaviors { + +#define SPEC_END \ +} \ +@end + +#define DESCRIBE(name) \ +@interface name##Spec : CDRSpec \ +@end \ +@implementation name##Spec \ +- (void)declareBehaviors + +#define DESCRIBE_END \ +@end diff --git a/ConciseKitSpecs/Frameworks/Cedar.framework/Versions/current/Headers/Cedar.h b/ConciseKitSpecs/Frameworks/Cedar.framework/Versions/current/Headers/Cedar.h new file mode 100644 index 0000000..fd96c33 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/Cedar.framework/Versions/current/Headers/Cedar.h @@ -0,0 +1,7 @@ +#if TARGET_OS_IPHONE +#import "CDRFunctions.h" +#import "CedarApplicationDelegate.h" +#import "CDRExampleReporterViewController.h" +#else +#import "CDRFunctions.h" +#endif diff --git a/ConciseKitSpecs/Frameworks/Cedar.framework/Versions/current/Headers/SpecHelper.h b/ConciseKitSpecs/Frameworks/Cedar.framework/Versions/current/Headers/SpecHelper.h new file mode 100644 index 0000000..b645c94 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/Cedar.framework/Versions/current/Headers/SpecHelper.h @@ -0,0 +1,16 @@ +#import "CDRSpec.h" +#import "CDRSharedExampleGroupPool.h" +#import "CDRExampleParent.h" + +@interface SpecHelper : NSObject { + NSMutableDictionary *sharedExampleGroups_, *sharedExampleContext_; +} + +@property (nonatomic, retain, readonly) NSMutableDictionary *sharedExampleContext; + ++ (SpecHelper *)specHelper; + +- (void)beforeEach; +- (void)afterEach; + +@end diff --git a/ConciseKitSpecs/Frameworks/Cedar.framework/Versions/current/Resources/Info.plist b/ConciseKitSpecs/Frameworks/Cedar.framework/Versions/current/Resources/Info.plist new file mode 100644 index 0000000..69da723 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/Cedar.framework/Versions/current/Resources/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + Cedar + CFBundleIdentifier + com.yourcompany.Cedar + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/ConciseKitSpecs/Frameworks/Cedar.framework/headers/CDRExampleBase.h b/ConciseKitSpecs/Frameworks/Cedar.framework/headers/CDRExampleBase.h new file mode 100644 index 0000000..4aa9969 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/Cedar.framework/headers/CDRExampleBase.h @@ -0,0 +1,40 @@ +#import +#import "CDRExampleParent.h" + +@protocol CDRExampleReporter; + +typedef void (^CDRSpecBlock)(void); + +enum CDRExampleState { + CDRExampleStateIncomplete = 0x00, + CDRExampleStatePassed = 0x01, + CDRExampleStatePending = 0x03, + CDRExampleStateFailed = 0x07, + CDRExampleStateError = 0x0F +}; +typedef enum CDRExampleState CDRExampleState; + +@interface CDRSpecFailure : NSException ++ (id)specFailureWithReason:(NSString *)reason; +@end + +@interface CDRExampleBase : NSObject { + NSString *text_; + id parent_; +} + +@property (nonatomic, readonly) NSString *text; +@property (nonatomic, assign) id parent; + +- (id)initWithText:(NSString *)text; + +- (void)run; +- (BOOL)hasChildren; +- (NSString *)message; +- (NSString *)fullText; +@end + +@interface CDRExampleBase (RunReporting) +- (CDRExampleState)state; +- (float)progress; +@end diff --git a/ConciseKitSpecs/Frameworks/Cedar.framework/headers/CDRExampleParent.h b/ConciseKitSpecs/Frameworks/Cedar.framework/headers/CDRExampleParent.h new file mode 100644 index 0000000..11ae533 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/Cedar.framework/headers/CDRExampleParent.h @@ -0,0 +1,12 @@ +#import + +@protocol CDRExampleParent + +- (void)setUp; +- (void)tearDown; + +@optional +- (BOOL)hasFullText; +- (NSString *)fullText; + +@end diff --git a/ConciseKitSpecs/Frameworks/Cedar.framework/headers/CDRExampleReporter.h b/ConciseKitSpecs/Frameworks/Cedar.framework/headers/CDRExampleReporter.h new file mode 100644 index 0000000..952cd55 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/Cedar.framework/headers/CDRExampleReporter.h @@ -0,0 +1,9 @@ +#import + +@protocol CDRExampleReporter + +- (void)runWillStartWithGroups:(NSArray *)groups; +- (void)runDidComplete; +- (int)result; + +@end diff --git a/ConciseKitSpecs/Frameworks/Cedar.framework/headers/CDRFunctions.h b/ConciseKitSpecs/Frameworks/Cedar.framework/headers/CDRFunctions.h new file mode 100644 index 0000000..8a036a2 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/Cedar.framework/headers/CDRFunctions.h @@ -0,0 +1,7 @@ +#import + +@protocol CDRExampleReporter; + +int runSpecsWithCustomExampleReporter(NSArray *specClasses, id runner); +int runAllSpecs(); +int runAllSpecsWithCustomExampleReporter(id runner); diff --git a/ConciseKitSpecs/Frameworks/Cedar.framework/headers/CDRSharedExampleGroupPool.h b/ConciseKitSpecs/Frameworks/Cedar.framework/headers/CDRSharedExampleGroupPool.h new file mode 100644 index 0000000..d650cfc --- /dev/null +++ b/ConciseKitSpecs/Frameworks/Cedar.framework/headers/CDRSharedExampleGroupPool.h @@ -0,0 +1,32 @@ +#import + +@protocol CDRSharedExampleGroupPool +@end + +typedef void (^CDRSharedExampleGroupBlock)(NSDictionary *); + +#ifdef __cplusplus +extern "C" { +#endif +void sharedExamplesFor(NSString *, CDRSharedExampleGroupBlock); +void itShouldBehaveLike(NSString *); +#ifdef __cplusplus +} +#endif + +@interface CDRSharedExampleGroupPool : NSObject +@end + +@interface CDRSharedExampleGroupPool (SharedExampleGroupDeclaration) +- (void)declareSharedExampleGroups; +@end + +#define SHARED_EXAMPLE_GROUPS_BEGIN(name) \ +@interface SharedExampleGroupPoolFor##name : CDRSharedExampleGroupPool \ +@end \ +@implementation SharedExampleGroupPoolFor##name \ +- (void)declareSharedExampleGroups { + +#define SHARED_EXAMPLE_GROUPS_END \ +} \ +@end diff --git a/ConciseKitSpecs/Frameworks/Cedar.framework/headers/CDRSpec.h b/ConciseKitSpecs/Frameworks/Cedar.framework/headers/CDRSpec.h new file mode 100644 index 0000000..b2f2d5a --- /dev/null +++ b/ConciseKitSpecs/Frameworks/Cedar.framework/headers/CDRSpec.h @@ -0,0 +1,54 @@ +#import +#import "CDRExampleBase.h" + +@protocol CDRExampleReporter; +@class CDRExampleGroup, SpecHelper; + +@protocol CDRSpec +@end + +extern CDRSpecBlock PENDING; + +#ifdef __cplusplus +extern "C" { +#endif +void describe(NSString *, CDRSpecBlock); +void beforeEach(CDRSpecBlock); +void afterEach(CDRSpecBlock); +void it(NSString *, CDRSpecBlock); +void fail(NSString *); +#ifdef __cplusplus +} +#endif + +@interface CDRSpec : NSObject { + CDRExampleGroup *rootGroup_; + CDRExampleGroup *currentGroup_; +} + +@property (nonatomic, retain) CDRExampleGroup *currentGroup, *rootGroup; +- (void)defineBehaviors; +@end + +@interface CDRSpec (SpecDeclaration) +- (void)declareBehaviors; +@end + +#define SPEC_BEGIN(name) \ +@interface name : CDRSpec \ +@end \ +@implementation name \ +- (void)declareBehaviors { + +#define SPEC_END \ +} \ +@end + +#define DESCRIBE(name) \ +@interface name##Spec : CDRSpec \ +@end \ +@implementation name##Spec \ +- (void)declareBehaviors + +#define DESCRIBE_END \ +@end diff --git a/ConciseKitSpecs/Frameworks/Cedar.framework/headers/Cedar.h b/ConciseKitSpecs/Frameworks/Cedar.framework/headers/Cedar.h new file mode 100644 index 0000000..fd96c33 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/Cedar.framework/headers/Cedar.h @@ -0,0 +1,7 @@ +#if TARGET_OS_IPHONE +#import "CDRFunctions.h" +#import "CedarApplicationDelegate.h" +#import "CDRExampleReporterViewController.h" +#else +#import "CDRFunctions.h" +#endif diff --git a/ConciseKitSpecs/Frameworks/Cedar.framework/headers/SpecHelper.h b/ConciseKitSpecs/Frameworks/Cedar.framework/headers/SpecHelper.h new file mode 100644 index 0000000..b645c94 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/Cedar.framework/headers/SpecHelper.h @@ -0,0 +1,16 @@ +#import "CDRSpec.h" +#import "CDRSharedExampleGroupPool.h" +#import "CDRExampleParent.h" + +@interface SpecHelper : NSObject { + NSMutableDictionary *sharedExampleGroups_, *sharedExampleContext_; +} + +@property (nonatomic, retain, readonly) NSMutableDictionary *sharedExampleContext; + ++ (SpecHelper *)specHelper; + +- (void)beforeEach; +- (void)afterEach; + +@end diff --git a/ConciseKitSpecs/Frameworks/Cedar.framework/resources/Info.plist b/ConciseKitSpecs/Frameworks/Cedar.framework/resources/Info.plist new file mode 100644 index 0000000..69da723 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/Cedar.framework/resources/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + Cedar + CFBundleIdentifier + com.yourcompany.Cedar + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers deleted file mode 120000 index a177d2a..0000000 --- a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers +++ /dev/null @@ -1 +0,0 @@ -Versions/Current/Headers \ No newline at end of file diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCAllOf.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCAllOf.h new file mode 100644 index 0000000..2542e5b --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCAllOf.h @@ -0,0 +1,52 @@ +// +// OCHamcrest - HCAllOf.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "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. +*/ +@interface HCAllOf : HCBaseMatcher +{ + NSArray* matchers; +} + ++ (HCAllOf*) allOf:(NSArray*)theMatchers; +- (id) initWithMatchers:(NSArray*)theMatchers; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +/** + Evaluates to @c YES only if @b all of the passed in matchers evaluate to @c YES. + + @param matcher Comma-separated list of matchers ending with @c nil. +*/ +id HC_allOf(id matcher, ...); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_allOf, available if HC_SHORTHAND is defined. +*/ +#define allOf HC_allOf + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCAnyOf.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCAnyOf.h new file mode 100644 index 0000000..38b84d3 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCAnyOf.h @@ -0,0 +1,52 @@ +// +// OCHamcrest - HCAnyOf.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "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. +*/ +@interface HCAnyOf : HCBaseMatcher +{ + NSArray* matchers; +} + ++ (HCAnyOf*) anyOf:(NSArray*)theMatchers; +- (id) initWithMatchers:(NSArray*)theMatchers; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +/** + Evaluates to @c YES if @b any of the passed in matchers evaluate to @c YES. + + @param matcher Comma-separated list of matchers ending with @c nil. +*/ +id HC_anyOf(id matcher, ...); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_anyOf, available if HC_SHORTHAND is defined. +*/ +#define anyOf HC_anyOf + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCBaseDescription.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCBaseDescription.h new file mode 100644 index 0000000..18210a2 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCBaseDescription.h @@ -0,0 +1,30 @@ +// +// OCHamcrest - HCBaseDescription.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import +#import "HCDescription.h" + + +/** + Base class for all HCDescription implementations. +*/ +@interface HCBaseDescription : NSObject +@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 diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCBaseMatcher.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCBaseMatcher.h new file mode 100644 index 0000000..2478736 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCBaseMatcher.h @@ -0,0 +1,21 @@ +// +// OCHamcrest - HCBaseMatcher.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import +#import "HCMatcher.h" + + +/** + Base class for all Matcher implementations. + + Most implementations can just implement matches: and let matches:describingMismatchTo: call + it. But if it makes more sense to generate the mismatch description during the matching, + override matches:describingMismatchTo: and have matches: call it with a nil description. +*/ +@interface HCBaseMatcher : NSObject +@end diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCBoxNumber.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCBoxNumber.h new file mode 100644 index 0000000..692e668 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCBoxNumber.h @@ -0,0 +1,87 @@ +// +// OCHamcrest - HCBoxNumber.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + +#ifdef __cplusplus + +namespace hamcrest { + +/** + Boxes scalar value in NSNumber, specialized per type. +*/ +template +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 diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCDescribedAs.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCDescribedAs.h new file mode 100644 index 0000000..ce01d2a --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCDescribedAs.h @@ -0,0 +1,56 @@ +// +// OCHamcrest - HCDescribedAs.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseMatcher.h" + + +/** + Provides a custom description to another matcher. +*/ +@interface HCDescribedAs : HCBaseMatcher +{ + NSString* descriptionTemplate; + id matcher; + NSArray* values; +} + ++ (HCDescribedAs*) describedAs:(NSString*)description + forMatcher:(id)aMatcher + overValues:(NSArray*)templateValues; +- (id) initWithDescription:(NSString*)description + forMatcher:(id)aMatcher + overValues:(NSArray*)templateValues; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +/** + Wraps an existing matcher and overrides the description when it fails. + + Optional values following the matcher are substituted for \%0, \%1, etc. + The last argument must be nil. +*/ +id HC_describedAs(NSString* description, id matcher, ...); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_describedAs, available if HC_SHORTHAND is defined. +*/ +#define describedAs HC_describedAs + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCDescription.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCDescription.h new file mode 100644 index 0000000..b9e56a5 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCDescription.h @@ -0,0 +1,46 @@ +// +// OCHamcrest - HCDescription.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Mac +#import + +@protocol HCSelfDescribing; + + +/** + A description of an HCMatcher. + + An HCMatcher will describe itself to a description which can later be used for reporting. +*/ +@protocol HCDescription + +/** + Appends some plain text to the description. + + @return self +*/ +- (id) appendText:(NSString*)text; + +/** + Appends description of HCSelfDescribing value to self. + + @return self +*/ +- (id) appendDescriptionOf:(id)value; + +/** + Appends an arbitary value to the description. +*/ +- (id) appendValue:(id)value; + +/** + Appends a list of objects to the description. +*/ +- (id) appendList:(NSArray*)values + start:(NSString*)start separator:(NSString*)separator end:(NSString*)end; + +@end diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCHasDescription.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCHasDescription.h new file mode 100644 index 0000000..4811846 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCHasDescription.h @@ -0,0 +1,48 @@ +// +// OCHamcrest - HCHasDescription.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCInvocationMatcher.h" + + +/** + Does the object's description satisfy a given matcher? +*/ +@interface HCHasDescription : HCInvocationMatcher +{ +} + ++ (HCHasDescription*) hasDescription:(id)descriptionMatcher; +- (id) initWithDescription:(id)descriptionMatcher; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +/** + Evaluates whether [item description] satisfies a given matcher. + + Example: hasDescription(equalTo(result)) +*/ +id HC_hasDescription(id item); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_hasDescription, available if HC_SHORTHAND is defined. +*/ +#define hasDescription HC_hasDescription + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCInvocationMatcher.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCInvocationMatcher.h new file mode 100755 index 0000000..424e7a0 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCInvocationMatcher.h @@ -0,0 +1,37 @@ +// +// OCHamcrest - HCInvocationMatcher.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseMatcher.h" + + +/** + Supporting class for matching a feature of an object. + + Tests whether the result of passing a given invocation to the value satisfies a given matcher. +*/ +@interface HCInvocationMatcher : HCBaseMatcher +{ + NSInvocation* invocation; + id subMatcher; +} + +/** + Helper method for creating an invocation. + + A class is specified only so we can determine the method signature. +*/ ++ (NSInvocation*) createInvocationForSelector:(SEL)selector onClass:(Class)aClass; + +- (id) initWithInvocation:(NSInvocation*)anInvocation matching:(id)aMatcher; + +/** + Returns string representation of the invocation's selector. +*/ +- (NSString*) stringFromSelector; + +@end diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIs.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIs.h new file mode 100644 index 0000000..be849bc --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIs.h @@ -0,0 +1,66 @@ +// +// OCHamcrest - HCIs.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseMatcher.h" + + +/** + Decorates another HCMatcher, retaining the behavior but allowing tests to be slightly more + expressive. + + For example: +@code +assertThat(cheese, equalTo(smelly)) +@endcode + vs. +@code +assertThat(cheese, is(equalTo(smelly))) +@endcode +*/ +@interface HCIs : HCBaseMatcher +{ + id matcher; +} + ++ (HCIs*) is:(id)aMatcher; +- (id) initWithMatcher:(id)aMatcher; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +/** + Decorates an item, providing shortcuts to the frequently used is(equalTo(x)). + + For example: +@code +assertThat(cheese, is(equalTo(smelly))) +@endcode + vs. +@code +assertThat(cheese, is(smelly)) +@endcode +*/ +id HC_is(id item); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_is, available if HC_SHORTHAND is defined. +*/ +#define is HC_is + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsAnything.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsAnything.h new file mode 100644 index 0000000..ddbca36 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsAnything.h @@ -0,0 +1,61 @@ +// +// OCHamcrest - HCIsAnything.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseMatcher.h" + + +/** + A matcher that always returns @c YES. +*/ +@interface HCIsAnything : HCBaseMatcher +{ + NSString* description; +} + ++ (HCIsAnything*) isAnything; ++ (HCIsAnything*) isAnythingWithDescription:(NSString*)aDescription; +- (id) init; +- (id) initWithDescription:(NSString*)aDescription; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +/** + This matcher always evaluates to @c YES. +*/ +id HC_anything(); + +/** + This matcher always evaluates to YES. + + @param aDescription A meaningful string used when describing itself. +*/ +id HC_anythingWithDescription(NSString* aDescription); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_anything, available if HC_SHORTHAND is defined. +*/ +#define anything HC_anything + +/** + Shorthand for HC_anythingWithDescription, available if HC_SHORTHAND is defined. +*/ +#define anythingWithDescription HC_anythingWithDescription + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsCloseTo.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsCloseTo.h new file mode 100644 index 0000000..f2fae03 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsCloseTo.h @@ -0,0 +1,48 @@ +// +// OCHamcrest - HCIsCloseTo.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseMatcher.h" + + +/** + Is the value a number equal to a value within some range of acceptable error? +*/ +@interface HCIsCloseTo : HCBaseMatcher +{ + double value; + double error; +} + ++ (HCIsCloseTo*) isCloseTo:(double)aValue within:(double)anError; +- (id) initWithValue:(double)aValue error:(double)anError; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +/** + Is the value a number equal to a value within some range of acceptable error? +*/ +id HC_closeTo(double aValue, double anError); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_closeTo, available if HC_SHORTHAND is defined. +*/ +#define closeTo HC_closeTo + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsCollectionContaining.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsCollectionContaining.h new file mode 100644 index 0000000..d5c8320 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsCollectionContaining.h @@ -0,0 +1,51 @@ +// +// OCHamcrest - HCIsCollectionContaining.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseMatcher.h" + + +@interface HCIsCollectionContaining : HCBaseMatcher +{ + id elementMatcher; +} + ++ (HCIsCollectionContaining*) isCollectionContaining:(id)anElementMatcher; +- (id) initWithMatcher:(id)anElementMatcher; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +id HC_hasItem(id item); + +/** + @param item comma-separated list of items ending with nil. +*/ +id HC_hasItems(id item, ...); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_hasItem, available if HC_SHORTHAND is defined. +*/ +#define hasItem HC_hasItem + +/** + Shorthand for HC_hasItems, available if HC_SHORTHAND is defined. +*/ +#define hasItems HC_hasItems + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsCollectionOnlyContaining.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsCollectionOnlyContaining.h new file mode 100644 index 0000000..73aad52 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsCollectionOnlyContaining.h @@ -0,0 +1,60 @@ +// +// OCHamcrest - HCIsCollectionOnlyContaining.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseMatcher.h" + + +/** + Matches collections that only contain elements satisfying a given matcher. + + This matcher will never match an empty collection. +*/ +@interface HCIsCollectionOnlyContaining : HCBaseMatcher +{ + id matcher; +} + ++ (HCIsCollectionOnlyContaining*) isCollectionOnlyContaining:(id)aMatcher; +- (id) initWithMatcher:(id)aMatcher; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +/** + Matches collections that only contain elements satisfying any of a list of items. + + For example, + [NSArray arrayWithObjects:@"a", "b", @"c", nil] + would satisfy + onlyContains(lessThan(@"d"), nil). + + If an item is not a matcher, it is equivalent to equalTo(item), so the array in the example + above would also satisfy + onlyContains(@"a", @"b", @"c", nil). + + @param item comma-separated list of items ending with nil. +*/ +id HC_onlyContains(id item, ...); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_onlyContains, available if HC_SHORTHAND is defined. +*/ +#define onlyContains HC_onlyContains + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsDictionaryContaining.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsDictionaryContaining.h new file mode 100644 index 0000000..448553b --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsDictionaryContaining.h @@ -0,0 +1,43 @@ +// +// OCHamcrest - HCIsDictionaryContaining.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseMatcher.h" + + +@interface HCIsDictionaryContaining : HCBaseMatcher +{ + id keyMatcher; + id valueMatcher; +} + ++ (HCIsDictionaryContaining*) isDictionaryContainingKey:(id)theKeyMatcher + value:(id)theValueMatcher; +- (id) initWithKeyMatcher:(id)theKeyMatcher valueMatcher:(id)theValueMatcher; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +id HC_hasEntry(id key, id value); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_hasEntry, available if HC_SHORTHAND is defined. +*/ +#define hasEntry HC_hasEntry + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsDictionaryContainingKey.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsDictionaryContainingKey.h new file mode 100644 index 0000000..3b75c30 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsDictionaryContainingKey.h @@ -0,0 +1,41 @@ +// +// OCHamcrest - HCIsDictionaryContainingKey.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseMatcher.h" + + +@interface HCIsDictionaryContainingKey : HCBaseMatcher +{ + id keyMatcher; +} + ++ (HCIsDictionaryContainingKey*) isDictionaryContainingKey:(id)theKeyMatcher; +- (id) initWithKeyMatcher:(id)theKeyMatcher; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +id HC_hasKey(id item); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_hasKey, available if HC_SHORTHAND is defined. +*/ +#define hasKey HC_hasKey + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsDictionaryContainingValue.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsDictionaryContainingValue.h new file mode 100644 index 0000000..f2332ac --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsDictionaryContainingValue.h @@ -0,0 +1,41 @@ +// +// OCHamcrest - HCIsDictionaryContainingValue.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseMatcher.h" + + +@interface HCIsDictionaryContainingValue : HCBaseMatcher +{ + id valueMatcher; +} + ++ (HCIsDictionaryContainingValue*) isDictionaryContainingValue:(id)theValueMatcher; +- (id) initWithValueMatcher:(id)theValueMatcher; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +id HC_hasValue(id item); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_hasValue, available if HC_SHORTHAND is defined. +*/ +#define hasValue HC_hasValue + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsEqual.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsEqual.h new file mode 100644 index 0000000..64801c9 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsEqual.h @@ -0,0 +1,47 @@ +// +// OCHamcrest - HCIsEqual.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseMatcher.h" + + +/** + Is the object equal to another object, as tested by the isEqual: method? +*/ +@interface HCIsEqual : HCBaseMatcher +{ + id object; +} + ++ (HCIsEqual*) isEqualTo:(id)equalArg; +- (id) initEqualTo:(id)equalArg; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +/** + Is the object equal to another object, as tested by the isEqual: method? +*/ +id HC_equalTo(id equalArg); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_equalTo, available if HC_SHORTHAND is defined. +*/ +#define equalTo HC_equalTo + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsEqualIgnoringCase.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsEqualIgnoringCase.h new file mode 100644 index 0000000..8986382 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsEqualIgnoringCase.h @@ -0,0 +1,44 @@ +// +// OCHamcrest - HCIsEqualIgnoringCase.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseMatcher.h" + + +/** + Tests if a string is equal to another string, regardless of the case. +*/ +@interface HCIsEqualIgnoringCase : HCBaseMatcher +{ + NSString* string; +} + ++ (HCIsEqualIgnoringCase*) isEqualIgnoringCase:(NSString*)aString; +- (id) initWithString:(NSString*)aString; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +id HC_equalToIgnoringCase(NSString* aString); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_endsWith, available if HC_SHORTHAND is defined. +*/ +#define equalToIgnoringCase HC_equalToIgnoringCase + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsEqualIgnoringWhiteSpace.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsEqualIgnoringWhiteSpace.h new file mode 100644 index 0000000..636f257 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsEqualIgnoringWhiteSpace.h @@ -0,0 +1,45 @@ +// +// OCHamcrest - HCIsEqualIgnoringWhiteSpace.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseMatcher.h" + + +/** + Tests if a string is equal to another string, ignoring any changes in whitespace. +*/ +@interface HCIsEqualIgnoringWhiteSpace : HCBaseMatcher +{ + NSString* originalString; + NSString* strippedString; +} + ++ (HCIsEqualIgnoringWhiteSpace*) isEqualIgnoringWhiteSpace:(NSString*)aString; +- (id) initWithString:(NSString*)aString; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +id HC_equalToIgnoringWhiteSpace(NSString* aString); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_endsWith, available if HC_SHORTHAND is defined. +*/ +#define equalToIgnoringWhiteSpace HC_equalToIgnoringWhiteSpace + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsEqualToNumber.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsEqualToNumber.h new file mode 100644 index 0000000..70e6407 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsEqualToNumber.h @@ -0,0 +1,185 @@ +// +// OCHamcrest - HCIsEqualToNumber.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseMatcher.h" + + +#ifdef __cplusplus +extern "C" { +#endif + +/** + Is the value, when converted to an NSNumber, equal to another object? +*/ +id HC_equalToBool(BOOL value); + +/** + Is the value, when converted to an NSNumber, equal to another object? +*/ +id HC_equalToChar(char value); + +/** + Is the value, when converted to an NSNumber, equal to another object? +*/ +id HC_equalToDouble(double value); + +/** + Is the value, when converted to an NSNumber, equal to another object? +*/ +id HC_equalToFloat(float value); + +/** + Is the value, when converted to an NSNumber, equal to another object? +*/ +id HC_equalToInt(int value); + +/** + Is the value, when converted to an NSNumber, equal to another object? +*/ +id HC_equalToLong(long value); + +/** + Is the value, when converted to an NSNumber, equal to another object? +*/ +id HC_equalToLongLong(long long value); + +/** + Is the value, when converted to an NSNumber, equal to another object? +*/ +id HC_equalToShort(short value); + +/** + Is the value, when converted to an NSNumber, equal to another object? +*/ +id HC_equalToUnsignedChar(unsigned char value); + +/** + Is the value, when converted to an NSNumber, equal to another object? +*/ +id HC_equalToUnsignedInt(unsigned int value); + +/** + Is the value, when converted to an NSNumber, equal to another object? +*/ +id HC_equalToUnsignedLong(unsigned long value); + +/** + Is the value, when converted to an NSNumber, equal to another object? +*/ +id HC_equalToUnsignedLongLong(unsigned long long value); + +/** + Is the value, when converted to an NSNumber, equal to another object? +*/ +id HC_equalToUnsignedShort(unsigned short value); + + +#if defined(OBJC_API_VERSION) && OBJC_API_VERSION >= 2 + +/** + Is the value, when converted to an NSNumber, equal to another object? +*/ +id HC_equalToInteger(NSInteger value); + +/** + Is the value, when converted to an NSNumber, equal to another object? +*/ +id HC_equalToUnsignedInteger(NSUInteger value); + +#endif // Objective-C 2.0 + + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_equalToBool, available if HC_SHORTHAND is defined. +*/ +#define equalToBool HC_equalToBool + +/** + Shorthand for HC_equalToChar, available if HC_SHORTHAND is defined. +*/ +#define equalToChar HC_equalToChar + +/** + Shorthand for HC_equalToDouble, available if HC_SHORTHAND is defined. +*/ +#define equalToDouble HC_equalToDouble + +/** + Shorthand for HC_equalToFloat, available if HC_SHORTHAND is defined. +*/ +#define equalToFloat HC_equalToFloat + +/** + Shorthand for HC_equalToInt, available if HC_SHORTHAND is defined. +*/ +#define equalToInt HC_equalToInt + +/** + Shorthand for HC_equalToLong, available if HC_SHORTHAND is defined. +*/ +#define equalToLong HC_equalToLong + +/** + Shorthand for HC_equalToLongLong, available if HC_SHORTHAND is defined. +*/ +#define equalToLongLong HC_equalToLongLong + +/** + Shorthand for HC_equalToShort, available if HC_SHORTHAND is defined. +*/ +#define equalToShort HC_equalToShort + +/** + Shorthand for HC_equalToUnsignedChar, available if HC_SHORTHAND is defined. +*/ +#define equalToUnsignedChar HC_equalToUnsignedChar + +/** + Shorthand for HC_equalToUnsignedInt, available if HC_SHORTHAND is defined. +*/ +#define equalToUnsignedInt HC_equalToUnsignedInt + +/** + Shorthand for HC_equalToUnsignedLong, available if HC_SHORTHAND is defined. +*/ +#define equalToUnsignedLong HC_equalToUnsignedLong + +/** + Shorthand for HC_equalToUnsignedLongLong, available if HC_SHORTHAND is defined. +*/ +#define equalToUnsignedLongLong HC_equalToUnsignedLongLong + +/** + Shorthand for HC_equalToUnsignedShort, available if HC_SHORTHAND is defined. +*/ +#define equalToUnsignedShort HC_equalToUnsignedShort + + +#if defined(OBJC_API_VERSION) && OBJC_API_VERSION >= 2 + +/** + Shorthand for HC_equalToInteger, available if HC_SHORTHAND is defined. +*/ +#define equalToInteger HC_equalToInteger + +/** + Shorthand for HC_equalToUnsignedInteger, available if HC_SHORTHAND is defined. +*/ +#define equalToUnsignedInteger HC_equalToUnsignedInteger + +#endif // Objective-C 2.0 + + +#endif // HC_SHORTHAND diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsIn.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsIn.h new file mode 100644 index 0000000..361dfa0 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsIn.h @@ -0,0 +1,41 @@ +// +// OCHamcrest - HCIsIn.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseMatcher.h" + + +@interface HCIsIn : HCBaseMatcher +{ + id collection; +} + ++ (HCIsIn*) isInCollection:(id)aCollection; +- (id) initWithCollection:(id)aCollection; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +id HC_isIn(id collection); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_isIn, available if HC_SHORTHAND is defined. +*/ +#define isIn HC_isIn + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsInstanceOf.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsInstanceOf.h new file mode 100644 index 0000000..89cc04e --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsInstanceOf.h @@ -0,0 +1,47 @@ +// +// OCHamcrest - HCIsInstanceOf.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseMatcher.h" + + +/** + Tests whether the value is an instance of a class (including subclasses). +*/ +@interface HCIsInstanceOf : HCBaseMatcher +{ + Class theClass; +} + ++ (HCIsInstanceOf*) isInstanceOf:(Class)type; +- (id) initWithType:(Class)type; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +/** + Is the value an instance of a particular type? +*/ +id HC_instanceOf(Class type); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_instanceOf, available if HC_SHORTHAND is defined. +*/ +#define instanceOf HC_instanceOf + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsNil.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsNil.h new file mode 100644 index 0000000..e270411 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsNil.h @@ -0,0 +1,55 @@ +// +// OCHamcrest - HCIsNil.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseMatcher.h" + + +/** + Is the value @c nil? +*/ +@interface HCIsNil : HCBaseMatcher +{ +} + ++ (HCIsNil*) isNil; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +/** + Matches if the value is @c nil. +*/ +id HC_nilValue(); + +/** + Matches if the value is not @c nil. +*/ +id HC_notNilValue(); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_nilValue, available if HC_SHORTHAND is defined. +*/ +#define nilValue HC_nilValue + +/** + Shorthand for HC_notNilValue, available if HC_SHORTHAND is defined. +*/ +#define notNilValue HC_notNilValue + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsNot.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsNot.h new file mode 100644 index 0000000..2ff5c7b --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsNot.h @@ -0,0 +1,56 @@ +// +// OCHamcrest - HCIsNot.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseMatcher.h" + + +/** + Calculates the logical negation of a matcher. +*/ +@interface HCIsNot : HCBaseMatcher +{ + id matcher; +} + ++ (HCIsNot*) isNot:(id)aMatcher; +- (id) initNot:(id)aMatcher; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +/** + Inverts the rule, providing a shortcut to the frequently used isNot(equalTo(x)). + + For example: +@code +assertThat(cheese, isNot(equalTo(smelly))) +@endcode + vs. +@code +assertThat(cheese, isNot(smelly)) +@endcode +*/ +id HC_isNot(id item); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_isNot, available if HC_SHORTHAND is defined. +*/ +#define isNot HC_isNot + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsSame.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsSame.h new file mode 100644 index 0000000..dbbf29c --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCIsSame.h @@ -0,0 +1,47 @@ +// +// OCHamcrest - HCIsSame.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseMatcher.h" + + +/** + Is the value the same object as another value? +*/ +@interface HCIsSame : HCBaseMatcher +{ + id object; +} + ++ (HCIsSame*) isSameAs:(id)anObject; +- (id) initSameAs:(id)anObject; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +/** + Evaluates to @c YES only when the argument is this same object. +*/ +id HC_sameInstance(id anObject); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_sameInstance, available if HC_SHORTHAND is defined. +*/ +#define sameInstance HC_sameInstance + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCMatcher.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCMatcher.h new file mode 100644 index 0000000..77dfd44 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCMatcher.h @@ -0,0 +1,52 @@ +// +// OCHamcrest - HCMatcher.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCSelfDescribing.h" + + +/** + A matcher over acceptable values. + + A matcher is able to describe itself to give feedback when it fails. + + HCMatcher implementations should @b not directly implement this protocol. + Instead, @b extend the HCBaseMatcher class, which will ensure that the HCMatcher API can grow + to support new features and remain compatible with all HCMatcher implementations. +*/ +@protocol HCMatcher + +/** + Evaluates the matcher for argument @a item. + + @param item The object against which the matcher is evaluated. + @return @c YES if @a item matches, otherwise @c NO. +*/ +- (BOOL) matches:(id)item; + +/** + Evaluates the matcher for argument @a item. + + @param item The object against which the matcher is evaluated. + @param mismatchDescription The description to be built or appended to if @item does not match. + @return @c YES if @a item matches, otherwise @c NO. +*/ +- (BOOL) matches:(id)item describingMismatchTo:(id)mismatchDescription; + +/** + Generates a description of why the matcher has not accepted the item. + + The description will be part of a larger description of why a matching failed, so it should be + concise. + This method assumes that @c matches:item is false, but will not check this. + + @param item The item that the HCMatcher has rejected. + @param mismatchDescription The description to be built or appended to. +*/ +- (void) describeMismatchOf:(id)item to:(id)mismatchDescription; + +@end diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCMatcherAssert.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCMatcherAssert.h new file mode 100644 index 0000000..41305a9 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCMatcherAssert.h @@ -0,0 +1,36 @@ +// +// OCHamcrest - HCMatcherAssert.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + +@protocol HCMatcher; + + +#ifdef __cplusplus +extern "C" { +#endif + +void HC_assertThatWithLocation(id testCase, id actual, id matcher, + const char* fileName, int lineNumber); + +#ifdef __cplusplus +} +#endif + +/** + OCUnit integration asserting that actual value satisfies matcher. +*/ +#define HC_assertThat(actual, matcher) \ + HC_assertThatWithLocation(self, actual, matcher, __FILE__, __LINE__) + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_assertThat, available if HC_SHORTHAND is defined. +*/ +#define assertThat HC_assertThat + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCNumberAssert.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCNumberAssert.h new file mode 100644 index 0000000..0c03643 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCNumberAssert.h @@ -0,0 +1,248 @@ +// +// OCHamcrest - HCNumberAssert.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + +#import + +@protocol HCMatcher; + + +#ifdef __cplusplus +extern "C" { +#endif + +void HC_assertThatBoolWithLocation(id testCase, BOOL actual, + id matcher, const char* fileName, int lineNumber); + +void HC_assertThatCharWithLocation(id testCase, char actual, + id matcher, const char* fileName, int lineNumber); + +void HC_assertThatDoubleWithLocation(id testCase, double actual, + id matcher, const char* fileName, int lineNumber); + +void HC_assertThatFloatWithLocation(id testCase, float actual, + id matcher, const char* fileName, int lineNumber); + +void HC_assertThatIntWithLocation(id testCase, int actual, + id matcher, const char* fileName, int lineNumber); + +void HC_assertThatLongWithLocation(id testCase, long actual, + id matcher, const char* fileName, int lineNumber); + +void HC_assertThatLongLongWithLocation(id testCase, long long actual, + id matcher, const char* fileName, int lineNumber); + +void HC_assertThatShortWithLocation(id testCase, short actual, + id matcher, const char* fileName, int lineNumber); + +void HC_assertThatUnsignedCharWithLocation(id testCase, unsigned char actual, + id matcher, const char* fileName, int lineNumber); + +void HC_assertThatUnsignedIntWithLocation(id testCase, unsigned int actual, + id matcher, const char* fileName, int lineNumber); + +void HC_assertThatUnsignedLongWithLocation(id testCase, unsigned long actual, + id matcher, const char* fileName, int lineNumber); + +void HC_assertThatUnsignedLongLongWithLocation(id testCase, unsigned long long actual, + id matcher, const char* fileName, int lineNumber); + +void HC_assertThatUnsignedShortWithLocation(id testCase, unsigned short actual, + id matcher, const char* fileName, int lineNumber); + +#if defined(OBJC_API_VERSION) && OBJC_API_VERSION >= 2 + +void HC_assertThatIntegerWithLocation(id testCase, NSInteger actual, + id matcher, const char* fileName, int lineNumber); + +void HC_assertThatUnsignedIntegerWithLocation(id testCase, NSUInteger actual, + id matcher, const char* fileName, int lineNumber); + +#endif // Objective-C 2.0 + +#ifdef __cplusplus +} +#endif + +/** + OCUnit integration asserting that actual value, when converted to an NSNumber satisfies matcher. +*/ +#define HC_assertThatBool(actual, matcher) \ + HC_assertThatBoolWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + OCUnit integration asserting that actual value, when converted to an NSNumber satisfies matcher. +*/ +#define HC_assertThatChar(actual, matcher) \ + HC_assertThatCharWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + OCUnit integration asserting that actual value, when converted to an NSNumber satisfies matcher. +*/ +#define HC_assertThatDouble(actual, matcher) \ + HC_assertThatDoubleWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + OCUnit integration asserting that actual value, when converted to an NSNumber satisfies matcher. +*/ +#define HC_assertThatFloat(actual, matcher) \ + HC_assertThatFloatWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + OCUnit integration asserting that actual value, when converted to an NSNumber satisfies matcher. +*/ +#define HC_assertThatInt(actual, matcher) \ + HC_assertThatIntWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + OCUnit integration asserting that actual value, when converted to an NSNumber satisfies matcher. +*/ +#define HC_assertThatLong(actual, matcher) \ + HC_assertThatLongWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + OCUnit integration asserting that actual value, when converted to an NSNumber satisfies matcher. +*/ +#define HC_assertThatLongLong(actual, matcher) \ + HC_assertThatLongLongWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + OCUnit integration asserting that actual value, when converted to an NSNumber satisfies matcher. +*/ +#define HC_assertThatShort(actual, matcher) \ + HC_assertThatShortWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + OCUnit integration asserting that actual value, when converted to an NSNumber satisfies matcher. +*/ +#define HC_assertThatUnsignedChar(actual, matcher) \ + HC_assertThatUnsignedCharWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + OCUnit integration asserting that actual value, when converted to an NSNumber satisfies matcher. +*/ +#define HC_assertThatUnsignedInt(actual, matcher) \ + HC_assertThatUnsignedIntWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + OCUnit integration asserting that actual value, when converted to an NSNumber satisfies matcher. +*/ +#define HC_assertThatUnsignedLong(actual, matcher) \ + HC_assertThatUnsignedLongWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + OCUnit integration asserting that actual value, when converted to an NSNumber satisfies matcher. +*/ +#define HC_assertThatUnsignedLongLong(actual, matcher) \ + HC_assertThatUnsignedLongLongWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + OCUnit integration asserting that actual value, when converted to an NSNumber satisfies matcher. +*/ +#define HC_assertThatUnsignedShort(actual, matcher) \ + HC_assertThatUnsignedShortWithLocation(self, actual, matcher, __FILE__, __LINE__) + + +#if defined(OBJC_API_VERSION) && OBJC_API_VERSION >= 2 + +/** + OCUnit integration asserting that actual value, when converted to an NSNumber satisfies matcher. +*/ +#define HC_assertThatInteger(actual, matcher) \ + HC_assertThatIntegerWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + OCUnit integration asserting that actual value, when converted to an NSNumber satisfies matcher. +*/ +#define HC_assertThatUnsignedInteger(actual, matcher) \ + HC_assertThatUnsignedIntegerWithLocation(self, actual, matcher, __FILE__, __LINE__) + +#endif // Objective-C 2.0 + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_assertThatBool, available if HC_SHORTHAND is defined. +*/ +#define assertThatBool HC_assertThatBool + +/** + Shorthand for HC_assertThatChar, available if HC_SHORTHAND is defined. +*/ +#define assertThatChar HC_assertThatChar + +/** + Shorthand for HC_assertThatDouble, available if HC_SHORTHAND is defined. +*/ +#define assertThatDouble HC_assertThatDouble + +/** + Shorthand for HC_assertThatFloat, available if HC_SHORTHAND is defined. +*/ +#define assertThatFloat HC_assertThatFloat + +/** + Shorthand for HC_assertThatInt, available if HC_SHORTHAND is defined. +*/ +#define assertThatInt HC_assertThatInt + +/** + Shorthand for HC_assertThatLong, available if HC_SHORTHAND is defined. +*/ +#define assertThatLong HC_assertThatLong + +/** + Shorthand for HC_assertThatLongLong, available if HC_SHORTHAND is defined. +*/ +#define assertThatLongLong HC_assertThatLongLong + +/** + Shorthand for HC_assertThatShort, available if HC_SHORTHAND is defined. +*/ +#define assertThatShort HC_assertThatShort + +/** + Shorthand for HC_assertThatUnsignedChar, available if HC_SHORTHAND is defined. +*/ +#define assertThatUnsignedChar HC_assertThatUnsignedChar + +/** + Shorthand for HC_assertThatUnsignedInt, available if HC_SHORTHAND is defined. +*/ +#define assertThatUnsignedInt HC_assertThatUnsignedInt + +/** + Shorthand for HC_assertThatUnsignedLong, available if HC_SHORTHAND is defined. +*/ +#define assertThatUnsignedLong HC_assertThatUnsignedLong + +/** + Shorthand for HC_assertThatUnsignedLongLong, available if HC_SHORTHAND is defined. +*/ +#define assertThatUnsignedLongLong HC_assertThatUnsignedLongLong + +/** + Shorthand for HC_assertThatInt, available if HC_SHORTHAND is defined. +*/ +#define assertThatUnsignedShort HC_assertThatUnsignedShort + + +#if defined(OBJC_API_VERSION) && OBJC_API_VERSION >= 2 + +/** + Shorthand for HC_assertThatInt, available if HC_SHORTHAND is defined. +*/ +#define assertThatInteger HC_assertThatInteger + +/** + Shorthand for HC_assertThatInt, available if HC_SHORTHAND is defined. +*/ +#define assertThatUnsignedInteger HC_assertThatUnsignedInteger + +#endif // Objective-C 2.0 + +#endif // HC_SHORTHAND diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCOrderingComparison.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCOrderingComparison.h new file mode 100644 index 0000000..8371e0c --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCOrderingComparison.h @@ -0,0 +1,80 @@ +// +// OCHamcrest - HCOrderingComparison.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseMatcher.h" + + +@interface HCOrderingComparison : HCBaseMatcher +{ + id value; + NSComparisonResult minCompare; + NSComparisonResult maxCompare; +} + ++ (HCOrderingComparison*) compare:(id)aValue + minCompare:(NSComparisonResult)min + maxCompare:(NSComparisonResult)max; +- (id) initComparing:(id)aValue + minCompare:(NSComparisonResult)min + maxCompare:(NSComparisonResult)max; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +/** + Is value > expected? +*/ +id HC_greaterThan(id aValue); + +/** + Is value >= expected? +*/ +id HC_greaterThanOrEqualTo(id aValue); + +/** + Is value < expected? +*/ +id HC_lessThan(id aValue); + +/** + Is value <= expected? +*/ +id HC_lessThanOrEqualTo(id aValue); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_greaterThan, available if HC_SHORTHAND is defined. +*/ +#define greaterThan HC_greaterThan + +/** + Shorthand for HC_greaterThan, available if HC_SHORTHAND is defined. +*/ +#define greaterThanOrEqualTo HC_greaterThanOrEqualTo + +/** + Shorthand for HC_greaterThan, available if HC_SHORTHAND is defined. +*/ +#define lessThan HC_lessThan + +/** + Shorthand for HC_lessThanOrEqualTo, available if HC_SHORTHAND is defined. +*/ +#define lessThanOrEqualTo HC_lessThanOrEqualTo + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCRequireNonNilString.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCRequireNonNilString.h new file mode 100644 index 0000000..a1da0e8 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCRequireNonNilString.h @@ -0,0 +1,28 @@ +// +// OCHamcrest - HCRequireNonNilString.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Mac +#import + + +namespace hamcrest { + +/** + Throws an NSException if @a string is nil. +*/ +inline +void requireNonNilString(NSString* string) +{ + if (string == nil) + { + @throw [NSException exceptionWithName: @"NotAString" + reason: @"Must be non-nil string" + userInfo: nil]; + } +} + +} // namespace hamcrest diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCSelfDescribing.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCSelfDescribing.h new file mode 100644 index 0000000..52a6fbd --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCSelfDescribing.h @@ -0,0 +1,29 @@ +// +// OCHamcrest - HCSelfDescribing.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import + +@protocol HCDescription; + + +/** + The ability of an object to describe itself. +*/ +@protocol HCSelfDescribing + +/** + Generates a description of the object. + + The description may be part of a description of a larger object of which this is just a + component, so it should be worded appropriately. + + @param description The description to be built or appended to. +*/ +- (void) describeTo:(id)description; + +@end diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCStringContains.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCStringContains.h new file mode 100644 index 0000000..1eb9b45 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCStringContains.h @@ -0,0 +1,42 @@ +// +// OCHamcrest - HCStringContains.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCSubstringMatcher.h" + + +/** + Tests if the argument is a string that contains a substring. +*/ +@interface HCStringContains : HCSubstringMatcher +{ +} + ++ (HCStringContains*) stringContains:(NSString*)aSubstring; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +id HC_containsString(NSString* aSubstring); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_containsString, available if HC_SHORTHAND is defined. +*/ +#define containsString HC_containsString + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCStringDescription.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCStringDescription.h new file mode 100644 index 0000000..b62f8d8 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCStringDescription.h @@ -0,0 +1,40 @@ +// +// OCHamcrest - HCStringDescription.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseDescription.h" + +@protocol HCSelfDescribing; + + +/** + An HCDescription that is stored as a string. +*/ +@interface HCStringDescription : HCBaseDescription +{ + NSMutableString* accumulator; +} + +/** + Returns the description of an HCSelfDescribing object as a string. + + @param selfDescribing The object to be described. + @return The description of the object. +*/ ++ (NSString*) stringFrom:(id)selfDescribing; + +/** + Returns an empty description. +*/ ++ (HCStringDescription*) stringDescription; + +/** + Returns an initialized HCStringDescription object that is empty. +*/ +- (id) init; + +@end diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCStringEndsWith.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCStringEndsWith.h new file mode 100644 index 0000000..c56275a --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCStringEndsWith.h @@ -0,0 +1,42 @@ +// +// OCHamcrest - HCStringEndsWith.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCSubstringMatcher.h" + + +/** + Tests if the argument is a string that ends with a substring. +*/ +@interface HCStringEndsWith : HCSubstringMatcher +{ +} + ++ (HCStringEndsWith*) stringEndsWith:(NSString*)aSubstring; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +id HC_endsWith(NSString* aSubstring); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_endsWith, available if HC_SHORTHAND is defined. +*/ +#define endsWith HC_endsWith + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCStringStartsWith.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCStringStartsWith.h new file mode 100644 index 0000000..3818437 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCStringStartsWith.h @@ -0,0 +1,42 @@ +// +// OCHamcrest - HCStringStartsWith.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCSubstringMatcher.h" + + +/** + Tests if the argument is a string that starts with a substring. +*/ +@interface HCStringStartsWith : HCSubstringMatcher +{ +} + ++ (HCStringStartsWith*) stringStartsWith:(NSString*)aSubstring; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +id HC_startsWith(NSString* aSubstring); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_startsWith, available if HC_SHORTHAND is defined. +*/ +#define startsWith HC_startsWith + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCSubstringMatcher.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCSubstringMatcher.h new file mode 100644 index 0000000..36ff578 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCSubstringMatcher.h @@ -0,0 +1,19 @@ +// +// OCHamcrest - HCSubstringMatcher.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseMatcher.h" + + +@interface HCSubstringMatcher : HCBaseMatcher +{ + NSString* substring; +} + +- (id) initWithSubstring:(NSString*)aSubstring; + +@end diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCWrapInMatcher.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCWrapInMatcher.h new file mode 100644 index 0000000..80f7ad2 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/HCWrapInMatcher.h @@ -0,0 +1,24 @@ +// +// OCHamcrest - HCWrapInMatcher.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + +@protocol HCMatcher; + + +#ifdef __cplusplus +extern "C" { +#endif + +/** + Returns @a item wrapped (if necessary) in an HCIsEqual matcher. + + @a item is returned as-is if it is already an HCMatcher. +*/ +id HC_wrapInMatcher(id item); + +#ifdef __cplusplus +} +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/OCHamcrest.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/OCHamcrest.h new file mode 100644 index 0000000..3f3e79f --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Headers/OCHamcrest.h @@ -0,0 +1,45 @@ +// +// OCHamcrest - OCHamcrest.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Unit test integration +#import "HCMatcherAssert.h" +#import "HCNumberAssert.h" + + // Core +#import "HCAllOf.h" +#import "HCAnyOf.h" +#import "HCDescribedAs.h" +#import "HCIs.h" +#import "HCIsAnything.h" +#import "HCIsEqual.h" +#import "HCIsInstanceOf.h" +#import "HCIsNil.h" +#import "HCIsNot.h" +#import "HCIsSame.h" + + // Library: Collection +#import "HCIsCollectionContaining.h" +#import "HCIsCollectionOnlyContaining.h" +#import "HCIsDictionaryContaining.h" +#import "HCIsDictionaryContainingKey.h" +#import "HCIsDictionaryContainingValue.h" +#import "HCIsIn.h" + + // Library: Number +#import "HCIsCloseTo.h" +#import "HCIsEqualToNumber.h" +#import "HCOrderingComparison.h" + + // Library: Object +#import "HCHasDescription.h" + + // Library: Text +#import "HCIsEqualIgnoringCase.h" +#import "HCIsEqualIgnoringWhiteSpace.h" +#import "HCStringContains.h" +#import "HCStringEndsWith.h" +#import "HCStringStartsWith.h" diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/OCHamcrest b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/OCHamcrest deleted file mode 120000 index 7d4d801..0000000 --- a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/OCHamcrest +++ /dev/null @@ -1 +0,0 @@ -Versions/Current/OCHamcrest \ No newline at end of file diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/OCHamcrest b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/OCHamcrest new file mode 100755 index 0000000..15f0518 Binary files /dev/null and b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/OCHamcrest differ diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Resources b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Resources deleted file mode 120000 index 953ee36..0000000 --- a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Resources +++ /dev/null @@ -1 +0,0 @@ -Versions/Current/Resources \ No newline at end of file diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Resources/Info.plist b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Resources/Info.plist new file mode 100644 index 0000000..e9a40a2 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Resources/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + OCHamcrest + CFBundleIdentifier + org.hamcrest + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + OCHamcrest + CFBundlePackageType + FMWK + CFBundleSignature + hamc + CFBundleVersion + 1.0 + + diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Resources/InfoPlist.strings b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Resources/InfoPlist.strings new file mode 100644 index 0000000..a6d420e Binary files /dev/null and b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Resources/InfoPlist.strings differ diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current deleted file mode 120000 index 8c7e5a6..0000000 --- a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current +++ /dev/null @@ -1 +0,0 @@ -A \ No newline at end of file diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCAllOf.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCAllOf.h new file mode 100644 index 0000000..2542e5b --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCAllOf.h @@ -0,0 +1,52 @@ +// +// OCHamcrest - HCAllOf.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "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. +*/ +@interface HCAllOf : HCBaseMatcher +{ + NSArray* matchers; +} + ++ (HCAllOf*) allOf:(NSArray*)theMatchers; +- (id) initWithMatchers:(NSArray*)theMatchers; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +/** + Evaluates to @c YES only if @b all of the passed in matchers evaluate to @c YES. + + @param matcher Comma-separated list of matchers ending with @c nil. +*/ +id HC_allOf(id matcher, ...); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_allOf, available if HC_SHORTHAND is defined. +*/ +#define allOf HC_allOf + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCAnyOf.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCAnyOf.h new file mode 100644 index 0000000..38b84d3 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCAnyOf.h @@ -0,0 +1,52 @@ +// +// OCHamcrest - HCAnyOf.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "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. +*/ +@interface HCAnyOf : HCBaseMatcher +{ + NSArray* matchers; +} + ++ (HCAnyOf*) anyOf:(NSArray*)theMatchers; +- (id) initWithMatchers:(NSArray*)theMatchers; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +/** + Evaluates to @c YES if @b any of the passed in matchers evaluate to @c YES. + + @param matcher Comma-separated list of matchers ending with @c nil. +*/ +id HC_anyOf(id matcher, ...); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_anyOf, available if HC_SHORTHAND is defined. +*/ +#define anyOf HC_anyOf + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCBaseDescription.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCBaseDescription.h new file mode 100644 index 0000000..18210a2 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCBaseDescription.h @@ -0,0 +1,30 @@ +// +// OCHamcrest - HCBaseDescription.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import +#import "HCDescription.h" + + +/** + Base class for all HCDescription implementations. +*/ +@interface HCBaseDescription : NSObject +@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 diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCBaseMatcher.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCBaseMatcher.h new file mode 100644 index 0000000..2478736 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCBaseMatcher.h @@ -0,0 +1,21 @@ +// +// OCHamcrest - HCBaseMatcher.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import +#import "HCMatcher.h" + + +/** + Base class for all Matcher implementations. + + Most implementations can just implement matches: and let matches:describingMismatchTo: call + it. But if it makes more sense to generate the mismatch description during the matching, + override matches:describingMismatchTo: and have matches: call it with a nil description. +*/ +@interface HCBaseMatcher : NSObject +@end diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCBoxNumber.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCBoxNumber.h new file mode 100644 index 0000000..692e668 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCBoxNumber.h @@ -0,0 +1,87 @@ +// +// OCHamcrest - HCBoxNumber.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + +#ifdef __cplusplus + +namespace hamcrest { + +/** + Boxes scalar value in NSNumber, specialized per type. +*/ +template +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 diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCDescribedAs.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCDescribedAs.h new file mode 100644 index 0000000..ce01d2a --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCDescribedAs.h @@ -0,0 +1,56 @@ +// +// OCHamcrest - HCDescribedAs.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseMatcher.h" + + +/** + Provides a custom description to another matcher. +*/ +@interface HCDescribedAs : HCBaseMatcher +{ + NSString* descriptionTemplate; + id matcher; + NSArray* values; +} + ++ (HCDescribedAs*) describedAs:(NSString*)description + forMatcher:(id)aMatcher + overValues:(NSArray*)templateValues; +- (id) initWithDescription:(NSString*)description + forMatcher:(id)aMatcher + overValues:(NSArray*)templateValues; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +/** + Wraps an existing matcher and overrides the description when it fails. + + Optional values following the matcher are substituted for \%0, \%1, etc. + The last argument must be nil. +*/ +id HC_describedAs(NSString* description, id matcher, ...); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_describedAs, available if HC_SHORTHAND is defined. +*/ +#define describedAs HC_describedAs + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCDescription.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCDescription.h new file mode 100644 index 0000000..b9e56a5 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCDescription.h @@ -0,0 +1,46 @@ +// +// OCHamcrest - HCDescription.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Mac +#import + +@protocol HCSelfDescribing; + + +/** + A description of an HCMatcher. + + An HCMatcher will describe itself to a description which can later be used for reporting. +*/ +@protocol HCDescription + +/** + Appends some plain text to the description. + + @return self +*/ +- (id) appendText:(NSString*)text; + +/** + Appends description of HCSelfDescribing value to self. + + @return self +*/ +- (id) appendDescriptionOf:(id)value; + +/** + Appends an arbitary value to the description. +*/ +- (id) appendValue:(id)value; + +/** + Appends a list of objects to the description. +*/ +- (id) appendList:(NSArray*)values + start:(NSString*)start separator:(NSString*)separator end:(NSString*)end; + +@end diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCHasDescription.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCHasDescription.h new file mode 100644 index 0000000..4811846 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCHasDescription.h @@ -0,0 +1,48 @@ +// +// OCHamcrest - HCHasDescription.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCInvocationMatcher.h" + + +/** + Does the object's description satisfy a given matcher? +*/ +@interface HCHasDescription : HCInvocationMatcher +{ +} + ++ (HCHasDescription*) hasDescription:(id)descriptionMatcher; +- (id) initWithDescription:(id)descriptionMatcher; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +/** + Evaluates whether [item description] satisfies a given matcher. + + Example: hasDescription(equalTo(result)) +*/ +id HC_hasDescription(id item); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_hasDescription, available if HC_SHORTHAND is defined. +*/ +#define hasDescription HC_hasDescription + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCInvocationMatcher.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCInvocationMatcher.h new file mode 100755 index 0000000..424e7a0 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCInvocationMatcher.h @@ -0,0 +1,37 @@ +// +// OCHamcrest - HCInvocationMatcher.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseMatcher.h" + + +/** + Supporting class for matching a feature of an object. + + Tests whether the result of passing a given invocation to the value satisfies a given matcher. +*/ +@interface HCInvocationMatcher : HCBaseMatcher +{ + NSInvocation* invocation; + id subMatcher; +} + +/** + Helper method for creating an invocation. + + A class is specified only so we can determine the method signature. +*/ ++ (NSInvocation*) createInvocationForSelector:(SEL)selector onClass:(Class)aClass; + +- (id) initWithInvocation:(NSInvocation*)anInvocation matching:(id)aMatcher; + +/** + Returns string representation of the invocation's selector. +*/ +- (NSString*) stringFromSelector; + +@end diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIs.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIs.h new file mode 100644 index 0000000..be849bc --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIs.h @@ -0,0 +1,66 @@ +// +// OCHamcrest - HCIs.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseMatcher.h" + + +/** + Decorates another HCMatcher, retaining the behavior but allowing tests to be slightly more + expressive. + + For example: +@code +assertThat(cheese, equalTo(smelly)) +@endcode + vs. +@code +assertThat(cheese, is(equalTo(smelly))) +@endcode +*/ +@interface HCIs : HCBaseMatcher +{ + id matcher; +} + ++ (HCIs*) is:(id)aMatcher; +- (id) initWithMatcher:(id)aMatcher; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +/** + Decorates an item, providing shortcuts to the frequently used is(equalTo(x)). + + For example: +@code +assertThat(cheese, is(equalTo(smelly))) +@endcode + vs. +@code +assertThat(cheese, is(smelly)) +@endcode +*/ +id HC_is(id item); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_is, available if HC_SHORTHAND is defined. +*/ +#define is HC_is + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsAnything.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsAnything.h new file mode 100644 index 0000000..ddbca36 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsAnything.h @@ -0,0 +1,61 @@ +// +// OCHamcrest - HCIsAnything.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseMatcher.h" + + +/** + A matcher that always returns @c YES. +*/ +@interface HCIsAnything : HCBaseMatcher +{ + NSString* description; +} + ++ (HCIsAnything*) isAnything; ++ (HCIsAnything*) isAnythingWithDescription:(NSString*)aDescription; +- (id) init; +- (id) initWithDescription:(NSString*)aDescription; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +/** + This matcher always evaluates to @c YES. +*/ +id HC_anything(); + +/** + This matcher always evaluates to YES. + + @param aDescription A meaningful string used when describing itself. +*/ +id HC_anythingWithDescription(NSString* aDescription); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_anything, available if HC_SHORTHAND is defined. +*/ +#define anything HC_anything + +/** + Shorthand for HC_anythingWithDescription, available if HC_SHORTHAND is defined. +*/ +#define anythingWithDescription HC_anythingWithDescription + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsCloseTo.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsCloseTo.h new file mode 100644 index 0000000..f2fae03 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsCloseTo.h @@ -0,0 +1,48 @@ +// +// OCHamcrest - HCIsCloseTo.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseMatcher.h" + + +/** + Is the value a number equal to a value within some range of acceptable error? +*/ +@interface HCIsCloseTo : HCBaseMatcher +{ + double value; + double error; +} + ++ (HCIsCloseTo*) isCloseTo:(double)aValue within:(double)anError; +- (id) initWithValue:(double)aValue error:(double)anError; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +/** + Is the value a number equal to a value within some range of acceptable error? +*/ +id HC_closeTo(double aValue, double anError); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_closeTo, available if HC_SHORTHAND is defined. +*/ +#define closeTo HC_closeTo + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsCollectionContaining.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsCollectionContaining.h new file mode 100644 index 0000000..d5c8320 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsCollectionContaining.h @@ -0,0 +1,51 @@ +// +// OCHamcrest - HCIsCollectionContaining.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseMatcher.h" + + +@interface HCIsCollectionContaining : HCBaseMatcher +{ + id elementMatcher; +} + ++ (HCIsCollectionContaining*) isCollectionContaining:(id)anElementMatcher; +- (id) initWithMatcher:(id)anElementMatcher; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +id HC_hasItem(id item); + +/** + @param item comma-separated list of items ending with nil. +*/ +id HC_hasItems(id item, ...); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_hasItem, available if HC_SHORTHAND is defined. +*/ +#define hasItem HC_hasItem + +/** + Shorthand for HC_hasItems, available if HC_SHORTHAND is defined. +*/ +#define hasItems HC_hasItems + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsCollectionOnlyContaining.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsCollectionOnlyContaining.h new file mode 100644 index 0000000..73aad52 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsCollectionOnlyContaining.h @@ -0,0 +1,60 @@ +// +// OCHamcrest - HCIsCollectionOnlyContaining.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseMatcher.h" + + +/** + Matches collections that only contain elements satisfying a given matcher. + + This matcher will never match an empty collection. +*/ +@interface HCIsCollectionOnlyContaining : HCBaseMatcher +{ + id matcher; +} + ++ (HCIsCollectionOnlyContaining*) isCollectionOnlyContaining:(id)aMatcher; +- (id) initWithMatcher:(id)aMatcher; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +/** + Matches collections that only contain elements satisfying any of a list of items. + + For example, + [NSArray arrayWithObjects:@"a", "b", @"c", nil] + would satisfy + onlyContains(lessThan(@"d"), nil). + + If an item is not a matcher, it is equivalent to equalTo(item), so the array in the example + above would also satisfy + onlyContains(@"a", @"b", @"c", nil). + + @param item comma-separated list of items ending with nil. +*/ +id HC_onlyContains(id item, ...); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_onlyContains, available if HC_SHORTHAND is defined. +*/ +#define onlyContains HC_onlyContains + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsDictionaryContaining.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsDictionaryContaining.h new file mode 100644 index 0000000..448553b --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsDictionaryContaining.h @@ -0,0 +1,43 @@ +// +// OCHamcrest - HCIsDictionaryContaining.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseMatcher.h" + + +@interface HCIsDictionaryContaining : HCBaseMatcher +{ + id keyMatcher; + id valueMatcher; +} + ++ (HCIsDictionaryContaining*) isDictionaryContainingKey:(id)theKeyMatcher + value:(id)theValueMatcher; +- (id) initWithKeyMatcher:(id)theKeyMatcher valueMatcher:(id)theValueMatcher; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +id HC_hasEntry(id key, id value); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_hasEntry, available if HC_SHORTHAND is defined. +*/ +#define hasEntry HC_hasEntry + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsDictionaryContainingKey.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsDictionaryContainingKey.h new file mode 100644 index 0000000..3b75c30 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsDictionaryContainingKey.h @@ -0,0 +1,41 @@ +// +// OCHamcrest - HCIsDictionaryContainingKey.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseMatcher.h" + + +@interface HCIsDictionaryContainingKey : HCBaseMatcher +{ + id keyMatcher; +} + ++ (HCIsDictionaryContainingKey*) isDictionaryContainingKey:(id)theKeyMatcher; +- (id) initWithKeyMatcher:(id)theKeyMatcher; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +id HC_hasKey(id item); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_hasKey, available if HC_SHORTHAND is defined. +*/ +#define hasKey HC_hasKey + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsDictionaryContainingValue.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsDictionaryContainingValue.h new file mode 100644 index 0000000..f2332ac --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsDictionaryContainingValue.h @@ -0,0 +1,41 @@ +// +// OCHamcrest - HCIsDictionaryContainingValue.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseMatcher.h" + + +@interface HCIsDictionaryContainingValue : HCBaseMatcher +{ + id valueMatcher; +} + ++ (HCIsDictionaryContainingValue*) isDictionaryContainingValue:(id)theValueMatcher; +- (id) initWithValueMatcher:(id)theValueMatcher; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +id HC_hasValue(id item); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_hasValue, available if HC_SHORTHAND is defined. +*/ +#define hasValue HC_hasValue + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsEqual.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsEqual.h new file mode 100644 index 0000000..64801c9 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsEqual.h @@ -0,0 +1,47 @@ +// +// OCHamcrest - HCIsEqual.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseMatcher.h" + + +/** + Is the object equal to another object, as tested by the isEqual: method? +*/ +@interface HCIsEqual : HCBaseMatcher +{ + id object; +} + ++ (HCIsEqual*) isEqualTo:(id)equalArg; +- (id) initEqualTo:(id)equalArg; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +/** + Is the object equal to another object, as tested by the isEqual: method? +*/ +id HC_equalTo(id equalArg); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_equalTo, available if HC_SHORTHAND is defined. +*/ +#define equalTo HC_equalTo + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsEqualIgnoringCase.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsEqualIgnoringCase.h new file mode 100644 index 0000000..8986382 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsEqualIgnoringCase.h @@ -0,0 +1,44 @@ +// +// OCHamcrest - HCIsEqualIgnoringCase.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseMatcher.h" + + +/** + Tests if a string is equal to another string, regardless of the case. +*/ +@interface HCIsEqualIgnoringCase : HCBaseMatcher +{ + NSString* string; +} + ++ (HCIsEqualIgnoringCase*) isEqualIgnoringCase:(NSString*)aString; +- (id) initWithString:(NSString*)aString; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +id HC_equalToIgnoringCase(NSString* aString); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_endsWith, available if HC_SHORTHAND is defined. +*/ +#define equalToIgnoringCase HC_equalToIgnoringCase + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsEqualIgnoringWhiteSpace.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsEqualIgnoringWhiteSpace.h new file mode 100644 index 0000000..636f257 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsEqualIgnoringWhiteSpace.h @@ -0,0 +1,45 @@ +// +// OCHamcrest - HCIsEqualIgnoringWhiteSpace.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseMatcher.h" + + +/** + Tests if a string is equal to another string, ignoring any changes in whitespace. +*/ +@interface HCIsEqualIgnoringWhiteSpace : HCBaseMatcher +{ + NSString* originalString; + NSString* strippedString; +} + ++ (HCIsEqualIgnoringWhiteSpace*) isEqualIgnoringWhiteSpace:(NSString*)aString; +- (id) initWithString:(NSString*)aString; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +id HC_equalToIgnoringWhiteSpace(NSString* aString); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_endsWith, available if HC_SHORTHAND is defined. +*/ +#define equalToIgnoringWhiteSpace HC_equalToIgnoringWhiteSpace + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsEqualToNumber.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsEqualToNumber.h new file mode 100644 index 0000000..70e6407 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsEqualToNumber.h @@ -0,0 +1,185 @@ +// +// OCHamcrest - HCIsEqualToNumber.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseMatcher.h" + + +#ifdef __cplusplus +extern "C" { +#endif + +/** + Is the value, when converted to an NSNumber, equal to another object? +*/ +id HC_equalToBool(BOOL value); + +/** + Is the value, when converted to an NSNumber, equal to another object? +*/ +id HC_equalToChar(char value); + +/** + Is the value, when converted to an NSNumber, equal to another object? +*/ +id HC_equalToDouble(double value); + +/** + Is the value, when converted to an NSNumber, equal to another object? +*/ +id HC_equalToFloat(float value); + +/** + Is the value, when converted to an NSNumber, equal to another object? +*/ +id HC_equalToInt(int value); + +/** + Is the value, when converted to an NSNumber, equal to another object? +*/ +id HC_equalToLong(long value); + +/** + Is the value, when converted to an NSNumber, equal to another object? +*/ +id HC_equalToLongLong(long long value); + +/** + Is the value, when converted to an NSNumber, equal to another object? +*/ +id HC_equalToShort(short value); + +/** + Is the value, when converted to an NSNumber, equal to another object? +*/ +id HC_equalToUnsignedChar(unsigned char value); + +/** + Is the value, when converted to an NSNumber, equal to another object? +*/ +id HC_equalToUnsignedInt(unsigned int value); + +/** + Is the value, when converted to an NSNumber, equal to another object? +*/ +id HC_equalToUnsignedLong(unsigned long value); + +/** + Is the value, when converted to an NSNumber, equal to another object? +*/ +id HC_equalToUnsignedLongLong(unsigned long long value); + +/** + Is the value, when converted to an NSNumber, equal to another object? +*/ +id HC_equalToUnsignedShort(unsigned short value); + + +#if defined(OBJC_API_VERSION) && OBJC_API_VERSION >= 2 + +/** + Is the value, when converted to an NSNumber, equal to another object? +*/ +id HC_equalToInteger(NSInteger value); + +/** + Is the value, when converted to an NSNumber, equal to another object? +*/ +id HC_equalToUnsignedInteger(NSUInteger value); + +#endif // Objective-C 2.0 + + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_equalToBool, available if HC_SHORTHAND is defined. +*/ +#define equalToBool HC_equalToBool + +/** + Shorthand for HC_equalToChar, available if HC_SHORTHAND is defined. +*/ +#define equalToChar HC_equalToChar + +/** + Shorthand for HC_equalToDouble, available if HC_SHORTHAND is defined. +*/ +#define equalToDouble HC_equalToDouble + +/** + Shorthand for HC_equalToFloat, available if HC_SHORTHAND is defined. +*/ +#define equalToFloat HC_equalToFloat + +/** + Shorthand for HC_equalToInt, available if HC_SHORTHAND is defined. +*/ +#define equalToInt HC_equalToInt + +/** + Shorthand for HC_equalToLong, available if HC_SHORTHAND is defined. +*/ +#define equalToLong HC_equalToLong + +/** + Shorthand for HC_equalToLongLong, available if HC_SHORTHAND is defined. +*/ +#define equalToLongLong HC_equalToLongLong + +/** + Shorthand for HC_equalToShort, available if HC_SHORTHAND is defined. +*/ +#define equalToShort HC_equalToShort + +/** + Shorthand for HC_equalToUnsignedChar, available if HC_SHORTHAND is defined. +*/ +#define equalToUnsignedChar HC_equalToUnsignedChar + +/** + Shorthand for HC_equalToUnsignedInt, available if HC_SHORTHAND is defined. +*/ +#define equalToUnsignedInt HC_equalToUnsignedInt + +/** + Shorthand for HC_equalToUnsignedLong, available if HC_SHORTHAND is defined. +*/ +#define equalToUnsignedLong HC_equalToUnsignedLong + +/** + Shorthand for HC_equalToUnsignedLongLong, available if HC_SHORTHAND is defined. +*/ +#define equalToUnsignedLongLong HC_equalToUnsignedLongLong + +/** + Shorthand for HC_equalToUnsignedShort, available if HC_SHORTHAND is defined. +*/ +#define equalToUnsignedShort HC_equalToUnsignedShort + + +#if defined(OBJC_API_VERSION) && OBJC_API_VERSION >= 2 + +/** + Shorthand for HC_equalToInteger, available if HC_SHORTHAND is defined. +*/ +#define equalToInteger HC_equalToInteger + +/** + Shorthand for HC_equalToUnsignedInteger, available if HC_SHORTHAND is defined. +*/ +#define equalToUnsignedInteger HC_equalToUnsignedInteger + +#endif // Objective-C 2.0 + + +#endif // HC_SHORTHAND diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsIn.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsIn.h new file mode 100644 index 0000000..361dfa0 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsIn.h @@ -0,0 +1,41 @@ +// +// OCHamcrest - HCIsIn.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseMatcher.h" + + +@interface HCIsIn : HCBaseMatcher +{ + id collection; +} + ++ (HCIsIn*) isInCollection:(id)aCollection; +- (id) initWithCollection:(id)aCollection; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +id HC_isIn(id collection); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_isIn, available if HC_SHORTHAND is defined. +*/ +#define isIn HC_isIn + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsInstanceOf.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsInstanceOf.h new file mode 100644 index 0000000..89cc04e --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsInstanceOf.h @@ -0,0 +1,47 @@ +// +// OCHamcrest - HCIsInstanceOf.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseMatcher.h" + + +/** + Tests whether the value is an instance of a class (including subclasses). +*/ +@interface HCIsInstanceOf : HCBaseMatcher +{ + Class theClass; +} + ++ (HCIsInstanceOf*) isInstanceOf:(Class)type; +- (id) initWithType:(Class)type; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +/** + Is the value an instance of a particular type? +*/ +id HC_instanceOf(Class type); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_instanceOf, available if HC_SHORTHAND is defined. +*/ +#define instanceOf HC_instanceOf + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsNil.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsNil.h new file mode 100644 index 0000000..e270411 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsNil.h @@ -0,0 +1,55 @@ +// +// OCHamcrest - HCIsNil.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseMatcher.h" + + +/** + Is the value @c nil? +*/ +@interface HCIsNil : HCBaseMatcher +{ +} + ++ (HCIsNil*) isNil; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +/** + Matches if the value is @c nil. +*/ +id HC_nilValue(); + +/** + Matches if the value is not @c nil. +*/ +id HC_notNilValue(); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_nilValue, available if HC_SHORTHAND is defined. +*/ +#define nilValue HC_nilValue + +/** + Shorthand for HC_notNilValue, available if HC_SHORTHAND is defined. +*/ +#define notNilValue HC_notNilValue + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsNot.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsNot.h new file mode 100644 index 0000000..2ff5c7b --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsNot.h @@ -0,0 +1,56 @@ +// +// OCHamcrest - HCIsNot.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseMatcher.h" + + +/** + Calculates the logical negation of a matcher. +*/ +@interface HCIsNot : HCBaseMatcher +{ + id matcher; +} + ++ (HCIsNot*) isNot:(id)aMatcher; +- (id) initNot:(id)aMatcher; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +/** + Inverts the rule, providing a shortcut to the frequently used isNot(equalTo(x)). + + For example: +@code +assertThat(cheese, isNot(equalTo(smelly))) +@endcode + vs. +@code +assertThat(cheese, isNot(smelly)) +@endcode +*/ +id HC_isNot(id item); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_isNot, available if HC_SHORTHAND is defined. +*/ +#define isNot HC_isNot + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsSame.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsSame.h new file mode 100644 index 0000000..dbbf29c --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCIsSame.h @@ -0,0 +1,47 @@ +// +// OCHamcrest - HCIsSame.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseMatcher.h" + + +/** + Is the value the same object as another value? +*/ +@interface HCIsSame : HCBaseMatcher +{ + id object; +} + ++ (HCIsSame*) isSameAs:(id)anObject; +- (id) initSameAs:(id)anObject; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +/** + Evaluates to @c YES only when the argument is this same object. +*/ +id HC_sameInstance(id anObject); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_sameInstance, available if HC_SHORTHAND is defined. +*/ +#define sameInstance HC_sameInstance + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCMatcher.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCMatcher.h new file mode 100644 index 0000000..77dfd44 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCMatcher.h @@ -0,0 +1,52 @@ +// +// OCHamcrest - HCMatcher.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCSelfDescribing.h" + + +/** + A matcher over acceptable values. + + A matcher is able to describe itself to give feedback when it fails. + + HCMatcher implementations should @b not directly implement this protocol. + Instead, @b extend the HCBaseMatcher class, which will ensure that the HCMatcher API can grow + to support new features and remain compatible with all HCMatcher implementations. +*/ +@protocol HCMatcher + +/** + Evaluates the matcher for argument @a item. + + @param item The object against which the matcher is evaluated. + @return @c YES if @a item matches, otherwise @c NO. +*/ +- (BOOL) matches:(id)item; + +/** + Evaluates the matcher for argument @a item. + + @param item The object against which the matcher is evaluated. + @param mismatchDescription The description to be built or appended to if @item does not match. + @return @c YES if @a item matches, otherwise @c NO. +*/ +- (BOOL) matches:(id)item describingMismatchTo:(id)mismatchDescription; + +/** + Generates a description of why the matcher has not accepted the item. + + The description will be part of a larger description of why a matching failed, so it should be + concise. + This method assumes that @c matches:item is false, but will not check this. + + @param item The item that the HCMatcher has rejected. + @param mismatchDescription The description to be built or appended to. +*/ +- (void) describeMismatchOf:(id)item to:(id)mismatchDescription; + +@end diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCMatcherAssert.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCMatcherAssert.h new file mode 100644 index 0000000..41305a9 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCMatcherAssert.h @@ -0,0 +1,36 @@ +// +// OCHamcrest - HCMatcherAssert.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + +@protocol HCMatcher; + + +#ifdef __cplusplus +extern "C" { +#endif + +void HC_assertThatWithLocation(id testCase, id actual, id matcher, + const char* fileName, int lineNumber); + +#ifdef __cplusplus +} +#endif + +/** + OCUnit integration asserting that actual value satisfies matcher. +*/ +#define HC_assertThat(actual, matcher) \ + HC_assertThatWithLocation(self, actual, matcher, __FILE__, __LINE__) + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_assertThat, available if HC_SHORTHAND is defined. +*/ +#define assertThat HC_assertThat + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCNumberAssert.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCNumberAssert.h new file mode 100644 index 0000000..0c03643 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCNumberAssert.h @@ -0,0 +1,248 @@ +// +// OCHamcrest - HCNumberAssert.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + +#import + +@protocol HCMatcher; + + +#ifdef __cplusplus +extern "C" { +#endif + +void HC_assertThatBoolWithLocation(id testCase, BOOL actual, + id matcher, const char* fileName, int lineNumber); + +void HC_assertThatCharWithLocation(id testCase, char actual, + id matcher, const char* fileName, int lineNumber); + +void HC_assertThatDoubleWithLocation(id testCase, double actual, + id matcher, const char* fileName, int lineNumber); + +void HC_assertThatFloatWithLocation(id testCase, float actual, + id matcher, const char* fileName, int lineNumber); + +void HC_assertThatIntWithLocation(id testCase, int actual, + id matcher, const char* fileName, int lineNumber); + +void HC_assertThatLongWithLocation(id testCase, long actual, + id matcher, const char* fileName, int lineNumber); + +void HC_assertThatLongLongWithLocation(id testCase, long long actual, + id matcher, const char* fileName, int lineNumber); + +void HC_assertThatShortWithLocation(id testCase, short actual, + id matcher, const char* fileName, int lineNumber); + +void HC_assertThatUnsignedCharWithLocation(id testCase, unsigned char actual, + id matcher, const char* fileName, int lineNumber); + +void HC_assertThatUnsignedIntWithLocation(id testCase, unsigned int actual, + id matcher, const char* fileName, int lineNumber); + +void HC_assertThatUnsignedLongWithLocation(id testCase, unsigned long actual, + id matcher, const char* fileName, int lineNumber); + +void HC_assertThatUnsignedLongLongWithLocation(id testCase, unsigned long long actual, + id matcher, const char* fileName, int lineNumber); + +void HC_assertThatUnsignedShortWithLocation(id testCase, unsigned short actual, + id matcher, const char* fileName, int lineNumber); + +#if defined(OBJC_API_VERSION) && OBJC_API_VERSION >= 2 + +void HC_assertThatIntegerWithLocation(id testCase, NSInteger actual, + id matcher, const char* fileName, int lineNumber); + +void HC_assertThatUnsignedIntegerWithLocation(id testCase, NSUInteger actual, + id matcher, const char* fileName, int lineNumber); + +#endif // Objective-C 2.0 + +#ifdef __cplusplus +} +#endif + +/** + OCUnit integration asserting that actual value, when converted to an NSNumber satisfies matcher. +*/ +#define HC_assertThatBool(actual, matcher) \ + HC_assertThatBoolWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + OCUnit integration asserting that actual value, when converted to an NSNumber satisfies matcher. +*/ +#define HC_assertThatChar(actual, matcher) \ + HC_assertThatCharWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + OCUnit integration asserting that actual value, when converted to an NSNumber satisfies matcher. +*/ +#define HC_assertThatDouble(actual, matcher) \ + HC_assertThatDoubleWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + OCUnit integration asserting that actual value, when converted to an NSNumber satisfies matcher. +*/ +#define HC_assertThatFloat(actual, matcher) \ + HC_assertThatFloatWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + OCUnit integration asserting that actual value, when converted to an NSNumber satisfies matcher. +*/ +#define HC_assertThatInt(actual, matcher) \ + HC_assertThatIntWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + OCUnit integration asserting that actual value, when converted to an NSNumber satisfies matcher. +*/ +#define HC_assertThatLong(actual, matcher) \ + HC_assertThatLongWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + OCUnit integration asserting that actual value, when converted to an NSNumber satisfies matcher. +*/ +#define HC_assertThatLongLong(actual, matcher) \ + HC_assertThatLongLongWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + OCUnit integration asserting that actual value, when converted to an NSNumber satisfies matcher. +*/ +#define HC_assertThatShort(actual, matcher) \ + HC_assertThatShortWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + OCUnit integration asserting that actual value, when converted to an NSNumber satisfies matcher. +*/ +#define HC_assertThatUnsignedChar(actual, matcher) \ + HC_assertThatUnsignedCharWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + OCUnit integration asserting that actual value, when converted to an NSNumber satisfies matcher. +*/ +#define HC_assertThatUnsignedInt(actual, matcher) \ + HC_assertThatUnsignedIntWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + OCUnit integration asserting that actual value, when converted to an NSNumber satisfies matcher. +*/ +#define HC_assertThatUnsignedLong(actual, matcher) \ + HC_assertThatUnsignedLongWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + OCUnit integration asserting that actual value, when converted to an NSNumber satisfies matcher. +*/ +#define HC_assertThatUnsignedLongLong(actual, matcher) \ + HC_assertThatUnsignedLongLongWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + OCUnit integration asserting that actual value, when converted to an NSNumber satisfies matcher. +*/ +#define HC_assertThatUnsignedShort(actual, matcher) \ + HC_assertThatUnsignedShortWithLocation(self, actual, matcher, __FILE__, __LINE__) + + +#if defined(OBJC_API_VERSION) && OBJC_API_VERSION >= 2 + +/** + OCUnit integration asserting that actual value, when converted to an NSNumber satisfies matcher. +*/ +#define HC_assertThatInteger(actual, matcher) \ + HC_assertThatIntegerWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + OCUnit integration asserting that actual value, when converted to an NSNumber satisfies matcher. +*/ +#define HC_assertThatUnsignedInteger(actual, matcher) \ + HC_assertThatUnsignedIntegerWithLocation(self, actual, matcher, __FILE__, __LINE__) + +#endif // Objective-C 2.0 + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_assertThatBool, available if HC_SHORTHAND is defined. +*/ +#define assertThatBool HC_assertThatBool + +/** + Shorthand for HC_assertThatChar, available if HC_SHORTHAND is defined. +*/ +#define assertThatChar HC_assertThatChar + +/** + Shorthand for HC_assertThatDouble, available if HC_SHORTHAND is defined. +*/ +#define assertThatDouble HC_assertThatDouble + +/** + Shorthand for HC_assertThatFloat, available if HC_SHORTHAND is defined. +*/ +#define assertThatFloat HC_assertThatFloat + +/** + Shorthand for HC_assertThatInt, available if HC_SHORTHAND is defined. +*/ +#define assertThatInt HC_assertThatInt + +/** + Shorthand for HC_assertThatLong, available if HC_SHORTHAND is defined. +*/ +#define assertThatLong HC_assertThatLong + +/** + Shorthand for HC_assertThatLongLong, available if HC_SHORTHAND is defined. +*/ +#define assertThatLongLong HC_assertThatLongLong + +/** + Shorthand for HC_assertThatShort, available if HC_SHORTHAND is defined. +*/ +#define assertThatShort HC_assertThatShort + +/** + Shorthand for HC_assertThatUnsignedChar, available if HC_SHORTHAND is defined. +*/ +#define assertThatUnsignedChar HC_assertThatUnsignedChar + +/** + Shorthand for HC_assertThatUnsignedInt, available if HC_SHORTHAND is defined. +*/ +#define assertThatUnsignedInt HC_assertThatUnsignedInt + +/** + Shorthand for HC_assertThatUnsignedLong, available if HC_SHORTHAND is defined. +*/ +#define assertThatUnsignedLong HC_assertThatUnsignedLong + +/** + Shorthand for HC_assertThatUnsignedLongLong, available if HC_SHORTHAND is defined. +*/ +#define assertThatUnsignedLongLong HC_assertThatUnsignedLongLong + +/** + Shorthand for HC_assertThatInt, available if HC_SHORTHAND is defined. +*/ +#define assertThatUnsignedShort HC_assertThatUnsignedShort + + +#if defined(OBJC_API_VERSION) && OBJC_API_VERSION >= 2 + +/** + Shorthand for HC_assertThatInt, available if HC_SHORTHAND is defined. +*/ +#define assertThatInteger HC_assertThatInteger + +/** + Shorthand for HC_assertThatInt, available if HC_SHORTHAND is defined. +*/ +#define assertThatUnsignedInteger HC_assertThatUnsignedInteger + +#endif // Objective-C 2.0 + +#endif // HC_SHORTHAND diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCOrderingComparison.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCOrderingComparison.h new file mode 100644 index 0000000..8371e0c --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCOrderingComparison.h @@ -0,0 +1,80 @@ +// +// OCHamcrest - HCOrderingComparison.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseMatcher.h" + + +@interface HCOrderingComparison : HCBaseMatcher +{ + id value; + NSComparisonResult minCompare; + NSComparisonResult maxCompare; +} + ++ (HCOrderingComparison*) compare:(id)aValue + minCompare:(NSComparisonResult)min + maxCompare:(NSComparisonResult)max; +- (id) initComparing:(id)aValue + minCompare:(NSComparisonResult)min + maxCompare:(NSComparisonResult)max; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +/** + Is value > expected? +*/ +id HC_greaterThan(id aValue); + +/** + Is value >= expected? +*/ +id HC_greaterThanOrEqualTo(id aValue); + +/** + Is value < expected? +*/ +id HC_lessThan(id aValue); + +/** + Is value <= expected? +*/ +id HC_lessThanOrEqualTo(id aValue); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_greaterThan, available if HC_SHORTHAND is defined. +*/ +#define greaterThan HC_greaterThan + +/** + Shorthand for HC_greaterThan, available if HC_SHORTHAND is defined. +*/ +#define greaterThanOrEqualTo HC_greaterThanOrEqualTo + +/** + Shorthand for HC_greaterThan, available if HC_SHORTHAND is defined. +*/ +#define lessThan HC_lessThan + +/** + Shorthand for HC_lessThanOrEqualTo, available if HC_SHORTHAND is defined. +*/ +#define lessThanOrEqualTo HC_lessThanOrEqualTo + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCRequireNonNilString.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCRequireNonNilString.h new file mode 100644 index 0000000..a1da0e8 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCRequireNonNilString.h @@ -0,0 +1,28 @@ +// +// OCHamcrest - HCRequireNonNilString.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Mac +#import + + +namespace hamcrest { + +/** + Throws an NSException if @a string is nil. +*/ +inline +void requireNonNilString(NSString* string) +{ + if (string == nil) + { + @throw [NSException exceptionWithName: @"NotAString" + reason: @"Must be non-nil string" + userInfo: nil]; + } +} + +} // namespace hamcrest diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCSelfDescribing.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCSelfDescribing.h new file mode 100644 index 0000000..52a6fbd --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCSelfDescribing.h @@ -0,0 +1,29 @@ +// +// OCHamcrest - HCSelfDescribing.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import + +@protocol HCDescription; + + +/** + The ability of an object to describe itself. +*/ +@protocol HCSelfDescribing + +/** + Generates a description of the object. + + The description may be part of a description of a larger object of which this is just a + component, so it should be worded appropriately. + + @param description The description to be built or appended to. +*/ +- (void) describeTo:(id)description; + +@end diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCStringContains.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCStringContains.h new file mode 100644 index 0000000..1eb9b45 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCStringContains.h @@ -0,0 +1,42 @@ +// +// OCHamcrest - HCStringContains.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCSubstringMatcher.h" + + +/** + Tests if the argument is a string that contains a substring. +*/ +@interface HCStringContains : HCSubstringMatcher +{ +} + ++ (HCStringContains*) stringContains:(NSString*)aSubstring; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +id HC_containsString(NSString* aSubstring); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_containsString, available if HC_SHORTHAND is defined. +*/ +#define containsString HC_containsString + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCStringDescription.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCStringDescription.h new file mode 100644 index 0000000..b62f8d8 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCStringDescription.h @@ -0,0 +1,40 @@ +// +// OCHamcrest - HCStringDescription.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseDescription.h" + +@protocol HCSelfDescribing; + + +/** + An HCDescription that is stored as a string. +*/ +@interface HCStringDescription : HCBaseDescription +{ + NSMutableString* accumulator; +} + +/** + Returns the description of an HCSelfDescribing object as a string. + + @param selfDescribing The object to be described. + @return The description of the object. +*/ ++ (NSString*) stringFrom:(id)selfDescribing; + +/** + Returns an empty description. +*/ ++ (HCStringDescription*) stringDescription; + +/** + Returns an initialized HCStringDescription object that is empty. +*/ +- (id) init; + +@end diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCStringEndsWith.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCStringEndsWith.h new file mode 100644 index 0000000..c56275a --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCStringEndsWith.h @@ -0,0 +1,42 @@ +// +// OCHamcrest - HCStringEndsWith.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCSubstringMatcher.h" + + +/** + Tests if the argument is a string that ends with a substring. +*/ +@interface HCStringEndsWith : HCSubstringMatcher +{ +} + ++ (HCStringEndsWith*) stringEndsWith:(NSString*)aSubstring; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +id HC_endsWith(NSString* aSubstring); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_endsWith, available if HC_SHORTHAND is defined. +*/ +#define endsWith HC_endsWith + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCStringStartsWith.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCStringStartsWith.h new file mode 100644 index 0000000..3818437 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCStringStartsWith.h @@ -0,0 +1,42 @@ +// +// OCHamcrest - HCStringStartsWith.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCSubstringMatcher.h" + + +/** + Tests if the argument is a string that starts with a substring. +*/ +@interface HCStringStartsWith : HCSubstringMatcher +{ +} + ++ (HCStringStartsWith*) stringStartsWith:(NSString*)aSubstring; + +@end + + +#ifdef __cplusplus +extern "C" { +#endif + +id HC_startsWith(NSString* aSubstring); + +#ifdef __cplusplus +} +#endif + + +#ifdef HC_SHORTHAND + +/** + Shorthand for HC_startsWith, available if HC_SHORTHAND is defined. +*/ +#define startsWith HC_startsWith + +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCSubstringMatcher.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCSubstringMatcher.h new file mode 100644 index 0000000..36ff578 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCSubstringMatcher.h @@ -0,0 +1,19 @@ +// +// OCHamcrest - HCSubstringMatcher.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Inherited +#import "HCBaseMatcher.h" + + +@interface HCSubstringMatcher : HCBaseMatcher +{ + NSString* substring; +} + +- (id) initWithSubstring:(NSString*)aSubstring; + +@end diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCWrapInMatcher.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCWrapInMatcher.h new file mode 100644 index 0000000..80f7ad2 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/HCWrapInMatcher.h @@ -0,0 +1,24 @@ +// +// OCHamcrest - HCWrapInMatcher.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + +@protocol HCMatcher; + + +#ifdef __cplusplus +extern "C" { +#endif + +/** + Returns @a item wrapped (if necessary) in an HCIsEqual matcher. + + @a item is returned as-is if it is already an HCMatcher. +*/ +id HC_wrapInMatcher(id item); + +#ifdef __cplusplus +} +#endif diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/OCHamcrest.h b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/OCHamcrest.h new file mode 100644 index 0000000..3f3e79f --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Headers/OCHamcrest.h @@ -0,0 +1,45 @@ +// +// OCHamcrest - OCHamcrest.h +// Copyright 2009 www.hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid +// + + // Unit test integration +#import "HCMatcherAssert.h" +#import "HCNumberAssert.h" + + // Core +#import "HCAllOf.h" +#import "HCAnyOf.h" +#import "HCDescribedAs.h" +#import "HCIs.h" +#import "HCIsAnything.h" +#import "HCIsEqual.h" +#import "HCIsInstanceOf.h" +#import "HCIsNil.h" +#import "HCIsNot.h" +#import "HCIsSame.h" + + // Library: Collection +#import "HCIsCollectionContaining.h" +#import "HCIsCollectionOnlyContaining.h" +#import "HCIsDictionaryContaining.h" +#import "HCIsDictionaryContainingKey.h" +#import "HCIsDictionaryContainingValue.h" +#import "HCIsIn.h" + + // Library: Number +#import "HCIsCloseTo.h" +#import "HCIsEqualToNumber.h" +#import "HCOrderingComparison.h" + + // Library: Object +#import "HCHasDescription.h" + + // Library: Text +#import "HCIsEqualIgnoringCase.h" +#import "HCIsEqualIgnoringWhiteSpace.h" +#import "HCStringContains.h" +#import "HCStringEndsWith.h" +#import "HCStringStartsWith.h" diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/OCHamcrest b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/OCHamcrest new file mode 100755 index 0000000..15f0518 Binary files /dev/null and b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/OCHamcrest differ diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Resources/Info.plist b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Resources/Info.plist new file mode 100644 index 0000000..e9a40a2 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Resources/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + OCHamcrest + CFBundleIdentifier + org.hamcrest + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + OCHamcrest + CFBundlePackageType + FMWK + CFBundleSignature + hamc + CFBundleVersion + 1.0 + + diff --git a/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Resources/InfoPlist.strings b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Resources/InfoPlist.strings new file mode 100644 index 0000000..a6d420e Binary files /dev/null and b/ConciseKitSpecs/Frameworks/OCHamcrest.framework/Versions/Current/Resources/InfoPlist.strings differ diff --git a/ConciseKitSpecs/Frameworks/OCMock.framework/Headers b/ConciseKitSpecs/Frameworks/OCMock.framework/Headers deleted file mode 120000 index a177d2a..0000000 --- a/ConciseKitSpecs/Frameworks/OCMock.framework/Headers +++ /dev/null @@ -1 +0,0 @@ -Versions/Current/Headers \ No newline at end of file diff --git a/ConciseKitSpecs/Frameworks/OCMock.framework/Headers/NSNotificationCenter+OCMAdditions.h b/ConciseKitSpecs/Frameworks/OCMock.framework/Headers/NSNotificationCenter+OCMAdditions.h new file mode 100644 index 0000000..7d5d6d1 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCMock.framework/Headers/NSNotificationCenter+OCMAdditions.h @@ -0,0 +1,15 @@ +//--------------------------------------------------------------------------------------- +// $Id: NSNotificationCenter+OCMAdditions.h 57 2010-07-19 06:14:27Z erik $ +// Copyright (c) 2009 by Mulle Kybernetik. See License file for details. +//--------------------------------------------------------------------------------------- + +#import + +@class OCMockObserver; + + +@interface NSNotificationCenter(OCMAdditions) + +- (void)addMockObserver:(OCMockObserver *)notificationObserver name:(NSString *)notificationName object:(id)notificationSender; + +@end diff --git a/ConciseKitSpecs/Frameworks/OCMock.framework/Headers/OCMArg.h b/ConciseKitSpecs/Frameworks/OCMock.framework/Headers/OCMArg.h new file mode 100644 index 0000000..94ede8f --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCMock.framework/Headers/OCMArg.h @@ -0,0 +1,33 @@ +//--------------------------------------------------------------------------------------- +// $Id: OCMArg.h 65 2010-07-28 01:49:42Z erik $ +// Copyright (c) 2009-2010 by Mulle Kybernetik. See License file for details. +//--------------------------------------------------------------------------------------- + +#import + +@interface OCMArg : NSObject + +// constraining arguments + ++ (id)any; ++ (void *)anyPointer; ++ (id)isNil; ++ (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 + ++ (id *)setTo:(id)value; + +// internal use only + ++ (id)resolveSpecialValues:(NSValue *)value; + +@end + +#define OCMOCK_ANY [OCMArg any] +#define OCMOCK_VALUE(variable) [NSValue value:&variable withObjCType:@encode(__typeof__(variable))] diff --git a/ConciseKitSpecs/Frameworks/OCMock.framework/Headers/OCMConstraint.h b/ConciseKitSpecs/Frameworks/OCMock.framework/Headers/OCMConstraint.h new file mode 100644 index 0000000..72b23e8 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCMock.framework/Headers/OCMConstraint.h @@ -0,0 +1,64 @@ +//--------------------------------------------------------------------------------------- +// $Id: OCMConstraint.h 57 2010-07-19 06:14:27Z erik $ +// Copyright (c) 2007-2010 by Mulle Kybernetik. See License file for details. +//--------------------------------------------------------------------------------------- + +#import + + +@interface OCMConstraint : NSObject + ++ (id)constraint; +- (BOOL)evaluate:(id)value; + +// 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; + + +@end + +@interface OCMAnyConstraint : OCMConstraint +@end + +@interface OCMIsNilConstraint : OCMConstraint +@end + +@interface OCMIsNotNilConstraint : OCMConstraint +@end + +@interface OCMIsNotEqualConstraint : OCMConstraint +{ + @public + id testValue; +} + +@end + +@interface OCMInvocationConstraint : OCMConstraint +{ + @public + NSInvocation *invocation; +} + +@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/ConciseKitSpecs/Frameworks/OCMock.framework/Headers/OCMock.h b/ConciseKitSpecs/Frameworks/OCMock.framework/Headers/OCMock.h new file mode 100644 index 0000000..1b2d1a4 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCMock.framework/Headers/OCMock.h @@ -0,0 +1,10 @@ +//--------------------------------------------------------------------------------------- +// $Id$ +// Copyright (c) 2004-2008 by Mulle Kybernetik. See License file for details. +//--------------------------------------------------------------------------------------- + +#import "OCMockObject.h" +#import "OCMockRecorder.h" +#import "OCMConstraint.h" +#import "OCMArg.h" +#import "NSNotificationCenter+OCMAdditions.h" diff --git a/ConciseKitSpecs/Frameworks/OCMock.framework/Headers/OCMockObject.h b/ConciseKitSpecs/Frameworks/OCMock.framework/Headers/OCMockObject.h new file mode 100644 index 0000000..24477c7 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCMock.framework/Headers/OCMockObject.h @@ -0,0 +1,43 @@ +//--------------------------------------------------------------------------------------- +// $Id: OCMockObject.h 69 2010-08-20 16:05:58Z erik $ +// Copyright (c) 2004-2008 by Mulle Kybernetik. See License file for details. +//--------------------------------------------------------------------------------------- + +#import + +@interface OCMockObject : NSProxy +{ + BOOL isNice; + BOOL expectationOrderMatters; + NSMutableArray *recorders; + NSMutableArray *expectations; + NSMutableArray *rejections; + NSMutableArray *exceptions; +} + ++ (id)mockForClass:(Class)aClass; ++ (id)mockForProtocol:(Protocol *)aProtocol; ++ (id)partialMockForObject:(NSObject *)anObject; + ++ (id)niceMockForClass:(Class)aClass; ++ (id)niceMockForProtocol:(Protocol *)aProtocol; + ++ (id)observerMock; + +- (id)init; + +- (void)setExpectationOrderMatters:(BOOL)flag; + +- (id)stub; +- (id)expect; +- (id)reject; + +- (void)verify; + +// internal use only + +- (id)getNewRecorder; +- (BOOL)handleInvocation:(NSInvocation *)anInvocation; +- (void)handleUnRecordedInvocation:(NSInvocation *)anInvocation; + +@end diff --git a/ConciseKitSpecs/Frameworks/OCMock.framework/Headers/OCMockRecorder.h b/ConciseKitSpecs/Frameworks/OCMock.framework/Headers/OCMockRecorder.h new file mode 100644 index 0000000..af68b17 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCMock.framework/Headers/OCMockRecorder.h @@ -0,0 +1,32 @@ +//--------------------------------------------------------------------------------------- +// $Id: OCMockRecorder.h 68 2010-08-20 13:20:52Z erik $ +// Copyright (c) 2004-2010 by Mulle Kybernetik. See License file for details. +//--------------------------------------------------------------------------------------- + +#import + +@interface OCMockRecorder : NSProxy +{ + id signatureResolver; + NSInvocation *recordedInvocation; + NSMutableArray *invocationHandlers; +} + +- (id)initWithSignatureResolver:(id)anObject; + +- (BOOL)matchesInvocation:(NSInvocation *)anInvocation; +- (void)releaseInvocation; + +- (id)andReturn:(id)anObject; +- (id)andReturnValue:(NSValue *)aValue; +- (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; + +@end diff --git a/ConciseKitSpecs/Frameworks/OCMock.framework/OCMock b/ConciseKitSpecs/Frameworks/OCMock.framework/OCMock deleted file mode 120000 index c388ea8..0000000 --- a/ConciseKitSpecs/Frameworks/OCMock.framework/OCMock +++ /dev/null @@ -1 +0,0 @@ -Versions/Current/OCMock \ No newline at end of file diff --git a/ConciseKitSpecs/Frameworks/OCMock.framework/OCMock b/ConciseKitSpecs/Frameworks/OCMock.framework/OCMock new file mode 100755 index 0000000..2d6301d Binary files /dev/null and b/ConciseKitSpecs/Frameworks/OCMock.framework/OCMock differ diff --git a/ConciseKitSpecs/Frameworks/OCMock.framework/Resources b/ConciseKitSpecs/Frameworks/OCMock.framework/Resources deleted file mode 120000 index 953ee36..0000000 --- a/ConciseKitSpecs/Frameworks/OCMock.framework/Resources +++ /dev/null @@ -1 +0,0 @@ -Versions/Current/Resources \ No newline at end of file diff --git a/ConciseKitSpecs/Frameworks/OCMock.framework/Resources/Info.plist b/ConciseKitSpecs/Frameworks/OCMock.framework/Resources/Info.plist new file mode 100644 index 0000000..4634d14 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCMock.framework/Resources/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + OCMock + CFBundleIdentifier + com.mulle-kybernetik.OCMock + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + OCMock + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.29 + CFBundleSignature + ???? + CFBundleVersion + 1 + NSHumanReadableCopyright + Copyright © 2004-2009 Mulle Kybernetik. + + diff --git a/ConciseKitSpecs/Frameworks/OCMock.framework/Resources/License.txt b/ConciseKitSpecs/Frameworks/OCMock.framework/Resources/License.txt new file mode 100644 index 0000000..60a14bf --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCMock.framework/Resources/License.txt @@ -0,0 +1,15 @@ + + Copyright (c) 2004-2010 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 + notice appear in all copies of the software, derivative works or modified versions, + and any portions thereof, and that both notices appear in supporting documentation, + and that credit is given to Mulle Kybernetik in all documents and publicity + pertaining to direct or indirect use of this code or its derivatives. + + THIS IS EXPERIMENTAL SOFTWARE AND IT IS KNOWN TO HAVE BUGS, SOME OF WHICH MAY HAVE + SERIOUS CONSEQUENCES. THE COPYRIGHT HOLDER ALLOWS FREE USE OF THIS SOFTWARE IN ITS + "AS IS" CONDITION. THE COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY + DAMAGES WHATSOEVER RESULTING DIRECTLY OR INDIRECTLY FROM THE USE OF THIS SOFTWARE + OR OF ANY DERIVATIVE WORK. \ No newline at end of file diff --git a/ConciseKitSpecs/Frameworks/OCMock.framework/Versions/Current b/ConciseKitSpecs/Frameworks/OCMock.framework/Versions/Current deleted file mode 120000 index 8c7e5a6..0000000 --- a/ConciseKitSpecs/Frameworks/OCMock.framework/Versions/Current +++ /dev/null @@ -1 +0,0 @@ -A \ No newline at end of file diff --git a/ConciseKitSpecs/Frameworks/OCMock.framework/Versions/Current/Headers/NSNotificationCenter+OCMAdditions.h b/ConciseKitSpecs/Frameworks/OCMock.framework/Versions/Current/Headers/NSNotificationCenter+OCMAdditions.h new file mode 100644 index 0000000..7d5d6d1 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCMock.framework/Versions/Current/Headers/NSNotificationCenter+OCMAdditions.h @@ -0,0 +1,15 @@ +//--------------------------------------------------------------------------------------- +// $Id: NSNotificationCenter+OCMAdditions.h 57 2010-07-19 06:14:27Z erik $ +// Copyright (c) 2009 by Mulle Kybernetik. See License file for details. +//--------------------------------------------------------------------------------------- + +#import + +@class OCMockObserver; + + +@interface NSNotificationCenter(OCMAdditions) + +- (void)addMockObserver:(OCMockObserver *)notificationObserver name:(NSString *)notificationName object:(id)notificationSender; + +@end diff --git a/ConciseKitSpecs/Frameworks/OCMock.framework/Versions/Current/Headers/OCMArg.h b/ConciseKitSpecs/Frameworks/OCMock.framework/Versions/Current/Headers/OCMArg.h new file mode 100644 index 0000000..94ede8f --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCMock.framework/Versions/Current/Headers/OCMArg.h @@ -0,0 +1,33 @@ +//--------------------------------------------------------------------------------------- +// $Id: OCMArg.h 65 2010-07-28 01:49:42Z erik $ +// Copyright (c) 2009-2010 by Mulle Kybernetik. See License file for details. +//--------------------------------------------------------------------------------------- + +#import + +@interface OCMArg : NSObject + +// constraining arguments + ++ (id)any; ++ (void *)anyPointer; ++ (id)isNil; ++ (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 + ++ (id *)setTo:(id)value; + +// internal use only + ++ (id)resolveSpecialValues:(NSValue *)value; + +@end + +#define OCMOCK_ANY [OCMArg any] +#define OCMOCK_VALUE(variable) [NSValue value:&variable withObjCType:@encode(__typeof__(variable))] diff --git a/ConciseKitSpecs/Frameworks/OCMock.framework/Versions/Current/Headers/OCMConstraint.h b/ConciseKitSpecs/Frameworks/OCMock.framework/Versions/Current/Headers/OCMConstraint.h new file mode 100644 index 0000000..72b23e8 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCMock.framework/Versions/Current/Headers/OCMConstraint.h @@ -0,0 +1,64 @@ +//--------------------------------------------------------------------------------------- +// $Id: OCMConstraint.h 57 2010-07-19 06:14:27Z erik $ +// Copyright (c) 2007-2010 by Mulle Kybernetik. See License file for details. +//--------------------------------------------------------------------------------------- + +#import + + +@interface OCMConstraint : NSObject + ++ (id)constraint; +- (BOOL)evaluate:(id)value; + +// 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; + + +@end + +@interface OCMAnyConstraint : OCMConstraint +@end + +@interface OCMIsNilConstraint : OCMConstraint +@end + +@interface OCMIsNotNilConstraint : OCMConstraint +@end + +@interface OCMIsNotEqualConstraint : OCMConstraint +{ + @public + id testValue; +} + +@end + +@interface OCMInvocationConstraint : OCMConstraint +{ + @public + NSInvocation *invocation; +} + +@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/ConciseKitSpecs/Frameworks/OCMock.framework/Versions/Current/Headers/OCMock.h b/ConciseKitSpecs/Frameworks/OCMock.framework/Versions/Current/Headers/OCMock.h new file mode 100644 index 0000000..1b2d1a4 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCMock.framework/Versions/Current/Headers/OCMock.h @@ -0,0 +1,10 @@ +//--------------------------------------------------------------------------------------- +// $Id$ +// Copyright (c) 2004-2008 by Mulle Kybernetik. See License file for details. +//--------------------------------------------------------------------------------------- + +#import "OCMockObject.h" +#import "OCMockRecorder.h" +#import "OCMConstraint.h" +#import "OCMArg.h" +#import "NSNotificationCenter+OCMAdditions.h" diff --git a/ConciseKitSpecs/Frameworks/OCMock.framework/Versions/Current/Headers/OCMockObject.h b/ConciseKitSpecs/Frameworks/OCMock.framework/Versions/Current/Headers/OCMockObject.h new file mode 100644 index 0000000..24477c7 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCMock.framework/Versions/Current/Headers/OCMockObject.h @@ -0,0 +1,43 @@ +//--------------------------------------------------------------------------------------- +// $Id: OCMockObject.h 69 2010-08-20 16:05:58Z erik $ +// Copyright (c) 2004-2008 by Mulle Kybernetik. See License file for details. +//--------------------------------------------------------------------------------------- + +#import + +@interface OCMockObject : NSProxy +{ + BOOL isNice; + BOOL expectationOrderMatters; + NSMutableArray *recorders; + NSMutableArray *expectations; + NSMutableArray *rejections; + NSMutableArray *exceptions; +} + ++ (id)mockForClass:(Class)aClass; ++ (id)mockForProtocol:(Protocol *)aProtocol; ++ (id)partialMockForObject:(NSObject *)anObject; + ++ (id)niceMockForClass:(Class)aClass; ++ (id)niceMockForProtocol:(Protocol *)aProtocol; + ++ (id)observerMock; + +- (id)init; + +- (void)setExpectationOrderMatters:(BOOL)flag; + +- (id)stub; +- (id)expect; +- (id)reject; + +- (void)verify; + +// internal use only + +- (id)getNewRecorder; +- (BOOL)handleInvocation:(NSInvocation *)anInvocation; +- (void)handleUnRecordedInvocation:(NSInvocation *)anInvocation; + +@end diff --git a/ConciseKitSpecs/Frameworks/OCMock.framework/Versions/Current/Headers/OCMockRecorder.h b/ConciseKitSpecs/Frameworks/OCMock.framework/Versions/Current/Headers/OCMockRecorder.h new file mode 100644 index 0000000..af68b17 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCMock.framework/Versions/Current/Headers/OCMockRecorder.h @@ -0,0 +1,32 @@ +//--------------------------------------------------------------------------------------- +// $Id: OCMockRecorder.h 68 2010-08-20 13:20:52Z erik $ +// Copyright (c) 2004-2010 by Mulle Kybernetik. See License file for details. +//--------------------------------------------------------------------------------------- + +#import + +@interface OCMockRecorder : NSProxy +{ + id signatureResolver; + NSInvocation *recordedInvocation; + NSMutableArray *invocationHandlers; +} + +- (id)initWithSignatureResolver:(id)anObject; + +- (BOOL)matchesInvocation:(NSInvocation *)anInvocation; +- (void)releaseInvocation; + +- (id)andReturn:(id)anObject; +- (id)andReturnValue:(NSValue *)aValue; +- (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; + +@end diff --git a/ConciseKitSpecs/Frameworks/OCMock.framework/Versions/Current/OCMock b/ConciseKitSpecs/Frameworks/OCMock.framework/Versions/Current/OCMock new file mode 100755 index 0000000..2d6301d Binary files /dev/null and b/ConciseKitSpecs/Frameworks/OCMock.framework/Versions/Current/OCMock differ diff --git a/ConciseKitSpecs/Frameworks/OCMock.framework/Versions/Current/Resources/Info.plist b/ConciseKitSpecs/Frameworks/OCMock.framework/Versions/Current/Resources/Info.plist new file mode 100644 index 0000000..4634d14 --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCMock.framework/Versions/Current/Resources/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + OCMock + CFBundleIdentifier + com.mulle-kybernetik.OCMock + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + OCMock + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.29 + CFBundleSignature + ???? + CFBundleVersion + 1 + NSHumanReadableCopyright + Copyright © 2004-2009 Mulle Kybernetik. + + diff --git a/ConciseKitSpecs/Frameworks/OCMock.framework/Versions/Current/Resources/License.txt b/ConciseKitSpecs/Frameworks/OCMock.framework/Versions/Current/Resources/License.txt new file mode 100644 index 0000000..60a14bf --- /dev/null +++ b/ConciseKitSpecs/Frameworks/OCMock.framework/Versions/Current/Resources/License.txt @@ -0,0 +1,15 @@ + + Copyright (c) 2004-2010 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 + notice appear in all copies of the software, derivative works or modified versions, + and any portions thereof, and that both notices appear in supporting documentation, + and that credit is given to Mulle Kybernetik in all documents and publicity + pertaining to direct or indirect use of this code or its derivatives. + + THIS IS EXPERIMENTAL SOFTWARE AND IT IS KNOWN TO HAVE BUGS, SOME OF WHICH MAY HAVE + SERIOUS CONSEQUENCES. THE COPYRIGHT HOLDER ALLOWS FREE USE OF THIS SOFTWARE IN ITS + "AS IS" CONDITION. THE COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY + DAMAGES WHATSOEVER RESULTING DIRECTLY OR INDIRECTLY FROM THE USE OF THIS SOFTWARE + OR OF ANY DERIVATIVE WORK. \ No newline at end of file diff --git a/ConciseKitSpecs/Spec/NSArrayConciseKitSpec.m b/ConciseKitSpecs/Spec/NSArrayConciseKitSpec.m index 7b03b17..aa3e38e 100644 --- a/ConciseKitSpecs/Spec/NSArrayConciseKitSpec.m +++ b/ConciseKitSpecs/Spec/NSArrayConciseKitSpec.m @@ -20,18 +20,75 @@ assertThat([array $first], equalTo(@"foo")); }); }); + + describe(@"-$first n", ^{ + it(@"should return first n objects from array", ^{ + assertThat([array $first:2], equalTo(@[@"foo", @"bar"])); + }); + }); describe(@"-$last", ^{ it(@"returns the first object", ^{ assertThat([array $last], equalTo(@"baz")); }); }); + + describe(@"-$all", ^{ + it(@"returns YES if all values of the array match the specification", ^{ + BOOL allValues = [$arr(@"ant", @"bear", @"cat") $all:^BOOL(NSString *obj) { + return [obj length] >= 3; + }]; + + assertThatBool(allValues, equalToBool(YES)); + }); + + it(@"returns NO if 1 or more values do not match the specification", ^{ + BOOL allValues = [$arr(@"ant", @"bear", @"cat") $all:^BOOL(NSString *obj) { + return [obj length] >= 4; + }]; + + assertThatBool(allValues, equalToBool(NO)); + }); + }); + + describe(@"-$any", ^{ + it(@"should return YES if one or more values match the specification", ^{ + BOOL anyValues = [$arr(@"ant", @"bear", @"cat") $any:^BOOL(NSString *obj) { + return [obj length] >= 4; + }]; + + assertThatBool(anyValues, equalToBool(YES)); + }); + + it(@"should return NO none of the values match the specification", ^{ + BOOL anyValues = [$arr(@"ant", @"bear", @"cat") $any:^BOOL(NSString *obj) { + return [obj length] >= 5; + }]; + + assertThatBool(anyValues, equalToBool(NO)); + }); + }); describe(@"-$at:", ^{ it(@"returns the object at the given index", ^{ assertThat([array $at:1], equalTo(@"bar")); }); }); + + describe(@"-$compact", ^{ + it(@"returns array with nulls removed", ^{ + NSArray *strippedArray = [[NSArray arrayWithObjects:@1, @2, [NSNull null], @3, nil] $compact]; + assertThat(strippedArray, equalTo(@[@1, @2, @3])); + }); + }); + + describe(@"-$concat", ^{ + it(@"should concatenate self with argument array", ^{ + NSArray *concatenatedArray = [array $concat:@[@3, @4]]; + + assertThat(concatenatedArray, equalTo(@[@"foo", @"bar", @"baz", @3, @4])); + }); + }); describe(@"-$each:", ^{ it(@"runs block for each item, passing the item as an argument", ^{ @@ -78,6 +135,30 @@ assertThatInteger(i, equalToInteger(4)); }); }); + + describe(@"-$empty", ^{ + it(@"should return YES if there are no objects in the array", ^{ + NSArray *emptyArray = [NSArray array]; + assertThatBool([emptyArray $empty], equalToBool(YES)); + }); + + it(@"should return NO if there are an objects in array", ^{ + NSArray *nonEmptyArray = @[@1]; + assertThatBool([nonEmptyArray $empty], equalToBool(NO)); + }); + }); + + describe(@"-$include", ^{ + it(@"should return YES if any obj in array passes the specification", ^{ + BOOL included = [array $include:@"bar"]; + assertThatBool(included, equalToBool(YES)); + }); + + it(@"should return NO if no obj in array passes the specification", ^{ + BOOL included = [array $include:@"trent"]; + assertThatBool(included, equalToBool(NO)); + }); + }); describe(@"-$map:", ^{ it(@"runs block for each item, passing the item as an argument, and creates a new array containing the return values of the block", ^{ @@ -114,6 +195,13 @@ assertThat(result, equalTo($integer(60))); }); }); + + describe(@"-$reverse", ^{ + it(@"should return a new array with contents of self in reverse order", ^{ + NSArray *reversedArray = [array $reverse]; + assertThat(reversedArray, equalTo(@[@"baz", @"bar", @"foo"])); + }); + }); describe(@"-$select:", ^{ it(@"creates a subarray from elements where the block returns YES", ^{ @@ -170,6 +258,13 @@ assertThat(newArray, equalTo([NSArray arrayWithObject:@"lol"])); }); }); + + describe(@"-$drop", ^{ + it(@"should return a MutableArray with n objects removed from beginning of array", ^{ + NSMutableArray *droppedArray = [marray $drop:2]; + assertThat(droppedArray, equalTo(@[@"baz"])); + }); + }); describe(@"-$push:", ^{ it(@"adds an object", ^{ @@ -192,6 +287,13 @@ assertThat([marray $pop], equalTo(@"baz")); }); }); + + describe(@"-$replace", ^{ + it(@"should replace self with new array", ^{ + [marray $replace:@[@1, @2, @3]]; + assertThat(marray, equalTo(@[@1, @2, @3])); + }); + }); describe(@"-$unshift:", ^{ it(@"adds first object", ^{ diff --git a/src/NSArray+ConciseKit.h b/src/NSArray+ConciseKit.h index 5672317..c635eaf 100644 --- a/src/NSArray+ConciseKit.h +++ b/src/NSArray+ConciseKit.h @@ -3,16 +3,24 @@ @interface NSArray (ConciseKit) - (id)$first; +- (NSArray *)$first:(int)n; - (id)$last; +- (BOOL)$all:(BOOL (^)(id obj))block; +- (BOOL)$any:(BOOL (^)(id obj))block; - (id)$at:(NSUInteger)index; +- (NSArray *)$compact; +- (NSArray *)$concat:(NSArray *)otherArray; - (NSArray *)$each:(void (^)(id obj))block; - (NSArray *)$eachWithIndex:(void (^)(id obj, NSUInteger idx))block; - (NSArray *)$eachWithStop:(void (^)(id obj, BOOL *stop))block; - (NSArray *)$eachWithIndexAndStop:(void (^)(id obj, NSUInteger idx, BOOL *stop))block; +- (BOOL)$empty; +- (BOOL)$include:(id)obj; - (NSArray *)$map:(id (^)(id obj))block; - (NSArray *)$mapWithIndex:(id (^)(id obj, NSUInteger idx))block; - (id)$reduce:(id (^)(id memo, id obj))block; - (id)$reduceStartingAt:(id)starting with:(id (^)(id memo, id obj))block; +- (NSArray *)$reverse; - (NSArray *)$select:(BOOL(^)(id obj))block; - (id)$detect:(BOOL(^)(id obj))block; - (NSString *)$join; @@ -22,9 +30,11 @@ @interface NSMutableArray (ConciseKit) +- (NSMutableArray *)$drop:(int)n; - (NSMutableArray *)$push:(id)anObject; - (id)$pop; -- (NSMutableArray *)$unshift:(id)anObject; +- (NSArray *)$replace:(NSArray *)otherArray; - (id)$shift; +- (NSMutableArray *)$unshift:(id)anObject; @end \ No newline at end of file diff --git a/src/NSArray+ConciseKit.m b/src/NSArray+ConciseKit.m index 0cfc67d..ff4b86d 100644 --- a/src/NSArray+ConciseKit.m +++ b/src/NSArray+ConciseKit.m @@ -6,14 +6,40 @@ @implementation NSArray (ConciseKit) return [self objectAtIndex:0]; } +- (NSArray *)$first:(int)n { + NSRange range = NSMakeRange(0, (NSUInteger)n); + return [self subarrayWithRange:range]; +} + - (id)$last { return [self lastObject]; } +- (BOOL)$all:(BOOL (^)(id))block { + return [self count] == [[self $select:block] count]; +} + +- (BOOL)$any:(BOOL (^)(id))block { + return [[self $select:block] count] > 0; +} + - (id)$at:(NSUInteger)index { return [self objectAtIndex:index]; } +- (NSArray *)$compact { + NSMutableArray *backingArray = [NSMutableArray arrayWithArray:self]; + [backingArray removeObjectIdenticalTo:[NSNull null]]; + return [NSArray arrayWithArray:backingArray]; +} + +- (NSArray *)$concat:(NSArray *)otherArray { + NSMutableArray *mutableArray = [NSMutableArray arrayWithArray:self]; + [mutableArray addObjectsFromArray:otherArray]; + return [NSArray arrayWithArray:mutableArray]; +} + + - (NSArray *)$each:(void (^)(id obj))block { [self enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { block(obj); @@ -42,6 +68,18 @@ @implementation NSArray (ConciseKit) return self; } +- (BOOL)$empty { + return [self count] == 0; +} + +- (BOOL)$include:(id)someObj { + NSIndexSet *indexes = [self indexesOfObjectsPassingTest:^BOOL(id obj, NSUInteger idx, BOOL *stop) { + return obj == someObj; + }]; + + return [indexes count] > 0; +} + - (NSArray *)$map:(id (^)(id obj))block { __block NSMutableArray *array = [NSMutableArray arrayWithCapacity:[self count]]; [self enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { @@ -78,6 +116,10 @@ @implementation NSArray (ConciseKit) return ret; } +- (NSArray *)$reverse { + return [[self reverseObjectEnumerator] allObjects]; +} + - (NSArray *)$select:(BOOL(^)(id obj))block { __block NSMutableArray *array = [NSMutableArray arrayWithCapacity:[self count]]; [self enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { @@ -120,6 +162,17 @@ @implementation NSMutableArray (ConciseKit) #define IF_ARC(with, without) without #endif +- (NSMutableArray *)$drop:(int)n { + if (n < 1) + return self; + + NSRange dropRange = NSMakeRange(0, n); + NSMutableArray *mutableArray = [NSMutableArray arrayWithArray:self]; + [mutableArray removeObjectsInRange:dropRange]; + + return mutableArray; +} + - (NSMutableArray *)$push:(id)anObject { [self addObject:anObject]; return self; @@ -131,9 +184,10 @@ @implementation NSMutableArray (ConciseKit) return lastObject; } -- (NSMutableArray *)$unshift:(id)anObject { - [self insertObject:anObject atIndex:0]; - return self; +- (NSArray *)$replace:(NSArray *)otherArray { + [self removeAllObjects]; + [self addObjectsFromArray:otherArray]; + return self; } - (id)$shift; { @@ -143,4 +197,9 @@ @implementation NSMutableArray (ConciseKit) return firstObject; } +- (NSMutableArray *)$unshift:(id)anObject { + [self insertObject:anObject atIndex:0]; + return self; +} + @end \ No newline at end of file