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_188.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 it is possible to use nested actual parameter lists
13 ** @verdict pass accept, ttcn3verdict:pass
14 ***************************************************/
15
16 // The following requirement is tested:
17 // All parameterized entities specified as an actual parameter shall have their
18 // own parameters resolved in the top-level actual parameter list.
19
20 module Sem_050402_actual_parameters_188 {
21
22 type component GeneralComp {
23 }
24
25 type record R {
26 integer field1,
27 integer field2
28 }
29
30 template integer mw_int (integer p_upper) := (0..p_upper);
31
32 template R mw_rec(template integer p_field2) := {
33 field1 := 1,
34 field2 := p_field2
35 }
36
37 function f_test (template R p_match) {
38 if (match({1, 5}, p_match)) { setverdict(pass); }
39 else { setverdict(fail); }
40 }
41
42 testcase TC_Sem_050402_actual_parameters_188() runs on GeneralComp {
43 f_test(mw_rec(mw_int(10)));
44 }
45
46 control {
47 execute(TC_Sem_050402_actual_parameters_188());
48 }
49 }
This page took 0.036019 seconds and 5 git commands to generate.