test_a_qualified_call_site_resolves_instead_of_fanning_out¶
Tests › tests/test_ast_recovery.py
What this test is for
Why it exists
#75's resolve half. `Ns::Class::method()` writes the class AT the call site, and `_callee_name_node` peeled it off to match `memberdef.name` — discarding the one piece of evidence that could say WHICH `method`. Measured on the public entropic index: 2,301 of 10,723 member-ish call sites (21%) are qualified.
Given
resolved: list[tuple[int, int, str]] = []fuzzy: list[tuple[int, int, str]] = []
When
_ast_record_call_edge( 1, "poll", {"poll": [10, 11, 12]}, resolved, fuzzy, "ast_member", qualified="net::Socket::poll", definition_of={ 10: "int net::Socket::poll(int)", 11: "int ui::Widget::poll()", 12: "void sched::Loop::poll()", }, )
Then
- ✓ resolved equals [(1, 10, "ast_member")]
- ✓ fuzzy equals []
tests/test_ast_recovery.py:153 · its file's page
What it checks (2)
assert resolved == [(1, 10, "ast_member")], "the qualified match must resolve to ONE"not attributedassert fuzzy == [], "and must not also fan out"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_a_qualified_call_site_resolves_instead_of_fanning_out→_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 1 requirement
Its run touches their code; that is reach, not proof.
- REQ-DDB-WIKI-054 inferred