aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/struct_basics.sh
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-01-09 01:31:03 +0900
committernsfisis <nsfisis@gmail.com>2026-01-09 01:32:18 +0900
commitc40c49de2c318ded0aa127e5faccc9054df6e30e (patch)
tree13db534b6a417049cb104b72907aa7c139d3bb4c /tests/struct_basics.sh
parent1e89f9ff938ed458e8be8904bb29b7ced406f9d5 (diff)
downloadducc-c40c49de2c318ded0aa127e5faccc9054df6e30e.tar.gz
ducc-c40c49de2c318ded0aa127e5faccc9054df6e30e.tar.zst
ducc-c40c49de2c318ded0aa127e5faccc9054df6e30e.zip
feat: support declarations to declare multiple members at once
Diffstat (limited to 'tests/struct_basics.sh')
-rw-r--r--tests/struct_basics.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/struct_basics.sh b/tests/struct_basics.sh
index 2dff3bb..13a50a5 100644
--- a/tests/struct_basics.sh
+++ b/tests/struct_basics.sh
@@ -118,3 +118,20 @@ int main() {
return 0;
}
EOF
+
+test_exit_code 0 <<'EOF'
+#include <helpers.h>
+
+struct S {
+ int a, b;
+};
+
+struct T {
+ short *a, b, c[12];
+};
+
+int main() {
+ ASSERT_EQ(8, sizeof(struct S));
+ ASSERT_EQ(40, sizeof(struct T));
+}
+EOF