NOTMATCHED

System Testing Test Script Language.

Syntax

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

Description

NOTMATCHED is a function that returns a Boolean value. It returns true if one of the messages 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 at least one received message has a value different from those defined for the reference message.

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

The NOTMATCHED 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, NOTMATCHED(msg_1))   

...   

IF (NOTMATCHED(msg_1,ch)) THEN   

...

 

Related Topics

CHANNEL | DEF_MESSAGE | WAITTIL