Update OCMockito and OCHamrest frameworks to version 3.0 including 64bit slices

This commit is contained in:
Andreas Linde 2013-09-23 15:16:56 +02:00
parent 6ac703e3d7
commit 341f407eb0
66 changed files with 285 additions and 280 deletions

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCAllOf.h // OCHamcrest - HCAllOf.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/
@ -15,8 +15,8 @@
NSArray *matchers; NSArray *matchers;
} }
+ (id)allOf:(NSArray *)theMatchers; + (instancetype)allOf:(NSArray *)theMatchers;
- (id)initWithMatchers:(NSArray *)theMatchers; - (instancetype)initWithMatchers:(NSArray *)theMatchers;
@end @end

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCAnyOf.h // OCHamcrest - HCAnyOf.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/
@ -15,8 +15,8 @@
NSArray *matchers; NSArray *matchers;
} }
+ (id)anyOf:(NSArray *)theMatchers; + (instancetype)anyOf:(NSArray *)theMatchers;
- (id)initWithMatchers:(NSArray *)theMatchers; - (instancetype)initWithMatchers:(NSArray *)theMatchers;
@end @end

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCAssertThat.h // OCHamcrest - HCAssertThat.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCBaseDescription.h // OCHamcrest - HCBaseDescription.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCBaseMatcher.h // OCHamcrest - HCBaseMatcher.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/

View File

@ -1,93 +0,0 @@
//
// OCHamcrest - HCBoxNumber.h
// Copyright 2012 hamcrest.org. See LICENSE.txt
//
// Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/
// Source: https://github.com/hamcrest/OCHamcrest
//
#ifdef __cplusplus
namespace hamcrest {
/**
Boxes a scalar value in an NSNumber, specialized per type.
@b Deprecated
@ingroup number_matchers
*/
template <typename T>
inline
NSNumber *boxNumber(T value) __attribute__((deprecated));
{ return nil; }
template <>
inline
NSNumber *boxNumber(BOOL value)
{ return [NSNumber numberWithBool:value]; }
template <>
inline
NSNumber *boxNumber(char value)
{ return [NSNumber numberWithChar:value]; }
template <>
inline
NSNumber *boxNumber(double value)
{ return [NSNumber numberWithDouble:value]; }
template <>
inline
NSNumber *boxNumber(float value)
{ return [NSNumber numberWithFloat:value]; }
template <>
inline
NSNumber *boxNumber(int value)
{ return [NSNumber numberWithInt:value]; }
template <>
inline
NSNumber *boxNumber(long value)
{ return [NSNumber numberWithLong:value]; }
template <>
inline
NSNumber *boxNumber(long long value)
{ return [NSNumber numberWithLongLong:value]; }
template <>
inline
NSNumber *boxNumber(short value)
{ return [NSNumber numberWithShort:value]; }
template <>
inline
NSNumber *boxNumber(unsigned char value)
{ return [NSNumber numberWithUnsignedChar:value]; }
template <>
inline
NSNumber *boxNumber(unsigned int value)
{ return [NSNumber numberWithUnsignedInt:value]; }
template <>
inline
NSNumber *boxNumber(unsigned long value)
{ return [NSNumber numberWithUnsignedLong:value]; }
template <>
inline
NSNumber *boxNumber(unsigned long long value)
{ return [NSNumber numberWithUnsignedLongLong:value]; }
template <>
inline
NSNumber *boxNumber(unsigned short value)
{ return [NSNumber numberWithUnsignedShort:value]; }
} // namespace hamcrest
#endif // __cplusplus

View File

