diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-09-01 23:44:51 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-09-01 23:55:56 +0900 |
| commit | 09a245679c8d01eaec71b22985a9895667280cad (patch) | |
| tree | f77024dbfb3f69d48bed3c7faaae994d0d9a173d /tests | |
| parent | 5c1716417609ac2cea1470b3d3bb38a6e758279a (diff) | |
| download | ducc-09a245679c8d01eaec71b22985a9895667280cad.tar.gz ducc-09a245679c8d01eaec71b22985a9895667280cad.tar.zst ducc-09a245679c8d01eaec71b22985a9895667280cad.zip | |
feat: partially support anonymous structs/unions/enums
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/117.sh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/117.sh b/tests/117.sh new file mode 100644 index 0000000..765dc58 --- /dev/null +++ b/tests/117.sh @@ -0,0 +1,31 @@ +cat <<'EOF' > expected +8 +4 +4 +EOF + +test_diff <<'EOF' +int printf(); + +typedef struct { + int x; + int y; +} S; + +typedef union { + int a; + char b; +} U; + +typedef enum { + RED, + GREEN, + BLUE +} E; + +int main() { + printf("%zu\n", sizeof(S)); + printf("%zu\n", sizeof(U)); + printf("%zu\n", sizeof(E)); +} +EOF |
