Skip to content

Commit

Permalink
Add sol_log_debug() 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 74a8f7f commit 3487b79
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions test/ts-log.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,9 @@ static sol_erno trace_test1(void)



/*
* trace_test2() - sol_log_trace() unit test #2
*/
static sol_erno trace_test2(void)
{
#define TRACE_TEST2 "sol_log_trace() performs a safe no-op if called" \
Expand Down Expand Up @@ -314,6 +317,25 @@ static sol_erno debug_test1(void)



/*
* debug_test2() - sol_log_debug() unit test #2
*/
static sol_erno debug_test2(void)
{
#define DEBUG_TEST2 "sol_log_debug() performs a safe no-op if called" \
" when no log file is open"

sol_log_debug("Dummy");
return SOL_ERNO_NULL;
}








/*
* warn_test1() - sol_log_warn() unit test #1
*/
Expand Down Expand Up @@ -434,6 +456,7 @@ extern sol_erno __sol_tests_log(sol_tlog *log,
sol_try (sol_tsuite_register(ts, &trace_test1, TRACE_DESC1));
sol_try (sol_tsuite_register(ts, &trace_test2, TRACE_TEST2));
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, &error_test1, ERROR_DESC1));
sol_try (sol_tsuite_register(ts, &erno_test1, ERNO_DESC1));
Expand Down

0 comments on commit 3487b79

Please sign in to comment.