@ -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 <OCHamcrestIOS/HCBaseMatcher.h>
@interface HCClassMatcher : HCBaseMatcher
{
Class theClass;
}
- (instancetype)initWithType:(Class)type;
@end

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCCollectMatchers.h // OCHamcrest - HCCollectMatchers.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCConformsToProtocol.h // OCHamcrest - HCConformsToProtocol.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Todd Farrell // Created by: Todd Farrell
// //
@ -13,14 +13,13 @@
Protocol *theProtocol; Protocol *theProtocol;
} }
+ (id)conformsToProtocol:(Protocol *)protocol; + (instancetype)conformsTo:(Protocol *)protocol;
- (id)initWithProtocol:(Protocol *)protocol; - (instancetype)initWithProtocol:(Protocol *)protocol;
@end @end
OBJC_EXPORT id<HCMatcher> HC_conformsTo(Protocol *aProtocol); OBJC_EXPORT id<HCMatcher> HC_conformsTo(Protocol *aProtocol);
OBJC_EXPORT id<HCMatcher> HC_conformsToProtocol(Protocol *aProtocol) __attribute__((deprecated));
/** /**
conformsTo(aProtocol) - conformsTo(aProtocol) -

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCDescribedAs.h // OCHamcrest - HCDescribedAs.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/
@ -17,13 +17,13 @@
NSArray *values; NSArray *values;
} }
+ (id)describedAs:(NSString *)description + (instancetype)describedAs:(NSString *)description
forMatcher:(id<HCMatcher>)aMatcher forMatcher:(id<HCMatcher>)aMatcher
overValues:(NSArray *)templateValues; overValues:(NSArray *)templateValues;
- (id)initWithDescription:(NSString *)description - (instancetype)initWithDescription:(NSString *)description
forMatcher:(id<HCMatcher>)aMatcher forMatcher:(id<HCMatcher>)aMatcher
overValues:(NSArray *)templateValues; overValues:(NSArray *)templateValues;
@end @end

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCDescription.h // OCHamcrest - HCDescription.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/
@ -17,7 +17,7 @@
@ingroup core @ingroup core
*/ */
@protocol HCDescription @protocol HCDescription <NSObject>
/** /**
Appends some plain text to the description. Appends some plain text to the description.

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCHasCount.h // OCHamcrest - HCHasCount.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/
@ -15,8 +15,8 @@
id<HCMatcher> countMatcher; id<HCMatcher> countMatcher;
} }
+ (id)hasCount:(id<HCMatcher>)matcher; + (instancetype)hasCount:(id<HCMatcher>)matcher;
- (id)initWithCount:(id<HCMatcher>)matcher; - (instancetype)initWithCount:(id<HCMatcher>)matcher;
@end @end

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCHasDescription.h // OCHamcrest - HCHasDescription.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/
@ -12,8 +12,8 @@
@interface HCHasDescription : HCInvocationMatcher @interface HCHasDescription : HCInvocationMatcher
+ (id)hasDescription:(id<HCMatcher>)descriptionMatcher; + (instancetype)hasDescription:(id<HCMatcher>)descriptionMatcher;
- (id)initWithDescription:(id<HCMatcher>)descriptionMatcher; - (instancetype)initWithDescription:(id<HCMatcher>)descriptionMatcher;
@end @end

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCHasProperty.h // OCHamcrest - HCHasProperty.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Justin Shacklette // Created by: Justin Shacklette
// //
@ -14,8 +14,8 @@
id<HCMatcher> valueMatcher; id<HCMatcher> valueMatcher;
} }
+ (id)hasProperty:(NSString *)property value:(id<HCMatcher>)aValueMatcher; + (instancetype)hasProperty:(NSString *)property value:(id<HCMatcher>)aValueMatcher;
- (id)initWithProperty:(NSString *)property value:(id<HCMatcher>)aValueMatcher; - (instancetype)initWithProperty:(NSString *)property value:(id<HCMatcher>)aValueMatcher;
@end @end

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCInvocationMatcher.h // OCHamcrest - HCInvocationMatcher.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/
@ -42,7 +42,7 @@
/** /**
Returns an HCInvocationMatcher object initialized with an invocation and a matcher. Returns an HCInvocationMatcher object initialized with an invocation and a matcher.
*/ */
- (id)initWithInvocation:(NSInvocation *)anInvocation matching:(id<HCMatcher>)aMatcher; - (instancetype)initWithInvocation:(NSInvocation *)anInvocation matching:(id<HCMatcher>)aMatcher;
/** /**
Invokes stored invocation on given item and returns the result. Invokes stored invocation on given item and returns the result.

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCIs.h // OCHamcrest - HCIs.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/
@ -15,8 +15,8 @@
id<HCMatcher> matcher; id<HCMatcher> matcher;
} }
+ (id)is:(id<HCMatcher>)aMatcher; + (instancetype)is:(id<HCMatcher>)aMatcher;
- (id)initWithMatcher:(id<HCMatcher>)aMatcher; - (instancetype)initWithMatcher:(id<HCMatcher>)aMatcher;
@end @end

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCIsAnything.h // OCHamcrest - HCIsAnything.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/
@ -15,11 +15,11 @@
NSString *description; NSString *description;
} }
+ (id)isAnything; + (instancetype)isAnything;
+ (id)isAnythingWithDescription:(NSString *)aDescription; + (instancetype)isAnythingWithDescription:(NSString *)aDescription;
- (id)init; - (instancetype)init;
- (id)initWithDescription:(NSString *)aDescription; - (instancetype)initWithDescription:(NSString *)aDescription;
@end @end

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCIsCloseTo.h // OCHamcrest - HCIsCloseTo.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/
@ -16,8 +16,8 @@
double delta; double delta;
} }
+ (id)isCloseTo:(double)aValue within:(double)aDelta; + (instancetype)isCloseTo:(double)aValue within:(double)aDelta;
- (id)initWithValue:(double)aValue delta:(double)aDelta; - (instancetype)initWithValue:(double)aValue delta:(double)aDelta;
@end @end

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCIsCollectionContaining.h // OCHamcrest - HCIsCollectionContaining.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/
@ -15,8 +15,8 @@
id<HCMatcher> elementMatcher; id<HCMatcher> elementMatcher;
} }
+ (id)isCollectionContaining:(id<HCMatcher>)anElementMatcher; + (instancetype)isCollectionContaining:(id<HCMatcher>)anElementMatcher;
- (id)initWithMatcher:(id<HCMatcher>)anElementMatcher; - (instancetype)initWithMatcher:(id<HCMatcher>)anElementMatcher;
@end @end

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCIsCollectionContainingInAnyOrder.h // OCHamcrest - HCIsCollectionContainingInAnyOrder.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/
@ -12,11 +12,11 @@
@interface HCIsCollectionContainingInAnyOrder : HCBaseMatcher @interface HCIsCollectionContainingInAnyOrder : HCBaseMatcher
{ {
NSMutableArray *matchers; NSArray *matchers;
} }
+ (id)isCollectionContainingInAnyOrder:(NSMutableArray *)itemMatchers; + (instancetype)isCollectionContainingInAnyOrder:(NSArray *)itemMatchers;
- (id)initWithMatchers:(NSMutableArray *)itemMatchers; - (instancetype)initWithMatchers:(NSArray *)itemMatchers;
@end @end

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCIsCollectionContainingInOrder.h // OCHamcrest - HCIsCollectionContainingInOrder.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/
@ -15,8 +15,8 @@
NSArray *matchers; NSArray *matchers;
} }
+ (id)isCollectionContainingInOrder:(NSArray *)itemMatchers; + (instancetype)isCollectionContainingInOrder:(NSArray *)itemMatchers;
- (id)initWithMatchers:(NSArray *)itemMatchers; - (instancetype)initWithMatchers:(NSArray *)itemMatchers;
@end @end

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCIsCollectionOnlyContaining.h // OCHamcrest - HCIsCollectionOnlyContaining.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/
@ -15,8 +15,8 @@
id<HCMatcher> matcher; id<HCMatcher> matcher;
} }
+ (id)isCollectionOnlyContaining:(id<HCMatcher>)aMatcher; + (instancetype)isCollectionOnlyContaining:(id<HCMatcher>)aMatcher;
- (id)initWithMatcher:(id<HCMatcher>)aMatcher; - (instancetype)initWithMatcher:(id<HCMatcher>)aMatcher;
@end @end

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCIsDictionaryContaining.h // OCHamcrest - HCIsDictionaryContaining.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/
@ -16,11 +16,11 @@
id<HCMatcher> valueMatcher; id<HCMatcher> valueMatcher;
} }
+ (id)isDictionaryContainingKey:(id<HCMatcher>)aKeyMatcher + (instancetype)isDictionaryContainingKey:(id<HCMatcher>)aKeyMatcher
value:(id<HCMatcher>)aValueMatcher; value:(id<HCMatcher>)aValueMatcher;
- (id)initWithKeyMatcher:(id<HCMatcher>)aKeyMatcher - (instancetype)initWithKeyMatcher:(id<HCMatcher>)aKeyMatcher
valueMatcher:(id<HCMatcher>)aValueMatcher; valueMatcher:(id<HCMatcher>)aValueMatcher;
@end @end

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCIsDictionaryContainingEntries.h // OCHamcrest - HCIsDictionaryContainingEntries.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/
@ -16,11 +16,11 @@
NSArray *valueMatchers; NSArray *valueMatchers;
} }
+ (id)isDictionaryContainingKeys:(NSArray *)theKeys + (instancetype)isDictionaryContainingKeys:(NSArray *)theKeys
valueMatchers:(NSArray *)theValueMatchers; valueMatchers:(NSArray *)theValueMatchers;
- (id)initWithKeys:(NSArray *)theKeys - (instancetype)initWithKeys:(NSArray *)theKeys
valueMatchers:(NSArray *)theValueMatchers; valueMatchers:(NSArray *)theValueMatchers;
@end @end

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCIsDictionaryContainingKey.h // OCHamcrest - HCIsDictionaryContainingKey.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/
@ -15,8 +15,8 @@
id<HCMatcher> keyMatcher; id<HCMatcher> keyMatcher;
} }
+ (id)isDictionaryContainingKey:(id<HCMatcher>)theKeyMatcher; + (instancetype)isDictionaryContainingKey:(id<HCMatcher>)theKeyMatcher;
- (id)initWithKeyMatcher:(id<HCMatcher>)theKeyMatcher; - (instancetype)initWithKeyMatcher:(id<HCMatcher>)theKeyMatcher;
@end @end

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCIsDictionaryContainingValue.h // OCHamcrest - HCIsDictionaryContainingValue.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/
@ -15,8 +15,8 @@
id<HCMatcher> valueMatcher; id<HCMatcher> valueMatcher;
} }
+ (id)isDictionaryContainingValue:(id<HCMatcher>)theValueMatcher; + (instancetype)isDictionaryContainingValue:(id<HCMatcher>)theValueMatcher;
- (id)initWithValueMatcher:(id<HCMatcher>)theValueMatcher; - (instancetype)initWithValueMatcher:(id<HCMatcher>)theValueMatcher;
@end @end

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCIsEmptyCollection.h // OCHamcrest - HCIsEmptyCollection.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/
@ -12,25 +12,26 @@
@interface HCIsEmptyCollection : HCHasCount @interface HCIsEmptyCollection : HCHasCount
+ (id)isEmptyCollection; + (instancetype)isEmptyCollection;
- (id)init; - (instancetype)init;
@end @end
OBJC_EXPORT id<HCMatcher> HC_empty(void); OBJC_EXPORT __attribute__((deprecated)) id<HCMatcher> HC_empty(void);
OBJC_EXPORT id<HCMatcher> HC_isEmpty(void);
/** /**
Matches empty collection. Matches empty collection.
This matcher invokes @c -count on the evaluated object to determine if the number of elements it This matcher invokes @c -count on the evaluated object to determine if the number of elements it
contains is zero. contains is zero.
(In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym
@c HC_empty instead.) @c HC_isEmpty instead.)
@ingroup collection_matchers @ingroup collection_matchers
*/ */
#ifdef HC_SHORTHAND #ifdef HC_SHORTHAND
#define empty() HC_empty() #define isEmpty() HC_isEmpty()
#endif #endif

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCIsEqual.h // OCHamcrest - HCIsEqual.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/
@ -15,8 +15,8 @@
id object; id object;
} }
+ (id)isEqualTo:(id)anObject; + (instancetype)isEqualTo:(id)anObject;
- (id)initEqualTo:(id)anObject; - (instancetype)initEqualTo:(id)anObject;
@end @end

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCIsEqualIgnoringCase.h // OCHamcrest - HCIsEqualIgnoringCase.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/
@ -15,8 +15,8 @@
NSString *string; NSString *string;
} }
+ (id)isEqualIgnoringCase:(NSString *)aString; + (instancetype)isEqualIgnoringCase:(NSString *)aString;
- (id)initWithString:(NSString *)aString; - (instancetype)initWithString:(NSString *)aString;
@end @end

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCIsEqualIgnoringWhiteSpace.h // OCHamcrest - HCIsEqualIgnoringWhiteSpace.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/
@ -16,8 +16,8 @@
NSString *strippedString; NSString *strippedString;
} }
+ (id)isEqualIgnoringWhiteSpace:(NSString *)aString; + (instancetype)isEqualIgnoringWhiteSpace:(NSString *)aString;
- (id)initWithString:(NSString *)aString; - (instancetype)initWithString:(NSString *)aString;
@end @end

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCIsEqualToNumber.h // OCHamcrest - HCIsEqualToNumber.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/
@ -30,6 +30,12 @@ OBJC_EXPORT id<HCMatcher> HC_equalToBool(BOOL value);
#define equalToBool HC_equalToBool #define equalToBool HC_equalToBool
#endif #endif
@interface HCIsEqualToBool : HCBaseMatcher
- (instancetype)initWithValue:(BOOL)value;
@end
OBJC_EXPORT id<HCMatcher> HC_equalToChar(char value); OBJC_EXPORT id<HCMatcher> HC_equalToChar(char value);

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCIsIn.h // OCHamcrest - HCIsIn.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/
@ -15,8 +15,8 @@
id collection; id collection;
} }
+ (id)isInCollection:(id)aCollection; + (instancetype)isInCollection:(id)aCollection;
- (id)initWithCollection:(id)aCollection; - (instancetype)initWithCollection:(id)aCollection;
@end @end

