error pass though build flag WOLFSSL_PASSTHRU_ERR

This commit is contained in:
Takashi Kojo
2018-09-08 10:19:31 +09:00
parent 902008f5ea
commit 0d44252608
2 changed files with 9 additions and 5 deletions

View File

@ -442,8 +442,6 @@ static int test_wolfCrypt_Init(void)
static int test_fileAccess()
{
if(unit_PassThrough == 1)XABORT(); /* do nothing. use the flag at least once. */
#if defined(WOLFSSL_TEST_PLATFORMDEPEND) && !defined(NO_FILESYSTEM)
const char *fname[] = {

View File

@ -33,14 +33,20 @@
#endif
static int unit_PassThrough = 0;
#ifndef WOLFSSL_PASSTHRU_ERR
#define Fail(description, result) do { \
printf("\nERROR - %s line %d failed with:", __FILE__, __LINE__); \
printf("\n expected: "); printf description; \
printf("\n result: "); printf result; printf("\n\n"); \
if(unit_PassThrough == 0)XABORT(); \
XABORT(); \
} while(0)
#else
#define Fail(description, result) do { \
printf("\nERROR - %s line %d failed with:", __FILE__, __LINE__); \
printf("\n expected: ");printf description; \
printf("\n result: "); printf result; printf("\n\n"); \
} while (0)
#endif
#define Assert(test, description, result) if (!(test)) Fail(description, result)