test_two_spellings_of_one_SCOPE_are_one_owner¶
Tests › tests/test_receiver_resolution.py
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
decl, defn = 4651, 4720scope_of = {decl: "entropic::ServerManager", defn: "ServerManager"}classes = {"server_manager": {"entropic::ServerManager"}}
When
survivors, verified = _narrow_by_receiver( "server_manager", 3, [decl, defn], classes, scope_of, {decl: 3, defn: 3} )
Then
- ✓ verified holds
- ✓ set(survivors) equals {decl, defn}
tests/test_receiver_resolution.py:126 · its file's page
What it checks (2)
assert verified, ( "one class written two ways is one owner; counting scope strings refused a call whose " "receiver type the index holds unambiguously" )not attributedassert 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_receiverWhat 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