View File

@ -1,22 +1,18 @@
// //
// OCHamcrest - HCIsInstanceOf.h // OCHamcrest - HCIsInstanceOf.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/
// Source: https://github.com/hamcrest/OCHamcrest // Source: https://github.com/hamcrest/OCHamcrest
// //
#import <OCHamcrestIOS/HCBaseMatcher.h> #import <OCHamcrestIOS/HCClassMatcher.h>
@interface HCIsInstanceOf : HCBaseMatcher @interface HCIsInstanceOf : HCClassMatcher
{
Class theClass;
}
+ (id)isInstanceOf:(Class)type; + (id)isInstanceOf:(Class)type;
- (id)initWithType:(Class)type;
@end @end

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCIsNil.h // OCHamcrest - HCIsNil.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCIsNot.h // OCHamcrest - HCIsNot.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/
@ -15,8 +15,8 @@
id<HCMatcher> matcher; id<HCMatcher> matcher;
} }
+ (id)isNot:(id<HCMatcher>)aMatcher; + (instancetype)isNot:(id<HCMatcher>)aMatcher;
- (id)initNot:(id<HCMatcher>)aMatcher; - (instancetype)initNot:(id<HCMatcher>)aMatcher;
@end @end

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCIsSame.h // OCHamcrest - HCIsSame.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/
@ -15,8 +15,8 @@
id object; id object;
} }
+ (id)isSameAs:(id)anObject; + (instancetype)isSameAs:(id)anObject;
- (id)initSameAs:(id)anObject; - (instancetype)initSameAs:(id)anObject;
@end @end

