FW Profile - C1 Implementation
|
Implementation of test cases for FW State Machine Module. More...
Go to the source code of this file.
Functions | |
FwSmTestOutcome_t | FwSmTestCaseStart1 () |
Test the Start command on a simple state machine where the initial pseudo-state is directly connected to a proper state without an embedded state machine. More... | |
FwSmTestOutcome_t | FwSmTestCaseStart2 () |
Test the Start command on a state machine where the initial pseudo-state is connected to a choice pseudo-state. More... | |
FwSmTestOutcome_t | FwSmTestCaseStart3 () |
Test the Start command on a simple state machine where the initial pseudo-state is directly connected to a proper state with an embedded state machine. More... | |
FwSmTestOutcome_t | FwSmTestCaseStop1 () |
Test the Stop command on a state machine without embedded state machines. More... | |
FwSmTestOutcome_t | FwSmTestCaseStop2 () |
Test the Stop command for a state machine with an embedded state machine. More... | |
FwSmTestOutcome_t | FwSmTestCaseStop3 () |
Test the Stop command for a state machine with an embedded state machine. More... | |
FwSmTestOutcome_t | FwSmTestCaseExecute1 () |
Test the Execute command in a configuration where the command only causes the do-action of a simple state to be executed. More... | |
FwSmTestOutcome_t | FwSmTestCaseExecute2 () |
Test the Execute command in a configuration where the command only causes the do-action of a state with an embedded state machine to be executed. More... | |
FwSmTestOutcome_t | FwSmTestCaseExecute3 () |
Test the Execute command in a configuration where the command triggers a transition between two proper states (state S1 and S2 of SM4). More... | |
FwSmTestOutcome_t | FwSmTestCaseSelfTrans1 () |
Test a self-transition on a simple state (state S2 of SM4). More... | |
FwSmTestOutcome_t | FwSmTestCaseTrans1 () |
Test a direct transition between two simple states (states S1 and S2 of SM5). More... | |
FwSmTestOutcome_t | FwSmTestCaseTrans2 () |
Test a transition through a choice pseudo-state between two simple states (states S1 and S2 of SM5). More... | |
FwSmTestOutcome_t | FwSmTestCaseTrans3 () |
Test propagation of a transition command from an SM to its ESM in a situation where the command has no effect on the SM (but may have an effect on the ESM). More... | |
FwSmTestOutcome_t | FwSmTestCaseExecute4 () |
Test propagation of execution command to an ESM. More... | |
FwSmTestOutcome_t | FwSmTestCaseTrans4 () |
Test a transition command which triggers a transition in both the embedding and in the embedded state machine. More... | |
FwSmTestOutcome_t | FwSmTestCaseDescDir1 () |
Verify the correct behaviour of a state machine descriptor which was created by directly instantiating and initializing its internal data structures. More... | |
FwSmTestOutcome_t | FwSmTestCaseDescStatic2 () |
Verify the correct behaviour of a state machine descriptor which was created statically using the services offered by FwSmSCreate.h . More... | |
FwSmTestOutcome_t | FwSmTestCaseConfigErr1 () |
Test an application which attempts to perform illegal configuration operations on a State Machine Descriptor. More... | |
FwSmTestOutcome_t | FwSmTestCaseCheck1 () |
Verify the ability of FwSmCheck to detect and report the configuration error due to a state in a state machine not having been defined. More... | |
FwSmTestOutcome_t | FwSmTestCaseCheck2 () |
Verify the ability of FwSmCheck to detect and report the configuration error due to a choice pseudo-state in a state machine not having been defined. More... | |
FwSmTestOutcome_t | FwSmTestCaseCheck3 () |
Verify the ability of FwSmCheck to detect and report the configuration error due to a transition in a state machine not having been defined. More... | |
FwSmTestOutcome_t | FwSmTestCaseCheck4 () |
Verify the ability of FwSmCheck to detect and report the configuration error due to initial pseudo-state in a state machine not having been defined. More... | |
FwSmTestOutcome_t | FwSmTestCaseCheck5 () |
Verify the ability of FwSmCheck to detect and report the configuration error due an out-going transition from a state not having been defined. More... | |
FwSmTestOutcome_t | FwSmTestCaseCheck6 () |
Verify the ability of FwSmCheck to detect and report the configuration error due an out-going transition from a state not having been defined. More... | |
FwSmTestOutcome_t | FwSmTestCaseCheck7 () |
Verify the ability of the configuration functions of a state machine to detect and report the following situation: a state is defined as having zero out-going transitions but then an attempt is made to add a transition which has that state as its source. More... | |
FwSmTestOutcome_t | FwSmTestCaseCheck8 () |
Verify the ability of the configuration functions of a state machine to detect and report the following situation: a choice pseudo-state is defined as having two out-going transitions but then an attempt is made to add three transitions which have that choice pseudo-state as their source. More... | |
FwSmTestOutcome_t | FwSmTestCaseCheck9 () |
Verify the ability of the configuration check to detect and report a configuration error in an embedded state machine. More... | |
FwSmTestOutcome_t | FwSmTestCaseCheck10 () |
Verify the ability of the configuration functions of a state machine to detect and report the following situation: a transition is defined having an illegal destination. More... | |
FwSmTestOutcome_t | FwSmTestCaseTrans5 () |
Test a transition from a state to the final pseudo-state passing through a choice pseudo-state. More... | |
FwSmTestOutcome_t | FwSmTestCaseDummySM1 () |
Verify the behaviour of a degenerate state machine which has no states. More... | |
FwSmTestOutcome_t | FwSmTestCaseDummySM9 () |
Verify the behaviour of a degenerate state machine which has no transitions other than the transition out of the initial pseudo-state. More... | |
FwSmTestOutcome_t | FwSmTestCaseDummySM9Static () |
Verify the behaviour of a degenerate state machine which has no transitions other than the transition out of the initial pseudo-state. More... | |
FwSmTestOutcome_t | FwSmTestCaseCheck11 () |
Verify the ability of the state machine configuration functions to detect and report illegal configuration operations. More... | |
FwSmTestOutcome_t | FwSmTestCaseCheck12 () |
Verify the ability of FwSmCheck to detect and report the configuration error due a transition having an illegal destination. More... | |
FwSmTestOutcome_t | FwSmTestCaseTrans6 () |
Test a transition from one state to another state with an embedded state machine. More... | |
FwSmTestOutcome_t | FwSmTestCaseCheck14 () |
Verify the ability of the configuration functions of a state machine to detect and report the following situation: a transition is defined having an source (either a state or a choice pseudo-state). More... | |
FwSmTestOutcome_t | FwSmTestCaseCheck15 () |
Verify the ability of the state machine creation function FwSmCreate to detect illegal values of its parameters. More... | |
FwSmTestOutcome_t | FwSmTestCaseTransErr1 () |
Test a transition which goes through a choice pseudo-state without any out-going transition with a true guard. More... | |
FwSmTestOutcome_t | FwSmTestCaseDummySM3 () |
Verify the behaviour of a degenerate state machine which consists of a single direct transition from initial to final pseudo-state. More... | |
FwSmTestOutcome_t | FwSmTestCaseTransErr2 () |
Test a transition which has a choice pseudo-state as both source and destination. More... | |
FwSmTestOutcome_t | FwSmTestCaseCheck16 () |
Verify the ability of the configuration functions of a state machine to detect and report the following situations: More... | |
FwSmTestOutcome_t | FwSmTestCaseCheck17 () |
Configure a state to exceed the maximum number of actions and check that an error is reported. More... | |
FwSmTestOutcome_t | FwSmTestCaseCheck18 () |
Configure a transitions to exceed the maximum number of actions and the maximum number of guards and check that an error is reported. More... | |
FwSmTestOutcome_t | FwSmTestCaseCheck19 () |
Configure a state machine to have too few actions and check that FwSmCheck detects and reports this situation as an error. More... | |
FwSmTestOutcome_t | FwSmTestCaseCheck20 () |
Configure a state machine to have too few actions and check that FwSmCheck detects and reports this situation as an error. More... | |
FwSmTestOutcome_t | FwSmTestCaseCheck21 () |
Configure a state machine to have a state which is not reachable and check that FwSmCheck detects and reports this situation as an error. More... | |
FwSmTestOutcome_t | FwSmTestCaseCheck22 () |
Configure a state machine to have a choice pseudo-state which is not reachable and check that FwSmCheck detects and reports this situation as an error. More... | |
FwSmTestOutcome_t | FwSmTestCaseDescStatic3 () |
Create state machine SM1 statically and then check that it behaves correctly. More... | |
FwSmTestOutcome_t | FwSmTestCasePrint1 () |
Verify the ability of the FwSmPrintConfig function to write to a file the configuration of a state machine which is correctly and fully configured. More... | |
FwSmTestOutcome_t | FwSmTestCasePrint2 () |
Verify the ability of the FwSmPrintConfig function to write to a file the configuration of a state machine which is either incorrectly or partially configured or which is "degenerate" (e.g. More... | |
FwSmTestOutcome_t | FwSmTestCaseExecute5 () |
Verify the 'Execute' command when it triggers a transition from a state to a choice pseudo-state and to the final pseudo-state. More... | |
FwSmTestOutcome_t | FwSmTestCaseDer1 () |
Create a derived state machine by extending state machine SM5 (see FwSmMakeTestSM5 ) and then verify that the extended state machine behaves like its base. More... | |
FwSmTestOutcome_t | FwSmTestCaseDer2 () |
Create a derived state machine by extending state machine SM1 (see FwSmMakeTestSM1 ), override one of its actions and one of its guards, and then verify the correct behaviour of the derived state machine. More... | |
FwSmTestOutcome_t | FwSmTestCaseDer3 () |
Create a derived state machine by extending state machine SM6 (see FwSmMakeTestSM6 ) and then verify that the extended state machine behaves like its base. More... | |
FwSmTestOutcome_t | FwSmTestCaseDerConfigErr1 () |
Verify the ability of the configuration operation on a derived state machine to detect and report errors. More... | |
FwSmTestOutcome_t | FwSmTestCaseDerEmbed1 () |
Verify the ability of the configuration functions of a derived state machines to detect and report errors while embedding a state machine within a state of a derived state machine. More... | |
FwSmTestOutcome_t | FwSmTestCaseJunction1 () |
Verify the use of a choice pseudo-state acting as a "junction" to join two branches from two different states. More... | |
FwSmTestOutcome_t | FwSmTestCaseDer4 () |
Create a derived state machine by extending state machine SM5 (see FwSmMakeTestSM5 ) and then verify that the extended state machine behaves like its base. More... | |
FwSmTestOutcome_t | FwSmTestCaseDerErr1 () |
Instantiate a derived state machine and try to initialize it with a base state machine with the wrong number of actions/guards and check that the error is detected and reported. More... | |
FwSmTestOutcome_t | FwSmTestCaseDer5 () |
Create a derived state machine by extending state machine SM1 (see FwSmMakeTestSM1 ), override one of its actions and one of its guards, and then verify the correct behaviour of the derived state machine. More... | |
FwSmTestOutcome_t | FwSmTestCaseConfigErr2 () |
Configure a state machine and then try to re-configure it and check that the reconfiguration attempt fails. More... | |
FwSmTestOutcome_t | FwSmTestCaseDerConfig1 () |
Create a derived state machine dynamically and then check the configuration of the newly created state machine. More... | |
FwSmTestOutcome_t | FwSmTestCaseDerConfig2 () |
Create a derived state machine statically and then check the configuration of the newly created state machine. More... | |
FwSmTestOutcome_t | FwSmTestCaseExecCnt1 () |
Verify the functioning of the execution counters. More... | |
FwSmTestOutcome_t | FwSmTestCaseDer6 () |
Create a derived state machine by extending state machine SM11 (see FwSmMakeTestSM11 ), and then verify the correct behaviour of the derived state machine. More... | |
FwSmTestOutcome_t | FwSmTestCaseTrans7 () |
Verify the order of evaluation of guards on transitions out of a proper state. More... | |
FwSmTestOutcome_t | FwSmTestCaseTrans8 () |
Verify the order of evaluation of guards on transitions out of a choice pseudo-state. More... | |
Variables | |
int | fwSm_logMarker [LOG_ARRAY_SIZE] |
Log array where state machine operations write their marker. More... | |
int | fwSm_logState [LOG_ARRAY_SIZE] |
Log array where SM operations write the state of their SM. More... | |
int | fwSm_logIndex |
Index for write operations in log arrays. More... | |
Implementation of test cases for FW State Machine Module.
This file is part of the FW Profile.
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
For information on alternative licensing, please contact P&P Software GmbH.
Definition in file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseCheck1 | ( | ) |
Verify the ability of FwSmCheck
to detect and report the configuration error due to a state in a state machine not having been defined.
Definition at line 1412 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseCheck10 | ( | ) |
Verify the ability of the configuration functions of a state machine to detect and report the following situation: a transition is defined having an illegal destination.
Definition at line 1727 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseCheck11 | ( | ) |
Verify the ability of the state machine configuration functions to detect and report illegal configuration operations.
The following illegal configuration operations are attempted:
Definition at line 1987 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseCheck12 | ( | ) |
Verify the ability of FwSmCheck
to detect and report the configuration error due a transition having an illegal destination.
Definition at line 2025 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseCheck14 | ( | ) |
Verify the ability of the configuration functions of a state machine to detect and report the following situation: a transition is defined having an source (either a state or a choice pseudo-state).
Definition at line 2135 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseCheck15 | ( | ) |
Verify the ability of the state machine creation function FwSmCreate
to detect illegal values of its parameters.
The following error situations are checked:
Definition at line 2178 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseCheck16 | ( | ) |
Verify the ability of the configuration functions of a state machine to detect and report the following situations:
Definition at line 2329 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseCheck17 | ( | ) |
Configure a state to exceed the maximum number of actions and check that an error is reported.
This test performs the following actions:
Definition at line 2360 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseCheck18 | ( | ) |
Configure a transitions to exceed the maximum number of actions and the maximum number of guards and check that an error is reported.
This test performs the following actions:
Definition at line 2398 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseCheck19 | ( | ) |
Configure a state machine to have too few actions and check that FwSmCheck
detects and reports this situation as an error.
Definition at line 2436 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseCheck2 | ( | ) |
Verify the ability of FwSmCheck
to detect and report the configuration error due to a choice pseudo-state in a state machine not having been defined.
Definition at line 1445 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseCheck20 | ( | ) |
Configure a state machine to have too few actions and check that FwSmCheck
detects and reports this situation as an error.
Definition at line 2477 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseCheck21 | ( | ) |
Configure a state machine to have a state which is not reachable and check that FwSmCheck
detects and reports this situation as an error.
Definition at line 2518 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseCheck22 | ( | ) |
Configure a state machine to have a choice pseudo-state which is not reachable and check that FwSmCheck
detects and reports this situation as an error.
Definition at line 2546 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseCheck3 | ( | ) |
Verify the ability of FwSmCheck
to detect and report the configuration error due to a transition in a state machine not having been defined.
Definition at line 1477 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseCheck4 | ( | ) |
Verify the ability of FwSmCheck
to detect and report the configuration error due to initial pseudo-state in a state machine not having been defined.
Definition at line 1510 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseCheck5 | ( | ) |
Verify the ability of FwSmCheck
to detect and report the configuration error due an out-going transition from a state not having been defined.
Definition at line 1543 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseCheck6 | ( | ) |
Verify the ability of FwSmCheck
to detect and report the configuration error due an out-going transition from a state not having been defined.
Definition at line 1575 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseCheck7 | ( | ) |
Verify the ability of the configuration functions of a state machine to detect and report the following situation: a state is defined as having zero out-going transitions but then an attempt is made to add a transition which has that state as its source.
Definition at line 1610 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseCheck8 | ( | ) |
Verify the ability of the configuration functions of a state machine to detect and report the following situation: a choice pseudo-state is defined as having two out-going transitions but then an attempt is made to add three transitions which have that choice pseudo-state as their source.
Definition at line 1641 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseCheck9 | ( | ) |
Verify the ability of the configuration check to detect and report a configuration error in an embedded state machine.
This test performs the following actions:
FwSmCheck
function finds no configuration errors in the embedding state machine.FwSmCheckRec
function reports a configuration error (due to the embedded state machine being incorrectly configured).Definition at line 1677 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseConfigErr1 | ( | ) |
Test an application which attempts to perform illegal configuration operations on a State Machine Descriptor.
This test attempts the following illegal configuration operations:
Definition at line 1324 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseConfigErr2 | ( | ) |
Configure a state machine and then try to re-configure it and check that the reconfiguration attempt fails.
The SM13 state machine (see FwSmMakeTestSM1
) is first created and configured and then it is checked that the following operations fail:
Definition at line 3559 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseDer1 | ( | ) |
Create a derived state machine by extending state machine SM5 (see FwSmMakeTestSM5
) and then verify that the extended state machine behaves like its base.
The extension of the base state machine is done using the dynamic creation interface of FwSmDCreate.h
. This test is performed upon a state machine derived from SM5 (see FwSmMakeTestSM5
) without overriding any of its actions or guards. The test performs the following actions on the derived state machine:
Definition at line 2830 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseDer2 | ( | ) |
Create a derived state machine by extending state machine SM1 (see FwSmMakeTestSM1
), override one of its actions and one of its guards, and then verify the correct behaviour of the derived state machine.
The items which are overridden are as follows:
incrCnt1By1
(increment Counter_1 by 1) is overridden with function incrCnt1By8
(increment Counter_1 by 8).retFlag1
(return Flag_1) is overridden with guard retFlag2
(return Flag_2).The resulting state machine has the following characteristics (see also figure below):
counter_1
by 8.counter_1
by 2.counter_2
by 1.flag_2
.The extension of the base state machine is done using the dynamic creation interface of FwSmDCreate.h
.
The following actions are performed on the derived state machine:
Definition at line 2915 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseDer3 | ( | ) |
Create a derived state machine by extending state machine SM6 (see FwSmMakeTestSM6
) and then verify that the extended state machine behaves like its base.
The extension of the base state machine is done using the dynamic creation interface of FwSmDCreate.h
. The base state machine is extended after having been started. None of its actions or guards is overridden.
The following actions are performed on the derived state machine:
Definition at line 2997 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseDer4 | ( | ) |
Create a derived state machine by extending state machine SM5 (see FwSmMakeTestSM5
) and then verify that the extended state machine behaves like its base.
The extension of the base state machine is done using the static creation interface of FwSmSCreate.h
. This test is performed upon a state machine derived from test state machine SM5 (see FwSmMakeTestSM5
) without overriding any of its actions or guards. The test performs the following actions on the derived state machine:
Definition at line 3343 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseDer5 | ( | ) |
Create a derived state machine by extending state machine SM1 (see FwSmMakeTestSM1
), override one of its actions and one of its guards, and then verify the correct behaviour of the derived state machine.
The items which are overridden are as follows:
incrCnt1By1
(increment Counter_1 by 1) is overridden with function incrCnt1By8
(increment Counter_1 by 8).retFlag1
(return Flag_1) is overridden with guard retFlag2
(return Flag_2).The resulting state machine has the following characteristics (see also figure below):
counter_1
by 8.counter_1
by 2.counter_2
by 1.flag_2
.The extension of the base state machine is done using the static creation interface of FwSmSCreate.h
.
This test is performed upon a state machine derived from test state machine SM1 (see FwSmMakeTestSM1
) without overriding any of its actions or guards. The test performs the following actions on the derived state machine:
Definition at line 3484 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseDer6 | ( | ) |
Create a derived state machine by extending state machine SM11 (see FwSmMakeTestSM11
), and then verify the correct behaviour of the derived state machine.
Neither action nor guard is overridden in the derived state machine. State Machine SM11 is a degenerate state machine with neither states nor choice pseudo-states.
The extension of the base state machine is done using the dynamic creation interface of FwSmDCreate.h
.
The test performs the following actions on the derived state machine:
Definition at line 3895 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseDerConfig1 | ( | ) |
Create a derived state machine dynamically and then check the configuration of the newly created state machine.
The following checks are done:
The base state machine is in the STARTED state at the time the extension is made and its error code has been forced to a non-nominal value.
Definition at line 3632 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseDerConfig2 | ( | ) |
Create a derived state machine statically and then check the configuration of the newly created state machine.
The following checks are done:
The base state machine is in the STOPPED state at the time the extension is made and its error code has been forced to a non-nominal value.
Definition at line 3696 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseDerConfigErr1 | ( | ) |
Verify the ability of the configuration operation on a derived state machine to detect and report errors.
The derived state machine is created using the dynamic creation interface of FwSmDCreate.h
. The following error situations are covered by this test:
Definition at line 3131 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseDerEmbed1 | ( | ) |
Verify the ability of the configuration functions of a derived state machines to detect and report errors while embedding a state machine within a state of a derived state machine.
The following error situations are covered:
Definition at line 3206 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseDerErr1 | ( | ) |
Instantiate a derived state machine and try to initialize it with a base state machine with the wrong number of actions/guards and check that the error is detected and reported.
Definition at line 3425 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseDescDir1 | ( | ) |
Verify the correct behaviour of a state machine descriptor which was created by directly instantiating and initializing its internal data structures.
This test is performed upon test state machine SM5 (see FwSmMakeTestSM5Dir
). The test performs the following actions:
Definition at line 1175 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseDescStatic2 | ( | ) |
Verify the correct behaviour of a state machine descriptor which was created statically using the services offered by FwSmSCreate.h
.
This test is performed upon test state machine SM5 (see FwSmMakeTestSM5Static
). The test performs the following actions:
Definition at line 1250 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseDescStatic3 | ( | ) |
Create state machine SM1 statically and then check that it behaves correctly.
This test is performed upon test state machine SM1 (see FwSmMakeTestSM1Static
). The test performs the following actions:
Definition at line 2576 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseDummySM1 | ( | ) |
Verify the behaviour of a degenerate state machine which has no states.
This test is performed upon test state machine SM8 (see FwSmMakeTestSM8
). The state machine is started and it is verified that this brings it to the final pseudo-state.
Definition at line 1816 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseDummySM3 | ( | ) |
Verify the behaviour of a degenerate state machine which consists of a single direct transition from initial to final pseudo-state.
This test is performed upon test state machine SM11 (see FwSmMakeTestSM11
). The test starts the state machine and verifies that this results in the state machine terminating.
Definition at line 2253 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseDummySM9 | ( | ) |
Verify the behaviour of a degenerate state machine which has no transitions other than the transition out of the initial pseudo-state.
This test is performed upon test state machine SM9 (see FwSmMakeTestSM9
). The test performs the following actions:
Definition at line 1858 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseDummySM9Static | ( | ) |
Verify the behaviour of a degenerate state machine which has no transitions other than the transition out of the initial pseudo-state.
The degenerate state machine is created statically using the services defined in FwSmSCreate.h
. This test is performed upon test state machine SM9 (see FwSmMakeTestSM9
). The test performs the following actions:
Definition at line 1923 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseExecCnt1 | ( | ) |
Verify the functioning of the execution counters.
This test case uses the test state machine SM15 (see FwSmMakeTestSM15
and performs the following actions:
Definition at line 3755 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseExecute1 | ( | ) |
Test the Execute command in a configuration where the command only causes the do-action of a simple state to be executed.
This test is performed upon test state machine SM1 (see FwSmMakeTestSM1
). The test performs the following actions:
Definition at line 464 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseExecute2 | ( | ) |
Test the Execute command in a configuration where the command only causes the do-action of a state with an embedded state machine to be executed.
This test is performed upon test state machine SM3 (see FwSmMakeTestSM3
). The test performs the following actions:
Definition at line 523 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseExecute3 | ( | ) |
Test the Execute command in a configuration where the command triggers a transition between two proper states (state S1 and S2 of SM4).
This test is performed upon test state machine SM4 (see FwSmMakeTestSM4
). The test performs the following actions:
Definition at line 600 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseExecute4 | ( | ) |
Test propagation of execution command to an ESM.
This test is performed upon test state machine SM6 (see FwSmMakeTestSM6
). The test performs the following actions:
Definition at line 986 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseExecute5 | ( | ) |
Verify the 'Execute' command when it triggers a transition from a state to a choice pseudo-state and to the final pseudo-state.
This test is performed upon test state machine SM13 (see FwSmMakeTestSM13
). The test performs the following actions:
Definition at line 2776 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseJunction1 | ( | ) |
Verify the use of a choice pseudo-state acting as a "junction" to join two branches from two different states.
This test is performed upon test state machine SM13 (see FwSmMakeTestSM13
). The test performs the following actions:
Definition at line 3291 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCasePrint1 | ( | ) |
Verify the ability of the FwSmPrintConfig
function to write to a file the configuration of a state machine which is correctly and fully configured.
The configuration of the state machines is written to file FwSmPrint.out
. This test case always returns smSuccess
. Correctness of behaviour requires an inspection of the output file.
Definition at line 2635 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCasePrint2 | ( | ) |
Verify the ability of the FwSmPrintConfig
function to write to a file the configuration of a state machine which is either incorrectly or partially configured or which is "degenerate" (e.g.
has no proper states). The configuration of the state machines is written to file FwSmPrint.out
. This test case always returns smSuccess
. Correctness of behaviour requires an inspection of the output file.
Definition at line 2730 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseSelfTrans1 | ( | ) |
Test a self-transition on a simple state (state S2 of SM4).
This test is performed upon test state machine SM4 (see FwSmMakeTestSM4
). The test performs the following actions:
Definition at line 651 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseStart1 | ( | ) |
Test the Start command on a simple state machine where the initial pseudo-state is directly connected to a proper state without an embedded state machine.
The test performs the following actions:
The checks are performed on test state machine SM1 (see FwSmMakeTestSM1
).
Definition at line 103 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseStart2 | ( | ) |
Test the Start command on a state machine where the initial pseudo-state is connected to a choice pseudo-state.
The choice pseudo-state has two out-going transitions. The effect of the Start command is verified in two cases corresponding to the state machine selecting first one and then the other out-going transition from the choice pseudo-state. The checks are performed on test state machine SM2 (see FwSmMakeTestSM2
).
Definition at line 166 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseStart3 | ( | ) |
Test the Start command on a simple state machine where the initial pseudo-state is directly connected to a proper state with an embedded state machine.
The test starts the state machine and verifies the state of the outer and of the embedded state machine. The checks are performed on test state machine SM3 (see FwSmMakeTestSM3
).
Definition at line 222 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseStop1 | ( | ) |
Test the Stop command on a state machine without embedded state machines.
The test performs the following actions:
The checks are performed on test state machine SM1 (see FwSmMakeTestSM1
).
Definition at line 280 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseStop2 | ( | ) |
Test the Stop command for a state machine with an embedded state machine.
The embedding state machine is test state machine SM3 (see FwSmMakeTestSM3
). This state machine is brought to its state S1 which has an embedded state machine. The embedded state machine is brought to its state S1. The embedding state machine is stopped and it is verified that the Stop command is correctly propagated to the embedded state machine.
Definition at line 332 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseStop3 | ( | ) |
Test the Stop command for a state machine with an embedded state machine.
The embedding state machine is test state machine SM3 (see FwSmMakeTestSM3
). This state machine is brought to its state S1 which has an embedded state machine. The embedded state machine terminates (it enters its final pseudo-state). The embedding state machine is stopped and it is verified that the Stop command is correctly executed on the embedding state machine and has no effect on the embedded state machine.
Definition at line 398 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseTrans1 | ( | ) |
Test a direct transition between two simple states (states S1 and S2 of SM5).
This test is performed upon test state machine SM5 (see FwSmMakeTestSM5
). The test performs the following actions:
Definition at line 708 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseTrans2 | ( | ) |
Test a transition through a choice pseudo-state between two simple states (states S1 and S2 of SM5).
This test is performed upon test state machine SM5 (see FwSmMakeTestSM5
). The test performs the following actions:
Definition at line 773 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseTrans3 | ( | ) |
Test propagation of a transition command from an SM to its ESM in a situation where the command has no effect on the SM (but may have an effect on the ESM).
This test is performed upon test state machine SM6 (see FwSmMakeTestSM6
). The test performs the following actions:
Definition at line 861 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseTrans4 | ( | ) |
Test a transition command which triggers a transition in both the embedding and in the embedded state machine.
This test is performed upon test state machine SM6 (see FwSmMakeTestSM6
). The test performs the following actions:
Definition at line 1077 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseTrans5 | ( | ) |
Test a transition from a state to the final pseudo-state passing through a choice pseudo-state.
This test is performed upon test state machine SM7 (see FwSmMakeTestSM7
). The test performs the following actions:
Definition at line 1762 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseTrans6 | ( | ) |
Test a transition from one state to another state with an embedded state machine.
This test is performed upon test state machine SM10 (see FwSmMakeTestSM10
). The test performs the following actions:
Definition at line 2060 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseTrans7 | ( | ) |
Verify the order of evaluation of guards on transitions out of a proper state.
The test is performed on state machine SM16 (see figure below). Three different versions of the state machine are used which differ for the order in which the transitions are added to the state machine during the state machine configuration process.
The test performs the following actions on the state machine SM16:
Definition at line 3946 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseTrans8 | ( | ) |
Verify the order of evaluation of guards on transitions out of a choice pseudo-state.
The test is performed on state machine SM16 (see figure below). Three different versions of the state machine are used which differ for the order in which the transitions are added to the state machine during the state machine configuration process.
The test performs the following actions on the state machine SM16:
Definition at line 4037 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseTransErr1 | ( | ) |
Test a transition which goes through a choice pseudo-state without any out-going transition with a true guard.
This test is performed upon test state machine SM2 (see FwSmMakeTestSM2
). The test performs the following actions:
Definition at line 2210 of file FwSmTestCases.c.
FwSmTestOutcome_t FwSmTestCaseTransErr2 | ( | ) |
Test a transition which has a choice pseudo-state as both source and destination.
This test is performed upon test state machine SM12 (see FwSmMakeTestSM12
). The state machine is started and this results in a transition being executed which has a choice pseudo-state as both source and destination (this is illegal). The test verifies that an error is reported in the state machine error code.
This test also verifies the ability of the FwSmCheck
to detect and report a situation where a state is not reachable.
Definition at line 2290 of file FwSmTestCases.c.
int fwSm_logIndex |
Index for write operations in log arrays.
Index for write operations in log arrays.
Definition at line 39 of file FwSmMakeTest.c.
int fwSm_logMarker[LOG_ARRAY_SIZE] |
Log array where state machine operations write their marker.
Log array where state machine operations write their marker.
Definition at line 30 of file FwSmMakeTest.c.
int fwSm_logState[LOG_ARRAY_SIZE] |
Log array where SM operations write the state of their SM.
Log array where SM operations write the state of their SM.
Definition at line 35 of file FwSmMakeTest.c.