Skip to main content

valueIsMax

Short summary

This assertion method checks if the current value is less than or equal to the maximum value

Parameters

NameTypeCommentKind
currentValue__UXINTcurrent value to checkinput
maximumValue__UXINTupper limit for the current valueinput
messageAssertMessagemessage if the assertion is falseinput

Code

Declaration

METHOD valueIsMax
VAR_INPUT
(* current value to check *)
currentValue :__UXINT;
(* upper limit for the current value *)
maximumValue :__UXINT;
(* message if the assertion is false *)
message :AssertMessage;
END_VAR

Implementation

IF (currentValue > maximumValue) THEN
THIS^.assertionWasWrong(message, THIS^.getDebugInfo('valueIsMax'));
END_IF