View File

@ -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 <OCHamcrestIOS/HCClassMatcher.h>
@interface HCIsTypeOf : HCClassMatcher
+ (id)isTypeOf:(Class)type;
@end
OBJC_EXPORT id<HCMatcher> 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

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCMatcher.h // OCHamcrest - HCMatcher.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCNumberAssert.h // OCHamcrest - HCNumberAssert.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCOrderingComparison.h // OCHamcrest - HCOrderingComparison.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/
@ -18,15 +18,15 @@
NSString *comparisonDescription; NSString *comparisonDescription;
} }
+ (id)compare:(id)expectedValue + (instancetype)compare:(id)expectedValue
minCompare:(NSComparisonResult)min minCompare:(NSComparisonResult)min
maxCompare:(NSComparisonResult)max maxCompare:(NSComparisonResult)max
comparisonDescription:(NSString *)comparisonDescription; comparisonDescription:(NSString *)comparisonDescription;
- (id)initComparing:(id)expectedValue - (instancetype)initComparing:(id)expectedValue
minCompare:(NSComparisonResult)min minCompare:(NSComparisonResult)min
maxCompare:(NSComparisonResult)max maxCompare:(NSComparisonResult)max
comparisonDescription:(NSString *)comparisonDescription; comparisonDescription:(NSString *)comparisonDescription;
@end @end

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCRequireNonNilObject.h // OCHamcrest - HCRequireNonNilObject.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/

