test_a_missing_named_header_is_still_recorded¶
Tests › tests/test_preprocessor.py
What this test is for
Why it exists
The misspelled-path case, and the reason `as_meta` records a macro count of ZERO rather than dropping it. A declaration that produced nothing is a finding; recorded as absent it would be indistinguishable from a repo that declared nothing at all.
Given
root = tmp_path / "repo"root.mkdir()
When
config = resolve_preprocessor( root, {SECTION_PREPROCESSOR: {"config_header": "include/typo_config.h"}} )
Then
- ✓ config.declared holds
- ✓ config.source equals SOURCE_CONFIG_HEADER
- ✓ config.as_meta()["macro_count"] equals "0"
tests/test_preprocessor.py:583 · its file's page
What it checks (3)
assert config.declaredobservesresolve_preprocessorviaconfigassert config.source == SOURCE_CONFIG_HEADERobservesresolve_preprocessorviaconfigassert config.as_meta()["macro_count"] == "0", "a measured zero must be persisted"observesresolve_preprocessorviaconfig
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 2 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-CONFIG-004 measured
- REQ-DDB-PIPE-014 measured