test_a_macro_reports_its_expansion_parameters_and_site¶
Tests › tests/test_macro_query.py
What this test is for
Why it exists
A macro's expansion and location are reachable by name.
Given
defs = macro_definitions(macro_db, "WRAP")
When
- —
Then
- ✓ len(defs) equals 1
- ✓ defs[0].expansion equals "hidden_##member"
- ✓ defs[0].params equals "(member)"
- ✓ (defs[0].file, defs[0].line) equals ("include/private_access.h", 15)
What it exercises
The parts of the system's flows this test ran, measured by per-test coverage: lit steps ran in this test, dimmed ones did not, and ▶ marks where the test called in. Each title opens the whole flow with these steps lit.
Look up one name: everything the index holds about it · 15 of 226 steps
… 17 earlier steps
… 33 steps between
… 6 steps between
… 143 later steps
2 more
- clew — `main` (clew/cli.py) · 3 of 400 steps
- `main` (scripts/export_parity.py) · 3 of 203 steps
tests/test_macro_query.py:174 · its file's page
What it checks (4)
assert len(defs) == 1not attributedassert defs[0].expansion == "hidden_##member"not attributedassert defs[0].params == "(member)"not attributedassert (defs[0].file, defs[0].line) == ("include/private_access.h", 15)not attributed
What it reaches
Each row runs from this test, through the calls it makes, to the code a requirement names. If that code breaks, the test's checks are what should catch it. Reaching is not proving: a check only proves what it observes. No mutation records were given, so these rows say what the test REACHES.
Also reaches 5 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-INDEX-004 measured
- REQ-DDB-QUERY-001 measured
- REQ-DDB-QUERY-003 measured
- REQ-DDB-QUERY-006 measured
- REQ-DDB-QUERY-012 measured