View File

@ -1,21 +0,0 @@
//
// OCHamcrest - HCRequireNonNilString.h
// Copyright 2012 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 <Foundation/Foundation.h>
#import <objc/objc-api.h>
/**
Throws an NSException if @a string is @c nil.
@b Deprecated: Use @ref HCRequireNonNilObject instead.
@ingroup helpers
*/
OBJC_EXPORT void HCRequireNonNilString(NSString *string) __attribute__((deprecated));

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCSelfDescribing.h // OCHamcrest - HCSelfDescribing.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/
@ -9,7 +9,7 @@
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
@protocol HCDescription; #import "HCDescription.h"
/** /**

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCStringContains.h // OCHamcrest - HCStringContains.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCStringContainsInOrder.h // OCHamcrest - HCStringContainsInOrder.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/
@ -15,8 +15,8 @@
NSArray *substrings; NSArray *substrings;
} }
+ (id)containsInOrder:(NSArray *)substringList; + (instancetype)containsInOrder:(NSArray *)substringList;
- (id)initWithSubstrings:(NSArray *)substringList; - (instancetype)initWithSubstrings:(NSArray *)substringList;
@end @end

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCStringDescription.h // OCHamcrest - HCStringDescription.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/
@ -33,11 +33,11 @@
/** /**
Returns an empty description. Returns an empty description.
*/ */
+ (HCStringDescription *)stringDescription; + (instancetype)stringDescription;
/** /**
Returns an initialized HCStringDescription object that is empty. Returns an initialized HCStringDescription object that is empty.
*/ */
- (id)init; - (instancetype)init;
@end @end

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCStringEndsWith.h // OCHamcrest - HCStringEndsWith.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCStringStartsWith.h // OCHamcrest - HCStringStartsWith.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCSubstringMatcher.h // OCHamcrest - HCSubstringMatcher.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/
@ -15,6 +15,6 @@
NSString *substring; NSString *substring;
} }
- (id)initWithSubstring:(NSString *)aString; - (instancetype)initWithSubstring:(NSString *)aString;
@end @end

