conformance_test/positive_tests added
[deliverable/titan.core.git] / conformance_test / positive_tests / 06_types_and_values / 0603_type_compatibility / 060302_structured_types / Sem_060302_structured_types_002.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:6.3.2, Ensure that the IUT correctly handles assignments from structures having compatible types and lengths
13 ** @verdict pass accept, ttcn3verdict:pass
14 ***************************************************/
15
16 module Sem_060302_structured_types_002 language "TTCN-3:2010" {
17
18 type record RecordType {
19 integer a,
20 integer b optional
21 }
22
23 type set SetType {
24 integer a,
25 integer b optional
26 }
27
28 type record length (1..2) of integer ShortIntegerList;
29 type record of integer IntegerList;
30
31 type set length (1..2) of integer ShortUnorderedIntegerList;
32 type set of integer UnorderedIntegerList;
33
34
35 type component GeneralComp {
36 }
37
38 testcase TC_Sem_060302_structured_types_002() runs on GeneralComp {
39
40 var IntegerList v_list1:={1,-};
41 var ShortIntegerList v_list2;
42 var UnorderedIntegerList v_ulist1:={1,-};
43 var ShortUnorderedIntegerList v_ulist2;
44
45 var integer v_matcher[2] := {1,-};
46
47 var boolean v_check;
48
49 v_list2:=v_list1;
50 v_ulist2:=v_ulist1;
51
52 v_check := (v_list2[0]==1);
53
54
55 if ( v_check )
56 {
57 setverdict(pass);
58 }
59 else {
60 setverdict(fail);
61 }
62 }
63
64 control{
65 execute(TC_Sem_060302_structured_types_002());
66 }
67
68 }
This page took 0.055689 seconds and 5 git commands to generate.