test_constructing_an_unindexed_template_still_resolves_to_nothing¶
Tests › tests/test_ast_recovery.py
What this test is for
Why it exists
THE NEGATIVE CONTROL. `std::make_unique<std::vector<int>>()` names a class too, and it is one no repository index holds. Naming it is correct — inventing an edge for it is not — and the existing miss path already handles that: a callee name with no candidate row emits nothing, exactly as an unknown free function does.
Given
parsed = _parse(tmp_path, "w.cpp", _CONSTRUCTION)tree, src = parsed
When
by_name = {site[0]: site for site in _ast_harvest_calls(tree, src)}resolved: list[tuple[int, int, str]] = []fuzzy: list[tuple[int, int, str]] = []_ast_record_call_edge( 1, "vector", {}, resolved, fuzzy, SOURCE_AST_MEMBER, qualified="std::vector<int>", construction=True, )
Then
- ✓ parsed is not None
- ✓ by_name contains "vector"
- ✓ by_name["vector"][3] equals "std::vector<int>"
- ✓ resolved equals []
- ✓ fuzzy equals []
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.
clew — `main` (clew/cli.py) · 7 of 400 steps
… 70 earlier steps
… 313 later steps
tests/test_ast_recovery.py:345 · its file's page
What it checks (4)
assert parsed is not Nonenot attributedassert "vector" in by_name, f"the tail of a nested template argument: {sorted(by_name)}"observes_ast_harvest_callsviaby_nameassert by_name["vector"][3] == "std::vector<int>"observes_ast_harvest_callsviaby_nameassert resolved == [] and fuzzy == [], "a class the index does not hold earns no edge"not attributed
Where the product reaches it
No product flow reaches this code: no product entry point's flow calls any of the functions this test calls.
Call flow
test_constructing_an_unindexed_template_still_resolves_to_nothing→_ast_harvest_calls→_ast_record_call_edgeWhat 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 3 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-PIPE-003 measured
- REQ-DDB-PIPE-011 measured
- REQ-DDB-WIKI-054 inferred