-
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 #395 from tjarratt/raise-errors-when-dsl-is-misused
Raise exceptions when dsl is misused
- Loading branch information
Showing
24 changed files
with
607 additions
and
120 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,11 @@ | ||
#import "CDRRunState.h" | ||
|
||
static CedarRunState CDRCurrentRunState = CedarRunStateNotYetStarted; | ||
|
||
CedarRunState CDRCurrentState() { | ||
return CDRCurrentRunState; | ||
} | ||
|
||
void CDRSetCurrentRunState(CedarRunState runState) { | ||
CDRCurrentRunState = runState; | ||
} |
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,6 @@ | ||
#import <Foundation/Foundation.h> | ||
#import "CDRStateTracking.h" | ||
|
||
@interface CDRStateTracker : NSObject <CDRStateTracking> | ||
|
||
@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,18 @@ | ||
#import "CDRStateTracker.h" | ||
#import "CDRRunState.h" | ||
|
||
@implementation CDRStateTracker | ||
|
||
- (void)didStartPreparingTests { | ||
CDRSetCurrentRunState(CedarRunStatePreparingTests); | ||
} | ||
|
||
- (void)didStartRunningTests { | ||
CDRSetCurrentRunState(CedarRunStateRunningTests); | ||
} | ||
|
||
- (void)didFinishRunningTests { | ||
CDRSetCurrentRunState(CedarRunStateFinished); | ||
} | ||
|
||
@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,9 @@ | ||
#import <Foundation/Foundation.h> | ||
|
||
@protocol CDRStateTracking <NSObject> | ||
|
||
- (void)didStartPreparingTests; | ||
- (void)didStartRunningTests; | ||
- (void)didFinishRunningTests; | ||
|
||
@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
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,11 @@ | ||
#import <Foundation/Foundation.h> | ||
|
||
typedef NS_ENUM(NSInteger, CedarRunState) { | ||
CedarRunStateNotYetStarted = 0, | ||
CedarRunStatePreparingTests = 1, | ||
CedarRunStateRunningTests = 2, | ||
CedarRunStateFinished = 3 | ||
}; | ||
|
||
OBJC_EXPORT CedarRunState CDRCurrentState(); | ||
OBJC_EXPORT void CDRSetCurrentRunState(CedarRunState); |
Oops, something went wrong.