Skip to main content

IWindows125xStringPointerAssertions

Short summary​

This interface provides assert statements for Windows-1252 and Windows-1251 string pointers

Attention: All strings are handled as null-terminated byte streams

AccessAbstractFinalExtendsImplements
-NoNoIAssertCallBackSetter-

UML Diagram​

Methods​

contains​

  • Parameters:
    • stringToCheck (POINTER TO BYTE): current string to check
    • searchString (POINTER TO BYTE): string must be found in stringToCheck
    • ignoreCases (BOOL): TRUE means ignore cases; FALSE means that cases must be equal too
    • message (AssertMessage): message if the assertion is false
    • sbcsType (Tc2_Utilities.E_SBCSType): used Single Byte Character Set (SBCS), is set in Tc2_Utilities.GLOBAL_SBCS_TABLE
  • Return type: VOID

This assertion method checks if the current string stringToCheck contains the search string searchString.…

containsNo​

  • Parameters:
    • stringToCheck (POINTER TO BYTE): current string to check
    • searchString (POINTER TO BYTE): string must be found in stringToCheck
    • ignoreCases (BOOL): TRUE means ignore cases; FALSE means that cases must be equal too
    • message (AssertMessage): message if the assertion is false
    • sbcsType (Tc2_Utilities.E_SBCSType): used Single Byte Character Set (SBCS), is set in Tc2_Utilities.GLOBAL_SBCS_TABLE
  • Return type: VOID

This assertion method checks if the current string stringToCheck doesn't contain the search string searchString.…

endsWith​

  • Parameters:
    • stringToCheck (POINTER TO BYTE): current string to check
    • end (POINTER TO BYTE): string must be the end of stringToCheck
    • ignoreCases (BOOL): TRUE means ignore cases; FALSE means that 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
    • sbcsType (Tc2_Utilities.E_SBCSType): used Single Byte Character Set (SBCS), is set in Tc2_Utilities.GLOBAL_SBCS_TABLE
  • Return type: VOID

This assertion method checks if the current string stringToCheck ends with the string end.…

isEqualTo​

  • Parameters:
    • stringToCheck (POINTER TO BYTE): current string to check
    • expected (POINTER TO BYTE): stringToCheck must be equal to expected
    • ignoreCases (BOOL): TRUE means ignore cases; FALSE means that cases must be equal too
    • message (AssertMessage): message if the assertion is false
    • sbcsType (Tc2_Utilities.E_SBCSType): used Single Byte Character Set (SBCS), is set in Tc2_Utilities.GLOBAL_SBCS_TABLE
  • Return type: VOID

This assertion method checks if the current string stringToCheck is equal to expected.…

isNotEqualTo​

  • Parameters:
    • stringToCheck (POINTER TO BYTE): current string to check
    • unexpected (POINTER TO BYTE): stringToCheck must be not equal to expected
    • ignoreCases (BOOL): TRUE means ignore cases; FALSE means that cases must be equal too
    • message (AssertMessage): message if the assertion is false
    • sbcsType (Tc2_Utilities.E_SBCSType): used Single Byte Character Set (SBCS), is set in Tc2_Utilities.GLOBAL_SBCS_TABLE
  • Return type: VOID

This assertion method checks if the current string stringToCheck is not equal to unexpected.…

lengthIsBetween​

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

This assertion method checks if the current string stringToCheck length is between minLength and maxLength.…

lengthIsExact​

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

This assertion method checks if the current string stringToCheck length is equal to expectedLength.…

lengthIsMax​

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

This assertion method checks if the current string stringToCheck length is equal or less than to maxLength.…

lengthIsMin​

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

This assertion method checks if the current string stringToCheck length is equal or greater than to minLength.…

startsWith​

  • Parameters:
    • stringToCheck (POINTER TO BYTE): current string to check
    • start (POINTER TO BYTE): expected start of stringToCheck
    • ignoreCases (BOOL): TRUE means ignore cases; FALSE means that cases must be equal too
    • trim (BOOL): TRUE means truncation of spaces on the left side of stringToCheck
    • message (AssertMessage): message if the assertion is false
    • sbcsType (Tc2_Utilities.E_SBCSType): used Single Byte Character Set (SBCS), is set in Tc2_Utilities.GLOBAL_SBCS_TABLE
  • Return type: VOID

This assertion method checks if the current string stringToCheck starts with string start.…

Code​

Declaration​

INTERFACE INTERNAL IWindows125xStringPointerAssertions EXTENDS IAssertCallBackSetter