From eb0b6ca122848ac606a109759dd3a4d86f2987b9 Mon Sep 17 00:00:00 2001 From: Chris Conlon Date: Mon, 25 Oct 2021 13:50:39 -0600 Subject: [PATCH] fix unit test for wc_ERR_print_errors_fp() when NO_ERROR_QUEUE is defined --- tests/api.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/api.c b/tests/api.c index 40f887a20..9ec814571 100644 --- a/tests/api.c +++ b/tests/api.c @@ -36995,9 +36995,16 @@ static int test_wc_ERR_print_errors_fp (void) #if defined(DEBUG_WOLFSSL) AssertTrue(XFSEEK(fp, 0, XSEEK_END) == 0); sz = XFTELL(fp); + #ifdef NO_ERROR_QUEUE + /* File should be empty when NO_ERROR_QUEUE is defined */ + if (sz != 0) { + ret = BAD_FUNC_ARG; + } + #else if (sz == 0) { ret = BAD_FUNC_ARG; } + #endif #endif printf(resultFmt, ret == 0 ? passed : failed); XFCLOSE(fp);