View File

@ -0,0 +1,21 @@
#import <Foundation/Foundation.h>
/**
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

View File

@ -0,0 +1,20 @@
#import <Foundation/Foundation.h>
@class HCTestFailure;
/**
Chain-of-responsibility for handling test failures.
@ingroup integration
*/
@protocol HCTestFailureHandler <NSObject>
@property (nonatomic, strong) id <HCTestFailureHandler> successor;
/**
Handle test failure at specific location, or pass to successor.
*/
- (void)handleFailure:(HCTestFailure *)failure;
@end

View File

@ -0,0 +1,12 @@
#import <Foundation/Foundation.h>
#import <objc/objc-api.h>
@protocol HCTestFailureHandler;
/**
Returns chain of test failure handlers.
@ingroup integration
*/
OBJC_EXPORT id <HCTestFailureHandler> HC_testFailureHandlerChain(void);

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - HCWrapInMatcher.h // OCHamcrest - HCWrapInMatcher.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/

View File

@ -1,6 +1,6 @@
// //
// OCHamcrest - OCHamcrest.h // OCHamcrest - OCHamcrest.h
// Copyright 2012 hamcrest.org. See LICENSE.txt // Copyright 2013 hamcrest.org. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Docs: http://hamcrest.github.com/OCHamcrest/ // Docs: http://hamcrest.github.com/OCHamcrest/
@ -27,6 +27,7 @@
#import <OCHamcrestIOS/HCIsInstanceOf.h> #import <OCHamcrestIOS/HCIsInstanceOf.h>
#import <OCHamcrestIOS/HCIsNil.h> #import <OCHamcrestIOS/HCIsNil.h>
#import <OCHamcrestIOS/HCIsSame.h> #import <OCHamcrestIOS/HCIsSame.h>
#import <OCHamcrestIOS/HCIsTypeOf.h>
/** /**
@defgroup collection_matchers Collection Matchers @defgroup collection_matchers Collection Matchers
@ -106,6 +107,9 @@
@defgroup integration Unit Test Integration @defgroup integration Unit Test Integration
*/ */
#import <OCHamcrestIOS/HCAssertThat.h> #import <OCHamcrestIOS/HCAssertThat.h>
#import <OCHamcrestIOS/HCTestFailure.h>
#import <OCHamcrestIOS/HCTestFailureHandler.h>
#import <OCHamcrestIOS/HCTestFailureHandlerChain.h>
/** /**
@defgroup integration_numeric Unit Tests of Primitive Numbers @defgroup integration_numeric Unit Tests of Primitive Numbers

View File

@ -3,7 +3,7 @@
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>BuildMachineOSBuild</key> <key>BuildMachineOSBuild</key>
<string>12C60</string> <string>13A584</string>
<key>CFBundleDevelopmentRegion</key> <key>CFBundleDevelopmentRegion</key>
<string>English</string> <string>English</string>
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
@ -17,26 +17,26 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>FMWK</string> <string>FMWK</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>1.9</string> <string>3.0.0</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>1.9</string> <string>3.0.0</string>
<key>DTCompiler</key> <key>DTCompiler</key>
<string></string> <string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key> <key>DTPlatformBuild</key>
<string>4G2008a</string> <string>5A1413</string>
<key>DTPlatformVersion</key> <key>DTPlatformVersion</key>
<string>GM</string> <string>GM</string>
<key>DTSDKBuild</key> <key>DTSDKBuild</key>
<string>12C37</string> <string>12D75</string>
<key>DTSDKName</key> <key>DTSDKName</key>
<string>macosx10.8</string> <string>macosx10.8</string>
<key>DTXcode</key> <key>DTXcode</key>
<string>0452</string> <string>0500</string>
<key>DTXcodeBuild</key> <key>DTXcodeBuild</key>
<string>4G2008a</string> <string>5A1413</string>
<key>NSHumanReadableCopyright</key> <key>NSHumanReadableCopyright</key>
<string>Copyright © 2012 hamcrest.org</string> <string>Copyright © 2013 hamcrest.org</string>
</dict> </dict>
</plist> </plist>

View File

@ -1,6 +1,6 @@
// //
// OCMockito - MKTBaseMockObject.h // OCMockito - MKTBaseMockObject.h
// Copyright 2012 Jonathan M. Reid. See LICENSE.txt // Copyright 2013 Jonathan M. Reid. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Source: https://github.com/jonreid/OCMockito // Source: https://github.com/jonreid/OCMockito

View File

@ -1,6 +1,6 @@
// //
// OCMockito - MKTClassObjectMock.h // OCMockito - MKTClassObjectMock.h
// Copyright 2012 Jonathan M. Reid. See LICENSE.txt // Copyright 2013 Jonathan M. Reid. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Source: https://github.com/jonreid/OCMockito // Source: https://github.com/jonreid/OCMockito

View File

@ -1,6 +1,6 @@
// //
// OCMockito - MKTObjectAndProtocolMock.h // OCMockito - MKTObjectAndProtocolMock.h
// Copyright 2012 Jonathan M. Reid. See LICENSE.txt // Copyright 2013 Jonathan M. Reid. See LICENSE.txt
// //
// Created by: Kevin Lundberg // Created by: Kevin Lundberg
// Source: https://github.com/jonreid/OCMockito // Source: https://github.com/jonreid/OCMockito

View File

@ -1,6 +1,6 @@
// //
// OCMockito - MKTObjectMock.h // OCMockito - MKTObjectMock.h
// Copyright 2012 Jonathan M. Reid. See LICENSE.txt // Copyright 2013 Jonathan M. Reid. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Source: https://github.com/jonreid/OCMockito // Source: https://github.com/jonreid/OCMockito

View File

@ -1,6 +1,6 @@
// //
// OCMockito - MKTOngoingStubbing.h // OCMockito - MKTOngoingStubbing.h
// Copyright 2012 Jonathan M. Reid. See LICENSE.txt // Copyright 2013 Jonathan M. Reid. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Source: https://github.com/jonreid/OCMockito // Source: https://github.com/jonreid/OCMockito
@ -17,7 +17,7 @@
*/ */
@interface MKTOngoingStubbing : NSObject <MKTPrimitiveArgumentMatching> @interface MKTOngoingStubbing : NSObject <MKTPrimitiveArgumentMatching>
- (id)initWithInvocationContainer:(MKTInvocationContainer *)invocationContainer; - (instancetype)initWithInvocationContainer:(MKTInvocationContainer *)invocationContainer;
/// Stubs given object as return value. /// Stubs given object as return value.
- (MKTOngoingStubbing *)willReturn:(id)object; - (MKTOngoingStubbing *)willReturn:(id)object;

