test_call_edges_resolves_direct_and_qualified_calls¶
Tests › tests/test_rust_ast.py
What this test is for
Why it exists
The test says nothing about why.
Given
tree, src = _parse( "fn helper(x: i32) -> i32 { x + 1 }\n" "fn main() {\n" " helper(1);\n" " std::thread::spawn(|| {});\n" "}\n" )
When
sites = _ast_harvest_calls(tree, src)names = {s[0] for s in sites}spawn_site = next(s for s in sites if s[0] == "spawn")
Then
- ✓ names contains "helper"
- ✓ names contains "spawn"
- ✓ spawn_site[3] equals "std::thread::spawn"
tests/test_rust_ast.py:41 · its file's page
What it checks (3)
assert "helper" in namesnot attributedassert "spawn" in namesnot attributedassert spawn_site[3] == "std::thread::spawn"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_call_edges_resolves_direct_and_qualified_calls→_parse→_ast_harvest_callsWhat 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-PIPE-003 measured