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”
File and Project Information ¶ Scope Name Type Content FileHeader creationDateTime date 28.09.2023, 12:04:38 companyName string 3S-Smart Software Solutions GmbH libraryFile Test Manager IEC Unit Test.library primaryProject True productName CODESYS productProfile CODESYS V3.5 SP16 Patch 3 contentFile Test Manager IEC Unit Test.clean.json version version 2.0.0.0 ProjectInformation IsEndUserLibrary bool False Released True LastModificationDateTime date 28.09.2023, 12:04:33 LibraryCategories library-category-list Intern|TestManager Author string 3S - Smart Software Solutions GmbH Company Intern CompiledLibraryCompatibilityVersion CODESYS V3.5 SP16 Patch 3 DefaultNamespace TM Description See: Description DocFormat reStructuredText LanguageModelAttribute qualified-access-only Placeholder TestManager Project Test Manager IEC Unit Test Title Test Manager IEC Unit Test Version version 5.1.0.0
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.