Dialog: Add Unit Test Assertion
Function: The dialog adds an assert function for any data type, for example for a user-defined data type.
Call:
Project → Add Object → Unit Test Assertion menu
Context menu of the application → Add Object → Unit Test Assertion
Setting | Description |
|---|---|
Name of assertion | Name of the assert function. The Test Manager generates the name automatically from the data type and the type of the assertion. You cannot change the name here. Scheme: |
Data type | Data type for which you create the assert function. The entry is required. Click the |
Type of assertion | Name of the check, for example |
Setting | Description |
|---|---|
Type | Value-based: Creates an assert function for single values of the data type. Inputs: Array-based: Creates an assert function for arrays of the data type. Inputs/outputs: |
Add implementation template | Inserts a sample implementation which checks the reference value and the actual value for equality. A compiler warning reminds you to adapt the implementation to the type of the assertion. You must not change the lines with the comment |
Add explanatory comments | Inserts a comment in the declaration part which explains the pattern of an assert function. |
For more information, see the following: Assert Functions, Add Unit Test
