Skip to main content

Dialog: Add Unit Test Assertion

Function: The dialog adds an assertion function for custom data types.

Call:

  • Project menu, Add Object command

  • Context menu of the Application object, Add Object command

Name of Assertion

The name of the generated assertion function.

Data type

IEC data type for which the assertion function should be generated

Type of Assertion

Custom semantics (added to Name of Assertion)

Implementation

Type

  • Value-based: Creates an assertion function for scalar values of the specified data type

  • Array-based: Creates an assertion function for arrays of the specified data type

Add implementation template

Fills the generated assertion function with a sample implementation which uses "TODO" comments to make it clear where custom logic should be used.

Add explanatory comments

Inserts a code comment in the declaration part which explains the basic operation.