test_decl_def_duplicate_collapses_to_the_definition

Tests › tests/test_event_edges.py

passed Passed in the packaged run.

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

  1. 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

  1. topics = _topic_roles(tagged)
  2. _edges_for(topics)
→

Then

  1. ✓ topics["EVENT:FOO"][PRODUCER] equals {11}
  2. ✓ _edges_for(topics) equals [(11, 20, "EVENT:FOO")]

tests/test_event_edges.py:167 · its file's page

What it checks (2)

  1. assert topics["EVENT:FOO"][PRODUCER] == {11} observes _topic_roles via topics
  2. assert _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

test_decl_def_duplicate_collapses_to_the_definition→_topic_roles→_edges_for

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_decl_def_duplicate_collapses_to_the_definition · 2 checks_topic_rolesREQ-DDB-SCHEMA-009 · measured
Also reaches 1 requirement

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