Summary
src/arx/codegen.ArxBuilder.build has uncovered branches for object-only output and explicit pie / no-pie link modes (~86% file coverage).
Gaps (from pytest --cov=arx --cov-report=term-missing)
link=False: write object bytes directly to output_file and return (~90–92).
- Invalid
link_mode defensive ValueError on builder (~95) — if reachable from public API, assert with a test.
link_mode == \"pie\" / \"no-pie\": clang argument branches when linking (~103, ~105).
Suggested approach
- Add or extend tests in
tests/test_codegen_ast_output.py / tests/test_codegen_file_object.py per existing CI patterns (some paths require clang).
Evidence
Recent local run: codegen.py ~42 statements, ~6 missed (~86% cover).
Summary
src/arx/codegen.ArxBuilder.buildhas uncovered branches for object-only output and explicitpie/no-pielink modes (~86% file coverage).Gaps (from
pytest --cov=arx --cov-report=term-missing)link=False: write object bytes directly tooutput_fileand return (~90–92).link_modedefensiveValueErroron builder (~95) — if reachable from public API, assert with a test.link_mode == \"pie\"/\"no-pie\": clang argument branches when linking (~103, ~105).Suggested approach
tests/test_codegen_ast_output.py/tests/test_codegen_file_object.pyper existing CI patterns (some paths require clang).Evidence
Recent local run:
codegen.py~42 statements, ~6 missed (~86% cover).