RUN

C++ Test Script Language

Syntax

RUN { <run item> }

Location

TEST CLASS, OTD Script

Description

The RUN statement defines the behavior of the surrounding test class.

<run item> may be one of the following entities:

These names refer to a component defined in the surrounding test class or in an inherited test class. Order is meaningful. They can refer to a nested item (the nesting sequence is specified with the list of identifiers, from the most-surrounding to the most-nested one, separated by a dot).

The RUN statement can be located either within a TEST CLASS or at the root level of a C++ Test Driver Script:

Only one RUN statement is allowed at the root of a script or within each TEST CLASS.

The RUN statement is not allowed in included scripts.

RUN items are executed sequentially.

Example

TEST CLASS ATest
{

TEST CASE tc1 {

       #s.push (i);

       CHECK (!s.full ());

}

TEST CASE tc2 {

       #s.pop ();

       CHECK (!s.empty ());

RUN {

       tc1; tc2; tc2; tc1;

}

}