test_the_harvest_reads_quoted_system_and_nested_includes

Tests › tests/test_ast_includes.py

passed Passed in the packaged run.

What this test is for

Why it exists

Quoted, angle-bracket and conditional includes; a macro include is skipped.

Given

  1. src = ( b'#include "a/b.h"\n#include <stdio.h>\n#if X\n# include "c.h"\n#endif\n#include MACRO_H\n' )
→

When

  1. rows = includes_harvester().harvest(Parser("c").parse(src), src)
→

Then

  1. ✓ sorted(rows) equals [["a/b.h", 1, 1], ["c.h", 1, 4], ["stdio.h", 0, 2]]

tests/test_ast_includes.py:26 · its file's page

What it checks (1)

  1. assert sorted(rows) == [["a/b.h", 1, 1], ["c.h", 1, 4], ["stdio.h", 0, 2]] observes includes_harvester via rows

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_harvest_reads_quoted_system_and_nested_includes→includes_harvester

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_harvest_reads_quoted_system_and_nested_includes · 1 checksincludes_harvesterREQ-DDB-INDEX-010 · measured
Also reaches 1 requirement

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