mirror of https://github.com/yshui/picom.git
unittest: use test.h setup hook to setup logging
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
e5e618fb50
commit
c5e58da1ba
3
src/c2.c
3
src/c2.c
|
@ -416,9 +416,6 @@ c2_lptr_t *c2_parse(c2_lptr_t **pcondlst, const char *pattern, void *data) {
|
|||
}
|
||||
|
||||
TEST_CASE(c2_parse) {
|
||||
log_init_tls();
|
||||
// log_add_target_tls(stderr_logger_new());
|
||||
|
||||
char str[1024];
|
||||
c2_lptr_t *cond = c2_parse(NULL, "name = \"xterm\"", NULL);
|
||||
struct atom *atoms = init_mock_atoms();
|
||||
|
|
|
@ -2888,3 +2888,11 @@ int PICOM_MAIN(int argc, char **argv) {
|
|||
|
||||
return ret_code;
|
||||
}
|
||||
|
||||
#ifdef UNIT_TEST
|
||||
static void unittest_setup(void) {
|
||||
log_init_tls();
|
||||
// log_add_target_tls(stderr_logger_new());
|
||||
}
|
||||
void (*test_h_unittest_setup)(void) = unittest_setup;
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue