CHECK PROPERTY

C++ Test Script Language

Syntax

CHECK PROPERTY [ "<comment>" ] <property name> [ ( <actual parameter> [ ( , <actual parameter> )* ) ]

Location

TEST CASE, PROC, STUB, CHECK STUB

Description

The CHECK PROPERTY instruction evaluates the property <property name>. If the result is TRUE, the test is passed. Otherwise, it generates an error. Error handling behavior is specified with the ON ERROR keyword.

<comment> is an optional string that appears in test results.

<property name> is a valid property defined in the current test class, in a nesting test class or in an inherited test class.

Note: properties are defined with the keyword PROPERTY.

Example

TEST CLASS TestA {

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

       TEST CASE tc1 {

              CHECK PROPERTY Empty;

       }

       RUN { tc1; }

}