test_recovered_definitions_end_where_their_braces_close¶
Tests › tests/integration/test_c_error_recovery.py
What this test is for
Why it exists
An overrunning or truncated definition ends where its body's braces close.
Given
spans = _spans(mbedtls_checkout, "library/ssl_tls12_client.c")for name in ( "ssl_parse_certificate_request", "ssl_parse_server_hello_done", "ssl_write_client_key_exchange", ): assert name in spans, sorted(spans)
When
- —
Then
- ✓ spans["ssl_parse_server_key_exchange"] equals [(2163, 2542)]
- ✓ spans["ssl_parse_server_hello"] equals [(1182, 1665)]
tests/integration/test_c_error_recovery.py:68 · its file's page
What it checks (3)
assert spans["ssl_parse_server_key_exchange"] == [(2163, 2542)], spansobserves_spansviaspansassert spans["ssl_parse_server_hello"] == [(1182, 1665)], spansobserves_spansviaspansassert name in spans, sorted(spans)observes_spansviaspans
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→_spansWhat 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 2 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-INDEX-004 measured
- REQ-DDB-PIPE-003 measured