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 rules for referencing are applied to actual paremeters before passing to inout formal parameters
13 ** @verdict pass accept, ttcn3verdict:pass
14 ***************************************************/
16 // The following requirement is tested:
17 // Before passing the actual parameter, the rules for referencing the element on
18 // the left hand side of assignments are applied, expanding the structured value
19 // so that the referenced element becomes accessible (see clauses 6.2 and 15.6 for
22 module Sem_050402_actual_parameters_169 {
24 type component GeneralComp {
25 var integer vc_index := 0;
28 type record of integer RI;
30 function f_test(inout integer p_par1) runs on GeneralComp {
35 testcase TC_Sem_050402_actual_parameters_169() runs on GeneralComp {
36 var RI v_ri := { 1, 2 }
37 f_test(v_ri[vc_index]); // tested parameter passing
38 if (v_ri == { 10, 2 }) { setverdict(pass); }
39 else { setverdict(fail); }
43 execute(TC_Sem_050402_actual_parameters_169());