FW Profile - C1 Implementation
FwPrTestCases.h File Reference

Declaration of the test cases for the FW Procedure Module. More...

Go to the source code of this file.

Enumerations

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 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...
 
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...
 

Detailed Description

Declaration of the test cases for the FW Procedure Module.

Author
Vaclav Cechticky vacla.nosp@m.v.ce.nosp@m.chtic.nosp@m.ky@p.nosp@m.np-so.nosp@m.ftwa.nosp@m.re.co.nosp@m.m
Alessandro Pasetti paset.nosp@m.ti@p.nosp@m.np-so.nosp@m.ftwa.nosp@m.re.co.nosp@m.m

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.h.

Enumeration Type Documentation

Outcome of a procedure test case.

Enumerator
prTestCaseSuccess 

Test case success.

prTestCaseFailure 

Test case failure.

Definition at line 23 of file FwPrTestCases.h.

Function Documentation

FwPrTestOutcome_t FwPrTestCaseCheck1 ( )

Test the ability of the FwPrCheck function to detect configuration errors.

Returns
the success/failure code of the test case.

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.

Returns
the success/failure code of the test case.

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.

Returns
the success/failure code of the test case.

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.

Returns
the success/failure code of the test case.

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).

Returns
the success/failure code of the test case.

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).

Returns
the success/failure code of the test case.

Definition at line 2280 of file FwPrTestCases.c.

FwPrTestOutcome_t FwPrTestCaseCheck2 ( )

Test the ability of the FwPrCreate function to catch configuration errors.

Returns
the success/failure code of the test case.

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.

Returns
the success/failure code of the test case.

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.

Returns
the success/failure code of the test case.

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.

Returns
the success/failure code of the test case.

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.

Returns
the success/failure code of the test case.

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.

Returns
the success/failure code of the test case.

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.

Returns
the success/failure code of the test case.

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.

Returns
the success/failure code of the test case.

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.

Returns
the success/failure code of the test case.

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.

Returns
the success/failure code of the test case.

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:

  • A has the same action nodes with the same actions as B;
  • A has the same decision nodes as B;
  • A has the same control flows between the same nodes and with the same guards as B;

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).

Returns
the success/failure code of the test case.

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.

Returns
the success/failure code of the test case.

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.

Returns
the success/failure code of the test case.

Definition at line 1931 of file FwPrTestCases.c.

FwPrTestOutcome_t FwPrTestCaseDerCheck4 ( )

Verify the ability of function FwPrInitDer to detect and report errors.

Returns
the success/failure code of the test case.

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.

Returns
the success/failure code of the test case.

Definition at line 2111 of file FwPrTestCases.c.

FwPrTestOutcome_t FwPrTestCaseExecute1 ( )

Test the Execute command on a procedure which is stopped.

Returns
the success/failure code of the test case.

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.

Returns
the success/failure code of the test case.

Definition at line 266 of file FwPrTestCases.c.

FwPrTestOutcome_t FwPrTestCaseExecute3 ( )

Test an Execute command which triggers the traversal of several nodes.

Returns
the success/failure code of the test case.

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.

Returns
the success/failure code of the test case.

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..

Returns
the success/failure code of the test case.

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.

Returns
the success/failure code of the test case.

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.

Returns
the success/failure code of the test case.

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.

Returns
the success/failure code of the test case.

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.

Returns
the success/failure code of the test case.

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.

Returns
the success/failure code of the test case.

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.

Returns
the success/failure code of the test case.

Definition at line 2028 of file FwPrTestCases.c.

FwPrTestOutcome_t FwPrTestCaseExecute9 ( )

Verify the order of evaluation of the control flow guards.

Returns
the success/failure code of the test case.

Definition at line 2175 of file FwPrTestCases.c.

FwPrTestOutcome_t FwPrTestCaseRun1 ( )

Verify the Run command on a procedure.

Returns
the success/failure code of the test case.

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.

Returns
the success/failure code of the test case.

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.

Returns
the success/failure code of the test case.

Definition at line 167 of file FwPrTestCases.c.

P&P Software GmbH, Copyright 2011, All Rights Reserved