TestCaseFSM_3 Class Reference
#include <TestCaseFSM_3.h>
Inheritance diagram for TestCaseFSM_3:
List of all members.
Detailed Description
Verify the state activation and autonomous transition operations of an FSM.
One FSM instance is created and configured with 4 DummyConfigurableFsmStates
(states 0 to 3). State i is configured to have state i+1 (modulus 4) as its next state. The following tests are then performed:
-
The correctness of the
DummyConfigurableFsmStates
class identifier is verified.
-
The FSM is activated twice and it is verified that this is reflected in the value of the activation counter of its state 0.
-
It is verified that the initialization counter of state 0 is equal to 1.
-
The termination check of state 0 is loaded with
true
, the FSM is activated and it is verified that an autonomous state transition to state 1 takes place.
-
It is checked that the correct event is created to record the occurrence of the state transition.
-
It is checked that the exit counter of state 0 and the initialization counter of state 1 are equal to 1.
-
The exit check of state 1 is loaded with
false
, and its termination check is loaded with true
, the FSM is activated and it is checked that no transition takes place.
-
It is checked that the correct event to record the failure of the exit check from state 1 was generated.
-
It is checked that the activation counter of state 1 has been incremented by 1.
-
The initialization check of state 2 is loaded with
false
, the exit check of state 1 is loaded with true
, the FSM is activated once, and it is checked that no state transition takes place.
-
It is checked that the correct event to record the failure of the initialization check for state 2 was generated.
-
The initialization check of state 2 is loaded with
true
, FSM transitions into state 2 are disabled, the FSM is activated once, and it is checked that no state transition takes place.
-
It is checked that the correct event to record the failure of the transition due to FSM transitions into state 2 being disabled was generated.
-
The FSM transitions into state 2 are enabled, all FSM state transitions are disabled, the FSM is activated once, and it is checked that no state transition takes place.
-
It is checked that the correct event to record the failure of the transition due to all FSM transitions being disabled was generated.
-
The FSM transitions are enabled, the FSM is activated once, and it is checked that a state transition to state 2 takes place.
-
It is checked that the exit counter of state 1, the initialization counter of state 2, and the activation counter of state 2 are equal to 1.
-
Non-nominal behaviour check: an attempt is made to make a transition request to a non-existent state and it is checked that the correct event is generated.
- See also:
- DC_FsmEvent
DC_DummyConfigurableFsmState
- Author:
- Alessandro Pasetti (P&P Software GmbH)
- Version:
- 1.0
Definition at line 70 of file TestCaseFSM_3.h.
|
Public Member Functions |
| TestCaseFSM_3 (void) |
| Set the identifier and the name of the test case to, respectively, ID_FSM*10+3 and "TestCaseFSM_3".
|
virtual void | runTestCase (void) |
| Execute the test case.
|
Member Function Documentation
void TestCaseFSM_3::runTestCase |
( |
void |
|
) |
[virtual] |
|
The documentation for this class was generated from the following files:
Copyright 2003 P&P Software GmbH - All Rights Reserved