Debian Codegraph @

test/lib/config.h

raw
1 /**
2 * Options object for tests.
3 */
4
5 #ifndef TEST_OPTIONS_H
6 #define TEST_OPTIONS_H
7
8 #include "../../src/config.h"
9
10 #include "logger.h"
11
12 #define FIXTURE_CONFIG struct config config;
13
14 #define SETUP_CONFIG \
15 { \
16 int rc; \
17 rc = config__init(&f->config, 1, "1"); \
18 munit_assert_int(rc, ==, 0); \
19 test_logger_setup(params, &f->config.logger); \
20 }
21
22 #define TEAR_DOWN_CONFIG \
23 test_logger_tear_down(&f->config.logger); \
24 config__close(&f->config)
25
26 #endif /* TEST_OPTIONS_H */