test_a_naming_guess_is_labelled_differently_from_a_declared_interrupt¶
Tests › tests/test_isr.py
What this test is for
Why it exists
`__attribute__((interrupt))` and `ISR_DIRECT_DECLARE(x)` are what the SOURCE SAYS; a name ending in _IRQHandler is what the index INFERRED. Both are worth recording and they are not the same evidence, so they are not written under the same `threads.source`.
Given
found = {site[ENTRY]: site for site in _sites(_DEFINITIONS)}registered = {site[ENTRY]: site for site in _sites(_REGISTRATIONS)}
When
- —
Then
- ✓ found["tim0_handler"][SOURCE] equals "ast_isr_decl"
- ✓ found["uarte_isr"][SOURCE] equals "ast_isr_decl"
- ✓ found["TIM1_IRQHandler"][SOURCE] equals "ast_isr_name"
- ✓ registered["timer_isr"][SOURCE] equals "ast_spawn"
tests/test_isr.py:225 · its file's page
What it checks (4)
assert found["tim0_handler"][SOURCE] == "ast_isr_decl", ( f"an interrupt attribute is declared, not guessed; got {found['tim0_handler'][SOURCE]!r}" )observes_sitesviafoundassert found["uarte_isr"][SOURCE] == "ast_isr_decl", ( f"a handler-declaring macro is declared; got {found['uarte_isr'][SOURCE]!r}" )observes_sitesviafoundassert found["TIM1_IRQHandler"][SOURCE] == "ast_isr_name", ( f"a naming convention is an inference; got {found['TIM1_IRQHandler'][SOURCE]!r}" )observes_sitesviafoundassert registered["timer_isr"][SOURCE] == "ast_spawn", ( f"a registration call is the existing source; got {registered['timer_isr'][SOURCE]!r}" )observes_sitesviaregistered
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_naming_guess_is_labelled_differently_from_a_declared_interrupt→_sitesWhat 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 3 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-PIPE-003 measured
- REQ-DDB-SCHEMA-001 measured
- REQ-DDB-SCHEMA-012 inferred