Sync with 5.4.0
[deliverable/titan.core.git] / regression_test / compileonly / isbound / one_OK.ttcn
1 /******************************************************************************
2 * Copyright (c) 2000-2015 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 module one_OK
9 {
10 type record length (10) of integer int10;
11 type record length (2..infinity) of integer int2up;
12
13 type component C1
14 {
15 }
16
17 testcase tc_empty_unbound() runs on C1
18 {
19 var int10 v_int10_default;
20 var int10 v_int10_empty := {-,-,-,-,-,-,-,-,-,-};
21 }
22
23 testcase tc1() runs on C1
24 {
25 var int10 v_int10 := {1,2,-,-,-,-,-,-,-,-} // unbound
26 var int2up v_int2up := {1,-} //unbound
27
28 var integer i1 := 33;
29 var integer i2 := 2;
30 var integer i3 := i1 + i2;
31
32 if ( isvalue(v_int10) ) {
33 log(":( :( ", v_int10, " should be unbound");
34 setverdict(fail);
35 }
36 else {
37 setverdict(pass);
38 }
39
40 if ( isvalue(i1) ) {
41 log(":( :( ", i1, " should be unbound");
42 setverdict(fail);
43 }
44 else {
45 setverdict(pass);
46 }
47
48 if ( isvalue(v_int10[3]) ) {
49 log(":( :( ", v_int10[3], " should be unbound");
50 setverdict(fail);
51 }
52 else {
53 setverdict(pass);
54 }
55 }
56
57 testcase tc_full_bound() runs on C1
58 {
59 log("Start tc_full_bound");
60 var int10 v_int11 := {1,2,3,4,5,6,7,8,9,10} // bound
61 if ( isvalue(v_int11) ) {
62 setverdict(pass);
63 }
64 else {
65 log(":( :( ", v_int11, " should be bound");
66 setverdict(fail);
67 }
68 }
69
70 control
71 {
72 execute(tc1());
73 execute(tc_full_bound());
74 }
75 }
This page took 0.036544 seconds and 5 git commands to generate.