Validate that test_fail causes a test failure
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
33406b645d
commit
f309fbf0d5
1 changed files with 12 additions and 0 deletions
|
@ -17,6 +17,17 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
||||||
|
/****************************************************************/
|
||||||
|
/* Test framework features */
|
||||||
|
/****************************************************************/
|
||||||
|
|
||||||
|
void meta_test_fail(const char *name)
|
||||||
|
{
|
||||||
|
(void) name;
|
||||||
|
mbedtls_test_fail("Forced test failure", __LINE__, __FILE__);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/****************************************************************/
|
/****************************************************************/
|
||||||
/* Command line entry point */
|
/* Command line entry point */
|
||||||
/****************************************************************/
|
/****************************************************************/
|
||||||
|
@ -28,6 +39,7 @@ typedef struct {
|
||||||
} metatest_t;
|
} metatest_t;
|
||||||
|
|
||||||
metatest_t metatests[] = {
|
metatest_t metatests[] = {
|
||||||
|
{ "test_fail", "any", meta_test_fail },
|
||||||
{ NULL, NULL, NULL }
|
{ NULL, NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue