Assert

The Assert method can be used to indicate that one of the preparation steps for the following test case has failed. Unlike the AssertEqual method, which compares the result to the expected value on its own, the comparison here must be performed in the application code of the preparation step, and the result of the comparison must be passed to the method as a Boolean value. If an error message is also to be passed to the calling test client, the AssertMSG method should be used.
Syntax
METHOD Assert
VAR_INPUT
condition : BOOL
END_VAR
Inputs
Name | Type | Description |
|---|---|---|
condition | BOOL | A BOOL value that indicates whether the test was successful. |
Example
Assert(condition);