feat(gen-c): guarded test runner -- the C backend gets an execution level - #1946
Merged
Conversation
…evel Closes #1945 gen-c emitted void test_*(void) fns with t27_assert but nothing CALLED them: the C backend had no execution level and a failed assert could never fire in any pipeline. Emit an #ifdef T27_TEST_MAIN runner (main with per-test calls and a summary printf) after the test section, so plain inclusion stays untouched and `gcc -DT27_TEST_MAIN x.c && ./a.out` executes the suite. tri-net corpus: 54 specs compile and run their C tests clean immediately; the 15 [T; N]-return specs emit invalid C regardless of the runner (tracked in #1944, struct lowering). FROZEN_HASH resealed; only unit red is the pre-existing bitnet_layer iverilog test. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
gHashTag
enabled auto-merge (squash)
August 8, 2026 15:25
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1945
gen-c emitted
void test_*(void)fns with t27_assert but nothing called them — the C backend had no execution level. Emits an#ifdef T27_TEST_MAINrunner (main + per-test calls + summary) after the test section; headers stay includable,gcc -DT27_TEST_MAIN x.c && ./a.outruns the suite.tri-net corpus: 54 specs compile and run their C tests clean immediately; the 15
[T; N]-return specs emit invalid C regardless (#1944, struct lowering). Only unit red is pre-existing bitnet_layer. FROZEN_HASH resealed; NOW.md entries added.🤖 Generated with Claude Code