From 5c00b8cd03cbfc516cce92229f3f4974d7549c24 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Fri, 16 Oct 2026 20:53:52 +0800 Subject: test(compiler): cover fixed CIE behavior and runtime boundaries Record independently traced outputs with pending human review. Keep standard syntax and naming conflicts as real failures. Co-Authored-By: Claude Fable 5.1 --- tests/i/loops/program.cps | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 tests/i/loops/program.cps (limited to 'tests/i/loops/program.cps') diff --git a/tests/i/loops/program.cps b/tests/i/loops/program.cps new file mode 100644 index 0000000..a858e6c --- /dev/null +++ b/tests/i/loops/program.cps @@ -0,0 +1,28 @@ +DECLARE I : INTEGER +DECLARE Total : INTEGER +Total <- 0 +FOR I <- 3 TO 1 + Total <- Total + 1000 +NEXT I +FOR I <- 2 TO 2 + Total <- Total + I +NEXT I +FOR I <- 3 TO -1 STEP -2 + Total <- Total + I +NEXT I +WHILE FALSE DO + Total <- Total + 1000 +ENDWHILE +I <- 0 +WHILE I < 3 DO + Total <- Total + I + I <- I + 1 +ENDWHILE +REPEAT + Total <- Total + 10 +UNTIL TRUE +I <- 0 +REPEAT + I <- I + 1 +UNTIL I = 3 +OUTPUT Total, ":", I -- cgit v1.3.1-4-g156e