Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented unit testing target and basic class parsing tests.
- Loading branch information
Showing
138 changed files
with
6,299 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// | ||
// AppledocTests_prefix.pch | ||
// appledoc | ||
// | ||
// Created by Tomaz Kragelj on 22.7.10. | ||
// Copyright (C) 2010, Gentle Bytes. All rights reserved. | ||
// | ||
|
||
#ifdef __OBJC__ | ||
#import <Foundation/Foundation.h> | ||
#import "NSObject+GBObject.h" | ||
#import "NSException+GBException.h" | ||
#import "NSFileManager+GBFileManager.h" | ||
#import "GBLog.h" | ||
|
||
#define HC_SHORTHAND | ||
#import <OCHamcrest/OCHamcrest.h> | ||
#import <OCMock/OCMock.h> | ||
#import <SenTestingKit/SenTestingKit.h> | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Versions/Current/Headers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Versions/Current/OCHamcrest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Versions/Current/Resources |
52 changes: 52 additions & 0 deletions
52
Libraries/OCHamcrest.framework/Versions/A/Headers/HCAllOf.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// | ||
// OCHamcrest - HCAllOf.h | ||
// Copyright 2009 www.hamcrest.org. See LICENSE.txt | ||
// | ||
// Created by: Jon Reid | ||
// | ||
|
||
// Inherited | ||
#import <OCHamcrest/HCBaseMatcher.h> | ||
|
||
|
||
/** | ||
Calculates the logical conjunction of multiple matchers. | ||
Evaluation is shortcut, so subsequent matchers are not called if an earlier matcher returns | ||
@c NO. | ||
*/ | ||
@interface HCAllOf : HCBaseMatcher | ||
{ | ||
NSArray* matchers; | ||
} | ||
|
||
+ (HCAllOf*) allOf:(NSArray*)theMatchers; | ||
- (id) initWithMatchers:(NSArray*)theMatchers; | ||
|
||
@end | ||
|
||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/** | ||
Evaluates to @c YES only if @b all of the passed in matchers evaluate to @c YES. | ||
@param matcher Comma-separated list of matchers ending with @c nil. | ||
*/ | ||
id<HCMatcher> HC_allOf(id<HCMatcher> matcher, ...); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
|
||
#ifdef HC_SHORTHAND | ||
|
||
/** | ||
Shorthand for HC_allOf, available if HC_SHORTHAND is defined. | ||
*/ | ||
#define allOf HC_allOf | ||
|
||
#endif |
52 changes: 52 additions & 0 deletions
52
Libraries/OCHamcrest.framework/Versions/A/Headers/HCAnyOf.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// | ||
// OCHamcrest - HCAnyOf.h | ||
// Copyright 2009 www.hamcrest.org. See LICENSE.txt | ||
// | ||
// Created by: Jon Reid | ||
// | ||
|
||
// Inherited | ||
#import <OCHamcrest/HCBaseMatcher.h> | ||
|
||
|
||
/** | ||
Calculates the logical disjunction of multiple matchers. | ||
Evaluation is shortcut, so the subsequent matchers are not called if an earlier matcher returns | ||
@c YES. | ||
*/ | ||
@interface HCAnyOf : HCBaseMatcher | ||
{ | ||
NSArray* matchers; | ||
} | ||
|
||
+ (HCAnyOf*) anyOf:(NSArray*)theMatchers; | ||
- (id) initWithMatchers:(NSArray*)theMatchers; | ||
|
||
@end | ||
|
||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/** | ||
Evaluates to @c YES if @b any of the passed in matchers evaluate to @c YES. | ||
@param matcher Comma-separated list of matchers ending with @c nil. | ||
*/ | ||
id<HCMatcher> HC_anyOf(id<HCMatcher> matcher, ...); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
|
||
#ifdef HC_SHORTHAND | ||
|
||
/** | ||
Shorthand for HC_anyOf, available if HC_SHORTHAND is defined. | ||
*/ | ||
#define anyOf HC_anyOf | ||
|
||
#endif |
30 changes: 30 additions & 0 deletions
30
Libraries/OCHamcrest.framework/Versions/A/Headers/HCBaseDescription.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// | ||
// OCHamcrest - HCBaseDescription.h | ||
// Copyright 2009 www.hamcrest.org. See LICENSE.txt | ||
// | ||
// Created by: Jon Reid | ||
// | ||
|
||
// Inherited | ||
#import <Foundation/Foundation.h> | ||
#import <OCHamcrest/HCDescription.h> | ||
|
||
|
||
/** | ||
Base class for all HCDescription implementations. | ||
*/ | ||
@interface HCBaseDescription : NSObject<HCDescription> | ||
@end | ||
|
||
|
||
/** | ||
Methods that must be provided by subclasses of HCBaseDescription. | ||
*/ | ||
@interface HCBaseDescription (SubclassMustImplement) | ||
|
||
/** | ||
Append the string @a str to the description. | ||
*/ | ||
- (void) append:(NSString*)str; | ||
|
||
@end |
21 changes: 21 additions & 0 deletions
21
Libraries/OCHamcrest.framework/Versions/A/Headers/HCBaseMatcher.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// | ||
// OCHamcrest - HCBaseMatcher.h | ||
// Copyright 2009 www.hamcrest.org. See LICENSE.txt | ||
// | ||
// Created by: Jon Reid | ||
// | ||
|
||
// Inherited | ||
#import <Foundation/Foundation.h> | ||
#import <OCHamcrest/HCMatcher.h> | ||
|
||
|
||
/** | ||
Base class for all Matcher implementations. | ||
Most implementations can just implement matches: and let matches:describingMismatchTo: call | ||
it. But if it makes more sense to generate the mismatch description during the matching, | ||
override matches:describingMismatchTo: and have matches: call it with a nil description. | ||
*/ | ||
@interface HCBaseMatcher : NSObject<HCMatcher> | ||
@end |
87 changes: 87 additions & 0 deletions
87
Libraries/OCHamcrest.framework/Versions/A/Headers/HCBoxNumber.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
// | ||
// OCHamcrest - HCBoxNumber.h | ||
// Copyright 2009 www.hamcrest.org. See LICENSE.txt | ||
// | ||
// Created by: Jon Reid | ||
// | ||
|
||
#ifdef __cplusplus | ||
|
||
namespace hamcrest { | ||
|
||
/** | ||
Boxes scalar value in NSNumber, specialized per type. | ||
*/ | ||
template <typename T> | ||
inline | ||
NSNumber* boxNumber(T value) | ||
{ return nil; } | ||
|
||
template <> | ||
inline | ||
NSNumber* boxNumber(BOOL value) | ||
{ return [NSNumber numberWithBool:value]; } | ||
|
||
template <> | ||
inline | ||
NSNumber* boxNumber(char value) | ||
{ return [NSNumber numberWithChar:value]; } | ||
|
||
template <> | ||
inline | ||
NSNumber* boxNumber(double value) | ||
{ return [NSNumber numberWithDouble:value]; } | ||
|
||
template <> | ||
inline | ||
NSNumber* boxNumber(float value) | ||
{ return [NSNumber numberWithFloat:value]; } | ||
|
||
template <> | ||
inline | ||
NSNumber* boxNumber(int value) | ||
{ return [NSNumber numberWithInt:value]; } | ||
|
||
template <> | ||
inline | ||
NSNumber* boxNumber(long value) | ||
{ return [NSNumber numberWithLong:value]; } | ||
|
||
template <> | ||
inline | ||
NSNumber* boxNumber(long long value) | ||
{ return [NSNumber numberWithLongLong:value]; } | ||
|
||
template <> | ||
inline | ||
NSNumber* boxNumber(short value) | ||
{ return [NSNumber numberWithShort:value]; } | ||
|
||
template <> | ||
inline | ||
NSNumber* boxNumber(unsigned char value) | ||
{ return [NSNumber numberWithUnsignedChar:value]; } | ||
|
||
template <> | ||
inline | ||
NSNumber* boxNumber(unsigned int value) | ||
{ return [NSNumber numberWithUnsignedInt:value]; } | ||
|
||
template <> | ||
inline | ||
NSNumber* boxNumber(unsigned long value) | ||
{ return [NSNumber numberWithUnsignedLong:value]; } | ||
|
||
template <> | ||
inline | ||
NSNumber* boxNumber(unsigned long long value) | ||
{ return [NSNumber numberWithUnsignedLongLong:value]; } | ||
|
||
template <> | ||
inline | ||
NSNumber* boxNumber(unsigned short value) | ||
{ return [NSNumber numberWithUnsignedShort:value]; } | ||
|
||
} // namespace hamcrest | ||
|
||
#endif // __cplusplus |
56 changes: 56 additions & 0 deletions
56
Libraries/OCHamcrest.framework/Versions/A/Headers/HCDescribedAs.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
// | ||
// OCHamcrest - HCDescribedAs.h | ||
// Copyright 2009 www.hamcrest.org. See LICENSE.txt | ||
// | ||
// Created by: Jon Reid | ||
// | ||
|
||
// Inherited | ||
#import <OCHamcrest/HCBaseMatcher.h> | ||
|
||
|
||
/** | ||
Provides a custom description to another matcher. | ||
*/ | ||
@interface HCDescribedAs : HCBaseMatcher | ||
{ | ||
NSString* descriptionTemplate; | ||
id<HCMatcher> matcher; | ||
NSArray* values; | ||
} | ||
|
||
+ (HCDescribedAs*) describedAs:(NSString*)description | ||
forMatcher:(id<HCMatcher>)aMatcher | ||
overValues:(NSArray*)templateValues; | ||
- (id) initWithDescription:(NSString*)description | ||
forMatcher:(id<HCMatcher>)aMatcher | ||
overValues:(NSArray*)templateValues; | ||
|
||
@end | ||
|
||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/** | ||
Wraps an existing matcher and overrides the description when it fails. | ||
Optional values following the matcher are substituted for \%0, \%1, etc. | ||
The last argument must be nil. | ||
*/ | ||
id<HCMatcher> HC_describedAs(NSString* description, id<HCMatcher> matcher, ...); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
|
||
#ifdef HC_SHORTHAND | ||
|
||
/** | ||
Shorthand for HC_describedAs, available if HC_SHORTHAND is defined. | ||
*/ | ||
#define describedAs HC_describedAs | ||
|
||
#endif |
Oops, something went wrong.