From 394899b2d7e75b7a922d3a402abc8f85a82b031c Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 1 Sep 2025 22:44:45 +0900 Subject: feat: support enum with explicit value --- tests/113.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 tests/113.sh (limited to 'tests') diff --git a/tests/113.sh b/tests/113.sh new file mode 100644 index 0000000..94e6e5f --- /dev/null +++ b/tests/113.sh @@ -0,0 +1,26 @@ +cat <<'EOF' > expected +10,11,20,21 +0,5,6 +EOF + +test_diff <<'EOF' +int printf(); + +enum E1 { + A = 10, + B, + C = 20, + D, +}; + +enum E2 { + E, + F = 5, + G +}; + +int main() { + printf("%d,%d,%d,%d\n", A, B, C, D); + printf("%d,%d,%d\n", E, F, G); +} +EOF -- cgit v1.2.3-70-g09d2