test_two_spellings_of_one_SCOPE_are_one_owner

Tests › tests/test_receiver_resolution.py

passed Passed in the packaged run.

What this test is for

Why it exists

gh#15. RULE 3'S MIRROR, and the reason rule 3 was only half fixed. The spelling duality was moved off the receiver's TYPE and onto the candidate's SCOPE, where it is just as real: doxygen emits a method twice — a header declaration and a definition — and writes the two rows' `scope` column differently. Measured on entropic, `ServerManager::init_builtins`:

Given

  1. decl, defn = 4651, 4720
  2. scope_of = {decl: "entropic::ServerManager", defn: "ServerManager"}
  3. classes = {"server_manager": {"entropic::ServerManager"}}
→

When

  1. survivors, verified = _narrow_by_receiver( "server_manager", 3, [decl, defn], classes, scope_of, {decl: 3, defn: 3} )
→

Then

  1. ✓ verified holds
  2. ✓ set(survivors) equals {decl, defn}

tests/test_receiver_resolution.py:126 · its file's page

What it checks (2)

  1. assert verified, ( "one class written two ways is one owner; counting scope strings refused a call whose " "receiver type the index holds unambiguously" ) not attributed
  2. assert set(survivors) == {decl, defn}, ( f"both rows are the same method on the pinned class and must survive: {survivors}" ) 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_spellings_of_one_SCOPE_are_one_owner→_narrow_by_receiver

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_two_spellings_of_one_SCOPE_are_one_owner · 2 checks_narrow_by_receiver_one_classallREQ-DDB-WIKI-054 · inferred
Also reaches 1 requirement

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