aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_confparse.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-06-19 08:34:20 -0400
committerNick Mathewson <nickm@torproject.org>2019-06-25 12:51:25 -0400
commit59317c8a238f49ad298d4f51f42a0f7b16c9cc3c (patch)
tree1460e526b36de8f52788f585ef8760def3cd8fb2 /src/test/test_confparse.c
parent3a4d67cf45dc1c94a33479c852a3dd7cbd4ebc95 (diff)
downloadtor-59317c8a238f49ad298d4f51f42a0f7b16c9cc3c.tar.gz
tor-59317c8a238f49ad298d4f51f42a0f7b16c9cc3c.zip
Use struct_magic_decl to verify magic numbers in config objects
Diffstat (limited to 'src/test/test_confparse.c')
-rw-r--r--src/test/test_confparse.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/test/test_confparse.c b/src/test/test_confparse.c
index 27696a537a..9e626356d3 100644
--- a/src/test/test_confparse.c
+++ b/src/test/test_confparse.c
@@ -131,8 +131,11 @@ static void test_free_cb(void *options);
static config_format_t test_fmt = {
sizeof(test_struct_t),
- TEST_MAGIC,
- offsetof(test_struct_t, magic),
+ {
+ "test_struct_t",
+ TEST_MAGIC,
+ offsetof(test_struct_t, magic),
+ },
test_abbrevs,
test_deprecation_notes,
test_vars,
@@ -774,8 +777,11 @@ static struct_member_t extra = {
static config_format_t etest_fmt = {
sizeof(test_struct_t),
- ETEST_MAGIC,
- offsetof(test_struct_t, magic),
+ {
+ "test_struct_t (with extra lines)",
+ ETEST_MAGIC,
+ offsetof(test_struct_t, magic),
+ },
test_abbrevs,
test_deprecation_notes,
test_vars,