Skip to main content

orMaskIsNotEqualTo

Short summary​

This assertion method checks if the result current value bitwise OR mask is not equal to the unexpected value

Parameters​

NameTypeCommentKind
currentValueBYTEcurrent value to checkinput
maskBYTE2nd operand for bitwise operationinput
unexpectedValueBYTEunexpected result after maskinginput
messageAssertMessagemessage if the assertion is falseinput

Code​

Declaration​

METHOD orMaskIsNotEqualTo
VAR_INPUT
(* current value to check *)
currentValue :BYTE;
(* 2nd operand for bitwise operation *)
mask :BYTE;
(* unexpected result after masking *)
unexpectedValue :BYTE;
(* message if the assertion is false *)
message :AssertMessage;
END_VAR

Implementation​

IF ((currentValue OR mask) = unexpectedValue) THEN
THIS^.assertionWasWrong(message, THIS^.getDebugInfo('orMaskIsNotEqualTo'));
END_IF