diff --git a/Frameworks/OCHamcrest.framework/Headers b/Frameworks/OCHamcrest.framework/Headers new file mode 120000 index 0000000..a177d2a --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Headers @@ -0,0 +1 @@ +Versions/Current/Headers \ No newline at end of file diff --git a/Frameworks/OCHamcrest.framework/OCHamcrest b/Frameworks/OCHamcrest.framework/OCHamcrest new file mode 120000 index 0000000..7d4d801 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/OCHamcrest @@ -0,0 +1 @@ +Versions/Current/OCHamcrest \ No newline at end of file diff --git a/Frameworks/OCHamcrest.framework/Resources b/Frameworks/OCHamcrest.framework/Resources new file mode 120000 index 0000000..953ee36 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCAllOf.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCAllOf.h new file mode 100644 index 0000000..5b86261 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCAllOf.h @@ -0,0 +1,45 @@ +// +// OCHamcrest - HCAllOf.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCAllOf : HCBaseMatcher +{ + NSArray *matchers; +} + ++ (instancetype)allOf:(NSArray *)theMatchers; +- (instancetype)initWithMatchers:(NSArray *)theMatchers; + +@end + + +OBJC_EXPORT id HC_allOf(id match, ...) NS_REQUIRES_NIL_TERMINATION; + +/** + allOf(firstMatcher, ...) - + Matches if all of the given matchers evaluate to @c YES. + + @param firstMatcher,... A comma-separated list of matchers ending with @c nil. + + The matchers are evaluated from left to right using short-circuit evaluation, so evaluation + stops as soon as a matcher returns @c NO. + + Any argument that is not a matcher is implicitly wrapped in an @ref equalTo matcher to check for + equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_allOf instead.) + + @ingroup logical_matchers + */ +#ifdef HC_SHORTHAND + #define allOf HC_allOf +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCAnyOf.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCAnyOf.h new file mode 100644 index 0000000..58d1b52 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCAnyOf.h @@ -0,0 +1,45 @@ +// +// OCHamcrest - HCAnyOf.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCAnyOf : HCBaseMatcher +{ + NSArray *matchers; +} + ++ (instancetype)anyOf:(NSArray *)theMatchers; +- (instancetype)initWithMatchers:(NSArray *)theMatchers; + +@end + + +OBJC_EXPORT id HC_anyOf(id match, ...) NS_REQUIRES_NIL_TERMINATION; + +/** + anyOf(firstMatcher, ...) - + Matches if any of the given matchers evaluate to @c YES. + + @param firstMatcher,... A comma-separated list of matchers ending with @c nil. + + The matchers are evaluated from left to right using short-circuit evaluation, so evaluation + stops as soon as a matcher returns @c YES. + + Any argument that is not a matcher is implicitly wrapped in an @ref equalTo matcher to check for + equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_anyOf instead.) + + @ingroup logical_matchers + */ +#ifdef HC_SHORTHAND + #define anyOf HC_anyOf +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCAssertThat.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCAssertThat.h new file mode 100644 index 0000000..55b538c --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCAssertThat.h @@ -0,0 +1,42 @@ +// +// OCHamcrest - HCAssertThat.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + +@protocol HCMatcher; + + +OBJC_EXPORT void HC_assertThatWithLocation(id testCase, id actual, id matcher, + const char *fileName, int lineNumber); + +#define HC_assertThat(actual, matcher) \ + HC_assertThatWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + assertThat(actual, matcher) - + Asserts that actual value satisfies matcher. + + @param actual The object to evaluate as the actual value. + @param matcher The matcher to satisfy as the expected condition. + + @c assertThat passes the actual value to the matcher for evaluation. If the matcher is not + satisfied, an exception is thrown describing the mismatch. + + @c assertThat is designed to integrate well with OCUnit and other unit testing frameworks. + Unmet assertions are reported as test failures. In Xcode, these failures can be clicked to + reveal the line of the assertion. + + In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_assertThat instead. + + @ingroup integration + */ +#ifdef HC_SHORTHAND + #define assertThat HC_assertThat +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCBaseDescription.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCBaseDescription.h new file mode 100644 index 0000000..ecbdee0 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCBaseDescription.h @@ -0,0 +1,33 @@ +// +// OCHamcrest - HCBaseDescription.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import +#import + + +/** + Base class for all HCDescription implementations. + + @ingroup core + */ +@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/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCBaseMatcher.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCBaseMatcher.h new file mode 100644 index 0000000..e26849c --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCBaseMatcher.h @@ -0,0 +1,27 @@ +// +// OCHamcrest - HCBaseMatcher.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import +#import + +#import // Convenience header, to provide OBJC_EXPORT + + +/** + Base class for all HCMatcher implementations. + + Most implementations can just implement @c -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 @c -matches: call it with a @c nil description. + + @ingroup core + */ +@interface HCBaseMatcher : NSObject +@end diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCClassMatcher.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCClassMatcher.h new file mode 100644 index 0000000..8e249df --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCClassMatcher.h @@ -0,0 +1,20 @@ +// +// OCHamcrest - HCClassMatcher.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCClassMatcher : HCBaseMatcher +{ + Class theClass; +} + +- (instancetype)initWithType:(Class)type; + +@end diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCCollectMatchers.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCCollectMatchers.h new file mode 100644 index 0000000..b8684a2 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCCollectMatchers.h @@ -0,0 +1,23 @@ +// +// OCHamcrest - HCCollectMatchers.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import +#import + +#import + +@protocol HCMatcher; + + +/** + Returns an array of matchers from a variable-length comma-separated list terminated by @c nil. + + @ingroup helpers +*/ +OBJC_EXPORT NSMutableArray *HCCollectMatchers(id item1, va_list args); diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCConformsToProtocol.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCConformsToProtocol.h new file mode 100644 index 0000000..a185fee --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCConformsToProtocol.h @@ -0,0 +1,42 @@ +// +// OCHamcrest - HCConformsToProtocol.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Todd Farrell +// + +#import + + +@interface HCConformsToProtocol : HCBaseMatcher +{ + Protocol *theProtocol; +} + ++ (instancetype)conformsTo:(Protocol *)protocol; +- (instancetype)initWithProtocol:(Protocol *)protocol; + +@end + + +OBJC_EXPORT id HC_conformsTo(Protocol *aProtocol); + +/** + conformsTo(aProtocol) - + Matches if object conforms to a given protocol. + + @param aProtocol The protocol to compare against as the expected protocol. + + This matcher checks whether the evaluated object conforms to @a aProtocol. + + Example: + @li @ref conformsTo(\@protocol(NSObject)) + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_conformsTo instead.) + + @ingroup object_matchers + */ +#ifdef HC_SHORTHAND + #define conformsTo HC_conformsTo +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCDescribedAs.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCDescribedAs.h new file mode 100644 index 0000000..0b3e804 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCDescribedAs.h @@ -0,0 +1,50 @@ +// +// OCHamcrest - HCDescribedAs.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCDescribedAs : HCBaseMatcher +{ + NSString *descriptionTemplate; + id matcher; + NSArray *values; +} + ++ (instancetype)describedAs:(NSString *)description + forMatcher:(id )aMatcher + overValues:(NSArray *)templateValues; + +- (instancetype)initWithDescription:(NSString *)description + forMatcher:(id )aMatcher + overValues:(NSArray *)templateValues; + +@end + + +OBJC_EXPORT id HC_describedAs(NSString *description, id matcher, ...) NS_REQUIRES_NIL_TERMINATION; + +/** + describedAs(description, matcher, ...) - + Adds custom failure description to a given matcher. + + @param description Overrides the matcher's description. + @param matcher,... The matcher to satisfy, followed by a comma-separated list of substitution values ending with @c nil. + + The description may contain substitution placeholders \%0, \%1, etc. These will be replaced by + any values that follow the matcher. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_describedAs instead.) + + @ingroup decorator_matchers + */ +#ifdef HC_SHORTHAND + #define describedAs HC_describedAs +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCDescription.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCDescription.h new file mode 100644 index 0000000..9693487 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCDescription.h @@ -0,0 +1,48 @@ +// +// OCHamcrest - HCDescription.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +/** + A description of an HCMatcher. + + An HCMatcher will describe itself to a description which can later be used for reporting. + + @ingroup core + */ +@protocol HCDescription + +/** + Appends some plain text to the description. + + @return @c self, for chaining. + */ +- (id)appendText:(NSString *)text; + +/** + Appends description of given value to @c self. + + If the value implements the @ref HCSelfDescribing protocol, then it will be used. + + @return @c self, for chaining. + */ +- (id)appendDescriptionOf:(id)value; + +/** + Appends a list of objects to the description. + + @return @c self, for chaining. + */ +- (id)appendList:(NSArray *)values + start:(NSString *)start + separator:(NSString *)separator + end:(NSString *)end; + +@end diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCHasCount.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCHasCount.h new file mode 100644 index 0000000..7a58a63 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCHasCount.h @@ -0,0 +1,63 @@ +// +// OCHamcrest - HCHasCount.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCHasCount : HCBaseMatcher +{ + id countMatcher; +} + ++ (instancetype)hasCount:(id )matcher; +- (instancetype)initWithCount:(id )matcher; + +@end + + +OBJC_EXPORT id HC_hasCount(id matcher); + +/** + hasCount(aMatcher) - + Matches if object's @c -count satisfies a given matcher. + + @param aMatcher The matcher to satisfy. + + This matcher invokes @c -count on the evaluated object to get the number of elements it + contains, passing the result to @a aMatcher for evaluation. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_hasCount instead.) + + @ingroup collection_matchers + */ +#ifdef HC_SHORTHAND + #define hasCount HC_hasCount +#endif + + +OBJC_EXPORT id HC_hasCountOf(NSUInteger count); + +/** + hasCountOf(value) - + Matches if object's @c -count equals a given value. + + @param value @c NSUInteger value to compare against as the expected value. + + This matcher invokes @c -count on the evaluated object to get the number of elements it + contains, comparing the result to @a value for equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_hasCountOf instead.) + + @ingroup collection_matchers + */ +#ifdef HC_SHORTHAND + #define hasCountOf HC_hasCountOf +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCHasDescription.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCHasDescription.h new file mode 100644 index 0000000..ede7019 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCHasDescription.h @@ -0,0 +1,44 @@ +// +// OCHamcrest - HCHasDescription.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCHasDescription : HCInvocationMatcher + ++ (instancetype)hasDescription:(id )descriptionMatcher; +- (instancetype)initWithDescription:(id )descriptionMatcher; + +@end + + +OBJC_EXPORT id HC_hasDescription(id match); + +/** + hasDescription(aMatcher) - + Matches if object's @c -description satisfies a given matcher. + + @param aMatcher The matcher to satisfy, or an expected value for @ref equalTo matching. + + This matcher invokes @c -description on the evaluated object to get its description, passing the + result to a given matcher for evaluation. If the @a aMatcher argument is not a matcher, it is + implicitly wrapped in an @ref equalTo matcher to check for equality. + + Examples: + @li @ref hasDescription(@ref startsWith(\@"foo")) + @li @ref hasDescription(\@"bar") + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_hasDescription instead.) + + @ingroup object_matchers + */ +#ifdef HC_SHORTHAND + #define hasDescription HC_hasDescription +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCHasProperty.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCHasProperty.h new file mode 100644 index 0000000..60ffead --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCHasProperty.h @@ -0,0 +1,49 @@ +// +// OCHamcrest - HCHasProperty.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Justin Shacklette +// + +#import + + +@interface HCHasProperty : HCBaseMatcher +{ + NSString *propertyName; + id valueMatcher; +} + ++ (instancetype)hasProperty:(NSString *)property value:(id )aValueMatcher; +- (instancetype)initWithProperty:(NSString *)property value:(id )aValueMatcher; + +@end + + +OBJC_EXPORT id HC_hasProperty(NSString *name, id valueMatch); + +/** + hasProperty(name, valueMatcher) - + Matches if object has a method of a given name whose return value satisfies a given matcher. + + @param name The name of a method without arguments that returns an object. + @param valueMatcher The matcher to satisfy for the return value, or an expected value for @ref equalTo matching. + + This matcher first checks if the evaluated object has a method with a name matching the given + @c name. If so, it invokes the method and sees if the returned value satisfies @c valueMatcher. + + While this matcher is called "hasProperty", it's useful for checking the results of any simple + methods, not just properties. + + Examples: + @li @ref hasProperty(\@"firstName", \@"Joe") + @li @ref hasProperty(\@"firstName", startsWith(\@"J")) + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_hasProperty instead.) + + @ingroup object_matchers + */ +#ifdef HC_SHORTHAND + #define hasProperty HC_hasProperty +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCInvocationMatcher.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCInvocationMatcher.h new file mode 100755 index 0000000..8dde95a --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCInvocationMatcher.h @@ -0,0 +1,57 @@ +// +// OCHamcrest - HCInvocationMatcher.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +/** + 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. + + @ingroup helpers + */ +@interface HCInvocationMatcher : HCBaseMatcher +{ + NSInvocation *invocation; + id subMatcher; + BOOL shortMismatchDescription; +} + +/** + Determines whether a mismatch will be described in short form. + + Default is long form, which describes the object, the name of the invocation, and the + sub-matcher's mismatch diagnosis. Short form only has the sub-matcher's mismatch diagnosis. + */ +@property (nonatomic, assign) BOOL shortMismatchDescription; + +/** + Helper method for creating an invocation. + + A class is specified only so we can determine the method signature. + */ ++ (NSInvocation *)invocationForSelector:(SEL)selector onClass:(Class)aClass; + +/** + Returns an HCInvocationMatcher object initialized with an invocation and a matcher. + */ +- (instancetype)initWithInvocation:(NSInvocation *)anInvocation matching:(id )aMatcher; + +/** + Invokes stored invocation on given item and returns the result. + */ +- (id)invokeOn:(id)item; + +/** + Returns string representation of the invocation's selector. + */ +- (NSString *)stringFromSelector; + +@end diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIs.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIs.h new file mode 100644 index 0000000..8574299 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIs.h @@ -0,0 +1,54 @@ +// +// OCHamcrest - HCIs.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCIs : HCBaseMatcher +{ + id matcher; +} + ++ (instancetype)is:(id )aMatcher; +- (instancetype)initWithMatcher:(id )aMatcher; + +@end + + +OBJC_EXPORT id HC_is(id match); + +/** + is(aMatcher) - + Decorates another matcher, or provides a shortcut to the frequently used @ref is(equalTo(x)). + + @param aMatcher The matcher to satisfy, or an expected value for @ref equalTo matching. + + This matcher compares the evaluated object to the given matcher. + + If the @a aMatcher argument is a matcher, its behavior is retained, but the test may be more + expressive. For example: + @li @ref assertThatInt(value, equalToInt(5)) + @li @ref assertThatInt(value, is(equalToInt(5))) + + If the @a aMatcher argument is not a matcher, it is wrapped in an @ref equalTo matcher. This + makes the following statements equivalent: + @li @ref assertThat(cheese, equalTo(s melly)) + @li @ref assertThat(cheese, is(equalTo(smelly))) + @li @ref assertThat(cheese, is(smelly)) + + Choose the style that makes your expression most readable. This will vary depending on context. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_is instead.) + + @ingroup decorator_matchers + */ +#ifdef HC_SHORTHAND + #define is HC_is +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsAnything.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsAnything.h new file mode 100644 index 0000000..b4ad3f7 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsAnything.h @@ -0,0 +1,63 @@ +// +// OCHamcrest - HCIsAnything.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCIsAnything : HCBaseMatcher +{ + NSString *description; +} + ++ (instancetype)isAnything; ++ (instancetype)isAnythingWithDescription:(NSString *)aDescription; + +- (instancetype)init; +- (instancetype)initWithDescription:(NSString *)aDescription; + +@end + + +OBJC_EXPORT id HC_anything(void); + +/** + Matches anything. + + This matcher always evaluates to @c YES. Specify this in composite matchers when the value of a + particular element is unimportant. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_anything instead.) + + @ingroup logical_matchers + */ +#ifdef HC_SHORTHAND + #define anything() HC_anything() +#endif + + +OBJC_EXPORT id HC_anythingWithDescription(NSString *aDescription); + +/** + anythingWithDescription(description) - + Matches anything. + + @param description A string used to describe this matcher. + + This matcher always evaluates to @c YES. Specify this in collection matchers when the value of a + particular element in a collection is unimportant. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_anything instead.) + + @ingroup logical_matchers + */ +#ifdef HC_SHORTHAND + #define anythingWithDescription HC_anythingWithDescription +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsCloseTo.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsCloseTo.h new file mode 100644 index 0000000..5e818ba --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsCloseTo.h @@ -0,0 +1,47 @@ +// +// OCHamcrest - HCIsCloseTo.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCIsCloseTo : HCBaseMatcher +{ + double value; + double delta; +} + ++ (instancetype)isCloseTo:(double)aValue within:(double)aDelta; +- (instancetype)initWithValue:(double)aValue delta:(double)aDelta; + +@end + + +OBJC_EXPORT id HC_closeTo(double aValue, double aDelta); + +/** + closeTo(aValue, aDelta) - + Matches if object is a number close to a given value, within a given delta. + + @param aValue The @c double value to compare against as the expected value. + @param aDelta The @c double maximum delta between the values for which the numbers are considered close. + + This matcher invokes @c -doubleValue on the evaluated object to get its value as a @c double. + The result is compared against @a aValue to see if the difference is within a positive @a aDelta. + + Example: + @li @ref closeTo(3.0, 0.25) + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_closeTo instead.) + + @ingroup number_matchers + */ +#ifdef HC_SHORTHAND + #define closeTo HC_closeTo +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsCollectionContaining.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsCollectionContaining.h new file mode 100644 index 0000000..facb93b --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsCollectionContaining.h @@ -0,0 +1,69 @@ +// +// OCHamcrest - HCIsCollectionContaining.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCIsCollectionContaining : HCBaseMatcher +{ + id elementMatcher; +} + ++ (instancetype)isCollectionContaining:(id )anElementMatcher; +- (instancetype)initWithMatcher:(id )anElementMatcher; + +@end + + +OBJC_EXPORT id HC_hasItem(id itemMatch); + +/** + hasItem(aMatcher) - + Matches if any element of collection satisfies a given matcher. + + @param aMatcher The matcher to satisfy, or an expected value for @ref equalTo matching. + + This matcher iterates the evaluated collection, searching for any element that satisfies a + given matcher. If a matching element is found, @c hasItem is satisfied. + + If the @a aMatcher argument is not a matcher, it is implicitly wrapped in an @ref equalTo + matcher to check for equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_hasItem instead.) + + @ingroup collection_matchers + */ +#ifdef HC_SHORTHAND + #define hasItem HC_hasItem +#endif + + +OBJC_EXPORT id HC_hasItems(id itemMatch, ...) NS_REQUIRES_NIL_TERMINATION; + +/** + hasItems(firstMatcher, ...) - + Matches if all of the given matchers are satisfied by any elements of the collection. + + @param firstMatcher,... A comma-separated list of matchers ending with @c nil. + + This matcher iterates the given matchers, searching for any elements in the evaluated collection + that satisfy them. If each matcher is satisfied, then @c hasItems is satisfied. + + Any argument that is not a matcher is implicitly wrapped in an @ref equalTo matcher to check for + equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c hasItems instead.) + + @ingroup collection_matchers + */ +#ifdef HC_SHORTHAND + #define hasItems HC_hasItems +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsCollectionContainingInAnyOrder.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsCollectionContainingInAnyOrder.h new file mode 100644 index 0000000..4937e94 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsCollectionContainingInAnyOrder.h @@ -0,0 +1,47 @@ +// +// OCHamcrest - HCIsCollectionContainingInAnyOrder.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCIsCollectionContainingInAnyOrder : HCBaseMatcher +{ + NSArray *matchers; +} + ++ (instancetype)isCollectionContainingInAnyOrder:(NSArray *)itemMatchers; +- (instancetype)initWithMatchers:(NSArray *)itemMatchers; + +@end + + +OBJC_EXPORT id HC_containsInAnyOrder(id itemMatch, ...) NS_REQUIRES_NIL_TERMINATION; + +/** + containsInAnyOrder(firstMatcher, ...) - + Matches if collection's elements, in any order, satisfy a given list of matchers. + + @param firstMatcher,... A comma-separated list of matchers ending with @c nil. + + This matcher iterates the evaluated collection, seeing if each element satisfies any of the + given matchers. The matchers are tried from left to right, and when a satisfied matcher is + found, it is no longer a candidate for the remaining elements. If a one-to-one correspondence is + established between elements and matchers, @c containsInAnyOrder is satisfied. + + Any argument that is not a matcher is implicitly wrapped in an @ref equalTo matcher to check for + equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_containsInAnyOrder instead.) + + @ingroup collection_matchers + */ +#ifdef HC_SHORTHAND + #define containsInAnyOrder HC_containsInAnyOrder +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsCollectionContainingInOrder.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsCollectionContainingInOrder.h new file mode 100644 index 0000000..269666e --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsCollectionContainingInOrder.h @@ -0,0 +1,45 @@ +// +// OCHamcrest - HCIsCollectionContainingInOrder.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCIsCollectionContainingInOrder : HCBaseMatcher +{ + NSArray *matchers; +} + ++ (instancetype)isCollectionContainingInOrder:(NSArray *)itemMatchers; +- (instancetype)initWithMatchers:(NSArray *)itemMatchers; + +@end + + +OBJC_EXPORT id HC_contains(id itemMatch, ...) NS_REQUIRES_NIL_TERMINATION; + +/** + contains(firstMatcher, ...) - + Matches if collection's elements satisfy a given list of matchers, in order. + + @param firstMatcher,... A comma-separated list of matchers ending with @c nil. + + This matcher iterates the evaluated collection and a given list of matchers, seeing if each + element satisfies its corresponding matcher. + + Any argument that is not a matcher is implicitly wrapped in an @ref equalTo matcher to check for + equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_contains instead.) + + @ingroup collection_matchers + */ +#ifdef HC_SHORTHAND + #define contains HC_contains +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsCollectionOnlyContaining.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsCollectionOnlyContaining.h new file mode 100644 index 0000000..2fe4ae7 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsCollectionOnlyContaining.h @@ -0,0 +1,52 @@ +// +// OCHamcrest - HCIsCollectionOnlyContaining.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCIsCollectionOnlyContaining : HCBaseMatcher +{ + id matcher; +} + ++ (instancetype)isCollectionOnlyContaining:(id )aMatcher; +- (instancetype)initWithMatcher:(id )aMatcher; + +@end + + +OBJC_EXPORT id HC_onlyContains(id itemMatch, ...) NS_REQUIRES_NIL_TERMINATION; + +/** + onlyContains(firstMatcher, ...) - + Matches if each element of collection satisfies any of the given matchers. + + @param firstMatcher,... A comma-separated list of matchers ending with @c nil. + + This matcher iterates the evaluated collection, confirming whether each element satisfies any of + the given matchers. + + Any argument that is not a matcher is implicitly wrapped in an @ref equalTo matcher to check for + equality. + + Example: + + @par + @ref onlyContains(startsWith(@"Jo"), nil) + + will match a collection [@"Jon", @"John", @"Johann"]. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_onlyContains instead.) + + @ingroup collection_matchers + */ +#ifdef HC_SHORTHAND + #define onlyContains HC_onlyContains +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsDictionaryContaining.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsDictionaryContaining.h new file mode 100644 index 0000000..729910e --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsDictionaryContaining.h @@ -0,0 +1,54 @@ +// +// OCHamcrest - HCIsDictionaryContaining.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCIsDictionaryContaining : HCBaseMatcher +{ + id keyMatcher; + id valueMatcher; +} + ++ (instancetype)isDictionaryContainingKey:(id )aKeyMatcher + value:(id )aValueMatcher; + +- (instancetype)initWithKeyMatcher:(id )aKeyMatcher + valueMatcher:(id )aValueMatcher; + +@end + + +OBJC_EXPORT id HC_hasEntry(id keyMatch, id valueMatch); + +/** + hasEntry(keyMatcher, valueMatcher) - + Matches if dictionary contains key-value entry satisfying a given pair of matchers. + + @param keyMatcher The matcher to satisfy for the key, or an expected value for @ref equalTo matching. + @param valueMatcher The matcher to satisfy for the value, or an expected value for @ref equalTo matching. + + This matcher iterates the evaluated dictionary, searching for any key-value entry that satisfies + @a keyMatcher and @a valueMatcher. If a matching entry is found, @c hasEntry is satisfied. + + Any argument that is not a matcher is implicitly wrapped in an @ref equalTo matcher to check for + equality. + + Examples: + @li @ref hasEntry(@ref equalTo(@"foo"), equalTo(@"bar")) + @li @ref hasEntry(@"foo", @"bar") + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_hasEntry instead.) + + @ingroup collection_matchers + */ +#ifdef HC_SHORTHAND + #define hasEntry HC_hasEntry +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsDictionaryContainingEntries.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsDictionaryContainingEntries.h new file mode 100644 index 0000000..5f4ac6d --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsDictionaryContainingEntries.h @@ -0,0 +1,53 @@ +// +// OCHamcrest - HCIsDictionaryContainingEntries.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCIsDictionaryContainingEntries : HCBaseMatcher +{ + NSArray *keys; + NSArray *valueMatchers; +} + ++ (instancetype)isDictionaryContainingKeys:(NSArray *)theKeys + valueMatchers:(NSArray *)theValueMatchers; + +- (instancetype)initWithKeys:(NSArray *)theKeys + valueMatchers:(NSArray *)theValueMatchers; + +@end + + +OBJC_EXPORT id HC_hasEntries(id keysAndValueMatch, ...) NS_REQUIRES_NIL_TERMINATION; + +/** + hasEntries(firstKey, valueMatcher, ...) - + Matches if dictionary contains entries satisfying a list of alternating keys and their value + matchers. + + @param firstKey A key (not a matcher) to look up. + @param valueMatcher,... The matcher to satisfy for the value, or an expected value for @ref equalTo matching. + + Note that the keys must be actual keys, not matchers. Any value argument that is not a matcher + is implicitly wrapped in an @ref equalTo matcher to check for equality. The list must end with + @c nil. + + Examples: + @li @ref hasEntries(@"first", equalTo(@"Jon"), @"last", equalTo(@"Reid"), nil) + @li @ref hasEntries(@"first", @"Jon", @"last", @"Reid", nil) + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_hasEntry instead.) + + @ingroup collection_matchers + */ +#ifdef HC_SHORTHAND + #define hasEntries HC_hasEntries +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsDictionaryContainingKey.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsDictionaryContainingKey.h new file mode 100644 index 0000000..6d8b06b --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsDictionaryContainingKey.h @@ -0,0 +1,49 @@ +// +// OCHamcrest - HCIsDictionaryContainingKey.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCIsDictionaryContainingKey : HCBaseMatcher +{ + id keyMatcher; +} + ++ (instancetype)isDictionaryContainingKey:(id )theKeyMatcher; +- (instancetype)initWithKeyMatcher:(id )theKeyMatcher; + +@end + + +OBJC_EXPORT id HC_hasKey(id keyMatch); + +/** + hasKey(keyMatcher) - + Matches if dictionary contains an entry whose key satisfies a given matcher. + + @param keyMatcher The matcher to satisfy for the key, or an expected value for @ref equalTo matching. + + This matcher iterates the evaluated dictionary, searching for any key-value entry whose key + satisfies the given matcher. If a matching entry is found, @c hasKey is satisfied. + + Any argument that is not a matcher is implicitly wrapped in an @ref equalTo matcher to check for + equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_hasKey instead.) + + Examples: + @li @ref hasEntry(equalTo(@"foo")) + @li @ref hasEntry(@"foo") + + @ingroup collection_matchers + */ +#ifdef HC_SHORTHAND + #define hasKey HC_hasKey +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsDictionaryContainingValue.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsDictionaryContainingValue.h new file mode 100644 index 0000000..627778c --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsDictionaryContainingValue.h @@ -0,0 +1,49 @@ +// +// OCHamcrest - HCIsDictionaryContainingValue.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCIsDictionaryContainingValue : HCBaseMatcher +{ + id valueMatcher; +} + ++ (instancetype)isDictionaryContainingValue:(id )theValueMatcher; +- (instancetype)initWithValueMatcher:(id )theValueMatcher; + +@end + + +OBJC_EXPORT id HC_hasValue(id valueMatch); + +/** + hasValue(valueMatcher) - + Matches if dictionary contains an entry whose value satisfies a given matcher. + + @param valueMatcher The matcher to satisfy for the value, or an expected value for @ref equalTo matching. + + This matcher iterates the evaluated dictionary, searching for any key-value entry whose value + satisfies the given matcher. If a matching entry is found, @c hasValue is satisfied. + + Any argument that is not a matcher is implicitly wrapped in an @ref equalTo matcher to check for + equality. + + Examples: + @li @ref hasValue(equalTo(@"bar")) + @li @ref hasValue(@"bar") + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_hasValue instead.) + + @ingroup collection_matchers + */ +#ifdef HC_SHORTHAND + #define hasValue HC_hasValue +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsEmptyCollection.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsEmptyCollection.h new file mode 100644 index 0000000..bd756b4 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsEmptyCollection.h @@ -0,0 +1,36 @@ +// +// OCHamcrest - HCIsEmptyCollection.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCIsEmptyCollection : HCHasCount + ++ (instancetype)isEmptyCollection; +- (instancetype)init; + +@end + + +OBJC_EXPORT id HC_isEmpty(void); + +/** + Matches empty collection. + + This matcher invokes @c -count on the evaluated object to determine if the number of elements it + contains is zero. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_isEmpty instead.) + + @ingroup collection_matchers + */ +#ifdef HC_SHORTHAND + #define isEmpty() HC_isEmpty() +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsEqual.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsEqual.h new file mode 100644 index 0000000..e9dcfb7 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsEqual.h @@ -0,0 +1,44 @@ +// +// OCHamcrest - HCIsEqual.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCIsEqual : HCBaseMatcher +{ + id object; +} + ++ (instancetype)isEqualTo:(id)anObject; +- (instancetype)initEqualTo:(id)anObject; + +@end + + +OBJC_EXPORT id HC_equalTo(id object); + +/** + equalTo(anObject) - + Matches if object is equal to a given object. + + @param anObject The object to compare against as the expected value. + + This matcher compares the evaluated object to @a anObject for equality, as determined by the + @c -isEqual: method. + + If @a anObject is @c nil, the matcher will successfully match @c nil. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_equalTo instead.) + + @ingroup object_matchers + */ +#ifdef HC_SHORTHAND + #define equalTo HC_equalTo +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsEqualIgnoringCase.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsEqualIgnoringCase.h new file mode 100644 index 0000000..be93433 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsEqualIgnoringCase.h @@ -0,0 +1,49 @@ +// +// OCHamcrest - HCIsEqualIgnoringCase.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCIsEqualIgnoringCase : HCBaseMatcher +{ + NSString *string; +} + ++ (instancetype)isEqualIgnoringCase:(NSString *)aString; +- (instancetype)initWithString:(NSString *)aString; + +@end + + +OBJC_EXPORT id HC_equalToIgnoringCase(NSString *aString); + +/** + equalToIgnoringCase(aString) - + Matches if object is a string equal to a given string, ignoring case differences. + + @param aString The string to compare against as the expected value. This value must not be @c nil. + + This matcher first checks whether the evaluated object is a string. If so, it compares it with + @a aString, ignoring differences of case. + + Example: + + @par + @ref equalToIgnoringCase(@"hello world") + + will match "heLLo WorlD". + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_equalToIgnoringCase instead.) + + @ingroup text_matchers + */ +#ifdef HC_SHORTHAND + #define equalToIgnoringCase HC_equalToIgnoringCase +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsEqualIgnoringWhiteSpace.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsEqualIgnoringWhiteSpace.h new file mode 100644 index 0000000..415654a --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsEqualIgnoringWhiteSpace.h @@ -0,0 +1,50 @@ +// +// OCHamcrest - HCIsEqualIgnoringWhiteSpace.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCIsEqualIgnoringWhiteSpace : HCBaseMatcher +{ + NSString *originalString; + NSString *strippedString; +} + ++ (instancetype)isEqualIgnoringWhiteSpace:(NSString *)aString; +- (instancetype)initWithString:(NSString *)aString; + +@end + + +OBJC_EXPORT id HC_equalToIgnoringWhiteSpace(NSString *aString); + +/** + equalToIgnoringWhiteSpace(aString) - + Matches if object is a string equal to a given string, ignoring differences in whitespace. + + @param aString The string to compare against as the expected value. This value must not be @c nil. + + This matcher first checks whether the evaluated object is a string. If so, it compares it with + @a aString, ignoring differences in runs of whitespace. + + Example: + + @par + @ref equalToIgnoringWhiteSpace(@"hello world") + + will match @verbatim "hello world" @endverbatim + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_equalToIgnoringWhiteSpace instead.) + + @ingroup text_matchers + */ +#ifdef HC_SHORTHAND + #define equalToIgnoringWhiteSpace HC_equalToIgnoringWhiteSpace +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsEqualToNumber.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsEqualToNumber.h new file mode 100644 index 0000000..191d6a7 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsEqualToNumber.h @@ -0,0 +1,331 @@ +// +// OCHamcrest - HCIsEqualToNumber.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +OBJC_EXPORT id HC_equalToBool(BOOL value); + +/** + equalToBool(value) - + Matches if object is equal to @c NSNumber created from a @c BOOL. + + @param value The @c BOOL value from which to create an @c NSNumber. + + This matcher creates an @c NSNumber object from a @c BOOL @a value and compares the evaluated + object to it for equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_equalToBool instead.) + + @ingroup primitive_number_matchers + */ +#ifdef HC_SHORTHAND + #define equalToBool HC_equalToBool +#endif + +@interface HCIsEqualToBool : HCBaseMatcher + +- (instancetype)initWithValue:(BOOL)value; + +@end + + +OBJC_EXPORT id HC_equalToChar(char value); + +/** + equalToChar(value) - + Matches if object is equal to @c NSNumber created from a @c char. + + @param value The @c char value from which to create an @c NSNumber. + + This matcher creates an @c NSNumber object from a @c char @a value and compares the evaluated + object to it for equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_equalToChar instead.) + + @ingroup primitive_number_matchers + */ +#ifdef HC_SHORTHAND + #define equalToChar HC_equalToChar +#endif + + +OBJC_EXPORT id HC_equalToDouble(double value); + +/** + equalToDouble(value) - + Matches if object is equal to @c NSNumber created from a @c double. + + @param value The @c double value from which to create an @c NSNumber. + + This matcher creates an @c NSNumber object from a @c double @a value and compares the evaluated + object to it for equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_equalToDouble instead.) + + @ingroup primitive_number_matchers + */ +#ifdef HC_SHORTHAND + #define equalToDouble HC_equalToDouble +#endif + + +OBJC_EXPORT id HC_equalToFloat(float value); + +/** + equalToFloat(value) - + Matches if object is equal to @c NSNumber created from a @c float. + + @param value The @c float value from which to create an @c NSNumber. + + This matcher creates an @c NSNumber object from a @c float @a value and compares the evaluated + object to it for equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_equalToFloat instead.) + + @ingroup primitive_number_matchers + */ +#ifdef HC_SHORTHAND + #define equalToFloat HC_equalToFloat +#endif + + +OBJC_EXPORT id HC_equalToInt(int value); + +/** + equalToInt(value) - + Matches if object is equal to @c NSNumber created from an @c int. + + @param value The @c int value from which to create an @c NSNumber. + + This matcher creates an @c NSNumber object from a @c int @a value and compares the evaluated + object to it for equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_equalToInt instead.) + + @ingroup primitive_number_matchers + */ +#ifdef HC_SHORTHAND + #define equalToInt HC_equalToInt +#endif + + +OBJC_EXPORT id HC_equalToLong(long value); + +/** + equalToLong(value) - + Matches if object is equal to @c NSNumber created from a @c long. + + @param value The @c long value from which to create an @c NSNumber. + + This matcher creates an @c NSNumber object from a @c long @a value and compares the evaluated + object to it for equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_equalToLong instead.) + + @ingroup primitive_number_matchers + */ +#ifdef HC_SHORTHAND + #define equalToLong HC_equalToLong +#endif + + +OBJC_EXPORT id HC_equalToLongLong(long long value); + +/** + equalToLongLong(value) - + Matches if object is equal to @c NSNumber created from a long long. + + @param value The long long value from which to create an @c NSNumber. + + This matcher creates an @c NSNumber object from a long long @a value and compares + the evaluated object to it for equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_equalToLongLong instead.) + + @ingroup primitive_number_matchers + */ +#ifdef HC_SHORTHAND + #define equalToLongLong HC_equalToLongLong +#endif + + +OBJC_EXPORT id HC_equalToShort(short value); + +/** + equalToShort(value) - + Matches if object is equal to @c NSNumber created from a @c short. + + @param value The @c short value from which to create an @c NSNumber. + + This matcher creates an @c NSNumber object from a @c short @a value and compares the evaluated + object to it for equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_equalToShort instead.) + + @ingroup primitive_number_matchers + */ +#ifdef HC_SHORTHAND + #define equalToShort HC_equalToShort +#endif + + +OBJC_EXPORT id HC_equalToUnsignedChar(unsigned char value); + +/** + equalToUnsignedChar(value) - + Matches if object is equal to @c NSNumber created from an unsigned char. + + @param value The unsigned char value from which to create an @c NSNumber. + + This matcher creates an @c NSNumber object from an unsigned char @a value and + compares the evaluated object to it for equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_equalToUnsignedChar instead.) + + @ingroup primitive_number_matchers + */ +#ifdef HC_SHORTHAND + #define equalToUnsignedChar HC_equalToUnsignedChar +#endif + + +OBJC_EXPORT id HC_equalToUnsignedInt(unsigned int value); + +/** + equalToUnsignedInt(value) - + Matches if object is equal to @c NSNumber created from an unsigned int. + + @param value The unsigned int value from which to create an @c NSNumber. + + This matcher creates an @c NSNumber object from an unsigned int @a value and + compares the evaluated object to it for equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_equalToUnsignedInt instead.) + + @ingroup primitive_number_matchers + */ +#ifdef HC_SHORTHAND + #define equalToUnsignedInt HC_equalToUnsignedInt +#endif + + +OBJC_EXPORT id HC_equalToUnsignedLong(unsigned long value); + +/** + equalToUnsignedLong(value) - + Matches if object is equal to @c NSNumber created from an unsigned long. + + @param value The unsigned long value from which to create an @c NSNumber. + + This matcher creates an @c NSNumber object from an unsigned long @a value and + compares the evaluated object to it for equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_equalToUnsignedLong instead.) + + @ingroup primitive_number_matchers + */ +#ifdef HC_SHORTHAND + #define equalToUnsignedLong HC_equalToUnsignedLong +#endif + + +OBJC_EXPORT id HC_equalToUnsignedLongLong(unsigned long long value); + +/** + equalToUnsignedLongLong(value) - + Matches if object is equal to @c NSNumber created from an unsigned long long. + + @param value The unsigned long long value from which to create an @c NSNumber. + + This matcher creates an @c NSNumber object from an unsigned long long @a value and + compares the evaluated object to it for equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_equalToUnsignedLongLong instead.) + + @ingroup primitive_number_matchers + */ +#ifdef HC_SHORTHAND + #define equalToUnsignedLongLong HC_equalToUnsignedLongLong +#endif + + +OBJC_EXPORT id HC_equalToUnsignedShort(unsigned short value); + +/** + equalToUnsignedShort(value) - + Matches if object is equal to @c NSNumber created from an unsigned short. + + @param value The unsigned short value from which to create an @c NSNumber. + + This matcher creates an @c NSNumber object from an unsigned short @a value and + compares the evaluated object to it for equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_equalToUnsignedShort instead.) + + @ingroup primitive_number_matchers + */ +#ifdef HC_SHORTHAND + #define equalToUnsignedShort HC_equalToUnsignedShort +#endif + + +OBJC_EXPORT id HC_equalToInteger(NSInteger value); + +/** + equalToInteger(value) - + Matches if object is equal to @c NSNumber created from an @c NSInteger. + + @param value The @c NSInteger value from which to create an @c NSNumber. + + This matcher creates an @c NSNumber object from an @c NSInteger @a value and compares the + evaluated object to it for equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_equalToInteger instead.) + + @ingroup primitive_number_matchers + */ +#ifdef HC_SHORTHAND + #define equalToInteger HC_equalToInteger +#endif + + +OBJC_EXPORT id HC_equalToUnsignedInteger(NSUInteger value); + +/** + equalToUnsignedInteger(value) - + Matches if object is equal to @c NSNumber created from an @c NSUInteger. + + @param value The @c NSUInteger value from which to create an @c NSNumber. + + This matcher creates an @c NSNumber object from an @c NSUInteger @a value and compares the + evaluated object to it for equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_equalToUnsignedInteger instead.) + + @ingroup primitive_number_matchers + */ +#ifdef HC_SHORTHAND + #define equalToUnsignedInteger HC_equalToUnsignedInteger +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsIn.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsIn.h new file mode 100644 index 0000000..9db152d --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsIn.h @@ -0,0 +1,42 @@ +// +// OCHamcrest - HCIsIn.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCIsIn : HCBaseMatcher +{ + id collection; +} + ++ (instancetype)isInCollection:(id)aCollection; +- (instancetype)initWithCollection:(id)aCollection; + +@end + + +OBJC_EXPORT id HC_isIn(id aCollection); + +/** + isIn(aCollection) - + Matches if evaluated object is present in a given collection. + + @param aCollection The collection to search. + + This matcher invokes @c -containsObject: on @a aCollection to determine if the evaluated object + is an element of the collection. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_isIn instead.) + + @ingroup collection_matchers + */ +#ifdef HC_SHORTHAND + #define isIn HC_isIn +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsInstanceOf.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsInstanceOf.h new file mode 100644 index 0000000..ad9134b --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsInstanceOf.h @@ -0,0 +1,41 @@ +// +// OCHamcrest - HCIsInstanceOf.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCIsInstanceOf : HCClassMatcher + ++ (id)isInstanceOf:(Class)type; + +@end + + +OBJC_EXPORT id HC_instanceOf(Class aClass); + +/** + instanceOf(aClass) - + Matches if object is an instance of, or inherits from, a given class. + + @param aClass The class to compare against as the expected class. + + This matcher checks whether the evaluated object is an instance of @a aClass or an instance of + any class that inherits from @a aClass. + + Example: + @li @ref instanceOf([NSString class]) + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_instanceOf instead.) + + @ingroup object_matchers + */ +#ifdef HC_SHORTHAND + #define instanceOf HC_instanceOf +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsNil.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsNil.h new file mode 100644 index 0000000..5167f13 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsNil.h @@ -0,0 +1,47 @@ +// +// OCHamcrest - HCIsNil.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCIsNil : HCBaseMatcher + ++ (id)isNil; + +@end + + +OBJC_EXPORT id HC_nilValue(void); + +/** + Matches if object is @c nil. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_nilValue instead.) + + @ingroup object_matchers + */ +#ifdef HC_SHORTHAND + #define nilValue() HC_nilValue() +#endif + + +OBJC_EXPORT id HC_notNilValue(void); + +/** + Matches if object is not @c nil. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_notNilValue instead.) + + @ingroup object_matchers + */ +#ifdef HC_SHORTHAND + #define notNilValue() HC_notNilValue() +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsNot.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsNot.h new file mode 100644 index 0000000..5f80d3a --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsNot.h @@ -0,0 +1,47 @@ +// +// OCHamcrest - HCIsNot.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCIsNot : HCBaseMatcher +{ + id matcher; +} + ++ (instancetype)isNot:(id )aMatcher; +- (instancetype)initNot:(id )aMatcher; + +@end + + +OBJC_EXPORT id HC_isNot(id aMatcher); + +/** + isNot(aMatcher) - + Inverts the given matcher to its logical negation. + + @param aMatcher The matcher to negate. + + This matcher compares the evaluated object to the negation of the given matcher. If the + @a aMatcher argument is not a matcher, it is implicitly wrapped in an @ref equalTo matcher to + check for equality, and thus matches for inequality. + + Examples: + @li @ref assertThat(cheese, isNot(equalTo(smelly))) + @li @ref assertThat(cheese, isNot(smelly)) + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_isNot instead.) + + @ingroup logical_matchers + */ +#ifdef HC_SHORTHAND + #define isNot HC_isNot +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsSame.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsSame.h new file mode 100644 index 0000000..0fbc30e --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsSame.h @@ -0,0 +1,42 @@ +// +// OCHamcrest - HCIsSame.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCIsSame : HCBaseMatcher +{ + id object; +} + ++ (instancetype)isSameAs:(id)anObject; +- (instancetype)initSameAs:(id)anObject; + +@end + + +OBJC_EXPORT id HC_sameInstance(id object); + +/** + sameInstance(anObject) - + Matches if evaluated object is the same instance as a given object. + + @param anObject The object to compare against as the expected value. + + This matcher compares the address of the evaluated object to determine if it is the same object + as @a anObject. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_sameInstance instead.) + + @ingroup object_matchers + */ +#ifdef HC_SHORTHAND + #define sameInstance HC_sameInstance +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsTypeOf.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsTypeOf.h new file mode 100644 index 0000000..df4a432 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsTypeOf.h @@ -0,0 +1,40 @@ +// +// OCHamcrest - HCIsTypeOf.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCIsTypeOf : HCClassMatcher + ++ (id)isTypeOf:(Class)type; + +@end + + +OBJC_EXPORT id HC_isA(Class aClass); + +/** + isA(aClass) - + Matches if object is an instance of a given class (but not of a subclass). + + @param aClass The class to compare against as the expected class. + + This matcher checks whether the evaluated object is an instance of @a aClass. + + Example: + @li @ref isA([Foo class]) + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_isA instead.) + + @ingroup object_matchers + */ +#ifdef HC_SHORTHAND + #define isA HC_isA +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCMatcher.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCMatcher.h new file mode 100644 index 0000000..69b65d2 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCMatcher.h @@ -0,0 +1,56 @@ +// +// OCHamcrest - HCMatcher.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#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. + + @ingroup core + */ +@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 @a 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/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCNumberAssert.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCNumberAssert.h new file mode 100644 index 0000000..2a99fb0 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCNumberAssert.h @@ -0,0 +1,359 @@ +// +// OCHamcrest - HCNumberAssert.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + +@protocol HCMatcher; + + +OBJC_EXPORT void HC_assertThatBoolWithLocation(id testCase, BOOL actual, + id matcher, const char* fileName, int lineNumber); + +#define HC_assertThatBool(actual, matcher) \ + HC_assertThatBoolWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + assertThatBool(actual, matcher) - + Asserts that @c BOOL actual value, converted to an @c NSNumber, satisfies matcher. + + @param actual The @c BOOL value to convert to an @c NSNumber for evaluation. + @param matcher The matcher to satisfy as the expected condition. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_assertThatBool instead.) + + @ingroup integration_numeric + */ +#ifdef HC_SHORTHAND + #define assertThatBool HC_assertThatBool +#endif + + +OBJC_EXPORT void HC_assertThatCharWithLocation(id testCase, char actual, + id matcher, const char* fileName, int lineNumber); + +#define HC_assertThatChar(actual, matcher) \ + HC_assertThatCharWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + assertThatChar(actual, matcher) - + Asserts that @c char actual value, converted to an @c NSNumber, satisfies matcher. + + @param actual The @c char value to convert to an @c NSNumber for evaluation. + @param matcher The matcher to satisfy as the expected condition. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_assertThatChar instead.) + + @ingroup integration_numeric + */ +#ifdef HC_SHORTHAND + #define assertThatChar HC_assertThatChar +#endif + + +OBJC_EXPORT void HC_assertThatDoubleWithLocation(id testCase, double actual, + id matcher, const char* fileName, int lineNumber); + +#define HC_assertThatDouble(actual, matcher) \ + HC_assertThatDoubleWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + HC_assertThatDouble(actual, matcher) - + Asserts that @c double actual value, converted to an @c NSNumber, satisfies matcher. + + @param actual The @c double value to convert to an @c NSNumber for evaluation. + @param matcher The matcher to satisfy as the expected condition. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_assertThatDouble instead.) + + @ingroup integration_numeric + */ +#ifdef HC_SHORTHAND + #define assertThatDouble HC_assertThatDouble +#endif + + +OBJC_EXPORT void HC_assertThatFloatWithLocation(id testCase, float actual, + id matcher, const char* fileName, int lineNumber); + +#define HC_assertThatFloat(actual, matcher) \ + HC_assertThatFloatWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + assertThatFloat(actual, matcher) - + Asserts that @c float actual value, converted to an @c NSNumber, satisfies matcher. + + @param actual The @c float value to convert to an @c NSNumber for evaluation. + @param matcher The matcher to satisfy as the expected condition. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_assertThatFloat instead.) + + @ingroup integration_numeric + */ +#ifdef HC_SHORTHAND + #define assertThatFloat HC_assertThatFloat +#endif + + +OBJC_EXPORT void HC_assertThatIntWithLocation(id testCase, int actual, + id matcher, const char* fileName, int lineNumber); + +#define HC_assertThatInt(actual, matcher) \ + HC_assertThatIntWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + assertThatInt(actual, matcher) - + Asserts that @c int actual value, converted to an @c NSNumber, satisfies matcher. + + @param actual The @c int value to convert to an @c NSNumber for evaluation. + @param matcher The matcher to satisfy as the expected condition. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_assertThatInt instead.) + + @ingroup integration_numeric + */ +#ifdef HC_SHORTHAND + #define assertThatInt HC_assertThatInt +#endif + + +OBJC_EXPORT void HC_assertThatLongWithLocation(id testCase, long actual, + id matcher, const char* fileName, int lineNumber); + +#define HC_assertThatLong(actual, matcher) \ + HC_assertThatLongWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + assertThatLong(actual, matcher) - + Asserts that @c long actual value, converted to an @c NSNumber, satisfies matcher. + + @param actual The @c long value to convert to an @c NSNumber for evaluation. + @param matcher The matcher to satisfy as the expected condition. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_assertThatLong instead.) + + @ingroup integration_numeric + */ +#ifdef HC_SHORTHAND + #define assertThatLong HC_assertThatLong +#endif + + +OBJC_EXPORT void HC_assertThatLongLongWithLocation(id testCase, long long actual, + id matcher, const char* fileName, int lineNumber); + +#define HC_assertThatLongLong(actual, matcher) \ + HC_assertThatLongLongWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + assertThatLongLong(actual, matcher) - + Asserts that long long actual value, converted to an @c NSNumber, satisfies + matcher. + + @param actual The long long value to convert to an @c NSNumber for evaluation. + @param matcher The matcher to satisfy as the expected condition. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_assertThatLongLong instead.) + + @ingroup integration_numeric + */ +#ifdef HC_SHORTHAND + #define assertThatLongLong HC_assertThatLongLong +#endif + + +OBJC_EXPORT void HC_assertThatShortWithLocation(id testCase, short actual, + id matcher, const char* fileName, int lineNumber); + +#define HC_assertThatShort(actual, matcher) \ + HC_assertThatShortWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + assertThatShort(actual, matcher) - + Asserts that @c short actual value, converted to an @c NSNumber, satisfies matcher. + + @param actual The @c short value to convert to an @c NSNumber for evaluation. + @param matcher The matcher to satisfy as the expected condition. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_assertThatShort instead.) + + @ingroup integration_numeric + */ +#ifdef HC_SHORTHAND + #define assertThatShort HC_assertThatShort +#endif + + +OBJC_EXPORT void HC_assertThatUnsignedCharWithLocation(id testCase, unsigned char actual, + id matcher, const char* fileName, int lineNumber); + +#define HC_assertThatUnsignedChar(actual, matcher) \ + HC_assertThatUnsignedCharWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + assertThatUnsignedChar(actual, matcher) - + Asserts that unsigned char actual value, converted to an @c NSNumber, satisfies + matcher. + + @param actual The unsigned char value to convert to an @c NSNumber for evaluation. + @param matcher The matcher to satisfy as the expected condition. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_assertThatUnsignedChar instead.) + + @ingroup integration_numeric + */ +#ifdef HC_SHORTHAND + #define assertThatUnsignedChar HC_assertThatUnsignedChar +#endif + + +OBJC_EXPORT void HC_assertThatUnsignedIntWithLocation(id testCase, unsigned int actual, + id matcher, const char* fileName, int lineNumber); + +#define HC_assertThatUnsignedInt(actual, matcher) \ + HC_assertThatUnsignedIntWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + assertThatUnsignedInt(actual, matcher) - + Asserts that unsigned int actual value, converted to an @c NSNumber, satisfies + matcher. + + @param actual The unsigned int value to convert to an @c NSNumber for evaluation @param matcher The matcher to satisfy as the expected condition. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_assertThatUnsignedInt instead.) + + @ingroup integration_numeric + */ +#ifdef HC_SHORTHAND + #define assertThatUnsignedInt HC_assertThatUnsignedInt +#endif + + +OBJC_EXPORT void HC_assertThatUnsignedLongWithLocation(id testCase, unsigned long actual, + id matcher, const char* fileName, int lineNumber); + +#define HC_assertThatUnsignedLong(actual, matcher) \ + HC_assertThatUnsignedLongWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + assertThatUnsignedLong(actual, matcher) - + Asserts that unsigned long actual value, converted to an @c NSNumber, satisfies + matcher. + + @param actual The unsigned long value to convert to an @c NSNumber for evaluation @param matcher The matcher to satisfy as the expected condition. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_assertThatUnsignedLong instead.) + + @ingroup integration_numeric + */ +#ifdef HC_SHORTHAND + #define assertThatUnsignedLong HC_assertThatUnsignedLong +#endif + + +OBJC_EXPORT void HC_assertThatUnsignedLongLongWithLocation(id testCase, unsigned long long actual, + id matcher, const char* fileName, int lineNumber); + +#define HC_assertThatUnsignedLongLong(actual, matcher) \ + HC_assertThatUnsignedLongLongWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + assertThatUnsignedLongLong(actual, matcher) - + Asserts that unsigned long long actual value, converted to an @c NSNumber, + satisfies matcher. + + @param actual The unsigned long long value to convert to an @c NSNumber for evaluation @param matcher The matcher to satisfy as the expected condition. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_assertThatUnsignedLongLong instead.) + + @ingroup integration_numeric + */ +#ifdef HC_SHORTHAND + #define assertThatUnsignedLongLong HC_assertThatUnsignedLongLong +#endif + + +OBJC_EXPORT void HC_assertThatUnsignedShortWithLocation(id testCase, unsigned short actual, + id matcher, const char* fileName, int lineNumber); + +#define HC_assertThatUnsignedShort(actual, matcher) \ + HC_assertThatUnsignedShortWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + assertThatUnsignedShort(actual, matcher) - + Asserts that unsigned short actual value, converted to an @c NSNumber, satisfies + matcher. + + @param actual The unsigned short value to convert to an @c NSNumber for evaluation @param matcher The matcher to satisfy as the expected condition. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_assertThatUnsignedShort instead.) + + @ingroup integration_numeric + */ +#ifdef HC_SHORTHAND + #define assertThatUnsignedShort HC_assertThatUnsignedShort +#endif + + +OBJC_EXPORT void HC_assertThatIntegerWithLocation(id testCase, NSInteger actual, + id matcher, const char* fileName, int lineNumber); + +#define HC_assertThatInteger(actual, matcher) \ + HC_assertThatIntegerWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + assertThatInteger(actual, matcher) - + Asserts that @c NSInteger actual value, converted to an @c NSNumber, satisfies matcher. + + @param actual The @c NSInteger value to convert to an @c NSNumber for evaluation. + @param matcher The matcher to satisfy as the expected condition. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_assertThatInteger instead.) + + @ingroup integration_numeric + */ +#ifdef HC_SHORTHAND + #define assertThatInteger HC_assertThatInteger +#endif + + +OBJC_EXPORT void HC_assertThatUnsignedIntegerWithLocation(id testCase, NSUInteger actual, + id matcher, const char* fileName, int lineNumber); + +#define HC_assertThatUnsignedInteger(actual, matcher) \ + HC_assertThatUnsignedIntegerWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + assertThatUnsignedInteger(actual, matcher) - + Asserts that @c NSUInteger actual value, converted to an @c NSNumber, satisfies matcher. + + @param actual The @c NSUInteger value to convert to an @c NSNumber for evaluation. + @param matcher The matcher to satisfy as the expected condition. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_assertThatUnsignedInteger instead.) + + @ingroup integration_numeric + */ +#ifdef HC_SHORTHAND + #define assertThatUnsignedInteger HC_assertThatUnsignedInteger +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCOrderingComparison.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCOrderingComparison.h new file mode 100644 index 0000000..817c56f --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCOrderingComparison.h @@ -0,0 +1,115 @@ +// +// OCHamcrest - HCOrderingComparison.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCOrderingComparison : HCBaseMatcher +{ + id expected; + NSComparisonResult minCompare; + NSComparisonResult maxCompare; + NSString *comparisonDescription; +} + ++ (instancetype)compare:(id)expectedValue + minCompare:(NSComparisonResult)min + maxCompare:(NSComparisonResult)max + comparisonDescription:(NSString *)comparisonDescription; + +- (instancetype)initComparing:(id)expectedValue + minCompare:(NSComparisonResult)min + maxCompare:(NSComparisonResult)max + comparisonDescription:(NSString *)comparisonDescription; + +@end + + +OBJC_EXPORT id HC_greaterThan(id expected); + +/** + greaterThan(aNumber) - + Matches if object is greater than a given number. + + @param aNumber The @c NSNumber to compare against. + + Example: + @li @ref greaterThan(\@5) + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_greaterThan instead.) + + @ingroup number_matchers + */ +#ifdef HC_SHORTHAND + #define greaterThan HC_greaterThan +#endif + + +OBJC_EXPORT id HC_greaterThanOrEqualTo(id expected); + +/** + greaterThanOrEqualTo(aNumber) - + Matches if object is greater than or equal to a given number. + + @param aNumber The @c NSNumber to compare against. + + Example: + @li @ref greaterThanOrEqualTo(\@5) + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_greaterThanOrEqualTo instead.) + + @ingroup number_matchers + */ +#ifdef HC_SHORTHAND + #define greaterThanOrEqualTo HC_greaterThanOrEqualTo +#endif + + +OBJC_EXPORT id HC_lessThan(id expected); + +/** + lessThan(aNumber) - + Matches if object is less than a given number. + + @param aNumber The @c NSNumber to compare against. + + Example: + @li @ref lessThan(\@5) + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_lessThan instead.) + + @ingroup number_matchers + */ +#ifdef HC_SHORTHAND + #define lessThan HC_lessThan +#endif + + +OBJC_EXPORT id HC_lessThanOrEqualTo(id expected); + +/** + lessThanOrEqualTo(aNumber) - + Matches if object is less than or equal to a given number. + + @param aNumber The @c NSNumber to compare against. + + Example: + @li @ref lessThanOrEqualTo(\@5) + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_lessThanOrEqualTo instead.) + + @ingroup number_matchers + */ +#ifdef HC_SHORTHAND + #define lessThanOrEqualTo HC_lessThanOrEqualTo +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCRequireNonNilObject.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCRequireNonNilObject.h new file mode 100644 index 0000000..b7e8bcc --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCRequireNonNilObject.h @@ -0,0 +1,19 @@ +// +// OCHamcrest - HCRequireNonNilObject.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import +#import + + +/** + Throws an NSException if @a obj is @c nil. + + @ingroup helpers +*/ +OBJC_EXPORT void HCRequireNonNilObject(id obj); diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCSelfDescribing.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCSelfDescribing.h new file mode 100644 index 0000000..73e661a --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCSelfDescribing.h @@ -0,0 +1,32 @@ +// +// OCHamcrest - HCSelfDescribing.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + +#import "HCDescription.h" + + +/** + The ability of an object to describe itself. + + @ingroup core + */ +@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/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCStringContains.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCStringContains.h new file mode 100644 index 0000000..1b653b0 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCStringContains.h @@ -0,0 +1,45 @@ +// +// OCHamcrest - HCStringContains.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCStringContains : HCSubstringMatcher + ++ (id)stringContains:(NSString *)aSubstring; + +@end + + +OBJC_EXPORT id HC_containsString(NSString *aSubstring); + +/** +containsString(aString) - + Matches if object is a string containing a given string. + + @param aString The string to search for. This value must not be @c nil. + + This matcher first checks whether the evaluated object is a string. If so, it checks whether it + contains @a aString. + + Example: + + @par + @ref containsString(@"def") + + will match "abcdefg". + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_containsString instead.) + + @ingroup text_matchers + */ +#ifdef HC_SHORTHAND + #define containsString HC_containsString +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCStringContainsInOrder.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCStringContainsInOrder.h new file mode 100644 index 0000000..537a6c2 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCStringContainsInOrder.h @@ -0,0 +1,50 @@ +// +// OCHamcrest - HCStringContainsInOrder.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCStringContainsInOrder : HCBaseMatcher +{ + NSArray *substrings; +} + ++ (instancetype)containsInOrder:(NSArray *)substringList; +- (instancetype)initWithSubstrings:(NSArray *)substringList; + +@end + + +OBJC_EXPORT id HC_stringContainsInOrder(NSString *substring, ...) NS_REQUIRES_NIL_TERMINATION; + +/** + stringContainsInOrder(firstString, ...) - + Matches if object is a string containing a given list of substrings in relative order. + + @param firstString,... A comma-separated list of strings ending with @c nil. + + This matcher first checks whether the evaluated object is a string. If so, it checks whether it + contains a given list of strings, in relative order to each other. The searches are performed + starting from the beginning of the evaluated string. + + Example: + + @par + @ref stringContainsInOrder(@"bc", @"fg", @"jkl", nil) + + will match "abcdefghijklm". + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_stringContainsInOrder instead.) + + @ingroup text_matchers + */ +#ifdef HC_SHORTHAND + #define stringContainsInOrder HC_stringContainsInOrder +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCStringDescription.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCStringDescription.h new file mode 100644 index 0000000..7f0ad89 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCStringDescription.h @@ -0,0 +1,43 @@ +// +// OCHamcrest - HCStringDescription.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + +@protocol HCSelfDescribing; + + +/** + An HCDescription that is stored as a string. + + @ingroup core + */ +@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. + */ ++ (instancetype)stringDescription; + +/** + Returns an initialized HCStringDescription object that is empty. + */ +- (instancetype)init; + +@end diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCStringEndsWith.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCStringEndsWith.h new file mode 100644 index 0000000..bdaac4c --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCStringEndsWith.h @@ -0,0 +1,45 @@ +// +// OCHamcrest - HCStringEndsWith.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCStringEndsWith : HCSubstringMatcher + ++ (id)stringEndsWith:(NSString *)aSubstring; + +@end + + +OBJC_EXPORT id HC_endsWith(NSString *aSubstring); + +/** + endsWith(aString) - + Matches if object is a string ending with a given string. + + @param aString The string to search for. This value must not be @c nil. + + This matcher first checks whether the evaluated object is a string. If so, it checks if + @a aString matches the ending characters of the evaluated object. + + Example: + + @par + @ref endsWith(@"bar") + + will match "foobar". + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_endsWith instead.) + + @ingroup text_matchers + */ +#ifdef HC_SHORTHAND + #define endsWith HC_endsWith +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCStringStartsWith.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCStringStartsWith.h new file mode 100644 index 0000000..5332cb3 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCStringStartsWith.h @@ -0,0 +1,45 @@ +// +// OCHamcrest - HCStringStartsWith.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCStringStartsWith : HCSubstringMatcher + ++ (id)stringStartsWith:(NSString *)aSubstring; + +@end + + +OBJC_EXPORT id HC_startsWith(NSString *aSubstring); + +/** + startsWith(aString) - + Matches if object is a string starting with a given string. + + @param aString The string to search for. This value must not be @c nil. + + This matcher first checks whether the evaluated object is a string. If so, it checks if + @a aString matches the beginning characters of the evaluated object. + + Example: + + @par + @ref endsWith(@"foo") + + will match "foobar". + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_startsWith instead.) + + @ingroup text_matchers + */ +#ifdef HC_SHORTHAND + #define startsWith HC_startsWith +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCSubstringMatcher.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCSubstringMatcher.h new file mode 100644 index 0000000..32ead15 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCSubstringMatcher.h @@ -0,0 +1,20 @@ +// +// OCHamcrest - HCSubstringMatcher.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCSubstringMatcher : HCBaseMatcher +{ + NSString *substring; +} + +- (instancetype)initWithSubstring:(NSString *)aString; + +@end diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCTestFailure.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCTestFailure.h new file mode 100644 index 0000000..f7e125f --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCTestFailure.h @@ -0,0 +1,21 @@ +#import + + +/** + Test failure location and reason. + + @ingroup integration + */ +@interface HCTestFailure : NSObject + +@property (nonatomic, readonly) id testCase; +@property (nonatomic, readonly) NSString *fileName; +@property (nonatomic, readonly) NSUInteger lineNumber; +@property (nonatomic, readonly) NSString *reason; + +- (instancetype)initWithTestCase:(id)testCase + fileName:(NSString *)fileName + lineNumber:(NSUInteger)lineNumber + reason:(NSString *)reason; + +@end diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCTestFailureHandler.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCTestFailureHandler.h new file mode 100644 index 0000000..5f391b9 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCTestFailureHandler.h @@ -0,0 +1,20 @@ +#import + +@class HCTestFailure; + + +/** + Chain-of-responsibility for handling test failures. + + @ingroup integration + */ +@protocol HCTestFailureHandler + +@property (nonatomic, strong) id successor; + +/** + Handle test failure at specific location, or pass to successor. + */ +- (void)handleFailure:(HCTestFailure *)failure; + +@end diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCTestFailureHandlerChain.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCTestFailureHandlerChain.h new file mode 100644 index 0000000..fc68e23 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCTestFailureHandlerChain.h @@ -0,0 +1,12 @@ +#import +#import + +@protocol HCTestFailureHandler; + + +/** + Returns chain of test failure handlers. + + @ingroup integration + */ +OBJC_EXPORT id HC_testFailureHandlerChain(void); diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCWrapInMatcher.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCWrapInMatcher.h new file mode 100644 index 0000000..a991fe4 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCWrapInMatcher.h @@ -0,0 +1,22 @@ +// +// OCHamcrest - HCWrapInMatcher.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + +@protocol HCMatcher; + + +/** + Wraps argument in a matcher, if necessary. + + @return The argument as-if if it is already a matcher, otherwise wrapped in an @ref equalTo matcher. + + @ingroup helpers + */ +OBJC_EXPORT id HCWrapInMatcher(id matcherOrValue); diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/OCHamcrest.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/OCHamcrest.h new file mode 100644 index 0000000..4c64079 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/OCHamcrest.h @@ -0,0 +1,141 @@ +// +// OCHamcrest - OCHamcrest.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +/** + @defgroup library Matcher Library + + Library of Matcher implementations. + */ + +/** + @defgroup object_matchers Object Matchers + + Matchers that inspect objects. + + @ingroup library + */ +#import +#import +#import +#import +#import +#import +#import +#import + +/** + @defgroup collection_matchers Collection Matchers + + Matchers of collections. + + @ingroup library + */ +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import + +/** + @defgroup number_matchers Number Matchers + + Matchers that perform numeric comparisons. + + @ingroup library + */ +#import +#import + +/** + @defgroup primitive_number_matchers Primitive Number Matchers + + Matchers for testing equality against primitive numeric types. + + @ingroup number_matchers + */ +#import + +/** + @defgroup text_matchers Text Matchers + + Matchers that perform text comparisons. + + @ingroup library + */ +#import +#import +#import +#import +#import +#import + +/** + @defgroup logical_matchers Logical Matchers + + Boolean logic using other matchers. + + @ingroup library + */ +#import +#import +#import +#import + +/** + @defgroup decorator_matchers Decorator Matchers + + Matchers that decorate other matchers for better expression. + + @ingroup library + */ +#import +#import + +/** + @defgroup integration Unit Test Integration + */ +#import +#import +#import +#import + +/** + @defgroup integration_numeric Unit Tests of Primitive Numbers + + Unit test integration for primitive numbers. + + The @c assertThat<Type> macros convert the primitive actual value to an @c NSNumber, + passing that to the matcher for evaluation. If the matcher is not satisfied, an exception is + thrown describing the mismatch. + + This family of macros is designed to integrate well with OCUnit and other unit testing + frameworks. Unmet assertions are reported as test failures. In Xcode, they can be clicked to + reveal the line of the assertion. + + @ingroup integration + */ +#import + +/** + @defgroup core Core API + */ + +/** + @defgroup helpers Helpers + + Utilities for writing Matchers. + + @ingroup core + */ diff --git a/Frameworks/OCHamcrest.framework/Versions/A/OCHamcrest b/Frameworks/OCHamcrest.framework/Versions/A/OCHamcrest new file mode 100755 index 0000000..de4e8b1 Binary files /dev/null and b/Frameworks/OCHamcrest.framework/Versions/A/OCHamcrest differ diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Resources/Info.plist b/Frameworks/OCHamcrest.framework/Versions/A/Resources/Info.plist new file mode 100644 index 0000000..24bb11a --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,42 @@ + + + + + BuildMachineOSBuild + 12F45 + CFBundleDevelopmentRegion + English + CFBundleExecutable + OCHamcrest + CFBundleIdentifier + org.hamcrest.OCHamcrest + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + OCHamcrest + CFBundlePackageType + FMWK + CFBundleShortVersionString + 3.0.1 + CFBundleSignature + ???? + CFBundleVersion + 3.0.1 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 5A2053 + DTPlatformVersion + GM + DTSDKBuild + 13A595 + DTSDKName + macosx10.9 + DTXcode + 0501 + DTXcodeBuild + 5A2053 + NSHumanReadableCopyright + Copyright © 2013 hamcrest.org + + diff --git a/Frameworks/OCHamcrest.framework/Versions/Current b/Frameworks/OCHamcrest.framework/Versions/Current new file mode 120000 index 0000000..8c7e5a6 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/Frameworks/OCMockito.framework/Headers/MKTArgumentCaptor.h b/Frameworks/OCMockito.framework/Headers/MKTArgumentCaptor.h new file mode 100644 index 0000000..b159cab --- /dev/null +++ b/Frameworks/OCMockito.framework/Headers/MKTArgumentCaptor.h @@ -0,0 +1,18 @@ +// +// OCMockito - MKTArgumentCaptor.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// + +#import + + +@interface MKTArgumentCaptor : NSObject + +- (id)capture; +- (id)value; +- (NSArray *)allValues; + +@end diff --git a/Frameworks/OCMockito.framework/Headers/MKTBaseMockObject.h b/Frameworks/OCMockito.framework/Headers/MKTBaseMockObject.h new file mode 100644 index 0000000..e2f367a --- /dev/null +++ b/Frameworks/OCMockito.framework/Headers/MKTBaseMockObject.h @@ -0,0 +1,17 @@ +// +// OCMockito - MKTBaseMockObject.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// + +#import +#import "MKTPrimitiveArgumentMatching.h" + + +@interface MKTBaseMockObject : NSProxy + +- (instancetype)init; + +@end diff --git a/Frameworks/OCMockito.framework/Headers/MKTClassObjectMock.h b/Frameworks/OCMockito.framework/Headers/MKTClassObjectMock.h new file mode 100644 index 0000000..ab0cd30 --- /dev/null +++ b/Frameworks/OCMockito.framework/Headers/MKTClassObjectMock.h @@ -0,0 +1,22 @@ +// +// OCMockito - MKTClassObjectMock.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// +// Created by: David Hart +// + +#import "MKTBaseMockObject.h" + + +/** + Mock object of a given class object. + */ +@interface MKTClassObjectMock : MKTBaseMockObject + ++ (instancetype)mockForClass:(Class)aClass; +- (instancetype)initWithClass:(Class)aClass; + +@end diff --git a/Frameworks/OCMockito.framework/Headers/MKTObjectAndProtocolMock.h b/Frameworks/OCMockito.framework/Headers/MKTObjectAndProtocolMock.h new file mode 100644 index 0000000..8688a62 --- /dev/null +++ b/Frameworks/OCMockito.framework/Headers/MKTObjectAndProtocolMock.h @@ -0,0 +1,20 @@ +// +// OCMockito - MKTObjectAndProtocolMock.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Kevin Lundberg +// Source: https://github.com/jonreid/OCMockito +// + +#import "MKTProtocolMock.h" + + +/** + Mock object of a given class that also implements a given protocol. + */ +@interface MKTObjectAndProtocolMock : MKTProtocolMock + ++ (instancetype)mockForClass:(Class)aClass protocol:(Protocol *)protocol; +- (instancetype)initWithClass:(Class)aClass protocol:(Protocol *)protocol; + +@end diff --git a/Frameworks/OCMockito.framework/Headers/MKTObjectMock.h b/Frameworks/OCMockito.framework/Headers/MKTObjectMock.h new file mode 100644 index 0000000..4194119 --- /dev/null +++ b/Frameworks/OCMockito.framework/Headers/MKTObjectMock.h @@ -0,0 +1,22 @@ +// +// OCMockito - MKTObjectMock.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// + +#import "MKTBaseMockObject.h" + + +/** + Mock object of a given class. + */ +@interface MKTObjectMock : MKTBaseMockObject + +@property (readonly, atomic) Class mockedClass; + ++ (instancetype)mockForClass:(Class)aClass; +- (instancetype)initWithClass:(Class)aClass; + +@end diff --git a/Frameworks/OCMockito.framework/Headers/MKTOngoingStubbing.h b/Frameworks/OCMockito.framework/Headers/MKTOngoingStubbing.h new file mode 100644 index 0000000..196f044 --- /dev/null +++ b/Frameworks/OCMockito.framework/Headers/MKTOngoingStubbing.h @@ -0,0 +1,77 @@ +// +// OCMockito - MKTOngoingStubbing.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// + +#import +#import "MKTPrimitiveArgumentMatching.h" + +@class MKTInvocationContainer; + + +/** + Methods to invoke on @c given(methodCall) to return stubbed values. + */ +@interface MKTOngoingStubbing : NSObject + +- (instancetype)initWithInvocationContainer:(MKTInvocationContainer *)invocationContainer; + +/// Stubs given object as return value. +- (MKTOngoingStubbing *)willReturn:(id)object; + +/// Stubs given @c BOOL as return value. +- (MKTOngoingStubbing *)willReturnBool:(BOOL)value; + +/// Stubs given @c char as return value. +- (MKTOngoingStubbing *)willReturnChar:(char)value; + +/// Stubs given @c int as return value. +- (MKTOngoingStubbing *)willReturnInt:(int)value; + +/// Stubs given @c short as return value. +- (MKTOngoingStubbing *)willReturnShort:(short)value; + +/// Stubs given @c long as return value. +- (MKTOngoingStubbing *)willReturnLong:(long)value; + +/// Stubs given long long as return value. +- (MKTOngoingStubbing *)willReturnLongLong:(long long)value; + +/// Stubs given @c NSInteger as return value. +- (MKTOngoingStubbing *)willReturnInteger:(NSInteger)value; + +/// Stubs given unsigned char as return value. +- (MKTOngoingStubbing *)willReturnUnsignedChar:(unsigned char)value; + +/// Stubs given unsigned int as return value. +- (MKTOngoingStubbing *)willReturnUnsignedInt:(unsigned int)value; + +/// Stubs given unsigned short as return value. +- (MKTOngoingStubbing *)willReturnUnsignedShort:(unsigned short)value; + +/// Stubs given unsigned long as return value. +- (MKTOngoingStubbing *)willReturnUnsignedLong:(unsigned long)value; + +/// Stubs given unsigned long long as return value. +- (MKTOngoingStubbing *)willReturnUnsignedLongLong:(unsigned long long)value; + +/// Stubs given @c NSUInteger as return value. +- (MKTOngoingStubbing *)willReturnUnsignedInteger:(NSUInteger)value; + +/// Stubs given @c float as return value. +- (MKTOngoingStubbing *)willReturnFloat:(float)value; + +/// Stubs given @c double as return value. +- (MKTOngoingStubbing *)willReturnDouble:(double)value; + +#if TARGET_OS_MAC +- (MKTOngoingStubbing *)willReturnPoint:(NSPoint)value; +- (MKTOngoingStubbing *)willReturnSize:(NSSize)value; +- (MKTOngoingStubbing *)willReturnRect:(NSRect)value; +- (MKTOngoingStubbing *)willReturnRange:(NSRange)value; +#endif + +@end diff --git a/Frameworks/OCMockito.framework/Headers/MKTPrimitiveArgumentMatching.h b/Frameworks/OCMockito.framework/Headers/MKTPrimitiveArgumentMatching.h new file mode 100644 index 0000000..2f9316a --- /dev/null +++ b/Frameworks/OCMockito.framework/Headers/MKTPrimitiveArgumentMatching.h @@ -0,0 +1,50 @@ +// +// OCMockito - MKTPrimitiveArgumentMatching.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// + +@protocol HCMatcher; + + +/** + Ability to specify OCHamcrest matchers for primitive numeric arguments. + */ +@protocol MKTPrimitiveArgumentMatching + +/** + Specifies OCHamcrest matcher for a specific argument of a method. + + For methods arguments that take objects, just pass the matcher directly as a method call. But + for arguments that take primitive numeric types, call this to specify the matcher before passing + in a dummy value. Upon verification, the actual numeric argument received will be converted to + an NSNumber before being checked by the matcher. + + The argument index is 0-based, so the first argument of a method has index 0. + + Example: + @code + [[verify(mockArray) withMatcher:greaterThan([NSNumber numberWithInt:1]) forArgument:0] + removeObjectAtIndex:0]; + @endcode + This verifies that @c removeObjectAtIndex: was called with a number greater than 1. + */ +- (id)withMatcher:(id )matcher forArgument:(NSUInteger)index; + +/** + Specifies OCHamcrest matcher for the first argument of a method. + + Equivalent to withMatcher:matcher forArgument:0. + + Example: + @code + [[verify(mockArray) withMatcher:greaterThan([NSNumber numberWithInt:1]) forArgument:0] + removeObjectAtIndex:0]; + @endcode + This verifies that @c removeObjectAtIndex: was called with a number greater than 1. +*/ +- (id)withMatcher:(id )matcher; + +@end diff --git a/Frameworks/OCMockito.framework/Headers/MKTProtocolMock.h b/Frameworks/OCMockito.framework/Headers/MKTProtocolMock.h new file mode 100644 index 0000000..317e45b --- /dev/null +++ b/Frameworks/OCMockito.framework/Headers/MKTProtocolMock.h @@ -0,0 +1,23 @@ +// +// OCMockito - MKTProtocolMock.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// + +#import "MKTBaseMockObject.h" + + +/** + Mock object implementing a given protocol. + */ +@interface MKTProtocolMock : MKTBaseMockObject +{ + Protocol *_mockedProtocol; +} + ++ (instancetype)mockForProtocol:(Protocol *)aProtocol; +- (instancetype)initWithProtocol:(Protocol *)aProtocol; + +@end diff --git a/Frameworks/OCMockito.framework/Headers/OCMockito.h b/Frameworks/OCMockito.framework/Headers/OCMockito.h new file mode 100644 index 0000000..1148b5f --- /dev/null +++ b/Frameworks/OCMockito.framework/Headers/OCMockito.h @@ -0,0 +1,219 @@ +// +// OCMockito - OCMockito.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// + +#import + +#import "MKTArgumentCaptor.h" +#import "MKTClassObjectMock.h" +#import "MKTObjectMock.h" +#import "MKTObjectAndProtocolMock.h" +#import "MKTOngoingStubbing.h" +#import "MKTProtocolMock.h" +#import + + +#define MKTMock(aClass) (id)[MKTObjectMock mockForClass:aClass] + +/** + Returns a mock object of a given class. + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTMock instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define mock(aClass) MKTMock(aClass) +#endif + + +#define MKTMockClass(aClass) (id)[MKTClassObjectMock mockForClass:aClass] + +/** + Returns a mock class object of a given class. + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTMockClass instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define mockClass(aClass) MKTMockClass(aClass) +#endif + + +#define MKTMockProtocol(aProtocol) (id)[MKTProtocolMock mockForProtocol:aProtocol] + +/** + Returns a mock object implementing a given protocol. + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTMockProtocol instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define mockProtocol(aProtocol) MKTMockProtocol(aProtocol) +#endif + + +#define MKTMockObjectAndProtocol(aClass, aProtocol) (id)[MKTObjectAndProtocolMock mockForClass:aClass protocol:aProtocol] + +/** + Returns a mock object of a given class that also implements a given protocol. + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTMockObjectAndProtocol instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define mockObjectAndProtocol(aClass, aProtocol) (id)MKTMockObjectAndProtocol(aClass, aProtocol) +#endif + + +OBJC_EXPORT MKTOngoingStubbing *MKTGivenWithLocation(id testCase, const char *fileName, int lineNumber, ...); +#define MKTGiven(methodCall) MKTGivenWithLocation(self, __FILE__, __LINE__, methodCall) + +/** + Enables method stubbing. + + Use @c given when you want the mock to return particular value when particular method is called. + + Example: + @li @ref [given([mockObject methodReturningString]) willReturn:@"foo"]; + + See @ref MKTOngoingStubbing for other methods to stub different types of return values. + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTGiven instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define given(methodCall) MKTGiven(methodCall) +#endif + + +OBJC_EXPORT id MKTVerifyWithLocation(id mock, id testCase, const char *fileName, int lineNumber); +#define MKTVerify(mock) MKTVerifyWithLocation(mock, self, __FILE__, __LINE__) + +/** + Verifies certain behavior happened once. + + @c verify checks that a method was invoked once, with arguments that match given OCHamcrest + matchers. If an argument is not a matcher, it is implicitly wrapped in an @c equalTo matcher to + check for equality. + + Examples: + @code + [verify(mockObject) someMethod:startsWith(@"foo")]; + [verify(mockObject) someMethod:@"bar"]; + @endcode + + @c verify(mockObject) is equivalent to + @code + verifyCount(mockObject, times(1)) + @endcode + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTVerify instead.) + */ +#ifdef MOCKITO_SHORTHAND + #undef verify + #define verify(mock) MKTVerify(mock) +#endif + + +OBJC_EXPORT id MKTVerifyCountWithLocation(id mock, id mode, id testCase, const char *fileName, int lineNumber); +#define MKTVerifyCount(mock, mode) MKTVerifyCountWithLocation(mock, mode, self, __FILE__, __LINE__) + +/** + Verifies certain behavior happened a given number of times. + + Examples: + @code + [verifyCount(mockObject, times(5)) someMethod:@"was called five times"]; + [verifyCount(mockObject, never()) someMethod:@"was never called"]; + @endcode + + @c verifyCount checks that a method was invoked a given number of times, with arguments that + match given OCHamcrest matchers. If an argument is not a matcher, it is implicitly wrapped in an + @c equalTo matcher to check for equality. + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTVerifyCount instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define verifyCount(mock, mode) MKTVerifyCount(mock, mode) +#endif + + +OBJC_EXPORT id MKTTimes(NSUInteger wantedNumberOfInvocations); + +/** + Verifies exact number of invocations. + + Example: + @code + [verifyCount(mockObject, times(2)) someMethod:@"some arg"]; + @endcode + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTTimes instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define times(wantedNumberOfInvocations) MKTTimes(wantedNumberOfInvocations) +#endif + + +OBJC_EXPORT id MKTNever(void); + +/** + Verifies that interaction did not happen. + + Example: + @code + [verifyCount(mockObject, never()) someMethod:@"some arg"]; + @endcode + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTNever instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define never() MKTNever() +#endif + + +OBJC_EXPORT id MKTAtLeast(NSUInteger minimumWantedNumberOfInvocations); + +/** + Verifies minimum number of invocations. + + The verification will succeed if the specified invocation happened the number of times + specified or more. + + Example: + @code + [verifyCount(mockObject, atLeast(2)) someMethod:@"some arg"]; + @endcode + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTAtLeast instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define atLeast(minimumWantedNumberOfInvocations) MKTAtLeast(minimumWantedNumberOfInvocations) +#endif + + +OBJC_EXPORT id MKTAtLeastOnce(void); + +/** + Verifies that interaction happened once or more. + + Example: + @code + [verifyCount(mockObject, atLeastOnce()) someMethod:@"some arg"]; + @endcode + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTAtLeastOnce instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define atLeastOnce() MKTAtLeastOnce() +#endif diff --git a/Frameworks/OCMockito.framework/OCMockito b/Frameworks/OCMockito.framework/OCMockito new file mode 100755 index 0000000..564eee2 Binary files /dev/null and b/Frameworks/OCMockito.framework/OCMockito differ diff --git a/Frameworks/OCMockito.framework/Resources/Info.plist b/Frameworks/OCMockito.framework/Resources/Info.plist new file mode 100644 index 0000000..c0072e5 --- /dev/null +++ b/Frameworks/OCMockito.framework/Resources/Info.plist @@ -0,0 +1,42 @@ + + + + + BuildMachineOSBuild + 13B42 + CFBundleDevelopmentRegion + English + CFBundleExecutable + OCMockito + CFBundleIdentifier + org.mockito.OCMockito + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + OCMockito + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.1.0 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 5A3005 + DTPlatformVersion + GM + DTSDKBuild + 13A595 + DTSDKName + macosx10.9 + DTXcode + 0502 + DTXcodeBuild + 5A3005 + NSHumanReadableCopyright + Copyright © 2013 Jonathan M. Reid + + diff --git a/Frameworks/OCMockito.framework/Versions/A/Headers/MKTArgumentCaptor.h b/Frameworks/OCMockito.framework/Versions/A/Headers/MKTArgumentCaptor.h new file mode 100644 index 0000000..b159cab --- /dev/null +++ b/Frameworks/OCMockito.framework/Versions/A/Headers/MKTArgumentCaptor.h @@ -0,0 +1,18 @@ +// +// OCMockito - MKTArgumentCaptor.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// + +#import + + +@interface MKTArgumentCaptor : NSObject + +- (id)capture; +- (id)value; +- (NSArray *)allValues; + +@end diff --git a/Frameworks/OCMockito.framework/Versions/A/Headers/MKTBaseMockObject.h b/Frameworks/OCMockito.framework/Versions/A/Headers/MKTBaseMockObject.h new file mode 100644 index 0000000..e2f367a --- /dev/null +++ b/Frameworks/OCMockito.framework/Versions/A/Headers/MKTBaseMockObject.h @@ -0,0 +1,17 @@ +// +// OCMockito - MKTBaseMockObject.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// + +#import +#import "MKTPrimitiveArgumentMatching.h" + + +@interface MKTBaseMockObject : NSProxy + +- (instancetype)init; + +@end diff --git a/Frameworks/OCMockito.framework/Versions/A/Headers/MKTClassObjectMock.h b/Frameworks/OCMockito.framework/Versions/A/Headers/MKTClassObjectMock.h new file mode 100644 index 0000000..ab0cd30 --- /dev/null +++ b/Frameworks/OCMockito.framework/Versions/A/Headers/MKTClassObjectMock.h @@ -0,0 +1,22 @@ +// +// OCMockito - MKTClassObjectMock.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// +// Created by: David Hart +// + +#import "MKTBaseMockObject.h" + + +/** + Mock object of a given class object. + */ +@interface MKTClassObjectMock : MKTBaseMockObject + ++ (instancetype)mockForClass:(Class)aClass; +- (instancetype)initWithClass:(Class)aClass; + +@end diff --git a/Frameworks/OCMockito.framework/Versions/A/Headers/MKTObjectAndProtocolMock.h b/Frameworks/OCMockito.framework/Versions/A/Headers/MKTObjectAndProtocolMock.h new file mode 100644 index 0000000..8688a62 --- /dev/null +++ b/Frameworks/OCMockito.framework/Versions/A/Headers/MKTObjectAndProtocolMock.h @@ -0,0 +1,20 @@ +// +// OCMockito - MKTObjectAndProtocolMock.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Kevin Lundberg +// Source: https://github.com/jonreid/OCMockito +// + +#import "MKTProtocolMock.h" + + +/** + Mock object of a given class that also implements a given protocol. + */ +@interface MKTObjectAndProtocolMock : MKTProtocolMock + ++ (instancetype)mockForClass:(Class)aClass protocol:(Protocol *)protocol; +- (instancetype)initWithClass:(Class)aClass protocol:(Protocol *)protocol; + +@end diff --git a/Frameworks/OCMockito.framework/Versions/A/Headers/MKTObjectMock.h b/Frameworks/OCMockito.framework/Versions/A/Headers/MKTObjectMock.h new file mode 100644 index 0000000..4194119 --- /dev/null +++ b/Frameworks/OCMockito.framework/Versions/A/Headers/MKTObjectMock.h @@ -0,0 +1,22 @@ +// +// OCMockito - MKTObjectMock.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// + +#import "MKTBaseMockObject.h" + + +/** + Mock object of a given class. + */ +@interface MKTObjectMock : MKTBaseMockObject + +@property (readonly, atomic) Class mockedClass; + ++ (instancetype)mockForClass:(Class)aClass; +- (instancetype)initWithClass:(Class)aClass; + +@end diff --git a/Frameworks/OCMockito.framework/Versions/A/Headers/MKTOngoingStubbing.h b/Frameworks/OCMockito.framework/Versions/A/Headers/MKTOngoingStubbing.h new file mode 100644 index 0000000..196f044 --- /dev/null +++ b/Frameworks/OCMockito.framework/Versions/A/Headers/MKTOngoingStubbing.h @@ -0,0 +1,77 @@ +// +// OCMockito - MKTOngoingStubbing.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// + +#import +#import "MKTPrimitiveArgumentMatching.h" + +@class MKTInvocationContainer; + + +/** + Methods to invoke on @c given(methodCall) to return stubbed values. + */ +@interface MKTOngoingStubbing : NSObject + +- (instancetype)initWithInvocationContainer:(MKTInvocationContainer *)invocationContainer; + +/// Stubs given object as return value. +- (MKTOngoingStubbing *)willReturn:(id)object; + +/// Stubs given @c BOOL as return value. +- (MKTOngoingStubbing *)willReturnBool:(BOOL)value; + +/// Stubs given @c char as return value. +- (MKTOngoingStubbing *)willReturnChar:(char)value; + +/// Stubs given @c int as return value. +- (MKTOngoingStubbing *)willReturnInt:(int)value; + +/// Stubs given @c short as return value. +- (MKTOngoingStubbing *)willReturnShort:(short)value; + +/// Stubs given @c long as return value. +- (MKTOngoingStubbing *)willReturnLong:(long)value; + +/// Stubs given long long as return value. +- (MKTOngoingStubbing *)willReturnLongLong:(long long)value; + +/// Stubs given @c NSInteger as return value. +- (MKTOngoingStubbing *)willReturnInteger:(NSInteger)value; + +/// Stubs given unsigned char as return value. +- (MKTOngoingStubbing *)willReturnUnsignedChar:(unsigned char)value; + +/// Stubs given unsigned int as return value. +- (MKTOngoingStubbing *)willReturnUnsignedInt:(unsigned int)value; + +/// Stubs given unsigned short as return value. +- (MKTOngoingStubbing *)willReturnUnsignedShort:(unsigned short)value; + +/// Stubs given unsigned long as return value. +- (MKTOngoingStubbing *)willReturnUnsignedLong:(unsigned long)value; + +/// Stubs given unsigned long long as return value. +- (MKTOngoingStubbing *)willReturnUnsignedLongLong:(unsigned long long)value; + +/// Stubs given @c NSUInteger as return value. +- (MKTOngoingStubbing *)willReturnUnsignedInteger:(NSUInteger)value; + +/// Stubs given @c float as return value. +- (MKTOngoingStubbing *)willReturnFloat:(float)value; + +/// Stubs given @c double as return value. +- (MKTOngoingStubbing *)willReturnDouble:(double)value; + +#if TARGET_OS_MAC +- (MKTOngoingStubbing *)willReturnPoint:(NSPoint)value; +- (MKTOngoingStubbing *)willReturnSize:(NSSize)value; +- (MKTOngoingStubbing *)willReturnRect:(NSRect)value; +- (MKTOngoingStubbing *)willReturnRange:(NSRange)value; +#endif + +@end diff --git a/Frameworks/OCMockito.framework/Versions/A/Headers/MKTPrimitiveArgumentMatching.h b/Frameworks/OCMockito.framework/Versions/A/Headers/MKTPrimitiveArgumentMatching.h new file mode 100644 index 0000000..2f9316a --- /dev/null +++ b/Frameworks/OCMockito.framework/Versions/A/Headers/MKTPrimitiveArgumentMatching.h @@ -0,0 +1,50 @@ +// +// OCMockito - MKTPrimitiveArgumentMatching.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// + +@protocol HCMatcher; + + +/** + Ability to specify OCHamcrest matchers for primitive numeric arguments. + */ +@protocol MKTPrimitiveArgumentMatching + +/** + Specifies OCHamcrest matcher for a specific argument of a method. + + For methods arguments that take objects, just pass the matcher directly as a method call. But + for arguments that take primitive numeric types, call this to specify the matcher before passing + in a dummy value. Upon verification, the actual numeric argument received will be converted to + an NSNumber before being checked by the matcher. + + The argument index is 0-based, so the first argument of a method has index 0. + + Example: + @code + [[verify(mockArray) withMatcher:greaterThan([NSNumber numberWithInt:1]) forArgument:0] + removeObjectAtIndex:0]; + @endcode + This verifies that @c removeObjectAtIndex: was called with a number greater than 1. + */ +- (id)withMatcher:(id )matcher forArgument:(NSUInteger)index; + +/** + Specifies OCHamcrest matcher for the first argument of a method. + + Equivalent to withMatcher:matcher forArgument:0. + + Example: + @code + [[verify(mockArray) withMatcher:greaterThan([NSNumber numberWithInt:1]) forArgument:0] + removeObjectAtIndex:0]; + @endcode + This verifies that @c removeObjectAtIndex: was called with a number greater than 1. +*/ +- (id)withMatcher:(id )matcher; + +@end diff --git a/Frameworks/OCMockito.framework/Versions/A/Headers/MKTProtocolMock.h b/Frameworks/OCMockito.framework/Versions/A/Headers/MKTProtocolMock.h new file mode 100644 index 0000000..317e45b --- /dev/null +++ b/Frameworks/OCMockito.framework/Versions/A/Headers/MKTProtocolMock.h @@ -0,0 +1,23 @@ +// +// OCMockito - MKTProtocolMock.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// + +#import "MKTBaseMockObject.h" + + +/** + Mock object implementing a given protocol. + */ +@interface MKTProtocolMock : MKTBaseMockObject +{ + Protocol *_mockedProtocol; +} + ++ (instancetype)mockForProtocol:(Protocol *)aProtocol; +- (instancetype)initWithProtocol:(Protocol *)aProtocol; + +@end diff --git a/Frameworks/OCMockito.framework/Versions/A/Headers/OCMockito.h b/Frameworks/OCMockito.framework/Versions/A/Headers/OCMockito.h new file mode 100644 index 0000000..1148b5f --- /dev/null +++ b/Frameworks/OCMockito.framework/Versions/A/Headers/OCMockito.h @@ -0,0 +1,219 @@ +// +// OCMockito - OCMockito.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// + +#import + +#import "MKTArgumentCaptor.h" +#import "MKTClassObjectMock.h" +#import "MKTObjectMock.h" +#import "MKTObjectAndProtocolMock.h" +#import "MKTOngoingStubbing.h" +#import "MKTProtocolMock.h" +#import + + +#define MKTMock(aClass) (id)[MKTObjectMock mockForClass:aClass] + +/** + Returns a mock object of a given class. + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTMock instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define mock(aClass) MKTMock(aClass) +#endif + + +#define MKTMockClass(aClass) (id)[MKTClassObjectMock mockForClass:aClass] + +/** + Returns a mock class object of a given class. + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTMockClass instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define mockClass(aClass) MKTMockClass(aClass) +#endif + + +#define MKTMockProtocol(aProtocol) (id)[MKTProtocolMock mockForProtocol:aProtocol] + +/** + Returns a mock object implementing a given protocol. + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTMockProtocol instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define mockProtocol(aProtocol) MKTMockProtocol(aProtocol) +#endif + + +#define MKTMockObjectAndProtocol(aClass, aProtocol) (id)[MKTObjectAndProtocolMock mockForClass:aClass protocol:aProtocol] + +/** + Returns a mock object of a given class that also implements a given protocol. + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTMockObjectAndProtocol instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define mockObjectAndProtocol(aClass, aProtocol) (id)MKTMockObjectAndProtocol(aClass, aProtocol) +#endif + + +OBJC_EXPORT MKTOngoingStubbing *MKTGivenWithLocation(id testCase, const char *fileName, int lineNumber, ...); +#define MKTGiven(methodCall) MKTGivenWithLocation(self, __FILE__, __LINE__, methodCall) + +/** + Enables method stubbing. + + Use @c given when you want the mock to return particular value when particular method is called. + + Example: + @li @ref [given([mockObject methodReturningString]) willReturn:@"foo"]; + + See @ref MKTOngoingStubbing for other methods to stub different types of return values. + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTGiven instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define given(methodCall) MKTGiven(methodCall) +#endif + + +OBJC_EXPORT id MKTVerifyWithLocation(id mock, id testCase, const char *fileName, int lineNumber); +#define MKTVerify(mock) MKTVerifyWithLocation(mock, self, __FILE__, __LINE__) + +/** + Verifies certain behavior happened once. + + @c verify checks that a method was invoked once, with arguments that match given OCHamcrest + matchers. If an argument is not a matcher, it is implicitly wrapped in an @c equalTo matcher to + check for equality. + + Examples: + @code + [verify(mockObject) someMethod:startsWith(@"foo")]; + [verify(mockObject) someMethod:@"bar"]; + @endcode + + @c verify(mockObject) is equivalent to + @code + verifyCount(mockObject, times(1)) + @endcode + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTVerify instead.) + */ +#ifdef MOCKITO_SHORTHAND + #undef verify + #define verify(mock) MKTVerify(mock) +#endif + + +OBJC_EXPORT id MKTVerifyCountWithLocation(id mock, id mode, id testCase, const char *fileName, int lineNumber); +#define MKTVerifyCount(mock, mode) MKTVerifyCountWithLocation(mock, mode, self, __FILE__, __LINE__) + +/** + Verifies certain behavior happened a given number of times. + + Examples: + @code + [verifyCount(mockObject, times(5)) someMethod:@"was called five times"]; + [verifyCount(mockObject, never()) someMethod:@"was never called"]; + @endcode + + @c verifyCount checks that a method was invoked a given number of times, with arguments that + match given OCHamcrest matchers. If an argument is not a matcher, it is implicitly wrapped in an + @c equalTo matcher to check for equality. + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTVerifyCount instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define verifyCount(mock, mode) MKTVerifyCount(mock, mode) +#endif + + +OBJC_EXPORT id MKTTimes(NSUInteger wantedNumberOfInvocations); + +/** + Verifies exact number of invocations. + + Example: + @code + [verifyCount(mockObject, times(2)) someMethod:@"some arg"]; + @endcode + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTTimes instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define times(wantedNumberOfInvocations) MKTTimes(wantedNumberOfInvocations) +#endif + + +OBJC_EXPORT id MKTNever(void); + +/** + Verifies that interaction did not happen. + + Example: + @code + [verifyCount(mockObject, never()) someMethod:@"some arg"]; + @endcode + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTNever instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define never() MKTNever() +#endif + + +OBJC_EXPORT id MKTAtLeast(NSUInteger minimumWantedNumberOfInvocations); + +/** + Verifies minimum number of invocations. + + The verification will succeed if the specified invocation happened the number of times + specified or more. + + Example: + @code + [verifyCount(mockObject, atLeast(2)) someMethod:@"some arg"]; + @endcode + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTAtLeast instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define atLeast(minimumWantedNumberOfInvocations) MKTAtLeast(minimumWantedNumberOfInvocations) +#endif + + +OBJC_EXPORT id MKTAtLeastOnce(void); + +/** + Verifies that interaction happened once or more. + + Example: + @code + [verifyCount(mockObject, atLeastOnce()) someMethod:@"some arg"]; + @endcode + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTAtLeastOnce instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define atLeastOnce() MKTAtLeastOnce() +#endif diff --git a/Frameworks/OCMockito.framework/Versions/A/OCMockito b/Frameworks/OCMockito.framework/Versions/A/OCMockito new file mode 100755 index 0000000..564eee2 Binary files /dev/null and b/Frameworks/OCMockito.framework/Versions/A/OCMockito differ diff --git a/Frameworks/OCMockito.framework/Versions/A/Resources/Info.plist b/Frameworks/OCMockito.framework/Versions/A/Resources/Info.plist new file mode 100644 index 0000000..c0072e5 --- /dev/null +++ b/Frameworks/OCMockito.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,42 @@ + + + + + BuildMachineOSBuild + 13B42 + CFBundleDevelopmentRegion + English + CFBundleExecutable + OCMockito + CFBundleIdentifier + org.mockito.OCMockito + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + OCMockito + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.1.0 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 5A3005 + DTPlatformVersion + GM + DTSDKBuild + 13A595 + DTSDKName + macosx10.9 + DTXcode + 0502 + DTXcodeBuild + 5A3005 + NSHumanReadableCopyright + Copyright © 2013 Jonathan M. Reid + + diff --git a/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTArgumentCaptor.h b/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTArgumentCaptor.h new file mode 100644 index 0000000..b159cab --- /dev/null +++ b/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTArgumentCaptor.h @@ -0,0 +1,18 @@ +// +// OCMockito - MKTArgumentCaptor.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// + +#import + + +@interface MKTArgumentCaptor : NSObject + +- (id)capture; +- (id)value; +- (NSArray *)allValues; + +@end diff --git a/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTBaseMockObject.h b/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTBaseMockObject.h new file mode 100644 index 0000000..e2f367a --- /dev/null +++ b/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTBaseMockObject.h @@ -0,0 +1,17 @@ +// +// OCMockito - MKTBaseMockObject.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// + +#import +#import "MKTPrimitiveArgumentMatching.h" + + +@interface MKTBaseMockObject : NSProxy + +- (instancetype)init; + +@end diff --git a/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTClassObjectMock.h b/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTClassObjectMock.h new file mode 100644 index 0000000..ab0cd30 --- /dev/null +++ b/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTClassObjectMock.h @@ -0,0 +1,22 @@ +// +// OCMockito - MKTClassObjectMock.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// +// Created by: David Hart +// + +#import "MKTBaseMockObject.h" + + +/** + Mock object of a given class object. + */ +@interface MKTClassObjectMock : MKTBaseMockObject + ++ (instancetype)mockForClass:(Class)aClass; +- (instancetype)initWithClass:(Class)aClass; + +@end diff --git a/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTObjectAndProtocolMock.h b/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTObjectAndProtocolMock.h new file mode 100644 index 0000000..8688a62 --- /dev/null +++ b/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTObjectAndProtocolMock.h @@ -0,0 +1,20 @@ +// +// OCMockito - MKTObjectAndProtocolMock.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Kevin Lundberg +// Source: https://github.com/jonreid/OCMockito +// + +#import "MKTProtocolMock.h" + + +/** + Mock object of a given class that also implements a given protocol. + */ +@interface MKTObjectAndProtocolMock : MKTProtocolMock + ++ (instancetype)mockForClass:(Class)aClass protocol:(Protocol *)protocol; +- (instancetype)initWithClass:(Class)aClass protocol:(Protocol *)protocol; + +@end diff --git a/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTObjectMock.h b/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTObjectMock.h new file mode 100644 index 0000000..4194119 --- /dev/null +++ b/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTObjectMock.h @@ -0,0 +1,22 @@ +// +// OCMockito - MKTObjectMock.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// + +#import "MKTBaseMockObject.h" + + +/** + Mock object of a given class. + */ +@interface MKTObjectMock : MKTBaseMockObject + +@property (readonly, atomic) Class mockedClass; + ++ (instancetype)mockForClass:(Class)aClass; +- (instancetype)initWithClass:(Class)aClass; + +@end diff --git a/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTOngoingStubbing.h b/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTOngoingStubbing.h new file mode 100644 index 0000000..196f044 --- /dev/null +++ b/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTOngoingStubbing.h @@ -0,0 +1,77 @@ +// +// OCMockito - MKTOngoingStubbing.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// + +#import +#import "MKTPrimitiveArgumentMatching.h" + +@class MKTInvocationContainer; + + +/** + Methods to invoke on @c given(methodCall) to return stubbed values. + */ +@interface MKTOngoingStubbing : NSObject + +- (instancetype)initWithInvocationContainer:(MKTInvocationContainer *)invocationContainer; + +/// Stubs given object as return value. +- (MKTOngoingStubbing *)willReturn:(id)object; + +/// Stubs given @c BOOL as return value. +- (MKTOngoingStubbing *)willReturnBool:(BOOL)value; + +/// Stubs given @c char as return value. +- (MKTOngoingStubbing *)willReturnChar:(char)value; + +/// Stubs given @c int as return value. +- (MKTOngoingStubbing *)willReturnInt:(int)value; + +/// Stubs given @c short as return value. +- (MKTOngoingStubbing *)willReturnShort:(short)value; + +/// Stubs given @c long as return value. +- (MKTOngoingStubbing *)willReturnLong:(long)value; + +/// Stubs given long long as return value. +- (MKTOngoingStubbing *)willReturnLongLong:(long long)value; + +/// Stubs given @c NSInteger as return value. +- (MKTOngoingStubbing *)willReturnInteger:(NSInteger)value; + +/// Stubs given unsigned char as return value. +- (MKTOngoingStubbing *)willReturnUnsignedChar:(unsigned char)value; + +/// Stubs given unsigned int as return value. +- (MKTOngoingStubbing *)willReturnUnsignedInt:(unsigned int)value; + +/// Stubs given unsigned short as return value. +- (MKTOngoingStubbing *)willReturnUnsignedShort:(unsigned short)value; + +/// Stubs given unsigned long as return value. +- (MKTOngoingStubbing *)willReturnUnsignedLong:(unsigned long)value; + +/// Stubs given unsigned long long as return value. +- (MKTOngoingStubbing *)willReturnUnsignedLongLong:(unsigned long long)value; + +/// Stubs given @c NSUInteger as return value. +- (MKTOngoingStubbing *)willReturnUnsignedInteger:(NSUInteger)value; + +/// Stubs given @c float as return value. +- (MKTOngoingStubbing *)willReturnFloat:(float)value; + +/// Stubs given @c double as return value. +- (MKTOngoingStubbing *)willReturnDouble:(double)value; + +#if TARGET_OS_MAC +- (MKTOngoingStubbing *)willReturnPoint:(NSPoint)value; +- (MKTOngoingStubbing *)willReturnSize:(NSSize)value; +- (MKTOngoingStubbing *)willReturnRect:(NSRect)value; +- (MKTOngoingStubbing *)willReturnRange:(NSRange)value; +#endif + +@end diff --git a/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTPrimitiveArgumentMatching.h b/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTPrimitiveArgumentMatching.h new file mode 100644 index 0000000..2f9316a --- /dev/null +++ b/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTPrimitiveArgumentMatching.h @@ -0,0 +1,50 @@ +// +// OCMockito - MKTPrimitiveArgumentMatching.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// + +@protocol HCMatcher; + + +/** + Ability to specify OCHamcrest matchers for primitive numeric arguments. + */ +@protocol MKTPrimitiveArgumentMatching + +/** + Specifies OCHamcrest matcher for a specific argument of a method. + + For methods arguments that take objects, just pass the matcher directly as a method call. But + for arguments that take primitive numeric types, call this to specify the matcher before passing + in a dummy value. Upon verification, the actual numeric argument received will be converted to + an NSNumber before being checked by the matcher. + + The argument index is 0-based, so the first argument of a method has index 0. + + Example: + @code + [[verify(mockArray) withMatcher:greaterThan([NSNumber numberWithInt:1]) forArgument:0] + removeObjectAtIndex:0]; + @endcode + This verifies that @c removeObjectAtIndex: was called with a number greater than 1. + */ +- (id)withMatcher:(id )matcher forArgument:(NSUInteger)index; + +/** + Specifies OCHamcrest matcher for the first argument of a method. + + Equivalent to withMatcher:matcher forArgument:0. + + Example: + @code + [[verify(mockArray) withMatcher:greaterThan([NSNumber numberWithInt:1]) forArgument:0] + removeObjectAtIndex:0]; + @endcode + This verifies that @c removeObjectAtIndex: was called with a number greater than 1. +*/ +- (id)withMatcher:(id )matcher; + +@end diff --git a/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTProtocolMock.h b/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTProtocolMock.h new file mode 100644 index 0000000..317e45b --- /dev/null +++ b/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTProtocolMock.h @@ -0,0 +1,23 @@ +// +// OCMockito - MKTProtocolMock.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// + +#import "MKTBaseMockObject.h" + + +/** + Mock object implementing a given protocol. + */ +@interface MKTProtocolMock : MKTBaseMockObject +{ + Protocol *_mockedProtocol; +} + ++ (instancetype)mockForProtocol:(Protocol *)aProtocol; +- (instancetype)initWithProtocol:(Protocol *)aProtocol; + +@end diff --git a/Frameworks/OCMockito.framework/Versions/Current/Headers/OCMockito.h b/Frameworks/OCMockito.framework/Versions/Current/Headers/OCMockito.h new file mode 100644 index 0000000..1148b5f --- /dev/null +++ b/Frameworks/OCMockito.framework/Versions/Current/Headers/OCMockito.h @@ -0,0 +1,219 @@ +// +// OCMockito - OCMockito.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// + +#import + +#import "MKTArgumentCaptor.h" +#import "MKTClassObjectMock.h" +#import "MKTObjectMock.h" +#import "MKTObjectAndProtocolMock.h" +#import "MKTOngoingStubbing.h" +#import "MKTProtocolMock.h" +#import + + +#define MKTMock(aClass) (id)[MKTObjectMock mockForClass:aClass] + +/** + Returns a mock object of a given class. + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTMock instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define mock(aClass) MKTMock(aClass) +#endif + + +#define MKTMockClass(aClass) (id)[MKTClassObjectMock mockForClass:aClass] + +/** + Returns a mock class object of a given class. + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTMockClass instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define mockClass(aClass) MKTMockClass(aClass) +#endif + + +#define MKTMockProtocol(aProtocol) (id)[MKTProtocolMock mockForProtocol:aProtocol] + +/** + Returns a mock object implementing a given protocol. + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTMockProtocol instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define mockProtocol(aProtocol) MKTMockProtocol(aProtocol) +#endif + + +#define MKTMockObjectAndProtocol(aClass, aProtocol) (id)[MKTObjectAndProtocolMock mockForClass:aClass protocol:aProtocol] + +/** + Returns a mock object of a given class that also implements a given protocol. + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTMockObjectAndProtocol instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define mockObjectAndProtocol(aClass, aProtocol) (id)MKTMockObjectAndProtocol(aClass, aProtocol) +#endif + + +OBJC_EXPORT MKTOngoingStubbing *MKTGivenWithLocation(id testCase, const char *fileName, int lineNumber, ...); +#define MKTGiven(methodCall) MKTGivenWithLocation(self, __FILE__, __LINE__, methodCall) + +/** + Enables method stubbing. + + Use @c given when you want the mock to return particular value when particular method is called. + + Example: + @li @ref [given([mockObject methodReturningString]) willReturn:@"foo"]; + + See @ref MKTOngoingStubbing for other methods to stub different types of return values. + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTGiven instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define given(methodCall) MKTGiven(methodCall) +#endif + + +OBJC_EXPORT id MKTVerifyWithLocation(id mock, id testCase, const char *fileName, int lineNumber); +#define MKTVerify(mock) MKTVerifyWithLocation(mock, self, __FILE__, __LINE__) + +/** + Verifies certain behavior happened once. + + @c verify checks that a method was invoked once, with arguments that match given OCHamcrest + matchers. If an argument is not a matcher, it is implicitly wrapped in an @c equalTo matcher to + check for equality. + + Examples: + @code + [verify(mockObject) someMethod:startsWith(@"foo")]; + [verify(mockObject) someMethod:@"bar"]; + @endcode + + @c verify(mockObject) is equivalent to + @code + verifyCount(mockObject, times(1)) + @endcode + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTVerify instead.) + */ +#ifdef MOCKITO_SHORTHAND + #undef verify + #define verify(mock) MKTVerify(mock) +#endif + + +OBJC_EXPORT id MKTVerifyCountWithLocation(id mock, id mode, id testCase, const char *fileName, int lineNumber); +#define MKTVerifyCount(mock, mode) MKTVerifyCountWithLocation(mock, mode, self, __FILE__, __LINE__) + +/** + Verifies certain behavior happened a given number of times. + + Examples: + @code + [verifyCount(mockObject, times(5)) someMethod:@"was called five times"]; + [verifyCount(mockObject, never()) someMethod:@"was never called"]; + @endcode + + @c verifyCount checks that a method was invoked a given number of times, with arguments that + match given OCHamcrest matchers. If an argument is not a matcher, it is implicitly wrapped in an + @c equalTo matcher to check for equality. + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTVerifyCount instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define verifyCount(mock, mode) MKTVerifyCount(mock, mode) +#endif + + +OBJC_EXPORT id MKTTimes(NSUInteger wantedNumberOfInvocations); + +/** + Verifies exact number of invocations. + + Example: + @code + [verifyCount(mockObject, times(2)) someMethod:@"some arg"]; + @endcode + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTTimes instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define times(wantedNumberOfInvocations) MKTTimes(wantedNumberOfInvocations) +#endif + + +OBJC_EXPORT id MKTNever(void); + +/** + Verifies that interaction did not happen. + + Example: + @code + [verifyCount(mockObject, never()) someMethod:@"some arg"]; + @endcode + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTNever instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define never() MKTNever() +#endif + + +OBJC_EXPORT id MKTAtLeast(NSUInteger minimumWantedNumberOfInvocations); + +/** + Verifies minimum number of invocations. + + The verification will succeed if the specified invocation happened the number of times + specified or more. + + Example: + @code + [verifyCount(mockObject, atLeast(2)) someMethod:@"some arg"]; + @endcode + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTAtLeast instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define atLeast(minimumWantedNumberOfInvocations) MKTAtLeast(minimumWantedNumberOfInvocations) +#endif + + +OBJC_EXPORT id MKTAtLeastOnce(void); + +/** + Verifies that interaction happened once or more. + + Example: + @code + [verifyCount(mockObject, atLeastOnce()) someMethod:@"some arg"]; + @endcode + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTAtLeastOnce instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define atLeastOnce() MKTAtLeastOnce() +#endif diff --git a/Frameworks/OCMockito.framework/Versions/Current/OCMockito b/Frameworks/OCMockito.framework/Versions/Current/OCMockito new file mode 100755 index 0000000..564eee2 Binary files /dev/null and b/Frameworks/OCMockito.framework/Versions/Current/OCMockito differ diff --git a/Frameworks/OCMockito.framework/Versions/Current/Resources/Info.plist b/Frameworks/OCMockito.framework/Versions/Current/Resources/Info.plist new file mode 100644 index 0000000..c0072e5 --- /dev/null +++ b/Frameworks/OCMockito.framework/Versions/Current/Resources/Info.plist @@ -0,0 +1,42 @@ + + + + + BuildMachineOSBuild + 13B42 + CFBundleDevelopmentRegion + English + CFBundleExecutable + OCMockito + CFBundleIdentifier + org.mockito.OCMockito + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + OCMockito + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.1.0 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 5A3005 + DTPlatformVersion + GM + DTSDKBuild + 13A595 + DTSDKName + macosx10.9 + DTXcode + 0502 + DTXcodeBuild + 5A3005 + NSHumanReadableCopyright + Copyright © 2013 Jonathan M. Reid + + diff --git a/Qmind.xcodeproj/project.pbxproj b/Qmind.xcodeproj/project.pbxproj index 4b8b59f..4f3c319 100644 --- a/Qmind.xcodeproj/project.pbxproj +++ b/Qmind.xcodeproj/project.pbxproj @@ -160,6 +160,10 @@ 4BB460071736A03F00B2B15D /* QMMindmapReader.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B85653514E46D6800C6FF0D /* QMMindmapReader.m */; }; 4BB460081736A03F00B2B15D /* QMMindmapViewDataSourceImpl.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BFCD7AC14F3E32A008509A6 /* QMMindmapViewDataSourceImpl.m */; }; 4BB460091736A03F00B2B15D /* QMDocumentWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B85653514E46D6800C6FF22 /* QMDocumentWindowController.m */; }; + 4BBFA3CE1880278700DAE6B8 /* OCHamcrest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BBFA3CC1880278700DAE6B8 /* OCHamcrest.framework */; }; + 4BBFA3CF1880278700DAE6B8 /* OCMockito.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BBFA3CD1880278700DAE6B8 /* OCMockito.framework */; }; + 4BBFA3D1188027B300DAE6B8 /* OCHamcrest.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4BBFA3CC1880278700DAE6B8 /* OCHamcrest.framework */; }; + 4BBFA3D2188027B300DAE6B8 /* OCMockito.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4BBFA3CD1880278700DAE6B8 /* OCMockito.framework */; }; 4BD8C1291736F43200DC4B6F /* IconsFreeMindToQmind.plist in Resources */ = {isa = PBXBuildFile; fileRef = 4BFCD7AC14F3E32A00850938 /* IconsFreeMindToQmind.plist */; }; 4BDA7813170F80F5000AB84A /* sparkle-pub.pem in Resources */ = {isa = PBXBuildFile; fileRef = 4BDA7812170F80F5000AB84A /* sparkle-pub.pem */; }; 4BDC9D901524EEAD008CEB8E /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 4BDC9D8E1524EEAD008CEB8E /* Localizable.strings */; }; @@ -173,8 +177,6 @@ 4BF11362173836DF0029C032 /* dummy.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 4BFCD7AC14F3E32A00850936 /* dummy.pdf */; }; 4BFCD74F14F3D33600850924 /* QMAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BFCD74E14F3D33600850924 /* QMAppDelegate.m */; }; 4BFCD75814F3D34700850924 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B8564C514E461DC00C6FF0A /* Cocoa.framework */; }; - 4BFCD76E14F3D53300850924 /* OCMockito.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B85653514E46D6800C6FF5D /* OCMockito.framework */; }; - 4BFCD76F14F3D53300850924 /* OCHamcrest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B85653514E46D6800C6FF1D /* OCHamcrest.framework */; }; 4BFCD7AB14F3E32A00850924 /* mindmap-writer-test.mm in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4B39306914EC2E1500A9D541 /* mindmap-writer-test.mm */; }; 4BFCD7AC14F3E32A00850924 /* mindmap-reader-test.mm in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4B85653514E46D6800C6FF1C /* mindmap-reader-test.mm */; }; 4BFCD7AC14F3E32A00850926 /* QMCellDrawer.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BFCD7AC14F3E32A00850925 /* QMCellDrawer.m */; }; @@ -332,6 +334,17 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 4BBFA3D0188027A800DAE6B8 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 16; + files = ( + 4BBFA3D1188027B300DAE6B8 /* OCHamcrest.framework in CopyFiles */, + 4BBFA3D2188027B300DAE6B8 /* OCMockito.framework in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 4BFCD7AA14F3E31F00850924 /* CopyFiles */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; @@ -423,7 +436,6 @@ 4B85653514E46D6800C6FF15 /* QMProxyNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QMProxyNode.m; sourceTree = ""; }; 4B85653514E46D6800C6FF19 /* MindmapReaderTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MindmapReaderTest.m; sourceTree = ""; }; 4B85653514E46D6800C6FF1C /* mindmap-reader-test.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "mindmap-reader-test.mm"; sourceTree = ""; }; - 4B85653514E46D6800C6FF1D /* OCHamcrest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OCHamcrest.framework; path = /Library/Frameworks/OCHamcrest.framework; sourceTree = ""; }; 4B85653514E46D6800C6FF1F /* MindmapWriterTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MindmapWriterTest.m; sourceTree = ""; }; 4B85653514E46D6800C6FF22 /* QMDocumentWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QMDocumentWindowController.m; sourceTree = ""; }; 4B85653514E46D6800C6FF25 /* QMDocumentWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QMDocumentWindowController.h; sourceTree = ""; }; @@ -437,7 +449,6 @@ 4B85653514E46D6800C6FF44 /* QMTextLayoutManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QMTextLayoutManager.h; sourceTree = ""; }; 4B85653514E46D6800C6FF4A /* TextLayoutManagerTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TextLayoutManagerTest.m; sourceTree = ""; }; 4B85653514E46D6800C6FF5B /* DocumentWindowControllerTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DocumentWindowControllerTest.m; sourceTree = ""; }; - 4B85653514E46D6800C6FF5D /* OCMockito.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OCMockito.framework; path = /Library/Frameworks/OCMockito.framework; sourceTree = ""; }; 4B85653514E46D6800C6FF5F /* QMTextDrawer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QMTextDrawer.m; sourceTree = ""; }; 4B85653514E46D6800C6FF62 /* QMTextDrawer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QMTextDrawer.h; sourceTree = ""; }; 4B85653514E46D6800C6FF65 /* QMCellTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QMCellTest.m; sourceTree = ""; }; @@ -457,6 +468,8 @@ 4B992F071735176D00C5844E /* QmindLook-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "QmindLook-Prefix.pch"; sourceTree = ""; }; 4B992F1A173545CD00C5844E /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Sparkle.framework; path = Frameworks/Sparkle.framework; sourceTree = ""; }; 4B9DE3331569367500AAF5C1 /* QmindIcon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = QmindIcon.icns; path = Resources/QmindIcon.icns; sourceTree = ""; }; + 4BBFA3CC1880278700DAE6B8 /* OCHamcrest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OCHamcrest.framework; path = Frameworks/OCHamcrest.framework; sourceTree = ""; }; + 4BBFA3CD1880278700DAE6B8 /* OCMockito.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OCMockito.framework; path = Frameworks/OCMockito.framework; sourceTree = ""; }; 4BDA7812170F80F5000AB84A /* sparkle-pub.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "sparkle-pub.pem"; path = "Resources/sparkle-pub.pem"; sourceTree = ""; }; 4BDC9D8F1524EEAD008CEB8E /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; 4BE684AA16922E9000789892 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/IconCollectionViewItem.xib; sourceTree = ""; }; @@ -538,12 +551,12 @@ buildActionMask = 2147483647; files = ( 4B15777516A2F0000048480E /* Qkit.framework in Frameworks */, + 4BBFA3CF1880278700DAE6B8 /* OCMockito.framework in Frameworks */, 4B15777416A2EFFE0048480E /* QTestKit.framework in Frameworks */, 4B03B2511628726500E5ECA2 /* TBCacao.framework in Frameworks */, 4BFCD75814F3D34700850924 /* Cocoa.framework in Frameworks */, - 4BFCD76E14F3D53300850924 /* OCMockito.framework in Frameworks */, - 4BFCD76F14F3D53300850924 /* OCHamcrest.framework in Frameworks */, 1929B0840D140F224C35878C /* XCTest.framework in Frameworks */, + 4BBFA3CE1880278700DAE6B8 /* OCHamcrest.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -554,7 +567,7 @@ isa = PBXGroup; children = ( 4B03B2481628724000E5ECA2 /* TBCacao.framework */, - 4B03B24A1628724000E5ECA2 /* TBCacaoTests.octest */, + 4B03B24A1628724000E5ECA2 /* TBCacaoTests.xctest */, ); name = Products; sourceTree = ""; @@ -657,9 +670,9 @@ 4B8564C414E461DC00C6FF0A /* Frameworks */ = { isa = PBXGroup; children = ( + 4BBFA3CC1880278700DAE6B8 /* OCHamcrest.framework */, + 4BBFA3CD1880278700DAE6B8 /* OCMockito.framework */, 4B992F1A173545CD00C5844E /* Sparkle.framework */, - 4B85653514E46D6800C6FF5D /* OCMockito.framework */, - 4B85653514E46D6800C6FF1D /* OCHamcrest.framework */, 4B8564C514E461DC00C6FF0A /* Cocoa.framework */, 4B992EF31735176D00C5844E /* QuickLook.framework */, 4B992EF51735176D00C5844E /* ApplicationServices.framework */, @@ -1008,6 +1021,7 @@ 4BFCD75314F3D34700850924 /* Resources */, 4B5CB44115E0E88300E05BD7 /* CopyFiles */, 4BFCD75414F3D34700850924 /* ShellScript */, + 4BBFA3D0188027A800DAE6B8 /* CopyFiles */, ); buildRules = ( ); @@ -1066,10 +1080,10 @@ remoteRef = 4B03B2471628724000E5ECA2 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; - 4B03B24A1628724000E5ECA2 /* TBCacaoTests.octest */ = { + 4B03B24A1628724000E5ECA2 /* TBCacaoTests.xctest */ = { isa = PBXReferenceProxy; fileType = wrapper.cfbundle; - path = TBCacaoTests.octest; + path = TBCacaoTests.xctest; remoteRef = 4B03B2491628724000E5ECA2 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -1581,6 +1595,8 @@ FRAMEWORK_SEARCH_PATHS = ( "$(DEVELOPER_FRAMEWORKS_DIR)", /Library/Frameworks, + "$(LOCAL_LIBRARY_DIR)/Frameworks", + /Users/hat/Projects/qmind/Frameworks, ); GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = ""; @@ -1597,6 +1613,8 @@ FRAMEWORK_SEARCH_PATHS = ( "$(DEVELOPER_FRAMEWORKS_DIR)", /Library/Frameworks, + "$(LOCAL_LIBRARY_DIR)/Frameworks", + /Users/hat/Projects/qmind/Frameworks, ); GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = ""; diff --git a/Qmind.xcodeproj/xcshareddata/xcschemes/Qmind.xcscheme b/Qmind.xcodeproj/xcshareddata/xcschemes/Qmind.xcscheme index f778ba8..167e3bf 100644 --- a/Qmind.xcodeproj/xcshareddata/xcschemes/Qmind.xcscheme +++ b/Qmind.xcodeproj/xcshareddata/xcschemes/Qmind.xcscheme @@ -28,7 +28,26 @@ shouldUseLaunchSchemeArgsEnv = "YES" buildConfiguration = "Debug"> + + + + + + + + + + + + diff --git a/Qmind.xcodeproj/xcshareddata/xcschemes/Tests.xcscheme b/Qmind.xcodeproj/xcshareddata/xcschemes/QmindSenTesting.xcscheme similarity index 73% rename from Qmind.xcodeproj/xcshareddata/xcschemes/Tests.xcscheme rename to Qmind.xcodeproj/xcshareddata/xcschemes/QmindSenTesting.xcscheme index e93835c..fa9b36a 100644 --- a/Qmind.xcodeproj/xcshareddata/xcschemes/Tests.xcscheme +++ b/Qmind.xcodeproj/xcshareddata/xcschemes/QmindSenTesting.xcscheme @@ -5,22 +5,6 @@ - - - - - -