mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 10:47:28 +02:00
Merge pull request #3419 from ethanlooney/29th_branch
Added case for Logging.c unit test
This commit is contained in:
11
tests/api.c
11
tests/api.c
@ -29556,8 +29556,8 @@ static void Logging_cb(const int logLevel, const char *const logMessage)
|
|||||||
static int test_wolfSSL_GetLoggingCb (void)
|
static int test_wolfSSL_GetLoggingCb (void)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
#ifdef DEBUG_WOLFSSL
|
|
||||||
printf(testingFmt, "wolfSSL_GetLoggingCb()");
|
printf(testingFmt, "wolfSSL_GetLoggingCb()");
|
||||||
|
#ifdef DEBUG_WOLFSSL
|
||||||
|
|
||||||
/* Testing without wolfSSL_SetLoggingCb() */
|
/* Testing without wolfSSL_SetLoggingCb() */
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
@ -29585,8 +29585,15 @@ static int test_wolfSSL_GetLoggingCb (void)
|
|||||||
wolfSSL_SetLoggingCb(NULL);
|
wolfSSL_SetLoggingCb(NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
printf(resultFmt, ret == 0 ? passed : failed);
|
|
||||||
#endif
|
#endif
|
||||||
|
if (ret == 0) {
|
||||||
|
if (wolfSSL_GetLoggingCb() != NULL) {
|
||||||
|
ret = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
printf(resultFmt, ret == 0 ? passed : failed);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}/*End test_wolfSSL_GetLoggingCb*/
|
}/*End test_wolfSSL_GetLoggingCb*/
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user