diff --git a/test/ts-log.c b/test/ts-log.c index d0ebd3f..5daaa49 100644 --- a/test/ts-log.c +++ b/test/ts-log.c @@ -332,10 +332,6 @@ static sol_erno debug_test2(void) - - - - /* * warn_test1() - sol_log_warn() unit test #1 */ @@ -368,6 +364,21 @@ static sol_erno warn_test1(void) +/* + * warn_test2() - sol_log_warn() unit test #2 + */ +static sol_erno warn_test2(void) +{ + #define WARN_TEST2 "sol_log_warn() performs a safe no-op if called" \ + " when no log file is open" + + sol_log_warn("Dummy"); + return SOL_ERNO_NULL; +} + + + + /* * error_test1() - sol_log_error() unit test #1 */ @@ -458,6 +469,7 @@ extern sol_erno __sol_tests_log(sol_tlog *log, sol_try (sol_tsuite_register(ts, &debug_test1, DEBUG_DESC1)); sol_try (sol_tsuite_register(ts, &debug_test2, DEBUG_TEST2)); sol_try (sol_tsuite_register(ts, &warn_test1, WARN_DESC1)); + sol_try (sol_tsuite_register(ts, &warn_test2, WARN_TEST2)); sol_try (sol_tsuite_register(ts, &error_test1, ERROR_DESC1)); sol_try (sol_tsuite_register(ts, &erno_test1, ERNO_DESC1));