For internal use only.
This test program is used to test the operation of event_log_set(), event_log_reset(), event_log_debug(), event_log_trace(), event_log_abort(), ev_log(), ev_abort(), ev_assert(), and ev_init().
Definition in file t_event_log.c.
#include <stdio.h>
#include <stdlib.h>
#include "event-test.h"
Include dependency graph for t_event_log.c:
Go to the source code of this file.
Defines | |
#define | _str(a) |
Stringify argument. | |
#define | str(a) |
Stringify expansion of argument. | |
#define | LC_START |
Initial value for log_called. | |
#define | LC_EVLOGTEST |
Secondary value for log_called. | |
#define | LC_EVDEBUGTEST |
Tertiary value for log_called. | |
Functions | |
static void | t_log (const char *file, int line, const char *func, const char *msg) |
Test logging function. | |
static unsigned int | _ev_log (ev_flags_t flag, const char *msg) |
Wrap ev_log() logging macro. | |
static ev_err_t | _ev_assert (int expr) |
Wrap ev_assert() logging macro. | |
static ev_err_t | _ev_abort (void) |
Wrap ev_abort() logging macro. | |
static ev_err_t | _ev_init (void) |
Wrap ev_init() macro. | |
int | main (int argc, char **argv) |
Event log test program. | |
Variables | |
static unsigned int | log_called |
Logging sentinel. |
|
For internal use only.
This macro stringifies the
Definition at line 45 of file t_event_log.c. |
|
For internal use only. This macro contains the tertiary value of the log_called variable, and is used in testing _ev_debug() calls. Definition at line 78 of file t_event_log.c. Referenced by main(). |
|
For internal use only. This macro contains the secondary value of the log_called variable, and is used in testing that the log function is called. Definition at line 70 of file t_event_log.c. Referenced by main(). |
|
For internal use only. This macro contains the initial value of the log_called variable, and is used in testing that the log function is called. Definition at line 62 of file t_event_log.c. Referenced by main(). |
|
For internal use only.
This macro stringifies the expansion of the
Definition at line 54 of file t_event_log.c. Referenced by main(). |
|
For internal use only. This function is used to wrap calls to the ev_abort() logging macro, in an attempt to keep the compiler from optimizing the macro away. Definition at line 341 of file t_event_log.c. References ev_abort. Referenced by main(). |
|
For internal use only. This function is used to wrap calls to the ev_assert() logging macro, in an attempt to keep the compiler from optimizing the macro away.
Definition at line 326 of file t_event_log.c. References ev_assert. Referenced by main(). |
|
For internal use only. This function is used to wrap calls to the ev_init() macro, in an attempt to keep the compiler from optimizing the macro away. Definition at line 355 of file t_event_log.c. References ev_init. Referenced by main(). |
|
For internal use only. This function is used to wrap calls to the ev_log() logging macro, in an attempt to keep the compiler from optimizing the macro away.
Definition at line 309 of file t_event_log.c. References ev_log, and log_called. Referenced by main(). |
|
For internal use only. This program is used for testing the event library's logging routines. It is a comprehensive test that also tests the internal macros used by the library for the purposes of logging debugging data. Definition at line 126 of file t_event_log.c. References _ev_abort(), _ev_asflags, _ev_assert(), _ev_debug(), _ev_debuglog, _ev_init(), _ev_log(), _gca_func, EVAS_ABORT, EVAS_LOG, EVAS_LOOP, EVAS_TRACE, event_log_abort(), event_log_debug(), event_log_reset(), event_log_set(), event_log_trace(), LC_EVDEBUGTEST, LC_EVLOGTEST, LC_START, log_called, str, and t_log(). Here is the call graph for this function: ![]() |
|
For internal use only.
This routine is a test logging function matching the ev_log_t functional signature. In addition to writing the log message to
Definition at line 104 of file t_event_log.c. References log_called. Referenced by main(). |
|
For internal use only. This variable is used to signal whether the logging function was called and which message was logged. Definition at line 86 of file t_event_log.c. |