diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-02-07 15:33:59 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-02-07 17:37:23 +0900 |
| commit | f684a1f964d2761a4721497973023fa82923f121 (patch) | |
| tree | a52514e06aaf20b4f72c5b00dd241d48e535d582 /tests/variables.c | |
| parent | cdddf2422553f1f21c8d2c57cd382b8362dc80fb (diff) | |
| download | ducc-f684a1f964d2761a4721497973023fa82923f121.tar.gz ducc-f684a1f964d2761a4721497973023fa82923f121.tar.zst ducc-f684a1f964d2761a4721497973023fa82923f121.zip | |
feat: support null pointer in initializer
Diffstat (limited to 'tests/variables.c')
| -rw-r--r-- | tests/variables.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/variables.c b/tests/variables.c index 2ba28d1..e6a0b3a 100644 --- a/tests/variables.c +++ b/tests/variables.c @@ -1,4 +1,5 @@ #include <helpers.h> +#include <stddef.h> int printf(const char*, ...); @@ -33,6 +34,7 @@ struct S2 { struct S2 arr5[] = { {"foo"}, {"bar"}, + {NULL}, }; int main() { @@ -74,6 +76,7 @@ int main() { ASSERT_EQ_STR("foo", arr5[0].x); ASSERT_EQ_STR("bar", arr5[1].x); + ASSERT_EQ(NULL, arr5[2].x); // local variables int foo; |
