diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-08-04 00:35:32 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-08-15 10:06:21 +0900 |
| commit | 6f880873fbc49f44df6d2d19a76ceeb4052890c0 (patch) | |
| tree | f96e2a2f8d4ade94ab60e2aa0d113db08090b79d /tests | |
| parent | 5630b305cbc8537dfdd92ac9e3118605e9464e83 (diff) | |
| download | ducc-6f880873fbc49f44df6d2d19a76ceeb4052890c0.tar.gz ducc-6f880873fbc49f44df6d2d19a76ceeb4052890c0.tar.zst ducc-6f880873fbc49f44df6d2d19a76ceeb4052890c0.zip | |
feat: support union types
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/082.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/082.sh b/tests/082.sh new file mode 100644 index 0000000..1d7727f --- /dev/null +++ b/tests/082.sh @@ -0,0 +1,24 @@ +set -e + +cat <<'EOF' > expected +8 +42 +42 +EOF + +bash ../../test_diff.sh <<'EOF' +int printf(); + +union U { + int i; + long l; +}; + +int main() { + union U u; + printf("%zu\n", sizeof(u)); + u.l = 42; + printf("%d\n", u.i); + printf("%ld\n", u.l); +} +EOF |
