aboutsummaryrefslogtreecommitdiff
path: root/tests/i/enum-range
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/enum-range
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/enum-range')
-rw-r--r--tests/i/enum-range/case.json1
-rw-r--r--tests/i/enum-range/expected.txt3
-rw-r--r--tests/i/enum-range/notes.md5
-rw-r--r--tests/i/enum-range/program.cps9
4 files changed, 18 insertions, 0 deletions
diff --git a/tests/i/enum-range/case.json b/tests/i/enum-range/case.json
new file mode 100644
index 0000000..0967ef4
--- /dev/null
+++ b/tests/i/enum-range/case.json
@@ -0,0 +1 @@
+{}
diff --git a/tests/i/enum-range/expected.txt b/tests/i/enum-range/expected.txt
new file mode 100644
index 0000000..f91d556
--- /dev/null
+++ b/tests/i/enum-range/expected.txt
@@ -0,0 +1,3 @@
+[Fatal] line 5: Value out of range for enum Season
+enum caught
+TRUE
diff --git a/tests/i/enum-range/notes.md b/tests/i/enum-range/notes.md
new file mode 100644
index 0000000..e689441
--- /dev/null
+++ b/tests/i/enum-range/notes.md
@@ -0,0 +1,5 @@
+# enum-range
+
+Human review: pending. Expected output was independently traced by AI, not captured from cpsc.
+
+Basis and trace: Project enum range and exception contract. Incrementing the last ordinal fails before assignment, leaving S=Summer.
diff --git a/tests/i/enum-range/program.cps b/tests/i/enum-range/program.cps
new file mode 100644
index 0000000..7c6d1ef
--- /dev/null
+++ b/tests/i/enum-range/program.cps
@@ -0,0 +1,9 @@
+TYPE Season = (Spring, Summer)
+DECLARE S : Season
+S <- Summer
+TRY
+ S <- S + 1
+CATCH
+ OUTPUT "enum caught"
+ENDTRY
+OUTPUT S = Summer