View File

@ -1,6 +1,6 @@
// //
// OCMockito - MKTPrimitiveArgumentMatching.h // OCMockito - MKTPrimitiveArgumentMatching.h
// Copyright 2012 Jonathan M. Reid. See LICENSE.txt // Copyright 2013 Jonathan M. Reid. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Source: https://github.com/jonreid/OCMockito // Source: https://github.com/jonreid/OCMockito

View File

@ -1,6 +1,6 @@
// //
// OCMockito - MKTProtocolMock.h // OCMockito - MKTProtocolMock.h
// Copyright 2012 Jonathan M. Reid. See LICENSE.txt // Copyright 2013 Jonathan M. Reid. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Source: https://github.com/jonreid/OCMockito // Source: https://github.com/jonreid/OCMockito
@ -13,6 +13,9 @@
Mock object implementing a given protocol. Mock object implementing a given protocol.
*/ */
@interface MKTProtocolMock : MKTBaseMockObject @interface MKTProtocolMock : MKTBaseMockObject
{
Protocol *_mockedProtocol;
}
+ (id)mockForProtocol:(Protocol *)aProtocol; + (id)mockForProtocol:(Protocol *)aProtocol;
- (id)initWithProtocol:(Protocol *)aProtocol; - (id)initWithProtocol:(Protocol *)aProtocol;

