CreateAssertionErrorMessageForStandardDatatypeSingleValue (FUN) ¶ FUNCTION CreateAssertionErrorMessageForStandardDatatypeSingleValue Helper function to create an error message for failed assertions of standard datatypes that only expect an actual value. Hint: if wsErrorMsg is used, it is recommended to change the value of the library parameter Constants.WSTRING_LENGTH . InOut: Scope Name Type Comment Inout wsAssertError WSTRING(Constants.WSTRING_LENGTH) Inout Const wsActualValue WSTRING(Constants.WSTRING_LENGTH) The actual value as WSTRING wsAssertOperator WSTRING(Constants.WSTRING_LENGTH) The assert operator e.g. Strings.IS_TRUE wsErrorMsg WSTRING(Constants.WSTRING_LENGTH) A custom error message that should be appended. If no message is provided the “Additional information” part will not be added to the returned error.
CreateAssertionErrorMessageNonEqualArrayBounds (FUN) ¶ FUNCTION CreateAssertionErrorMessageNonEqualArrayBounds Helper function to create an error message for non-equal bounds of an array. InOut: Scope Name Type Comment Inout wsAssertError WSTRING(Constants.WSTRING_LENGTH) Input diExpectedBound DINT the upper or lower bound of the reference array diActualBound DINT the upper or lower bound of the actual array xIsLowerBound BOOL if set to TRUE the error message contains Lower bounds otherwise Upper bounds diDimension DINT the dimension in which the bounds differ
Interfaces ¶ IBaseIecUnitTest (Interface) HandleAssertResult (Method) HasError (Method)
IBaseIecUnitTest (ITF) ¶ INTERFACE IBaseIecUnitTest This interface is required to use the assertion functionality for IecUnitTests Methods: HandleAssertResult HasError Structure: HandleAssertResult (Method) HasError (Method)
IBaseIecUnitTest.HandleAssertResult (METH) ¶ METHOD HandleAssertResult : BOOL This method should handle the error outputs used to evalutate the success of the unittest The default implementation should look like: CASE eAssertion_Result OF ASSERTION_RESULT.ASSERTION_FAILED: xError := TRUE; iError := 1; sInfo := wsErrorMsg; wsInfo := wsErrorMsg; wsError := wsErrorMsg; ELSE RETURN; END_CASE InOut: Scope Name Type Return HandleAssertResult BOOL Input eAssertion_Result ASSERTION_RESULT wsErrorMsg WSTRING(Constants.WSTRING_LENGTH)
IBaseIecUnitTest.HasError (METH) ¶ METHOD HasError : BOOL This method should only return xError = TRUE InOut: Scope Name Type Return HasError BOOL
Strings (GVL) ¶ Attributes: qualified_only InOut: Scope Name Type Initial Constant LEFT WSTRING “’ “ RIGHT WSTRING “ ‘” LEFT_DOT WSTRING “’.” DOT WSTRING “.” KOMMA_LEFT WSTRING “, “ TUPLE_END WSTRING “): ‘” ASSERTION_FAILED WSTRING “Assertion failed: ‘” ASSERTION_FAILED_VALUE_INDEX WSTRING “Assertion failed for value at index (” ASSERTION_FAILED_VALUE_MISMATCH_CONDITION WSTRING “Assertion failed: The given value(s) is/are not matching the condition ‘” ADDITIONAL_INFORMATION WSTRING “ Additional information: “ UNEQUAL WSTRING “<>” EQUAL WSTRING “=” GREATER_THEN WSTRING “>” LESS_THEN WSTRING “<” GREATER_EQUAL WSTRING “>=” LESS_EQUAL WSTRING “<=” CONTAINS WSTRING “CONTAINS” CONTAINS_NOT WSTRING “CONTAINS NOT” IS_FALSE WSTRING “IS FALSE” IS_TRUE WSTRING “IS TRUE” ENDS_WITH WSTRING “ENDS WITH” STARTS_WITH WSTRING “STARTS WITH” LOWER WSTRING “Lower” UPPER WSTRING “Upper”
Library Reference ¶ This is a dictionary of all referenced libraries and their name spaces. CAA Behaviour Model ¶ Library Identification ¶ Placeholder: CAA Behaviour Model Default Resolution: CAA Behaviour Model, * (CAA Technical Workgroup) Namespace: CBM Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: True SystemLibrary: False Key: CAA Behaviour Model Element Collections ¶ Library Identification ¶ Placeholder: ElementCollections Default Resolution: Element Collections, * (3S - Smart Software Solutions GmbH) Namespace: COL Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: True SystemLibrary: False Key: ElementCollections Standard64 ¶ Library Identification ¶ Placeholder: Standard64 Default Resolution: Standard64, * (System) Namespace: Standard64 Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: Standard64 StringUtils ¶ Library Identification ¶ Placeholder: StringUtils Default Resolution: StringUtils, * (System) Namespace: Stu Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: StringUtils
BOOLCOMPARE (ENUM) ¶ TYPE BOOLCOMPARE : This enum defines the possible boolean comparison modes in a test manager check. Attributes: qualified_only InOut: Name Initial Comment DONTCARE 1 We don’t check the value during this round. We intentionally start the enum values with 1 to catch uninitialized variables. ISTRUE The value is true ISFALSE The value is false RISINGEDGE The value is true, but was false during the last cycle. FALLINGEDGE The value is false, but was true during the last cycle. CONST The value is the same as in the last cycle. CONSTORRISING The value is either the same as in the last cycle, or changed from false to true. CONSTORFALLING The value is either the same as in the last cycle, or changed from true to false. TOGGLED The value is the opposite as in the last cycle.
CHECKTYPE (ENUM) ¶ TYPE CHECKTYPE : This enum defines the possible checks in a test manager check. Attributes: qualified_only InOut: Name Initial Comment NONE 1 Do no check for the target column during this cycle. We intentionally start the enum values with 1 to catch uninitialized variables. EQUAL The target variable needs to be equal to the reference column. DIFFERENT The target variable needs to be different than the reference column. SMALLER The target variable needs to be smaller than the reference column. SMALLEREQUAL The target variable needs to be smaller or equal than the reference column. BIGGER The target variable needs to be bigger than the reference column. BIGGEREQUAL The target variable needs to be bigger or equal than the reference column. RANGE The target variable needs to be in the range defined by the reference column and the upper reference column. CONST The target variable needs to be the same as in the last cycle. FALLING The target variable needs to be the same or lower than in the last cycle. INCREASING The target variable needs to be the same or bigger than in the last cycle. STRICTLY_INCREASING The target variable needs to be the lower than in the last cycle. STRICTLY_FALLING The target variable needs to be the biggerthan in the last cycle. LINEAR The target variable needs exhibit linear behaviour as defined by the linear reference columns. EDGE The target variable needs to exhibit an edge to the value in the reference column.