test_a_single_defined_test_is_an_ifdef_or_ifndef

Tests › tests/test_gate_polarity.py

passed Passed in the packaged run.

What this test is for

Why it exists

`#if [!]defined(X)` carries X's polarity, and the `#else` the inverse.

Given

  1. inverse = {"ifdef": "ifndef", "ifndef": "ifdef"}[form]
  2. rows = _gates(f"#if {condition}\nint a;\n#else\nint b;\n#endif\n")
→

When

  1. —
→

Then

  1. ✓ rows equals [("A", form, 1, 3), ("A", inverse, 3, 4)]

tests/test_gate_polarity.py:39 · its file's page

What it checks (1)

  1. assert rows == [("A", form, 1, 3), ("A", inverse, 3, 4)], rows observes _gates via rows

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→_gates

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_single_defined_test_is_an_ifdef_or_ifndef · 1 checks_gatesgate_harvesterREQ-DDB-PIPE-007 · measured
Also reaches 1 requirement

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