From 6b332f91c82da6e19efad92b58ac1d9c1bc9eec0 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Sat, 17 Oct 2026 09:35:19 +0000 Subject: 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 --- tests/i/class-delete/expected-stderr.txt | 2 ++ tests/i/class-delete/expected.txt | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 tests/i/class-delete/expected-stderr.txt (limited to 'tests/i/class-delete') diff --git a/tests/i/class-delete/expected-stderr.txt b/tests/i/class-delete/expected-stderr.txt new file mode 100644 index 0000000..bbd6b69 --- /dev/null +++ b/tests/i/class-delete/expected-stderr.txt @@ -0,0 +1,2 @@ +[Fatal] line 24: Invalid memory address (not an active allocation) +[Fatal] line 30: Invalid memory address (not an active allocation) diff --git a/tests/i/class-delete/expected.txt b/tests/i/class-delete/expected.txt index c7e7246..bb2c73d 100644 --- a/tests/i/class-delete/expected.txt +++ b/tests/i/class-delete/expected.txt @@ -3,9 +3,7 @@ pair pair leaf:2 leaf:1 -[Fatal] line 24: Invalid memory address (not an active allocation) double caught -[Fatal] line 30: Invalid memory address (not an active allocation) stack caught leaf:2 pair -- cgit v1.3.1-4-g156e