-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #371 from briancroom/print_pending_tests
Pending tests should be printed when running under XCTest
- Loading branch information
Showing
8 changed files
with
153 additions
and
48 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
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
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,17 @@ | ||
#import <Foundation/Foundation.h> | ||
#import "Cedar.h" | ||
#import "CDRNullabilityCompat.h" | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface TestReporter : NSObject <CDRExampleReporter> | ||
|
||
@property (nonatomic, readonly) NSArray *startedExamples; | ||
@property (nonatomic, readonly) NSArray *finishedExamples; | ||
|
||
@property (nonatomic, readonly) NSArray *startedExampleGroups; | ||
@property (nonatomic, readonly) NSArray *finishedExampleGroups; | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
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,47 @@ | ||
#import "TestReporter.h" | ||
|
||
#if !__has_feature(objc_arc) | ||
#error This class must be compiled with ARC. | ||
#endif | ||
|
||
@implementation TestReporter { | ||
NSMutableArray *_startedExamples; | ||
NSMutableArray *_finishedExamples; | ||
NSMutableArray *_startedExampleGroups; | ||
NSMutableArray *_finishedExampleGroups; | ||
} | ||
|
||
- (instancetype)init { | ||
if (self = [super init]) { | ||
_startedExamples = [NSMutableArray array]; | ||
_finishedExamples = [NSMutableArray array]; | ||
_startedExampleGroups = [NSMutableArray array]; | ||
_finishedExampleGroups = [NSMutableArray array]; | ||
} | ||
return self; | ||
} | ||
|
||
- (void)runWillStartWithGroups:(NSArray *)groups andRandomSeed:(unsigned int)seed {} | ||
- (void)runDidComplete {} | ||
- (int)result { | ||
return 0; | ||
} | ||
|
||
- (void)runWillStartExample:(CDRExample *)example { | ||
[_startedExamples addObject:example]; | ||
} | ||
- (void)runDidFinishExample:(CDRExample *)example { | ||
[_finishedExamples addObject:example]; | ||
} | ||
|
||
- (void)runWillStartExampleGroup:(CDRExampleGroup *)exampleGroup { | ||
[_startedExampleGroups addObject:exampleGroup]; | ||
} | ||
- (void)runDidFinishExampleGroup:(CDRExampleGroup *)exampleGroup { | ||
[_finishedExampleGroups addObject:exampleGroup]; | ||
} | ||
|
||
- (void)runWillStartSpec:(CDRSpec *)spec {} | ||
- (void)runDidFinishSpec:(CDRSpec *)spec {} | ||
|
||
@end |
Oops, something went wrong.