The TESTPROC, TESTPROPERTY, and TESTSTRING command group provides a conditional capability for properties on a per-diagram basis. This command group provides similar functionality to #IFDEF, except that #IFDEF provides a conditional capability based on an encyclopedia-wide level. The TESTPROC command group works from a diagram property; a definition will contain a certain property set if a value is selected for a “test property” in the diagram’s properties.
The TESTPROC command group is especially used in logical data models, to specify data modeling property sets depending on the RDBMS chosen.
•TESTPROC stands for Test Procedure. There are two values that can follow a TESTPROC keyword: TestPropertyValue and TestPropertyNotValue.
•TestPropertyValue means “test the property and if it is the same as one of the values in the TESTSTRING specified, then apply the properties in this TESTPROC section to the definition in question”.
•TestPropertyNotValue means “test the property and if it is not the same as one of the values in the TESTSTRING specified, then apply the properties in this TESTPROC section to the definition in question”. There is case sensitivity when using TestPropertyValue and TestPropertyNotValue, the case must be exactly as specified. It does not work if you use all lowercase or all uppercase.
•TESTPROPERTY is the diagram property that will be queried.
•TESTSTRING are the values that are queried. You can list one or more values in the string.
Controls and RefProps
A Property can be used only one time in a definition (unless it is surrounded by #IFDEF statements). If the user wants to use the same property more than one time in a definition, they must use the Control and RefProp keywords. For this reason, the Control and RefProp keywords are often used in conjunction with TESTPROCs. For a Control to be used, there must be an initial reference to the Property that the Control references, at the top of the definition.
Note The TESTPROC keyword is associated with the last CHAPTER statement that is processed, and this affects the visibility of all the properties assigned to that chapter. This is the reason why, in the example given, an extra space has been added to the 2nd chapter name, so that is recorded as a new chapter block.