File: oi.ttcn

package info (click to toggle)
eclipse-titan 8.2.0-1
  • links: PTS
  • area: main
  • in suites: bookworm, sid
  • size: 103,544 kB
  • sloc: cpp: 271,008; ansic: 33,683; yacc: 23,419; makefile: 15,483; lex: 9,204; java: 4,848; perl: 4,555; sh: 2,242; xml: 1,378; javascript: 85; awk: 48; php: 32; python: 13
file content (145 lines) | stat: -rw-r--r-- 4,127 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
/******************************************************************************
 * Copyright (c) 2000-2021 Ericsson Telecom AB
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
 *
 * Contributors:
 *   Balasko, Jeno
 *
 ******************************************************************************/
module oi{

modulepar {
  //integer tsp_i:=0;
  charstring tsp_c:="tsp_c_default";
  charstring tsp_c0:="tsp_c_default0";
  charstring tsp_c1:="tsp_c_default1";
  charstring tsp_c2:="tsp_c_default2";
  
}

type component MyComp {}

function f_setverdict_C(in charstring p_value,in charstring p_expected){
   if(p_value == p_expected) { setverdict(pass) } else{ setverdict(fail, match(p_expected,p_value));};
}
with { extension "transparent" }



//***** Testcases for ordered include *****
//Goal: tsp_c is filled in in [ORDERED_INCLUDE] twice _before_ the [MODULE_PARAMETERS] section. Double depth
//See oi_before1.cfg
testcase tc_1() runs on MyComp{
  f_setverdict_C(tsp_c,"0");  
  f_setverdict_C(tsp_c0,"0");
  f_setverdict_C(tsp_c1,"1");
  f_setverdict_C(tsp_c2,"2");
}

//Goal: tsp_c is filled in inside [ORDERED_INCLUDE] _before_ the [MODULE_PARAMETERS] section in oi_before2.cfg but 
// after the [MODULE_PARAMETERS] section in oi1_after1.cfg
//See oi_before2.cfg
testcase tc_2() runs on MyComp{
  f_setverdict_C(tsp_c,"0");  
  f_setverdict_C(tsp_c0,"0");
  f_setverdict_C(tsp_c1,"1");
  f_setverdict_C(tsp_c2,"2");
}

//Goal: tsp_c is filled in inside [ORDERED_INCLUDE] _after_ the [MODULE_PARAMETERS] section in oi_after1.cfg but 
// before the [MODULE_PARAMETERS] section in oi1_before1.cfg
//See oi_after1.cfg
testcase tc_3() runs on MyComp{
  f_setverdict_C(tsp_c,"1"); 
  f_setverdict_C(tsp_c0,"0");
  f_setverdict_C(tsp_c1,"1");
  f_setverdict_C(tsp_c2,"2");
}

//Goal: tsp_c is filled in inside [ORDERED_INCLUDE] _after_ the [MODULE_PARAMETERS] section in oi_after1.cfg but 
// after the [MODULE_PARAMETERS] section in oi1_after1.cfg
//See oi_after2.cfg
testcase tc_4() runs on MyComp{
  f_setverdict_C(tsp_c,"2"); 
  f_setverdict_C(tsp_c0,"0");
  f_setverdict_C(tsp_c1,"1");
  f_setverdict_C(tsp_c2,"2");
}

//last: [ORDERED_INCLUDE] is the last section in the main
//See oi_last1.cfg
testcase tc_5() runs on MyComp{
  f_setverdict_C(tsp_c,"1");  
  f_setverdict_C(tsp_c0,"0");
  f_setverdict_C(tsp_c1,"1");
  f_setverdict_C(tsp_c2,"2");
}

//last: [ORDERED_INCLUDE] is the last section in the main
//See oi_last2.cfg
testcase tc_6() runs on MyComp{
  f_setverdict_C(tsp_c,"1");  
  f_setverdict_C(tsp_c0,"0");
  f_setverdict_C(tsp_c1,"1");
  f_setverdict_C(tsp_c2,"2");
}

//last: [ORDERED_INCLUDE] is the last section in the main
//See oi_last3.cfg
testcase tc_7() runs on MyComp{
  f_setverdict_C(tsp_c,"2_nomacro");  
  f_setverdict_C(tsp_c0,"0");
  f_setverdict_C(tsp_c1,"tsp_c_default1");
  f_setverdict_C(tsp_c2,"2_nomacro");
}

//last: [ORDERED_INCLUDE] is the last section in the main
//See oi_last3.cfg
testcase tc_8() runs on MyComp{
  f_setverdict_C(tsp_c,"2_nomacro");  
  f_setverdict_C(tsp_c0,"0");
  f_setverdict_C(tsp_c1,"13");
  f_setverdict_C(tsp_c2,"2_nomacro");
}

// List of [ORDERED_INCLUDE]
//See oi_after_list1.cfg
testcase tc_9() runs on MyComp{
  f_setverdict_C(tsp_c,"23");  
  f_setverdict_C(tsp_c0,"0");
  f_setverdict_C(tsp_c1,"13");
  f_setverdict_C(tsp_c2,"23");
}

//see ../oi_subfolder1.cfg
testcase tc_10() runs on MyComp{
  f_setverdict_C(tsp_c,"2_sub");  
  f_setverdict_C(tsp_c0,"0");
  f_setverdict_C(tsp_c1,"1_sub");
  f_setverdict_C(tsp_c2,"2_sub");
}

//see ../oi_include_mix.cfg
testcase tc_11() runs on MyComp{
  f_setverdict_C(tsp_c,"2");  
  f_setverdict_C(tsp_c0,"0");
  f_setverdict_C(tsp_c1,"2");
  f_setverdict_C(tsp_c2,"2");
}

//see ../oi_before5.cfg
testcase tc_12() runs on MyComp{
  f_setverdict_C(tsp_c,"1");  
  f_setverdict_C(tsp_c0,"0");
  f_setverdict_C(tsp_c1,"2");
  f_setverdict_C(tsp_c2,"2");
}
control{
  execute(tc_1());
  
}

}