diff options
| author | _ov4 <ov4@ov4.org> | 2026-10-17 09:35:19 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-10-17 09:35:19 +0000 |
| commit | 6b332f91c82da6e19efad92b58ac1d9c1bc9eec0 (patch) | |
| tree | a553b6aab0589dd7cafe5b2508cb274ac0ae9e98 /tests/i/memory-allocation | |
| parent | b25cbba212354e44921d23490765782f61787bc8 (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-allocation')
| -rw-r--r-- | tests/i/memory-allocation/expected-stderr.txt | 4 | ||||
| -rw-r--r-- | tests/i/memory-allocation/expected.txt | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/i/memory-allocation/expected-stderr.txt b/tests/i/memory-allocation/expected-stderr.txt new file mode 100644 index 0000000..72d9e66 --- /dev/null +++ b/tests/i/memory-allocation/expected-stderr.txt @@ -0,0 +1,4 @@ +[Fatal] line 34: Invalid memory address (not an active allocation) +[Fatal] line 40: Invalid memory address (not an active allocation) +[Fatal] line 48: Invalid memory address (not an active allocation) +[Fatal] line 54: Memory allocation failed diff --git a/tests/i/memory-allocation/expected.txt b/tests/i/memory-allocation/expected.txt index 330c9ba..e007979 100644 --- a/tests/i/memory-allocation/expected.txt +++ b/tests/i/memory-allocation/expected.txt @@ -3,12 +3,8 @@ TRUE 42 11:22 TRUE -[Fatal] line 34: Invalid memory address (not an active allocation) double free caught -[Fatal] line 40: Invalid memory address (not an active allocation) stack address caught -[Fatal] line 48: Invalid memory address (not an active allocation) interior address caught -[Fatal] line 54: Memory allocation failed allocation failure caught 99 |
