Commit | Line | Data |
---|---|---|
970ed795 EL |
1 | .****************************************************************************** |
2 | .* Copyright (c) 2000-2014 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 | :text. | |
9 | :lang eng. | |
10 | ||
11 | .* EDML webpage: http://cpi.ericsson.se/dwaxe/ | |
12 | .* EDML2PDF converter: http://dwaxe.ericsson.se/x2pdf | |
13 | .* EDML user guide: http://www.lmc.ericsson.se/~lmcmarg/isit/edml_ug.html | |
14 | ||
15 | .* Document header information | |
16 | :docname.Test Description | |
17 | :docno.20/152 91-CRL 113 200/3 Uen | |
18 | :rev.A | |
19 | :date.2013-01-17 | |
20 | ||
21 | :prep.ETH/XZR Krisztian Pandi | |
22 | :appr.ETH/XZ (Gyula Koos) | |
23 | :checked.ETHGRY | |
24 | ||
25 | :title.Test description of the TTCN-3 Semantic Analyzer: Other requirements | |
26 | :contents level=2. | |
27 | .*---------------------------------------------------------------------* | |
28 | :h1.Introduction | |
29 | .*---------------------------------------------------------------------* | |
30 | .*---------------------------------------------------------------------* | |
31 | :h2.Revision history | |
32 | .*---------------------------------------------------------------------* | |
33 | :xmp tab=2. | |
34 | REV DATE PREPARED CHANGE | |
35 | __________________________________________________ | |
36 | PA1 2005-02-19 ETHGASZ New document for TITAN R6 | |
37 | A 2005-03-18 ETHGASZ Approved after review | |
38 | B 2005-08-16 ETIBHRA New req. added (SA-9/18,19,20) | |
39 | C 2007-03-06 EJNOSZA Updates for TITAN R7A (expected error messages for identifier overloading) | |
40 | D 2007-06-08 EJNOSZA Updates for TITAN R7B (expected error messages for identifier overloading) | |
41 | E 2008-10-01 EKRISZA Updates for TITAN R7E | |
42 | F 2010-01-18 EKRISZA Updated for TITAN R8C | |
43 | K 2011-10-10 EKRISZA Updated for TITAN R8H | |
44 | A 2011-12-12 EKRISZA Updated for release | |
45 | A 2012-06-27 EFERKOV Updated for release | |
46 | A 2013-01-17 EKRIPND Updated for release | |
47 | :exmp. | |
48 | ||
49 | .*---------------------------------------------------------------------* | |
50 | :h2.Purpose | |
51 | .*---------------------------------------------------------------------* | |
52 | The purpose of this Test Description is to define and describe the function | |
53 | test activity for the Semantic Analyser functionality of the TTCN-3 compiler: | |
54 | :nl.SA-9/x: Other requirements. | |
55 | :p.The specification of the test cases can be found in this document. | |
56 | .*---------------------------------------------------------------------* | |
57 | :h1.Test environment | |
58 | .*---------------------------------------------------------------------* | |
59 | .*---------------------------------------------------------------------* | |
60 | :h2.Hardware | |
61 | .*---------------------------------------------------------------------* | |
62 | No specific hardware requirement. | |
63 | .*---------------------------------------------------------------------* | |
64 | :h2.Software | |
65 | .*---------------------------------------------------------------------* | |
66 | Tests shall be carried out on the following platforms: | |
67 | :list. | |
68 | :li D='1.'.Solaris 8 (Sun OS 5.8) (gcc 3.0.4) | |
69 | :li D='2.'.SUSE Linux Enterprise server 8 (2.4.19-4GB) (gcc 3.2) | |
70 | :li D='3.'.CYGWIN_NT-5.0 (Cygwin DLL: 1.5.12) on Windows 2000 (gcc 3.3.3) | |
71 | :elist. | |
72 | .*---------------------------------------------------------------------* | |
73 | :h2.Configuration | |
74 | .*---------------------------------------------------------------------* | |
75 | The test environment had been setup in CVS. The tester program is stored in: | |
76 | :nl.TTCNv3/function_test/Tools/SAtester.pl | |
77 | :nl.Test cases are stored with extension .script in the directory: | |
78 | :nl.TTCNv3/function_test/Semantic_Analyser/ | |
79 | .*---------------------------------------------------------------------* | |
80 | :h2.Installation | |
81 | .*---------------------------------------------------------------------* | |
82 | Install proper TITAN binaries on the used platforms and make sure that | |
83 | your environment settings are correct: | |
84 | :list. | |
85 | :li D='1.'.TTCN3_DIR is set | |
86 | :li D='2.'.$TTCN3_DIR/bin is added to the PATH variable | |
87 | :li D='3.'.$TTCN3_DIR/lib is added to the LD_LIBRARY_PATH variable | |
88 | :li D='4.'.Perl 5.6.0 or higher is available on the platform | |
89 | :li D='5.'.Create a symlink to your Perl binary into the directory where the | |
90 | test cases are stored: | |
91 | :nl.ln -s <your Perl> perl | |
92 | :elist. | |
93 | .*---------------------------------------------------------------------* | |
94 | :h2.Test Tools | |
95 | .*---------------------------------------------------------------------* | |
96 | A tester program had been written in Perl especially for the Semantic Analyser | |
97 | tests. For the list of command line parameters, type 'SAtester.pl -help', for the | |
98 | complete documentation, type 'SAtester.pl -doc'. | |
99 | :p.Test cases are specified in the Test Description documents in EDML format. | |
100 | The tester program parses these files and generates the TTCN-3/ASN.1 modules, then | |
101 | calls the compiler to compile them. The result printout is then matched against | |
102 | different patterns to be able to set the verdict. Test cases contain not only | |
103 | the source modules, but the patterns as well. | |
104 | :p.The tester program allows one-by-one execution of test cases and batched | |
105 | execution as well. | |
106 | :p.NOTE: the tester program requires Perl 5.6.0 or higher. | |
107 | .*---------------------------------------------------------------------* | |
108 | :h2.Test cases | |
109 | .*---------------------------------------------------------------------* | |
110 | .*---------------------------------------------------------------------* | |
111 | :h3.Module Parameters->Redeclaration of a module parameter SA-9/1 | |
112 | .*---------------------------------------------------------------------* | |
113 | Requirement: Redeclaration of a module parameter. | |
114 | :nl.Explanation: | |
115 | :nl.Redefinition of the module parameter is not allowed. | |
116 | :nl. | |
117 | .*---------------------------------------------------------------------* | |
118 | :h4.Module Parameters->Redeclaration of a module parameter with a different type | |
119 | .*---------------------------------------------------------------------* | |
120 | :xmp tab=0. | |
121 | <TC - Module Parameters->Redeclaration of a module parameter with a different type> | |
122 | ||
123 | <COMPILE> | |
124 | <VERDICT_LEAF PASS> | |
125 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
126 | module ModuleA { | |
127 | modulepar { | |
128 | integer MyTSP1; | |
129 | integer MyTSP2 := 10; | |
130 | boolean MyTSP1 := false; | |
131 | boolean MyTSP2 | |
132 | } | |
133 | } | |
134 | <END_MODULE> | |
135 | <RESULT IF_PASS COUNT 2> | |
136 | (?im)\berror\b.+?duplicate.+?definition.+?MyTSP | |
137 | <END_RESULT> | |
138 | <RESULT IF_PASS COUNT 2> | |
139 | (?im)\bnote\b.+?previous.+?definition | |
140 | <END_RESULT> | |
141 | <RESULT IF_PASS COUNT 2> | |
142 | (?is)\berror: | |
143 | <END_RESULT> | |
144 | <RESULT IF_PASS POSITIVE> | |
145 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
146 | <END_RESULT> | |
147 | <END_TC> | |
148 | :exmp. | |
149 | .*---------------------------------------------------------------------* | |
150 | :h4.Module Parameters->Redeclaration of a module parameter in a different group | |
151 | .*---------------------------------------------------------------------* | |
152 | :xmp tab=0. | |
153 | ||
154 | <TC - Module Parameters->Redeclaration of a module parameter in a different group> | |
155 | ||
156 | <COMPILE> | |
157 | <VERDICT_LEAF PASS> | |
158 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
159 | module ModuleA { | |
160 | modulepar { | |
161 | integer MyTSP1; | |
162 | integer MyTSP2 := 10; | |
163 | } | |
164 | modulepar { | |
165 | boolean MyTSP1 := false; | |
166 | boolean MyTSP2 | |
167 | } | |
168 | } | |
169 | <END_MODULE> | |
170 | <RESULT IF_PASS COUNT 2> | |
171 | (?im)\berror\b.+?duplicate.+?definition.+?MyTSP | |
172 | <END_RESULT> | |
173 | <RESULT IF_PASS COUNT 2> | |
174 | (?im)\bnote\b.+?previous.+?definition | |
175 | <END_RESULT> | |
176 | <RESULT IF_PASS COUNT 2> | |
177 | (?is)\berror: | |
178 | <END_RESULT> | |
179 | <RESULT IF_PASS POSITIVE> | |
180 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
181 | <END_RESULT> | |
182 | <END_TC> | |
183 | ||
184 | :exmp. | |
185 | .*---------------------------------------------------------------------* | |
186 | :h3.Signatures->Duplicate exception type in a signature SA-9/2 | |
187 | .*---------------------------------------------------------------------* | |
188 | Requirement: Duplicate exception type in a signature. | |
189 | :nl.Explanation: | |
190 | :nl.One or more exception type is listed in a signature more than once. | |
191 | .*---------------------------------------------------------------------* | |
192 | :h4.Signatures->Duplicate exception type in a signature | |
193 | .*---------------------------------------------------------------------* | |
194 | :xmp tab=0. | |
195 | ||
196 | <TC - Signatures->Duplicate exception type in a signature> | |
197 | ||
198 | <COMPILE> | |
199 | <VERDICT_LEAF PASS> | |
200 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
201 | module ModuleA { | |
202 | signature s() noblock | |
203 | exception ( | |
204 | bitstring, boolean, charstring, universal charstring, | |
205 | integer, octetstring, objid, hexstring, verdicttype, float, | |
206 | bitstring, boolean, charstring, universal charstring, | |
207 | integer, octetstring, objid, hexstring, verdicttype, float); | |
208 | } | |
209 | <END_MODULE> | |
210 | <RESULT IF_PASS COUNT 10> | |
211 | (?im)\berror\b.+?duplicate.+?type | |
212 | <END_RESULT> | |
213 | <RESULT IF_PASS COUNT 10> | |
214 | (?im)\bnote\b.+?already.+?here | |
215 | <END_RESULT> | |
216 | <RESULT IF_PASS COUNT 10> | |
217 | (?is)\berror: | |
218 | <END_RESULT> | |
219 | <RESULT IF_PASS POSITIVE> | |
220 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
221 | <END_RESULT> | |
222 | <END_TC> | |
223 | ||
224 | :exmp. | |
225 | ||
226 | .*---------------------------------------------------------------------* | |
227 | :h3.Signatures-> 'all' shall not be mixed with additional names SA-9/2 | |
228 | .*---------------------------------------------------------------------* | |
229 | Requirement: 'all' shall not be mixed with additional names in one list. | |
230 | :nl.Explanation: | |
231 | :nl.Becasue the 'all' is not supported currently, it can not be tested. | |
232 | .*---------------------------------------------------------------------* | |
233 | :h3.Import-> Duplicated module reference in import statements SA-9/3 | |
234 | .*---------------------------------------------------------------------* | |
235 | Requirement: Duplicated module reference in import statements. | |
236 | :nl.Explanation: | |
237 | :nl.A module name is listed more than once to import from. | |
238 | .*---------------------------------------------------------------------* | |
239 | :h4.Import->Duplicated module reference in import statements | |
240 | .*---------------------------------------------------------------------* | |
241 | :xmp tab=0. | |
242 | ||
243 | <TC - Import->Duplicated module reference in import statements> | |
244 | ||
245 | <COMPILE> | |
246 | <VERDICT_LEAF PASS> | |
247 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
248 | module ModuleA { | |
249 | import from ModuleB all; | |
250 | import from ModuleB all; | |
251 | } | |
252 | <END_MODULE> | |
253 | <MODULE TTCN ModuleB ModuleB.ttcn> | |
254 | module ModuleB { | |
255 | type integer Myint; | |
256 | } | |
257 | <END_MODULE> | |
258 | <RESULT IF_PASS NEGATIVE> | |
259 | (?is)\berror: | |
260 | <END_RESULT> | |
261 | <RESULT IF_PASS POSITIVE> | |
262 | (?im)Notify: File `ModuleA.hh' was generated. | |
263 | <END_RESULT> | |
264 | <END_TC> | |
265 | ||
266 | :exmp. | |
267 | .*---------------------------------------------------------------------* | |
268 | :h3.No signatures in the test suite when using 'all' in port definition SA-9/4 | |
269 | .*---------------------------------------------------------------------* | |
270 | Requirement: No signatures in the test suite when using 'all' in port | |
271 | definition. | |
272 | :nl.Explanation:Using the all keyword in one of the lists associated to a | |
273 | :nl.port type allows all of signatures defined in the module to be | |
274 | :nl.received and sent over port. SA shall detect the cases when no | |
275 | :nl.signatures are defined in the test suite, but receive-like port | |
276 | :nl.operations (e.g. getcall, getreply, catch) are used. | |
277 | :nl.NOTE:Because the 'all' is not supported currently, it can not be tested. | |
278 | :nl.NOTE:TR698 | |
279 | .*---------------------------------------------------------------------* | |
280 | :h4.No signatures in the test suite when using 'all' in port definition | |
281 | .*---------------------------------------------------------------------* | |
282 | :xmp tab=0. | |
283 | <TC - No signatures in the test suite when using 'all' in port definition> | |
284 | ||
285 | <COMPILE> | |
286 | <VERDICT_LEAF PASS> | |
287 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
288 | module ModuleA { | |
289 | type port MyPortType1 procedure { inout all} | |
290 | type component MyComp { | |
291 | port MyPortType1 MyPort1; | |
292 | } | |
293 | } | |
294 | <END_MODULE> | |
295 | <RESULT IF_FAIL COUNT 1> | |
296 | (?is)\berror: | |
297 | <END_RESULT> | |
298 | <RESULT IF_FAIL POSITIVE> | |
299 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
300 | <END_RESULT> | |
301 | <END_TC> | |
302 | ||
303 | :exmp. | |
304 | .*---------------------------------------------------------------------* | |
305 | :h3.Communication operations->Port operation when no ports defined 9/5 | |
306 | .*---------------------------------------------------------------------* | |
307 | Requirement: Port operation when no ports defined. | |
308 | :nl.Explanation: | |
309 | :nl.Port operations on a component that has no ports defined shall be | |
310 | :nl.detected. | |
311 | .*---------------------------------------------------------------------* | |
312 | :h4.Communication operations->Port operation when no ports defined | |
313 | .*---------------------------------------------------------------------* | |
314 | :xmp tab=0. | |
315 | <TC - Communication operations->Port operation when no ports defined> | |
316 | ||
317 | <COMPILEGCC> | |
318 | <VERDICT_LEAF PASS> | |
319 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
320 | module ModuleA { | |
321 | signature MySig() noblock; | |
322 | type component MyComp { | |
323 | var integer MyVar; | |
324 | var MyComp MyWar1; | |
325 | } | |
326 | // TR 699: Port and timer operation when no ports or timer defined | |
327 | altstep MyAltstep() runs on MyComp { | |
328 | [] any port.receive { setverdict(fail); } | |
329 | [] any port.trigger { setverdict(fail); } | |
330 | [] any port.getcall { setverdict(fail); } | |
331 | [] any port.getreply { setverdict(fail); } | |
332 | [] any port.catch { setverdict(fail); } | |
333 | [] any port.check(-> sender MyWar1) { setverdict(fail); } | |
334 | [] any port.check(receive) { setverdict(fail); } | |
335 | [] any port.check(getcall) { setverdict(fail); } | |
336 | [] any port.check(getreply) { setverdict(fail); } | |
337 | [] any port.check(catch) { setverdict(fail); } | |
338 | [else] { | |
339 | all port.stop; | |
340 | all port.start; | |
341 | all port.clear; | |
342 | all timer.stop; | |
343 | } | |
344 | } | |
345 | } | |
346 | <END_MODULE> | |
347 | <RESULT IF_FAIL COUNT 1> | |
348 | (?is)\berror: | |
349 | <END_RESULT> | |
350 | <RESULT IF_FAIL POSITIVE> | |
351 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
352 | <END_RESULT> | |
353 | <END_TC> | |
354 | ||
355 | :exmp. | |
356 | .*---------------------------------------------------------------------* | |
357 | :h3.Timer operations when no timers defined SA-9/6 | |
358 | .*---------------------------------------------------------------------* | |
359 | Requirement: Timer operations when no timers defined. | |
360 | :nl.Explanation: | |
361 | :nl.Timer operations shall be handled correctly if no timers are defined. | |
362 | .*---------------------------------------------------------------------* | |
363 | :h4.Timer operations when no timers defined | |
364 | .*---------------------------------------------------------------------* | |
365 | :xmp tab=0. | |
366 | ||
367 | <TC - Timer operations when no timers defined> | |
368 | ||
369 | <COMPILEGCC> | |
370 | <VERDICT_LEAF PASS> | |
371 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
372 | module ModuleA { | |
373 | type component MyComp {} | |
374 | function MyFunc1() runs on MyComp { | |
375 | // valid | |
376 | all timer.stop; | |
377 | // TR 699: Port and timer operation when no ports or timer defined | |
378 | // would block forever | |
379 | any timer.timeout; | |
380 | if (any timer.running) { setverdict(fail); } | |
381 | else { setverdict(pass); } | |
382 | } | |
383 | testcase MyTC() runs on MyComp { | |
384 | MyFunc1(); | |
385 | } | |
386 | } | |
387 | <END_MODULE> | |
388 | <RESULT IF_FAIL COUNT 3> | |
389 | (?is)\berror: | |
390 | <END_RESULT> | |
391 | <RESULT IF_FAIL POSITIVE> | |
392 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
393 | <END_RESULT> | |
394 | <END_TC> | |
395 | ||
396 | :exmp. | |
397 | ||
398 | .*---------------------------------------------------------------------* | |
399 | :h3.Import-> Import from the same module SA-9/7 | |
400 | .*---------------------------------------------------------------------* | |
401 | Requirement: Import from the same module. | |
402 | :nl.Explanation: | |
403 | :nl.A module cannot import from itself. | |
404 | .*---------------------------------------------------------------------* | |
405 | :h4.Import->Import from the same module | |
406 | .*---------------------------------------------------------------------* | |
407 | :xmp tab=0. | |
408 | ||
409 | <TC - Import->Import from the same module> | |
410 | ||
411 | <COMPILE> | |
412 | <VERDICT_LEAF PASS> | |
413 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
414 | module ModuleA { | |
415 | import from ModuleA all; | |
416 | } | |
417 | <END_MODULE> | |
418 | <RESULT IF_PASS COUNT 1> | |
419 | (?im)\berror\b.+?\bimport\b.+?\bitself\b | |
420 | <END_RESULT> | |
421 | <END_RESULT> | |
422 | <RESULT IF_PASS COUNT 1> | |
423 | (?is)\berror: | |
424 | <END_RESULT> | |
425 | <RESULT IF_PASS POSITIVE> | |
426 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
427 | <END_RESULT> | |
428 | <END_TC> | |
429 | ||
430 | :exmp. | |
431 | ||
432 | .*---------------------------------------------------------------------* | |
433 | :h3.Functions->Return value SA-9/8 | |
434 | .*---------------------------------------------------------------------* | |
435 | Requirement: Functions->Return value. | |
436 | :nl.Explanation: | |
437 | :nl.The keyword return, when used in the body of the function with a | |
438 | :nl.return type defined in its header, always shall be followed by a value, | |
439 | :nl.a constant or variable reference or an expression presenting the return | |
440 | :nl.value. | |
441 | .*---------------------------------------------------------------------* | |
442 | :h4.Functions->Return value if no return type defined | |
443 | .*---------------------------------------------------------------------* | |
444 | :xmp tab=0. | |
445 | <TC - Functions->Return value if no return type defined> | |
446 | ||
447 | <COMPILE> | |
448 | <VERDICT_LEAF PASS> | |
449 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
450 | module ModuleA { | |
451 | // no return value, but try to return an actual value | |
452 | // catched by the parser curently | |
453 | function MyFunc1() { if(true) {return '11A7'O;}} | |
454 | } | |
455 | <END_MODULE> | |
456 | <RESULT IF_PASS COUNT 1> | |
457 | (?im)\berror\b.+?function.+?not.+?have.+?return.+?type | |
458 | <END_RESULT> | |
459 | <RESULT IF_PASS COUNT 1> | |
460 | (?is)\berror: | |
461 | <END_RESULT> | |
462 | <RESULT IF_PASS POSITIVE> | |
463 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
464 | <END_RESULT> | |
465 | <END_TC> | |
466 | :exmp. | |
467 | .*---------------------------------------------------------------------* | |
468 | :h4.Functions->Missing return value, but return type defined | |
469 | .*---------------------------------------------------------------------* | |
470 | :xmp tab=0. | |
471 | <TC - Functions->Missing return value, but return type defined> | |
472 | ||
473 | <COMPILE> | |
474 | <VERDICT_LEAF PASS> | |
475 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
476 | module ModuleA { | |
477 | // missing return value | |
478 | // catched by the parser | |
479 | function MyFunc1() return float {if(true) {return;}} | |
480 | } | |
481 | <END_MODULE> | |
482 | <RESULT IF_PASS COUNT 1> | |
483 | (?im)\berror\b.+?missing.+?return.+?value | |
484 | <END_RESULT> | |
485 | <RESULT IF_PASS COUNT 1> | |
486 | (?is)\berror.+?control.+?might.+?leave.+?without.+?reaching.+?return.+?statement | |
487 | <END_RESULT> | |
488 | <RESULT IF_PASS POSITIVE> | |
489 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
490 | <END_RESULT> | |
491 | <END_TC> | |
492 | :exmp. | |
493 | .*---------------------------------------------------------------------* | |
494 | :h4.Functions->Missing return value, but return type defined indirect case 1 | |
495 | .*---------------------------------------------------------------------* | |
496 | :xmp tab=0. | |
497 | ||
498 | <TC - Functions->Missing return value, but return type defined indirect case 1> | |
499 | ||
500 | <COMPILE> | |
501 | <VERDICT_LEAF PASS> | |
502 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
503 | module ModuleA { | |
504 | function MyFunc1() {return;} | |
505 | function MyFunc2(integer par) return integer {return (par + 10);} | |
506 | function MyFunc3() return float { | |
507 | if(true) {return MyFunc1();} | |
508 | } | |
509 | } | |
510 | <END_MODULE> | |
511 | <RESULT IF_PASS COUNT 1> | |
512 | (?is)\berror.+?control.+?might.+?leave.+?without.+?reaching.+?return.+?statement | |
513 | <END_RESULT> | |
514 | <RESULT IF_PASS COUNT 1> | |
515 | (?is)\bexpected\b.+?\bfunction\b | |
516 | <END_RESULT> | |
517 | <RESULT IF_PASS POSITIVE> | |
518 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
519 | <END_RESULT> | |
520 | <END_TC> | |
521 | :exmp. | |
522 | .*---------------------------------------------------------------------* | |
523 | :h4.Functions->Missing return value, but return type defined indirect case 2 | |
524 | .*---------------------------------------------------------------------* | |
525 | :xmp tab=0. | |
526 | ||
527 | <TC - Functions->Missing return value, but return type defined indirect case 2> | |
528 | ||
529 | <COMPILE> | |
530 | <VERDICT_LEAF PASS> | |
531 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
532 | module ModuleA { | |
533 | function MyFunc1() {return;} | |
534 | function MyFunc2(integer par) return integer {return (par + 10);} | |
535 | function MyFunc4() return float { | |
536 | if(true) {return int2float( MyFunc2(MyFunc1() ));} | |
537 | } | |
538 | } | |
539 | <END_MODULE> | |
540 | <RESULT IF_PASS COUNT 1> | |
541 | (?is)\berror.+?control.+?might.+?leave.+?without.+?reaching.+?return.+?statement | |
542 | <END_RESULT> | |
543 | <RESULT IF_PASS COUNT 1> | |
544 | (?is)\bexpected\b.+?\bfunction\b | |
545 | <END_RESULT> | |
546 | <RESULT IF_PASS POSITIVE> | |
547 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
548 | <END_RESULT> | |
549 | <END_TC> | |
550 | ||
551 | :exmp. | |
552 | .*---------------------------------------------------------------------* | |
553 | :h4.Functions->Missing return value, but return type defined indirect case 3 | |
554 | .*---------------------------------------------------------------------* | |
555 | :xmp tab=0. | |
556 | <TC - Functions->Missing return value, but return type defined indirect case 3> | |
557 | ||
558 | <COMPILE> | |
559 | <VERDICT_LEAF PASS> | |
560 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
561 | module ModuleA { | |
562 | function MyFunc1() {return;} | |
563 | control { | |
564 | // void return value is not allowed in expression | |
565 | var integer MyVar := 666 + MyFunc1() - 666; | |
566 | } | |
567 | } | |
568 | <END_MODULE> | |
569 | <RESULT IF_PASS COUNT 1> | |
570 | (?is)\berror: | |
571 | <END_RESULT> | |
572 | <RESULT IF_PASS COUNT 1> | |
573 | (?is)\bexpected\b.+?\bfunction\b | |
574 | <END_RESULT> | |
575 | <RESULT IF_PASS POSITIVE> | |
576 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
577 | <END_RESULT> | |
578 | <END_TC> | |
579 | ||
580 | :exmp. | |
581 | .*---------------------------------------------------------------------* | |
582 | :h3.Functions->runs on clause SA-9/9 | |
583 | .*---------------------------------------------------------------------* | |
584 | Requirement: Functions->runs on clause. | |
585 | :nl.Explanation: | |
586 | :nl.A function without runs on clause shall never invoke a function or | |
587 | :nl.altstep or activate an altstep as default with a runs on clause locally. | |
588 | :nl.Functions started by using the start test component operation shall | |
589 | :nl.always have a runs on clause. | |
590 | :nl.Functions used in the control part of a TTCN-3 module shall have no | |
591 | :nl.runs on clause. | |
592 | .*---------------------------------------------------------------------* | |
593 | :h4.Functions->runs on clause, referencing to a functions with runs on | |
594 | .*---------------------------------------------------------------------* | |
595 | :xmp tab=0. | |
596 | ||
597 | <TC - Functions->runs on clause, referencing to a functions with runs on> | |
598 | ||
599 | <COMPILE> | |
600 | <VERDICT_LEAF PASS> | |
601 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
602 | module ModuleA { | |
603 | type port MyPortType message { inout integer } | |
604 | type component MyComp { port MyPortType MyPort } | |
605 | function MyFunc_comp() runs on MyComp {return;} | |
606 | function NastyFunc01() { | |
607 | if (true) { MyFunc_comp(); } | |
608 | } | |
609 | } | |
610 | <END_MODULE> | |
611 | <RESULT IF_PASS COUNT 1> | |
612 | (?is)\berror: | |
613 | <END_RESULT> | |
614 | <RESULT IF_PASS COUNT 1> | |
615 | (?is)\bcannot\b.+?\bcall\b | |
616 | <END_RESULT> | |
617 | <RESULT IF_PASS POSITIVE> | |
618 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
619 | <END_RESULT> | |
620 | <END_TC> | |
621 | ||
622 | :exmp. | |
623 | .*---------------------------------------------------------------------* | |
624 | :h4.Functions->runs on clause, referencing to an altstep with runs on | |
625 | .*---------------------------------------------------------------------* | |
626 | :xmp tab=0. | |
627 | <TC - Functions->runs on clause, referencing to an altstep with runs on> | |
628 | ||
629 | <COMPILE> | |
630 | <VERDICT_LEAF PASS> | |
631 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
632 | module ModuleA { | |
633 | type port MyPortType message { inout integer } | |
634 | type component MyComp { port MyPortType MyPort } | |
635 | altstep MyAltstep_comp() runs on MyComp { [] MyPort.trigger {} } | |
636 | function NastyFunc02(inout MyPortType loc_port) { | |
637 | if (true) { | |
638 | alt { | |
639 | [] loc_port.trigger {} | |
640 | [] MyAltstep_comp(); | |
641 | } | |
642 | } | |
643 | } | |
644 | } | |
645 | <END_MODULE> | |
646 | <RESULT IF_PASS COUNT 1> | |
647 | (?is)\berror: | |
648 | <END_RESULT> | |
649 | <RESULT IF_PASS COUNT 1> | |
650 | (?is)\bcannot\b.+?\bcall\b | |
651 | <END_RESULT> | |
652 | <RESULT IF_PASS POSITIVE> | |
653 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
654 | <END_RESULT> | |
655 | <END_TC> | |
656 | :exmp. | |
657 | .*---------------------------------------------------------------------* | |
658 | :h4.Functions->runs on clause, referencing to a func with runs on,indirect call | |
659 | .*---------------------------------------------------------------------* | |
660 | :xmp tab=0. | |
661 | ||
662 | <TC - Functions->runs on clause, referencing to a func with runs on,indirect call> | |
663 | ||
664 | <COMPILE> | |
665 | <VERDICT_LEAF PASS> | |
666 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
667 | module ModuleA { | |
668 | type port MyPortType message { inout integer } | |
669 | type component MyComp { port MyPortType MyPort } | |
670 | function MyFunc_comp2() runs on MyComp return integer {return 0;} | |
671 | function MyCoolFunction1 (integer par) return integer {return par;} | |
672 | function NastyFunc03() return float { | |
673 | if (true) { return int2float( MyCoolFunction1(MyFunc_comp2()) ); } | |
674 | } | |
675 | } | |
676 | <END_MODULE> | |
677 | <RESULT IF_PASS COUNT 1> | |
678 | (?is)\berror.+?control.+?might.+?leave.+?without.+?reaching.+?return.+?statement | |
679 | <END_RESULT> | |
680 | <RESULT IF_PASS COUNT 1> | |
681 | (?is)\bcannot\b.+?\bcall\b | |
682 | <END_RESULT> | |
683 | <RESULT IF_PASS POSITIVE> | |
684 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
685 | <END_RESULT> | |
686 | <END_TC> | |
687 | :exmp. | |
688 | .*---------------------------------------------------------------------* | |
689 | :h4.Functions->runs on clause, default activation/deactivation | |
690 | .*---------------------------------------------------------------------* | |
691 | :xmp tab=0. | |
692 | ||
693 | <TC - Functions->runs on clause, default activation/deactivation> | |
694 | ||
695 | <COMPILE> | |
696 | <VERDICT_LEAF PASS> | |
697 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
698 | module ModuleA { | |
699 | type port MyPortType message { inout integer } | |
700 | type component MyComp { port MyPortType MyPort } | |
701 | altstep MyAltstep_comp() runs on MyComp { [] MyPort.trigger {} } | |
702 | function NastyFunc04() { | |
703 | var default MyDef := activate(MyAltstep_comp()); | |
704 | deactivate(MyDef); | |
705 | } | |
706 | } | |
707 | <END_MODULE> | |
708 | <RESULT IF_PASS COUNT 1> | |
709 | (?is)\berror: | |
710 | <END_RESULT> | |
711 | <RESULT IF_PASS COUNT 1> | |
712 | (?is)\bcannot\b.+?\bactivate\b | |
713 | <END_RESULT> | |
714 | <RESULT IF_PASS POSITIVE> | |
715 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
716 | <END_RESULT> | |
717 | <END_TC> | |
718 | :exmp. | |
719 | .*---------------------------------------------------------------------* | |
720 | :h4.Functions->runs on clause, start operations | |
721 | .*---------------------------------------------------------------------* | |
722 | :xmp tab=0. | |
723 | ||
724 | <TC - Functions->runs on clause, start operations> | |
725 | ||
726 | <COMPILE> | |
727 | <VERDICT_LEAF PASS> | |
728 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
729 | module ModuleA { | |
730 | type port MyPortType message { inout integer } | |
731 | type component MyComp { port MyPortType MyPort } | |
732 | function MyFunc_comp3(integer par) runs on MyComp {} | |
733 | function MyFunc_nocomp() {} | |
734 | function MyFunc_nocomp2(integer par) return integer { return 0; } | |
735 | function MyFunc1() { | |
736 | var MyComp MyComponent := MyComp.create; | |
737 | var MyComp MyComponent2 := MyComp.create; | |
738 | MyComponent.start(MyFunc_nocomp()); | |
739 | // this should be ok however | |
740 | MyComponent2.start(MyFunc_comp3(MyFunc_nocomp2(666))); | |
741 | } | |
742 | } | |
743 | <END_MODULE> | |
744 | <RESULT IF_PASS COUNT 1> | |
745 | (?is)\berror: | |
746 | <END_RESULT> | |
747 | <RESULT IF_PASS COUNT 1> | |
748 | (?is)\bcannot\b.+?\bstarted\b | |
749 | <END_RESULT> | |
750 | <RESULT IF_PASS POSITIVE> | |
751 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
752 | <END_RESULT> | |
753 | <END_TC> | |
754 | ||
755 | :exmp. | |
756 | .*---------------------------------------------------------------------* | |
757 | :h4.Functions->runs on clause, function called from a template | |
758 | .*---------------------------------------------------------------------* | |
759 | :xmp tab=0. | |
760 | <TC - Functions->runs on clause, function called from a template> | |
761 | ||
762 | <COMPILE> | |
763 | <VERDICT_LEAF PASS> | |
764 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
765 | module ModuleA { | |
766 | type port MyPortType message { inout integer } | |
767 | type component MyComp { port MyPortType MyPort } | |
768 | function MyFunc_comp2() runs on MyComp return integer {return 0;} | |
769 | template integer MyTemplate := MyFunc_comp2(); | |
770 | } | |
771 | <END_MODULE> | |
772 | <RESULT IF_PASS COUNT 1> | |
773 | (?is)\berror: | |
774 | <END_RESULT> | |
775 | <RESULT IF_PASS COUNT 1> | |
776 | (?is)\bcannot\b.+?\bcall\b | |
777 | <END_RESULT> | |
778 | <RESULT IF_PASS POSITIVE> | |
779 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
780 | <END_RESULT> | |
781 | <END_TC> | |
782 | :exmp. | |
783 | .*---------------------------------------------------------------------* | |
784 | :h4.Functions->runs on clause, functions in the control part | |
785 | .*---------------------------------------------------------------------* | |
786 | :xmp tab=0. | |
787 | ||
788 | <TC - Functions->runs on clause, functions in the control part> | |
789 | ||
790 | <COMPILE> | |
791 | <VERDICT_LEAF PASS> | |
792 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
793 | module ModuleA { | |
794 | type port MyPortType message { inout integer } | |
795 | type component MyComp { port MyPortType MyPort } | |
796 | function MyFunc_comp() runs on MyComp {return;} | |
797 | function MyFunc_comp2() runs on MyComp return integer {return 0;} | |
798 | function MyCoolFunction1 (integer par) return integer {return par;} | |
799 | control { | |
800 | var integer MyVar; | |
801 | if (true) { | |
802 | MyFunc_comp(); | |
803 | MyVar := MyCoolFunction1(MyFunc_comp2()); | |
804 | } | |
805 | } | |
806 | } | |
807 | <END_MODULE> | |
808 | <RESULT IF_PASS COUNT 2> | |
809 | (?is)\berror: | |
810 | <END_RESULT> | |
811 | <RESULT IF_PASS COUNT 2> | |
812 | (?is)\bcannot\b.+?\bcall\b | |
813 | <END_RESULT> | |
814 | <RESULT IF_PASS POSITIVE> | |
815 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
816 | <END_RESULT> | |
817 | <END_TC> | |
818 | :exmp. | |
819 | ||
820 | .*---------------------------------------------------------------------* | |
821 | :h3.Altsteps->runs on clause SA-9/9 | |
822 | .*---------------------------------------------------------------------* | |
823 | Requirement: Altsteps->runs on clause (16.1.0). | |
824 | :nl.Explanation: | |
825 | :nl.An altstep without runs on clause shall never invoke a function or | |
826 | :nl.altstep or activate an altstep as default with a runs on clause locally. | |
827 | .*---------------------------------------------------------------------* | |
828 | :h4.Altsteps->runs on clause, referencing to an altstep() with runs on | |
829 | .*---------------------------------------------------------------------* | |
830 | :xmp tab=0. | |
831 | ||
832 | <TC - Altsteps->runs on clause, referencing to an altstep() with runs on> | |
833 | ||
834 | <COMPILE> | |
835 | <VERDICT_LEAF PASS> | |
836 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
837 | module ModuleA { | |
838 | type port MyPortType message { inout integer } | |
839 | type component MyComp { port MyPortType MyPort } | |
840 | altstep MyAltstep_comp() runs on MyComp { [] MyPort.trigger {} } | |
841 | ||
842 | altstep NastyAltstep01(inout MyPortType loc_port) { | |
843 | [] loc_port.trigger {} | |
844 | [] MyAltstep_comp(); | |
845 | } | |
846 | } | |
847 | <END_MODULE> | |
848 | <RESULT IF_PASS COUNT 1> | |
849 | (?is)\berror: | |
850 | <END_RESULT> | |
851 | <RESULT IF_PASS COUNT 1> | |
852 | (?is)\bcannot\b.+?\bcall\b | |
853 | <END_RESULT> | |
854 | <RESULT IF_PASS POSITIVE> | |
855 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
856 | <END_RESULT> | |
857 | <END_TC> | |
858 | :exmp. | |
859 | .*---------------------------------------------------------------------* | |
860 | :h4.Altsteps->runs on clause, referencing to a function() with runs on | |
861 | .*---------------------------------------------------------------------* | |
862 | :xmp tab=0. | |
863 | ||
864 | <TC - Altsteps->runs on clause, referencing to a function() with runs on> | |
865 | ||
866 | <COMPILE> | |
867 | <VERDICT_LEAF PASS> | |
868 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
869 | module ModuleA { | |
870 | type port MyPortType message { inout integer } | |
871 | type component MyComp { port MyPortType MyPort } | |
872 | function MyFunc_comp() runs on MyComp {} | |
873 | ||
874 | altstep NastyAltstep02(inout MyPortType loc_port) { | |
875 | [] loc_port.trigger { MyFunc_comp(); } | |
876 | } | |
877 | } | |
878 | <END_MODULE> | |
879 | <RESULT IF_PASS COUNT 1> | |
880 | (?is)\berror: | |
881 | <END_RESULT> | |
882 | <RESULT IF_PASS COUNT 1> | |
883 | (?is)\bcannot\b.+?\bcall\b | |
884 | <END_RESULT> | |
885 | <RESULT IF_PASS POSITIVE> | |
886 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
887 | <END_RESULT> | |
888 | <END_TC> | |
889 | :exmp. | |
890 | .*---------------------------------------------------------------------* | |
891 | :h4.Altsteps->runs on clause, default activation/deactivation | |
892 | .*---------------------------------------------------------------------* | |
893 | :xmp tab=0. | |
894 | ||
895 | <TC - Altsteps->runs on clause, default activation/deactivation> | |
896 | ||
897 | <COMPILE> | |
898 | <VERDICT_LEAF PASS> | |
899 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
900 | module ModuleA { | |
901 | type port MyPortType message { inout integer } | |
902 | type component MyComp { port MyPortType MyPort } | |
903 | altstep MyAltstep_comp() runs on MyComp { [] MyPort.trigger {} } | |
904 | ||
905 | altstep NastyAltstep03(inout MyPortType loc_port) { | |
906 | var default MyDef := activate(MyAltstep_comp()); | |
907 | [] loc_port.trigger { deactivate(MyDef); } | |
908 | } | |
909 | } | |
910 | <END_MODULE> | |
911 | <RESULT IF_PASS COUNT 1> | |
912 | (?is)\berror: | |
913 | <END_RESULT> | |
914 | <RESULT IF_PASS COUNT 1> | |
915 | (?is)\bcannot\b.+?\bactivate\b | |
916 | <END_RESULT> | |
917 | <RESULT IF_PASS POSITIVE> | |
918 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
919 | <END_RESULT> | |
920 | <END_TC> | |
921 | ||
922 | :exmp. | |
923 | ||
924 | .*---------------------------------------------------------------------* | |
925 | :h3.Goto statement SA-9/10 | |
926 | .*---------------------------------------------------------------------* | |
927 | Requirement: Goto statement. | |
928 | :nl.Explanation: | |
929 | :nl. - It is not allowed to jump out of or into functions, test cases, | |
930 | :nl. altsteps and the control part of a TTCN-3 module | |
931 | :nl. - It is not allowed to jump into a sequence of statements defined in | |
932 | :nl. a compound statement (i.e. alt statement, while loop, for loop, | |
933 | :nl. if-else statement, do- while loop and the interleave statement) | |
934 | :nl. - It is not allowed to use the goto statement within an interleave | |
935 | :nl. statement (see the SA-9/20) | |
936 | :nl. NOTE: the first is covered by scopes implicitly | |
937 | .*---------------------------------------------------------------------* | |
938 | :h4.Goto statement, jump into alt statement | |
939 | .*---------------------------------------------------------------------* | |
940 | :xmp tab=0. | |
941 | ||
942 | <TC - Goto statement, jump into alt statement> | |
943 | ||
944 | <COMPILE> | |
945 | <VERDICT_LEAF PASS> | |
946 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
947 | module ModuleA { | |
948 | ||
949 | control { | |
950 | timer Timy; | |
951 | var float b; | |
952 | var integer locpar; | |
953 | Timy.start(1.0); | |
954 | alt { | |
955 | [b<1.0] Timy.timeout { | |
956 | label Label01; | |
957 | locpar := locpar + 1; } | |
958 | } | |
959 | goto Label01; | |
960 | } | |
961 | } | |
962 | <END_MODULE> | |
963 | <RESULT IF_PASS COUNT 1> | |
964 | (?is)\berror: | |
965 | <END_RESULT> | |
966 | <RESULT IF_PASS COUNT 1> | |
967 | (?is)\bnot\b.+?\bdefined\b | |
968 | <END_RESULT> | |
969 | <RESULT IF_PASS POSITIVE> | |
970 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
971 | <END_RESULT> | |
972 | <END_TC> | |
973 | :exmp. | |
974 | .*---------------------------------------------------------------------* | |
975 | :h4.Goto statement, jump into if-else statement | |
976 | .*---------------------------------------------------------------------* | |
977 | :xmp tab=0. | |
978 | ||
979 | <TC - Goto statement, jump into if-else statement> | |
980 | ||
981 | <COMPILE> | |
982 | <VERDICT_LEAF PASS> | |
983 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
984 | module ModuleA { | |
985 | ||
986 | control { | |
987 | var integer locpar; | |
988 | if (true) { label Label04; locpar := 666; } | |
989 | else { label Label05; locpar := -666; } | |
990 | goto Label04; | |
991 | goto Label05; | |
992 | } | |
993 | } | |
994 | <END_MODULE> | |
995 | <RESULT IF_PASS COUNT 2> | |
996 | (?is)\berror: | |
997 | <END_RESULT> | |
998 | <RESULT IF_PASS COUNT 2> | |
999 | (?is)\blabel\b.+?\bused\b.+?\bnot\b.+?\bdefined\b | |
1000 | <END_RESULT> | |
1001 | <RESULT IF_PASS POSITIVE> | |
1002 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
1003 | <END_RESULT> | |
1004 | <END_TC> | |
1005 | :exmp. | |
1006 | .*---------------------------------------------------------------------* | |
1007 | :h4.Goto statement, jump into while statement | |
1008 | .*---------------------------------------------------------------------* | |
1009 | :xmp tab=0. | |
1010 | ||
1011 | <TC - Goto statement, jump into while statement> | |
1012 | ||
1013 | <COMPILE> | |
1014 | <VERDICT_LEAF PASS> | |
1015 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
1016 | module ModuleA { | |
1017 | ||
1018 | control { | |
1019 | var integer locpar; | |
1020 | while (false) { | |
1021 | label Label02; | |
1022 | locpar := 0; | |
1023 | } | |
1024 | goto Label02; | |
1025 | } | |
1026 | } | |
1027 | <END_MODULE> | |
1028 | <RESULT IF_PASS COUNT 1> | |
1029 | (?is)\berror: | |
1030 | <END_RESULT> | |
1031 | <RESULT IF_PASS COUNT 1> | |
1032 | (?is)\bnot\b.+?\bdefined\b | |
1033 | <END_RESULT> | |
1034 | <RESULT IF_PASS POSITIVE> | |
1035 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
1036 | <END_RESULT> | |
1037 | <END_TC> | |
1038 | :exmp. | |
1039 | .*---------------------------------------------------------------------* | |
1040 | :h4.Goto statement, jump into do-while statement | |
1041 | .*---------------------------------------------------------------------* | |
1042 | :xmp tab=0. | |
1043 | ||
1044 | <TC - Goto statement, jump into do-while statement> | |
1045 | ||
1046 | <COMPILE> | |
1047 | <VERDICT_LEAF PASS> | |
1048 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
1049 | module ModuleA { | |
1050 | ||
1051 | control { | |
1052 | var integer locpar; | |
1053 | do { | |
1054 | label Label02; | |
1055 | locpar := 0; | |
1056 | } while (false) | |
1057 | goto Label02; | |
1058 | } | |
1059 | } | |
1060 | <END_MODULE> | |
1061 | <RESULT IF_PASS COUNT 1> | |
1062 | (?is)\berror: | |
1063 | <END_RESULT> | |
1064 | <RESULT IF_PASS COUNT 1> | |
1065 | (?is)\bnot\b.+?\bdefined\b | |
1066 | <END_RESULT> | |
1067 | <RESULT IF_PASS POSITIVE> | |
1068 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
1069 | <END_RESULT> | |
1070 | <END_TC> | |
1071 | :exmp. | |
1072 | .*---------------------------------------------------------------------* | |
1073 | :h4.Goto statement, jump into for statement | |
1074 | .*---------------------------------------------------------------------* | |
1075 | :xmp tab=0. | |
1076 | ||
1077 | <TC - Goto statement, jump into for statement> | |
1078 | ||
1079 | <COMPILE> | |
1080 | <VERDICT_LEAF PASS> | |
1081 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
1082 | module ModuleA { | |
1083 | ||
1084 | control { | |
1085 | var integer locpar; | |
1086 | for(var integer j:=1; j<10; j:=j+1) { | |
1087 | label Label02; | |
1088 | locpar := 0; | |
1089 | } | |
1090 | goto Label02; | |
1091 | } | |
1092 | } | |
1093 | <END_MODULE> | |
1094 | <RESULT IF_PASS COUNT 1> | |
1095 | (?is)\berror: | |
1096 | <END_RESULT> | |
1097 | <RESULT IF_PASS COUNT 1> | |
1098 | (?is)\bnot\b.+?\bdefined\b | |
1099 | <END_RESULT> | |
1100 | <RESULT IF_PASS POSITIVE> | |
1101 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
1102 | <END_RESULT> | |
1103 | <END_TC> | |
1104 | ||
1105 | :exmp. | |
1106 | .*---------------------------------------------------------------------* | |
1107 | :h4.Goto statement, jump over the variable definition case 1 | |
1108 | .*---------------------------------------------------------------------* | |
1109 | :xmp tab=0. | |
1110 | ||
1111 | <TC - Goto statement, jump over the variable definition case 1> | |
1112 | ||
1113 | <COMPILE> | |
1114 | <VERDICT_LEAF PASS> | |
1115 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
1116 | module ModuleA { | |
1117 | function myFunc() | |
1118 | { | |
1119 | goto L; | |
1120 | var integer i := 0; | |
1121 | label L; | |
1122 | i := i + 1; | |
1123 | } | |
1124 | ||
1125 | } | |
1126 | <END_MODULE> | |
1127 | <RESULT IF_PASS COUNT 1> | |
1128 | (?im)\berror\b.+?\bJump\b.+?\bcrosses\b | |
1129 | <END_RESULT> | |
1130 | <END_RESULT> | |
1131 | <RESULT IF_PASS COUNT 1> | |
1132 | (?is)\berror: | |
1133 | <END_RESULT> | |
1134 | <RESULT IF_PASS POSITIVE> | |
1135 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
1136 | <END_RESULT> | |
1137 | <END_TC> | |
1138 | ||
1139 | :exmp. | |
1140 | ||
1141 | .*---------------------------------------------------------------------* | |
1142 | :h4.Goto statement, jump over the variable definition case 2 | |
1143 | .*---------------------------------------------------------------------* | |
1144 | :xmp tab=0. | |
1145 | ||
1146 | <TC - Goto statement, jump over the variable definition case 2> | |
1147 | ||
1148 | <COMPILE> | |
1149 | <VERDICT_LEAF PASS> | |
1150 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
1151 | module ModuleA { | |
1152 | function myFunc(integer par) | |
1153 | { | |
1154 | for (var integer i := 0; i < 10; i := i + 1) { | |
1155 | if (i + par > 10) { | |
1156 | goto L; | |
1157 | var integer myint1; | |
1158 | } | |
1159 | var integer myint2; | |
1160 | } | |
1161 | var integer myint3; | |
1162 | label L; | |
1163 | } | |
1164 | ||
1165 | ||
1166 | } | |
1167 | <END_MODULE> | |
1168 | <RESULT IF_PASS COUNT 1> | |
1169 | (?im)\berror\b.+?\bJump\b.+?\bcrosses\b | |
1170 | <END_RESULT> | |
1171 | <END_RESULT> | |
1172 | <RESULT IF_PASS COUNT 1> | |
1173 | (?is)\berror: | |
1174 | <END_RESULT> | |
1175 | <RESULT IF_PASS POSITIVE> | |
1176 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
1177 | <END_RESULT> | |
1178 | <END_TC> | |
1179 | ||
1180 | :exmp. | |
1181 | .*---------------------------------------------------------------------* | |
1182 | :h3.Stop operation SA-9/11 | |
1183 | .*---------------------------------------------------------------------* | |
1184 | Requirement: Stop operation. | |
1185 | :nl.Explanation: | |
1186 | :nl.The stop statement terminates execution in different ways depending | |
1187 | :nl.on the context in which it is used. When used in the control part of | |
1188 | :nl.a module or in a function used by the control part of a module, it | |
1189 | :nl.terminates the execution of the module control part. | |
1190 | :nl.NOTE: therefore, self.stop shall be detected in the control part or | |
1191 | :nl.function/altstep without runs on clause. | |
1192 | .*---------------------------------------------------------------------* | |
1193 | :h4.Stop operation in altstep without runs on clause | |
1194 | .*---------------------------------------------------------------------* | |
1195 | :xmp tab=0. | |
1196 | ||
1197 | <TC - Stop operation in altstep without runs on clause> | |
1198 | ||
1199 | <COMPILEGCC> | |
1200 | <VERDICT_LEAF PASS> | |
1201 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
1202 | module ModuleA { | |
1203 | altstep MyAltstep(inout timer T) { | |
1204 | [] T.timeout { self.stop; } | |
1205 | } | |
1206 | } | |
1207 | <END_MODULE> | |
1208 | ||
1209 | <RESULT IF_PASS NEGATIVE> | |
1210 | (?is)\berror: | |
1211 | <END_RESULT> | |
1212 | <END_TC> | |
1213 | ||
1214 | :exmp. | |
1215 | .*---------------------------------------------------------------------* | |
1216 | :h4.Stop operation in function without runs on clause | |
1217 | .*---------------------------------------------------------------------* | |
1218 | :xmp tab=0. | |
1219 | ||
1220 | <TC - Stop operation in function without runs on clause> | |
1221 | ||
1222 | <COMPILEGCC> | |
1223 | <VERDICT_LEAF PASS> | |
1224 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
1225 | module ModuleA { | |
1226 | function MyFunc() { | |
1227 | log("Dummy"); | |
1228 | self.stop; | |
1229 | } | |
1230 | } | |
1231 | <END_MODULE> | |
1232 | <RESULT IF_PASS NEGATIVE> | |
1233 | (?is)\berror: | |
1234 | <END_RESULT> | |
1235 | <END_TC> | |
1236 | ||
1237 | :exmp. | |
1238 | .*---------------------------------------------------------------------* | |
1239 | :h4.Stop operation in control part | |
1240 | .*---------------------------------------------------------------------* | |
1241 | :xmp tab=0. | |
1242 | ||
1243 | <TC - Stop operation in control part> | |
1244 | ||
1245 | <COMPILE> | |
1246 | <VERDICT_LEAF PASS> | |
1247 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
1248 | module ModuleA { | |
1249 | control { | |
1250 | if (false) { stop; } | |
1251 | else { self.stop; } | |
1252 | } | |
1253 | } | |
1254 | <END_MODULE> | |
1255 | <RESULT IF_PASS COUNT 2> | |
1256 | (?is)\berror: | |
1257 | <END_RESULT> | |
1258 | <RESULT IF_PASS COUNT 1> | |
1259 | (?is)\bself\b | |
1260 | <END_RESULT> | |
1261 | <RESULT IF_PASS COUNT 1> | |
1262 | (?is)\bComponent\b.+?\boperation\b | |
1263 | <END_RESULT> | |
1264 | <RESULT IF_PASS POSITIVE> | |
1265 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
1266 | <END_RESULT> | |
1267 | <END_TC> | |
1268 | ||
1269 | :exmp. | |
1270 | ||
1271 | .*---------------------------------------------------------------------* | |
1272 | :h3.Sending/receiving local component definitions SA-9/12 | |
1273 | .*---------------------------------------------------------------------* | |
1274 | Requirement: Sending/receiving local component definitions. | |
1275 | :nl.Explanation: | |
1276 | :nl.Data types containing information that is only valid within the same | |
1277 | :nl.component type (e.g. default references) are called local data types. | |
1278 | :nl.These types cannot be sent or received via ports. | |
1279 | .*---------------------------------------------------------------------* | |
1280 | :h4.Sending local component definitions | |
1281 | .*---------------------------------------------------------------------* | |
1282 | :xmp tab=0. | |
1283 | ||
1284 | <TC - Sending local component definitions> | |
1285 | ||
1286 | <COMPILE> | |
1287 | <VERDICT_LEAF PASS> | |
1288 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
1289 | module ModuleA { | |
1290 | type record MyStruct { integer field1, default field2 } | |
1291 | type port MyPortType message { inout MyStruct } | |
1292 | type component MyComp1 { port MyPortType MyPort; } | |
1293 | ||
1294 | altstep MyDefault(inout MyPortType loc_port) { | |
1295 | [] loc_port.trigger { } | |
1296 | [else] {} | |
1297 | } | |
1298 | function MyFunc1() runs on MyComp1 { | |
1299 | var MyStruct MyWar := { field1 := 0, field2 := activate(MyDefault(MyPort)) } | |
1300 | MyPort.send(MyWar); | |
1301 | } | |
1302 | } | |
1303 | <END_MODULE> | |
1304 | <RESULT IF_FAIL COUNT 1> | |
1305 | (?is)\berror: | |
1306 | <END_RESULT> | |
1307 | <RESULT IF_FAIL POSITIVE> | |
1308 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
1309 | <END_RESULT> | |
1310 | <END_TC> | |
1311 | :exmp. | |
1312 | .*---------------------------------------------------------------------* | |
1313 | :h4.Receiving local component definitions | |
1314 | .*---------------------------------------------------------------------* | |
1315 | :xmp tab=0. | |
1316 | ||
1317 | <TC - Receiving local component definitions> | |
1318 | ||
1319 | <COMPILE> | |
1320 | <VERDICT_LEAF PASS> | |
1321 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
1322 | module ModuleA { | |
1323 | type record MyStruct { integer field1, default field2 } | |
1324 | type port MyPortType message { inout MyStruct } | |
1325 | type component MyComp2 { port MyPortType MyPort; } | |
1326 | ||
1327 | altstep MyDefault(inout MyPortType loc_port) { | |
1328 | [] loc_port.trigger { } | |
1329 | [else] {} | |
1330 | } | |
1331 | function MyFunc2() runs on MyComp2 { | |
1332 | var MyStruct MyWar := { field1 := 0, field2 := activate(MyDefault(MyPort)) } | |
1333 | alt { | |
1334 | [] MyPort.receive(?) -> value MyWar { deactivate(MyWar.field2); } | |
1335 | } | |
1336 | } | |
1337 | } | |
1338 | <END_MODULE> | |
1339 | <RESULT IF_FAIL COUNT 1> | |
1340 | (?is)\berror: | |
1341 | <END_RESULT> | |
1342 | <RESULT IF_FAIL POSITIVE> | |
1343 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
1344 | <END_RESULT> | |
1345 | <END_TC> | |
1346 | ||
1347 | :exmp. | |
1348 | .*---------------------------------------------------------------------* | |
1349 | :h3.Activate->Timers in the parameter list of an activated altstep SA-9/13 | |
1350 | .*---------------------------------------------------------------------* | |
1351 | Requirement: Timers in the parameter list of an activated altstep. | |
1352 | :nl.Explanation: | |
1353 | :nl.All timer instances in the actual parameter list shall be declared as | |
1354 | :nl.component type local timers. | |
1355 | .*---------------------------------------------------------------------* | |
1356 | :h4.Activate->Timers in the parameter list of an activated altstep with runs on | |
1357 | .*---------------------------------------------------------------------* | |
1358 | :xmp tab=0. | |
1359 | ||
1360 | <TC - Activate->Timers in the parameter list of an activated altstep with runs on> | |
1361 | ||
1362 | <COMPILE> | |
1363 | <VERDICT_LEAF FAIL> | |
1364 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
1365 | module ModuleA { | |
1366 | type port MyPortType message { inout integer } | |
1367 | type component MyComp { port MyPortType MyPort; } | |
1368 | ||
1369 | altstep MyAltstep1(inout MyPortType loc_port, inout timer loc_timer) | |
1370 | runs on MyComp { | |
1371 | [] loc_port.trigger { } | |
1372 | [] loc_timer.timeout { } | |
1373 | [else] { } | |
1374 | } | |
1375 | function MyFunc() runs on MyComp { | |
1376 | timer loc_timer; | |
1377 | // TR 700: SA-1.69Timers and variables passed by reference in the parameter list of an activated altstep | |
1378 | activate(MyAltstep1(MyPort, loc_timer)); | |
1379 | } | |
1380 | } | |
1381 | <END_MODULE> | |
1382 | <RESULT IF_FAIL COUNT 1> | |
1383 | (?is)\berror: | |
1384 | <END_RESULT> | |
1385 | <RESULT IF_PASS COUNT 1> | |
1386 | (?is)\bParameter\b.+?\brefers\b.+?\blocal\b | |
1387 | <END_RESULT> | |
1388 | <RESULT IF_FAIL POSITIVE> | |
1389 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
1390 | <END_RESULT> | |
1391 | ||
1392 | <END_TC> | |
1393 | ||
1394 | :exmp. | |
1395 | .*---------------------------------------------------------------------* | |
1396 | :h4.Activate->Timers in the parameter list of an activated altstep without runs on | |
1397 | .*---------------------------------------------------------------------* | |
1398 | :xmp tab=0. | |
1399 | ||
1400 | <TC - Activate->Timers in the parameter list of an activated altstep without runs on> | |
1401 | ||
1402 | <COMPILE> | |
1403 | <VERDICT_LEAF FAIL> | |
1404 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
1405 | module ModuleA { | |
1406 | type port MyPortType message { inout integer } | |
1407 | type component MyComp { port MyPortType MyPort; } | |
1408 | ||
1409 | altstep MyAltstep2(inout MyPortType loc_port, inout timer loc_timer) { | |
1410 | [] loc_port.trigger { } | |
1411 | [] loc_timer.timeout { } | |
1412 | [else] { } | |
1413 | } | |
1414 | function MyFunc() runs on MyComp { | |
1415 | timer loc_timer; | |
1416 | // TR 700: SA-1.69Timers and variables passed by reference in the parameter list of an activated altstep | |
1417 | activate(MyAltstep2(MyPort, loc_timer)); | |
1418 | } | |
1419 | } | |
1420 | <END_MODULE> | |
1421 | <RESULT IF_FAIL COUNT 1> | |
1422 | (?is)\berror: | |
1423 | <END_RESULT> | |
1424 | <RESULT IF_PASS COUNT 1> | |
1425 | (?is)\bParameter\b.+?\brefers\b.+?\blocal\b | |
1426 | <END_RESULT> | |
1427 | <RESULT IF_FAIL POSITIVE> | |
1428 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
1429 | <END_RESULT> | |
1430 | ||
1431 | <END_TC> | |
1432 | ||
1433 | :exmp. | |
1434 | ||
1435 | .*---------------------------------------------------------------------* | |
1436 | :h3.Communication operations->Exceptions timeout SA-9/14 | |
1437 | .*---------------------------------------------------------------------* | |
1438 | Requirement: Exceptions. | |
1439 | :nl.Explanation: | |
1440 | :nl. Catching timeout exceptions shall be restricted to the exception | |
1441 | :nl.handling part of a call. No further matching criteria (including a | |
1442 | :nl.from part) and no assignment part is allowed for a catch operation | |
1443 | :nl.that handles a timeout exception. | |
1444 | .*---------------------------------------------------------------------* | |
1445 | :h4.Communication operations->Exceptions->Timeout with assignment | |
1446 | .*---------------------------------------------------------------------* | |
1447 | :xmp tab=0. | |
1448 | ||
1449 | <TC - Communication operations->Exceptions->Timeout with assignment> | |
1450 | ||
1451 | <COMPILE> | |
1452 | <VERDICT_LEAF FAIL> | |
1453 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
1454 | module ModuleA { | |
1455 | signature MySig_block(); | |
1456 | type port MyPortType1 procedure { inout MySig_block} | |
1457 | type component MyComp { | |
1458 | port MyPortType1 MyPort1; | |
1459 | } | |
1460 | function MyAltstep1(MyComp loc_par) runs on MyComp { | |
1461 | var MyComp MyWar1; | |
1462 | MyPort1.call(MySig_block:{},20E-3) { | |
1463 | [] MyPort1.catch(timeout) -> sender MyWar1 {} | |
1464 | } | |
1465 | } | |
1466 | } | |
1467 | <END_MODULE> | |
1468 | <RESULT IF_PASS COUNT 1> | |
1469 | (?is)\berror: | |
1470 | <END_RESULT> | |
1471 | <RESULT IF_PASS POSITIVE> | |
1472 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
1473 | <END_RESULT> | |
1474 | <END_TC> | |
1475 | :exmp. | |
1476 | .*---------------------------------------------------------------------* | |
1477 | :h4.Communication operations->Exceptions->Timeout with from statement | |
1478 | .*---------------------------------------------------------------------* | |
1479 | :xmp tab=0. | |
1480 | ||
1481 | <TC - Communication operations->Exceptions->Timeout with from statement> | |
1482 | ||
1483 | <COMPILE> | |
1484 | <VERDICT_LEAF FAIL> | |
1485 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
1486 | module ModuleA { | |
1487 | signature MySig_block(); | |
1488 | type port MyPortType1 procedure { inout MySig_block} | |
1489 | type component MyComp { | |
1490 | port MyPortType1 MyPort1; | |
1491 | } | |
1492 | function MyAltstep1(MyComp loc_par) runs on MyComp { | |
1493 | var MyComp MyWar1; | |
1494 | MyPort1.call(MySig_block:{},20E-3) { | |
1495 | [] MyPort1.catch(timeout) from self {} | |
1496 | } | |
1497 | } | |
1498 | } | |
1499 | <END_MODULE> | |
1500 | <RESULT IF_PASS COUNT 1> | |
1501 | (?is)\berror: | |
1502 | <END_RESULT> | |
1503 | <RESULT IF_PASS POSITIVE> | |
1504 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
1505 | <END_RESULT> | |
1506 | <END_TC> | |
1507 | ||
1508 | :exmp. | |
1509 | .*---------------------------------------------------------------------* | |
1510 | :h3.Verdict operations SA-9/15 | |
1511 | .*---------------------------------------------------------------------* | |
1512 | Requirement: Verdict operations. | |
1513 | :nl.Explanation: | |
1514 | :nl.The setverdict operation shall only be used with the values pass, | |
1515 | :nl.fail, inconc and none. | |
1516 | :nl.NOTE only the direct assignments can be checked by SA. | |
1517 | .*---------------------------------------------------------------------* | |
1518 | :h4.Verdict operations | |
1519 | .*---------------------------------------------------------------------* | |
1520 | :xmp tab=0. | |
1521 | ||
1522 | <TC - Verdict operations> | |
1523 | ||
1524 | <COMPILE> | |
1525 | <VERDICT_LEAF PASS> | |
1526 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
1527 | module ModuleA { | |
1528 | type component MyComp {} | |
1529 | function MyFunc1() runs on MyComp { | |
1530 | setverdict(error); | |
1531 | } | |
1532 | } | |
1533 | <END_MODULE> | |
1534 | <RESULT IF_PASS COUNT 1> | |
1535 | (?is)\bError\b.+?\bverdict\b.+?\bset\b | |
1536 | <END_RESULT> | |
1537 | <RESULT IF_PASS POSITIVE> | |
1538 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
1539 | <END_RESULT> | |
1540 | <END_TC> | |
1541 | ||
1542 | :exmp. | |
1543 | ||
1544 | .*---------------------------------------------------------------------* | |
1545 | :h3.Checking of ports on connect and map operations SA-9/17 | |
1546 | .*---------------------------------------------------------------------* | |
1547 | Requirement: Invalid value is used as component reference. | |
1548 | :nl.Explanation: | |
1549 | :nl.If a messages/signature can be sent/called on one of the ports of a | |
1550 | :nl.map or connect operation, it has to be listed in the in or inout list | |
1551 | :nl.of the other port. | |
1552 | .*---------------------------------------------------------------------* | |
1553 | :h4.Connect operation, incorrect port type | |
1554 | .*---------------------------------------------------------------------* | |
1555 | :xmp tab=0. | |
1556 | ||
1557 | <TC - Connect operation, incorrect port type> | |
1558 | ||
1559 | <COMPILE> | |
1560 | <VERDICT_LEAF PASS> | |
1561 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
1562 | module ModuleA { | |
1563 | signature MySig(); | |
1564 | type port MyPortType1 message { inout boolean } | |
1565 | type port MyPortType2 procedure { inout MySig } | |
1566 | type component MyComp { | |
1567 | port MyPortType1 MyPort1; | |
1568 | port MyPortType2 MyPort2; | |
1569 | } | |
1570 | function MyFunc1() runs on MyComp { | |
1571 | connect(self:MyPort1,self:MyPort2); | |
1572 | } | |
1573 | } | |
1574 | <END_MODULE> | |
1575 | <RESULT IF_PASS COUNT 1> | |
1576 | (?is)\berror: | |
1577 | <END_RESULT> | |
1578 | <RESULT IF_PASS COUNT 1> | |
1579 | (?im)\bconnection\b.+?\bnot\b.+?\bconsistent\b | |
1580 | <END_RESULT> | |
1581 | <RESULT IF_PASS POSITIVE> | |
1582 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
1583 | <END_RESULT> | |
1584 | <END_TC> | |
1585 | ||
1586 | :exmp. | |
1587 | .*---------------------------------------------------------------------* | |
1588 | :h4.Connect operation, incorrect signature list case 1 | |
1589 | .*---------------------------------------------------------------------* | |
1590 | :xmp tab=0. | |
1591 | ||
1592 | <TC - Connect operation, incorrect signature list case 1> | |
1593 | ||
1594 | <COMPILE> | |
1595 | <VERDICT_LEAF PASS> | |
1596 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
1597 | module ModuleA { | |
1598 | signature MySig(); | |
1599 | signature MySig2(); | |
1600 | type port MyPortType1 procedure { inout MySig,MySig2 } | |
1601 | type port MyPortType2 procedure { inout MySig } | |
1602 | type component MyComp { | |
1603 | port MyPortType1 MyPort1; | |
1604 | port MyPortType2 MyPort2; | |
1605 | } | |
1606 | function MyFunc1() runs on MyComp { | |
1607 | connect(self:MyPort1,self:MyPort2); | |
1608 | } | |
1609 | } | |
1610 | <END_MODULE> | |
1611 | <RESULT IF_PASS COUNT 1> | |
1612 | (?is)\berror: | |
1613 | <END_RESULT> | |
1614 | <RESULT IF_PASS COUNT 1> | |
1615 | (?im)\bconnection\b.+?\bnot\b.+?\bconsistent\b | |
1616 | <END_RESULT> | |
1617 | <RESULT IF_PASS COUNT 1> | |
1618 | (?im)\bnot\b.+?\bpresent\b | |
1619 | <END_RESULT> | |
1620 | <RESULT IF_PASS POSITIVE> | |
1621 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
1622 | <END_RESULT> | |
1623 | <END_TC> | |
1624 | ||
1625 | :exmp. | |
1626 | .*---------------------------------------------------------------------* | |
1627 | :h4.Connect operation, incorrect signature list case 2 | |
1628 | .*---------------------------------------------------------------------* | |
1629 | :xmp tab=0. | |
1630 | ||
1631 | <TC - Connect operation, incorrect signature list case 2> | |
1632 | ||
1633 | <COMPILE> | |
1634 | <VERDICT_LEAF PASS> | |
1635 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
1636 | module ModuleA { | |
1637 | signature MySig(); | |
1638 | signature MySig2(); | |
1639 | type port MyPortType1 procedure { out MySig,MySig2 } | |
1640 | type port MyPortType2 procedure { in MySig2 out MySig } | |
1641 | type component MyComp { | |
1642 | port MyPortType1 MyPort1; | |
1643 | port MyPortType2 MyPort2; | |
1644 | } | |
1645 | function MyFunc1() runs on MyComp { | |
1646 | connect(self:MyPort1,self:MyPort2); | |
1647 | } | |
1648 | } | |
1649 | <END_MODULE> | |
1650 | <RESULT IF_PASS COUNT 1> | |
1651 | (?is)\berror: | |
1652 | <END_RESULT> | |
1653 | <RESULT IF_PASS COUNT 1> | |
1654 | (?im)\bconnection\b.+?\bnot\b.+?\bconsistent\b | |
1655 | <END_RESULT> | |
1656 | <RESULT IF_PASS COUNT 2> | |
1657 | (?im)\bnot\b.+?\bpresent\b | |
1658 | <END_RESULT> | |
1659 | <RESULT IF_PASS POSITIVE> | |
1660 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
1661 | <END_RESULT> | |
1662 | <END_TC> | |
1663 | ||
1664 | :exmp. | |
1665 | .*---------------------------------------------------------------------* | |
1666 | :h4.Map operation, incorrect signature list case 3 | |
1667 | .*---------------------------------------------------------------------* | |
1668 | :xmp tab=0. | |
1669 | ||
1670 | <TC - Map operation, incorrect signature list case 3> | |
1671 | ||
1672 | <COMPILE> | |
1673 | <VERDICT_LEAF PASS> | |
1674 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
1675 | module ModuleA { | |
1676 | signature MySig(); | |
1677 | signature MySig2(); | |
1678 | type port MyPortType1 procedure { out MySig,MySig2 } | |
1679 | type port MyPortType2 procedure { in MySig2 out MySig } | |
1680 | type component MyComp { | |
1681 | port MyPortType1 MyPort1; | |
1682 | port MyPortType2 MyPort2; | |
1683 | } | |
1684 | testcase MyFunc1() runs on MyComp { | |
1685 | map(self:MyPort1,system:MyPort2); | |
1686 | } | |
1687 | } | |
1688 | <END_MODULE> | |
1689 | <RESULT IF_PASS COUNT 1> | |
1690 | (?is)\berror: | |
1691 | <END_RESULT> | |
1692 | <RESULT IF_PASS COUNT 1> | |
1693 | (?im)\bmapping\b.+?\bnot\b.+?\bconsistent\b | |
1694 | <END_RESULT> | |
1695 | <RESULT IF_PASS COUNT 2> | |
1696 | (?im)\bnot\b.+?\bpresent\b | |
1697 | <END_RESULT> | |
1698 | <RESULT IF_PASS POSITIVE> | |
1699 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
1700 | <END_RESULT> | |
1701 | <END_TC> | |
1702 | ||
1703 | :exmp. | |
1704 | .*---------------------------------------------------------------------* | |
1705 | :h4.Connect operation, incorrect variable list case 1 | |
1706 | .*---------------------------------------------------------------------* | |
1707 | :xmp tab=0. | |
1708 | ||
1709 | <TC - Connect operation, incorrect variable list case 1> | |
1710 | ||
1711 | <COMPILE> | |
1712 | <VERDICT_LEAF PASS> | |
1713 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
1714 | module ModuleA { | |
1715 | type port MyPortType1 message { inout integer,octetstring } | |
1716 | type port MyPortType2 message { inout integer } | |
1717 | type component MyComp { | |
1718 | port MyPortType1 MyPort1; | |
1719 | port MyPortType2 MyPort2; | |
1720 | } | |
1721 | function MyFunc1() runs on MyComp { | |
1722 | connect(self:MyPort1,self:MyPort2); | |
1723 | } | |
1724 | } | |
1725 | <END_MODULE> | |
1726 | <RESULT IF_PASS COUNT 1> | |
1727 | (?is)\berror: | |
1728 | <END_RESULT> | |
1729 | <RESULT IF_PASS COUNT 1> | |
1730 | (?im)\bconnection\b.+?\bnot\b.+?\bconsistent\b | |
1731 | <END_RESULT> | |
1732 | <RESULT IF_PASS COUNT 1> | |
1733 | (?im)\bnot\b.+?\bpresent\b | |
1734 | <END_RESULT> | |
1735 | <RESULT IF_PASS POSITIVE> | |
1736 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
1737 | <END_RESULT> | |
1738 | <END_TC> | |
1739 | ||
1740 | :exmp. | |
1741 | .*---------------------------------------------------------------------* | |
1742 | :h4.Connect operation, incorrect variable list case 2 | |
1743 | .*---------------------------------------------------------------------* | |
1744 | :xmp tab=0. | |
1745 | ||
1746 | <TC - Connect operation, incorrect variable list case 2> | |
1747 | ||
1748 | <COMPILE> | |
1749 | <VERDICT_LEAF PASS> | |
1750 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
1751 | module ModuleA { | |
1752 | type port MyPortType1 message { out integer,octetstring } | |
1753 | type port MyPortType2 message { in octetstring out integer } | |
1754 | type component MyComp { | |
1755 | port MyPortType1 MyPort1; | |
1756 | port MyPortType2 MyPort2; | |
1757 | } | |
1758 | function MyFunc1() runs on MyComp { | |
1759 | connect(self:MyPort1,self:MyPort2); | |
1760 | } | |
1761 | } | |
1762 | <END_MODULE> | |
1763 | <RESULT IF_PASS COUNT 1> | |
1764 | (?is)\berror: | |
1765 | <END_RESULT> | |
1766 | <RESULT IF_PASS COUNT 1> | |
1767 | (?im)\bconnection\b.+?\bnot\b.+?\bconsistent\b | |
1768 | <END_RESULT> | |
1769 | <RESULT IF_PASS COUNT 2> | |
1770 | (?im)\bnot\b.+?\bpresent\b | |
1771 | <END_RESULT> | |
1772 | <RESULT IF_PASS POSITIVE> | |
1773 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
1774 | <END_RESULT> | |
1775 | <END_TC> | |
1776 | ||
1777 | :exmp. | |
1778 | .*---------------------------------------------------------------------* | |
1779 | :h4.Map operation, incorrect variable list case 3 | |
1780 | .*---------------------------------------------------------------------* | |
1781 | :xmp tab=0. | |
1782 | ||
1783 | <TC - Map operation, incorrect variable list case 3> | |
1784 | ||
1785 | <COMPILE> | |
1786 | <VERDICT_LEAF PASS> | |
1787 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
1788 | module ModuleA { | |
1789 | type port MyPortType1 message { out integer,octetstring } | |
1790 | type port MyPortType2 message { in octetstring out integer } | |
1791 | type component MyComp { | |
1792 | port MyPortType1 MyPort1; | |
1793 | port MyPortType2 MyPort2; | |
1794 | } | |
1795 | testcase MyFunc1() runs on MyComp { | |
1796 | map(self:MyPort1,system:MyPort2); | |
1797 | } | |
1798 | } | |
1799 | <END_MODULE> | |
1800 | <RESULT IF_PASS COUNT 1> | |
1801 | (?is)\berror: | |
1802 | <END_RESULT> | |
1803 | <RESULT IF_PASS COUNT 1> | |
1804 | (?im)\bmapping\b.+?\bnot\b.+?\bconsistent\b | |
1805 | <END_RESULT> | |
1806 | <RESULT IF_PASS COUNT 2> | |
1807 | (?im)\bnot\b.+?\bpresent\b | |
1808 | <END_RESULT> | |
1809 | <RESULT IF_PASS POSITIVE> | |
1810 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
1811 | <END_RESULT> | |
1812 | <END_TC> | |
1813 | :exmp. | |
1814 | ||
1815 | :p. | |
1816 | .*---------------------------------------------------------------------* | |
1817 | :h3.The Select Case statement | |
1818 | .*---------------------------------------------------------------------* | |
1819 | :nl.This test case group covers the requirement SA-9/18. | |
1820 | :p. Explanation: | |
1821 | :nl.- All templateInstance in all list branches shall be of a type compatible | |
1822 | with the type of the expression in the header. A list branch is selected | |
1823 | and the block of statements of the selected branch is executed only, if | |
1824 | any of the templateInstance matches the value of the expression in the | |
1825 | header of the statement. On executing the block of statements of the | |
1826 | selected branch (i.e. not jumping out by a go to statement), execution | |
1827 | continues with the statement following the select case statement. | |
1828 | :nl.- The block of statements of an else branch is always executed if no other | |
1829 | branch textually preceding the else branch has been selected. | |
1830 | ||
1831 | .*---------------------------------------------------------------------* | |
1832 | :h4.TTCN-3::SelectCase->control part: with integer | |
1833 | .*---------------------------------------------------------------------* | |
1834 | :xmp tab=0. | |
1835 | <TC - TTCN-3::SelectCase->control part: with integer> | |
1836 | ||
1837 | <COMPILE> | |
1838 | <VERDICT_LEAF PASS> | |
1839 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
1840 | module ModuleA { | |
1841 | modulepar { | |
1842 | integer tsp_int := 1; | |
1843 | } | |
1844 | control { | |
1845 | var integer vl_int := 0; | |
1846 | select (tsp_int) | |
1847 | { | |
1848 | case (0) { vl_int := tsp_int + 10; } | |
1849 | case (1,3) { vl_int := tsp_int + 100; } | |
1850 | case (5,9) { vl_int := tsp_int + 1000; } | |
1851 | case else { vl_int := tsp_int + 2000 } | |
1852 | } | |
1853 | log("Result: ", vl_int); | |
1854 | } | |
1855 | } | |
1856 | <END_MODULE> | |
1857 | <RESULT IF_PASS NEGATIVE> | |
1858 | (?is)\berror: | |
1859 | <END_RESULT> | |
1860 | <RESULT IF_PASS POSITIVE> | |
1861 | (?im)\bnotify\b.+?\bGenerating\b.+?\bcode\b | |
1862 | <END_RESULT> | |
1863 | ||
1864 | <END_TC> | |
1865 | :exmp. | |
1866 | ||
1867 | .*---------------------------------------------------------------------* | |
1868 | :h4.TTCN-3::SelectCase->else branch: not at the end | |
1869 | .*---------------------------------------------------------------------* | |
1870 | :xmp tab=0. | |
1871 | <TC - TTCN-3::SelectCase->else branch: not at the end> | |
1872 | ||
1873 | <COMPILE> | |
1874 | <VERDICT_LEAF PASS> | |
1875 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
1876 | module ModuleA { | |
1877 | modulepar { | |
1878 | integer tsp_int := 1; | |
1879 | } | |
1880 | control { | |
1881 | var integer vl_int := 0; | |
1882 | select (tsp_int) | |
1883 | { | |
1884 | case (0) { vl_int := tsp_int + 10; } | |
1885 | case (1,3) { vl_int := tsp_int + 100; } | |
1886 | case else { vl_int := tsp_int + 2000 } | |
1887 | case (5,9) { vl_int := tsp_int + 1000; } | |
1888 | case else { vl_int := tsp_int + 2000 } | |
1889 | } | |
1890 | log("Result: ", vl_int); | |
1891 | } | |
1892 | } | |
1893 | <END_MODULE> | |
1894 | <RESULT IF_PASS NEGATIVE> | |
1895 | (?is)\berror: | |
1896 | <END_RESULT> | |
1897 | <RESULT IF_PASS COUNT 2> | |
1898 | (?im)\bwarning\b.+?Control.+?never.+?reaches.+?previous | |
1899 | <END_RESULT> | |
1900 | <RESULT IF_PASS POSITIVE> | |
1901 | (?im)\bnotify\b.+?\bGenerating\b.+?\bcode\b | |
1902 | <END_RESULT> | |
1903 | <END_TC> | |
1904 | :exmp. | |
1905 | ||
1906 | .*---------------------------------------------------------------------* | |
1907 | :h4.TTCN-3::SelectCase->expression: timer | |
1908 | .*---------------------------------------------------------------------* | |
1909 | :xmp tab=0. | |
1910 | <TC - TTCN-3::SelectCase->expression: timer> | |
1911 | ||
1912 | <COMPILE> | |
1913 | <VERDICT_LEAF PASS> | |
1914 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
1915 | module ModuleA { | |
1916 | type component CT {} | |
1917 | testcase TC() runs on CT { | |
1918 | timer vl_T := 5.6; | |
1919 | select (vl_T) | |
1920 | { | |
1921 | case (0.4,1.2) { setverdict(pass); } | |
1922 | case else { setverdict(fail); } | |
1923 | } | |
1924 | } | |
1925 | control { execute(TC()); } | |
1926 | } | |
1927 | //error: Reference to a value was expected instead of timer `vl_T1' | |
1928 | <END_MODULE> | |
1929 | <RESULT IF_PASS COUNT 1> | |
1930 | (?im)\berror\b.+?Reference.+?was.+?expected | |
1931 | <END_RESULT> | |
1932 | <RESULT IF_PASS POSITIVE> | |
1933 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
1934 | <END_RESULT> | |
1935 | ||
1936 | <END_TC> | |
1937 | :exmp. | |
1938 | ||
1939 | .*---------------------------------------------------------------------* | |
1940 | :h4.TTCN-3::SelectCase->control part: octetstring instead of integer | |
1941 | .*---------------------------------------------------------------------* | |
1942 | :xmp tab=0. | |
1943 | <TC - TTCN-3::SelectCase->control part: octetstring instead of integer> | |
1944 | ||
1945 | <COMPILE> | |
1946 | <VERDICT_LEAF PASS> | |
1947 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
1948 | module ModuleA { | |
1949 | modulepar { | |
1950 | integer tsp_int := 3; | |
1951 | } | |
1952 | control { | |
1953 | var integer vl_int := 0; | |
1954 | var charstring vl_charstr := "ja"; | |
1955 | select (tsp_int) | |
1956 | { | |
1957 | case (0) | |
1958 | { vl_int := tsp_int + 10; } | |
1959 | case (1, 3, vl_charstr) | |
1960 | { vl_int := tsp_int + 100; } | |
1961 | case (5, 9, 'A5'O, vl_int) | |
1962 | { vl_int := tsp_int + 1000; } | |
1963 | case else | |
1964 | { vl_int := tsp_int + 2000 } | |
1965 | } | |
1966 | log("Result: ", vl_int); | |
1967 | } | |
1968 | } | |
1969 | <END_MODULE> | |
1970 | <RESULT IF_PASS COUNT 1> | |
1971 | (?im)\berror\b.+?Type.+?mismatch.+?integer.+?was.+?expected | |
1972 | <END_RESULT> | |
1973 | <RESULT IF_PASS COUNT 2> | |
1974 | (?im)\berror\b.+?integer.+?was.+?expected | |
1975 | <END_RESULT> | |
1976 | <RESULT IF_PASS POSITIVE> | |
1977 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
1978 | <END_RESULT> | |
1979 | ||
1980 | <END_TC> | |
1981 | :exmp. | |
1982 | ||
1983 | .*---------------------------------------------------------------------* | |
1984 | :h4.TTCN-3::SelectCase->function: bitstring instead of charstring | |
1985 | .*---------------------------------------------------------------------* | |
1986 | :xmp tab=0. | |
1987 | <TC - TTCN-3::SelectCase->function: bitstring instead of charstring> | |
1988 | ||
1989 | <COMPILE> | |
1990 | <VERDICT_LEAF PASS> | |
1991 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
1992 | module ModuleA { | |
1993 | modulepar { | |
1994 | integer tsp_int := 3; | |
1995 | } | |
1996 | function F( in charstring charstr ) return integer | |
1997 | { | |
1998 | var integer vl_int := 0; | |
1999 | var charstring vl_charstr := "ja"; | |
2000 | select (charstr) | |
2001 | { | |
2002 | case ("sdf") | |
2003 | { vl_int := tsp_int + 10; } | |
2004 | case ("ha", vl_charstr) | |
2005 | { vl_int := tsp_int + 100; } | |
2006 | case ("huha", "aha", '111010111'B) | |
2007 | { vl_int := tsp_int + 1000; } | |
2008 | case else | |
2009 | { vl_int := tsp_int + 2000 } | |
2010 | } | |
2011 | return vl_int; | |
2012 | } | |
2013 | ||
2014 | control | |
2015 | { | |
2016 | var integer vl_int := -1; | |
2017 | select (tsp_int) | |
2018 | { | |
2019 | case (0) { vl_int := F("sdf"); } | |
2020 | case (3,vl_int) { vl_int := F("ja"); } | |
2021 | case (5,9) { vl_int := F("aha"); } | |
2022 | case else { vl_int := F("sdfuu"); } | |
2023 | } | |
2024 | log("Result: ", vl_int); | |
2025 | } | |
2026 | } | |
2027 | <END_MODULE> | |
2028 | <RESULT IF_PASS COUNT 1> | |
2029 | (?im)\berror\b.+?character string.+?was.+?expected | |
2030 | <END_RESULT> | |
2031 | <RESULT IF_PASS POSITIVE> | |
2032 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
2033 | <END_RESULT> | |
2034 | ||
2035 | <END_TC> | |
2036 | :exmp. | |
2037 | ||
2038 | .*---------------------------------------------------------------------* | |
2039 | :h4.TTCN-3::SelectCase->altstep: float instead of octetstring | |
2040 | .*---------------------------------------------------------------------* | |
2041 | :xmp tab=0. | |
2042 | <TC - TTCN-3::SelectCase->altstep: float instead of octetstring> | |
2043 | ||
2044 | <COMPILE> | |
2045 | <VERDICT_LEAF PASS> | |
2046 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
2047 | module ModuleA { | |
2048 | modulepar { | |
2049 | integer tsp_int := 3; | |
2050 | } | |
2051 | altstep A( in octetstring octet ) | |
2052 | { | |
2053 | var integer vl_int := 0; | |
2054 | var octetstring vl_octet := 'AB56FF'O; | |
2055 | [else] { | |
2056 | select (octet & 'FF'O) | |
2057 | { | |
2058 | case ('1F'O & 'FF'O) | |
2059 | { vl_int := tsp_int + 10; } | |
2060 | case ('A9'O, vl_octet) | |
2061 | { vl_int := tsp_int + 100; } | |
2062 | case ('C5'O, 'CC'O, 5.6) | |
2063 | { vl_int := tsp_int + 1000; } | |
2064 | case else | |
2065 | { vl_int := tsp_int + 2000 } | |
2066 | } | |
2067 | log("Result: ", vl_int); | |
2068 | } | |
2069 | } | |
2070 | control | |
2071 | { | |
2072 | var integer vl_int := -1; | |
2073 | select (tsp_int) | |
2074 | { | |
2075 | case (0) { A('FF'O); } | |
2076 | case (3,vl_int) { A('A9'O); } | |
2077 | case (5,9) { A('CC'O); } | |
2078 | case else { A('1F'O); } | |
2079 | } | |
2080 | } | |
2081 | } | |
2082 | <END_MODULE> | |
2083 | <RESULT IF_PASS COUNT 1> | |
2084 | (?im)\berror\b.+?octetstring.+?was.+?expected | |
2085 | <END_RESULT> | |
2086 | <RESULT IF_PASS POSITIVE> | |
2087 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
2088 | <END_RESULT> | |
2089 | ||
2090 | <END_TC> | |
2091 | :exmp. | |
2092 | ||
2093 | .*---------------------------------------------------------------------* | |
2094 | :h4.TTCN-3::SelectCase->function_runs_on: float instead of integer | |
2095 | .*---------------------------------------------------------------------* | |
2096 | :xmp tab=0. | |
2097 | <TC - TTCN-3::SelectCase->function_runs_on: float instead of integer> | |
2098 | ||
2099 | <COMPILE> | |
2100 | <VERDICT_LEAF PASS> | |
2101 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
2102 | module ModuleA { | |
2103 | modulepar { | |
2104 | float tsp_float := 1.9; | |
2105 | integer tsp_int := 3; | |
2106 | } | |
2107 | type component CT {} | |
2108 | function F() runs on CT return integer | |
2109 | { | |
2110 | var integer vl_int := 0; | |
2111 | var float vl_float := 0.8; | |
2112 | select (float2int(tsp_float) * tsp_int) | |
2113 | { | |
2114 | case (5 * float2int(vl_float)) | |
2115 | { vl_int := tsp_int + 10; } | |
2116 | case (3, vl_float) | |
2117 | { vl_int := tsp_int + 100; } | |
2118 | case (6, 10, 7) | |
2119 | { vl_int := tsp_int + 1000; } | |
2120 | case else | |
2121 | { vl_int := tsp_int + 2000; } | |
2122 | } | |
2123 | return vl_int; | |
2124 | } | |
2125 | testcase TC() runs on CT | |
2126 | { | |
2127 | log("Result: ", F()); | |
2128 | } | |
2129 | control { execute ( TC() ); } | |
2130 | } | |
2131 | <END_MODULE> | |
2132 | <RESULT IF_PASS COUNT 1> | |
2133 | (?im)\berror\b.+?Type.+?mismatch.+?integer.+?was.+?expected | |
2134 | <END_RESULT> | |
2135 | <RESULT IF_PASS POSITIVE> | |
2136 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
2137 | <END_RESULT> | |
2138 | ||
2139 | <END_TC> | |
2140 | :exmp. | |
2141 | ||
2142 | .*---------------------------------------------------------------------* | |
2143 | :h4.TTCN-3::SelectCase->altstep_runs_on: octet instead of bitstring | |
2144 | .*---------------------------------------------------------------------* | |
2145 | :xmp tab=0. | |
2146 | <TC - TTCN-3::SelectCase->altstep_runs_on: octet instead of bitstring> | |
2147 | ||
2148 | <COMPILE> | |
2149 | <VERDICT_LEAF PASS> | |
2150 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
2151 | module ModuleA { | |
2152 | modulepar { | |
2153 | integer tsp_int := 9; | |
2154 | bitstring tsp_bitstring := '11010'B; | |
2155 | } | |
2156 | type component CT {} | |
2157 | altstep A() runs on CT | |
2158 | { | |
2159 | var integer vl_int; | |
2160 | var bitstring vl_bitstring := '111011010'B; | |
2161 | [else] { | |
2162 | select ('1110'B & tsp_bitstring) | |
2163 | { | |
2164 | case ('1001'B, vl_bitstring) | |
2165 | { vl_int := tsp_int + 10; } | |
2166 | case ('1100'B, '11'O) | |
2167 | { vl_int := tsp_int + 100; } | |
2168 | case ('11011'B, '10'B, '111'B) | |
2169 | { vl_int := tsp_int + 1000; } | |
2170 | case else | |
2171 | { vl_int := tsp_int + 2000; } | |
2172 | } | |
2173 | log("Result: ", vl_int); | |
2174 | } | |
2175 | } | |
2176 | testcase TC() runs on CT { A() } | |
2177 | control { execute ( TC() ); } | |
2178 | } | |
2179 | <END_MODULE> | |
2180 | <RESULT IF_PASS COUNT 1> | |
2181 | (?im)\berror\b.+?bitstring.+?was.+?expected | |
2182 | <END_RESULT> | |
2183 | <RESULT IF_PASS POSITIVE> | |
2184 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
2185 | <END_RESULT> | |
2186 | ||
2187 | <END_TC> | |
2188 | :exmp. | |
2189 | ||
2190 | .*---------------------------------------------------------------------* | |
2191 | :h4.TTCN-3::SelectCase->testcase: integer instead of enum | |
2192 | .*---------------------------------------------------------------------* | |
2193 | :xmp tab=0. | |
2194 | <TC - TTCN-3::SelectCase->testcase: integer instead of enum> | |
2195 | ||
2196 | <COMPILE> | |
2197 | <VERDICT_LEAF PASS> | |
2198 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
2199 | module ModuleA { | |
2200 | modulepar { | |
2201 | integer tsp_int := 9; | |
2202 | Enum tsp_enum := E; | |
2203 | } | |
2204 | type enumerated Enum { A,B,C,D,E,F,G } | |
2205 | type component CT {} | |
2206 | testcase TC() runs on CT | |
2207 | { | |
2208 | var integer vl_int; | |
2209 | var integer vl_H := 5; | |
2210 | var Enum vl_enum := B; | |
2211 | select (tsp_enum) | |
2212 | { | |
2213 | case (G) | |
2214 | { vl_int := tsp_int + 10; } | |
2215 | case (A,F,vl_enum) | |
2216 | { vl_int := tsp_int + 100; } | |
2217 | case (C,D,E,vl_H) | |
2218 | { vl_int := tsp_int + 1000; } | |
2219 | case else | |
2220 | { vl_int := tsp_int + 2000; } | |
2221 | } | |
2222 | log("Result: ", vl_int); | |
2223 | } | |
2224 | control { execute ( TC() ); } | |
2225 | } | |
2226 | <END_MODULE> | |
2227 | <RESULT IF_PASS COUNT 1> | |
2228 | (?im)\berror\b.+?Type.+?mismatch.+?Enum.+?was.+?expected | |
2229 | <END_RESULT> | |
2230 | <RESULT IF_PASS POSITIVE> | |
2231 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
2232 | <END_RESULT> | |
2233 | ||
2234 | <END_TC> | |
2235 | :exmp. | |
2236 | ||
2237 | .*---------------------------------------------------------------------* | |
2238 | :h4.TTCN-3::SelectCase->control part: scope | |
2239 | .*---------------------------------------------------------------------* | |
2240 | :xmp tab=0. | |
2241 | <TC - TTCN-3::SelectCase->control part: scope> | |
2242 | ||
2243 | <COMPILE> | |
2244 | <VERDICT_LEAF PASS> | |
2245 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
2246 | module ModuleA { | |
2247 | modulepar { | |
2248 | integer tsp_int := 1; | |
2249 | } | |
2250 | control { | |
2251 | var integer vl_int := 0; | |
2252 | select (tsp_int) | |
2253 | { | |
2254 | case (1,3,5,7) | |
2255 | { | |
2256 | vl_int := tsp_int + 100; | |
2257 | var integer vl_emb := vl_int * 5; | |
2258 | } | |
2259 | case else | |
2260 | { | |
2261 | vl_int := 0 | |
2262 | } | |
2263 | } | |
2264 | log("Result: ", vl_int); | |
2265 | log("Embedded: ", vl_emb); | |
2266 | } | |
2267 | } | |
2268 | <END_MODULE> | |
2269 | <RESULT IF_PASS COUNT 1> | |
2270 | (?im)\berror\b.+?no.+?local.+?or.+?imported.+?definition.+?vl_emb | |
2271 | <END_RESULT> | |
2272 | <RESULT IF_PASS POSITIVE> | |
2273 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
2274 | <END_RESULT> | |
2275 | ||
2276 | <END_TC> | |
2277 | :exmp. | |
2278 | ||
2279 | .*---------------------------------------------------------------------* | |
2280 | :h4.TTCN-3::SelectCase->control part: identifier overloading | |
2281 | .*---------------------------------------------------------------------* | |
2282 | :xmp tab=0. | |
2283 | <TC - TTCN-3::SelectCase->control part: identifier overloading> | |
2284 | ||
2285 | <COMPILE> | |
2286 | <VERDICT_LEAF PASS> | |
2287 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
2288 | module ModuleA { | |
2289 | modulepar { | |
2290 | integer tsp_int := 1; | |
2291 | } | |
2292 | control { | |
2293 | var integer vl_int := 0; | |
2294 | select (tsp_int) | |
2295 | { | |
2296 | case (1,3,5,7) | |
2297 | { | |
2298 | vl_int := 100; | |
2299 | var integer tsp_int := vl_int * 5; | |
2300 | } | |
2301 | case else | |
2302 | { | |
2303 | vl_int := 0 | |
2304 | } | |
2305 | } | |
2306 | log("Result: ", vl_int); | |
2307 | } | |
2308 | } | |
2309 | <END_MODULE> | |
2310 | <RESULT IF_PASS COUNT 1> | |
2311 | (?im)\berror\b.+?tsp_int.+?not.+?unique | |
2312 | <END_RESULT> | |
2313 | <RESULT IF_PASS COUNT 1> | |
2314 | (?im)\bnote\b.+?tsp_int.+?higher.+?scope | |
2315 | <END_RESULT> | |
2316 | <RESULT IF_PASS COUNT 1> | |
2317 | (?is)\berror: | |
2318 | <END_RESULT> | |
2319 | <RESULT IF_PASS POSITIVE> | |
2320 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
2321 | <END_RESULT> | |
2322 | ||
2323 | <END_TC> | |
2324 | :exmp. | |
2325 | ||
2326 | .*---------------------------------------------------------------------* | |
2327 | :h4.TTCN-3::SelectCase->control part: goto-label | |
2328 | .*---------------------------------------------------------------------* | |
2329 | :xmp tab=0. | |
2330 | <TC - TTCN-3::SelectCase->control part: goto-label> | |
2331 | ||
2332 | <COMPILE> | |
2333 | <VERDICT_LEAF PASS> | |
2334 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
2335 | module ModuleA { | |
2336 | modulepar { | |
2337 | integer tsp_int := 1; | |
2338 | } | |
2339 | control { | |
2340 | var integer vl_int := 0; | |
2341 | select (tsp_int) | |
2342 | { | |
2343 | case (1,3,5,7) | |
2344 | { | |
2345 | vl_int := 100; | |
2346 | goto L1; | |
2347 | } | |
2348 | case else | |
2349 | { | |
2350 | label L1; | |
2351 | vl_int := 0 | |
2352 | } | |
2353 | } | |
2354 | log("Result: ", vl_int); | |
2355 | } | |
2356 | } | |
2357 | <END_MODULE> | |
2358 | <RESULT IF_PASS COUNT 1> | |
2359 | (?im)\berror\b.+?Label.+?L1.+?not.+?defined | |
2360 | <END_RESULT> | |
2361 | <RESULT IF_PASS COUNT 1> | |
2362 | (?is)\berror: | |
2363 | <END_RESULT> | |
2364 | <RESULT IF_PASS POSITIVE> | |
2365 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
2366 | <END_RESULT> | |
2367 | ||
2368 | <END_TC> | |
2369 | :exmp. | |
2370 | ||
2371 | .*---------------------------------------------------------------------* | |
2372 | :h4.TTCN-3::SelectCase->Syntax error_1 | |
2373 | .*---------------------------------------------------------------------* | |
2374 | :xmp tab=0. | |
2375 | <TC - TTCN-3::SelectCase->Syntax error_1> | |
2376 | ||
2377 | <COMPILE> | |
2378 | <VERDICT_LEAF PASS> | |
2379 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
2380 | module ModuleA { | |
2381 | modulepar { | |
2382 | integer tsp_int := 1; | |
2383 | } | |
2384 | control { | |
2385 | var integer vl_int := 0; | |
2386 | select (tsp_int) | |
2387 | case (1,3,5,7) | |
2388 | { | |
2389 | vl_int := 100; | |
2390 | } | |
2391 | case else | |
2392 | { | |
2393 | vl_int := 0 | |
2394 | } | |
2395 | } | |
2396 | } | |
2397 | } | |
2398 | <END_MODULE> | |
2399 | <RESULT IF_PASS COUNT 2> | |
2400 | (?im)\berror\b.+?syntax.+?error | |
2401 | <END_RESULT> | |
2402 | <RESULT IF_PASS COUNT 2> | |
2403 | (?is)\berror: | |
2404 | <END_RESULT> | |
2405 | <RESULT IF_PASS POSITIVE> | |
2406 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
2407 | <END_RESULT> | |
2408 | ||
2409 | <END_TC> | |
2410 | :exmp. | |
2411 | ||
2412 | .*---------------------------------------------------------------------* | |
2413 | :h4.TTCN-3::SelectCase->Syntax error_2 | |
2414 | .*---------------------------------------------------------------------* | |
2415 | :xmp tab=0. | |
2416 | <TC - TTCN-3::SelectCase->Syntax error_2> | |
2417 | ||
2418 | <COMPILE> | |
2419 | <VERDICT_LEAF PASS> | |
2420 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
2421 | module ModuleA { | |
2422 | modulepar { | |
2423 | integer tsp_int := 1; | |
2424 | } | |
2425 | control { | |
2426 | var integer vl_int := 0; | |
2427 | select (tsp_int) | |
2428 | { | |
2429 | case (1,3,5 7) | |
2430 | { | |
2431 | vl_int := 100; | |
2432 | } | |
2433 | case else | |
2434 | { | |
2435 | vl_int := 0 | |
2436 | } | |
2437 | } | |
2438 | } | |
2439 | } | |
2440 | <END_MODULE> | |
2441 | <RESULT IF_PASS COUNT 1> | |
2442 | (?im)\berror\b.+?syntax.+?error | |
2443 | <END_RESULT> | |
2444 | <RESULT IF_PASS COUNT 1> | |
2445 | (?is)\berror: | |
2446 | <END_RESULT> | |
2447 | <RESULT IF_PASS POSITIVE> | |
2448 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
2449 | <END_RESULT> | |
2450 | ||
2451 | <END_TC> | |
2452 | :exmp. | |
2453 | ||
2454 | .*---------------------------------------------------------------------* | |
2455 | :h4.TTCN-3::SelectCase->Syntax error_3 | |
2456 | .*---------------------------------------------------------------------* | |
2457 | :xmp tab=0. | |
2458 | <TC - TTCN-3::SelectCase->Syntax error_3> | |
2459 | ||
2460 | <COMPILE> | |
2461 | <VERDICT_LEAF PASS> | |
2462 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
2463 | module ModuleA { | |
2464 | modulepar { | |
2465 | integer tsp_int := 1; | |
2466 | } | |
2467 | control { | |
2468 | var integer vl_int := 0; | |
2469 | select (tsp_int) | |
2470 | { | |
2471 | case (1,3,5,7) | |
2472 | vl_int := 100; | |
2473 | case else | |
2474 | { | |
2475 | vl_int := 0 | |
2476 | } | |
2477 | } | |
2478 | } | |
2479 | } | |
2480 | <END_MODULE> | |
2481 | <RESULT IF_PASS COUNT 1> | |
2482 | (?im)\berror\b.+?syntax.+?error | |
2483 | <END_RESULT> | |
2484 | <RESULT IF_PASS COUNT 1> | |
2485 | (?is)\berror: | |
2486 | <END_RESULT> | |
2487 | <RESULT IF_PASS POSITIVE> | |
2488 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
2489 | <END_RESULT> | |
2490 | ||
2491 | <END_TC> | |
2492 | :exmp. | |
2493 | ||
2494 | .*---------------------------------------------------------------------* | |
2495 | :h4.TTCN-3::SelectCase->Syntax error_4 | |
2496 | .*---------------------------------------------------------------------* | |
2497 | :xmp tab=0. | |
2498 | <TC - TTCN-3::SelectCase->Syntax error_4> | |
2499 | ||
2500 | <COMPILE> | |
2501 | <VERDICT_LEAF PASS> | |
2502 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
2503 | module ModuleA { | |
2504 | modulepar { | |
2505 | integer tsp_int := 1; | |
2506 | } | |
2507 | control { | |
2508 | var integer vl_int := 0; | |
2509 | select (tsp_int) | |
2510 | { | |
2511 | case (1,3,5,7) | |
2512 | { | |
2513 | vl_int := 100; | |
2514 | } | |
2515 | case | |
2516 | { | |
2517 | vl_int := 0 | |
2518 | } | |
2519 | } | |
2520 | } | |
2521 | } | |
2522 | <END_MODULE> | |
2523 | <RESULT IF_PASS COUNT 2> | |
2524 | (?im)\berror\b.+?syntax.+?error | |
2525 | <END_RESULT> | |
2526 | <RESULT IF_PASS COUNT 2> | |
2527 | (?is)\berror: | |
2528 | <END_RESULT> | |
2529 | <RESULT IF_PASS POSITIVE> | |
2530 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
2531 | <END_RESULT> | |
2532 | ||
2533 | <END_TC> | |
2534 | :exmp. | |
2535 | ||
2536 | :p. | |
2537 | .*---------------------------------------------------------------------* | |
2538 | :h3.Configuration Operations | |
2539 | .*---------------------------------------------------------------------* | |
2540 | :nl.This test case group covers the requirement SA-9/19. | |
2541 | :p. Explanation: | |
2542 | :nl.- These operations shall only be used in TTCN-3 testcases, functions | |
2543 | and altsteps (i.e. not in the module control part). | |
2544 | :nl.- The done and killed operations shall not be used in a boolean | |
2545 | expression (i.e. in the if condition ). | |
2546 | :nl.- The alive and running operations shall not be used to determine an | |
2547 | alternative (i.e. in the alt condition). | |
2548 | :nl.- Create operation: optionally, a name can be associated with the newly | |
2549 | created component instance. The name shall be a charstring value. | |
2550 | ||
2551 | .*---------------------------------------------------------------------* | |
2552 | :h4.TTCN-3::ConfigOper->create in the control part | |
2553 | .*---------------------------------------------------------------------* | |
2554 | :xmp tab=0. | |
2555 | <TC - TTCN-3::ConfigOper->create in the control part> | |
2556 | ||
2557 | <COMPILE> | |
2558 | <VERDICT_LEAF PASS> | |
2559 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
2560 | module ModuleA { | |
2561 | type component ct {}; | |
2562 | control { | |
2563 | var ct comp := ct.create; | |
2564 | var ct comp1 := ct.create alive; | |
2565 | } | |
2566 | } | |
2567 | <END_MODULE> | |
2568 | <RESULT IF_PASS COUNT 2> | |
2569 | (?im)\berror\b.+?create.+?not.+?allowed.+?control.+?part | |
2570 | <END_RESULT> | |
2571 | <RESULT IF_PASS COUNT 2> | |
2572 | (?is)\berror: | |
2573 | <END_RESULT> | |
2574 | <RESULT IF_PASS POSITIVE> | |
2575 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
2576 | <END_RESULT> | |
2577 | ||
2578 | <END_TC> | |
2579 | :exmp. | |
2580 | ||
2581 | .*---------------------------------------------------------------------* | |
2582 | :h4.TTCN-3::ConfigOper->start operation in the control part | |
2583 | .*---------------------------------------------------------------------* | |
2584 | :xmp tab=0. | |
2585 | <TC - TTCN-3::ConfigOper->start operation in the control part> | |
2586 | ||
2587 | <COMPILE> | |
2588 | <VERDICT_LEAF PASS> | |
2589 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
2590 | module ModuleA { | |
2591 | type component ct {}; | |
2592 | function f() runs on ct {}; | |
2593 | control { | |
2594 | var ct comp; | |
2595 | comp.start(f()); | |
2596 | } | |
2597 | } | |
2598 | <END_MODULE> | |
2599 | <RESULT IF_PASS COUNT 1> | |
2600 | (?im)\berror\b.+?Component.+?operation.+?not.+?allowed.+?control.+?part | |
2601 | <END_RESULT> | |
2602 | <RESULT IF_PASS COUNT 1> | |
2603 | (?is)\berror: | |
2604 | <END_RESULT> | |
2605 | <RESULT IF_PASS POSITIVE> | |
2606 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
2607 | <END_RESULT> | |
2608 | ||
2609 | <END_TC> | |
2610 | :exmp. | |
2611 | ||
2612 | .*---------------------------------------------------------------------* | |
2613 | :h4.TTCN-3::ConfigOper->stop operation in the control part | |
2614 | .*---------------------------------------------------------------------* | |
2615 | :xmp tab=0. | |
2616 | <TC - TTCN-3::ConfigOper->stop operation in the control part> | |
2617 | ||
2618 | <COMPILE> | |
2619 | <VERDICT_LEAF PASS> | |
2620 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
2621 | module ModuleA { | |
2622 | type component ct {}; | |
2623 | control { | |
2624 | var ct comp; | |
2625 | comp.stop; | |
2626 | } | |
2627 | } | |
2628 | <END_MODULE> | |
2629 | <RESULT IF_PASS COUNT 1> | |
2630 | (?im)\berror\b.+?Component.+?operation.+?not.+?allowed.+?control.+?part | |
2631 | <END_RESULT> | |
2632 | <RESULT IF_PASS COUNT 1> | |
2633 | (?is)\berror: | |
2634 | <END_RESULT> | |
2635 | <RESULT IF_PASS POSITIVE> | |
2636 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
2637 | <END_RESULT> | |
2638 | ||
2639 | <END_TC> | |
2640 | :exmp. | |
2641 | ||
2642 | .*---------------------------------------------------------------------* | |
2643 | :h4.TTCN-3::ConfigOper->all-stop operation in the control part | |
2644 | .*---------------------------------------------------------------------* | |
2645 | :xmp tab=0. | |
2646 | <TC - TTCN-3::ConfigOper->all-stop operation in the control part> | |
2647 | ||
2648 | <COMPILE> | |
2649 | <VERDICT_LEAF PASS> | |
2650 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
2651 | module ModuleA { | |
2652 | type component ct {}; | |
2653 | control { | |
2654 | var ct comp; | |
2655 | all component.stop; | |
2656 | } | |
2657 | } | |
2658 | <END_MODULE> | |
2659 | <RESULT IF_PASS COUNT 1> | |
2660 | (?im)\berror\b.+?syntax.+?error | |
2661 | <END_RESULT> | |
2662 | <RESULT IF_PASS COUNT 1> | |
2663 | (?is)\berror: | |
2664 | <END_RESULT> | |
2665 | <RESULT IF_PASS POSITIVE> | |
2666 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
2667 | <END_RESULT> | |
2668 | ||
2669 | <END_TC> | |
2670 | :exmp. | |
2671 | ||
2672 | .*---------------------------------------------------------------------* | |
2673 | :h4.TTCN-3::ConfigOper->kill operation in the control part | |
2674 | .*---------------------------------------------------------------------* | |
2675 | :xmp tab=0. | |
2676 | <TC - TTCN-3::ConfigOper->kill operation in the control part> | |
2677 | ||
2678 | <COMPILE> | |
2679 | <VERDICT_LEAF PASS> | |
2680 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
2681 | module ModuleA { | |
2682 | type component ct {}; | |
2683 | control { | |
2684 | var ct comp; | |
2685 | comp.kill; | |
2686 | } | |
2687 | } | |
2688 | <END_MODULE> | |
2689 | <RESULT IF_PASS COUNT 1> | |
2690 | (?im)\berror\b.+?syntax.+?error | |
2691 | <END_RESULT> | |
2692 | <RESULT IF_PASS COUNT 1> | |
2693 | (?is)\berror: | |
2694 | <END_RESULT> | |
2695 | <RESULT IF_PASS POSITIVE> | |
2696 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
2697 | <END_RESULT> | |
2698 | ||
2699 | <END_TC> | |
2700 | :exmp. | |
2701 | ||
2702 | .*---------------------------------------------------------------------* | |
2703 | :h4.TTCN-3::ConfigOper->all-kill operation in the control part | |
2704 | .*---------------------------------------------------------------------* | |
2705 | :xmp tab=0. | |
2706 | <TC - TTCN-3::ConfigOper->all-kill operation in the control part> | |
2707 | ||
2708 | <COMPILE> | |
2709 | <VERDICT_LEAF PASS> | |
2710 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
2711 | module ModuleA { | |
2712 | type component ct {}; | |
2713 | control { | |
2714 | var ct comp; | |
2715 | all component.kill; | |
2716 | } | |
2717 | } | |
2718 | <END_MODULE> | |
2719 | <RESULT IF_PASS COUNT 1> | |
2720 | (?im)\berror\b.+?syntax.+?error | |
2721 | <END_RESULT> | |
2722 | <RESULT IF_PASS COUNT 1> | |
2723 | (?is)\berror: | |
2724 | <END_RESULT> | |
2725 | <RESULT IF_PASS POSITIVE> | |
2726 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
2727 | <END_RESULT> | |
2728 | ||
2729 | <END_TC> | |
2730 | :exmp. | |
2731 | ||
2732 | .*---------------------------------------------------------------------* | |
2733 | :h4.TTCN-3::ConfigOper->alive operation in the control part | |
2734 | .*---------------------------------------------------------------------* | |
2735 | :xmp tab=0. | |
2736 | <TC - TTCN-3::ConfigOper->alive operation in the control part> | |
2737 | ||
2738 | <COMPILE> | |
2739 | <VERDICT_LEAF PASS> | |
2740 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
2741 | module ModuleA { | |
2742 | type component ct {}; | |
2743 | control { | |
2744 | var ct comp; | |
2745 | if (comp.alive) {} | |
2746 | } | |
2747 | } | |
2748 | <END_MODULE> | |
2749 | <RESULT IF_PASS COUNT 1> | |
2750 | (?im)\berror\b.+?Operation.+?not.+?allowed.+?control.+?part | |
2751 | <END_RESULT> | |
2752 | <RESULT IF_PASS COUNT 1> | |
2753 | (?is)\berror: | |
2754 | <END_RESULT> | |
2755 | <RESULT IF_PASS POSITIVE> | |
2756 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
2757 | <END_RESULT> | |
2758 | ||
2759 | <END_TC> | |
2760 | :exmp. | |
2761 | ||
2762 | .*---------------------------------------------------------------------* | |
2763 | :h4.TTCN-3::ConfigOper->any-alive operation in the control part | |
2764 | .*---------------------------------------------------------------------* | |
2765 | :xmp tab=0. | |
2766 | <TC - TTCN-3::ConfigOper->any-alive operation in the control part> | |
2767 | ||
2768 | <COMPILE> | |
2769 | <VERDICT_LEAF PASS> | |
2770 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
2771 | module ModuleA { | |
2772 | type component ct {}; | |
2773 | control { | |
2774 | var ct comp; | |
2775 | if (any component.alive) {}; | |
2776 | } | |
2777 | } | |
2778 | <END_MODULE> | |
2779 | <RESULT IF_PASS COUNT 1> | |
2780 | (?im)\berror\b.+?Operation.+?not.+?allowed.+?control.+?part | |
2781 | <END_RESULT> | |
2782 | <RESULT IF_PASS COUNT 1> | |
2783 | (?is)\berror: | |
2784 | <END_RESULT> | |
2785 | <RESULT IF_PASS POSITIVE> | |
2786 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
2787 | <END_RESULT> | |
2788 | ||
2789 | <END_TC> | |
2790 | :exmp. | |
2791 | ||
2792 | ||
2793 | .*---------------------------------------------------------------------* | |
2794 | :h4.TTCN-3::ConfigOper->all-alive operation in the control part | |
2795 | .*---------------------------------------------------------------------* | |
2796 | :xmp tab=0. | |
2797 | <TC - TTCN-3::ConfigOper->all-alive operation in the control part> | |
2798 | ||
2799 | <COMPILE> | |
2800 | <VERDICT_LEAF PASS> | |
2801 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
2802 | module ModuleA { | |
2803 | type component ct {}; | |
2804 | control { | |
2805 | var ct comp; | |
2806 | if (all component.alive) {}; | |
2807 | } | |
2808 | } | |
2809 | <END_MODULE> | |
2810 | <RESULT IF_PASS COUNT 1> | |
2811 | (?im)\berror\b.+?Operation.+?not.+?allowed.+?control.+?part | |
2812 | <END_RESULT> | |
2813 | <RESULT IF_PASS COUNT 1> | |
2814 | (?is)\berror: | |
2815 | <END_RESULT> | |
2816 | <RESULT IF_PASS POSITIVE> | |
2817 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
2818 | <END_RESULT> | |
2819 | ||
2820 | <END_TC> | |
2821 | :exmp. | |
2822 | ||
2823 | .*---------------------------------------------------------------------* | |
2824 | :h4.TTCN-3::ConfigOper->running operation in the control part | |
2825 | .*---------------------------------------------------------------------* | |
2826 | :xmp tab=0. | |
2827 | <TC - TTCN-3::ConfigOper->running operation in the control part> | |
2828 | ||
2829 | <COMPILE> | |
2830 | <VERDICT_LEAF PASS> | |
2831 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
2832 | module ModuleA { | |
2833 | type component ct {}; | |
2834 | control { | |
2835 | var ct comp; | |
2836 | if (comp.running) {} | |
2837 | } | |
2838 | } | |
2839 | <END_MODULE> | |
2840 | <RESULT IF_PASS COUNT 1> | |
2841 | (?im)\berror\b.+?Operation.+?not.+?allowed.+?control.+?part | |
2842 | <END_RESULT> | |
2843 | <RESULT IF_PASS COUNT 1> | |
2844 | (?is)\berror: | |
2845 | <END_RESULT> | |
2846 | <RESULT IF_PASS POSITIVE> | |
2847 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
2848 | <END_RESULT> | |
2849 | ||
2850 | <END_TC> | |
2851 | :exmp. | |
2852 | ||
2853 | .*---------------------------------------------------------------------* | |
2854 | :h4.TTCN-3::ConfigOper->any-running operation in the control part | |
2855 | .*---------------------------------------------------------------------* | |
2856 | :xmp tab=0. | |
2857 | <TC - TTCN-3::ConfigOper->any-running operation in the control part> | |
2858 | ||
2859 | <COMPILE> | |
2860 | <VERDICT_LEAF PASS> | |
2861 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
2862 | module ModuleA { | |
2863 | type component ct {}; | |
2864 | control { | |
2865 | var ct comp; | |
2866 | if (any component.running) {}; | |
2867 | } | |
2868 | } | |
2869 | <END_MODULE> | |
2870 | <RESULT IF_PASS COUNT 1> | |
2871 | (?im)\berror\b.+?Operation.+?not.+?allowed.+?control.+?part | |
2872 | <END_RESULT> | |
2873 | <RESULT IF_PASS COUNT 1> | |
2874 | (?is)\berror: | |
2875 | <END_RESULT> | |
2876 | <RESULT IF_PASS POSITIVE> | |
2877 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
2878 | <END_RESULT> | |
2879 | ||
2880 | <END_TC> | |
2881 | :exmp. | |
2882 | ||
2883 | ||
2884 | .*---------------------------------------------------------------------* | |
2885 | :h4.TTCN-3::ConfigOper->all-running operation in the control part | |
2886 | .*---------------------------------------------------------------------* | |
2887 | :xmp tab=0. | |
2888 | <TC - TTCN-3::ConfigOper->all-running operation in the control part> | |
2889 | ||
2890 | <COMPILE> | |
2891 | <VERDICT_LEAF PASS> | |
2892 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
2893 | module ModuleA { | |
2894 | type component ct {}; | |
2895 | control { | |
2896 | var ct comp; | |
2897 | if (all component.running) {}; | |
2898 | } | |
2899 | } | |
2900 | <END_MODULE> | |
2901 | <RESULT IF_PASS COUNT 1> | |
2902 | (?im)\berror\b.+?Operation.+?not.+?allowed.+?control.+?part | |
2903 | <END_RESULT> | |
2904 | <RESULT IF_PASS COUNT 1> | |
2905 | (?is)\berror: | |
2906 | <END_RESULT> | |
2907 | <RESULT IF_PASS POSITIVE> | |
2908 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
2909 | <END_RESULT> | |
2910 | ||
2911 | <END_TC> | |
2912 | :exmp. | |
2913 | ||
2914 | .*---------------------------------------------------------------------* | |
2915 | :h4.TTCN-3::ConfigOper->done operation in the control part | |
2916 | .*---------------------------------------------------------------------* | |
2917 | :xmp tab=0. | |
2918 | <TC - TTCN-3::ConfigOper->done operation in the control part> | |
2919 | ||
2920 | <COMPILE> | |
2921 | <VERDICT_LEAF PASS> | |
2922 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
2923 | module ModuleA { | |
2924 | type component ct {}; | |
2925 | control { | |
2926 | var ct comp; | |
2927 | alt { [] comp.done {} } | |
2928 | } | |
2929 | } | |
2930 | <END_MODULE> | |
2931 | <RESULT IF_PASS COUNT 1> | |
2932 | (?im)\berror\b.+?Component.+?operation.+?not.+?allowed.+?control.+?part | |
2933 | <END_RESULT> | |
2934 | <RESULT IF_PASS COUNT 1> | |
2935 | (?is)\berror: | |
2936 | <END_RESULT> | |
2937 | <RESULT IF_PASS POSITIVE> | |
2938 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
2939 | <END_RESULT> | |
2940 | ||
2941 | <END_TC> | |
2942 | :exmp. | |
2943 | ||
2944 | .*---------------------------------------------------------------------* | |
2945 | :h4.TTCN-3::ConfigOper->any-done operation in the control part | |
2946 | .*---------------------------------------------------------------------* | |
2947 | :xmp tab=0. | |
2948 | <TC - TTCN-3::ConfigOper->any-done operation in the control part> | |
2949 | ||
2950 | <COMPILE> | |
2951 | <VERDICT_LEAF PASS> | |
2952 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
2953 | module ModuleA { | |
2954 | type component ct {}; | |
2955 | control { | |
2956 | var ct comp; | |
2957 | alt { [] any component.done {} } | |
2958 | } | |
2959 | } | |
2960 | <END_MODULE> | |
2961 | <RESULT IF_PASS COUNT 1> | |
2962 | (?im)\berror\b.+?Component.+?operation.+?not.+?allowed.+?control.+?part | |
2963 | <END_RESULT> | |
2964 | <RESULT IF_PASS COUNT 1> | |
2965 | (?is)\berror: | |
2966 | <END_RESULT> | |
2967 | <RESULT IF_PASS POSITIVE> | |
2968 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
2969 | <END_RESULT> | |
2970 | ||
2971 | <END_TC> | |
2972 | :exmp. | |
2973 | ||
2974 | .*---------------------------------------------------------------------* | |
2975 | :h4.TTCN-3::ConfigOper->all-done operation in the control part | |
2976 | .*---------------------------------------------------------------------* | |
2977 | :xmp tab=0. | |
2978 | <TC - TTCN-3::ConfigOper->all-done operation in the control part> | |
2979 | ||
2980 | <COMPILE> | |
2981 | <VERDICT_LEAF PASS> | |
2982 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
2983 | module ModuleA { | |
2984 | type component ct {}; | |
2985 | control { | |
2986 | var ct comp; | |
2987 | alt { [] all component.done {} } | |
2988 | } | |
2989 | } | |
2990 | <END_MODULE> | |
2991 | <RESULT IF_PASS COUNT 1> | |
2992 | (?im)\berror\b.+?Component.+?operation.+?not.+?allowed.+?control.+?part | |
2993 | <END_RESULT> | |
2994 | <RESULT IF_PASS COUNT 1> | |
2995 | (?is)\berror: | |
2996 | <END_RESULT> | |
2997 | <RESULT IF_PASS POSITIVE> | |
2998 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
2999 | <END_RESULT> | |
3000 | ||
3001 | <END_TC> | |
3002 | :exmp. | |
3003 | ||
3004 | .*---------------------------------------------------------------------* | |
3005 | :h4.TTCN-3::ConfigOper->killed operation in the control part | |
3006 | .*---------------------------------------------------------------------* | |
3007 | :xmp tab=0. | |
3008 | <TC - TTCN-3::ConfigOper->killed operation in the control part> | |
3009 | ||
3010 | <COMPILE> | |
3011 | <VERDICT_LEAF PASS> | |
3012 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
3013 | module ModuleA { | |
3014 | type component ct {}; | |
3015 | control { | |
3016 | var ct comp; | |
3017 | alt { [] comp.killed {} } | |
3018 | } | |
3019 | } | |
3020 | <END_MODULE> | |
3021 | <RESULT IF_PASS COUNT 1> | |
3022 | (?im)\berror\b.+?Component.+?operation.+?not.+?allowed.+?control.+?part | |
3023 | <END_RESULT> | |
3024 | <RESULT IF_PASS COUNT 1> | |
3025 | (?is)\berror: | |
3026 | <END_RESULT> | |
3027 | <RESULT IF_PASS POSITIVE> | |
3028 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
3029 | <END_RESULT> | |
3030 | ||
3031 | <END_TC> | |
3032 | :exmp. | |
3033 | ||
3034 | .*---------------------------------------------------------------------* | |
3035 | :h4.TTCN-3::ConfigOper->any-killed operation in the control part | |
3036 | .*---------------------------------------------------------------------* | |
3037 | :xmp tab=0. | |
3038 | <TC - TTCN-3::ConfigOper->any-killed operation in the control part> | |
3039 | ||
3040 | <COMPILE> | |
3041 | <VERDICT_LEAF PASS> | |
3042 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
3043 | module ModuleA { | |
3044 | type component ct {}; | |
3045 | control { | |
3046 | var ct comp; | |
3047 | alt { [] any component.killed {} } | |
3048 | } | |
3049 | } | |
3050 | <END_MODULE> | |
3051 | <RESULT IF_PASS COUNT 1> | |
3052 | (?im)\berror\b.+?Component.+?operation.+?not.+?allowed.+?control.+?part | |
3053 | <END_RESULT> | |
3054 | <RESULT IF_PASS COUNT 1> | |
3055 | (?is)\berror: | |
3056 | <END_RESULT> | |
3057 | <RESULT IF_PASS POSITIVE> | |
3058 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
3059 | <END_RESULT> | |
3060 | ||
3061 | <END_TC> | |
3062 | :exmp. | |
3063 | ||
3064 | .*---------------------------------------------------------------------* | |
3065 | :h4.TTCN-3::ConfigOper->all-killed operation in the control part | |
3066 | .*---------------------------------------------------------------------* | |
3067 | :xmp tab=0. | |
3068 | <TC - TTCN-3::ConfigOper->all-killed operation in the control part> | |
3069 | ||
3070 | <COMPILE> | |
3071 | <VERDICT_LEAF PASS> | |
3072 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
3073 | module ModuleA { | |
3074 | type component ct {}; | |
3075 | control { | |
3076 | var ct comp; | |
3077 | alt { [] all component.killed {} } | |
3078 | } | |
3079 | } | |
3080 | <END_MODULE> | |
3081 | <RESULT IF_PASS COUNT 1> | |
3082 | (?im)\berror\b.+?Component.+?operation.+?not.+?allowed.+?control.+?part | |
3083 | <END_RESULT> | |
3084 | <RESULT IF_PASS COUNT 1> | |
3085 | (?is)\berror: | |
3086 | <END_RESULT> | |
3087 | <RESULT IF_PASS POSITIVE> | |
3088 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
3089 | <END_RESULT> | |
3090 | ||
3091 | <END_TC> | |
3092 | :exmp. | |
3093 | ||
3094 | .*---------------------------------------------------------------------* | |
3095 | :h4.TTCN-3::ConfigOper->connect operation in the control part | |
3096 | .*---------------------------------------------------------------------* | |
3097 | :xmp tab=0. | |
3098 | <TC - TTCN-3::ConfigOper->connect operation in the control part> | |
3099 | ||
3100 | <COMPILE> | |
3101 | <VERDICT_LEAF PASS> | |
3102 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
3103 | module ModuleA { | |
3104 | type port Port message { inout integer }; | |
3105 | type component ct { port Port port1; } | |
3106 | function f() runs on ct {}; | |
3107 | control { | |
3108 | var ct comp; | |
3109 | connect(mtc:Port1,comp:Port1); | |
3110 | } | |
3111 | } | |
3112 | <END_MODULE> | |
3113 | <RESULT IF_PASS COUNT 1> | |
3114 | (?im)\berror\b.+?syntax.+?error | |
3115 | <END_RESULT> | |
3116 | <RESULT IF_PASS COUNT 1> | |
3117 | (?is)\berror: | |
3118 | <END_RESULT> | |
3119 | <RESULT IF_PASS POSITIVE> | |
3120 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
3121 | <END_RESULT> | |
3122 | ||
3123 | <END_TC> | |
3124 | :exmp. | |
3125 | ||
3126 | .*---------------------------------------------------------------------* | |
3127 | :h4.TTCN-3::ConfigOper->disconnect operation in the control part | |
3128 | .*---------------------------------------------------------------------* | |
3129 | :xmp tab=0. | |
3130 | <TC - TTCN-3::ConfigOper->disconnect operation in the control part> | |
3131 | ||
3132 | <COMPILE> | |
3133 | <VERDICT_LEAF PASS> | |
3134 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
3135 | module ModuleA { | |
3136 | type port Port message { inout integer }; | |
3137 | type component ct { port Port port1; } | |
3138 | function f() runs on ct {}; | |
3139 | control { | |
3140 | var ct comp; | |
3141 | disconnect(self:Port1,comp:Port1); | |
3142 | } | |
3143 | } | |
3144 | <END_MODULE> | |
3145 | <RESULT IF_PASS COUNT 1> | |
3146 | (?im)\berror\b.+?syntax.+?error | |
3147 | <END_RESULT> | |
3148 | <RESULT IF_PASS COUNT 1> | |
3149 | (?is)\berror: | |
3150 | <END_RESULT> | |
3151 | <RESULT IF_PASS POSITIVE> | |
3152 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
3153 | <END_RESULT> | |
3154 | ||
3155 | <END_TC> | |
3156 | :exmp. | |
3157 | ||
3158 | .*---------------------------------------------------------------------* | |
3159 | :h4.TTCN-3::ConfigOper->map operation in the control part | |
3160 | .*---------------------------------------------------------------------* | |
3161 | :xmp tab=0. | |
3162 | <TC - TTCN-3::ConfigOper->map operation in the control part> | |
3163 | ||
3164 | <COMPILE> | |
3165 | <VERDICT_LEAF PASS> | |
3166 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
3167 | module ModuleA { | |
3168 | type port Port message { inout integer }; | |
3169 | type component ct { port Port port1; } | |
3170 | function f() runs on ct {}; | |
3171 | control { | |
3172 | var ct comp; | |
3173 | map(comp:Port1,system:Port1); | |
3174 | } | |
3175 | } | |
3176 | <END_MODULE> | |
3177 | <RESULT IF_PASS COUNT 1> | |
3178 | (?im)\berror\b.+?syntax.+?error | |
3179 | <END_RESULT> | |
3180 | <RESULT IF_PASS COUNT 1> | |
3181 | (?is)\berror: | |
3182 | <END_RESULT> | |
3183 | <RESULT IF_PASS POSITIVE> | |
3184 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
3185 | <END_RESULT> | |
3186 | ||
3187 | <END_TC> | |
3188 | :exmp. | |
3189 | ||
3190 | .*---------------------------------------------------------------------* | |
3191 | :h4.TTCN-3::ConfigOper->unmap operation in the control part | |
3192 | .*---------------------------------------------------------------------* | |
3193 | :xmp tab=0. | |
3194 | <TC - TTCN-3::ConfigOper->unmap operation in the control part> | |
3195 | ||
3196 | <COMPILE> | |
3197 | <VERDICT_LEAF PASS> | |
3198 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
3199 | module ModuleA { | |
3200 | type port Port message { inout integer }; | |
3201 | type component ct { port Port port1; } | |
3202 | function f() runs on ct {}; | |
3203 | control { | |
3204 | var ct comp; | |
3205 | unmap(comp:Port1,system:Port1); | |
3206 | } | |
3207 | } | |
3208 | <END_MODULE> | |
3209 | <RESULT IF_PASS COUNT 1> | |
3210 | (?im)\berror\b.+?syntax.+?error | |
3211 | <END_RESULT> | |
3212 | <RESULT IF_PASS COUNT 1> | |
3213 | (?is)\berror: | |
3214 | <END_RESULT> | |
3215 | <RESULT IF_PASS POSITIVE> | |
3216 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
3217 | <END_RESULT> | |
3218 | ||
3219 | <END_TC> | |
3220 | :exmp. | |
3221 | ||
3222 | .*---------------------------------------------------------------------* | |
3223 | :h4.TTCN-3::ConfigOper->stop operation in the if condition | |
3224 | .*---------------------------------------------------------------------* | |
3225 | :xmp tab=0. | |
3226 | <TC - TTCN-3::ConfigOper->stop operation in the if condition> | |
3227 | ||
3228 | <COMPILE> | |
3229 | <VERDICT_LEAF PASS> | |
3230 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
3231 | module ModuleA { | |
3232 | type component ct {} | |
3233 | testcase tc() runs on ct { | |
3234 | var ct comp:=ct.create alive; | |
3235 | if ( comp.stop ) {} | |
3236 | } | |
3237 | } | |
3238 | <END_MODULE> | |
3239 | <RESULT IF_PASS COUNT 1> | |
3240 | (?im)\berror\b.+?syntax.+?error | |
3241 | <END_RESULT> | |
3242 | <RESULT IF_PASS COUNT 1> | |
3243 | (?is)\berror: | |
3244 | <END_RESULT> | |
3245 | <RESULT IF_PASS POSITIVE> | |
3246 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
3247 | <END_RESULT> | |
3248 | ||
3249 | <END_TC> | |
3250 | :exmp. | |
3251 | ||
3252 | .*---------------------------------------------------------------------* | |
3253 | :h4.TTCN-3::ConfigOper->all-stop operation in the if condition | |
3254 | .*---------------------------------------------------------------------* | |
3255 | :xmp tab=0. | |
3256 | <TC - TTCN-3::ConfigOper->all-stop operation in the if condition> | |
3257 | ||
3258 | <COMPILE> | |
3259 | <VERDICT_LEAF PASS> | |
3260 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
3261 | module ModuleA { | |
3262 | type component ct {} | |
3263 | testcase tc() runs on ct { | |
3264 | var ct comp:=ct.create alive; | |
3265 | if ( all component.stop ) {} | |
3266 | } | |
3267 | } | |
3268 | <END_MODULE> | |
3269 | <RESULT IF_PASS COUNT 1> | |
3270 | (?im)\berror\b.+?syntax.+?error | |
3271 | <END_RESULT> | |
3272 | <RESULT IF_PASS COUNT 1> | |
3273 | (?is)\berror: | |
3274 | <END_RESULT> | |
3275 | <RESULT IF_PASS POSITIVE> | |
3276 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
3277 | <END_RESULT> | |
3278 | ||
3279 | <END_TC> | |
3280 | :exmp. | |
3281 | ||
3282 | .*---------------------------------------------------------------------* | |
3283 | :h4.TTCN-3::ConfigOper->kill operation in the if condition | |
3284 | .*---------------------------------------------------------------------* | |
3285 | :xmp tab=0. | |
3286 | <TC - TTCN-3::ConfigOper->kill operation in the if condition> | |
3287 | ||
3288 | <COMPILE> | |
3289 | <VERDICT_LEAF PASS> | |
3290 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
3291 | module ModuleA { | |
3292 | type component ct {} | |
3293 | testcase tc() runs on ct { | |
3294 | var ct comp:=ct.create alive; | |
3295 | if ( comp.kill ) {} | |
3296 | } | |
3297 | } | |
3298 | <END_MODULE> | |
3299 | <RESULT IF_PASS COUNT 1> | |
3300 | (?im)\berror\b.+?syntax.+?error | |
3301 | <END_RESULT> | |
3302 | <RESULT IF_PASS COUNT 1> | |
3303 | (?is)\berror: | |
3304 | <END_RESULT> | |
3305 | <RESULT IF_PASS POSITIVE> | |
3306 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
3307 | <END_RESULT> | |
3308 | ||
3309 | <END_TC> | |
3310 | :exmp. | |
3311 | ||
3312 | .*---------------------------------------------------------------------* | |
3313 | :h4.TTCN-3::ConfigOper->all-kill operation in the if condition | |
3314 | .*---------------------------------------------------------------------* | |
3315 | :xmp tab=0. | |
3316 | <TC - TTCN-3::ConfigOper->all-kill operation in the if condition> | |
3317 | ||
3318 | <COMPILE> | |
3319 | <VERDICT_LEAF PASS> | |
3320 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
3321 | module ModuleA { | |
3322 | type component ct {} | |
3323 | testcase tc() runs on ct { | |
3324 | var ct comp:=ct.create alive; | |
3325 | if ( all component.kill ) {} | |
3326 | } | |
3327 | } | |
3328 | <END_MODULE> | |
3329 | <RESULT IF_PASS COUNT 1> | |
3330 | (?im)\berror\b.+?syntax.+?error | |
3331 | <END_RESULT> | |
3332 | <RESULT IF_PASS COUNT 1> | |
3333 | (?is)\berror: | |
3334 | <END_RESULT> | |
3335 | <RESULT IF_PASS POSITIVE> | |
3336 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
3337 | <END_RESULT> | |
3338 | ||
3339 | <END_TC> | |
3340 | :exmp. | |
3341 | ||
3342 | .*---------------------------------------------------------------------* | |
3343 | :h4.TTCN-3::ConfigOper->done operation in the if condition | |
3344 | .*---------------------------------------------------------------------* | |
3345 | :xmp tab=0. | |
3346 | <TC - TTCN-3::ConfigOper->done operation in the if condition> | |
3347 | ||
3348 | <COMPILE> | |
3349 | <VERDICT_LEAF PASS> | |
3350 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
3351 | module ModuleA { | |
3352 | type component ct {} | |
3353 | testcase tc() runs on ct { | |
3354 | var ct comp:=ct.create alive; | |
3355 | if ( comp.done ) {} | |
3356 | } | |
3357 | } | |
3358 | <END_MODULE> | |
3359 | <RESULT IF_PASS COUNT 1> | |
3360 | (?im)\berror\b.+?syntax.+?error | |
3361 | <END_RESULT> | |
3362 | <RESULT IF_PASS COUNT 1> | |
3363 | (?is)\berror: | |
3364 | <END_RESULT> | |
3365 | <RESULT IF_PASS POSITIVE> | |
3366 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
3367 | <END_RESULT> | |
3368 | ||
3369 | <END_TC> | |
3370 | :exmp. | |
3371 | ||
3372 | .*---------------------------------------------------------------------* | |
3373 | :h4.TTCN-3::ConfigOper->any-done operation in the if condition | |
3374 | .*---------------------------------------------------------------------* | |
3375 | :xmp tab=0. | |
3376 | <TC - TTCN-3::ConfigOper->any-done operation in the if condition> | |
3377 | ||
3378 | <COMPILE> | |
3379 | <VERDICT_LEAF PASS> | |
3380 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
3381 | module ModuleA { | |
3382 | type component ct {} | |
3383 | testcase tc() runs on ct { | |
3384 | var ct comp:=ct.create alive; | |
3385 | if ( any component.done ) {} | |
3386 | } | |
3387 | } | |
3388 | <END_MODULE> | |
3389 | <RESULT IF_PASS COUNT 1> | |
3390 | (?im)\berror\b.+?syntax.+?error | |
3391 | <END_RESULT> | |
3392 | <RESULT IF_PASS COUNT 1> | |
3393 | (?is)\berror: | |
3394 | <END_RESULT> | |
3395 | <RESULT IF_PASS POSITIVE> | |
3396 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
3397 | <END_RESULT> | |
3398 | ||
3399 | <END_TC> | |
3400 | :exmp. | |
3401 | ||
3402 | .*---------------------------------------------------------------------* | |
3403 | :h4.TTCN-3::ConfigOper->all-done operation in the if condition | |
3404 | .*---------------------------------------------------------------------* | |
3405 | :xmp tab=0. | |
3406 | <TC - TTCN-3::ConfigOper->all-done operation in the if condition> | |
3407 | ||
3408 | <COMPILE> | |
3409 | <VERDICT_LEAF PASS> | |
3410 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
3411 | module ModuleA { | |
3412 | type component ct {} | |
3413 | testcase tc() runs on ct { | |
3414 | var ct comp:=ct.create alive; | |
3415 | if ( all component.done ) {} | |
3416 | } | |
3417 | } | |
3418 | <END_MODULE> | |
3419 | <RESULT IF_PASS COUNT 1> | |
3420 | (?im)\berror\b.+?syntax.+?error | |
3421 | <END_RESULT> | |
3422 | <RESULT IF_PASS COUNT 1> | |
3423 | (?is)\berror: | |
3424 | <END_RESULT> | |
3425 | <RESULT IF_PASS POSITIVE> | |
3426 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
3427 | <END_RESULT> | |
3428 | ||
3429 | <END_TC> | |
3430 | :exmp. | |
3431 | ||
3432 | .*---------------------------------------------------------------------* | |
3433 | :h4.TTCN-3::ConfigOper->killed operation in the if condition | |
3434 | .*---------------------------------------------------------------------* | |
3435 | :xmp tab=0. | |
3436 | <TC - TTCN-3::ConfigOper->killed operation in the if condition> | |
3437 | ||
3438 | <COMPILE> | |
3439 | <VERDICT_LEAF PASS> | |
3440 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
3441 | module ModuleA { | |
3442 | type component ct {} | |
3443 | testcase tc() runs on ct { | |
3444 | var ct comp:=ct.create alive; | |
3445 | if ( comp.killed ) {} | |
3446 | } | |
3447 | } | |
3448 | <END_MODULE> | |
3449 | <RESULT IF_PASS COUNT 1> | |
3450 | (?im)\berror\b.+?syntax.+?error | |
3451 | <END_RESULT> | |
3452 | <RESULT IF_PASS COUNT 1> | |
3453 | (?is)\berror: | |
3454 | <END_RESULT> | |
3455 | <RESULT IF_PASS POSITIVE> | |
3456 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
3457 | <END_RESULT> | |
3458 | ||
3459 | <END_TC> | |
3460 | :exmp. | |
3461 | ||
3462 | .*---------------------------------------------------------------------* | |
3463 | :h4.TTCN-3::ConfigOper->any-killed operation in the if condition | |
3464 | .*---------------------------------------------------------------------* | |
3465 | :xmp tab=0. | |
3466 | <TC - TTCN-3::ConfigOper->any-killed operation in the if condition> | |
3467 | ||
3468 | <COMPILE> | |
3469 | <VERDICT_LEAF PASS> | |
3470 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
3471 | module ModuleA { | |
3472 | type component ct {} | |
3473 | testcase tc() runs on ct { | |
3474 | var ct comp:=ct.create alive; | |
3475 | if ( any component.killed ) {} | |
3476 | } | |
3477 | } | |
3478 | <END_MODULE> | |
3479 | <RESULT IF_PASS COUNT 1> | |
3480 | (?im)\berror\b.+?syntax.+?error | |
3481 | <END_RESULT> | |
3482 | <RESULT IF_PASS COUNT 1> | |
3483 | (?is)\berror: | |
3484 | <END_RESULT> | |
3485 | <RESULT IF_PASS POSITIVE> | |
3486 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
3487 | <END_RESULT> | |
3488 | ||
3489 | <END_TC> | |
3490 | :exmp. | |
3491 | ||
3492 | .*---------------------------------------------------------------------* | |
3493 | :h4.TTCN-3::ConfigOper->all-killed operation in the if condition | |
3494 | .*---------------------------------------------------------------------* | |
3495 | :xmp tab=0. | |
3496 | <TC - TTCN-3::ConfigOper->all-killed operation in the if condition> | |
3497 | ||
3498 | <COMPILE> | |
3499 | <VERDICT_LEAF PASS> | |
3500 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
3501 | module ModuleA { | |
3502 | type component ct {} | |
3503 | testcase tc() runs on ct { | |
3504 | var ct comp:=ct.create alive; | |
3505 | if ( all component.killed ) {} | |
3506 | } | |
3507 | } | |
3508 | <END_MODULE> | |
3509 | <RESULT IF_PASS COUNT 1> | |
3510 | (?im)\berror\b.+?syntax.+?error | |
3511 | <END_RESULT> | |
3512 | <RESULT IF_PASS COUNT 1> | |
3513 | (?is)\berror: | |
3514 | <END_RESULT> | |
3515 | <RESULT IF_PASS POSITIVE> | |
3516 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
3517 | <END_RESULT> | |
3518 | ||
3519 | <END_TC> | |
3520 | :exmp. | |
3521 | ||
3522 | .*---------------------------------------------------------------------* | |
3523 | :h4.TTCN-3::ConfigOper->stop operation in the alt condition | |
3524 | .*---------------------------------------------------------------------* | |
3525 | :xmp tab=0. | |
3526 | <TC - TTCN-3::ConfigOper->stop operation in the alt condition> | |
3527 | ||
3528 | <COMPILE> | |
3529 | <VERDICT_LEAF PASS> | |
3530 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
3531 | module ModuleA { | |
3532 | type component ct {} | |
3533 | testcase tc() runs on ct { | |
3534 | var ct comp:=ct.create alive; | |
3535 | alt { [] comp.stop {} } | |
3536 | } | |
3537 | } | |
3538 | <END_MODULE> | |
3539 | <RESULT IF_PASS COUNT 2> | |
3540 | (?im)\berror\b.+?syntax.+?error | |
3541 | <END_RESULT> | |
3542 | <RESULT IF_PASS COUNT 2> | |
3543 | (?is)\berror: | |
3544 | <END_RESULT> | |
3545 | <RESULT IF_PASS POSITIVE> | |
3546 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
3547 | <END_RESULT> | |
3548 | ||
3549 | <END_TC> | |
3550 | :exmp. | |
3551 | ||
3552 | .*---------------------------------------------------------------------* | |
3553 | :h4.TTCN-3::ConfigOper->all-stop operation in the alt condition | |
3554 | .*---------------------------------------------------------------------* | |
3555 | :xmp tab=0. | |
3556 | <TC - TTCN-3::ConfigOper->all-stop operation in the alt condition> | |
3557 | ||
3558 | <COMPILE> | |
3559 | <VERDICT_LEAF PASS> | |
3560 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
3561 | module ModuleA { | |
3562 | type component ct {} | |
3563 | testcase tc() runs on ct { | |
3564 | var ct comp:=ct.create alive; | |
3565 | alt { [] all component.stop {} } | |
3566 | } | |
3567 | } | |
3568 | <END_MODULE> | |
3569 | <RESULT IF_PASS COUNT 2> | |
3570 | (?im)\berror\b.+?syntax.+?error | |
3571 | <END_RESULT> | |
3572 | <RESULT IF_PASS COUNT 2> | |
3573 | (?is)\berror: | |
3574 | <END_RESULT> | |
3575 | <RESULT IF_PASS POSITIVE> | |
3576 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
3577 | <END_RESULT> | |
3578 | ||
3579 | <END_TC> | |
3580 | :exmp. | |
3581 | ||
3582 | .*---------------------------------------------------------------------* | |
3583 | :h4.TTCN-3::ConfigOper->kill operation in the alt condition | |
3584 | .*---------------------------------------------------------------------* | |
3585 | :xmp tab=0. | |
3586 | <TC - TTCN-3::ConfigOper->kill operation in the alt condition> | |
3587 | ||
3588 | <COMPILE> | |
3589 | <VERDICT_LEAF PASS> | |
3590 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
3591 | module ModuleA { | |
3592 | type component ct {} | |
3593 | testcase tc() runs on ct { | |
3594 | var ct comp:=ct.create alive; | |
3595 | alt { [] comp.kill {} } | |
3596 | } | |
3597 | } | |
3598 | <END_MODULE> | |
3599 | <RESULT IF_PASS COUNT 2> | |
3600 | (?im)\berror\b.+?syntax.+?error | |
3601 | <END_RESULT> | |
3602 | <RESULT IF_PASS COUNT 2> | |
3603 | (?is)\berror: | |
3604 | <END_RESULT> | |
3605 | <RESULT IF_PASS POSITIVE> | |
3606 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
3607 | <END_RESULT> | |
3608 | ||
3609 | <END_TC> | |
3610 | :exmp. | |
3611 | ||
3612 | .*---------------------------------------------------------------------* | |
3613 | :h4.TTCN-3::ConfigOper->all-kill operation in the alt condition | |
3614 | .*---------------------------------------------------------------------* | |
3615 | :xmp tab=0. | |
3616 | <TC - TTCN-3::ConfigOper->all-kill operation in the alt condition> | |
3617 | ||
3618 | <COMPILE> | |
3619 | <VERDICT_LEAF PASS> | |
3620 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
3621 | module ModuleA { | |
3622 | type component ct {} | |
3623 | testcase tc() runs on ct { | |
3624 | var ct comp:=ct.create alive; | |
3625 | alt { [] all component.kill {} } | |
3626 | } | |
3627 | } | |
3628 | <END_MODULE> | |
3629 | <RESULT IF_PASS COUNT 2> | |
3630 | (?im)\berror\b.+?syntax.+?error | |
3631 | <END_RESULT> | |
3632 | <RESULT IF_PASS COUNT 2> | |
3633 | (?is)\berror: | |
3634 | <END_RESULT> | |
3635 | <RESULT IF_PASS POSITIVE> | |
3636 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
3637 | <END_RESULT> | |
3638 | ||
3639 | <END_TC> | |
3640 | :exmp. | |
3641 | ||
3642 | .*---------------------------------------------------------------------* | |
3643 | :h4.TTCN-3::ConfigOper->alive operation in the alt condition | |
3644 | .*---------------------------------------------------------------------* | |
3645 | :xmp tab=0. | |
3646 | <TC - TTCN-3::ConfigOper->alive operation in the alt condition> | |
3647 | ||
3648 | <COMPILE> | |
3649 | <VERDICT_LEAF PASS> | |
3650 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
3651 | module ModuleA { | |
3652 | type component ct {} | |
3653 | testcase tc() runs on ct { | |
3654 | var ct comp:=ct.create alive; | |
3655 | alt { [] comp.alive {} } | |
3656 | } | |
3657 | } | |
3658 | <END_MODULE> | |
3659 | <RESULT IF_PASS COUNT 2> | |
3660 | (?im)\berror\b.+?syntax.+?error | |
3661 | <END_RESULT> | |
3662 | <RESULT IF_PASS COUNT 2> | |
3663 | (?is)\berror: | |
3664 | <END_RESULT> | |
3665 | <RESULT IF_PASS POSITIVE> | |
3666 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
3667 | <END_RESULT> | |
3668 | ||
3669 | <END_TC> | |
3670 | :exmp. | |
3671 | ||
3672 | .*---------------------------------------------------------------------* | |
3673 | :h4.TTCN-3::ConfigOper->any-alive operation in the alt condition | |
3674 | .*---------------------------------------------------------------------* | |
3675 | :xmp tab=0. | |
3676 | <TC - TTCN-3::ConfigOper->any-alive operation in the alt condition> | |
3677 | ||
3678 | <COMPILE> | |
3679 | <VERDICT_LEAF PASS> | |
3680 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
3681 | module ModuleA { | |
3682 | type component ct {} | |
3683 | testcase tc() runs on ct { | |
3684 | var ct comp:=ct.create alive; | |
3685 | alt { [] any component.alive {} } | |
3686 | } | |
3687 | } | |
3688 | <END_MODULE> | |
3689 | <RESULT IF_PASS COUNT 2> | |
3690 | (?im)\berror\b.+?syntax.+?error | |
3691 | <END_RESULT> | |
3692 | <RESULT IF_PASS COUNT 2> | |
3693 | (?is)\berror: | |
3694 | <END_RESULT> | |
3695 | <RESULT IF_PASS POSITIVE> | |
3696 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
3697 | <END_RESULT> | |
3698 | ||
3699 | <END_TC> | |
3700 | :exmp. | |
3701 | ||
3702 | .*---------------------------------------------------------------------* | |
3703 | :h4.TTCN-3::ConfigOper->all-alive operation in the alt condition | |
3704 | .*---------------------------------------------------------------------* | |
3705 | :xmp tab=0. | |
3706 | <TC - TTCN-3::ConfigOper->all-alive operation in the alt condition> | |
3707 | ||
3708 | <COMPILE> | |
3709 | <VERDICT_LEAF PASS> | |
3710 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
3711 | module ModuleA { | |
3712 | type component ct {} | |
3713 | testcase tc() runs on ct { | |
3714 | var ct comp:=ct.create alive; | |
3715 | alt { [] all component.alive {} } | |
3716 | } | |
3717 | } | |
3718 | <END_MODULE> | |
3719 | <RESULT IF_PASS COUNT 2> | |
3720 | (?im)\berror\b.+?syntax.+?error | |
3721 | <END_RESULT> | |
3722 | <RESULT IF_PASS COUNT 2> | |
3723 | (?is)\berror: | |
3724 | <END_RESULT> | |
3725 | <RESULT IF_PASS POSITIVE> | |
3726 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
3727 | <END_RESULT> | |
3728 | ||
3729 | <END_TC> | |
3730 | :exmp. | |
3731 | ||
3732 | .*---------------------------------------------------------------------* | |
3733 | :h4.TTCN-3::ConfigOper->running operation in the alt condition | |
3734 | .*---------------------------------------------------------------------* | |
3735 | :xmp tab=0. | |
3736 | <TC - TTCN-3::ConfigOper->running operation in the alt condition> | |
3737 | ||
3738 | <COMPILE> | |
3739 | <VERDICT_LEAF PASS> | |
3740 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
3741 | module ModuleA { | |
3742 | type component ct {} | |
3743 | testcase tc() runs on ct { | |
3744 | var ct comp:=ct.create alive; | |
3745 | alt { [] comp.running {} } | |
3746 | } | |
3747 | } | |
3748 | <END_MODULE> | |
3749 | <RESULT IF_PASS COUNT 2> | |
3750 | (?im)\berror\b.+?syntax.+?error | |
3751 | <END_RESULT> | |
3752 | <RESULT IF_PASS COUNT 2> | |
3753 | (?is)\berror: | |
3754 | <END_RESULT> | |
3755 | <RESULT IF_PASS POSITIVE> | |
3756 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
3757 | <END_RESULT> | |
3758 | ||
3759 | <END_TC> | |
3760 | :exmp. | |
3761 | ||
3762 | .*---------------------------------------------------------------------* | |
3763 | :h4.TTCN-3::ConfigOper->any-running operation in the alt condition | |
3764 | .*---------------------------------------------------------------------* | |
3765 | :xmp tab=0. | |
3766 | <TC - TTCN-3::ConfigOper->any-running operation in the alt condition> | |
3767 | ||
3768 | <COMPILE> | |
3769 | <VERDICT_LEAF PASS> | |
3770 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
3771 | module ModuleA { | |
3772 | type component ct {} | |
3773 | testcase tc() runs on ct { | |
3774 | var ct comp:=ct.create alive; | |
3775 | alt { [] any component.running {} } | |
3776 | } | |
3777 | } | |
3778 | <END_MODULE> | |
3779 | <RESULT IF_PASS COUNT 2> | |
3780 | (?im)\berror\b.+?syntax.+?error | |
3781 | <END_RESULT> | |
3782 | <RESULT IF_PASS COUNT 2> | |
3783 | (?is)\berror: | |
3784 | <END_RESULT> | |
3785 | <RESULT IF_PASS POSITIVE> | |
3786 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
3787 | <END_RESULT> | |
3788 | ||
3789 | <END_TC> | |
3790 | :exmp. | |
3791 | ||
3792 | .*---------------------------------------------------------------------* | |
3793 | :h4.TTCN-3::ConfigOper->all-running operation in the alt condition | |
3794 | .*---------------------------------------------------------------------* | |
3795 | :xmp tab=0. | |
3796 | <TC - TTCN-3::ConfigOper->all-running operation in the alt condition> | |
3797 | ||
3798 | <COMPILE> | |
3799 | <VERDICT_LEAF PASS> | |
3800 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
3801 | module ModuleA { | |
3802 | type component ct {} | |
3803 | testcase tc() runs on ct { | |
3804 | var ct comp:=ct.create alive; | |
3805 | alt { [] all component.running {} } | |
3806 | } | |
3807 | } | |
3808 | <END_MODULE> | |
3809 | <RESULT IF_PASS COUNT 2> | |
3810 | (?im)\berror\b.+?syntax.+?error | |
3811 | <END_RESULT> | |
3812 | <RESULT IF_PASS COUNT 2> | |
3813 | (?is)\berror: | |
3814 | <END_RESULT> | |
3815 | <RESULT IF_PASS POSITIVE> | |
3816 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
3817 | <END_RESULT> | |
3818 | ||
3819 | <END_TC> | |
3820 | :exmp. | |
3821 | ||
3822 | .*---------------------------------------------------------------------* | |
3823 | :h4.TTCN-3::ConfigOper->create name is not charstring | |
3824 | .*---------------------------------------------------------------------* | |
3825 | :xmp tab=0. | |
3826 | <TC - TTCN-3::ConfigOper->create name is not charstring> | |
3827 | ||
3828 | <COMPILE> | |
3829 | <VERDICT_LEAF PASS> | |
3830 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
3831 | module ModuleA { | |
3832 | type component ct {}; | |
3833 | function f() { | |
3834 | var ct comp := ct.create (5); | |
3835 | var ct comp1 := ct.create ('01001'B) alive; | |
3836 | } | |
3837 | altstep a() { | |
3838 | var ct comp := ct.create ('3C'O); | |
3839 | var ct comp1 := ct.create (false) alive; | |
3840 | [else] {} | |
3841 | } | |
3842 | testcase tc() runs on ct { | |
3843 | var ct comp := ct.create (5.6); | |
3844 | var ct comp1 := ct.create ('ffb9a'H) alive; | |
3845 | } | |
3846 | } | |
3847 | <END_MODULE> | |
3848 | <RESULT IF_PASS COUNT 6> | |
3849 | (?im)\berror\b.+?First.+?operand.+?should.+?be.+?charstring | |
3850 | <END_RESULT> | |
3851 | <RESULT IF_PASS COUNT 6> | |
3852 | (?is)\berror: | |
3853 | <END_RESULT> | |
3854 | <RESULT IF_PASS POSITIVE> | |
3855 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
3856 | <END_RESULT> | |
3857 | ||
3858 | <END_TC> | |
3859 | :exmp. | |
3860 | ||
3861 | .*---------------------------------------------------------------------* | |
3862 | :h4.TTCN-3::ConfigOper->Scope: component variable - create alive | |
3863 | .*---------------------------------------------------------------------* | |
3864 | :xmp tab=0. | |
3865 | <TC - TTCN-3::ConfigOper->Scope: component variable - create alive> | |
3866 | ||
3867 | <COMPILE> | |
3868 | <VERDICT_LEAF PASS> | |
3869 | <MODULE TTCN ModuleA ModuleA.ttcn> | |
3870 | module ModuleA { | |
3871 | type component ct {}; | |
3872 | testcase tc() runs on ct { | |
3873 | if (true) { | |
3874 | var ct comp := ct.create ("alive") alive; | |
3875 | } | |
3876 | if ( comp.alive ) {} | |
3877 | } | |
3878 | } | |
3879 | <END_MODULE> | |
3880 | <RESULT IF_PASS COUNT 1> | |
3881 | (?im)\berror\b.+?no.+?local.+?or.+?imported.+?definition.+?comp | |
3882 | <END_RESULT> | |
3883 | <RESULT IF_PASS COUNT 1> | |
3884 | (?is)\berror: | |
3885 | <END_RESULT> | |
3886 | <RESULT IF_PASS POSITIVE> | |
3887 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b | |
3888 | <END_RESULT> | |
3889 | ||
3890 | <END_TC> | |
3891 | :exmp. | |
3892 | ||
3893 | :p. | |
3894 | .*---------------------------------------------------------------------* | |
3895 | :h3.The Interleave statement | |
3896 | .*---------------------------------------------------------------------* | |
3897 | :nl.This test case group covers the requirement SA-9/20. | |
3898 | :p. Explanation: | |
3899 | :nl.- The interleave statement allows to specify the interleaved occurrence | |
3900 | :nl. and handling of the statements done, killed, timeout, receive, trigger, | |
3901 | getcall, catch and check. | |
3902 | :nl.- Control transfer statements for, while, do-while, goto, stop, repeat, | |
3903 | :nl. return, activate, deactivate, direct call of altsteps as alternatives | |
3904 | :nl. and (direct and indirect) calls of user-defined functions, which include | |
3905 | :nl. communication operations, shall not be used in interleave statements. | |
3906 | :nl.- It is not allowed to guard branches of an interleave statement with | |
3907 | Boolean expressions (i.e. the '[ ]' shall always be empty). | |
3908 | :nl. It is also not allowed to specify else branches in interleaved behaviour. | |
3909 | ||
3910 | :p. TTCN-3 language extensions: | |
3911 | :nl.- Loop constructs for, while and do-while loops are accepted and supported | |
3912 | without any restriction in interleave statements. | |
3913 | :nl.- Statements activate, deactivate and stop can also be used within interleave. |