From ad400b7377433fb4bc30d883c9a8389f78e3565d Mon Sep 17 00:00:00 2001 From: nsfisis Date: Thu, 8 May 2025 23:15:56 +0900 Subject: implement typedef --- tests/046.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tests/046.sh (limited to 'tests') diff --git a/tests/046.sh b/tests/046.sh new file mode 100644 index 0000000..3011ff3 --- /dev/null +++ b/tests/046.sh @@ -0,0 +1,21 @@ +set -e + +cat <<'EOF' > expected +42 +EOF +bash ../../test_diff.sh <<'EOF' +void* calloc(); +int printf(); + +struct S { + int x; +}; +typedef struct S S; + +int main() { + S* s = calloc(1, sizeof(S)); + s->x = 42; + printf("%d\n", s->x); + return 0; +} +EOF -- cgit v1.2.3-70-g09d2