Line |
Branch |
Exec |
Source |
1 |
|
|
#include "test.h" |
2 |
|
|
#include "options.h" |
3 |
|
|
|
4 |
|
1 |
static void test_common_options_offsets(TestContext *ctx) |
5 |
|
|
{ |
6 |
|
|
#define GLOBAL_OFFSET(m) offsetof(GlobalOptions, m) |
7 |
|
|
#define LOCAL_OFFSET(m) offsetof(LocalOptions, m) |
8 |
|
|
#define CHECK_OFFSETS(m) EXPECT_UINT_EQ(GLOBAL_OFFSET(m), LOCAL_OFFSET(m)) |
9 |
|
|
|
10 |
|
1 |
CHECK_OFFSETS(detect_indent); |
11 |
|
1 |
CHECK_OFFSETS(indent_width); |
12 |
|
1 |
CHECK_OFFSETS(tab_width); |
13 |
|
1 |
CHECK_OFFSETS(text_width); |
14 |
|
1 |
CHECK_OFFSETS(ws_error); |
15 |
|
1 |
CHECK_OFFSETS(auto_indent); |
16 |
|
1 |
CHECK_OFFSETS(editorconfig); |
17 |
|
1 |
CHECK_OFFSETS(emulate_tab); |
18 |
|
1 |
CHECK_OFFSETS(expand_tab); |
19 |
|
1 |
CHECK_OFFSETS(file_history); |
20 |
|
1 |
CHECK_OFFSETS(fsync); |
21 |
|
1 |
CHECK_OFFSETS(overwrite); |
22 |
|
1 |
CHECK_OFFSETS(syntax); |
23 |
|
1 |
} |
24 |
|
|
|
25 |
|
|
static const TestEntry tests[] = { |
26 |
|
|
TEST(test_common_options_offsets), |
27 |
|
|
}; |
28 |
|
|
|
29 |
|
|
const TestGroup option_tests = TEST_GROUP(tests); |
30 |
|
|
|