Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Testpoint Editor

You identify the Testpoint constraints to use on the Class Invariant dialog and the Operation Constraints dialog, but both dialogs call the Testpoint Editor dialog to enable you to:

  • List the existing conditions in a vertical list rather than a comma-separated string (Browse button)
  • Delete a condition applied to the invariant (Delete icon)
  • Create a new condition (New icon, then type the condition in)
  • Change the order in which the conditions are applied (Move Item Up, Move Item Down icons)

Constraint Composition:

Constraints are composed using member and local variables in expressions separated by operands such as:

  • /
  • *
  • %
  • +
  • -
  • >
  • >=
  • <
  • <=
  • OR
  • AND
  • (
  • )

The following is an example Conditional expression that returns a Boolean True/False:

( (x%2) > 1) AND (y >= 10) )


Variables can be scoped by either  '.' or '->'; for example:

c.Name  :  c.Names[0] of an array as  c.Names[0].Surname= "Smith"


There are two types of operators you can use on constraints:

  • Logical operators AND and OR can be used to combine constraints
  • Equivalence operators '=' and '!=' can be used to define the conditions of a constraint

All constraints are subject to an AND operation unless otherwise specified; you can use the OR operation on them instead, for example:

Location=0 OR

Location=1 AND



(a AND b)

(a.b AND ( b.a OR c.a))


Below are some examples of using the equivalence operators:


m_value <> 0





  • Quotes around strings are optional; the comparison for strings is always case-sensitive in determining the truth of a constraint

Learn more: