Conversation
Summary of the fix:
- New runtime FFI patch_seq_test_set_name in crates/runtime/src/test.rs
— takes a String off the stack, updates only ctx.current_test, does NOT
clear failures / passes / current_line. Re-exported from
runtime/src/lib.rs.
- New Seq builtin test.set-name with signature ( ..a String -- ..a )
registered in builtins/diagnostics.rs, in the
codegen/runtime/test_time.rs DECLS + SYMBOLS tables, and in the
ast/program.rs word-call validator's builtin list.
- Runner wrapper in test_runner.rs now emits "{name}" test.init {name}
"{name}" test.set-name test.finish, which guarantees the test.finish
header matches the word name regardless of whether the user called
test.init with a different friendly name inside their test word.
No user-visible API change — test.set-name is documented as a
runner-internal helper but exists on the Seq surface (it's called from
the generated wrapper, which is compiled as normal Seq). test.init still
accepts and honors a user-supplied friendly name for standalone test
files (no runner wrapper).
Code ReviewOverviewThis PR fixes a test output attribution bug where a user calling The fix adds a minimal What's Working Well
Issues & SuggestionsMinor: doc comment stack-effect inconsistency
Suggestion: add a unit test for
|
Summary of the fix:
#424
No user-visible API change — test.set-name is documented as a
runner-internal helper but exists on the Seq surface (it's called from
the generated wrapper, which is compiled as normal Seq). test.init still
accepts and honors a user-supplied friendly name for standalone test
files (no runner wrapper).