View File

@ -1,6 +1,6 @@
// //
// OCMockito - OCMockito.h // OCMockito - OCMockito.h
// Copyright 2012 Jonathan M. Reid. See LICENSE.txt // Copyright 2013 Jonathan M. Reid. See LICENSE.txt
// //
// Created by: Jon Reid, http://qualitycoding.org/ // Created by: Jon Reid, http://qualitycoding.org/
// Source: https://github.com/jonreid/OCMockito // Source: https://github.com/jonreid/OCMockito
@ -67,9 +67,8 @@
#define mockObjectAndProtocol(aClass, aProtocol) MKTMockObjectAndProtocol(aClass, aProtocol) #define mockObjectAndProtocol(aClass, aProtocol) MKTMockObjectAndProtocol(aClass, aProtocol)
#endif #endif
OBJC_EXPORT MKTOngoingStubbing *MKTGivenWithLocation(id testCase, const char *fileName, int lineNumber, ...); OBJC_EXPORT MKTOngoingStubbing *MKTGivenWithLocation(id testCase, const char *fileName, int lineNumber, ...);
#define MKTGiven(methodCall) MKTGivenWithLocation(self, __FILE__, __LINE__, methodCall) #define MKTGiven(methodCall) MKTGivenWithLocation(self, __FILE__, __LINE__, methodCall)
/** /**
@ -91,7 +90,6 @@ OBJC_EXPORT MKTOngoingStubbing *MKTGivenWithLocation(id testCase, const char *fi
OBJC_EXPORT id MKTVerifyWithLocation(id mock, id testCase, const char *fileName, int lineNumber); OBJC_EXPORT id MKTVerifyWithLocation(id mock, id testCase, const char *fileName, int lineNumber);
#define MKTVerify(mock) MKTVerifyWithLocation(mock, self, __FILE__, __LINE__) #define MKTVerify(mock) MKTVerifyWithLocation(mock, self, __FILE__, __LINE__)
/** /**
@ -122,7 +120,6 @@ verifyCount(mockObject, times(1))
OBJC_EXPORT id MKTVerifyCountWithLocation(id mock, id mode, id testCase, const char *fileName, int lineNumber); 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__) #define MKTVerifyCount(mock, mode) MKTVerifyCountWithLocation(mock, mode, self, __FILE__, __LINE__)
/** /**

View File

@ -3,7 +3,7 @@
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>BuildMachineOSBuild</key> <key>BuildMachineOSBuild</key>
<string>12C60</string> <string>13A584</string>
<key>CFBundleDevelopmentRegion</key> <key>CFBundleDevelopmentRegion</key>
<string>English</string> <string>English</string>
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
@ -17,26 +17,26 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>FMWK</string> <string>FMWK</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>0.23</string> <string>1.0.0</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>1</string> <string>1.0.0</string>
<key>DTCompiler</key> <key>DTCompiler</key>
<string></string> <string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key> <key>DTPlatformBuild</key>
<string>4G2008a</string> <string>5A1413</string>
<key>DTPlatformVersion</key> <key>DTPlatformVersion</key>
<string>GM</string> <string>GM</string>
<key>DTSDKBuild</key> <key>DTSDKBuild</key>
<string>12C37</string> <string>12D75</string>
<key>DTSDKName</key> <key>DTSDKName</key>
<string>macosx10.8</string> <string>macosx10.8</string>
<key>DTXcode</key> <key>DTXcode</key>
<string>0452</string> <string>0500</string>
<key>DTXcodeBuild</key> <key>DTXcodeBuild</key>
<string>4G2008a</string> <string>5A1413</string>
<key>NSHumanReadableCopyright</key> <key>NSHumanReadableCopyright</key>
<string>Copyright © 2012 Jonathan M. Reid</string> <string>Copyright © 2013 Jonathan M. Reid</string>
</dict> </dict>
</plist> </plist>