From 46e79e69ae866df88cb9442a7329c72662ed2db3 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 4 Oct 2025 15:33:07 +0900 Subject: refactor: rename test files --- tests/increment_operators.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 tests/increment_operators.sh (limited to 'tests/increment_operators.sh') diff --git a/tests/increment_operators.sh b/tests/increment_operators.sh new file mode 100644 index 0000000..f6aa2b5 --- /dev/null +++ b/tests/increment_operators.sh @@ -0,0 +1,29 @@ +cat <<'EOF' > expected +44 +44 +46 +46 +44 +42 +42 +EOF + +test_diff <<'EOF' +int printf(); + +int main() { + int a = 42; + ++a; + a++; + printf("%d\n", a); + printf("%d\n", a++); + printf("%d\n", ++a); + printf("%d\n", a); + --a; + a--; + printf("%d\n", a--); + printf("%d\n", --a); + printf("%d\n", a); +} +EOF + -- cgit v1.2.3-70-g09d2