test_a_defaulted_or_deleted_special_member_is_not_recovered¶
Tests › tests/test_ast_symbols.py
What this test is for
Why it exists
FOUND BY MEASUREMENT, not by reading the grammar. `W(W&&) = default;` IS a `function_definition` in tree-sitter-cpp — the `= default;` sits where a body would — so the first cut recovered a row for a member that has no body and that doxygen had already emitted a declaration for.
Given
src = ( b"class W {\n public:\n W() = default;\n W(W&&) = default;\n" b" W(const W&) = delete;\n int real() { return 1; }\n};\n" b"W::~W() = default;\n" )tree = SubstrateParser("cpp").parse(src)
When
harvest_function_definitions(tree, src)
Then
- ✓ [f.name for f in harvest_function_definitions(tree, src)] equals ["real"]
tests/test_ast_symbols.py:337 · its file's page
What it checks (1)
assert [f.name for f in harvest_function_definitions(tree, src)] == ["real"]observesharvest_function_definitions
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-INDEX-004 measured
- REQ-DDB-PIPE-003 measured