원클릭으로
testing
Testing philosophy, coverage workflow, and test generation for the Furst compiler
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Testing philosophy, coverage workflow, and test generation for the Furst compiler
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | testing |
| description | Testing philosophy, coverage workflow, and test generation for the Furst compiler |
| allowed-tools | Read, Edit, Write, Glob, Grep, Bash |
Do not write per-function unit tests. They couple tests to implementation details and break when internals are refactored. Instead, identify the entrypoint functions for each directory/module — typically one or two public functions that everything else feeds through. These are the test boundaries. Test through them.
If a directory has parse, lower, emit as its public API, those are the three boundaries. Everything behind them is implementation detail.
Every test should exercise a language feature, not a function. The test says "this feature works" by feeding representative source code through a boundary and asserting on the output. The set of language features the language supports is the test matrix.
Bad-path tests live separately from happy-path tests. Ideally a separate test project; at minimum separate files in their own subdirectory. Keeping them apart prevents congestion — happy-path tests stay focused on "this feature works" and bad-path tests stay focused on "this invalid input is rejected correctly." Separation lets you run and reason about them independently.
After tests cover all language features through all boundaries, any branch with zero coverage is suspect. Ask: can a language feature exercise this branch? If yes, write the test. If no, it's dead code — remove it. Coverage is not a vanity metric; it's a dead code finder.
Enumerate every feature the language supports (or will support). Group by category: expressions, bindings, functions, modules, types, structs, etc. Each feature is a row. Each boundary it should pass through is a column. The matrix tells you what's tested and what's not.
For each feature, write at least one test through the highest-level boundary that exercises it (prefer end-to-end roundtrip when possible). The test provides source code as input and asserts on structured output. No mocking, no internal state inspection.
For each construct that should be invalid, write a test providing the bad source and asserting on the exact error type and message. Organize by error category: lex errors, parse errors, type errors, symbol errors.
Bad-path test pattern:
input: invalid source string
assert: Result is Error with expected message/type
# run tests with coverage collection
# generate a summary report
# review per-module branch coverage
For each uncovered branch:
Autogenerated code (protobuf, codegen output) should be excluded from coverage targets. It inflates uncovered lines and isn't meaningful to test through feature boundaries.
""") starting on a new line, with the source formatted naturally across multiple lines. This makes tests read like real Furst code, not compressed one-liners.