PROPERTY

C++ Test Script Language

Syntax

PROPERTY <property name> [ ( <parameter> [ ( , <parameter>) ] ) ]

{ ( (<native expression>) )}

Location

TEST CLASS, TEST SUITE

Description

The PROPERTY statement associates a global state, defined by the conjunction of <native expression>, to a name. This name is visible in the TEST CLASS where the property is defined.

Note The occurrence of a property may be checked with the keyword CHECK PROPERTY.

<native expression> is a valid C++ expression that may be evaluated to a Boolean.

Example

TEST CLASS TestA {

PROPERTY Empty { ( s.count() == 0) }

TEST CASE tc1 {

CHECK PROPERTY Empty;

}

RUN { tc1; }

}