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, Ensure that the IUT accepts nested assignment of actual parameters.
13 ** @verdict pass accept, ttcn3verdict:pass
14 ***************************************************/
16 module Sem_050402_actual_parameters_002 {
18 type enumerated MyEnumeratedType {e_black, e_white}
21 type record MyRecord {
25 MyEnumeratedType field4,
29 template MyRecord m_parametrizedTemplate1
31 integer p_integer := 0,
32 boolean p_boolean := true,
33 address p_address := 5,
34 MyEnumeratedType p_enumerated := e_black,
35 template integer p_integerTemplate := ?
40 field4 := p_enumerated,
41 field5 := p_integerTemplate
45 template MyRecord m_parametrizedTemplate2
47 integer p_integer := 0,
48 boolean p_boolean := true,
49 address p_address := 5,
50 MyEnumeratedType p_enumerated := e_black,
51 template integer p_integerTemplate := ?
53 field1 := p_integer+1, //this line is different from the previous template
54 field2 := not p_boolean, //this line is different from the previous template
56 field4 := p_enumerated,
57 field5 := p_integerTemplate
62 type component GeneralComp {
67 testcase TC_Sem_050402_actual_parameters_002(template MyRecord p_templateSelection) runs on GeneralComp {
70 var MyRecord ExpectedValues := {
78 if (match(ExpectedValues, p_templateSelection)) {
89 execute(TC_Sem_050402_actual_parameters_002(m_parametrizedTemplate1(1,false,1,e_white,1)) );
90 execute(TC_Sem_050402_actual_parameters_002(m_parametrizedTemplate2(0,true,1,e_white,1)) );