mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 06:13:31 +01:00
Give tinytest a function to say whether the current test has failed
This commit is contained in:
parent
f664c0c318
commit
e4feb4ad01
@ -492,6 +492,12 @@ tinytest_set_test_skipped_(void)
|
|||||||
cur_test_outcome = SKIP;
|
cur_test_outcome = SKIP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
tinytest_cur_test_has_failed(void)
|
||||||
|
{
|
||||||
|
return (cur_test_outcome == FAIL);
|
||||||
|
}
|
||||||
|
|
||||||
char *
|
char *
|
||||||
tinytest_format_hex_(const void *val_, unsigned long len)
|
tinytest_format_hex_(const void *val_, unsigned long len)
|
||||||
{
|
{
|
||||||
|
@ -72,6 +72,9 @@ struct testlist_alias_t {
|
|||||||
};
|
};
|
||||||
#define END_OF_ALIASES { NULL, NULL }
|
#define END_OF_ALIASES { NULL, NULL }
|
||||||
|
|
||||||
|
/** Return true iff the current test has failed. */
|
||||||
|
int tinytest_cur_test_has_failed(void);
|
||||||
|
|
||||||
/** Implementation: called from a test to indicate failure, before logging. */
|
/** Implementation: called from a test to indicate failure, before logging. */
|
||||||
void tinytest_set_test_failed_(void);
|
void tinytest_set_test_failed_(void);
|
||||||
/** Implementation: called from a test to indicate that we're skipping. */
|
/** Implementation: called from a test to indicate that we're skipping. */
|
||||||
|
Loading…
Reference in New Issue
Block a user