Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

TestCaseFSM_3 Class Reference

#include <TestCaseFSM_3.h>

Inheritance diagram for TestCaseFSM_3:

TestCaseGenericSetUp TestCase 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:

  1. The correctness of the DummyConfigurableFsmStates class identifier is verified.
  2. The FSM is activated twice and it is verified that this is reflected in the value of the activation counter of its state 0.
  3. It is verified that the initialization counter of state 0 is equal to 1.
  4. 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.
  5. It is checked that the correct event is created to record the occurrence of the state transition.
  6. It is checked that the exit counter of state 0 and the initialization counter of state 1 are equal to 1.
  7. 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.
  8. It is checked that the correct event to record the failure of the exit check from state 1 was generated.
  9. It is checked that the activation counter of state 1 has been incremented by 1.
  10. 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.
  11. It is checked that the correct event to record the failure of the initialization check for state 2 was generated.
  12. 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.
  13. 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.
  14. 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.
  15. It is checked that the correct event to record the failure of the transition due to all FSM transitions being disabled was generated.
  16. The FSM transitions are enabled, the FSM is activated once, and it is checked that a state transition to state 2 takes place.
  17. 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.
  18. 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]
 

Execute the test case.

See class comment for details.

Reimplemented from TestCaseGenericSetUp.

Definition at line 27 of file TestCaseFSM_3.cpp.


The documentation for this class was generated from the following files:
Copyright 2003 P&P Software GmbH - All Rights Reserved