RST's C++ assertion tool supports two styles of assertion statements. These styles are Definition Placed assertion statements and Specification Placed assertion statements. A Definition Placed assertion statement is located in the actual method/function definition. A Specification Placed assertion statement is located in the class specification section of a C++ program. RST's Java assertion tool supports only Definition Placed assertion statements since there is no class specification section of a Java program. Both the C++ assertion tool and the Java assertion tool use the same format for their assertion statements. This format is:
<assertion type> (<condition>, <message>) ;
The <assertion type> can be either ASSERT, PRE_CONDITION, POST_CONDITION, or INVARIANT. The <condition> is a valid boolean statement written using the assertion language that is part of RST's assertion tool (that is described in the User's Manual that accompanies the ASSERT++ tool). The <message> is a text string that will be displayed when the <condition> evaluates to FALSE (referred to from here on as an assertion firing).