Skip to content

Commit

Permalink
Add sol_log_warn() unit test #2
Browse files Browse the repository at this point in the history
Signed-off-by: Abhishek Chakravarti <abhishek@taranjali.org>
  • Loading branch information
achakravarti committed Mar 8, 2019
1 parent 3487b79 commit 064a7dd
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions test/ts-log.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,10 +332,6 @@ static sol_erno debug_test2(void)







/*
* warn_test1() - sol_log_warn() unit test #1
*/
Expand Down Expand Up @@ -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
*/
Expand Down Expand Up @@ -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));

Expand Down

0 comments on commit 064a7dd

Please sign in to comment.