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:5.4.2, verify that referencing rules are correctly applied to actual parameters of out formal template parameters
13 ** @verdict pass accept, ttcn3verdict:pass
14 ***************************************************/
16 // The following requirement is tested:
17 // When actual parameters that are passed to inout and out formal value or template
18 // parameters contain a value or template reference, rules for using references on
19 // the left hand side of assignments apply.
21 module Sem_050402_actual_parameters_152 {
23 type component GeneralComp {
34 function f_test(out template integer p_val) {
38 testcase TC_Sem_050402_actual_parameters_152() runs on GeneralComp {
39 var template R v_rec := {
43 f_test(v_rec.field2.subfield1); // tested parameter passing (using referencing rules specified at 15.6.2)
44 if (match(valueof(v_rec.field2.subfield1), 10) and match(0, v_rec.field2.subfield2)) { setverdict(pass); }
45 else { setverdict(fail); }
50 execute(TC_Sem_050402_actual_parameters_152());