aboutsummaryrefslogtreecommitdiff
path: root/tests/i/arrays/program.cps
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.one>2026-10-16 20:53:52 +0800
committer_ov4 <ov4@ov4.one>2026-10-16 20:53:52 +0800
commit5c00b8cd03cbfc516cce92229f3f4974d7549c24 (patch)
tree9d13c180dc345b3e27d241ac56de2aef99dea739 /tests/i/arrays/program.cps
parent1db81d50e8c664d0707491699485cfb23a0b5907 (diff)
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 <noreply@anthropic.com>
Diffstat (limited to 'tests/i/arrays/program.cps')
-rw-r--r--tests/i/arrays/program.cps12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/i/arrays/program.cps b/tests/i/arrays/program.cps
new file mode 100644
index 0000000..08b50a8
--- /dev/null
+++ b/tests/i/arrays/program.cps
@@ -0,0 +1,12 @@
+DECLARE Grid : ARRAY[-1:1,2:3] OF INTEGER
+DECLARE Row : INTEGER
+DECLARE Col : INTEGER
+DECLARE Total : INTEGER
+Total <- 0
+FOR Row <- -1 TO 1
+ FOR Col <- 2 TO 3
+ Grid[Row,Col] <- Row * 10 + Col
+ Total <- Total + Grid[Row,Col]
+ NEXT Col
+NEXT Row
+OUTPUT Grid[-1,2], ":", Grid[1,3], ":", Total