conformance_test/positive_tests added
[deliverable/titan.core.git] / conformance_test / positive_tests / 15_templates / 1508_template_restrictions / Sem_1508_TemplateRestrictions_022.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:15.8, Ensure that a template(omit) base template can be modified with template(value) restriction.
13 ** @verdict pass accept, ttcn3verdict:pass
14 *****************************************************************/
15
16 module Sem_1508_TemplateRestrictions_022 {
17
18 type component GeneralComp { }
19
20 type record ExampleType {
21 integer a,
22 boolean b optional
23 }
24
25 template(omit) ExampleType m_baseTemplate := {
26 a := 20,
27 b := true
28 }
29
30 template(value) ExampleType m_modifiedTemplate modifies m_baseTemplate := {
31 a := 22
32 }
33
34 testcase TC_Sem_1508_TemplateRestrictions_022() runs on GeneralComp {
35 if (match(valueof(m_modifiedTemplate.a), 22) and
36 match(valueof(m_modifiedTemplate.b), true)
37 ) {
38 setverdict(pass);
39 } else {
40 setverdict(fail);
41 }
42 }
43
44 control{
45 execute(TC_Sem_1508_TemplateRestrictions_022());
46 }
47
48
49 }
This page took 0.057918 seconds and 5 git commands to generate.