Skip to main content

isEqualTo

Short summary

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

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

Parameters

NameTypeCommentKind
stringToCheckPOINTER TO WORDcurrent string to checkinput
expectedPOINTER TO WORDstringToCheck must be equal to expectedinput
ignoreCasesBOOLTRUE means ignore cases; FALSE means cases must be equal tooinput
messageAssertMessagemessage if the assertion is falseinput
normalizeStringsBOOLnormalize both strings for checkinput

Code

Declaration

METHOD isEqualTo
VAR_INPUT
(* current string to check *)
stringToCheck :POINTER TO WORD;
(* ``stringToCheck`` must be equal to expected *)
expected :POINTER TO WORD;
(* ``TRUE`` means ignore cases; ``FALSE`` means cases must be equal too *)
ignoreCases :BOOL;
(* message if the assertion is false *)
message :AssertMessage;
(*normalize both strings for check*)
normalizeStrings :BOOL := TRUE;
END_VAR