Return bool from DeepState_Catch... functions
This commit is contained in:
@@ -358,11 +358,11 @@ extern void DeepState_Begin(struct DeepState_TestInfo *info);
|
||||
/* Return the first test case to run. */
|
||||
extern struct DeepState_TestInfo *DeepState_FirstTest(void);
|
||||
|
||||
/* Returns 1 if a failure was caught, otherwise 0. */
|
||||
extern int DeepState_CatchFail(void);
|
||||
/* Returns `true` if a failure was caught for the current test case. */
|
||||
extern bool DeepState_CatchFail(void);
|
||||
|
||||
/* Returns 1 if this test case was abandoned. */
|
||||
extern int DeepState_CatchAbandoned(void);
|
||||
/* Returns `true` if the current test case was abandoned. */
|
||||
extern bool DeepState_CatchAbandoned(void);
|
||||
|
||||
/* Save a passing test to the output test directory. */
|
||||
extern void DeepState_SavePassingTest(void);
|
||||
|
||||
@@ -528,22 +528,14 @@ struct DeepState_TestInfo *DeepState_FirstTest(void) {
|
||||
return DeepState_LastTestInfo;
|
||||
}
|
||||
|
||||
/* Returns 1 if a failure was caught, otherwise 0. */
|
||||
int DeepState_CatchFail(void) {
|
||||
if (DeepState_CurrentTestRun->result == DeepState_TestRunFail) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
/* Returns `true` if a failure was caught for the current test case. */
|
||||
bool DeepState_CatchFail(void) {
|
||||
return DeepState_CurrentTestRun->result == DeepState_TestRunFail;
|
||||
}
|
||||
|
||||
/* Returns 1 if this test case was abandoned. */
|
||||
int DeepState_CatchAbandoned(void) {
|
||||
if (DeepState_CurrentTestRun->result == DeepState_TestRunAbandon) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
/* Returns `true` if the current test case was abandoned. */
|
||||
bool DeepState_CatchAbandoned(void) {
|
||||
return DeepState_CurrentTestRun->result == DeepState_TestRunAbandon;
|
||||
}
|
||||
|
||||
/* Overwrite libc's abort. */
|
||||
|
||||
Reference in New Issue
Block a user