test(fsm): add tests for the state machine and the state names

- Walk the device lifecycle; in each state check that the illegal
  transitions are refused and leave the state unchanged
- ResetDevice from each device state, ErrorFound from each state
- A transition is refused while another one is pending
- State change and new transition subscriptions, unsubscribe,
  PrepareState() and HandleStates() order
- Name round trips for all states and transitions; unknown names throw
- Add a disabled test for a known defect: ChangeState() returns true in
  the Error state

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Claude
2026-11-03 14:46:45 +00:00
committed by Dennis Klein
parent f1ae05b45c
commit dadbecf49b
2 changed files with 359 additions and 0 deletions

View File

@@ -220,6 +220,18 @@ add_testsuite(PluginServices
${environment}
)
add_testsuite(StateMachine
SOURCES
${CMAKE_CURRENT_BINARY_DIR}/runner.cxx
state_machine/_state_machine.cxx
LINKS FairMQ
INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
TIMEOUT 20
${environment}
)
add_testsuite(EventManager
SOURCES
${CMAKE_CURRENT_BINARY_DIR}/runner.cxx