test_a_qualifier_matching_several_records_NOTHING

Tests › tests/test_ast_recovery.py

passed Passed in the packaged run.

What this test is for

Why it exists

Narrowing is not a promise of uniqueness. A qualified name that still matches more than one indexed signature (decl/def duality, or a genuine overload set on one class) is UNRESOLVED, and an unresolved call records nothing (gh#347).

Given

  1. resolved: list[tuple[int, int, str]] = []
  2. fuzzy: list[tuple[int, int, str]] = []
→

When

  1. _ast_record_call_edge( 1, "send", {"send": [30, 31, 32]}, resolved, fuzzy, "ast_member", qualified="net::Socket::send", definition_of={ 30: "int net::Socket::send(const char *)", 31: "int net::Socket::send(int)", 32: "int ui::Form::send()", }, )
→

Then

  1. ✓ resolved equals []
  2. ✓ fuzzy equals []

tests/test_ast_recovery.py:210 · its file's page

What it checks (2)

  1. assert resolved == [], "two candidates is not one; nothing is resolved" not attributed
  2. assert fuzzy == [], ( "narrowed to the class and STILL ambiguous, so the call is unresolved and records " "nothing — emitting one row per candidate asserted two calls where one occurred" ) 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_qualifier_matching_several_records_NOTHING→_ast_record_call_edge

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.

test_a_qualifier_matching_several_records_NOTHING · 2 checks_ast_record_call_edge_narrow_by_receiver_one_classallREQ-DDB-WIKI-054 · inferred
Also reaches 1 requirement

Its run touches their code; that is reach, not proof.