test_a_single_defined_test_is_an_ifdef_or_ifndef¶
Tests › tests/test_gate_polarity.py
What this test is for
Why it exists
`#if [!]defined(X)` carries X's polarity, and the `#else` the inverse.
Given
inverse = {"ifdef": "ifndef", "ifndef": "ifdef"}[form]rows = _gates(f"#if {condition}\nint a;\n#else\nint b;\n#endif\n")
When
- —
Then
- ✓ rows equals [("A", form, 1, 3), ("A", inverse, 3, 4)]
tests/test_gate_polarity.py:39 · its file's page
What it checks (1)
assert rows == [("A", form, 1, 3), ("A", inverse, 3, 4)], rowsobserves_gatesviarows
Where the product reaches it
main→query_main→_payload→export_search→corpus_payload→kconfig_space→_gates(flow)
Call flow
test_a_single_defined_test_is_an_ifdef_or_ifndef→_gatesWhat 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-007 measured