test_a_function_and_a_macro_are_both_definitions

Tests › tests/test_cmakeast.py

passed Passed in the packaged run.

What this test is for

Why it exists

Both definition forms are harvested with their spans.

Given

  1. out = _harvest(_LISTS)
  2. by_name = {fn["name"]: fn for fn in out["functions"]}
→

When

  1. —
→

Then

  1. ✓ sorted(by_name) equals ["add_firmware", "strict_warnings"]
  2. ✓ by_name["add_firmware"]["line"] equals 7
  3. ✓ by_name["add_firmware"]["end"] equals 9
  4. ✓ by_name["strict_warnings"]["line"] equals 12

tests/test_cmakeast.py:62 · its file's page

What it checks (4)

  1. assert sorted(by_name) == ["add_firmware", "strict_warnings"] not attributed
  2. assert by_name["add_firmware"]["line"] == 7 not attributed
  3. assert by_name["add_firmware"]["end"] == 9 not attributed
  4. assert by_name["strict_warnings"]["line"] == 12 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_function_and_a_macro_are_both_definitions→_harvest

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 1 requirement

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