Skip to main content

IUtf16StringPointerAssertions

Short summary

This interface provides assert statements for UTF-16 strings

Attention: All strings are handled as null terminated word streams. For UTF-16 is end of the string 16#00_00

AccessAbstractFinalExtendsImplements
-NoNoIAssertCallBackSetter-

UML Diagram

Methods

contains

  • Parameters:
    • stringToCheck (POINTER TO WORD): current string to check
    • searchString (POINTER TO WORD): string must be found in stringToCheck
    • ignoreCases (BOOL): TRUE means ignore cases; FALSE means cases must be equal too
    • message (AssertMessage): message if the assertion is false
    • normalizeStrings (BOOL): normalize both strings for check
  • Return type: VOID

This assertion method for UTF-16 strings checks if the current string stringToCheck contains the search string searchString

containsNo

  • Parameters:
    • stringToCheck (POINTER TO WORD): current string to check
    • searchString (POINTER TO WORD): string must be found in stringToCheck
    • ignoreCases (BOOL): TRUE means ignore cases; FALSE means cases must be equal too
    • message (AssertMessage): message if the assertion is false
    • normalizeStrings (BOOL): normalize both strings for check
  • Return type: VOID

This assertion method for UTF-16 strings checks if the current string stringToCheck contains not the search string searchString

endsWith

  • Parameters:
    • stringToCheck (POINTER TO WORD): current string to check
    • end (POINTER TO WORD): string must be the end of stringToCheck
    • ignoreCases (BOOL): TRUE means ignore cases; FALSE means cases must be equal too
    • trim (BOOL): TRUE means truncation of spaces on the right side of stringToCheck
    • message (AssertMessage): message if the assertion is false
    • normalizeStrings (BOOL): normalize both strings for check
  • Return type: VOID

This assertion method for UTF-16 strings checks if the current string stringToCheck ends with the string end

isEqualTo

  • Parameters:
    • stringToCheck (POINTER TO WORD): current string to check
    • expected (POINTER TO WORD): stringToCheck must be equal to expected
    • ignoreCases (BOOL): TRUE means ignore cases; FALSE means cases must be equal too
    • message (AssertMessage): message if the assertion is false
    • normalizeStrings (BOOL): normalize both strings for check
  • Return type: VOID

This assertion method for utf-16 strings checks if the current string stringToCheck is equal to the expected string

isNotEqualTo

  • Parameters:
    • stringToCheck (POINTER TO WORD): current string to check
    • unexpected (POINTER TO WORD): stringToCheck must be not equal to unexpected
    • ignoreCases (BOOL): TRUE means ignore cases; FALSE means cases must be equal too
    • message (AssertMessage): message if the assertion is false
    • normalizeStrings (BOOL): normalize both strings for check
  • Return type: VOID

This assertion method for utf-16 strings checks if the current string stringToCheck is not equal to the unexpected string

lengthIsBetween

  • Parameters:
    • stringToCheck (POINTER TO WORD): current string to check
    • minLength (UDINT): lower limit of the string length
    • maxLength (UDINT): upper limit of the string length
    • stringLengthUnit (UnicodeStringLengthUnit): string length units of measurement
    • message (AssertMessage): message if the assertion is false
  • Return type: VOID

This assertion method checks if the current string stringToCheck is length

lengthIsExact

  • Parameters:
    • stringToCheck (POINTER TO WORD): current string to check
    • expectedLength (UDINT): expected length of stringToCheck
    • stringLengthUnit (UnicodeStringLengthUnit): string length units of measurement
    • message (AssertMessage): message if the assertion is false
  • Return type: VOID

This assertion method checks if the current string stringToCheck is length

lengthIsMax

  • Parameters:
    • stringToCheck (POINTER TO WORD): current string to check
    • maxLength (UDINT): upper limit of the length of stringToCheck
    • stringLengthUnit (UnicodeStringLengthUnit): string length units of measurement
    • message (AssertMessage): message if the assertion is false
  • Return type: VOID

This assertion method checks if the current string stringToCheck is length

lengthIsMin

  • Parameters:
    • stringToCheck (POINTER TO WORD): current string to check
    • minLength (UDINT): lower limit of the length of stringToCheck
    • stringLengthUnit (UnicodeStringLengthUnit): string length units of measurement
    • message (AssertMessage): message if the assertion is false
  • Return type: VOID

This assertion method checks if the current string stringToCheck is length

startsWith

  • Parameters:
    • stringToCheck (POINTER TO WORD): current string to check
    • start (POINTER TO WORD): expected start of stringToCheck
    • ignoreCases (BOOL): TRUE means ignore cases; FALSE means cases must be equal too
    • trim (BOOL): TRUE means truncation of spaces on the right side of stringToCheck
    • message (AssertMessage): message if the assertion is false
    • normalizeStrings (BOOL): normalize both strings for check
  • Return type: VOID

This assertion method for UTF-16 strings checks if the current string stringToCheck strats with the string start

Code

Declaration

INTERFACE IUtf16StringPointerAssertions EXTENDS IAssertCallBackSetter