FW Profile - C1 Implementation
|
Implementation of test cases for FW Procedure Module. More...
Go to the source code of this file.
Functions | |
FwPrTestOutcome_t | FwPrTestCaseStart1 () |
Test the Start command for the test procedure PR2. More... | |
FwPrTestOutcome_t | FwPrTestCaseStop1 () |
Test the Stop command for the test procedure PR2. More... | |
FwPrTestOutcome_t | FwPrTestCaseExecute1 () |
Test the Execute command on a procedure which is stopped. More... | |
FwPrTestOutcome_t | FwPrTestCaseExecute2 () |
Test the Execute command on control flows from the initial nodes and between action nodes. More... | |
FwPrTestOutcome_t | FwPrTestCaseExecute3 () |
Test an Execute command which triggers the traversal of several nodes. More... | |
FwPrTestOutcome_t | FwPrTestCaseExecute4 () |
Test an Execute command which triggers the execution of a loop in the procedure. More... | |
FwPrTestOutcome_t | FwPrTestCaseExecute4Static () |
Test the behaviour of a procedure created statically. More... | |
FwPrTestOutcome_t | FwPrTestCaseExecute4Dir () |
Test the behaviour of a procedure created by directly instantiating and configuring its data structures. More... | |
FwPrTestOutcome_t | FwPrTestCaseExecute5 () |
Test a sequence of Execute command which triggers the execution of a linear sequence of actions nodes. More... | |
FwPrTestOutcome_t | FwPrTestCaseExecute5Static () |
Test the behaviour of a procedure created statically. More... | |
FwPrTestOutcome_t | FwPrTestCaseCheck1 () |
Test the ability of the FwPrCheck function to detect configuration errors. More... | |
FwPrTestOutcome_t | FwPrTestCaseCheck2 () |
Test the ability of the FwPrCreate function to catch configuration errors. More... | |
FwPrTestOutcome_t | FwPrTestCaseCheck3 () |
Test the ability of the FwPrAddActionNode and FwPrAddDecisionNode to catch configuration errors. | |
FwPrTestOutcome_t | FwPrTestCaseExecute6 () |
Test a procedure which has one single action node and no guards. More... | |
FwPrTestOutcome_t | FwPrTestCaseExecute7 () |
Test a procedure which has one decision node directly connected to the initial node. More... | |
FwPrTestOutcome_t | FwPrTestCaseCheck4 () |
Test the response to a situation where all flows out of a decision node have a false guard. More... | |
FwPrTestOutcome_t | FwPrTestCaseCheck5 () |
Test the ability of the functions which add a control flow to a procedure to detect and report a configuration error. More... | |
FwPrTestOutcome_t | FwPrTestCaseCheck6 () |
Verify the ability of the FwPrCheck function to detect and report a situation where there is an unconfigured action node in a procedure. More... | |
FwPrTestOutcome_t | FwPrTestCaseCheck7 () |
Verify the ability of the FwPrCheck function to detect and report a situation where there is an unconfigured decision node in a procedure. More... | |
FwPrTestOutcome_t | FwPrTestCaseCheck8 () |
Verify the ability of the FwPrCheck function to detect and report a situation where there is an unconfigured control flow in a procedure. More... | |
FwPrTestOutcome_t | FwPrTestCaseCheck9 () |
Verify the ability of the FwPrCheck function to detect and report a situation where there is a control flow with an illegal action node destination. More... | |
FwPrTestOutcome_t | FwPrTestCaseCheck10 () |
Verify the ability of the FwPrCheck function to detect and report a situation where there is a control flow with an illegal decision node destination. More... | |
FwPrTestOutcome_t | FwPrTestCaseCheck11 () |
Verify the ability of the FwPrCheck function to detect and report a situation where there is an undefined action. More... | |
FwPrTestOutcome_t | FwPrTestCaseCheck12 () |
Verify the ability of the FwPrCheck function to detect and report a situation where there is an undefined guard. More... | |
FwPrTestOutcome_t | FwPrTestCaseRun1 () |
Verify the Run command on a procedure. More... | |
FwPrTestOutcome_t | FwPrTestCaseDer1 () |
Create a derived procedure by extending state machine PR2 (see FwPrMakeTestPR2 ) and then verify that the extended procedure behaves like its base. More... | |
FwPrTestOutcome_t | FwPrTestCaseDerCheck1 () |
Verify that a derived procedure is, at the time it is created, a structural clone of its base procedure. More... | |
FwPrTestOutcome_t | FwPrTestCaseDerCheck2 () |
Verify the ability of the functions which override an action or a guard in a derived procedure to detect and report and error. More... | |
FwPrTestOutcome_t | FwPrTestCaseDer2 () |
Create a derived procedure by extending state machine PR2 (see FwPrMakeTestPR2 ) and by overriding one of its actions and one of its guards and then verify the behaviour of the derived procedure. More... | |
FwPrTestOutcome_t | FwPrTestCaseDer3 () |
Create a derived procedure by extending state machine PR2 (see FwPrMakeTestPR2 ) and by overriding one of its actions and one of its guards and then verify the behaviour of the derived procedure. More... | |
FwPrTestOutcome_t | FwPrTestCaseDerCheck3 () |
Verify the correctness of the initial state of a derived procedure. More... | |
FwPrTestOutcome_t | FwPrTestCaseDerCheck4 () |
Verify the ability of function FwPrInitDer to detect and report errors. More... | |
FwPrTestOutcome_t | FwPrTestCaseExecute8 () |
Verify the functionalities associated to the Procedure Execution Counter and to the Node Execution Counter. More... | |
FwPrTestOutcome_t | FwPrTestCaseDerCheck5 () |
Verify the correctness of the initial state of a derived procedure. More... | |
FwPrTestOutcome_t | FwPrTestCaseExecute9 () |
Verify the order of evaluation of the control flow guards. More... | |
FwPrTestOutcome_t | FwPrTestCaseCheck13 () |
Verify the ability of the FwPrCheck function to detect and report a situation where there is an unreachable action node (an action node which is not the destination of any control flow). More... | |
FwPrTestOutcome_t | FwPrTestCaseCheck14 () |
Verify the ability of the FwPrCheck function to detect and report a situation where there is an unreachable decision node (a decision node which is not the destination of any control flow). More... | |
Variables | |
int | fwPrLogMarker [LOG_ARRAY_SIZE] |
Array where procedure actions write their marker. More... | |
int | fwPrLogNode [LOG_ARRAY_SIZE] |
Array where procedure actions write the state of their SM. More... | |
int | fwPrLogIndex |
Index for write operations in log arrays. More... | |
Implementation of test cases for FW Procedure 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 FwPrTestCases.c.
FwPrTestOutcome_t FwPrTestCaseCheck1 | ( | ) |
Test the ability of the FwPrCheck
function to detect configuration errors.
Definition at line 785 of file FwPrTestCases.c.
FwPrTestOutcome_t FwPrTestCaseCheck10 | ( | ) |
Verify the ability of the FwPrCheck
function to detect and report a situation where there is a control flow with an illegal decision node destination.
Definition at line 1374 of file FwPrTestCases.c.
FwPrTestOutcome_t FwPrTestCaseCheck11 | ( | ) |
Verify the ability of the FwPrCheck
function to detect and report a situation where there is an undefined action.
Definition at line 1408 of file FwPrTestCases.c.
FwPrTestOutcome_t FwPrTestCaseCheck12 | ( | ) |
Verify the ability of the FwPrCheck
function to detect and report a situation where there is an undefined guard.
Definition at line 1440 of file FwPrTestCases.c.
FwPrTestOutcome_t FwPrTestCaseCheck13 | ( | ) |
Verify the ability of the FwPrCheck
function to detect and report a situation where there is an unreachable action node (an action node which is not the destination of any control flow).
Definition at line 2248 of file FwPrTestCases.c.
FwPrTestOutcome_t FwPrTestCaseCheck14 | ( | ) |
Verify the ability of the FwPrCheck
function to detect and report a situation where there is an unreachable decision node (a decision node which is not the destination of any control flow).
Definition at line 2280 of file FwPrTestCases.c.
FwPrTestOutcome_t FwPrTestCaseCheck2 | ( | ) |
Test the ability of the FwPrCreate
function to catch configuration errors.
Definition at line 825 of file FwPrTestCases.c.
FwPrTestOutcome_t FwPrTestCaseCheck4 | ( | ) |
Test the response to a situation where all flows out of a decision node have a false guard.
The test verifies that this situation is reported as an error.
Definition at line 1082 of file FwPrTestCases.c.
FwPrTestOutcome_t FwPrTestCaseCheck5 | ( | ) |
Test the ability of the functions which add a control flow to a procedure to detect and report a configuration error.
Definition at line 1131 of file FwPrTestCases.c.
FwPrTestOutcome_t FwPrTestCaseCheck6 | ( | ) |
Verify the ability of the FwPrCheck
function to detect and report a situation where there is an unconfigured action node in a procedure.
Definition at line 1245 of file FwPrTestCases.c.
FwPrTestOutcome_t FwPrTestCaseCheck7 | ( | ) |
Verify the ability of the FwPrCheck
function to detect and report a situation where there is an unconfigured decision node in a procedure.
Definition at line 1284 of file FwPrTestCases.c.
FwPrTestOutcome_t FwPrTestCaseCheck8 | ( | ) |
Verify the ability of the FwPrCheck
function to detect and report a situation where there is an unconfigured control flow in a procedure.
Definition at line 1314 of file FwPrTestCases.c.
FwPrTestOutcome_t FwPrTestCaseCheck9 | ( | ) |
Verify the ability of the FwPrCheck
function to detect and report a situation where there is a control flow with an illegal action node destination.
Definition at line 1344 of file FwPrTestCases.c.
FwPrTestOutcome_t FwPrTestCaseDer1 | ( | ) |
Create a derived procedure by extending state machine PR2 (see FwPrMakeTestPR2
) and then verify that the extended procedure behaves like its base.
The extension of the base procedure is done using the dynamic creation interface of FwPrDCreate.h
.
Definition at line 1512 of file FwPrTestCases.c.
FwPrTestOutcome_t FwPrTestCaseDer2 | ( | ) |
Create a derived procedure by extending state machine PR2 (see FwPrMakeTestPR2
) and by overriding one of its actions and one of its guards and then verify the behaviour of the derived procedure.
The extension of the base procedure is done using the dynamic creation interface of FwPrDCreate.h
.
Definition at line 1736 of file FwPrTestCases.c.
FwPrTestOutcome_t FwPrTestCaseDer3 | ( | ) |
Create a derived procedure by extending state machine PR2 (see FwPrMakeTestPR2
) and by overriding one of its actions and one of its guards and then verify the behaviour of the derived procedure.
The extension of the base procedure is done using the static creation interface of FwPrSCreate.h
.
Definition at line 1837 of file FwPrTestCases.c.
FwPrTestOutcome_t FwPrTestCaseDerCheck1 | ( | ) |
Verify that a derived procedure is, at the time it is created, a structural clone of its base procedure.
Procedure B is a structural clone of procedure A if the following conditions are satisfied:
The check is done both in the case of a derived procedure which is created dynamically (using FwPrCreate
) and of a derived procedure which is created statically (using macro FW_PR_INST_DER
).
Definition at line 1591 of file FwPrTestCases.c.
FwPrTestOutcome_t FwPrTestCaseDerCheck2 | ( | ) |
Verify the ability of the functions which override an action or a guard in a derived procedure to detect and report and error.
Definition at line 1647 of file FwPrTestCases.c.
FwPrTestOutcome_t FwPrTestCaseDerCheck3 | ( | ) |
Verify the correctness of the initial state of a derived procedure.
The procedure is derived dynamically from a base procedure which has already been started and which has an error.
Definition at line 1931 of file FwPrTestCases.c.
FwPrTestOutcome_t FwPrTestCaseDerCheck4 | ( | ) |
Verify the ability of function FwPrInitDer
to detect and report errors.
Definition at line 1996 of file FwPrTestCases.c.
FwPrTestOutcome_t FwPrTestCaseDerCheck5 | ( | ) |
Verify the correctness of the initial state of a derived procedure.
The procedure is derived statically from a base procedure which has already been started and which has an error.
Definition at line 2111 of file FwPrTestCases.c.
FwPrTestOutcome_t FwPrTestCaseExecute1 | ( | ) |
Test the Execute command on a procedure which is stopped.
Definition at line 224 of file FwPrTestCases.c.
FwPrTestOutcome_t FwPrTestCaseExecute2 | ( | ) |
Test the Execute command on control flows from the initial nodes and between action nodes.
Control flows are executed one at a time.
Definition at line 266 of file FwPrTestCases.c.
FwPrTestOutcome_t FwPrTestCaseExecute3 | ( | ) |
Test an Execute command which triggers the traversal of several nodes.
Definition at line 327 of file FwPrTestCases.c.
FwPrTestOutcome_t FwPrTestCaseExecute4 | ( | ) |
Test an Execute command which triggers the execution of a loop in the procedure.
Definition at line 388 of file FwPrTestCases.c.
FwPrTestOutcome_t FwPrTestCaseExecute4Dir | ( | ) |
Test the behaviour of a procedure created by directly instantiating and configuring its data structures.
This test case is the same as FwPrTestCaseExecute4
except that the procedure under test is created by direct instantiation and configuration of its data structures..
Definition at line 550 of file FwPrTestCases.c.
FwPrTestOutcome_t FwPrTestCaseExecute4Static | ( | ) |
Test the behaviour of a procedure created statically.
This test case is the same as FwPrTestCaseExecute4
except that the procedure under test is created statically rather than dynamically.
Definition at line 474 of file FwPrTestCases.c.
FwPrTestOutcome_t FwPrTestCaseExecute5 | ( | ) |
Test a sequence of Execute command which triggers the execution of a linear sequence of actions nodes.
Definition at line 626 of file FwPrTestCases.c.
FwPrTestOutcome_t FwPrTestCaseExecute5Static | ( | ) |
Test the behaviour of a procedure created statically.
This test case is the same as FwPrTestCaseExecute5
except that the procedure under test is created statically rather than dynamically.
Definition at line 710 of file FwPrTestCases.c.
FwPrTestOutcome_t FwPrTestCaseExecute6 | ( | ) |
Test a procedure which has one single action node and no guards.
The test verifies that execution of the procedure results in the procedure executing its single action and then terminating.
Definition at line 967 of file FwPrTestCases.c.
FwPrTestOutcome_t FwPrTestCaseExecute7 | ( | ) |
Test a procedure which has one decision node directly connected to the initial node.
Definition at line 1016 of file FwPrTestCases.c.
FwPrTestOutcome_t FwPrTestCaseExecute8 | ( | ) |
Verify the functionalities associated to the Procedure Execution Counter and to the Node Execution Counter.
Definition at line 2028 of file FwPrTestCases.c.
FwPrTestOutcome_t FwPrTestCaseExecute9 | ( | ) |
Verify the order of evaluation of the control flow guards.
Definition at line 2175 of file FwPrTestCases.c.
FwPrTestOutcome_t FwPrTestCaseRun1 | ( | ) |
Verify the Run command on a procedure.
Definition at line 1470 of file FwPrTestCases.c.
FwPrTestOutcome_t FwPrTestCaseStart1 | ( | ) |
Test the Start command for the test procedure PR2.
This test case also verifies the effect of the Start command on a procedure which has already been started.
Definition at line 118 of file FwPrTestCases.c.
FwPrTestOutcome_t FwPrTestCaseStop1 | ( | ) |
Test the Stop command for the test procedure PR2.
This test case also verifies the effect of the Stop command on a procedure which is already stopped.
Definition at line 167 of file FwPrTestCases.c.
int fwPrLogIndex |
Index for write operations in log arrays.
Index for write operations in log arrays.
Definition at line 35 of file FwPrMakeTest.c.
int fwPrLogMarker[LOG_ARRAY_SIZE] |
Array where procedure actions write their marker.
Array where procedure actions write their marker.
Definition at line 26 of file FwPrMakeTest.c.
int fwPrLogNode[LOG_ARRAY_SIZE] |
Array where procedure actions write the state of their SM.
Array where procedure actions write the state of their SM.
Definition at line 31 of file FwPrMakeTest.c.