test_the_index_cache_tree_hash_notices_a_changed_predefined

Tests › tests/test_preprocessor.py

passed Passed in the packaged run.

What this test is for

Why it exists

THE silent-wrong-answer test. A changed `preprocessor:` declaration touches no source file and no Doxyfile, so if the macro text reached the doxygen RUN but not the hash, editing the declared macros would replay the previous configuration's parse straight out of cache and report success — a well-formed index of the variant the owner just stopped declaring, with nothing anywhere saying so.

Verifies REQ-DDB-PIPE-014

Given

  1. root = _fixture_repo(tmp_path)
  2. doxyfile = root / "Doxyfile"
  3. cache = IndexCache(tmp_path / "cache.db", Path(root))
→

When

  1. try: shas = { label: cache.tree_sha(doxyfile_content_for(doxyfile, predefined=text), []) for label, text in ( ("none", ""), ("feature", doxyfile_lines(PreprocessorConfig(macros=('"FIXTURE_FEATURE_C"',)))), ("width", doxyfile_lines(PreprocessorConfig(macros=('"FIXTURE_WIDTH=16"',)))), ) } finally: cache.close()
→

Then

  1. ✓ len(set(shas.values())) equals 3

tests/test_preprocessor.py:391 · its file's page

What it checks (1)

  1. assert len(set(shas.values())) == 3, ( f"the tree hash does not distinguish these configurations: {shas}" ) observes doxyfile_content_for via shas

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_the_index_cache_tree_hash_notices_a_changed_predefined→_fixture_repo→doxyfile_content_for→doxyfile_lines

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_the_index_cache_tree_hash_notices_a_changed_predefined · 1 checksdoxyfile_linesREQ-DDB-CONFIG-004 · measureddoxyfile_content_forREQ-DDB-INDEX-001 · measureddoxyfile_content_for_build_doxyfile_contentextra_input_clears_excludeREQ-DDB-PIPE-003 · measured

Requirements it verifies (1)

requirementlinked byimplementers exercised
REQ-DDB-PIPE-014catalogunknown
Also reaches 4 requirements

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