test_recovered_definitions_end_where_their_braces_close

Tests › tests/integration/test_c_error_recovery.py

passed Passed in the packaged run.

What this test is for

Why it exists

An overrunning or truncated definition ends where its body's braces close.

Given

  1. spans = _spans(mbedtls_checkout, "library/ssl_tls12_client.c")
  2. for name in ( "ssl_parse_certificate_request", "ssl_parse_server_hello_done", "ssl_write_client_key_exchange", ): assert name in spans, sorted(spans)
→

When

  1. —
→

Then

  1. ✓ spans["ssl_parse_server_key_exchange"] equals [(2163, 2542)]
  2. ✓ spans["ssl_parse_server_hello"] equals [(1182, 1665)]

tests/integration/test_c_error_recovery.py:68 · its file's page

What it checks (3)

  1. assert spans["ssl_parse_server_key_exchange"] == [(2163, 2542)], spans observes _spans via spans
  2. assert spans["ssl_parse_server_hello"] == [(1182, 1665)], spans observes _spans via spans
  3. assert name in spans, sorted(spans) observes _spans via spans

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_recovered_definitions_end_where_their_braces_close→_spans

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_recovered_definitions_end_where_their_braces_close · 3 checks_spansharvest_function_definitionsREQ-DDB-INDEX-004 · measured
Also reaches 2 requirements

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