test_a_header_page_lists_its_public_api

Tests › tests/test_wiki_apiref.py

passed Passed in the packaged run.

What this test is for

Why it exists

Functions with signatures, enum values, hook typedefs, macros, class members.

Given

  1. conn = _conn()
  2. rel = "include/demo/api.h"
→

When

  1. html = api_html(rel, header_symbols(conn, ("include/**",))[rel], header_classes(conn, rel))
  2. store = html.split("demo::Store", 1)[1]
→

Then

  1. ✓ html contains "<code>int demo_open(const char *path)</code>"
  2. ✓ html contains "Open a store."
  3. ✓ html contains "DEMO_READ"
  4. ✓ html contains "= 1"
  5. ✓ html contains "demo_cb"
  6. ✓ html contains 'class="hook"'
  7. ✓ html contains "DEMO_VERSION"
  8. ✓ store contains "flush"
  9. ✓ html contains "A store."

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

What it checks (5)

  1. assert "<code>int demo_open(const char *path)</code>" in html and "Open a store." in html observes api_html via html
  2. assert "DEMO_READ" in html and "= 1" in html observes api_html via html
  3. assert "demo_cb" in html and 'class="hook"' in html observes api_html via html
  4. assert "DEMO_VERSION" in html observes api_html via html
  5. assert "flush" in store and "A store." in html observes api_html via html

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_header_page_lists_its_public_api→_conn→api_html→header_symbols→header_classes

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_header_page_lists_its_public_api · 5 checksheader_classestable_existsREQ-DDB-QUERY-003 · measuredheader_symbolsREQ-DDB-WIKI-053 · measured
Also reaches 2 requirements

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