test_a_defaulted_or_deleted_special_member_is_not_recovered

Tests › tests/test_ast_symbols.py

passed Passed in the packaged run.

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

  1. 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" )
  2. tree = SubstrateParser("cpp").parse(src)
→

When

  1. harvest_function_definitions(tree, src)
→

Then

  1. ✓ [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)

  1. assert [f.name for f in harvest_function_definitions(tree, src)] == ["real"] observes harvest_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

test_a_defaulted_or_deleted_special_member_is_not_recovered→harvest_function_definitions

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_a_defaulted_or_deleted_special_member_is_not_recovered · 1 checksharvest_function_definitionsREQ-DDB-INDEX-004 · measured
Also reaches 2 requirements

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