Commit 09600edca6ec699bd609661699b559916ec324a5

Thomas de Grivel 2024-08-27T16:23:42

wip segv

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/test/inspect_test.c b/test/inspect_test.c
index 5733b05..422cddf 100644
--- a/test/inspect_test.c
+++ b/test/inspect_test.c
@@ -144,10 +144,10 @@
   do {                                                                 \
     s_pretty pretty = {0};                                             \
     s_str result;                                                      \
-    s_struct struct_test;                                              \
+    s_struct struct_test = {0};                                        \
     assert(test);                                                      \
     test_context("inspect_struct(" # test ") -> " # expected);         \
-    struct_init_1(&struct_test, (test));                               \
+    TEST_EQ(struct_init_1(&struct_test, (test)), &struct_test);        \
     TEST_EQ(inspect_struct(&struct_test, &result), &result);           \
     TEST_STRNCMP(result.ptr.p, (expected), result.size);               \
     TEST_EQ(buf_inspect_struct_size(&pretty, &struct_test),            \