1 /******************************************************************************
2 * Copyright (c) 2000-2016 Ericsson Telecom AB
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
9 * Adrien Kirjak – initial implementation
12 ** @purpose 1:22.2.3, lazy variable in value redirect
13 ** @verdict pass accept, ttcn3verdict:pass
14 *****************************************************************/
16 // The following requirements are tested:
17 // If a variable referenced in the value, sender or @index clause is a lazy or fuzzy
18 // variable, the expression assigned to this variable is equal to the result produced
19 // by the trigger operation i.e. later evaluation of the lazy or fuzzy variable does not
20 // lead to repeated invocation of the trigger operation.
22 module Sem_220203_TriggerOperation_023 {
25 } with {extension "internal"}
27 type component GeneralComp {
31 testcase TC_Sem_220203_TriggerOperation_023() runs on GeneralComp {
32 var @lazy integer v_int;
34 connect(self:p, self:p);
38 p.trigger(integer:?) -> value v_int;
40 if (v_int == 1) { // evaluation of @lazy (receive shall not be called again)
42 [] p.receive(integer:2) { setverdict(pass); }
43 [] p.receive { setverdict(fail); }
51 execute(TC_Sem_220203_TriggerOperation_023(), 5.0);