queue capacity / cap mutation / clear / observer / state slot¶
Tests › tests/unit/core/engine_test.cpp
What this test is for
Why it exists
The test says nothing about why.
tests/unit/core/engine_test.cpp:2245 · its file's page
What it checks (12)
REQUIRE(engine.queue_user_message("a"))observesqueue_user_messageREQUIRE(engine.queue_user_message("b"))observesqueue_user_messageREQUIRE_FALSE(engine.queue_user_message("c"))observesqueue_user_messageREQUIRE(engine.user_message_queue_depth() == 2)observesuser_message_queue_depthREQUIRE(engine.queue_user_message("c"))observesqueue_user_messageREQUIRE(engine.user_message_queue_depth() == 0)observesuser_message_queue_depthREQUIRE_FALSE(engine.queue_user_message("d"))observesqueue_user_messageREQUIRE(s.fired == 1)not attributedREQUIRE(s.text == "queued follow-up")not attributedREQUIRE_FALSE(engine.is_running())observesis_runningREQUIRE_FALSE(states.empty())not attributedREQUIRE(states.back() == static_cast<int>(AgentState::COMPLETE))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
queue capacity / cap mutation / clear / observer / state slot→make_mock_interface→REQUIRE→queue_user_message→user_message_queue_depth→set_message_queue_capacity→clear_user_message_queue→set_queue_observer→is_running→set_state_observer→run→make_messagesWhat 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.
and 8 more requirement paths, listed below.
Also reaches 20 requirements
Its run touches their code; that is reach, not proof.
- REQ-COMPACT-001 inferred
- REQ-COMPACT-002 inferred
- REQ-DELEG-001 inferred
- REQ-DELEG-002 inferred
- REQ-DELEG-003 inferred
- REQ-DELEG-004 inferred
- REQ-DELEG-005 inferred
- REQ-DELEG-006 inferred
- REQ-HOOK-002 inferred
- REQ-IDEN-001 inferred
- REQ-IDEN-003 inferred
- REQ-INFER-026 inferred
- REQ-LOOP-001 inferred
- REQ-LOOP-002 inferred
- REQ-LOOP-003 inferred
- REQ-LOOP-004 inferred
- REQ-LOOP-005 inferred
- REQ-LOOP-006 inferred
- REQ-LOOP-007 inferred
- REQ-SAFE-001 inferred