test_a_rust_tree_yields_no_cmake_definitions¶
Tests › tests/test_cmakeast.py
What this test is for
Why it exists
THE COLLISION, pinned: both grammars root at `source_file`.
Given
src = b'fn main() { println!("hi"); }\n'tree = lps.parse_tree("rust", src)
When
is_cmake_tree(tree)
Then
- ✓ tree.root_node.type equals "source_file"
- ✓ is_cmake_tree(tree) is false
- ✓ harvest_definitions(tree, src) equals {"functions": [], "classes": []}
tests/test_cmakeast.py:115 · its file's page
What it checks (3)
assert tree.root_node.type == "source_file", "the premise of this test"not attributedassert not is_cmake_tree(tree)observesis_cmake_treeassert harvest_definitions(tree, src) == {"functions": [], "classes": []}not attributed
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_rust_tree_yields_no_cmake_definitions→is_cmake_treeWhat 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 1 requirement
Its run touches their code; that is reach, not proof.
- REQ-DDB-PIPE-012 measured