aboutsummaryrefslogtreecommitdiff
path: root/tests/i/memory-reallocation
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-17 09:35:19 +0000
committer_ov4 <ov4@ov4.org>2026-10-17 09:35:19 +0000
commit6b332f91c82da6e19efad92b58ac1d9c1bc9eec0 (patch)
treea553b6aab0589dd7cafe5b2508cb274ac0ae9e98 /tests/i/memory-reallocation
parentb25cbba212354e44921d23490765782f61787bc8 (diff)
feat(runtime): write runtime diagnostics to stderr
Runtime check messages and the unhandled-exception message were printed to stdout by the generated program, so `cpsc x.cps -r >out.txt` captured them. They are now formatted with snprintf and written with write(2). Test expectations and docs are updated accordingly. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Diffstat (limited to 'tests/i/memory-reallocation')
-rw-r--r--tests/i/memory-reallocation/expected-stderr.txt6
-rw-r--r--tests/i/memory-reallocation/expected.txt6
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/i/memory-reallocation/expected-stderr.txt b/tests/i/memory-reallocation/expected-stderr.txt
new file mode 100644
index 0000000..5478518
--- /dev/null
+++ b/tests/i/memory-reallocation/expected-stderr.txt
@@ -0,0 +1,6 @@
+[Fatal] line 28: Memory allocation failed
+[Fatal] line 40: Invalid memory address (not an active allocation)
+[Fatal] line 47: Invalid memory address (not an active allocation)
+[Fatal] line 63: Invalid memory address (not an active allocation)
+[Fatal] line 69: Invalid memory address (not an active allocation)
+[Fatal] line 77: Invalid memory address (not an active allocation)
diff --git a/tests/i/memory-reallocation/expected.txt b/tests/i/memory-reallocation/expected.txt
index 9e9ccc9..bb43f4f 100644
--- a/tests/i/memory-reallocation/expected.txt
+++ b/tests/i/memory-reallocation/expected.txt
@@ -1,17 +1,11 @@
TRUE
12:34
12
-[Fatal] line 28: Memory allocation failed
preserved:12
56
TRUE
-[Fatal] line 40: Invalid memory address (not an active allocation)
released address caught
-[Fatal] line 47: Invalid memory address (not an active allocation)
invalid zero resize caught
71
-[Fatal] line 63: Invalid memory address (not an active allocation)
-[Fatal] line 69: Invalid memory address (not an active allocation)
nested catch
-[Fatal] line 77: Invalid memory address (not an active allocation)
internal buffer caught