File: config.h

package info (click to toggle)
dqlite 1.18.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,372 kB
  • sloc: ansic: 57,583; makefile: 336; sh: 243
file content (26 lines) | stat: -rw-r--r-- 690 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/**
 * Options object for tests.
 */

#ifndef TEST_OPTIONS_H
#define TEST_OPTIONS_H

#include "../../src/config.h"

#include "logger.h"

#define FIXTURE_CONFIG struct config config;

#define SETUP_CONFIG                                                \
	{                                                           \
		int rc;                                             \
		rc = config__init(&f->config, 1, "1", NULL); \
		munit_assert_int(rc, ==, 0);                        \
		test_logger_setup(params, &f->config.logger);       \
	}

#define TEAR_DOWN_CONFIG                          \
	test_logger_tear_down(&f->config.logger); \
	config__close(&f->config)

#endif /* TEST_OPTIONS_H */