NOTMATCHING

System Testing Test Script Language.

Syntax

NOTMATCHING( <ref_msg> [, <channel> ] )

Description

NOTMATCHING is a function that returns a Boolean value. It returns true if the last message received during a WAITTIL does not match the reference message <ref_msg>. If you specify a channel, it returns true only if the non-matching message was received on this channel.

<ref_msg> is a reference message variable declared with the MESSAGE instruction and initialized with the DEF_MESSAGE instruction.

<channel> is a communication channel declared with the CHANNEL instruction and initialized by the ADD_ID instruction.

It returns true if the value of the last received message differs from the values specified for the reference message.

NOTMATCHING is only meaningful when used in a WAITTIL instruction or in control statements following a WAITTIL, such as IF, WHILE, or CASE.

The NOTMATCHING return value changes when reused in a WAITTIL.

Example

...

CHANNEL ux_socket: ch

SCENARIO Main

DEF_MESSAGE msg_1, EV={100,10}

DEF_MESSAGE msg_2, EV={200,20}

...

WAITTIL(WTIME==10, NOTMATCHING(msg_2,ch))

...

IF (NOTMATCHING(msg_2,ch)) THEN   

...

Related Topics

CHANNEL | DEF_MESSAGE | WAITTIL