mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 11:17:29 +02:00
error pass though build flag WOLFSSL_PASSTHRU_ERR
This commit is contained in:
@ -442,8 +442,6 @@ static int test_wolfCrypt_Init(void)
|
|||||||
|
|
||||||
static int test_fileAccess()
|
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)
|
#if defined(WOLFSSL_TEST_PLATFORMDEPEND) && !defined(NO_FILESYSTEM)
|
||||||
|
|
||||||
const char *fname[] = {
|
const char *fname[] = {
|
||||||
|
12
tests/unit.h
12
tests/unit.h
@ -33,14 +33,20 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static int unit_PassThrough = 0;
|
#ifndef WOLFSSL_PASSTHRU_ERR
|
||||||
|
|
||||||
#define Fail(description, result) do { \
|
#define Fail(description, result) do { \
|
||||||
printf("\nERROR - %s line %d failed with:", __FILE__, __LINE__); \
|
printf("\nERROR - %s line %d failed with:", __FILE__, __LINE__); \
|
||||||
printf("\n expected: "); printf description; \
|
printf("\n expected: "); printf description; \
|
||||||
printf("\n result: "); printf result; printf("\n\n"); \
|
printf("\n result: "); printf result; printf("\n\n"); \
|
||||||
if(unit_PassThrough == 0)XABORT(); \
|
XABORT(); \
|
||||||
} while(0)
|
} 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)
|
#define Assert(test, description, result) if (!(test)) Fail(description, result)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user