conformance_test/positive_tests added
[deliverable/titan.core.git] / conformance_test / positive_tests / 05_basic_language_elements / 0504_parametrization / 050402_actual_parameters / Sem_050402_actual_parameters_169.ttcn
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
7 *
8 * Contributors:
9 * Adrien Kirjak – initial implementation
10 *
11 ** @version 0.0.1
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 ***************************************************/
15
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
20 // more details).
21
22 module Sem_050402_actual_parameters_169 {
23
24 type component GeneralComp {
25 var integer vc_index := 0;
26 }
27
28 type record of integer RI;
29
30 function f_test(inout integer p_par1) runs on GeneralComp {
31 vc_index := 1;
32 p_par1 := 10;
33 }
34
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); }
40 }
41
42 control {
43 execute(TC_Sem_050402_actual_parameters_169());
44 }
45 }
This page took 0.03242 seconds and 5 git commands to generate.