test_two_bodies_with_one_signature_are_still_refused¶
Tests › tests/test_bare_call_one_function.py
What this test is for
Why it exists
THE CONTROL on the resolution. Two `static int helper(void)` definitions in two files share an identity and are still two functions; a name cannot say which one a call meant, so the call is refused exactly as before (gh#347) and the refusal is recorded.
Given
identity = ("helper", "helper", "(void)")
When
targets = _one_function_targets( {"helper": [30, 31]}, {30: identity, 31: identity}, {30: (1, 10), 31: (2, 10)}, homes={30, 31}, )resolved: list[tuple[int, int, str]] = []unresolved: list[list[int]] = []_ast_record_call_edge( 1, "helper", {"helper": [30, 31]}, resolved, [], SOURCE_AST, unresolved=unresolved, one_function=targets, )
Then
- ✓ targets equals {}
- ✓ resolved equals []
- ✓ unresolved equals [[30, 31]]
tests/test_bare_call_one_function.py:224 · its file's page
What it checks (2)
assert targets == {}, "two bodies are two functions"observes_one_function_targetsviatargetsassert resolved == [] and unresolved == [[30, 31]]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_two_bodies_with_one_signature_are_still_refused→_one_function_targets→_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