test_decl_def_duplicate_collapses_to_the_definition¶
Tests › tests/test_event_edges.py
What this test is for
Why it exists
Doxygen documents one function twice when it is declared in a header and defined in a .cpp; both rows carry the tag. Collapse to the definition so a single logical emitter does not double its edges.
Given
tagged = [ ("EVENT:FOO", PRODUCER, "emit_it", 10, False), # header declaration ("EVENT:FOO", PRODUCER, "emit_it", 11, True), # definition ("EVENT:FOO", CONSUMER, "on_foo", 20, True), ]
When
topics = _topic_roles(tagged)_edges_for(topics)
Then
- ✓ topics["EVENT:FOO"][PRODUCER] equals {11}
- ✓ _edges_for(topics) equals [(11, 20, "EVENT:FOO")]
tests/test_event_edges.py:167 · its file's page
What it checks (2)
assert topics["EVENT:FOO"][PRODUCER] == {11}observes_topic_rolesviatopicsassert _edges_for(topics) == [(11, 20, "EVENT:FOO")]observes_edges_for
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
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.
Also reaches 1 requirement
Its run touches their code; that is reach, not proof.
- REQ-DDB-SCHEMA-009 measured