Skip to content

Commit

Permalink
Add sol_log_erno() 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 643dc24 commit 2fd87d4
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/ts-log.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ static sol_erno trace_test2(void)
#define TRACE_TEST2 "sol_log_trace() performs a safe no-op if called" \
" when no log file is open"

/* set up test scenario */
sol_log_trace("Dummy");
return SOL_ERNO_NULL;
}
Expand Down Expand Up @@ -325,6 +326,7 @@ 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"

/* set up test scenario */
sol_log_debug("Dummy");
return SOL_ERNO_NULL;
}
Expand Down Expand Up @@ -372,6 +374,7 @@ 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"

/* set up test scenario */
sol_log_warn("Dummy");
return SOL_ERNO_NULL;
}
Expand Down Expand Up @@ -419,6 +422,7 @@ static sol_erno error_test2(void)
#define ERROR_TEST2 "sol_log_error() performs a safe no-op if called" \
" when no log file is open"

/* set up test scenario */
sol_log_error("Dummy");
return SOL_ERNO_NULL;
}
Expand Down Expand Up @@ -458,6 +462,22 @@ static sol_erno erno_test1(void)



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

/* set up test scenario */
sol_log_erno(SOL_ERNO_STR);
return SOL_ERNO_NULL;
}




/*
* __sol_tests_log() - declared in sol/test/suite.h
*/
Expand Down

0 comments on commit 2fd87d4

Please sign in to comment.