test_candidates_keeps_two_real_overloads_apart

Tests › tests/test_disambiguation.py

passed Passed in the packaged run.

What this test is for

Why it exists

THE CONTROL, and the reason the key includes `line`. Two overloads of one class share a doxygen `definition` string exactly — the parameter list lives in `argsstring`, which this tuple does not carry — so a signature-keyed dedupe would silently collapse them and report one identity where the caller genuinely has to choose between two.

Given

  1. conn = sqlite3.connect(":memory:")
  2. conn.executescript("CREATE TABLE memberdef (rowid INTEGER PRIMARY KEY, name TEXT, kind TEXT);")
  3. overloads = [ (10, "void C::f", "include/c.h", 10, True), (11, "void C::f", "include/c.h", 11, True), ]
→

When

  1. candidate_rows(conn, "f", overloads)
  2. across_files = [ (10, "void C::f", "a/c.h", 10, True), (11, "void C::f", "b/c.h", 10, True), ]
  3. candidate_rows(conn, "f", across_files)
→

Then

  1. ✓ len(candidate_rows(conn, "f", overloads)) equals 2
  2. ✓ len(candidate_rows(conn, "f", across_files)) equals 2

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.

Look up one name: everything the index holds about it · 6 of 226 steps

… 17 earlier steps

callercallercallercallerclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/recovery.pyclew/query/recovery.pyclew/query/recovery.pyclew/query/recovery.pydossier18. _documentation_mentions → table_exists18table_exists19. _documentation_mentions → has_columns19has_columns20. has_columns → table_exists20table_exists21–22. _hint_from → _name_exists21_name_exists +1 more

… 55 steps between

callercallercallercallerclew/query/payload.pyclew/query/payload.pyclew/query/payload.pyclew/query/payload.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyother filesother filesother filesother filesdossier78. _referenced_by → table_exists78table_exists79. _macro_def → symbol_provenance79symbol_provenance80–81. symbol_provenance → records_provenance80records_provenance +1 more82. _gate_definitions → _gate_definition_gaps82_gate_definition_gaps83. _flatten_subject → _empty_callers_note83_empty_callers_note

… 105 steps between

callercallercallercallerclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/traversal.pyclew/query/traversal.pyclew/query/traversal.pyclew/query/traversal.pydossier189. chain_trace → function_candidates189function_candidates190. chain_trace → candidate_rows190candidate_rows191. candidate_rows → symbol_provenance191symbol_provenance▶ test enters192–193. candidate_rows → qualified_name_of192qualified_name_of +1 more194. chain_trace → is_overloaded194is_overloaded195. chain_trace → _make_node195_make_node

… 31 later steps

2 more

tests/test_disambiguation.py:410 · its file's page

What it checks (2)

  1. assert len(candidate_rows(conn, "f", overloads)) == 2, "two overloads are two identities" observes candidate_rows
  2. assert len(candidate_rows(conn, "f", across_files)) == 2 observes candidate_rows

Where the product reaches it

  • dossier → _chain_for → chain_trace → candidate_rows (flow)

Call flow

test_candidates_keeps_two_real_overloads_apart→candidate_rows

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_candidates_keeps_two_real_overloads_apart · 2 checkscandidate_rowssymbol_provenanceREQ-DDB-INDEX-004 · measuredcandidate_rowsREQ-DDB-QUERY-003 · measuredcandidate_rowsREQ-DDB-QUERY-010 · measured
Also reaches 3 requirements

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