Sync with 5.4.2
[deliverable/titan.core.git] / function_test / Semantic_Analyser / TTCN3_SA_3_TD.script
1 .******************************************************************************
2 .* Copyright (c) 2000-2015 Ericsson Telecom AB
3 .* All rights reserved. This program and the accompanying materials
4 .* are made available under the terms of the Eclipse Public License v1.0
5 .* which accompanies this distribution, and is available at
6 .* http://www.eclipse.org/legal/epl-v10.html
7 .******************************************************************************/
8 :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.14/152 91-CRL 113 200/5 Uen
18 :rev.A
19 :date.2015-04-27
20
21 :prep.ETH/XZ Jeno Balasko
22 :appr.ETH/XZ (Elemer Lelik)
23 :checked.ETHGRY
24
25 :title.Test description of the TTCN-3 Semantic Analyzer: Scope Rules
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 ETIBHRA New document for TITAN R6
37 A 2005-03-18 ETIBHRA Approved after review
38 B 2006-07-31 EJNOSZA Updates for TITAN R6E
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 2007-10-10 ETHNBA Updates for TITAN R7C (runs on self tests)
42 F 2009-06-11 EKRISZA Name correction
43 G 2010-07-02 EKRISZA version update
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 :h2.Purpose
50 .*---------------------------------------------------------------------*
51 The purpose of this Test Description is to define and describe the function
52 test activity for the Semantic Analyser functionality of the TTCN-3 compiler:
53 :nl.SA-1/3: Scope Rules.
54 :p.The specification of the test cases can be found in this document.
55 .*---------------------------------------------------------------------*
56 :h1.Test environment
57 .*---------------------------------------------------------------------*
58 .*---------------------------------------------------------------------*
59 :h2.Hardware
60 .*---------------------------------------------------------------------*
61 No specific hardware requirement.
62 .*---------------------------------------------------------------------*
63 :h2.Software
64 .*---------------------------------------------------------------------*
65 Tests shall be carried out on the following platforms:
66 :list.
67 :li D='1.'.Solaris 8 (Sun OS 5.8) (gcc 3.0.4)
68 :li D='2.'.SUSE Linux Enterprise server 8 (2.4.19-4GB) (gcc 3.2)
69 :li D='3.'.CYGWIN_NT-5.0 (Cygwin DLL: 1.5.12) on Windows 2000 (gcc 3.3.3)
70 :elist.
71 .*---------------------------------------------------------------------*
72 :h2.Configuration
73 .*---------------------------------------------------------------------*
74 The test environment had been setup in CVS. The tester program is stored in:
75 :nl.TTCNv3/function_test/Tools/SAtester.pl
76 :nl.Test cases are stored with extension .script in the directory:
77 :nl.TTCNv3/function_test/Semantic_Analyser/
78 .*---------------------------------------------------------------------*
79 :h2.Installation
80 .*---------------------------------------------------------------------*
81 Install proper TITAN binaries on the used platforms and make sure that
82 your environment settings are correct:
83 :list.
84 :li D='1.'.TTCN3_DIR is set
85 :li D='2.'.$TTCN3_DIR/bin is added to the PATH variable
86 :li D='3.'.$TTCN3_DIR/lib is added to the LD_LIBRARY_PATH variable
87 :li D='4.'.Perl 5.6.0 or higher is available on the platform
88 :li D='5.'.Create a symlink to your Perl binary into the directory where the
89 test cases are stored:
90 :nl.ln -s <your Perl> perl
91 :elist.
92 .*---------------------------------------------------------------------*
93 :h2.Test Tools
94 .*---------------------------------------------------------------------*
95 A tester program had been written in Perl especially for the Semantic Analyser
96 tests. For the list of command line parameters, type 'SAtester.pl -help', for the
97 complete documentation, type 'SAtester.pl -doc'.
98 :p.Test cases are specified in the Test Description documents in EDML format.
99 The tester program parses these files and generates the TTCN-3/ASN.1 modules, then
100 calls the compiler to compile them. The result printout is then matched against
101 different patterns to be able to set the verdict. Test cases contain not only
102 the source modules, but the patterns as well.
103 :p.The tester program allows one-by-one execution of test cases and batched
104 execution as well.
105 :p.NOTE: the tester program requires Perl 5.6.0 or higher.
106
107 :np.
108 .*---------------------------------------------------------------------*
109 :h1.Test cases
110 .*---------------------------------------------------------------------*
111 .*---------------------------------------------------------------------*
112 :h2.Scope units
113 .*---------------------------------------------------------------------*
114 :nl.This test case group covers the requirement SA-3/1.
115 :p. Explanation:
116 :nl.- Definitions made in a scope unit are visible only in that scope hierarchy.
117 :nl.- Scope rule at the "for" statement: see there (ScopeUnits-> For statement).
118 :p.Test strategy:
119 :space 1.
120 :xmp tab=0.
121 Hierarchy of scope units
122
123
124 Abbreviations:
125
126 MDP: Module Definitons Part
127 MCP: Module Control Part
128 CT : Component Type
129 FUN: Function without runs on-clause
130 ALT: Altstep without runs on-clause
131 FWR: Function with runs on-clause
132 AWR: Altstep with runs on-clause
133 TC : Testcase with runs on-clause and optional system-clause
134 BS : Block of statements (within a compound statement)
135 EBS: Embedded block of statements (within a compound statement)
136 :exmp.
137 :space 2.
138 :xmp tab=0.
139 _____________________________________________
140 | |
141 0. _____| MDP |_______
142 | |_____________________________________________| |
143 __|__ __|__ __|__ __|__
144 | | | | | | | |
145 1. | MCP | ________| CT |________ | FUN | | ALT |
146 |_____| | |_____| | |_____| |_____|
147 | __|__ __|__ __|__ | |
148 | | | | | | | | |
149 2. | | FWR | | AWR | | TC | | |
150 | |_____| |_____| |_____| | |
151 __|__ __|__ __|__ __|__ __|__ __|__
152 | | | | | | | | | | | |
153 3. | BS | | BS | | BS | | BS | | BS | | BS |
154 |_____| |_____| |_____| |_____| |_____| |_____|
155 __|__ __|__ __|__ __|__ __|__ __|__
156 | | | | | | | | | | | |
157 4. | EBS | | EBS | | EBS | | EBS | | EBS | | EBS |
158 |_____| |_____| |_____| |_____| |_____| |_____|
159 | | | | | |
160 | | | | | |
161 :exmp.
162 :np.
163 :xmp tab=1.
164 Test cases are based on TTCN-3 according to the followings:
165 - Every bubble on the 1.-2. level is checked with each other.
166 - We checked the "const", the "var" and the "timer" definition.
167 - First we checked a bubble's BS and EBS branches (except CT), second
168 its parent bubbles and then the other bubbles from left to right
169 direction on the 1.-2. level.
170 In the FUN, ALT, FWR, AWR, TC cases we can use a parameter list.
171 There we check "var" and "timer" (except TC for timer) parameters
172 just in the same way as when we make a definition in the BS bubble.
173
174 - Example: FUN bubble
175 Every const and var definiton is an integer.
176 1. Definition of a const in the FUN's EBS is checked in the BS.
177 Definition of a var in the FUN's EBS is checked in the BS.
178 Definition of a timer in the FUN's EBS is checked in the BS.
179 2. Definition of a const in the FUN's BS is checked in the MDP.
180 3. Value parameter of FUN is checked in the MCP.
181 Timer parameter in FUN is checked in the MCP.
182 Value parameter in FUN is checked in the CT.
183 Value parameter in FUN is checked in the ALT.
184 Timer parameter in FUN is checked in the ALT.
185 Value parameter in FUN is checked in the FWR.
186 Timer parameter in FUN is checked in the FWR.
187 Value parameter in FUN is checked in the AWR.
188 Timer parameter in FUN is checked in the AWR.
189 Value parameter in FUN is checked in the TC.
190 Timer parameter in FUN is checked in the TC.
191 4. Definition of a const in the FUN's BS is checked in the MCP.
192 Definition of a var in the FUN's BS is checked in the MCP.
193 Definition of a timer in the FUN's BS is checked in the MCP.
194 5. Definition of a const in the FUN's BS is checked in the CT.
195 Definition of a var in the FUN's BS is checked in the CT.
196 6. Definition of a const in the FUN's BS is checked in the ALT.
197 Definition of a var in the FUN's BS is checked in the ALT.
198 Definition of a timer in the FUN's BS is checked in the ALT.
199 7. Definition of a const in the FUN's BS is checked in the FWR.
200 Definition of a var in the FUN's BS is checked in the FWR.
201 Definition of a timer in the FUN's BS is checked in the FWR.
202 8. Definition of a const in the FUN's BS is checked in the AWR.
203 Definition of a var in the FUN's BS is checked in the AWR.
204 Definition of a timer in the FUN's BS is checked in the AWR.
205 9. Definition of a const in the FUN's BS is checked in the TC.
206 Definition of a var in the FUN's BS is checked in the TC.
207 Definition of a timer in the FUN's BS is checked in the TC.
208 :exmp.
209 :p.TODO:
210 :nl. We can check the definitions of "const" and "var" for every type.
211
212 .*---------------------------------------------------------------------*
213 :h3.TTCN-3::ScopeUnits-> Control part: embedded case -- const definition
214 .*---------------------------------------------------------------------*
215 :xmp tab=0.
216 <TC - TTCN-3::ScopeUnits-> Control part: embedded case -- const definition>
217
218 <COMPILE>
219 <VERDICT_LEAF PASS>
220 <MODULE TTCN ModuleA ModuleA.ttcn>
221 module ModuleA {
222 control {
223 var integer MyControlInt := 1;
224 if ( true ) {
225 const integer MyControlIntConstE := 18;
226 }
227 MyControlInt := MyControlIntConstE;
228 }
229 }
230 <END_MODULE>
231 <RESULT IF_PASS COUNT 1>
232 (?im)\berror\b.+?no.+?definition.+?MyControlIntConstE
233 <END_RESULT>
234 <RESULT IF_PASS COUNT 1>
235 (?is)\berror:
236 <END_RESULT>
237 <RESULT IF_PASS POSITIVE>
238 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
239 <END_RESULT>
240
241 <END_TC>
242 :exmp.
243
244 .*---------------------------------------------------------------------*
245 :h3.TTCN-3::ScopeUnits-> Control part: embedded case -- var definition
246 .*---------------------------------------------------------------------*
247 :xmp tab=0.
248 <TC - TTCN-3::ScopeUnits-> Control part: embedded case -- var definition>
249
250 <COMPILE>
251 <VERDICT_LEAF PASS>
252 <MODULE TTCN ModuleA ModuleA.ttcn>
253 module ModuleA {
254 control {
255 var integer MyControlInt := 1;
256 if ( true ) {
257 var integer MyControlIntE := 18;
258 }
259 MyControlInt := MyControlIntE;
260 }
261 }
262 <END_MODULE>
263 <RESULT IF_PASS COUNT 1>
264 (?im)\berror\b.+?no.+?definition.+?MyControlIntE
265 <END_RESULT>
266 <RESULT IF_PASS COUNT 1>
267 (?is)\berror:
268 <END_RESULT>
269 <RESULT IF_PASS POSITIVE>
270 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
271 <END_RESULT>
272
273 <END_TC>
274 :exmp.
275
276 .*---------------------------------------------------------------------*
277 :h3.TTCN-3::ScopeUnits-> Control part: embedded case -- timer definition
278 .*---------------------------------------------------------------------*
279 :xmp tab=0.
280 <TC - TTCN-3::ScopeUnits-> Control part: embedded case -- timer definition>
281
282 <COMPILE>
283 <VERDICT_LEAF PASS>
284 <MODULE TTCN ModuleA ModuleA.ttcn>
285 module ModuleA {
286 control {
287 if ( true ) {
288 timer MyControlTimerE := 3.0;
289 }
290 MyControlTimerE.start;
291 }
292 }
293 <END_MODULE>
294 <RESULT IF_PASS COUNT 1>
295 (?im)\berror\b.+?no.+?definition.+?MyControlTimerE
296 <END_RESULT>
297 <RESULT IF_PASS COUNT 1>
298 (?is)\berror:
299 <END_RESULT>
300 <RESULT IF_PASS POSITIVE>
301 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
302 <END_RESULT>
303
304 <END_TC>
305 :exmp.
306
307 .*---------------------------------------------------------------------*
308 :h3.TTCN-3::ScopeUnits-> Control part: const definition -> Definitions part
309 .*---------------------------------------------------------------------*
310 :xmp tab=0.
311 <TC - TTCN-3::ScopeUnits-> Control part: const definition -> Definitions part>
312
313 <COMPILE>
314 <VERDICT_LEAF PASS>
315 <MODULE TTCN ModuleA ModuleA.ttcn>
316 module ModuleA {
317 const integer MyModuleIntConst := MyControlIntConst;
318 control {
319 const integer MyControlIntConst := 18;
320 }
321 }
322 <END_MODULE>
323 <RESULT IF_PASS COUNT 1>
324 (?im)\berror\b.+?no.+?definition.+?MyControlIntConst
325 <END_RESULT>
326 <RESULT IF_PASS COUNT 1>
327 (?is)\berror:
328 <END_RESULT>
329 <RESULT IF_PASS POSITIVE>
330 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
331 <END_RESULT>
332
333 <END_TC>
334 :exmp.
335
336 .*---------------------------------------------------------------------*
337 :h3.TTCN-3::ScopeUnits-> Control part: const definition -> Component type
338 .*---------------------------------------------------------------------*
339 :xmp tab=0.
340 <TC - TTCN-3::ScopeUnits-> Control part: const definition -> Component type>
341
342 <COMPILE>
343 <VERDICT_LEAF PASS>
344 <MODULE TTCN ModuleA ModuleA.ttcn>
345 module ModuleA {
346 type component MyCompType {
347 const integer MyComponentIntConst := MyControlIntConst;
348 }
349 control {
350 const integer MyControlIntConst := 18;
351 }
352 }
353 <END_MODULE>
354 <RESULT IF_PASS COUNT 1>
355 (?im)\berror\b.+?no.+?definition.+?MyControlIntConst
356 <END_RESULT>
357 <RESULT IF_PASS COUNT 1>
358 (?is)\berror:
359 <END_RESULT>
360 <RESULT IF_PASS POSITIVE>
361 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
362 <END_RESULT>
363
364 <END_TC>
365 :exmp.
366
367 .*---------------------------------------------------------------------*
368 :h3.TTCN-3::ScopeUnits-> Control part: var definition -> Component type
369 .*---------------------------------------------------------------------*
370 NOTE:
371 :nl.The implementation does not support the variable initialized with
372 :nl.another variable in the component type (but it would be possible
373 :nl.according to TTCN-3 specification ).
374
375 :xmp tab=0.
376
377 <TC - TTCN-3::ScopeUnits-> Control part: var definition -> Component type>
378
379 <COMPILE>
380 <VERDICT_LEAF PASS>
381 <MODULE TTCN ModuleA ModuleA.ttcn>
382 module ModuleA {
383 type component MyCompType {
384 var integer MyComponentInt := MyControlInt;
385 }
386 control {
387 var integer MyControlInt := 18;
388 }
389 }
390 <END_MODULE>
391 <RESULT IF_PASS COUNT 1>
392 (?im)\berror\b.+?no.+?definition.+?MyControlInt
393 <END_RESULT>
394 <RESULT IF_PASS COUNT 1>
395 (?is)\berror:
396 <END_RESULT>
397 <RESULT IF_PASS POSITIVE>
398 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
399 <END_RESULT>
400
401 <END_TC>
402 :exmp.
403
404 .*---------------------------------------------------------------------*
405 :h3.TTCN-3::ScopeUnits-> Control part: const definition -> Function
406 .*---------------------------------------------------------------------*
407 :xmp tab=0.
408 <TC - TTCN-3::ScopeUnits-> Control part: const definition -> Function>
409
410 <COMPILE>
411 <VERDICT_LEAF PASS>
412 <MODULE TTCN ModuleA ModuleA.ttcn>
413 module ModuleA {
414 function MyFunc() return integer {
415 return MyControlIntConst;
416 }
417 control {
418 const integer MyControlIntConst := 1;
419 }
420 }
421 <END_MODULE>
422 <RESULT IF_PASS COUNT 1>
423 (?im)\berror\b.+?no.+?definition.+?MyControlIntConst
424 <END_RESULT>
425 <RESULT IF_PASS COUNT 1>
426 (?is)\berror:
427 <END_RESULT>
428 <RESULT IF_PASS POSITIVE>
429 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
430 <END_RESULT>
431
432 <END_TC>
433 :exmp.
434
435 .*---------------------------------------------------------------------*
436 :h3.TTCN-3::ScopeUnits-> Control part: var definition -> Function
437 .*---------------------------------------------------------------------*
438 :xmp tab=0.
439 <TC - TTCN-3::ScopeUnits-> Control part: var definition -> Function>
440
441 <COMPILE>
442 <VERDICT_LEAF PASS>
443 <MODULE TTCN ModuleA ModuleA.ttcn>
444 module ModuleA {
445 function MyFunc() return integer {
446 return MyControlInt;
447 }
448 control {
449 var integer MyControlInt := 1;
450 }
451 }
452 <END_MODULE>
453 <RESULT IF_PASS COUNT 1>
454 (?im)\berror\b.+?no.+?definition.+?MyControlInt
455 <END_RESULT>
456 <RESULT IF_PASS COUNT 1>
457 (?is)\berror:
458 <END_RESULT>
459 <RESULT IF_PASS POSITIVE>
460 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
461 <END_RESULT>
462
463 <END_TC>
464 :exmp.
465
466 .*---------------------------------------------------------------------*
467 :h3.TTCN-3::ScopeUnits-> Control part: timer definition -> Function
468 .*---------------------------------------------------------------------*
469 :xmp tab=0.
470 <TC - TTCN-3::ScopeUnits-> Control part: timer definition -> Function>
471
472 <COMPILE>
473 <VERDICT_LEAF PASS>
474 <MODULE TTCN ModuleA ModuleA.ttcn>
475 module ModuleA {
476 function MyFunc() {
477 MyControlTimer.start;
478 }
479 control {
480 timer MyControlTimer := 5.0;
481 }
482 }
483 <END_MODULE>
484 <RESULT IF_PASS COUNT 1>
485 (?im)\berror\b.+?no.+?definition.+?MyControlTimer
486 <END_RESULT>
487 <RESULT IF_PASS COUNT 1>
488 (?is)\berror:
489 <END_RESULT>
490 <RESULT IF_PASS POSITIVE>
491 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
492 <END_RESULT>
493
494 <END_TC>
495 :exmp.
496
497 .*---------------------------------------------------------------------*
498 :h3.TTCN-3::ScopeUnits-> Control part: const definition -> Altstep
499 .*---------------------------------------------------------------------*
500 :xmp tab=0.
501 <TC - TTCN-3::ScopeUnits-> Control part: const definition -> Altstep>
502
503 <COMPILE>
504 <VERDICT_LEAF PASS>
505 <MODULE TTCN ModuleA ModuleA.ttcn>
506 module ModuleA {
507 altstep MyAltstep () {
508 const integer MyAltstepIntConst := MyControlIntConst;
509 [] any port.check {};
510 [else] {};
511 }
512 control {
513 const integer MyControlIntConst := 5;
514 }
515 }
516 <END_MODULE>
517 <RESULT IF_PASS COUNT 1>
518 (?im)\berror\b.+?no.+?definition.+?MyControlIntConst
519 <END_RESULT>
520 <RESULT IF_PASS COUNT 1>
521 (?is)\berror:
522 <END_RESULT>
523 <RESULT IF_PASS POSITIVE>
524 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
525 <END_RESULT>
526
527 <END_TC>
528 :exmp.
529
530 .*---------------------------------------------------------------------*
531 :h3.TTCN-3::ScopeUnits-> Control part: var definition -> Altstep
532 .*---------------------------------------------------------------------*
533 :xmp tab=0.
534 <TC - TTCN-3::ScopeUnits-> Control part: var definition -> Altstep>
535
536 <COMPILE>
537 <VERDICT_LEAF PASS>
538 <MODULE TTCN ModuleA ModuleA.ttcn>
539 module ModuleA {
540 altstep MyAltstep () {
541 var integer MyAltstepInt := MyControlInt;
542 [] any port.check {};
543 [else] {};
544 }
545 control {
546 var integer MyControlInt := 5;
547 }
548 }
549 <END_MODULE>
550 <RESULT IF_PASS COUNT 1>
551 (?im)\berror\b.+?no.+?definition.+?MyControlInt
552 <END_RESULT>
553 <RESULT IF_PASS COUNT 1>
554 (?is)\berror:
555 <END_RESULT>
556 <RESULT IF_PASS POSITIVE>
557 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
558 <END_RESULT>
559
560 <END_TC>
561 :exmp.
562
563 .*---------------------------------------------------------------------*
564 :h3.TTCN-3::ScopeUnits-> Control part: timer definition -> Altstep
565 .*---------------------------------------------------------------------*
566 :xmp tab=0.
567 <TC - TTCN-3::ScopeUnits-> Control part: timer definition -> Altstep>
568
569 <COMPILE>
570 <VERDICT_LEAF PASS>
571 <MODULE TTCN ModuleA ModuleA.ttcn>
572 module ModuleA {
573 altstep MyAltstep () {
574 [] MyControlTimer.timeout {}
575 [else] {};
576 }
577 control {
578 timer MyControlTimer := 5.0;
579 }
580 }
581 <END_MODULE>
582 <RESULT IF_PASS COUNT 1>
583 (?im)\berror\b.+?no.+?definition.+?MyControlTimer
584 <END_RESULT>
585 <RESULT IF_PASS COUNT 1>
586 (?is)\berror:
587 <END_RESULT>
588 <RESULT IF_PASS POSITIVE>
589 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
590 <END_RESULT>
591
592 <END_TC>
593 :exmp.
594
595 .*---------------------------------------------------------------------*
596 :h3.TTCN-3::ScopeUnits-> Control part: const definition -> Function_runs_on
597 .*---------------------------------------------------------------------*
598 :xmp tab=0.
599 <TC - TTCN-3::ScopeUnits-> Control part: const definition -> Function_runs_on>
600
601 <COMPILE>
602 <VERDICT_LEAF PASS>
603 <MODULE TTCN ModuleA ModuleA.ttcn>
604 module ModuleA {
605 type component MyCompType {}
606 function MyCompFunc() runs on MyCompType return integer {
607 return MyControlIntConst;
608 }
609 control {
610 const integer MyControlIntConst := 1;
611 }
612 }
613 <END_MODULE>
614 <RESULT IF_PASS COUNT 1>
615 (?im)\berror\b.+?no.+?definition.+?MyControlIntConst
616 <END_RESULT>
617 <RESULT IF_PASS COUNT 1>
618 (?is)\berror:
619 <END_RESULT>
620 <RESULT IF_PASS POSITIVE>
621 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
622 <END_RESULT>
623
624 <END_TC>
625 :exmp.
626
627 .*---------------------------------------------------------------------*
628 :h3.TTCN-3::ScopeUnits-> Control part: var definition -> Function_runs_on
629 .*---------------------------------------------------------------------*
630 :xmp tab=0.
631 <TC - TTCN-3::ScopeUnits-> Control part: var definition -> Function_runs_on>
632
633 <COMPILE>
634 <VERDICT_LEAF PASS>
635 <MODULE TTCN ModuleA ModuleA.ttcn>
636 module ModuleA {
637 type component MyCompType {}
638 function MyCompFunc() runs on MyCompType return integer {
639 return MyControlInt;
640 }
641 control {
642 var integer MyControlInt := 11;
643 }
644 }
645 <END_MODULE>
646 <RESULT IF_PASS COUNT 1>
647 (?im)\berror\b.+?no.+?definition.+?MyControlInt
648 <END_RESULT>
649 <RESULT IF_PASS COUNT 1>
650 (?is)\berror:
651 <END_RESULT>
652 <RESULT IF_PASS POSITIVE>
653 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
654 <END_RESULT>
655
656 <END_TC>
657 :exmp.
658
659 .*---------------------------------------------------------------------*
660 :h3.TTCN-3::ScopeUnits-> Control part: timer definition -> Function_runs_on
661 .*---------------------------------------------------------------------*
662 :xmp tab=0.
663 <TC - TTCN-3::ScopeUnits-> Control part: timer definition -> Function_runs_on>
664
665 <COMPILE>
666 <VERDICT_LEAF PASS>
667 <MODULE TTCN ModuleA ModuleA.ttcn>
668 module ModuleA {
669 type component MyCompType {}
670 function MyCompFunc() runs on MyCompType {
671 MyControlTimer.start;
672 };
673 control {
674 timer MyControlTimer := 5.0;
675 }
676 }
677 <END_MODULE>
678 <RESULT IF_PASS COUNT 1>
679 (?im)\berror\b.+?no.+?definition.+?MyControlTimer
680 <END_RESULT>
681 <RESULT IF_PASS COUNT 1>
682 (?is)\berror:
683 <END_RESULT>
684 <RESULT IF_PASS POSITIVE>
685 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
686 <END_RESULT>
687
688 <END_TC>
689 :exmp.
690
691 .*---------------------------------------------------------------------*
692 :h3.TTCN-3::ScopeUnits-> Control part: const definition -> Altstep_runs_on
693 .*---------------------------------------------------------------------*
694 :xmp tab=0.
695 <TC - TTCN-3::ScopeUnits-> Control part: const definition -> Altstep_runs_on>
696
697 <COMPILE>
698 <VERDICT_LEAF PASS>
699 <MODULE TTCN ModuleA ModuleA.ttcn>
700 module ModuleA {
701 type component MyCompType {}
702 altstep MyCompAltstep () runs on MyCompType {
703 const integer MyCompAltstepIntConst := MyControlIntConst;
704 [] any port.check {};
705 [else] {};
706 }
707 control {
708 const integer MyControlIntConst := 5;
709 }
710 }
711 <END_MODULE>
712 <RESULT IF_PASS COUNT 1>
713 (?im)\berror\b.+?no.+?definition.+?MyControlIntConst
714 <END_RESULT>
715 <RESULT IF_PASS COUNT 1>
716 (?is)\berror:
717 <END_RESULT>
718 <RESULT IF_PASS POSITIVE>
719 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
720 <END_RESULT>
721
722 <END_TC>
723 :exmp.
724
725 .*---------------------------------------------------------------------*
726 :h3.TTCN-3::ScopeUnits-> Control part: var definition -> Altstep_runs_on
727 .*---------------------------------------------------------------------*
728 :xmp tab=0.
729 <TC - TTCN-3::ScopeUnits-> Control part: var definition -> Altstep_runs_on>
730
731 <COMPILE>
732 <VERDICT_LEAF PASS>
733 <MODULE TTCN ModuleA ModuleA.ttcn>
734 module ModuleA {
735 type component MyCompType {}
736 altstep MyCompAltstep () runs on MyCompType {
737 var integer MyCompAltstepInt := MyControlInt;
738 [] any port.check {};
739 [else] {};
740 }
741 control {
742 var integer MyControlInt := 5;
743 }
744 }
745 <END_MODULE>
746 <RESULT IF_PASS COUNT 1>
747 (?im)\berror\b.+?no.+?definition.+?MyControlInt
748 <END_RESULT>
749 <RESULT IF_PASS COUNT 1>
750 (?is)\berror:
751 <END_RESULT>
752 <RESULT IF_PASS POSITIVE>
753 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
754 <END_RESULT>
755
756 <END_TC>
757 :exmp.
758
759 .*---------------------------------------------------------------------*
760 :h3.TTCN-3::ScopeUnits-> Control part: timer definition -> Altstep_runs_on
761 .*---------------------------------------------------------------------*
762 :xmp tab=0.
763 <TC - TTCN-3::ScopeUnits-> Control part: timer definition -> Altstep_runs_on>
764
765 <COMPILE>
766 <VERDICT_LEAF PASS>
767 <MODULE TTCN ModuleA ModuleA.ttcn>
768 module ModuleA {
769 type component MyCompType {}
770 altstep MyCompAltstep () runs on MyCompType {
771 [] MyControlTimer.timeout {}
772 [else] {};
773 }
774 control {
775 timer MyControlTimer := 5.0;
776 }
777 }
778 <END_MODULE>
779 <RESULT IF_PASS COUNT 1>
780 (?im)\berror\b.+?no.+?definition.+?MyControlTimer
781 <END_RESULT>
782 <RESULT IF_PASS COUNT 1>
783 (?is)\berror:
784 <END_RESULT>
785 <RESULT IF_PASS POSITIVE>
786 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
787 <END_RESULT>
788
789 <END_TC>
790 :exmp.
791
792 .*---------------------------------------------------------------------*
793 :h3.TTCN-3::ScopeUnits-> Control part: const definition -> Testcase
794 .*---------------------------------------------------------------------*
795 :xmp tab=0.
796 <TC - TTCN-3::ScopeUnits-> Control part: const definition -> Testcase>
797
798 <COMPILE>
799 <VERDICT_LEAF PASS>
800 <MODULE TTCN ModuleA ModuleA.ttcn>
801 module ModuleA {
802 type component MyCompType {}
803 testcase MyTestcase() runs on MyCompType {
804 const integer MyTestcaseIntConst := MyControlIntConst;
805 }
806 control {
807 const integer MyControlIntConst := 18;
808 }
809 }
810 <END_MODULE>
811 <RESULT IF_PASS COUNT 1>
812 (?im)\berror\b.+?no.+?definition.+?MyControlIntConst
813 <END_RESULT>
814 <RESULT IF_PASS COUNT 1>
815 (?is)\berror:
816 <END_RESULT>
817 <RESULT IF_PASS POSITIVE>
818 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
819 <END_RESULT>
820
821 <END_TC>
822 :exmp.
823
824 .*---------------------------------------------------------------------*
825 :h3.TTCN-3::ScopeUnits-> Control part: var definition -> Testcase
826 .*---------------------------------------------------------------------*
827 :xmp tab=0.
828 <TC - TTCN-3::ScopeUnits-> Control part: var definition -> Testcase>
829
830 <COMPILE>
831 <VERDICT_LEAF PASS>
832 <MODULE TTCN ModuleA ModuleA.ttcn>
833 module ModuleA {
834 type component MyCompType {}
835 testcase MyTestcase() runs on MyCompType {
836 var integer MyTestcaseInt := MyControlInt;
837 }
838 control {
839 var integer MyControlInt := 18;
840 }
841 }
842 <END_MODULE>
843 <RESULT IF_PASS COUNT 1>
844 (?im)\berror\b.+?no.+?definition.+?MyControlInt
845 <END_RESULT>
846 <RESULT IF_PASS COUNT 1>
847 (?is)\berror:
848 <END_RESULT>
849 <RESULT IF_PASS POSITIVE>
850 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
851 <END_RESULT>
852
853 <END_TC>
854 :exmp.
855
856 .*---------------------------------------------------------------------*
857 :h3.TTCN-3::ScopeUnits-> Control part: timer definition -> Testcase
858 .*---------------------------------------------------------------------*
859 :xmp tab=0.
860 <TC - TTCN-3::ScopeUnits-> Control part: timer definition -> Testcase>
861
862 <COMPILE>
863 <VERDICT_LEAF PASS>
864 <MODULE TTCN ModuleA ModuleA.ttcn>
865 module ModuleA {
866 type component MyCompType {}
867 testcase MyTestcase() runs on MyCompType {
868 MyControlTimer.start;
869 }
870 control {
871 timer MyControlTimer := 5.0;
872 }
873 }
874 <END_MODULE>
875 <RESULT IF_PASS COUNT 1>
876 (?im)\berror\b.+?no.+?definition.+?MyControlTimer
877 <END_RESULT>
878 <RESULT IF_PASS COUNT 1>
879 (?is)\berror:
880 <END_RESULT>
881 <RESULT IF_PASS POSITIVE>
882 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
883 <END_RESULT>
884
885 <END_TC>
886 :exmp.
887
888 .*---------------------------------------------------------------------*
889 :h3.TTCN-3::ScopeUnits-> Component type: const definition -> Definitions part
890 .*---------------------------------------------------------------------*
891 :xmp tab=0.
892 <TC - TTCN-3::ScopeUnits-> Component type: const definition -> Definitions part>
893
894 <COMPILE>
895 <VERDICT_LEAF PASS>
896 <MODULE TTCN ModuleA ModuleA.ttcn>
897 module ModuleA {
898 const integer MyModuleIntConst := MyComponentIntConst;
899 type component MyCompType {
900 const integer MyComponentIntConst := 11;
901 }
902 }
903 <END_MODULE>
904 <RESULT IF_PASS COUNT 1>
905 (?im)\berror\b.+?no.+?definition.+?MyComponentIntConst
906 <END_RESULT>
907 <RESULT IF_PASS COUNT 1>
908 (?is)\berror:
909 <END_RESULT>
910 <RESULT IF_PASS POSITIVE>
911 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
912 <END_RESULT>
913
914 <END_TC>
915 :exmp.
916
917 .*---------------------------------------------------------------------*
918 :h3.TTCN-3::ScopeUnits-> Component type: const definition -> Control part
919 .*---------------------------------------------------------------------*
920 :xmp tab=0.
921 <TC - TTCN-3::ScopeUnits-> Component type: const definition -> Control part>
922
923 <COMPILE>
924 <VERDICT_LEAF PASS>
925 <MODULE TTCN ModuleA ModuleA.ttcn>
926 module ModuleA {
927 type component MyCompType {
928 const integer MyComponentIntConst := 11;
929 }
930 control {
931 const integer MyControlIntConst := MyComponentIntConst;
932 }
933 }
934 <END_MODULE>
935 <RESULT IF_PASS COUNT 1>
936 (?im)\berror\b.+?no.+?definition.+?MyComponentIntConst
937 <END_RESULT>
938 <RESULT IF_PASS COUNT 1>
939 (?is)\berror:
940 <END_RESULT>
941 <RESULT IF_PASS POSITIVE>
942 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
943 <END_RESULT>
944
945 <END_TC>
946 :exmp.
947
948 .*---------------------------------------------------------------------*
949 :h3.TTCN-3::ScopeUnits-> Component type: var definition -> Control part
950 .*---------------------------------------------------------------------*
951 :xmp tab=0.
952 <TC - TTCN-3::ScopeUnits-> Component type: var definition -> Control part>
953
954 <COMPILE>
955 <VERDICT_LEAF PASS>
956 <MODULE TTCN ModuleA ModuleA.ttcn>
957 module ModuleA {
958 type component MyCompType {
959 var integer MyComponentInt := 11;
960 }
961 control {
962 var integer MyControlInt := MyComponentInt;
963 }
964 }
965 <END_MODULE>
966 <RESULT IF_PASS COUNT 1>
967 (?im)\berror\b.+?no.+?definition.+?MyComponentInt
968 <END_RESULT>
969 <RESULT IF_PASS COUNT 1>
970 (?is)\berror:
971 <END_RESULT>
972 <RESULT IF_PASS POSITIVE>
973 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
974 <END_RESULT>
975
976 <END_TC>
977 :exmp.
978
979 .*---------------------------------------------------------------------*
980 :h3.TTCN-3::ScopeUnits-> Component type: timer definition -> Control part
981 .*---------------------------------------------------------------------*
982 :xmp tab=0.
983 <TC - TTCN-3::ScopeUnits-> Component type: timer definition -> Control part>
984
985 <COMPILE>
986 <VERDICT_LEAF PASS>
987 <MODULE TTCN ModuleA ModuleA.ttcn>
988 module ModuleA {
989 type component MyCompType {
990 timer MyComponentTimer := 1.0;
991 }
992 control {
993 MyComponentTimer.start;
994 }
995 }
996 <END_MODULE>
997 <RESULT IF_PASS COUNT 1>
998 (?im)\berror\b.+?no.+?definition.+?MyComponentTimer
999 <END_RESULT>
1000 <RESULT IF_PASS COUNT 1>
1001 (?is)\berror:
1002 <END_RESULT>
1003 <RESULT IF_PASS POSITIVE>
1004 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1005 <END_RESULT>
1006
1007 <END_TC>
1008 :exmp.
1009
1010 .*---------------------------------------------------------------------*
1011 :h3.TTCN-3::ScopeUnits-> Component type: const definition -> Function
1012 .*---------------------------------------------------------------------*
1013 :xmp tab=0.
1014 <TC - TTCN-3::ScopeUnits-> Component type: const definition -> Function>
1015
1016 <COMPILE>
1017 <VERDICT_LEAF PASS>
1018 <MODULE TTCN ModuleA ModuleA.ttcn>
1019 module ModuleA {
1020 type component MyCompType {
1021 const integer MyComponentIntConst := 11;
1022 }
1023 function MyFunc() return integer {
1024 return MyComponentIntConst;
1025 }
1026 }
1027 <END_MODULE>
1028 <RESULT IF_PASS COUNT 1>
1029 (?im)\berror\b.+?no.+?definition.+?MyComponentIntConst
1030 <END_RESULT>
1031 <RESULT IF_PASS COUNT 1>
1032 (?is)\berror:
1033 <END_RESULT>
1034 <RESULT IF_PASS POSITIVE>
1035 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1036 <END_RESULT>
1037
1038 <END_TC>
1039 :exmp.
1040
1041 .*---------------------------------------------------------------------*
1042 :h3.TTCN-3::ScopeUnits-> Component type: var definition -> Function
1043 .*---------------------------------------------------------------------*
1044 :xmp tab=0.
1045 <TC - TTCN-3::ScopeUnits-> Component type: var definition -> Function>
1046
1047 <COMPILE>
1048 <VERDICT_LEAF PASS>
1049 <MODULE TTCN ModuleA ModuleA.ttcn>
1050 module ModuleA {
1051 type component MyCompType {
1052 var integer MyComponentInt := 11;
1053 }
1054 function MyFunc() return integer {
1055 return MyComponentInt;
1056 }
1057 }
1058 <END_MODULE>
1059 <RESULT IF_PASS COUNT 1>
1060 (?im)\berror\b.+?no.+?definition.+?MyComponentInt
1061 <END_RESULT>
1062 <RESULT IF_PASS COUNT 1>
1063 (?is)\berror:
1064 <END_RESULT>
1065 <RESULT IF_PASS POSITIVE>
1066 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1067 <END_RESULT>
1068
1069 <END_TC>
1070 :exmp.
1071
1072 .*---------------------------------------------------------------------*
1073 :h3.TTCN-3::ScopeUnits-> Component type: timer definition -> Function
1074 .*---------------------------------------------------------------------*
1075 :xmp tab=0.
1076 <TC - TTCN-3::ScopeUnits-> Component type: timer definition -> Function>
1077
1078 <COMPILE>
1079 <VERDICT_LEAF PASS>
1080 <MODULE TTCN ModuleA ModuleA.ttcn>
1081 module ModuleA {
1082 type component MyCompType {
1083 timer MyComponentTimer := 11.0;
1084 }
1085 function MyFunc() {
1086 MyComponentTimer.start;
1087 }
1088 }
1089 <END_MODULE>
1090 <RESULT IF_PASS COUNT 1>
1091 (?im)\berror\b.+?no.+?definition.+?MyComponentTimer
1092 <END_RESULT>
1093 <RESULT IF_PASS COUNT 1>
1094 (?is)\berror:
1095 <END_RESULT>
1096 <RESULT IF_PASS POSITIVE>
1097 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1098 <END_RESULT>
1099
1100 <END_TC>
1101 :exmp.
1102
1103 .*---------------------------------------------------------------------*
1104 :h3.TTCN-3::ScopeUnits-> Component type: const definition -> Altstep
1105 .*---------------------------------------------------------------------*
1106 :xmp tab=0.
1107 <TC - TTCN-3::ScopeUnits-> Component type: const definition -> Altstep>
1108
1109 <COMPILE>
1110 <VERDICT_LEAF PASS>
1111 <MODULE TTCN ModuleA ModuleA.ttcn>
1112 module ModuleA {
1113 type component MyCompType {
1114 const integer MyComponentIntConst := 11;
1115 }
1116 altstep MyAltstep () {
1117 const integer MyAltstepIntConst := MyComponentIntConst;
1118 [] any port.check {};
1119 [else] {};
1120 }
1121 }
1122 <END_MODULE>
1123 <RESULT IF_PASS COUNT 1>
1124 (?im)\berror\b.+?no.+?definition.+?MyComponentIntConst
1125 <END_RESULT>
1126 <RESULT IF_PASS COUNT 1>
1127 (?is)\berror:
1128 <END_RESULT>
1129 <RESULT IF_PASS POSITIVE>
1130 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1131 <END_RESULT>
1132
1133 <END_TC>
1134 :exmp.
1135
1136 .*---------------------------------------------------------------------*
1137 :h3.TTCN-3::ScopeUnits-> Component type: var definition -> Altstep
1138 .*---------------------------------------------------------------------*
1139 :xmp tab=0.
1140 <TC - TTCN-3::ScopeUnits-> Component type: var definition -> Altstep>
1141
1142 <COMPILE>
1143 <VERDICT_LEAF PASS>
1144 <MODULE TTCN ModuleA ModuleA.ttcn>
1145 module ModuleA {
1146 type component MyCompType {
1147 var integer MyComponentInt := 11;
1148 }
1149 altstep MyAltstep () {
1150 var integer MyAltstepInt := MyComponentInt;
1151 [] any port.check {};
1152 [else] {};
1153 }
1154 }
1155 <END_MODULE>
1156 <RESULT IF_PASS COUNT 1>
1157 (?im)\berror\b.+?no.+?definition.+?MyComponentInt
1158 <END_RESULT>
1159 <RESULT IF_PASS COUNT 1>
1160 (?is)\berror:
1161 <END_RESULT>
1162 <RESULT IF_PASS POSITIVE>
1163 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1164 <END_RESULT>
1165
1166 <END_TC>
1167 :exmp.
1168
1169 .*---------------------------------------------------------------------*
1170 :h3.TTCN-3::ScopeUnits-> Component type: timer definition -> Altstep
1171 .*---------------------------------------------------------------------*
1172 :xmp tab=0.
1173 <TC - TTCN-3::ScopeUnits-> Component type: timer definition -> Altstep>
1174
1175 <COMPILE>
1176 <VERDICT_LEAF PASS>
1177 <MODULE TTCN ModuleA ModuleA.ttcn>
1178 module ModuleA {
1179 type component MyCompType {
1180 timer MyComponentTimer := 11.0;
1181 }
1182 altstep MyAltstep () {
1183 [] MyComponentTimer.timeout {}
1184 [else] {};
1185 }
1186 }
1187 <END_MODULE>
1188 <RESULT IF_PASS COUNT 1>
1189 (?im)\berror\b.+?no.+?definition.+?MyComponentTimer
1190 <END_RESULT>
1191 <RESULT IF_PASS COUNT 1>
1192 (?is)\berror:
1193 <END_RESULT>
1194 <RESULT IF_PASS POSITIVE>
1195 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1196 <END_RESULT>
1197
1198 <END_TC>
1199 :exmp.
1200
1201 .*---------------------------------------------------------------------*
1202 :h3.TTCN-3::ScopeUnits-> Function: embedded case -- const definition
1203 .*---------------------------------------------------------------------*
1204 :xmp tab=0.
1205 <TC - TTCN-3::ScopeUnits-> Function: embedded case -- const definition>
1206
1207 <COMPILE>
1208 <VERDICT_LEAF PASS>
1209 <MODULE TTCN ModuleA ModuleA.ttcn>
1210 module ModuleA {
1211 function MyFunc() return integer {
1212 if ( true ) {
1213 const integer MyFuncIntConstE := 18;
1214 }
1215 return MyFuncIntConstE;
1216 }
1217 }
1218 <END_MODULE>
1219 <RESULT IF_PASS COUNT 1>
1220 (?im)\berror\b.+?no.+?definition.+?MyFuncIntConstE
1221 <END_RESULT>
1222 <RESULT IF_PASS COUNT 1>
1223 (?is)\berror:
1224 <END_RESULT>
1225 <RESULT IF_PASS POSITIVE>
1226 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1227 <END_RESULT>
1228
1229 <END_TC>
1230 :exmp.
1231
1232 .*---------------------------------------------------------------------*
1233 :h3.TTCN-3::ScopeUnits-> Function: embedded case -- var definition
1234 .*---------------------------------------------------------------------*
1235 :xmp tab=0.
1236 <TC - TTCN-3::ScopeUnits-> Function: embedded case -- var definition>
1237
1238 <COMPILE>
1239 <VERDICT_LEAF PASS>
1240 <MODULE TTCN ModuleA ModuleA.ttcn>
1241 module ModuleA {
1242 function MyFunc() return integer {
1243 if ( true ) {
1244 var integer MyFuncIntE := 18;
1245 }
1246 return MyFuncIntE;
1247 }
1248 }
1249 <END_MODULE>
1250 <RESULT IF_PASS COUNT 1>
1251 (?im)\berror\b.+?no.+?definition.+?MyFuncIntE
1252 <END_RESULT>
1253 <RESULT IF_PASS COUNT 1>
1254 (?is)\berror:
1255 <END_RESULT>
1256 <RESULT IF_PASS POSITIVE>
1257 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1258 <END_RESULT>
1259
1260 <END_TC>
1261 :exmp.
1262
1263 .*---------------------------------------------------------------------*
1264 :h3.TTCN-3::ScopeUnits-> Function: embedded case -- timer definition
1265 .*---------------------------------------------------------------------*
1266 :xmp tab=0.
1267 <TC - TTCN-3::ScopeUnits-> Function: embedded case -- timer definition>
1268
1269 <COMPILE>
1270 <VERDICT_LEAF PASS>
1271 <MODULE TTCN ModuleA ModuleA.ttcn>
1272 module ModuleA {
1273 function MyFunc() {
1274 if ( true ) {
1275 timer MyFuncTimerE := 18.0;
1276 }
1277 MyFuncTimerE.start;
1278 }
1279 }
1280 <END_MODULE>
1281 <RESULT IF_PASS COUNT 1>
1282 (?im)\berror\b.+?no.+?definition.+?MyFuncTimerE
1283 <END_RESULT>
1284 <RESULT IF_PASS COUNT 1>
1285 (?is)\berror:
1286 <END_RESULT>
1287 <RESULT IF_PASS POSITIVE>
1288 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1289 <END_RESULT>
1290
1291 <END_TC>
1292 :exmp.
1293
1294 .*---------------------------------------------------------------------*
1295 :h3.TTCN-3::ScopeUnits-> Function: const definition -> Definitions part
1296 .*---------------------------------------------------------------------*
1297 :xmp tab=0.
1298 <TC - TTCN-3::ScopeUnits-> Function: const definition -> Definitions part>
1299
1300 <COMPILE>
1301 <VERDICT_LEAF PASS>
1302 <MODULE TTCN ModuleA ModuleA.ttcn>
1303 module ModuleA {
1304 const integer MyModuleIntConst := MyFuncIntConst;
1305 function MyFunc() {
1306 const integer MyFuncIntConst := 18;
1307 }
1308 }
1309 <END_MODULE>
1310 <RESULT IF_PASS COUNT 1>
1311 (?im)\berror\b.+?no.+?definition.+?MyFuncIntConst
1312 <END_RESULT>
1313 <RESULT IF_PASS COUNT 1>
1314 (?is)\berror:
1315 <END_RESULT>
1316 <RESULT IF_PASS POSITIVE>
1317 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1318 <END_RESULT>
1319
1320 <END_TC>
1321 :exmp.
1322
1323 .*---------------------------------------------------------------------*
1324 :h3.TTCN-3::ScopeUnits-> Function (value parameter) -> Control part
1325 .*---------------------------------------------------------------------*
1326 :xmp tab=0.
1327 <TC - TTCN-3::ScopeUnits-> Function (value parameter) -> Control part>
1328
1329 <COMPILE>
1330 <VERDICT_LEAF PASS>
1331 <MODULE TTCN ModuleA ModuleA.ttcn>
1332 module ModuleA {
1333 function MyFunc( integer MyFuncInt ) {}
1334 control {
1335 var integer MyControlInt := MyFuncInt;
1336 }
1337 }
1338 <END_MODULE>
1339 <RESULT IF_PASS COUNT 1>
1340 (?im)\berror\b.+?no.+?definition.+?MyFuncInt
1341 <END_RESULT>
1342 <RESULT IF_PASS COUNT 1>
1343 (?is)\berror:
1344 <END_RESULT>
1345 <RESULT IF_PASS POSITIVE>
1346 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1347 <END_RESULT>
1348
1349 <END_TC>
1350 :exmp.
1351
1352 .*---------------------------------------------------------------------*
1353 :h3.TTCN-3::ScopeUnits-> Function (timer parameter) -> Control part
1354 .*---------------------------------------------------------------------*
1355 :xmp tab=0.
1356 <TC - TTCN-3::ScopeUnits-> Function (timer parameter) -> Control part>
1357
1358 <COMPILE>
1359 <VERDICT_LEAF PASS>
1360 <MODULE TTCN ModuleA ModuleA.ttcn>
1361 module ModuleA {
1362 function MyFunc( timer MyFuncTimer ) {}
1363 control {
1364 MyFuncTimer.start;
1365 }
1366 }
1367 <END_MODULE>
1368 <RESULT IF_PASS COUNT 1>
1369 (?im)\berror\b.+?no.+?definition.+?MyFuncTimer
1370 <END_RESULT>
1371 <RESULT IF_PASS COUNT 1>
1372 (?is)\berror:
1373 <END_RESULT>
1374 <RESULT IF_PASS POSITIVE>
1375 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1376 <END_RESULT>
1377
1378 <END_TC>
1379 :exmp.
1380
1381 .*---------------------------------------------------------------------*
1382 :h3.TTCN-3::ScopeUnits-> Function (value parameter) -> Component type
1383 .*---------------------------------------------------------------------*
1384 NOTE:
1385 :nl.The implementation does not support the variable initialized with
1386 :nl.another variable in the component type (but it would be possible
1387 :nl.according to TTCN-3 specification ).
1388
1389 :xmp tab=0.
1390
1391 <TC - TTCN-3::ScopeUnits-> Function: (value parameter) -> Component type>
1392
1393 <COMPILE>
1394 <VERDICT_LEAF PASS>
1395 <MODULE TTCN ModuleA ModuleA.ttcn>
1396 module ModuleA {
1397 type component MyCompType {
1398 var integer MyComponentInt := MyFuncInt;
1399 }
1400 function MyFunc( integer MyFuncInt ) {}
1401 }
1402 <END_MODULE>
1403 <RESULT IF_PASS COUNT 1>
1404 (?im)\berror\b.+?no.+?definition.+?MyFuncInt
1405 <END_RESULT>
1406 <RESULT IF_PASS COUNT 1>
1407 (?is)\berror:
1408 <END_RESULT>
1409 <RESULT IF_PASS POSITIVE>
1410 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1411 <END_RESULT>
1412
1413 <END_TC>
1414 :exmp.
1415
1416 .*---------------------------------------------------------------------*
1417 :h3.TTCN-3::ScopeUnits-> Function (value parameter) -> Altstep
1418 .*---------------------------------------------------------------------*
1419 :xmp tab=0.
1420 <TC - TTCN-3::ScopeUnits-> Function (value parameter) -> Altstep>
1421
1422 <COMPILE>
1423 <VERDICT_LEAF PASS>
1424 <MODULE TTCN ModuleA ModuleA.ttcn>
1425 module ModuleA {
1426 function MyFunc( integer MyFuncInt ) {}
1427 altstep MyAltstep () {
1428 var integer MyAltstepInt := MyFuncInt;
1429 [] any port.check {};
1430 [else] {};
1431 }
1432 }
1433 <END_MODULE>
1434 <RESULT IF_PASS COUNT 1>
1435 (?im)\berror\b.+?no.+?definition.+?MyFuncInt
1436 <END_RESULT>
1437 <RESULT IF_PASS COUNT 1>
1438 (?is)\berror:
1439 <END_RESULT>
1440 <RESULT IF_PASS POSITIVE>
1441 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1442 <END_RESULT>
1443
1444 <END_TC>
1445 :exmp.
1446
1447 .*---------------------------------------------------------------------*
1448 :h3.TTCN-3::ScopeUnits-> Function (timer parameter) -> Altstep
1449 .*---------------------------------------------------------------------*
1450 :xmp tab=0.
1451 <TC - TTCN-3::ScopeUnits-> Function (timer parameter) -> Altstep>
1452
1453 <COMPILE>
1454 <VERDICT_LEAF PASS>
1455 <MODULE TTCN ModuleA ModuleA.ttcn>
1456 module ModuleA {
1457 function MyFunc( timer MyFuncTimer ) {}
1458 altstep MyAltstep () {
1459 [] MyFuncTimer.timeout {}
1460 [else] {};
1461 }
1462 }
1463 <END_MODULE>
1464 <RESULT IF_PASS COUNT 1>
1465 (?im)\berror\b.+?no.+?definition.+?MyFuncTimer
1466 <END_RESULT>
1467 <RESULT IF_PASS COUNT 1>
1468 (?is)\berror:
1469 <END_RESULT>
1470 <RESULT IF_PASS POSITIVE>
1471 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1472 <END_RESULT>
1473
1474 <END_TC>
1475 :exmp.
1476
1477 .*---------------------------------------------------------------------*
1478 :h3.TTCN-3::ScopeUnits-> Function (value parameter) -> Function_runs_on
1479 .*---------------------------------------------------------------------*
1480 :xmp tab=0.
1481 <TC - TTCN-3::ScopeUnits-> Function (value parameter) -> Function_runs_on>
1482
1483 <COMPILE>
1484 <VERDICT_LEAF PASS>
1485 <MODULE TTCN ModuleA ModuleA.ttcn>
1486 module ModuleA {
1487 type component MyCompType {}
1488 function MyCompFunc() runs on MyCompType return integer {
1489 return MyFuncInt;
1490 }
1491 function MyFunc( integer MyFuncInt ) {}
1492 }
1493 <END_MODULE>
1494 <RESULT IF_PASS COUNT 1>
1495 (?im)\berror\b.+?no.+?definition.+?MyFuncInt
1496 <END_RESULT>
1497 <RESULT IF_PASS COUNT 1>
1498 (?is)\berror:
1499 <END_RESULT>
1500 <RESULT IF_PASS POSITIVE>
1501 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1502 <END_RESULT>
1503
1504 <END_TC>
1505 :exmp.
1506
1507 .*---------------------------------------------------------------------*
1508 :h3.TTCN-3::ScopeUnits-> Function (timer parameter) -> Function_runs_on
1509 .*---------------------------------------------------------------------*
1510 :xmp tab=0.
1511 <TC - TTCN-3::ScopeUnits-> Function (timer parameter) -> Function_runs_on>
1512
1513 <COMPILE>
1514 <VERDICT_LEAF PASS>
1515 <MODULE TTCN ModuleA ModuleA.ttcn>
1516 module ModuleA {
1517 type component MyCompType {}
1518 function MyCompFunc() runs on MyCompType {
1519 MyFuncTimer.start;
1520 }
1521 function MyFunc( timer MyFuncTimer ) {}
1522 }
1523 <END_MODULE>
1524 <RESULT IF_PASS COUNT 1>
1525 (?im)\berror\b.+?no.+?definition.+?MyFuncTimer
1526 <END_RESULT>
1527 <RESULT IF_PASS COUNT 1>
1528 (?is)\berror:
1529 <END_RESULT>
1530 <RESULT IF_PASS POSITIVE>
1531 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1532 <END_RESULT>
1533
1534 <END_TC>
1535 :exmp.
1536
1537 .*---------------------------------------------------------------------*
1538 :h3.TTCN-3::ScopeUnits-> Function (value parameter) -> Altstep_runs_on
1539 .*---------------------------------------------------------------------*
1540 :xmp tab=0.
1541 <TC - TTCN-3::ScopeUnits-> Function (value parameter) -> Altstep_runs_on>
1542
1543 <COMPILE>
1544 <VERDICT_LEAF PASS>
1545 <MODULE TTCN ModuleA ModuleA.ttcn>
1546 module ModuleA {
1547 type component MyCompType {}
1548 altstep MyCompAltstep () runs on MyCompType {
1549 var integer MyCompAltstepInt := MyFuncInt;
1550 [] any port.check {};
1551 [else] {};
1552 }
1553 function MyFunc( integer MyFuncInt ) {}
1554 }
1555 <END_MODULE>
1556 <RESULT IF_PASS COUNT 1>
1557 (?im)\berror\b.+?no.+?definition.+?MyFuncInt
1558 <END_RESULT>
1559 <RESULT IF_PASS COUNT 1>
1560 (?is)\berror:
1561 <END_RESULT>
1562 <RESULT IF_PASS POSITIVE>
1563 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1564 <END_RESULT>
1565
1566 <END_TC>
1567 :exmp.
1568
1569 .*---------------------------------------------------------------------*
1570 :h3.TTCN-3::ScopeUnits-> Function (timer parameter) -> Altstep_runs_on
1571 .*---------------------------------------------------------------------*
1572 :xmp tab=0.
1573 <TC - TTCN-3::ScopeUnits-> Function (timer parameter) -> Altstep_runs_on>
1574
1575 <COMPILE>
1576 <VERDICT_LEAF PASS>
1577 <MODULE TTCN ModuleA ModuleA.ttcn>
1578 module ModuleA {
1579 type component MyCompType {}
1580 altstep MyCompAltstep () runs on MyCompType {
1581 [] MyFuncTimer.timeout {}
1582 [else] {};
1583 }
1584 function MyFunc( timer MyFuncTimer ) {}
1585 }
1586 <END_MODULE>
1587 <RESULT IF_PASS COUNT 1>
1588 (?im)\berror\b.+?no.+?definition.+?MyFuncTimer
1589 <END_RESULT>
1590 <RESULT IF_PASS COUNT 1>
1591 (?is)\berror:
1592 <END_RESULT>
1593 <RESULT IF_PASS POSITIVE>
1594 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1595 <END_RESULT>
1596
1597 <END_TC>
1598 :exmp.
1599
1600 .*---------------------------------------------------------------------*
1601 :h3.TTCN-3::ScopeUnits-> Function (value parameter) -> Testcase
1602 .*---------------------------------------------------------------------*
1603 :xmp tab=0.
1604 <TC - TTCN-3::ScopeUnits-> Function (value parameter) -> Testcase>
1605
1606 <COMPILE>
1607 <VERDICT_LEAF PASS>
1608 <MODULE TTCN ModuleA ModuleA.ttcn>
1609 module ModuleA {
1610 type component MyCompType {}
1611 testcase MyTestcase() runs on MyCompType {
1612 var integer MyTestcaseInt := MyFuncInt;
1613 }
1614 function MyFunc( integer MyFuncInt ) {}
1615 }
1616 <END_MODULE>
1617 <RESULT IF_PASS COUNT 1>
1618 (?im)\berror\b.+?no.+?definition.+?MyFuncInt
1619 <END_RESULT>
1620 <RESULT IF_PASS COUNT 1>
1621 (?is)\berror:
1622 <END_RESULT>
1623 <RESULT IF_PASS POSITIVE>
1624 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1625 <END_RESULT>
1626
1627 <END_TC>
1628 :exmp.
1629
1630 .*---------------------------------------------------------------------*
1631 :h3.TTCN-3::ScopeUnits-> Function (timer parameter) -> Testcase
1632 .*---------------------------------------------------------------------*
1633 :xmp tab=0.
1634 <TC - TTCN-3::ScopeUnits-> Function (timer parameter) -> Testcase>
1635
1636 <COMPILE>
1637 <VERDICT_LEAF PASS>
1638 <MODULE TTCN ModuleA ModuleA.ttcn>
1639 module ModuleA {
1640 type component MyCompType {}
1641 testcase MyTestcase() runs on MyCompType {
1642 MyFuncTimer.start;
1643 }
1644 function MyFunc( timer MyFuncTimer ) {}
1645 }
1646 <END_MODULE>
1647 <RESULT IF_PASS COUNT 1>
1648 (?im)\berror\b.+?no.+?definition.+?MyFuncTimer
1649 <END_RESULT>
1650 <RESULT IF_PASS COUNT 1>
1651 (?is)\berror:
1652 <END_RESULT>
1653 <RESULT IF_PASS POSITIVE>
1654 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1655 <END_RESULT>
1656
1657 <END_TC>
1658 :exmp.
1659
1660 .*---------------------------------------------------------------------*
1661 :h3.TTCN-3::ScopeUnits-> Function: const definition -> Control part
1662 .*---------------------------------------------------------------------*
1663 :xmp tab=0.
1664 <TC - TTCN-3::ScopeUnits-> Function: const definition -> Control part>
1665
1666 <COMPILE>
1667 <VERDICT_LEAF PASS>
1668 <MODULE TTCN ModuleA ModuleA.ttcn>
1669 module ModuleA {
1670 function MyFunc() {
1671 const integer MyFuncIntConst := 18;
1672 }
1673 control {
1674 const integer MyControlIntConst := MyFuncIntConst;
1675 }
1676 }
1677 <END_MODULE>
1678 <RESULT IF_PASS COUNT 1>
1679 (?im)\berror\b.+?no.+?definition.+?MyFuncIntConst
1680 <END_RESULT>
1681 <RESULT IF_PASS COUNT 1>
1682 (?is)\berror:
1683 <END_RESULT>
1684 <RESULT IF_PASS POSITIVE>
1685 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1686 <END_RESULT>
1687
1688 <END_TC>
1689 :exmp.
1690
1691 .*---------------------------------------------------------------------*
1692 :h3.TTCN-3::ScopeUnits-> Function: var definition -> Control part
1693 .*---------------------------------------------------------------------*
1694 :xmp tab=0.
1695 <TC - TTCN-3::ScopeUnits-> Function: var definition -> Control part>
1696
1697 <COMPILE>
1698 <VERDICT_LEAF PASS>
1699 <MODULE TTCN ModuleA ModuleA.ttcn>
1700 module ModuleA {
1701 function MyFunc() {
1702 var integer MyFuncInt := 18;
1703 }
1704 control {
1705 var integer MyControlInt := MyFuncInt;
1706 }
1707 }
1708 <END_MODULE>
1709 <RESULT IF_PASS COUNT 1>
1710 (?im)\berror\b.+?no.+?definition.+?MyFuncInt
1711 <END_RESULT>
1712 <RESULT IF_PASS COUNT 1>
1713 (?is)\berror:
1714 <END_RESULT>
1715 <RESULT IF_PASS POSITIVE>
1716 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1717 <END_RESULT>
1718
1719 <END_TC>
1720 :exmp.
1721
1722 .*---------------------------------------------------------------------*
1723 :h3.TTCN-3::ScopeUnits-> Function: timer definition -> Control part
1724 .*---------------------------------------------------------------------*
1725 :xmp tab=0.
1726 <TC - TTCN-3::ScopeUnits-> Function: timer definition -> Control part>
1727
1728 <COMPILE>
1729 <VERDICT_LEAF PASS>
1730 <MODULE TTCN ModuleA ModuleA.ttcn>
1731 module ModuleA {
1732 function MyFunc() {
1733 timer MyFuncTimer := 18.6;
1734 }
1735 control {
1736 MyFuncTimer.start;
1737 }
1738 }
1739 <END_MODULE>
1740 <RESULT IF_PASS COUNT 1>
1741 (?im)\berror\b.+?no.+?definition.+?MyFuncTimer
1742 <END_RESULT>
1743 <RESULT IF_PASS COUNT 1>
1744 (?is)\berror:
1745 <END_RESULT>
1746 <RESULT IF_PASS POSITIVE>
1747 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1748 <END_RESULT>
1749
1750 <END_TC>
1751 :exmp.
1752
1753 .*---------------------------------------------------------------------*
1754 :h3.TTCN-3::ScopeUnits-> Function: const definition -> Component type
1755 .*---------------------------------------------------------------------*
1756 :xmp tab=0.
1757 <TC - TTCN-3::ScopeUnits-> Function: const definition -> Component type>
1758
1759 <COMPILE>
1760 <VERDICT_LEAF PASS>
1761 <MODULE TTCN ModuleA ModuleA.ttcn>
1762 module ModuleA {
1763 type component MyCompType {
1764 const integer MyComponentIntConst := MyFuncIntConst;
1765 }
1766 function MyFunc() {
1767 const integer MyFuncIntConst := 18;
1768 }
1769 }
1770 <END_MODULE>
1771 <RESULT IF_PASS COUNT 1>
1772 (?im)\berror\b.+?no.+?definition.+?MyFuncIntConst
1773 <END_RESULT>
1774 <RESULT IF_PASS COUNT 1>
1775 (?is)\berror:
1776 <END_RESULT>
1777 <RESULT IF_PASS POSITIVE>
1778 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1779 <END_RESULT>
1780
1781 <END_TC>
1782 :exmp.
1783
1784 .*---------------------------------------------------------------------*
1785 :h3.TTCN-3::ScopeUnits-> Function: var definition -> Component type
1786 .*---------------------------------------------------------------------*
1787 NOTE:
1788 :nl.The implementation does not support the variable initialized with
1789 :nl.another variable in the component type (but it would be possible
1790 :nl.according to TTCN-3 specification ).
1791
1792 :xmp tab=0.
1793
1794 <TC - TTCN-3::ScopeUnits-> Function: var definition -> Component type>
1795
1796 <COMPILE>
1797 <VERDICT_LEAF PASS>
1798 <MODULE TTCN ModuleA ModuleA.ttcn>
1799 module ModuleA {
1800 type component MyCompType {
1801 var integer MyComponentInt := MyFuncInt;
1802 }
1803 function MyFunc() {
1804 var integer MyFuncInt := 18;
1805 }
1806 }
1807 <END_MODULE>
1808 <RESULT IF_PASS COUNT 1>
1809 (?im)\berror\b.+?no.+?definition.+?MyFuncInt
1810 <END_RESULT>
1811 <RESULT IF_PASS COUNT 1>
1812 (?is)\berror:
1813 <END_RESULT>
1814 <RESULT IF_PASS POSITIVE>
1815 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1816 <END_RESULT>
1817
1818 <END_TC>
1819 :exmp.
1820
1821 .*---------------------------------------------------------------------*
1822 :h3.TTCN-3::ScopeUnits-> Function: const definition -> Altstep
1823 .*---------------------------------------------------------------------*
1824 :xmp tab=0.
1825 <TC - TTCN-3::ScopeUnits-> Function: const definition -> Altstep>
1826
1827 <COMPILE>
1828 <VERDICT_LEAF PASS>
1829 <MODULE TTCN ModuleA ModuleA.ttcn>
1830 module ModuleA {
1831 function MyFunc() {
1832 const integer MyFuncIntConst := 18;
1833 }
1834 altstep MyAltstep () {
1835 const integer MyAltstepIntConst := MyFuncIntConst;
1836 [] any port.check {};
1837 [else] {};
1838 }
1839 }
1840 <END_MODULE>
1841 <RESULT IF_PASS COUNT 1>
1842 (?im)\berror\b.+?no.+?definition.+?MyFuncIntConst
1843 <END_RESULT>
1844 <RESULT IF_PASS COUNT 1>
1845 (?is)\berror:
1846 <END_RESULT>
1847 <RESULT IF_PASS POSITIVE>
1848 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1849 <END_RESULT>
1850
1851 <END_TC>
1852 :exmp.
1853
1854 .*---------------------------------------------------------------------*
1855 :h3.TTCN-3::ScopeUnits-> Function: var definition -> Altstep
1856 .*---------------------------------------------------------------------*
1857 :xmp tab=0.
1858 <TC - TTCN-3::ScopeUnits-> Function: var definition -> Altstep>
1859
1860 <COMPILE>
1861 <VERDICT_LEAF PASS>
1862 <MODULE TTCN ModuleA ModuleA.ttcn>
1863 module ModuleA {
1864 function MyFunc() {
1865 var integer MyFuncInt := 12;
1866 }
1867 altstep MyAltstep () {
1868 var integer MyAltstepInt := MyFuncInt;
1869 [] any port.check {};
1870 [else] {};
1871 }
1872 }
1873 <END_MODULE>
1874 <RESULT IF_PASS COUNT 1>
1875 (?im)\berror\b.+?no.+?definition.+?MyFuncInt
1876 <END_RESULT>
1877 <RESULT IF_PASS COUNT 1>
1878 (?is)\berror:
1879 <END_RESULT>
1880 <RESULT IF_PASS POSITIVE>
1881 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1882 <END_RESULT>
1883
1884 <END_TC>
1885 :exmp.
1886
1887 .*---------------------------------------------------------------------*
1888 :h3.TTCN-3::ScopeUnits-> Function: timer definition -> Altstep
1889 .*---------------------------------------------------------------------*
1890 :xmp tab=0.
1891 <TC - TTCN-3::ScopeUnits-> Function: timer definition -> Altstep>
1892
1893 <COMPILE>
1894 <VERDICT_LEAF PASS>
1895 <MODULE TTCN ModuleA ModuleA.ttcn>
1896 module ModuleA {
1897 function MyFunc() {
1898 timer MyFuncTimer := 12.8;
1899 }
1900 altstep MyAltstep () {
1901 [] MyFuncTimer.timeout {}
1902 [else] {};
1903 }
1904 }
1905 <END_MODULE>
1906 <RESULT IF_PASS COUNT 1>
1907 (?im)\berror\b.+?no.+?definition.+?MyFuncTimer
1908 <END_RESULT>
1909 <RESULT IF_PASS COUNT 1>
1910 (?is)\berror:
1911 <END_RESULT>
1912 <RESULT IF_PASS POSITIVE>
1913 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1914 <END_RESULT>
1915
1916 <END_TC>
1917 :exmp.
1918
1919 .*---------------------------------------------------------------------*
1920 :h3.TTCN-3::ScopeUnits-> Function: const definition -> Function_runs_on
1921 .*---------------------------------------------------------------------*
1922 :xmp tab=0.
1923 <TC - TTCN-3::ScopeUnits-> Function: const definition -> Function_runs_on>
1924
1925 <COMPILE>
1926 <VERDICT_LEAF PASS>
1927 <MODULE TTCN ModuleA ModuleA.ttcn>
1928 module ModuleA {
1929 type component MyCompType {}
1930 function MyCompFunc() runs on MyCompType return integer {
1931 return MyFuncIntConst;
1932 }
1933 function MyFunc() {
1934 const integer MyFuncIntConst := 1;
1935 }
1936 }
1937 <END_MODULE>
1938 <RESULT IF_PASS COUNT 1>
1939 (?im)\berror\b.+?no.+?definition.+?MyFuncIntConst
1940 <END_RESULT>
1941 <RESULT IF_PASS COUNT 1>
1942 (?is)\berror:
1943 <END_RESULT>
1944 <RESULT IF_PASS POSITIVE>
1945 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1946 <END_RESULT>
1947
1948 <END_TC>
1949 :exmp.
1950
1951 .*---------------------------------------------------------------------*
1952 :h3.TTCN-3::ScopeUnits-> Function: var definition -> Function_runs_on
1953 .*---------------------------------------------------------------------*
1954 :xmp tab=0.
1955 <TC - TTCN-3::ScopeUnits-> Function: var definition -> Function_runs_on>
1956
1957 <COMPILE>
1958 <VERDICT_LEAF PASS>
1959 <MODULE TTCN ModuleA ModuleA.ttcn>
1960 module ModuleA {
1961 type component MyCompType {}
1962 function MyCompFunc() runs on MyCompType return integer {
1963 return MyFuncInt;
1964 }
1965 function MyFunc() {
1966 var integer MyFuncInt := 1;
1967 }
1968 }
1969 <END_MODULE>
1970 <RESULT IF_PASS COUNT 1>
1971 (?im)\berror\b.+?no.+?definition.+?MyFuncInt
1972 <END_RESULT>
1973 <RESULT IF_PASS COUNT 1>
1974 (?is)\berror:
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 :h3.TTCN-3::ScopeUnits-> Function: timer definition -> Function_runs_on
1985 .*---------------------------------------------------------------------*
1986 :xmp tab=0.
1987 <TC - TTCN-3::ScopeUnits-> Function: timer definition -> Function_runs_on>
1988
1989 <COMPILE>
1990 <VERDICT_LEAF PASS>
1991 <MODULE TTCN ModuleA ModuleA.ttcn>
1992 module ModuleA {
1993 type component MyCompType {}
1994 function MyCompFunc() runs on MyCompType {
1995 MyFuncTimer.start;
1996 }
1997 function MyFunc() {
1998 timer MyFuncTimer := 1.9;
1999 }
2000 }
2001 <END_MODULE>
2002 <RESULT IF_PASS COUNT 1>
2003 (?im)\berror\b.+?no.+?definition.+?MyFuncTimer
2004 <END_RESULT>
2005 <RESULT IF_PASS COUNT 1>
2006 (?is)\berror:
2007 <END_RESULT>
2008 <RESULT IF_PASS POSITIVE>
2009 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2010 <END_RESULT>
2011
2012 <END_TC>
2013 :exmp.
2014
2015 .*---------------------------------------------------------------------*
2016 :h3.TTCN-3::ScopeUnits-> Function: const definition -> Altstep_runs_on
2017 .*---------------------------------------------------------------------*
2018 :xmp tab=0.
2019 <TC - TTCN-3::ScopeUnits-> Function: const definition -> Altstep_runs_on>
2020
2021 <COMPILE>
2022 <VERDICT_LEAF PASS>
2023 <MODULE TTCN ModuleA ModuleA.ttcn>
2024 module ModuleA {
2025 type component MyCompType {}
2026 altstep MyCompAltstep () runs on MyCompType {
2027 const integer MyCompAltstepIntConst := MyFuncIntConst;
2028 [] any port.check {};
2029 [else] {};
2030 }
2031 function MyFunc() {
2032 const integer MyFuncIntConst := 1;
2033 }
2034 }
2035 <END_MODULE>
2036 <RESULT IF_PASS COUNT 1>
2037 (?im)\berror\b.+?no.+?definition.+?MyFuncIntConst
2038 <END_RESULT>
2039 <RESULT IF_PASS COUNT 1>
2040 (?is)\berror:
2041 <END_RESULT>
2042 <RESULT IF_PASS POSITIVE>
2043 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2044 <END_RESULT>
2045
2046 <END_TC>
2047 :exmp.
2048
2049 .*---------------------------------------------------------------------*
2050 :h3.TTCN-3::ScopeUnits-> Function: var definition -> Altstep_runs_on
2051 .*---------------------------------------------------------------------*
2052 :xmp tab=0.
2053 <TC - TTCN-3::ScopeUnits-> Function: var definition -> Altstep_runs_on>
2054
2055 <COMPILE>
2056 <VERDICT_LEAF PASS>
2057 <MODULE TTCN ModuleA ModuleA.ttcn>
2058 module ModuleA {
2059 type component MyCompType {}
2060 altstep MyCompAltstep () runs on MyCompType {
2061 var integer MyCompAltstepInt := MyFuncInt;
2062 [] any port.check {};
2063 [else] {};
2064 }
2065 function MyFunc() {
2066 var integer MyFuncInt := 1;
2067 }
2068 }
2069 <END_MODULE>
2070 <RESULT IF_PASS COUNT 1>
2071 (?im)\berror\b.+?no.+?definition.+?MyFuncInt
2072 <END_RESULT>
2073 <RESULT IF_PASS COUNT 1>
2074 (?is)\berror:
2075 <END_RESULT>
2076 <RESULT IF_PASS POSITIVE>
2077 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2078 <END_RESULT>
2079
2080 <END_TC>
2081 :exmp.
2082
2083 .*---------------------------------------------------------------------*
2084 :h3.TTCN-3::ScopeUnits-> Function: timer definition -> Altstep_runs_on
2085 .*---------------------------------------------------------------------*
2086 :xmp tab=0.
2087 <TC - TTCN-3::ScopeUnits-> Function: timer definition -> Altstep_runs_on>
2088
2089 <COMPILE>
2090 <VERDICT_LEAF PASS>
2091 <MODULE TTCN ModuleA ModuleA.ttcn>
2092 module ModuleA {
2093 type component MyCompType {}
2094 altstep MyCompAltstep () runs on MyCompType {
2095 [] MyFuncTimer.timeout {}
2096 [else] {};
2097 }
2098 function MyFunc() {
2099 timer MyFuncTimer := 1.3;
2100 }
2101 }
2102 <END_MODULE>
2103 <RESULT IF_PASS COUNT 1>
2104 (?im)\berror\b.+?no.+?definition.+?MyFuncTimer
2105 <END_RESULT>
2106 <RESULT IF_PASS COUNT 1>
2107 (?is)\berror:
2108 <END_RESULT>
2109 <RESULT IF_PASS POSITIVE>
2110 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2111 <END_RESULT>
2112
2113 <END_TC>
2114 :exmp.
2115
2116 .*---------------------------------------------------------------------*
2117 :h3.TTCN-3::ScopeUnits-> Function: const definition -> Testcase
2118 .*---------------------------------------------------------------------*
2119 :xmp tab=0.
2120 <TC - TTCN-3::ScopeUnits-> Function: const definition -> Testcase>
2121
2122 <COMPILE>
2123 <VERDICT_LEAF PASS>
2124 <MODULE TTCN ModuleA ModuleA.ttcn>
2125 module ModuleA {
2126 type component MyCompType {}
2127 testcase MyTestcase() runs on MyCompType {
2128 const integer MyTestcaseIntConst := MyFuncIntConst;
2129 }
2130 function MyFunc() {
2131 const integer MyFuncIntConst := 1;
2132 }
2133 }
2134 <END_MODULE>
2135 <RESULT IF_PASS COUNT 1>
2136 (?im)\berror\b.+?no.+?definition.+?MyFuncIntConst
2137 <END_RESULT>
2138 <RESULT IF_PASS COUNT 1>
2139 (?is)\berror:
2140 <END_RESULT>
2141 <RESULT IF_PASS POSITIVE>
2142 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2143 <END_RESULT>
2144
2145 <END_TC>
2146 :exmp.
2147
2148 .*---------------------------------------------------------------------*
2149 :h3.TTCN-3::ScopeUnits-> Function: var definition -> Testcase
2150 .*---------------------------------------------------------------------*
2151 :xmp tab=0.
2152 <TC - TTCN-3::ScopeUnits-> Function: var definition -> Testcase>
2153
2154 <COMPILE>
2155 <VERDICT_LEAF PASS>
2156 <MODULE TTCN ModuleA ModuleA.ttcn>
2157 module ModuleA {
2158 type component MyCompType {}
2159 testcase MyTestcase() runs on MyCompType {
2160 var integer MyTestcaseInt := MyFuncInt;
2161 }
2162 function MyFunc() {
2163 var integer MyFuncInt := 1;
2164 }
2165 }
2166 <END_MODULE>
2167 <RESULT IF_PASS COUNT 1>
2168 (?im)\berror\b.+?no.+?definition.+?MyFuncInt
2169 <END_RESULT>
2170 <RESULT IF_PASS COUNT 1>
2171 (?is)\berror:
2172 <END_RESULT>
2173 <RESULT IF_PASS POSITIVE>
2174 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2175 <END_RESULT>
2176
2177 <END_TC>
2178 :exmp.
2179
2180 .*---------------------------------------------------------------------*
2181 :h3.TTCN-3::ScopeUnits-> Function: timer definition -> Testcase
2182 .*---------------------------------------------------------------------*
2183 :xmp tab=0.
2184 <TC - TTCN-3::ScopeUnits-> Function: timer definition -> Testcase>
2185
2186 <COMPILE>
2187 <VERDICT_LEAF PASS>
2188 <MODULE TTCN ModuleA ModuleA.ttcn>
2189 module ModuleA {
2190 type component MyCompType {}
2191 testcase MyTestcase() runs on MyCompType {
2192 MyFuncTimer.start;
2193 }
2194 function MyFunc() {
2195 timer MyFuncTimer := 3.8;
2196 }
2197 }
2198 <END_MODULE>
2199 <RESULT IF_PASS COUNT 1>
2200 (?im)\berror\b.+?no.+?definition.+?MyFuncTimer
2201 <END_RESULT>
2202 <RESULT IF_PASS COUNT 1>
2203 (?is)\berror:
2204 <END_RESULT>
2205 <RESULT IF_PASS POSITIVE>
2206 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2207 <END_RESULT>
2208
2209 <END_TC>
2210 :exmp.
2211
2212 .*---------------------------------------------------------------------*
2213 :h3.TTCN-3::ScopeUnits-> Altstep: embedded case -- const definition
2214 .*---------------------------------------------------------------------*
2215 :xmp tab=0.
2216 <TC - TTCN-3::ScopeUnits-> Altstep: embedded case -- const definition>
2217
2218 <COMPILE>
2219 <VERDICT_LEAF PASS>
2220 <MODULE TTCN ModuleA ModuleA.ttcn>
2221 module ModuleA {
2222 altstep MyAltstep ( timer MyAltstepTimerIn ) {
2223 [] any port.check {
2224 const integer MyAltstepIntConstE := 10;
2225 };
2226 [ MyAltstepIntConstE > 1 ] MyAltstepTimerIn.timeout {};
2227 [else] {};
2228 }
2229 }
2230 <END_MODULE>
2231 <RESULT IF_PASS COUNT 1>
2232 (?im)\berror\b.+?no.+?definition.+?MyAltstepIntConstE
2233 <END_RESULT>
2234 <RESULT IF_PASS COUNT 1>
2235 (?is)\berror:
2236 <END_RESULT>
2237 <RESULT IF_PASS POSITIVE>
2238 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2239 <END_RESULT>
2240
2241 <END_TC>
2242 :exmp.
2243
2244 .*---------------------------------------------------------------------*
2245 :h3.TTCN-3::ScopeUnits-> Altstep: embedded case -- var definition
2246 .*---------------------------------------------------------------------*
2247 :xmp tab=0.
2248 <TC - TTCN-3::ScopeUnits-> Altstep: embedded case -- var definition>
2249
2250 <COMPILE>
2251 <VERDICT_LEAF PASS>
2252 <MODULE TTCN ModuleA ModuleA.ttcn>
2253 module ModuleA {
2254 altstep MyAltstep ( timer MyAltstepTimerIn ) {
2255 [] any port.check {
2256 var integer MyAltstepIntE := 10;
2257 };
2258 [ MyAltstepIntE > 1 ] MyAltstepTimerIn.timeout {};
2259 [else] {};
2260 }
2261 }
2262 <END_MODULE>
2263 <RESULT IF_PASS COUNT 1>
2264 (?im)\berror\b.+?no.+?definition.+?MyAltstepIntE
2265 <END_RESULT>
2266 <RESULT IF_PASS COUNT 1>
2267 (?is)\berror:
2268 <END_RESULT>
2269 <RESULT IF_PASS POSITIVE>
2270 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2271 <END_RESULT>
2272
2273 <END_TC>
2274 :exmp.
2275
2276 .*---------------------------------------------------------------------*
2277 :h3.TTCN-3::ScopeUnits-> Altstep: embedded case -- timer definition
2278 .*---------------------------------------------------------------------*
2279 :xmp tab=0.
2280 <TC - TTCN-3::ScopeUnits-> Altstep: embedded case -- timer definition>
2281
2282 <COMPILE>
2283 <VERDICT_LEAF PASS>
2284 <MODULE TTCN ModuleA ModuleA.ttcn>
2285 module ModuleA {
2286 altstep MyAltstep () {
2287 [] any port.check {
2288 timer MyAltstepTimerE := 10.3;
2289 };
2290 [] MyAltstepTimerE.timeout {};
2291 [else] {};
2292 }
2293 }
2294 <END_MODULE>
2295 <RESULT IF_PASS COUNT 1>
2296 (?im)\berror\b.+?no.+?definition.+?MyAltstepTimerE
2297 <END_RESULT>
2298 <RESULT IF_PASS COUNT 1>
2299 (?is)\berror:
2300 <END_RESULT>
2301 <RESULT IF_PASS POSITIVE>
2302 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2303 <END_RESULT>
2304
2305 <END_TC>
2306 :exmp.
2307
2308 .*---------------------------------------------------------------------*
2309 :h3.TTCN-3::ScopeUnits-> Altstep: const definition -> Definitions part
2310 .*---------------------------------------------------------------------*
2311 :xmp tab=0.
2312 <TC - TTCN-3::ScopeUnits-> Altstep: const definition -> Definitions part>
2313
2314 <COMPILE>
2315 <VERDICT_LEAF PASS>
2316 <MODULE TTCN ModuleA ModuleA.ttcn>
2317 module ModuleA {
2318 const integer MyModuleIntConst := MyAltstepIntConst;
2319 altstep MyAltstep () {
2320 const integer MyAltstepIntConst := 17;
2321 [] any port.check {};
2322 [else] {};
2323 }
2324 }
2325 <END_MODULE>
2326 <RESULT IF_PASS COUNT 1>
2327 (?im)\berror\b.+?no.+?definition.+?MyAltstepIntConst
2328 <END_RESULT>
2329 <RESULT IF_PASS COUNT 1>
2330 (?is)\berror:
2331 <END_RESULT>
2332 <RESULT IF_PASS POSITIVE>
2333 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2334 <END_RESULT>
2335
2336 <END_TC>
2337 :exmp.
2338
2339 .*---------------------------------------------------------------------*
2340 :h3.TTCN-3::ScopeUnits-> Altstep (value parameter) -> Control part
2341 .*---------------------------------------------------------------------*
2342 :xmp tab=0.
2343 <TC - TTCN-3::ScopeUnits-> Altstep (value parameter) -> Control part>
2344
2345 <COMPILE>
2346 <VERDICT_LEAF PASS>
2347 <MODULE TTCN ModuleA ModuleA.ttcn>
2348 module ModuleA {
2349 altstep MyAltstep ( integer MyAltstepInt ) {
2350 [] any port.check {};
2351 [else] {};
2352 }
2353 control {
2354 var integer MyControlInt := MyAltstepInt;
2355 }
2356 }
2357 <END_MODULE>
2358 <RESULT IF_PASS COUNT 1>
2359 (?im)\berror\b.+?no.+?definition.+?MyAltstepInt
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 :h3.TTCN-3::ScopeUnits-> Altstep (timer parameter) -> Control part
2373 .*---------------------------------------------------------------------*
2374 :xmp tab=0.
2375 <TC - TTCN-3::ScopeUnits-> Altstep (timer parameter) -> Control part>
2376
2377 <COMPILE>
2378 <VERDICT_LEAF PASS>
2379 <MODULE TTCN ModuleA ModuleA.ttcn>
2380 module ModuleA {
2381 altstep MyAltstep ( timer MyAltstepTimer ) {
2382 [] any port.check {};
2383 [else] {};
2384 }
2385 control {
2386 MyAltstepTimer.start;
2387 }
2388 }
2389 <END_MODULE>
2390 <RESULT IF_PASS COUNT 1>
2391 (?im)\berror\b.+?no.+?definition.+?MyAltstepTimer
2392 <END_RESULT>
2393 <RESULT IF_PASS COUNT 1>
2394 (?is)\berror:
2395 <END_RESULT>
2396 <RESULT IF_PASS POSITIVE>
2397 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2398 <END_RESULT>
2399
2400 <END_TC>
2401 :exmp.
2402
2403 .*---------------------------------------------------------------------*
2404 :h3.TTCN-3::ScopeUnits-> Altstep (value parameter) -> Component type
2405 .*---------------------------------------------------------------------*
2406 NOTE:
2407 :nl.The implementation does not support the variable initialized with
2408 :nl.another variable in the component type (but it would be possible
2409 :nl.according to TTCN-3 specification ).
2410
2411 :xmp tab=0.
2412
2413 <TC - TTCN-3::ScopeUnits-> Altstep (value parameter) -> Component type>
2414
2415 <COMPILE>
2416 <VERDICT_LEAF PASS>
2417 <MODULE TTCN ModuleA ModuleA.ttcn>
2418 module ModuleA {
2419 type component MyCompType {
2420 var integer MyComponentInt := MyAltstepInt;
2421 }
2422 altstep MyAltstep ( integer MyAltstepInt ) {
2423 [] any port.check {};
2424 [else] {};
2425 }
2426 }
2427 <END_MODULE>
2428 <RESULT IF_PASS COUNT 1>
2429 (?im)\berror\b.+?no.+?definition.+?MyAltstepInt
2430 <END_RESULT>
2431 <RESULT IF_PASS COUNT 1>
2432 (?is)\berror:
2433 <END_RESULT>
2434 <RESULT IF_PASS POSITIVE>
2435 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2436 <END_RESULT>
2437
2438 <END_TC>
2439 :exmp.
2440
2441 .*---------------------------------------------------------------------*
2442 :h3.TTCN-3::ScopeUnits-> Altstep (value parameter) -> Function
2443 .*---------------------------------------------------------------------*
2444 :xmp tab=0.
2445 <TC - TTCN-3::ScopeUnits-> Altstep (value parameter) -> Function>
2446
2447 <COMPILE>
2448 <VERDICT_LEAF PASS>
2449 <MODULE TTCN ModuleA ModuleA.ttcn>
2450 module ModuleA {
2451 function MyFunc() return integer {
2452 return MyAltstepInt;
2453 }
2454 altstep MyAltstep ( integer MyAltstepInt ) {
2455 [] any port.check {};
2456 [else] {};
2457 }
2458 }
2459 <END_MODULE>
2460 <RESULT IF_PASS COUNT 1>
2461 (?im)\berror\b.+?no.+?definition.+?MyAltstepInt
2462 <END_RESULT>
2463 <RESULT IF_PASS COUNT 1>
2464 (?is)\berror:
2465 <END_RESULT>
2466 <RESULT IF_PASS POSITIVE>
2467 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2468 <END_RESULT>
2469
2470 <END_TC>
2471 :exmp.
2472
2473 .*---------------------------------------------------------------------*
2474 :h3.TTCN-3::ScopeUnits-> Altstep (timer parameter) -> Function
2475 .*---------------------------------------------------------------------*
2476 :xmp tab=0.
2477 <TC - TTCN-3::ScopeUnits-> Altstep (timer parameter) -> Function>
2478
2479 <COMPILE>
2480 <VERDICT_LEAF PASS>
2481 <MODULE TTCN ModuleA ModuleA.ttcn>
2482 module ModuleA {
2483 function MyFunc() {
2484 MyAltstepTimer.start;
2485 }
2486 altstep MyAltstep ( timer MyAltstepTimer ) {
2487 [] any port.check {};
2488 [else] {};
2489 }
2490 }
2491 <END_MODULE>
2492 <RESULT IF_PASS COUNT 1>
2493 (?im)\berror\b.+?no.+?definition.+?MyAltstepTimer
2494 <END_RESULT>
2495 <RESULT IF_PASS COUNT 1>
2496 (?is)\berror:
2497 <END_RESULT>
2498 <RESULT IF_PASS POSITIVE>
2499 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2500 <END_RESULT>
2501
2502 <END_TC>
2503 :exmp.
2504
2505 .*---------------------------------------------------------------------*
2506 :h3.TTCN-3::ScopeUnits-> Altstep (value parameter) -> Function_runs_on
2507 .*---------------------------------------------------------------------*
2508 :xmp tab=0.
2509 <TC - TTCN-3::ScopeUnits-> Altstep (value parameter) -> Function_runs_on>
2510
2511 <COMPILE>
2512 <VERDICT_LEAF PASS>
2513 <MODULE TTCN ModuleA ModuleA.ttcn>
2514 module ModuleA {
2515 type component MyCompType {}
2516 function MyCompFunc() runs on MyCompType return integer {
2517 return MyAltstepInt;
2518 }
2519 altstep MyAltstep ( integer MyAltstepInt ) {
2520 [] any port.check {};
2521 [else] {};
2522 }
2523 }
2524 <END_MODULE>
2525 <RESULT IF_PASS COUNT 1>
2526 (?im)\berror\b.+?no.+?definition.+?MyAltstepInt
2527 <END_RESULT>
2528 <RESULT IF_PASS COUNT 1>
2529 (?is)\berror:
2530 <END_RESULT>
2531 <RESULT IF_PASS POSITIVE>
2532 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2533 <END_RESULT>
2534
2535 <END_TC>
2536 :exmp.
2537
2538 .*---------------------------------------------------------------------*
2539 :h3.TTCN-3::ScopeUnits-> Altstep (timer parameter) -> Function_runs_on
2540 .*---------------------------------------------------------------------*
2541 :xmp tab=0.
2542 <TC - TTCN-3::ScopeUnits-> Altstep (timer parameter) -> Function_runs_on>
2543
2544 <COMPILE>
2545 <VERDICT_LEAF PASS>
2546 <MODULE TTCN ModuleA ModuleA.ttcn>
2547 module ModuleA {
2548 type component MyCompType {}
2549 function MyCompFunc() runs on MyCompType {
2550 MyAltstepTimer.start;
2551 }
2552 altstep MyAltstep ( timer MyAltstepTimer ) {
2553 [] any port.check {};
2554 [else] {};
2555 }
2556 }
2557 <END_MODULE>
2558 <RESULT IF_PASS COUNT 1>
2559 (?im)\berror\b.+?no.+?definition.+?MyAltstepTimer
2560 <END_RESULT>
2561 <RESULT IF_PASS COUNT 1>
2562 (?is)\berror:
2563 <END_RESULT>
2564 <RESULT IF_PASS POSITIVE>
2565 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2566 <END_RESULT>
2567
2568 <END_TC>
2569 :exmp.
2570
2571 .*---------------------------------------------------------------------*
2572 :h3.TTCN-3::ScopeUnits-> Altstep (value parameter) -> Altstep_runs_on
2573 .*---------------------------------------------------------------------*
2574 :xmp tab=0.
2575 <TC - TTCN-3::ScopeUnits-> Altstep (value parameter) -> Altstep_runs_on>
2576
2577 <COMPILE>
2578 <VERDICT_LEAF PASS>
2579 <MODULE TTCN ModuleA ModuleA.ttcn>
2580 module ModuleA {
2581 type component MyCompType {}
2582 altstep MyCompAltstep () runs on MyCompType {
2583 var integer MyCompAltstepInt := MyAltstepInt;
2584 [] any port.check {};
2585 [else] {};
2586 }
2587 altstep MyAltstep ( integer MyAltstepInt ) {
2588 [] any port.check {};
2589 [else] {};
2590 }
2591 }
2592 <END_MODULE>
2593 <RESULT IF_PASS COUNT 1>
2594 (?im)\berror\b.+?no.+?definition.+?MyAltstepInt
2595 <END_RESULT>
2596 <RESULT IF_PASS COUNT 1>
2597 (?is)\berror:
2598 <END_RESULT>
2599 <RESULT IF_PASS POSITIVE>
2600 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2601 <END_RESULT>
2602
2603 <END_TC>
2604 :exmp.
2605
2606 .*---------------------------------------------------------------------*
2607 :h3.TTCN-3::ScopeUnits-> Altstep (timer parameter) -> Altstep_runs_on
2608 .*---------------------------------------------------------------------*
2609 :xmp tab=0.
2610 <TC - TTCN-3::ScopeUnits-> Altstep (timer parameter) -> Altstep_runs_on>
2611
2612 <COMPILE>
2613 <VERDICT_LEAF PASS>
2614 <MODULE TTCN ModuleA ModuleA.ttcn>
2615 module ModuleA {
2616 type component MyCompType {}
2617 altstep MyCompAltstep () runs on MyCompType {
2618 [] MyAltstepTimer.timeout {};
2619 [else] {};
2620 }
2621 altstep MyAltstep ( timer MyAltstepTimer ) {
2622 [] any port.check {};
2623 [else] {};
2624 }
2625 }
2626 <END_MODULE>
2627 <RESULT IF_PASS COUNT 1>
2628 (?im)\berror\b.+?no.+?definition.+?MyAltstepTimer
2629 <END_RESULT>
2630 <RESULT IF_PASS COUNT 1>
2631 (?is)\berror:
2632 <END_RESULT>
2633 <RESULT IF_PASS POSITIVE>
2634 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2635 <END_RESULT>
2636
2637 <END_TC>
2638 :exmp.
2639
2640 .*---------------------------------------------------------------------*
2641 :h3.TTCN-3::ScopeUnits-> Altstep (value parameter) -> Testcase
2642 .*---------------------------------------------------------------------*
2643 :xmp tab=0.
2644 <TC - TTCN-3::ScopeUnits-> Altstep (value parameter) -> Testcase>
2645
2646 <COMPILE>
2647 <VERDICT_LEAF PASS>
2648 <MODULE TTCN ModuleA ModuleA.ttcn>
2649 module ModuleA {
2650 type component MyCompType {}
2651 testcase MyTestcase() runs on MyCompType {
2652 var integer MyTestcaseInt := MyAltstepInt;
2653 }
2654 altstep MyAltstep ( integer MyAltstepInt ) {
2655 [] any port.check {};
2656 [else] {};
2657 }
2658 }
2659 <END_MODULE>
2660 <RESULT IF_PASS COUNT 1>
2661 (?im)\berror\b.+?no.+?definition.+?MyAltstepInt
2662 <END_RESULT>
2663 <RESULT IF_PASS COUNT 1>
2664 (?is)\berror:
2665 <END_RESULT>
2666 <RESULT IF_PASS POSITIVE>
2667 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2668 <END_RESULT>
2669
2670 <END_TC>
2671 :exmp.
2672
2673 .*---------------------------------------------------------------------*
2674 :h3.TTCN-3::ScopeUnits-> Altstep (timer parameter) -> Testcase
2675 .*---------------------------------------------------------------------*
2676 :xmp tab=0.
2677 <TC - TTCN-3::ScopeUnits-> Altstep (timer parameter) -> Testcase>
2678
2679 <COMPILE>
2680 <VERDICT_LEAF PASS>
2681 <MODULE TTCN ModuleA ModuleA.ttcn>
2682 module ModuleA {
2683 type component MyCompType {}
2684 testcase MyTestcase() runs on MyCompType {
2685 MyAltstepTimer.start;
2686 }
2687 altstep MyAltstep ( timer MyAltstepTimer ) {
2688 [] any port.check {};
2689 [else] {};
2690 }
2691 }
2692 <END_MODULE>
2693 <RESULT IF_PASS COUNT 1>
2694 (?im)\berror\b.+?no.+?definition.+?MyAltstepTimer
2695 <END_RESULT>
2696 <RESULT IF_PASS COUNT 1>
2697 (?is)\berror:
2698 <END_RESULT>
2699 <RESULT IF_PASS POSITIVE>
2700 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2701 <END_RESULT>
2702
2703 <END_TC>
2704 :exmp.
2705
2706 .*---------------------------------------------------------------------*
2707 :h3.TTCN-3::ScopeUnits-> Altstep: const definition -> Control part
2708 .*---------------------------------------------------------------------*
2709 :xmp tab=0.
2710 <TC - TTCN-3::ScopeUnits-> Altstep: const definition -> Control part>
2711
2712 <COMPILE>
2713 <VERDICT_LEAF PASS>
2714 <MODULE TTCN ModuleA ModuleA.ttcn>
2715 module ModuleA {
2716 altstep MyAltstep () {
2717 const integer MyAltstepIntConst := 17;
2718 [] any port.check {};
2719 [else] {};
2720 }
2721 control {
2722 const integer MyControlIntConst := MyAltstepIntConst;
2723 }
2724 }
2725 <END_MODULE>
2726 <RESULT IF_PASS COUNT 1>
2727 (?im)\berror\b.+?no.+?definition.+?MyAltstepIntConst
2728 <END_RESULT>
2729 <RESULT IF_PASS COUNT 1>
2730 (?is)\berror:
2731 <END_RESULT>
2732 <RESULT IF_PASS POSITIVE>
2733 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2734 <END_RESULT>
2735
2736 <END_TC>
2737 :exmp.
2738
2739 .*---------------------------------------------------------------------*
2740 :h3.TTCN-3::ScopeUnits-> Altstep: var definition -> Control part
2741 .*---------------------------------------------------------------------*
2742 :xmp tab=0.
2743 <TC - TTCN-3::ScopeUnits-> Altstep: var definition -> Control part>
2744
2745 <COMPILE>
2746 <VERDICT_LEAF PASS>
2747 <MODULE TTCN ModuleA ModuleA.ttcn>
2748 module ModuleA {
2749 altstep MyAltstep () {
2750 var integer MyAltstepInt := 17;
2751 [] any port.check {};
2752 [else] {};
2753 }
2754 control {
2755 var integer MyControlInt := MyAltstepInt;
2756 }
2757 }
2758 <END_MODULE>
2759 <RESULT IF_PASS COUNT 1>
2760 (?im)\berror\b.+?no.+?definition.+?MyAltstepInt
2761 <END_RESULT>
2762 <RESULT IF_PASS COUNT 1>
2763 (?is)\berror:
2764 <END_RESULT>
2765 <RESULT IF_PASS POSITIVE>
2766 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2767 <END_RESULT>
2768
2769 <END_TC>
2770 :exmp.
2771
2772 .*---------------------------------------------------------------------*
2773 :h3.TTCN-3::ScopeUnits-> Altstep: timer definition -> Control part
2774 .*---------------------------------------------------------------------*
2775 :xmp tab=0.
2776 <TC - TTCN-3::ScopeUnits-> Altstep: timer definition -> Control part>
2777
2778 <COMPILE>
2779 <VERDICT_LEAF PASS>
2780 <MODULE TTCN ModuleA ModuleA.ttcn>
2781 module ModuleA {
2782 altstep MyAltstep () {
2783 timer MyAltstepTimer := 17.9;
2784 [] any port.check {};
2785 [else] {};
2786 }
2787 control {
2788 MyAltstepTimer.start;
2789 }
2790 }
2791 <END_MODULE>
2792 <RESULT IF_PASS COUNT 1>
2793 (?im)\berror\b.+?no.+?definition.+?MyAltstepTimer
2794 <END_RESULT>
2795 <RESULT IF_PASS COUNT 1>
2796 (?is)\berror:
2797 <END_RESULT>
2798 <RESULT IF_PASS POSITIVE>
2799 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2800 <END_RESULT>
2801
2802 <END_TC>
2803 :exmp.
2804
2805 .*---------------------------------------------------------------------*
2806 :h3.TTCN-3::ScopeUnits-> Altstep: const definition -> Component type
2807 .*---------------------------------------------------------------------*
2808 :xmp tab=0.
2809 <TC - TTCN-3::ScopeUnits-> Altstep: const definition -> Component type>
2810
2811 <COMPILE>
2812 <VERDICT_LEAF PASS>
2813 <MODULE TTCN ModuleA ModuleA.ttcn>
2814 module ModuleA {
2815 type component MyCompType {
2816 const integer MyComponentIntConst := MyAltstepIntConst;
2817 }
2818 altstep MyAltstep () {
2819 const integer MyAltstepIntConst := 17;
2820 [] any port.check {};
2821 [else] {};
2822 }
2823 }
2824 <END_MODULE>
2825 <RESULT IF_PASS COUNT 1>
2826 (?im)\berror\b.+?no.+?definition.+?MyAltstepIntConst
2827 <END_RESULT>
2828 <RESULT IF_PASS COUNT 1>
2829 (?is)\berror:
2830 <END_RESULT>
2831 <RESULT IF_PASS POSITIVE>
2832 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2833 <END_RESULT>
2834
2835 <END_TC>
2836 :exmp.
2837
2838 .*---------------------------------------------------------------------*
2839 :h3.TTCN-3::ScopeUnits-> Altstep: var definition -> Component type
2840 .*---------------------------------------------------------------------*
2841 NOTE:
2842 :nl.The implementation does not support the variable initialized with
2843 :nl.another variable in the component type (but it would be possible
2844 :nl.according to TTCN-3 specification ).
2845
2846 :xmp tab=0.
2847
2848 <TC - TTCN-3::ScopeUnits-> Altstep: var definition -> Component type>
2849
2850 <COMPILE>
2851 <VERDICT_LEAF PASS>
2852 <MODULE TTCN ModuleA ModuleA.ttcn>
2853 module ModuleA {
2854 type component MyCompType {
2855 var integer MyComponentInt := MyAltstepInt;
2856 }
2857 altstep MyAltstep () {
2858 var integer MyAltstepInt := 17;
2859 [] any port.check {};
2860 [else] {};
2861 }
2862 }
2863 <END_MODULE>
2864 <RESULT IF_PASS COUNT 1>
2865 (?im)\berror\b.+?no.+?definition.+?MyAltstepInt
2866 <END_RESULT>
2867 <RESULT IF_PASS COUNT 1>
2868 (?is)\berror:
2869 <END_RESULT>
2870 <RESULT IF_PASS POSITIVE>
2871 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2872 <END_RESULT>
2873
2874 <END_TC>
2875 :exmp.
2876
2877 .*---------------------------------------------------------------------*
2878 :h3.TTCN-3::ScopeUnits-> Altstep: const definition -> Function
2879 .*---------------------------------------------------------------------*
2880 :xmp tab=0.
2881 <TC - TTCN-3::ScopeUnits-> Altstep: const definition -> Function>
2882
2883 <COMPILE>
2884 <VERDICT_LEAF PASS>
2885 <MODULE TTCN ModuleA ModuleA.ttcn>
2886 module ModuleA {
2887 function MyFunc() return integer {
2888 return MyAltstepIntConst;
2889 }
2890 altstep MyAltstep () {
2891 const integer MyAltstepIntConst := 17;
2892 [] any port.check {};
2893 [else] {};
2894 }
2895 }
2896 <END_MODULE>
2897 <RESULT IF_PASS COUNT 1>
2898 (?im)\berror\b.+?no.+?definition.+?MyAltstepIntConst
2899 <END_RESULT>
2900 <RESULT IF_PASS COUNT 1>
2901 (?is)\berror:
2902 <END_RESULT>
2903 <RESULT IF_PASS POSITIVE>
2904 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2905 <END_RESULT>
2906
2907 <END_TC>
2908 :exmp.
2909
2910 .*---------------------------------------------------------------------*
2911 :h3.TTCN-3::ScopeUnits-> Altstep: var definition -> Function
2912 .*---------------------------------------------------------------------*
2913 :xmp tab=0.
2914 <TC - TTCN-3::ScopeUnits-> Altstep: var definition -> Function>
2915
2916 <COMPILE>
2917 <VERDICT_LEAF PASS>
2918 <MODULE TTCN ModuleA ModuleA.ttcn>
2919 module ModuleA {
2920 function MyFunc() return integer {
2921 return MyAltstepInt;
2922 }
2923 altstep MyAltstep () {
2924 var integer MyAltstepInt := 17;
2925 [] any port.check {};
2926 [else] {};
2927 }
2928 }
2929 <END_MODULE>
2930 <RESULT IF_PASS COUNT 1>
2931 (?im)\berror\b.+?no.+?definition.+?MyAltstepInt
2932 <END_RESULT>
2933 <RESULT IF_PASS COUNT 1>
2934 (?is)\berror:
2935 <END_RESULT>
2936 <RESULT IF_PASS POSITIVE>
2937 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2938 <END_RESULT>
2939
2940 <END_TC>
2941 :exmp.
2942
2943 .*---------------------------------------------------------------------*
2944 :h3.TTCN-3::ScopeUnits-> Altstep: timer definition -> Function
2945 .*---------------------------------------------------------------------*
2946 :xmp tab=0.
2947 <TC - TTCN-3::ScopeUnits-> Altstep: timer definition -> Function>
2948
2949 <COMPILE>
2950 <VERDICT_LEAF PASS>
2951 <MODULE TTCN ModuleA ModuleA.ttcn>
2952 module ModuleA {
2953 function MyFunc() {
2954 MyAltstepTimer.start;
2955 }
2956 altstep MyAltstep () {
2957 timer MyAltstepTimer := 17.9;
2958 [] any port.check {};
2959 [else] {};
2960 }
2961 }
2962 <END_MODULE>
2963 <RESULT IF_PASS COUNT 1>
2964 (?im)\berror\b.+?no.+?definition.+?MyAltstepTimer
2965 <END_RESULT>
2966 <RESULT IF_PASS COUNT 1>
2967 (?is)\berror:
2968 <END_RESULT>
2969 <RESULT IF_PASS POSITIVE>
2970 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2971 <END_RESULT>
2972
2973 <END_TC>
2974 :exmp.
2975
2976 .*---------------------------------------------------------------------*
2977 :h3.TTCN-3::ScopeUnits-> Altstep: const definition -> Function_runs_on
2978 .*---------------------------------------------------------------------*
2979 :xmp tab=0.
2980 <TC - TTCN-3::ScopeUnits-> Altstep: const definition -> Function_runs_on>
2981
2982 <COMPILE>
2983 <VERDICT_LEAF PASS>
2984 <MODULE TTCN ModuleA ModuleA.ttcn>
2985 module ModuleA {
2986 type component MyCompType {}
2987 function MyCompFunc() runs on MyCompType return integer {
2988 return MyAltstepIntConst;
2989 }
2990 altstep MyAltstep () {
2991 const integer MyAltstepIntConst := 13;
2992 [] any port.check {};
2993 [else] {};
2994 }
2995 }
2996 <END_MODULE>
2997 <RESULT IF_PASS COUNT 1>
2998 (?im)\berror\b.+?no.+?definition.+?MyAltstepIntConst
2999 <END_RESULT>
3000 <RESULT IF_PASS COUNT 1>
3001 (?is)\berror:
3002 <END_RESULT>
3003 <RESULT IF_PASS POSITIVE>
3004 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3005 <END_RESULT>
3006
3007 <END_TC>
3008 :exmp.
3009
3010 .*---------------------------------------------------------------------*
3011 :h3.TTCN-3::ScopeUnits-> Altstep: var definition -> Function_runs_on
3012 .*---------------------------------------------------------------------*
3013 :xmp tab=0.
3014 <TC - TTCN-3::ScopeUnits-> Altstep: var definition -> Function_runs_on>
3015
3016 <COMPILE>
3017 <VERDICT_LEAF PASS>
3018 <MODULE TTCN ModuleA ModuleA.ttcn>
3019 module ModuleA {
3020 type component MyCompType {}
3021 function MyCompFunc() runs on MyCompType return integer {
3022 return MyAltstepInt;
3023 }
3024 altstep MyAltstep () {
3025 var integer MyAltstepInt := 13;
3026 [] any port.check {};
3027 [else] {};
3028 }
3029 }
3030 <END_MODULE>
3031 <RESULT IF_PASS COUNT 1>
3032 (?im)\berror\b.+?no.+?definition.+?MyAltstepInt
3033 <END_RESULT>
3034 <RESULT IF_PASS COUNT 1>
3035 (?is)\berror:
3036 <END_RESULT>
3037 <RESULT IF_PASS POSITIVE>
3038 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3039 <END_RESULT>
3040
3041 <END_TC>
3042 :exmp.
3043
3044 .*---------------------------------------------------------------------*
3045 :h3.TTCN-3::ScopeUnits-> Altstep: timer definition -> Function_runs_on
3046 .*---------------------------------------------------------------------*
3047 :xmp tab=0.
3048 <TC - TTCN-3::ScopeUnits-> Altstep: timer definition -> Function_runs_on>
3049
3050 <COMPILE>
3051 <VERDICT_LEAF PASS>
3052 <MODULE TTCN ModuleA ModuleA.ttcn>
3053 module ModuleA {
3054 type component MyCompType {}
3055 function MyCompFunc() runs on MyCompType {
3056 MyAltstepTimer.start;
3057 }
3058 altstep MyAltstep () {
3059 timer MyAltstepTimer := 13.3;
3060 [] any port.check {};
3061 [else] {};
3062 }
3063 }
3064 <END_MODULE>
3065 <RESULT IF_PASS COUNT 1>
3066 (?im)\berror\b.+?no.+?definition.+?MyAltstepTimer
3067 <END_RESULT>
3068 <RESULT IF_PASS COUNT 1>
3069 (?is)\berror:
3070 <END_RESULT>
3071 <RESULT IF_PASS POSITIVE>
3072 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3073 <END_RESULT>
3074
3075 <END_TC>
3076 :exmp.
3077
3078 .*---------------------------------------------------------------------*
3079 :h3.TTCN-3::ScopeUnits-> Altstep: const definition -> Altstep_runs_on
3080 .*---------------------------------------------------------------------*
3081 :xmp tab=0.
3082 <TC - TTCN-3::ScopeUnits-> Altstep: const definition -> Altstep_runs_on>
3083
3084 <COMPILE>
3085 <VERDICT_LEAF PASS>
3086 <MODULE TTCN ModuleA ModuleA.ttcn>
3087 module ModuleA {
3088 type component MyCompType {}
3089 altstep MyCompAltstep () runs on MyCompType {
3090 const integer MyCompAltstepIntConst := MyAltstepIntConst;
3091 [] any port.check {};
3092 [else] {};
3093 }
3094 altstep MyAltstep () {
3095 const integer MyAltstepIntConst := 15;
3096 [] any port.check {};
3097 [else] {};
3098 }
3099 }
3100 <END_MODULE>
3101 <RESULT IF_PASS COUNT 1>
3102 (?im)\berror\b.+?no.+?definition.+?MyAltstepIntConst
3103 <END_RESULT>
3104 <RESULT IF_PASS COUNT 1>
3105 (?is)\berror:
3106 <END_RESULT>
3107 <RESULT IF_PASS POSITIVE>
3108 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3109 <END_RESULT>
3110
3111 <END_TC>
3112 :exmp.
3113
3114 .*---------------------------------------------------------------------*
3115 :h3.TTCN-3::ScopeUnits-> Altstep: var definition -> Altstep_runs_on
3116 .*---------------------------------------------------------------------*
3117 :xmp tab=0.
3118 <TC - TTCN-3::ScopeUnits-> Altstep: var definition -> Altstep_runs_on>
3119
3120 <COMPILE>
3121 <VERDICT_LEAF PASS>
3122 <MODULE TTCN ModuleA ModuleA.ttcn>
3123 module ModuleA {
3124 type component MyCompType {}
3125 altstep MyCompAltstep () runs on MyCompType {
3126 var integer MyCompAltstepInt := MyAltstepInt;
3127 [] any port.check {};
3128 [else] {};
3129 }
3130 altstep MyAltstep () {
3131 var integer MyAltstepInt := 15;
3132 [] any port.check {};
3133 [else] {};
3134 }
3135 }
3136 <END_MODULE>
3137 <RESULT IF_PASS COUNT 1>
3138 (?im)\berror\b.+?no.+?definition.+?MyAltstepInt
3139 <END_RESULT>
3140 <RESULT IF_PASS COUNT 1>
3141 (?is)\berror:
3142 <END_RESULT>
3143 <RESULT IF_PASS POSITIVE>
3144 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3145 <END_RESULT>
3146
3147 <END_TC>
3148 :exmp.
3149
3150 .*---------------------------------------------------------------------*
3151 :h3.TTCN-3::ScopeUnits-> Altstep: timer definition -> Altstep_runs_on
3152 .*---------------------------------------------------------------------*
3153 :xmp tab=0.
3154 <TC - TTCN-3::ScopeUnits-> Altstep: timer definition -> Altstep_runs_on>
3155
3156 <COMPILE>
3157 <VERDICT_LEAF PASS>
3158 <MODULE TTCN ModuleA ModuleA.ttcn>
3159 module ModuleA {
3160 type component MyCompType {}
3161 altstep MyCompAltstep () runs on MyCompType {
3162 [] MyAltstepTimer.timeout {};
3163 [else] {};
3164 }
3165 altstep MyAltstep () {
3166 timer MyAltstepTimer := 15.1;
3167 [] any port.check {};
3168 [else] {};
3169 }
3170 }
3171 <END_MODULE>
3172 <RESULT IF_PASS COUNT 1>
3173 (?im)\berror\b.+?no.+?definition.+?MyAltstepTimer
3174 <END_RESULT>
3175 <RESULT IF_PASS COUNT 1>
3176 (?is)\berror:
3177 <END_RESULT>
3178 <RESULT IF_PASS POSITIVE>
3179 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3180 <END_RESULT>
3181
3182 <END_TC>
3183 :exmp.
3184
3185 .*---------------------------------------------------------------------*
3186 :h3.TTCN-3::ScopeUnits-> Altstep: const definition -> Testcase
3187 .*---------------------------------------------------------------------*
3188 :xmp tab=0.
3189 <TC - TTCN-3::ScopeUnits-> Altstep: const definition -> Testcase>
3190
3191 <COMPILE>
3192 <VERDICT_LEAF PASS>
3193 <MODULE TTCN ModuleA ModuleA.ttcn>
3194 module ModuleA {
3195 type component MyCompType {}
3196 testcase MyTestcase() runs on MyCompType {
3197 const integer MyTestcaseIntConst := MyAltstepIntConst;
3198 }
3199 altstep MyAltstep () {
3200 const integer MyAltstepIntConst := 14;
3201 [] any port.check {};
3202 [else] {};
3203 }
3204 }
3205 <END_MODULE>
3206 <RESULT IF_PASS COUNT 1>
3207 (?im)\berror\b.+?no.+?definition.+?MyAltstepIntConst
3208 <END_RESULT>
3209 <RESULT IF_PASS COUNT 1>
3210 (?is)\berror:
3211 <END_RESULT>
3212 <RESULT IF_PASS POSITIVE>
3213 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3214 <END_RESULT>
3215
3216 <END_TC>
3217 :exmp.
3218
3219 .*---------------------------------------------------------------------*
3220 :h3.TTCN-3::ScopeUnits-> Altstep: var definition -> Testcase
3221 .*---------------------------------------------------------------------*
3222 :xmp tab=0.
3223 <TC - TTCN-3::ScopeUnits-> Altstep: var definition -> Testcase>
3224
3225 <COMPILE>
3226 <VERDICT_LEAF PASS>
3227 <MODULE TTCN ModuleA ModuleA.ttcn>
3228 module ModuleA {
3229 type component MyCompType {}
3230 testcase MyTestcase() runs on MyCompType {
3231 var integer MyTestcaseInt := MyAltstepInt;
3232 }
3233 altstep MyAltstep () {
3234 var integer MyAltstepInt := 14;
3235 [] any port.check {};
3236 [else] {};
3237 }
3238 }
3239 <END_MODULE>
3240 <RESULT IF_PASS COUNT 1>
3241 (?im)\berror\b.+?no.+?definition.+?MyAltstepInt
3242 <END_RESULT>
3243 <RESULT IF_PASS COUNT 1>
3244 (?is)\berror:
3245 <END_RESULT>
3246 <RESULT IF_PASS POSITIVE>
3247 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3248 <END_RESULT>
3249
3250 <END_TC>
3251 :exmp.
3252
3253 .*---------------------------------------------------------------------*
3254 :h3.TTCN-3::ScopeUnits-> Altstep: timer definition -> Testcase
3255 .*---------------------------------------------------------------------*
3256 :xmp tab=0.
3257 <TC - TTCN-3::ScopeUnits-> Altstep: timer definition -> Testcase>
3258
3259 <COMPILE>
3260 <VERDICT_LEAF PASS>
3261 <MODULE TTCN ModuleA ModuleA.ttcn>
3262 module ModuleA {
3263 type component MyCompType {}
3264 testcase MyTestcase() runs on MyCompType {
3265 MyAltstepTimer.start;
3266 }
3267 altstep MyAltstep () {
3268 timer MyAltstepTimer := 14.1;
3269 [] any port.check {};
3270 [else] {};
3271 }
3272 }
3273 <END_MODULE>
3274 <RESULT IF_PASS COUNT 1>
3275 (?im)\berror\b.+?no.+?definition.+?MyAltstepTimer
3276 <END_RESULT>
3277 <RESULT IF_PASS COUNT 1>
3278 (?is)\berror:
3279 <END_RESULT>
3280 <RESULT IF_PASS POSITIVE>
3281 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3282 <END_RESULT>
3283
3284 <END_TC>
3285 :exmp.
3286
3287 .*---------------------------------------------------------------------*
3288 :h3.TTCN-3::ScopeUnits-> Function_runs_on: embedded case -- const definition
3289 .*---------------------------------------------------------------------*
3290 :xmp tab=0.
3291 <TC - TTCN-3::ScopeUnits-> Function_runs_on: embedded case -- const definition>
3292
3293 <COMPILE>
3294 <VERDICT_LEAF PASS>
3295 <MODULE TTCN ModuleA ModuleA.ttcn>
3296 module ModuleA {
3297 type component MyCompType {}
3298 function MyCompFunc() runs on MyCompType return integer {
3299 if ( true ) {
3300 const integer MyCompFuncIntConstE := 21;
3301 }
3302 return MyCompFuncIntConstE;
3303 }
3304 }
3305 <END_MODULE>
3306 <RESULT IF_PASS COUNT 1>
3307 (?im)\berror\b.+?no.+?definition.+?MyCompFuncIntConstE
3308 <END_RESULT>
3309 <RESULT IF_PASS COUNT 1>
3310 (?is)\berror:
3311 <END_RESULT>
3312 <RESULT IF_PASS POSITIVE>
3313 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3314 <END_RESULT>
3315
3316 <END_TC>
3317 :exmp.
3318
3319 .*---------------------------------------------------------------------*
3320 :h3.TTCN-3::ScopeUnits-> Function_runs_on: embedded case -- var definition
3321 .*---------------------------------------------------------------------*
3322 :xmp tab=0.
3323 <TC - TTCN-3::ScopeUnits-> Function_runs_on: embedded case -- var definition>
3324
3325 <COMPILE>
3326 <VERDICT_LEAF PASS>
3327 <MODULE TTCN ModuleA ModuleA.ttcn>
3328 module ModuleA {
3329 type component MyCompType {}
3330 function MyCompFunc() runs on MyCompType return integer {
3331 if ( true ) {
3332 var integer MyCompFuncIntE := 21;
3333 }
3334 return MyCompFuncIntE;
3335 }
3336 }
3337 <END_MODULE>
3338 <RESULT IF_PASS COUNT 1>
3339 (?im)\berror\b.+?no.+?definition.+?MyCompFuncIntE
3340 <END_RESULT>
3341 <RESULT IF_PASS COUNT 1>
3342 (?is)\berror:
3343 <END_RESULT>
3344 <RESULT IF_PASS POSITIVE>
3345 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3346 <END_RESULT>
3347
3348 <END_TC>
3349 :exmp.
3350
3351 .*---------------------------------------------------------------------*
3352 :h3.TTCN-3::ScopeUnits-> Function_runs_on: embedded case -- timer definition
3353 .*---------------------------------------------------------------------*
3354 :xmp tab=0.
3355 <TC - TTCN-3::ScopeUnits-> Function_runs_on: embedded case -- timer definition>
3356
3357 <COMPILE>
3358 <VERDICT_LEAF PASS>
3359 <MODULE TTCN ModuleA ModuleA.ttcn>
3360 module ModuleA {
3361 type component MyCompType {}
3362 function MyCompFunc() runs on MyCompType {
3363 if ( true ) {
3364 timer MyCompFuncTimerE := 21.1;
3365 }
3366 MyCompFuncTimerE.start;
3367 }
3368 }
3369 <END_MODULE>
3370 <RESULT IF_PASS COUNT 1>
3371 (?im)\berror\b.+?no.+?definition.+?MyCompFuncTimerE
3372 <END_RESULT>
3373 <RESULT IF_PASS COUNT 1>
3374 (?is)\berror:
3375 <END_RESULT>
3376 <RESULT IF_PASS POSITIVE>
3377 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3378 <END_RESULT>
3379
3380 <END_TC>
3381 :exmp.
3382
3383 .*---------------------------------------------------------------------*
3384 :h3.TTCN-3::ScopeUnits-> Function_runs_on: const definition -> Component type
3385 .*---------------------------------------------------------------------*
3386 :xmp tab=0.
3387 <TC - TTCN-3::ScopeUnits-> Function_runs_on: const definition -> Component type>
3388
3389 <COMPILE>
3390 <VERDICT_LEAF PASS>
3391 <MODULE TTCN ModuleA ModuleA.ttcn>
3392 module ModuleA {
3393 type component MyCompType {
3394 const integer MyComponentIntConst := MyCompFuncIntConst;
3395 }
3396 function MyCompFunc() runs on MyCompType {
3397 const integer MyCompFuncIntConst := 21;
3398 }
3399 }
3400 <END_MODULE>
3401 <RESULT IF_PASS COUNT 1>
3402 (?im)\berror\b.+?no.+?definition.+?MyCompFuncIntConst
3403 <END_RESULT>
3404 <RESULT IF_PASS COUNT 1>
3405 (?is)\berror:
3406 <END_RESULT>
3407 <RESULT IF_PASS POSITIVE>
3408 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3409 <END_RESULT>
3410
3411 <END_TC>
3412 :exmp.
3413
3414 .*---------------------------------------------------------------------*
3415 :h3.TTCN-3::ScopeUnits-> Function_runs_on: var definition -> Component type
3416 .*---------------------------------------------------------------------*
3417 NOTE:
3418 :nl.The implementation does not support the variable initialized with
3419 :nl.another variable in the component type (but it would be possible
3420 :nl.according to TTCN-3 specification ).
3421
3422 :xmp tab=0.
3423
3424 <TC - TTCN-3::ScopeUnits-> Function_runs_on: var definition -> Component type>
3425
3426 <COMPILE>
3427 <VERDICT_LEAF PASS>
3428 <MODULE TTCN ModuleA ModuleA.ttcn>
3429 module ModuleA {
3430 type component MyCompType {
3431 var integer MyComponentInt := MyCompFuncInt;
3432 }
3433 function MyCompFunc() runs on MyCompType {
3434 var integer MyCompFuncInt := 21;
3435 }
3436 }
3437 <END_MODULE>
3438 <RESULT IF_PASS COUNT 1>
3439 (?im)\berror\b.+?no.+?definition.+?MyCompFuncInt
3440 <END_RESULT>
3441 <RESULT IF_PASS COUNT 1>
3442 (?is)\berror:
3443 <END_RESULT>
3444 <RESULT IF_PASS POSITIVE>
3445 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3446 <END_RESULT>
3447
3448 <END_TC>
3449 :exmp.
3450
3451 .*---------------------------------------------------------------------*
3452 :h3.TTCN-3::ScopeUnits-> Function_runs_on (value parameter) -> Component type
3453 .*---------------------------------------------------------------------*
3454 NOTE:
3455 :nl.The implementation does not support the variable initialized with
3456 :nl.another variable in the component type (but it would be possible
3457 :nl.according to TTCN-3 specification ).
3458
3459 :xmp tab=0.
3460
3461 <TC - TTCN-3::ScopeUnits-> Function_runs_on (value parameter) -> Component type>
3462
3463 <COMPILE>
3464 <VERDICT_LEAF PASS>
3465 <MODULE TTCN ModuleA ModuleA.ttcn>
3466 module ModuleA {
3467 type component MyCompType {
3468 var integer MyComponentInt := MyCompFuncInt;
3469 }
3470 function MyCompFunc( integer MyCompFuncInt ) runs on MyCompType {}
3471 }
3472 <END_MODULE>
3473 <RESULT IF_PASS COUNT 1>
3474 (?im)\berror\b.+?no.+?definition.+?MyCompFuncInt
3475 <END_RESULT>
3476 <RESULT IF_PASS COUNT 1>
3477 (?is)\berror:
3478 <END_RESULT>
3479 <RESULT IF_PASS POSITIVE>
3480 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3481 <END_RESULT>
3482
3483 <END_TC>
3484 :exmp.
3485
3486 .*---------------------------------------------------------------------*
3487 :h3.TTCN-3::ScopeUnits-> Function_runs_on (value parameter) -> Control part
3488 .*---------------------------------------------------------------------*
3489 :xmp tab=0.
3490 <TC - TTCN-3::ScopeUnits-> Function_runs_on (value parameter) -> Control part>
3491
3492 <COMPILE>
3493 <VERDICT_LEAF PASS>
3494 <MODULE TTCN ModuleA ModuleA.ttcn>
3495 module ModuleA {
3496 type component MyCompType {}
3497 function MyCompFunc( integer MyCompFuncInt ) runs on MyCompType {}
3498 control {
3499 var integer MyControlInt := MyCompFuncInt;
3500 }
3501 }
3502 <END_MODULE>
3503 <RESULT IF_PASS COUNT 1>
3504 (?im)\berror\b.+?no.+?definition.+?MyCompFuncInt
3505 <END_RESULT>
3506 <RESULT IF_PASS COUNT 1>
3507 (?is)\berror:
3508 <END_RESULT>
3509 <RESULT IF_PASS POSITIVE>
3510 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3511 <END_RESULT>
3512
3513 <END_TC>
3514 :exmp.
3515
3516 .*---------------------------------------------------------------------*
3517 :h3.TTCN-3::ScopeUnits-> Function_runs_on (timer parameter) -> Control part
3518 .*---------------------------------------------------------------------*
3519 :xmp tab=0.
3520 <TC - TTCN-3::ScopeUnits-> Function_runs_on (timer parameter) -> Control part>
3521
3522 <COMPILE>
3523 <VERDICT_LEAF PASS>
3524 <MODULE TTCN ModuleA ModuleA.ttcn>
3525 module ModuleA {
3526 type component MyCompType {}
3527 function MyCompFunc( timer MyCompFuncTimer ) runs on MyCompType {}
3528 control {
3529 MyCompFuncTimer.start;
3530 }
3531 }
3532 <END_MODULE>
3533 <RESULT IF_PASS COUNT 1>
3534 (?im)\berror\b.+?no.+?definition.+?MyCompFuncTimer
3535 <END_RESULT>
3536 <RESULT IF_PASS COUNT 1>
3537 (?is)\berror:
3538 <END_RESULT>
3539 <RESULT IF_PASS POSITIVE>
3540 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3541 <END_RESULT>
3542
3543 <END_TC>
3544 :exmp.
3545
3546 .*---------------------------------------------------------------------*
3547 :h3.TTCN-3::ScopeUnits-> Function_runs_on (value parameter) -> Function
3548 .*---------------------------------------------------------------------*
3549 :xmp tab=0.
3550 <TC - TTCN-3::ScopeUnits-> Function_runs_on (value parameter) -> Function>
3551
3552 <COMPILE>
3553 <VERDICT_LEAF PASS>
3554 <MODULE TTCN ModuleA ModuleA.ttcn>
3555 module ModuleA {
3556 type component MyCompType {}
3557 function MyCompFunc( integer MyCompFuncInt ) runs on MyCompType {}
3558 function MyFunc() return integer {
3559 return MyCompFuncInt;
3560 }
3561 }
3562 <END_MODULE>
3563 <RESULT IF_PASS COUNT 1>
3564 (?im)\berror\b.+?no.+?definition.+?MyCompFuncInt
3565 <END_RESULT>
3566 <RESULT IF_PASS COUNT 1>
3567 (?is)\berror:
3568 <END_RESULT>
3569 <RESULT IF_PASS POSITIVE>
3570 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3571 <END_RESULT>
3572
3573 <END_TC>
3574 :exmp.
3575
3576 .*---------------------------------------------------------------------*
3577 :h3.TTCN-3::ScopeUnits-> Function_runs_on (timer parameter) -> Function
3578 .*---------------------------------------------------------------------*
3579 :xmp tab=0.
3580 <TC - TTCN-3::ScopeUnits-> Function_runs_on (timer parameter) -> Function>
3581
3582 <COMPILE>
3583 <VERDICT_LEAF PASS>
3584 <MODULE TTCN ModuleA ModuleA.ttcn>
3585 module ModuleA {
3586 type component MyCompType {}
3587 function MyCompFunc( timer MyCompFuncTimer ) runs on MyCompType {}
3588 function MyFunc() {
3589 MyCompFuncTimer.start;
3590 }
3591 }
3592 <END_MODULE>
3593 <RESULT IF_PASS COUNT 1>
3594 (?im)\berror\b.+?no.+?definition.+?MyCompFuncTimer
3595 <END_RESULT>
3596 <RESULT IF_PASS COUNT 1>
3597 (?is)\berror:
3598 <END_RESULT>
3599 <RESULT IF_PASS POSITIVE>
3600 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3601 <END_RESULT>
3602
3603 <END_TC>
3604 :exmp.
3605
3606 .*---------------------------------------------------------------------*
3607 :h3.TTCN-3::ScopeUnits-> Function_runs_on (value parameter) -> Altstep
3608 .*---------------------------------------------------------------------*
3609 :xmp tab=0.
3610 <TC - TTCN-3::ScopeUnits-> Function_runs_on (value parameter) -> Altstep>
3611
3612 <COMPILE>
3613 <VERDICT_LEAF PASS>
3614 <MODULE TTCN ModuleA ModuleA.ttcn>
3615 module ModuleA {
3616 type component MyCompType {}
3617 function MyCompFunc( integer MyCompFuncInt ) runs on MyCompType {}
3618 altstep MyAltstep () {
3619 var integer MyAltstepInt := MyCompFuncInt;
3620 [] any port.check {};
3621 [else] {};
3622 }
3623 }
3624 <END_MODULE>
3625 <RESULT IF_PASS COUNT 1>
3626 (?im)\berror\b.+?no.+?definition.+?MyCompFuncInt
3627 <END_RESULT>
3628 <RESULT IF_PASS COUNT 1>
3629 (?is)\berror:
3630 <END_RESULT>
3631 <RESULT IF_PASS POSITIVE>
3632 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3633 <END_RESULT>
3634
3635 <END_TC>
3636 :exmp.
3637
3638 .*---------------------------------------------------------------------*
3639 :h3.TTCN-3::ScopeUnits-> Function_runs_on (timer parameter) -> Altstep
3640 .*---------------------------------------------------------------------*
3641 :xmp tab=0.
3642 <TC - TTCN-3::ScopeUnits-> Function_runs_on (timer parameter) -> Altstep>
3643
3644 <COMPILE>
3645 <VERDICT_LEAF PASS>
3646 <MODULE TTCN ModuleA ModuleA.ttcn>
3647 module ModuleA {
3648 type component MyCompType {}
3649 function MyCompFunc( timer MyCompFuncTimer ) runs on MyCompType {}
3650 altstep MyAltstep () {
3651 [] MyCompFuncTimer.timeout {};
3652 [else] {};
3653 }
3654 }
3655 <END_MODULE>
3656 <RESULT IF_PASS COUNT 1>
3657 (?im)\berror\b.+?no.+?definition.+?MyCompFuncTimer
3658 <END_RESULT>
3659 <RESULT IF_PASS COUNT 1>
3660 (?is)\berror:
3661 <END_RESULT>
3662 <RESULT IF_PASS POSITIVE>
3663 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3664 <END_RESULT>
3665
3666 <END_TC>
3667 :exmp.
3668
3669 .*---------------------------------------------------------------------*
3670 :h3.TTCN-3::ScopeUnits-> Function_runs_on (value parameter) -> Altstep_runs_on
3671 .*---------------------------------------------------------------------*
3672 :xmp tab=0.
3673 <TC - TTCN-3::ScopeUnits-> Function_runs_on (value parameter) -> Altstep_runs_on>
3674
3675 <COMPILE>
3676 <VERDICT_LEAF PASS>
3677 <MODULE TTCN ModuleA ModuleA.ttcn>
3678 module ModuleA {
3679 type component MyCompType {}
3680 function MyCompFunc( integer MyCompFuncInt ) runs on MyCompType {}
3681 altstep MyCompAltstep() runs on MyCompType {
3682 var integer MyCompAltstepInt := MyCompFuncInt;
3683 [] any port.check {};
3684 [else] {};
3685 }
3686 }
3687 <END_MODULE>
3688 <RESULT IF_PASS COUNT 1>
3689 (?im)\berror\b.+?no.+?definition.+?MyCompFuncInt
3690 <END_RESULT>
3691 <RESULT IF_PASS COUNT 1>
3692 (?is)\berror:
3693 <END_RESULT>
3694 <RESULT IF_PASS POSITIVE>
3695 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3696 <END_RESULT>
3697
3698 <END_TC>
3699 :exmp.
3700
3701 .*---------------------------------------------------------------------*
3702 :h3.TTCN-3::ScopeUnits-> Function_runs_on (timer parameter) -> Altstep_runs_on
3703 .*---------------------------------------------------------------------*
3704 :xmp tab=0.
3705 <TC - TTCN-3::ScopeUnits-> Function_runs_on (timer parameter) -> Altstep_runs_on>
3706
3707 <COMPILE>
3708 <VERDICT_LEAF PASS>
3709 <MODULE TTCN ModuleA ModuleA.ttcn>
3710 module ModuleA {
3711 type component MyCompType {}
3712 function MyCompFunc( timer MyCompFuncTimer ) runs on MyCompType {}
3713 altstep MyCompAltstep() runs on MyCompType {
3714 [] MyCompFuncTimer.timeout {};
3715 [else] {};
3716 }
3717 }
3718 <END_MODULE>
3719 <RESULT IF_PASS COUNT 1>
3720 (?im)\berror\b.+?no.+?definition.+?MyCompFuncTimer
3721 <END_RESULT>
3722 <RESULT IF_PASS COUNT 1>
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 :h3.TTCN-3::ScopeUnits-> Function_runs_on (value parameter) -> Testcase
3734 .*---------------------------------------------------------------------*
3735 :xmp tab=0.
3736 <TC - TTCN-3::ScopeUnits-> Function_runs_on (value parameter) -> Testcase>
3737
3738 <COMPILE>
3739 <VERDICT_LEAF PASS>
3740 <MODULE TTCN ModuleA ModuleA.ttcn>
3741 module ModuleA {
3742 type component MyCompType {}
3743 function MyCompFunc( integer MyCompFuncInt ) runs on MyCompType {}
3744 testcase MyTestcase() runs on MyCompType {
3745 var integer MyTestcaseInt := MyCompFuncInt;
3746 }
3747 }
3748 <END_MODULE>
3749 <RESULT IF_PASS COUNT 1>
3750 (?im)\berror\b.+?no.+?definition.+?MyCompFuncInt
3751 <END_RESULT>
3752 <RESULT IF_PASS COUNT 1>
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 :h3.TTCN-3::ScopeUnits-> Function_runs_on (timer parameter) -> Testcase
3764 .*---------------------------------------------------------------------*
3765 :xmp tab=0.
3766 <TC - TTCN-3::ScopeUnits-> Function_runs_on (timer parameter) -> Testcase>
3767
3768 <COMPILE>
3769 <VERDICT_LEAF PASS>
3770 <MODULE TTCN ModuleA ModuleA.ttcn>
3771 module ModuleA {
3772 type component MyCompType {}
3773 function MyCompFunc( timer MyCompFuncTimer ) runs on MyCompType {}
3774 testcase MyTestcase() runs on MyCompType {
3775 MyCompFuncTimer.start;
3776 }
3777 }
3778 <END_MODULE>
3779 <RESULT IF_PASS COUNT 1>
3780 (?im)\berror\b.+?no.+?definition.+?MyCompFuncTimer
3781 <END_RESULT>
3782 <RESULT IF_PASS COUNT 1>
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 :h3.TTCN-3::ScopeUnits-> Function_runs_on: const definition -> Control part
3794 .*---------------------------------------------------------------------*
3795 :xmp tab=0.
3796 <TC - TTCN-3::ScopeUnits-> Function_runs_on: const definition -> Control part>
3797
3798 <COMPILE>
3799 <VERDICT_LEAF PASS>
3800 <MODULE TTCN ModuleA ModuleA.ttcn>
3801 module ModuleA {
3802 type component MyCompType {}
3803 function MyCompFunc() runs on MyCompType {
3804 const integer MyCompFuncIntConst := 21;
3805 }
3806 control {
3807 const integer MyControlIntConst := MyCompFuncIntConst;
3808 }
3809 }
3810 <END_MODULE>
3811 <RESULT IF_PASS COUNT 1>
3812 (?im)\berror\b.+?no.+?definition.+?MyCompFuncIntConst
3813 <END_RESULT>
3814 <RESULT IF_PASS COUNT 1>
3815 (?is)\berror:
3816 <END_RESULT>
3817 <RESULT IF_PASS POSITIVE>
3818 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3819 <END_RESULT>
3820
3821 <END_TC>
3822 :exmp.
3823
3824 .*---------------------------------------------------------------------*
3825 :h3.TTCN-3::ScopeUnits-> Function_runs_on: var definition -> Control part
3826 .*---------------------------------------------------------------------*
3827 :xmp tab=0.
3828 <TC - TTCN-3::ScopeUnits-> Function_runs_on: var definition -> Control part>
3829
3830 <COMPILE>
3831 <VERDICT_LEAF PASS>
3832 <MODULE TTCN ModuleA ModuleA.ttcn>
3833 module ModuleA {
3834 type component MyCompType {}
3835 function MyCompFunc() runs on MyCompType {
3836 var integer MyCompFuncInt := 21;
3837 }
3838 control {
3839 var integer MyControlInt := MyCompFuncInt;
3840 }
3841 }
3842 <END_MODULE>
3843 <RESULT IF_PASS COUNT 1>
3844 (?im)\berror\b.+?no.+?definition.+?MyCompFuncInt
3845 <END_RESULT>
3846 <RESULT IF_PASS COUNT 1>
3847 (?is)\berror:
3848 <END_RESULT>
3849 <RESULT IF_PASS POSITIVE>
3850 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3851 <END_RESULT>
3852
3853 <END_TC>
3854 :exmp.
3855
3856 .*---------------------------------------------------------------------*
3857 :h3.TTCN-3::ScopeUnits-> Function_runs_on: timer definition -> Control part
3858 .*---------------------------------------------------------------------*
3859 :xmp tab=0.
3860 <TC - TTCN-3::ScopeUnits-> Function_runs_on: timer definition -> Control part>
3861
3862 <COMPILE>
3863 <VERDICT_LEAF PASS>
3864 <MODULE TTCN ModuleA ModuleA.ttcn>
3865 module ModuleA {
3866 type component MyCompType {}
3867 function MyCompFunc() runs on MyCompType {
3868 timer MyCompFuncTimer := 21.6;
3869 }
3870 control {
3871 MyCompFuncTimer.start;
3872 }
3873 }
3874 <END_MODULE>
3875 <RESULT IF_PASS COUNT 1>
3876 (?im)\berror\b.+?no.+?definition.+?MyCompFuncTimer
3877 <END_RESULT>
3878 <RESULT IF_PASS COUNT 1>
3879 (?is)\berror:
3880 <END_RESULT>
3881 <RESULT IF_PASS POSITIVE>
3882 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3883 <END_RESULT>
3884
3885 <END_TC>
3886 :exmp.
3887
3888 .*---------------------------------------------------------------------*
3889 :h3.TTCN-3::ScopeUnits-> Function_runs_on: const definition -> Function
3890 .*---------------------------------------------------------------------*
3891 :xmp tab=0.
3892 <TC - TTCN-3::ScopeUnits-> Function_runs_on: const definition -> Function>
3893
3894 <COMPILE>
3895 <VERDICT_LEAF PASS>
3896 <MODULE TTCN ModuleA ModuleA.ttcn>
3897 module ModuleA {
3898 type component MyCompType {}
3899 function MyCompFunc() runs on MyCompType {
3900 const integer MyCompFuncIntConst := 21;
3901 }
3902 function MyFunc() return integer {
3903 return MyCompFuncIntConst;
3904 }
3905 }
3906 <END_MODULE>
3907 <RESULT IF_PASS COUNT 1>
3908 (?im)\berror\b.+?no.+?definition.+?MyCompFuncIntConst
3909 <END_RESULT>
3910 <RESULT IF_PASS COUNT 1>
3911 (?is)\berror:
3912 <END_RESULT>
3913 <RESULT IF_PASS POSITIVE>
3914 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3915 <END_RESULT>
3916
3917 <END_TC>
3918 :exmp.
3919
3920 .*---------------------------------------------------------------------*
3921 :h3.TTCN-3::ScopeUnits-> Function_runs_on: var definition -> Function
3922 .*---------------------------------------------------------------------*
3923 :xmp tab=0.
3924 <TC - TTCN-3::ScopeUnits-> Function_runs_on: var definition -> Function>
3925
3926 <COMPILE>
3927 <VERDICT_LEAF PASS>
3928 <MODULE TTCN ModuleA ModuleA.ttcn>
3929 module ModuleA {
3930 type component MyCompType {}
3931 function MyCompFunc() runs on MyCompType {
3932 var integer MyCompFuncInt := 21;
3933 }
3934 function MyFunc() return integer {
3935 return MyCompFuncInt;
3936 }
3937 }
3938 <END_MODULE>
3939 <RESULT IF_PASS COUNT 1>
3940 (?im)\berror\b.+?no.+?definition.+?MyCompFuncInt
3941 <END_RESULT>
3942 <RESULT IF_PASS COUNT 1>
3943 (?is)\berror:
3944 <END_RESULT>
3945 <RESULT IF_PASS POSITIVE>
3946 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3947 <END_RESULT>
3948
3949 <END_TC>
3950 :exmp.
3951
3952 .*---------------------------------------------------------------------*
3953 :h3.TTCN-3::ScopeUnits-> Function_runs_on: timer definition -> Function
3954 .*---------------------------------------------------------------------*
3955 :xmp tab=0.
3956 <TC - TTCN-3::ScopeUnits-> Function_runs_on: timer definition -> Function>
3957
3958 <COMPILE>
3959 <VERDICT_LEAF PASS>
3960 <MODULE TTCN ModuleA ModuleA.ttcn>
3961 module ModuleA {
3962 type component MyCompType {}
3963 function MyCompFunc() runs on MyCompType {
3964 timer MyCompFuncTimer := 21.3;
3965 }
3966 function MyFunc() {
3967 MyCompFuncTimer.start;
3968 }
3969 }
3970 <END_MODULE>
3971 <RESULT IF_PASS COUNT 1>
3972 (?im)\berror\b.+?no.+?definition.+?MyCompFuncTimer
3973 <END_RESULT>
3974 <RESULT IF_PASS COUNT 1>
3975 (?is)\berror:
3976 <END_RESULT>
3977 <RESULT IF_PASS POSITIVE>
3978 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3979 <END_RESULT>
3980
3981 <END_TC>
3982 :exmp.
3983
3984 .*---------------------------------------------------------------------*
3985 :h3.TTCN-3::ScopeUnits-> Function_runs_on: const definition -> Altstep
3986 .*---------------------------------------------------------------------*
3987 :xmp tab=0.
3988 <TC - TTCN-3::ScopeUnits-> Function_runs_on: const definition -> Altstep>
3989
3990 <COMPILE>
3991 <VERDICT_LEAF PASS>
3992 <MODULE TTCN ModuleA ModuleA.ttcn>
3993 module ModuleA {
3994 type component MyCompType {}
3995 function MyCompFunc() runs on MyCompType {
3996 const integer MyCompFuncIntConst := 21;
3997 }
3998 altstep MyAltstep () {
3999 const integer MyAltstepIntConst := MyCompFuncIntConst;
4000 [] any port.check {};
4001 [else] {};
4002 }
4003 }
4004 <END_MODULE>
4005 <RESULT IF_PASS COUNT 1>
4006 (?im)\berror\b.+?no.+?definition.+?MyCompFuncIntConst
4007 <END_RESULT>
4008 <RESULT IF_PASS COUNT 1>
4009 (?is)\berror:
4010 <END_RESULT>
4011 <RESULT IF_PASS POSITIVE>
4012 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4013 <END_RESULT>
4014
4015 <END_TC>
4016 :exmp.
4017
4018 .*---------------------------------------------------------------------*
4019 :h3.TTCN-3::ScopeUnits-> Function_runs_on: var definition -> Altstep
4020 .*---------------------------------------------------------------------*
4021 :xmp tab=0.
4022 <TC - TTCN-3::ScopeUnits-> Function_runs_on: var definition -> Altstep>
4023
4024 <COMPILE>
4025 <VERDICT_LEAF PASS>
4026 <MODULE TTCN ModuleA ModuleA.ttcn>
4027 module ModuleA {
4028 type component MyCompType {}
4029 function MyCompFunc() runs on MyCompType {
4030 var integer MyCompFuncInt := 21;
4031 }
4032 altstep MyAltstep () {
4033 var integer MyAltstepInt := MyCompFuncInt;
4034 [] any port.check {};
4035 [else] {};
4036 }
4037 }
4038 <END_MODULE>
4039 <RESULT IF_PASS COUNT 1>
4040 (?im)\berror\b.+?no.+?definition.+?MyCompFuncInt
4041 <END_RESULT>
4042 <RESULT IF_PASS COUNT 1>
4043 (?is)\berror:
4044 <END_RESULT>
4045 <RESULT IF_PASS POSITIVE>
4046 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4047 <END_RESULT>
4048
4049 <END_TC>
4050 :exmp.
4051
4052 .*---------------------------------------------------------------------*
4053 :h3.TTCN-3::ScopeUnits-> Function_runs_on: timer definition -> Altstep
4054 .*---------------------------------------------------------------------*
4055 :xmp tab=0.
4056 <TC - TTCN-3::ScopeUnits-> Function_runs_on: timer definition -> Altstep>
4057
4058 <COMPILE>
4059 <VERDICT_LEAF PASS>
4060 <MODULE TTCN ModuleA ModuleA.ttcn>
4061 module ModuleA {
4062 type component MyCompType {}
4063 function MyCompFunc() runs on MyCompType {
4064 timer MyCompFuncTimer := 21.9;
4065 }
4066 altstep MyAltstep () {
4067 [] MyCompFuncTimer.timeout {};
4068 [else] {};
4069 }
4070 }
4071 <END_MODULE>
4072 <RESULT IF_PASS COUNT 1>
4073 (?im)\berror\b.+?no.+?definition.+?MyCompFuncTimer
4074 <END_RESULT>
4075 <RESULT IF_PASS COUNT 1>
4076 (?is)\berror:
4077 <END_RESULT>
4078 <RESULT IF_PASS POSITIVE>
4079 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4080 <END_RESULT>
4081
4082 <END_TC>
4083 :exmp.
4084
4085 .*---------------------------------------------------------------------*
4086 :h3.TTCN-3::ScopeUnits-> Function_runs_on: const definition -> Altstep_runs_on
4087 .*---------------------------------------------------------------------*
4088 :xmp tab=0.
4089 <TC - TTCN-3::ScopeUnits-> Function_runs_on: const definition -> Altstep_runs_on>
4090
4091 <COMPILE>
4092 <VERDICT_LEAF PASS>
4093 <MODULE TTCN ModuleA ModuleA.ttcn>
4094 module ModuleA {
4095 type component MyCompType {}
4096 function MyCompFunc() runs on MyCompType {
4097 const integer MyCompFuncIntConst := 21;
4098 }
4099 altstep MyCompAltstep() runs on MyCompType {
4100 const integer MyCompAltstepIntConst := MyCompFuncIntConst;
4101 [] any port.check {};
4102 [else] {};
4103 }
4104 }
4105 <END_MODULE>
4106 <RESULT IF_PASS COUNT 1>
4107 (?im)\berror\b.+?no.+?definition.+?MyCompFuncIntConst
4108 <END_RESULT>
4109 <RESULT IF_PASS COUNT 1>
4110 (?is)\berror:
4111 <END_RESULT>
4112 <RESULT IF_PASS POSITIVE>
4113 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4114 <END_RESULT>
4115
4116 <END_TC>
4117 :exmp.
4118
4119 .*---------------------------------------------------------------------*
4120 :h3.TTCN-3::ScopeUnits-> Function_runs_on: var definition -> Altstep_runs_on
4121 .*---------------------------------------------------------------------*
4122 :xmp tab=0.
4123 <TC - TTCN-3::ScopeUnits-> Function_runs_on: var definition -> Altstep_runs_on>
4124
4125 <COMPILE>
4126 <VERDICT_LEAF PASS>
4127 <MODULE TTCN ModuleA ModuleA.ttcn>
4128 module ModuleA {
4129 type component MyCompType {}
4130 function MyCompFunc() runs on MyCompType {
4131 var integer MyCompFuncInt := 21;
4132 }
4133 altstep MyCompAltstep() runs on MyCompType {
4134 var integer MyCompAltstepInt := MyCompFuncInt;
4135 [] any port.check {};
4136 [else] {};
4137 }
4138 }
4139 <END_MODULE>
4140 <RESULT IF_PASS COUNT 1>
4141 (?im)\berror\b.+?no.+?definition.+?MyCompFuncInt
4142 <END_RESULT>
4143 <RESULT IF_PASS COUNT 1>
4144 (?is)\berror:
4145 <END_RESULT>
4146 <RESULT IF_PASS POSITIVE>
4147 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4148 <END_RESULT>
4149
4150 <END_TC>
4151 :exmp.
4152
4153 .*---------------------------------------------------------------------*
4154 :h3.TTCN-3::ScopeUnits-> Function_runs_on: timer definition -> Altstep_runs_on
4155 .*---------------------------------------------------------------------*
4156 :xmp tab=0.
4157 <TC - TTCN-3::ScopeUnits-> Function_runs_on: timer definition -> Altstep_runs_on>
4158
4159 <COMPILE>
4160 <VERDICT_LEAF PASS>
4161 <MODULE TTCN ModuleA ModuleA.ttcn>
4162 module ModuleA {
4163 type component MyCompType {}
4164 function MyCompFunc() runs on MyCompType {
4165 timer MyCompFuncTimer := 21.3;
4166 }
4167 altstep MyCompAltstep() runs on MyCompType {
4168 [] MyCompFuncTimer.timeout {};
4169 [else] {};
4170 }
4171 }
4172 <END_MODULE>
4173 <RESULT IF_PASS COUNT 1>
4174 (?im)\berror\b.+?no.+?definition.+?MyCompFuncTimer
4175 <END_RESULT>
4176 <RESULT IF_PASS COUNT 1>
4177 (?is)\berror:
4178 <END_RESULT>
4179 <RESULT IF_PASS POSITIVE>
4180 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4181 <END_RESULT>
4182
4183 <END_TC>
4184 :exmp.
4185
4186 .*---------------------------------------------------------------------*
4187 :h3.TTCN-3::ScopeUnits-> Function_runs_on: const definition -> Testcase
4188 .*---------------------------------------------------------------------*
4189 :xmp tab=0.
4190 <TC - TTCN-3::ScopeUnits-> Function_runs_on: const definition -> Testcase>
4191
4192 <COMPILE>
4193 <VERDICT_LEAF PASS>
4194 <MODULE TTCN ModuleA ModuleA.ttcn>
4195 module ModuleA {
4196 type component MyCompType {}
4197 function MyCompFunc() runs on MyCompType {
4198 const integer MyCompFuncIntConst := 21;
4199 }
4200 testcase MyTestcase() runs on MyCompType {
4201 const integer MyTestcaseIntConst := MyCompFuncIntConst;
4202 }
4203 }
4204 <END_MODULE>
4205 <RESULT IF_PASS COUNT 1>
4206 (?im)\berror\b.+?no.+?definition.+?MyCompFuncIntConst
4207 <END_RESULT>
4208 <RESULT IF_PASS COUNT 1>
4209 (?is)\berror:
4210 <END_RESULT>
4211 <RESULT IF_PASS POSITIVE>
4212 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4213 <END_RESULT>
4214
4215 <END_TC>
4216 :exmp.
4217
4218 .*---------------------------------------------------------------------*
4219 :h3.TTCN-3::ScopeUnits-> Function_runs_on: var definition -> Testcase
4220 .*---------------------------------------------------------------------*
4221 :xmp tab=0.
4222 <TC - TTCN-3::ScopeUnits-> Function_runs_on: var definition -> Testcase>
4223
4224 <COMPILE>
4225 <VERDICT_LEAF PASS>
4226 <MODULE TTCN ModuleA ModuleA.ttcn>
4227 module ModuleA {
4228 type component MyCompType {}
4229 function MyCompFunc() runs on MyCompType {
4230 var integer MyCompFuncInt := 21;
4231 }
4232 testcase MyTestcase() runs on MyCompType {
4233 var integer MyTestcaseInt := MyCompFuncInt;
4234 }
4235 }
4236 <END_MODULE>
4237 <RESULT IF_PASS COUNT 1>
4238 (?im)\berror\b.+?no.+?definition.+?MyCompFuncInt
4239 <END_RESULT>
4240 <RESULT IF_PASS COUNT 1>
4241 (?is)\berror:
4242 <END_RESULT>
4243 <RESULT IF_PASS POSITIVE>
4244 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4245 <END_RESULT>
4246
4247 <END_TC>
4248 :exmp.
4249
4250 .*---------------------------------------------------------------------*
4251 :h3.TTCN-3::ScopeUnits-> Function_runs_on: timer definition -> Testcase
4252 .*---------------------------------------------------------------------*
4253 :xmp tab=0.
4254 <TC - TTCN-3::ScopeUnits-> Function_runs_on: timer definition -> Testcase>
4255
4256 <COMPILE>
4257 <VERDICT_LEAF PASS>
4258 <MODULE TTCN ModuleA ModuleA.ttcn>
4259 module ModuleA {
4260 type component MyCompType {}
4261 function MyCompFunc() runs on MyCompType {
4262 timer MyCompFuncTimer := 21.3;
4263 }
4264 testcase MyTestcase() runs on MyCompType {
4265 MyCompFuncTimer.start;
4266 }
4267 }
4268 <END_MODULE>
4269 <RESULT IF_PASS COUNT 1>
4270 (?im)\berror\b.+?no.+?definition.+?MyCompFuncTimer
4271 <END_RESULT>
4272 <RESULT IF_PASS COUNT 1>
4273 (?is)\berror:
4274 <END_RESULT>
4275 <RESULT IF_PASS POSITIVE>
4276 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4277 <END_RESULT>
4278
4279 <END_TC>
4280 :exmp.
4281
4282 .*---------------------------------------------------------------------*
4283 :h3.TTCN-3::ScopeUnits-> Altstep_runs_on: embedded case -- const definition
4284 .*---------------------------------------------------------------------*
4285 :xmp tab=0.
4286 <TC - TTCN-3::ScopeUnits-> Altstep_runs_on: embedded case -- const definition>
4287
4288 <COMPILE>
4289 <VERDICT_LEAF PASS>
4290 <MODULE TTCN ModuleA ModuleA.ttcn>
4291 module ModuleA {
4292 type component MyCompType {}
4293 altstep MyCompAltstep( timer MyCompAltstepTimerIn ) runs on MyCompType {
4294 [] any port.check {
4295 const integer MyCompAltstepIntConstE := 16;
4296 };
4297 [ MyCompAltstepIntConstE > 1 ] MyCompAltstepTimerIn.timeout {};
4298 [else] {};
4299 }
4300 }
4301 <END_MODULE>
4302 <RESULT IF_PASS COUNT 1>
4303 (?im)\berror\b.+?no.+?definition.+?MyCompAltstepIntConstE
4304 <END_RESULT>
4305 <RESULT IF_PASS COUNT 1>
4306 (?is)\berror:
4307 <END_RESULT>
4308 <RESULT IF_PASS POSITIVE>
4309 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4310 <END_RESULT>
4311
4312 <END_TC>
4313 :exmp.
4314
4315 .*---------------------------------------------------------------------*
4316 :h3.TTCN-3::ScopeUnits-> Altstep_runs_on: embedded case -- var definition
4317 .*---------------------------------------------------------------------*
4318 :xmp tab=0.
4319 <TC - TTCN-3::ScopeUnits-> Altstep_runs_on: embedded case -- var definition>
4320
4321 <COMPILE>
4322 <VERDICT_LEAF PASS>
4323 <MODULE TTCN ModuleA ModuleA.ttcn>
4324 module ModuleA {
4325 type component MyCompType {}
4326 altstep MyCompAltstep( timer MyCompAltstepTimerIn ) runs on MyCompType {
4327 [] any port.check {
4328 var integer MyCompAltstepIntE := 16;
4329 };
4330 [ MyCompAltstepIntE > 1 ] MyCompAltstepTimerIn.timeout {};
4331 [else] {};
4332 }
4333 }
4334 <END_MODULE>
4335 <RESULT IF_PASS COUNT 1>
4336 (?im)\berror\b.+?no.+?definition.+?MyCompAltstepIntE
4337 <END_RESULT>
4338 <RESULT IF_PASS COUNT 1>
4339 (?is)\berror:
4340 <END_RESULT>
4341 <RESULT IF_PASS POSITIVE>
4342 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4343 <END_RESULT>
4344
4345 <END_TC>
4346 :exmp.
4347
4348 .*---------------------------------------------------------------------*
4349 :h3.TTCN-3::ScopeUnits-> Altstep_runs_on: embedded case -- timer definition
4350 .*---------------------------------------------------------------------*
4351 :xmp tab=0.
4352 <TC - TTCN-3::ScopeUnits-> Altstep_runs_on: embedded case -- timer definition>
4353
4354 <COMPILE>
4355 <VERDICT_LEAF PASS>
4356 <MODULE TTCN ModuleA ModuleA.ttcn>
4357 module ModuleA {
4358 type component MyCompType {}
4359 altstep MyCompAltstep() runs on MyCompType {
4360 [] any port.check {
4361 timer MyCompAltstepTimerE := 16.4;
4362 };
4363 [] MyCompAltstepTimerE.timeout {};
4364 [else] {};
4365 }
4366 }
4367 <END_MODULE>
4368 <RESULT IF_PASS COUNT 1>
4369 (?im)\berror\b.+?no.+?definition.+?MyCompAltstepTimerE
4370 <END_RESULT>
4371 <RESULT IF_PASS COUNT 1>
4372 (?is)\berror:
4373 <END_RESULT>
4374 <RESULT IF_PASS POSITIVE>
4375 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4376 <END_RESULT>
4377
4378 <END_TC>
4379 :exmp.
4380
4381 .*---------------------------------------------------------------------*
4382 :h3.TTCN-3::ScopeUnits-> Altstep_runs_on: const definition -> Component type
4383 .*---------------------------------------------------------------------*
4384 :xmp tab=0.
4385 <TC - TTCN-3::ScopeUnits-> Altstep_runs_on: const definition -> Component type>
4386
4387 <COMPILE>
4388 <VERDICT_LEAF PASS>
4389 <MODULE TTCN ModuleA ModuleA.ttcn>
4390 module ModuleA {
4391 type component MyCompType {
4392 const integer MyComponentIntConst := MyCompAltstepIntConst;
4393 }
4394 altstep MyCompAltstep() runs on MyCompType {
4395 const integer MyCompAltstepIntConst := 16;
4396 [] any port.check {};
4397 [else] {};
4398 }
4399 }
4400 <END_MODULE>
4401 <RESULT IF_PASS COUNT 1>
4402 (?im)\berror\b.+?no.+?definition.+?MyCompAltstepIntConst
4403 <END_RESULT>
4404 <RESULT IF_PASS COUNT 1>
4405 (?is)\berror:
4406 <END_RESULT>
4407 <RESULT IF_PASS POSITIVE>
4408 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4409 <END_RESULT>
4410
4411 <END_TC>
4412 :exmp.
4413
4414 .*---------------------------------------------------------------------*
4415 :h3.TTCN-3::ScopeUnits-> Altstep_runs_on: var definition -> Component type
4416 .*---------------------------------------------------------------------*
4417 NOTE:
4418 :nl.The implementation does not support the variable initialized with
4419 :nl.another variable in the component type (but it would be possible
4420 :nl.according to TTCN-3 specification ).
4421
4422 :xmp tab=0.
4423
4424 <TC - TTCN-3::ScopeUnits-> Altstep_runs_on: var definition -> Component type>
4425
4426 <COMPILE>
4427 <VERDICT_LEAF PASS>
4428 <MODULE TTCN ModuleA ModuleA.ttcn>
4429 module ModuleA {
4430 type component MyCompType {
4431 var integer MyComponentInt := MyCompAltstepInt;
4432 }
4433 altstep MyCompAltstep() runs on MyCompType {
4434 var integer MyCompAltstepInt := 16;
4435 [] any port.check {};
4436 [else] {};
4437 }
4438 }
4439 <END_MODULE>
4440 <RESULT IF_PASS COUNT 1>
4441 (?im)\berror\b.+?no.+?definition.+?MyCompAltstepInt
4442 <END_RESULT>
4443 <RESULT IF_PASS COUNT 1>
4444 (?is)\berror:
4445 <END_RESULT>
4446 <RESULT IF_PASS POSITIVE>
4447 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4448 <END_RESULT>
4449
4450 <END_TC>
4451 :exmp.
4452
4453 .*---------------------------------------------------------------------*
4454 :h3.TTCN-3::ScopeUnits-> Altstep_runs_on (value parameter) -> Component type
4455 .*---------------------------------------------------------------------*
4456 NOTE:
4457 :nl.The implementation does not support the variable initialized with
4458 :nl.another variable in the component type (but it would be possible
4459 :nl.according to TTCN-3 specification ).
4460
4461 :xmp tab=0.
4462
4463 <TC - TTCN-3::ScopeUnits-> Altstep_runs_on (value parameter) -> Component type>
4464
4465 <COMPILE>
4466 <VERDICT_LEAF PASS>
4467 <MODULE TTCN ModuleA ModuleA.ttcn>
4468 module ModuleA {
4469 type component MyCompType {
4470 var integer MyComponentInt := MyCompAltstepInt;
4471 }
4472 altstep MyCompAltstep( integer MyCompAltstepInt ) runs on MyCompType {
4473 [] any port.check {};
4474 [else] {};
4475 }
4476 }
4477 <END_MODULE>
4478 <RESULT IF_PASS COUNT 1>
4479 (?im)\berror\b.+?no.+?definition.+?MyCompAltstepInt
4480 <END_RESULT>
4481 <RESULT IF_PASS COUNT 1>
4482 (?is)\berror:
4483 <END_RESULT>
4484 <RESULT IF_PASS POSITIVE>
4485 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4486 <END_RESULT>
4487
4488 <END_TC>
4489 :exmp.
4490
4491 .*---------------------------------------------------------------------*
4492 :h3.TTCN-3::ScopeUnits-> Altstep_runs_on (value parameter) -> Control part
4493 .*---------------------------------------------------------------------*
4494 :xmp tab=0.
4495 <TC - TTCN-3::ScopeUnits-> Altstep_runs_on (value parameter) -> Control part>
4496
4497 <COMPILE>
4498 <VERDICT_LEAF PASS>
4499 <MODULE TTCN ModuleA ModuleA.ttcn>
4500 module ModuleA {
4501 type component MyCompType {}
4502 altstep MyCompAltstep( integer MyCompAltstepInt ) runs on MyCompType {
4503 [] any port.check {};
4504 [else] {};
4505 }
4506 control {
4507 var integer MyControlInt := MyCompAltstepInt;
4508 }
4509 }
4510 <END_MODULE>
4511 <RESULT IF_PASS COUNT 1>
4512 (?im)\berror\b.+?no.+?definition.+?MyCompAltstepInt
4513 <END_RESULT>
4514 <RESULT IF_PASS COUNT 1>
4515 (?is)\berror:
4516 <END_RESULT>
4517 <RESULT IF_PASS POSITIVE>
4518 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4519 <END_RESULT>
4520
4521 <END_TC>
4522 :exmp.
4523
4524 .*---------------------------------------------------------------------*
4525 :h3.TTCN-3::ScopeUnits-> Altstep_runs_on (timer parameter) -> Control part
4526 .*---------------------------------------------------------------------*
4527 :xmp tab=0.
4528 <TC - TTCN-3::ScopeUnits-> Altstep_runs_on (timer parameter) -> Control part>
4529
4530 <COMPILE>
4531 <VERDICT_LEAF PASS>
4532 <MODULE TTCN ModuleA ModuleA.ttcn>
4533 module ModuleA {
4534 type component MyCompType {}
4535 altstep MyCompAltstep( timer MyCompAltstepTimer ) runs on MyCompType {
4536 [] any port.check {};
4537 [else] {};
4538 }
4539 control {
4540 MyCompAltstepTimer.start;
4541 }
4542 }
4543 <END_MODULE>
4544 <RESULT IF_PASS COUNT 1>
4545 (?im)\berror\b.+?no.+?definition.+?MyCompAltstepTimer
4546 <END_RESULT>
4547 <RESULT IF_PASS COUNT 1>
4548 (?is)\berror:
4549 <END_RESULT>
4550 <RESULT IF_PASS POSITIVE>
4551 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4552 <END_RESULT>
4553
4554 <END_TC>
4555 :exmp.
4556
4557 .*---------------------------------------------------------------------*
4558 :h3.TTCN-3::ScopeUnits-> Altstep_runs_on (value parameter) -> Function
4559 .*---------------------------------------------------------------------*
4560 :xmp tab=0.
4561 <TC - TTCN-3::ScopeUnits-> Altstep_runs_on (value parameter) -> Function>
4562
4563 <COMPILE>
4564 <VERDICT_LEAF PASS>
4565 <MODULE TTCN ModuleA ModuleA.ttcn>
4566 module ModuleA {
4567 type component MyCompType {}
4568 altstep MyCompAltstep( integer MyCompAltstepInt ) runs on MyCompType {
4569 [] any port.check {};
4570 [else] {};
4571 }
4572 function MyFunc() return integer {
4573 return MyCompAltstepInt;
4574 }
4575 }
4576 <END_MODULE>
4577 <RESULT IF_PASS COUNT 1>
4578 (?im)\berror\b.+?no.+?definition.+?MyCompAltstepInt
4579 <END_RESULT>
4580 <RESULT IF_PASS COUNT 1>
4581 (?is)\berror:
4582 <END_RESULT>
4583 <RESULT IF_PASS POSITIVE>
4584 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4585 <END_RESULT>
4586
4587 <END_TC>
4588 :exmp.
4589
4590 .*---------------------------------------------------------------------*
4591 :h3.TTCN-3::ScopeUnits-> Altstep_runs_on (timer parameter) -> Function
4592 .*---------------------------------------------------------------------*
4593 :xmp tab=0.
4594 <TC - TTCN-3::ScopeUnits-> Altstep_runs_on (timer parameter) -> Function>
4595
4596 <COMPILE>
4597 <VERDICT_LEAF PASS>
4598 <MODULE TTCN ModuleA ModuleA.ttcn>
4599 module ModuleA {
4600 type component MyCompType {}
4601 altstep MyCompAltstep( timer MyCompAltstepTimer ) runs on MyCompType {
4602 [] any port.check {};
4603 [else] {};
4604 }
4605 function MyFunc() {
4606 MyCompAltstepTimer.start;
4607 }
4608 }
4609 <END_MODULE>
4610 <RESULT IF_PASS COUNT 1>
4611 (?im)\berror\b.+?no.+?definition.+?MyCompAltstepTimer
4612 <END_RESULT>
4613 <RESULT IF_PASS COUNT 1>
4614 (?is)\berror:
4615 <END_RESULT>
4616 <RESULT IF_PASS POSITIVE>
4617 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4618 <END_RESULT>
4619
4620 <END_TC>
4621 :exmp.
4622
4623 .*---------------------------------------------------------------------*
4624 :h3.TTCN-3::ScopeUnits-> Altstep_runs_on (value parameter) -> Altstep
4625 .*---------------------------------------------------------------------*
4626 :xmp tab=0.
4627 <TC - TTCN-3::ScopeUnits-> Altstep_runs_on (value parameter) -> Altstep>
4628
4629 <COMPILE>
4630 <VERDICT_LEAF PASS>
4631 <MODULE TTCN ModuleA ModuleA.ttcn>
4632 module ModuleA {
4633 type component MyCompType {}
4634 altstep MyCompAltstep ( integer MyCompAltstepInt ) runs on MyCompType {
4635 [] any port.check {};
4636 [else] {};
4637 }
4638 altstep MyAltstep () {
4639 var integer MyAltstepInt := MyCompAltstepInt;
4640 [] any port.check {};
4641 [else] {};
4642 }
4643 }
4644 <END_MODULE>
4645 <RESULT IF_PASS COUNT 1>
4646 (?im)\berror\b.+?no.+?definition.+?MyCompAltstepInt
4647 <END_RESULT>
4648 <RESULT IF_PASS COUNT 1>
4649 (?is)\berror:
4650 <END_RESULT>
4651 <RESULT IF_PASS POSITIVE>
4652 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4653 <END_RESULT>
4654
4655 <END_TC>
4656 :exmp.
4657
4658 .*---------------------------------------------------------------------*
4659 :h3.TTCN-3::ScopeUnits-> Altstep_runs_on (timer parameter) -> Altstep
4660 .*---------------------------------------------------------------------*
4661 :xmp tab=0.
4662 <TC - TTCN-3::ScopeUnits-> Altstep_runs_on (timer parameter) -> Altstep>
4663
4664 <COMPILE>
4665 <VERDICT_LEAF PASS>
4666 <MODULE TTCN ModuleA ModuleA.ttcn>
4667 module ModuleA {
4668 type component MyCompType {}
4669 altstep MyCompAltstep ( timer MyCompAltstepTimer ) runs on MyCompType {
4670 [] any port.check {};
4671 [else] {};
4672 }
4673 altstep MyAltstep () {
4674 [] MyCompAltstepTimer.timeout {};
4675 [else] {};
4676 }
4677 }
4678 <END_MODULE>
4679 <RESULT IF_PASS COUNT 1>
4680 (?im)\berror\b.+?no.+?definition.+?MyCompAltstepTimer
4681 <END_RESULT>
4682 <RESULT IF_PASS COUNT 1>
4683 (?is)\berror:
4684 <END_RESULT>
4685 <RESULT IF_PASS POSITIVE>
4686 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4687 <END_RESULT>
4688
4689 <END_TC>
4690 :exmp.
4691
4692 .*---------------------------------------------------------------------*
4693 :h3.TTCN-3::ScopeUnits-> Altstep_runs_on (value parameter) -> Function_runs_on
4694 .*---------------------------------------------------------------------*
4695 :xmp tab=0.
4696 <TC - TTCN-3::ScopeUnits-> Altstep_runs_on (value parameter) -> Function_runs_on>
4697
4698 <COMPILE>
4699 <VERDICT_LEAF PASS>
4700 <MODULE TTCN ModuleA ModuleA.ttcn>
4701 module ModuleA {
4702 type component MyCompType {}
4703 function MyCompFunc() runs on MyCompType {
4704 var integer MyCompFuncInt := MyCompAltstepInt;
4705 }
4706 altstep MyCompAltstep( integer MyCompAltstepInt ) runs on MyCompType {
4707 [] any port.check {};
4708 [else] {};
4709 }
4710 }
4711 <END_MODULE>
4712 <RESULT IF_PASS COUNT 1>
4713 (?im)\berror\b.+?no.+?definition.+?MyCompAltstepInt
4714 <END_RESULT>
4715 <RESULT IF_PASS COUNT 1>
4716 (?is)\berror:
4717 <END_RESULT>
4718 <RESULT IF_PASS POSITIVE>
4719 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4720 <END_RESULT>
4721
4722 <END_TC>
4723 :exmp.
4724
4725 .*---------------------------------------------------------------------*
4726 :h3.TTCN-3::ScopeUnits-> Altstep_runs_on (timer parameter) -> Function_runs_on
4727 .*---------------------------------------------------------------------*
4728 :xmp tab=0.
4729 <TC - TTCN-3::ScopeUnits-> Altstep_runs_on (timer parameter) -> Function_runs_on>
4730
4731 <COMPILE>
4732 <VERDICT_LEAF PASS>
4733 <MODULE TTCN ModuleA ModuleA.ttcn>
4734 module ModuleA {
4735 type component MyCompType {}
4736 function MyCompFunc() runs on MyCompType {
4737 MyCompAltstepTimer.start;
4738 }
4739 altstep MyCompAltstep( timer MyCompAltstepTimer ) runs on MyCompType {
4740 [] any port.check {};
4741 [else] {};
4742 }
4743 }
4744 <END_MODULE>
4745 <RESULT IF_PASS COUNT 1>
4746 (?im)\berror\b.+?no.+?definition.+?MyCompAltstepTimer
4747 <END_RESULT>
4748 <RESULT IF_PASS COUNT 1>
4749 (?is)\berror:
4750 <END_RESULT>
4751 <RESULT IF_PASS POSITIVE>
4752 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4753 <END_RESULT>
4754
4755 <END_TC>
4756 :exmp.
4757
4758 .*---------------------------------------------------------------------*
4759 :h3.TTCN-3::ScopeUnits-> Altstep_runs_on (value parameter) -> Testcase
4760 .*---------------------------------------------------------------------*
4761 :xmp tab=0.
4762 <TC - TTCN-3::ScopeUnits-> Altstep_runs_on (value parameter) -> Testcase>
4763
4764 <COMPILE>
4765 <VERDICT_LEAF PASS>
4766 <MODULE TTCN ModuleA ModuleA.ttcn>
4767 module ModuleA {
4768 type component MyCompType {}
4769 altstep MyCompAltstep( integer MyCompAltstepInt ) runs on MyCompType {
4770 [] any port.check {};
4771 [else] {};
4772 }
4773 testcase MyTestcase() runs on MyCompType {
4774 var integer MyTestcaseInt := MyCompAltstepInt;
4775 }
4776 }
4777 <END_MODULE>
4778 <RESULT IF_PASS COUNT 1>
4779 (?im)\berror\b.+?no.+?definition.+?MyCompAltstepInt
4780 <END_RESULT>
4781 <RESULT IF_PASS COUNT 1>
4782 (?is)\berror:
4783 <END_RESULT>
4784 <RESULT IF_PASS POSITIVE>
4785 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4786 <END_RESULT>
4787
4788 <END_TC>
4789 :exmp.
4790
4791 .*---------------------------------------------------------------------*
4792 :h3.TTCN-3::ScopeUnits-> Altstep_runs_on (timer parameter) -> Testcase
4793 .*---------------------------------------------------------------------*
4794 :xmp tab=0.
4795 <TC - TTCN-3::ScopeUnits-> Altstep_runs_on (timer parameter) -> Testcase>
4796
4797 <COMPILE>
4798 <VERDICT_LEAF PASS>
4799 <MODULE TTCN ModuleA ModuleA.ttcn>
4800 module ModuleA {
4801 type component MyCompType {}
4802 altstep MyCompAltstep( timer MyCompAltstepTimer ) runs on MyCompType {
4803 [] any port.check {};
4804 [else] {};
4805 }
4806 testcase MyTestcase() runs on MyCompType {
4807 MyCompAltstepTimer.start;
4808 }
4809 }
4810 <END_MODULE>
4811 <RESULT IF_PASS COUNT 1>
4812 (?im)\berror\b.+?no.+?definition.+?MyCompAltstepTimer
4813 <END_RESULT>
4814 <RESULT IF_PASS COUNT 1>
4815 (?is)\berror:
4816 <END_RESULT>
4817 <RESULT IF_PASS POSITIVE>
4818 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4819 <END_RESULT>
4820
4821 <END_TC>
4822 :exmp.
4823
4824 .*---------------------------------------------------------------------*
4825 :h3.TTCN-3::ScopeUnits-> Altstep_runs_on: const definition -> Control part
4826 .*---------------------------------------------------------------------*
4827 :xmp tab=0.
4828 <TC - TTCN-3::ScopeUnits-> Altstep_runs_on: const definition -> Control part>
4829
4830 <COMPILE>
4831 <VERDICT_LEAF PASS>
4832 <MODULE TTCN ModuleA ModuleA.ttcn>
4833 module ModuleA {
4834 type component MyCompType {}
4835 altstep MyCompAltstep() runs on MyCompType {
4836 const integer MyCompAltstepIntConst := 16;
4837 [] any port.check {};
4838 [else] {};
4839 }
4840 control {
4841 const integer MyControlIntConst := MyCompAltstepIntConst;
4842 }
4843 }
4844 <END_MODULE>
4845 <RESULT IF_PASS COUNT 1>
4846 (?im)\berror\b.+?no.+?definition.+?MyCompAltstepIntConst
4847 <END_RESULT>
4848 <RESULT IF_PASS COUNT 1>
4849 (?is)\berror:
4850 <END_RESULT>
4851 <RESULT IF_PASS POSITIVE>
4852 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4853 <END_RESULT>
4854
4855 <END_TC>
4856 :exmp.
4857
4858 .*---------------------------------------------------------------------*
4859 :h3.TTCN-3::ScopeUnits-> Altstep_runs_on: var definition -> Control part
4860 .*---------------------------------------------------------------------*
4861 :xmp tab=0.
4862 <TC - TTCN-3::ScopeUnits-> Altstep_runs_on: var definition -> Control part>
4863
4864 <COMPILE>
4865 <VERDICT_LEAF PASS>
4866 <MODULE TTCN ModuleA ModuleA.ttcn>
4867 module ModuleA {
4868 type component MyCompType {}
4869 altstep MyCompAltstep() runs on MyCompType {
4870 var integer MyCompAltstepInt := 16;
4871 [] any port.check {};
4872 [else] {};
4873 }
4874 control {
4875 var integer MyControlInt := MyCompAltstepInt;
4876 }
4877 }
4878 <END_MODULE>
4879 <RESULT IF_PASS COUNT 1>
4880 (?im)\berror\b.+?no.+?definition.+?MyCompAltstepInt
4881 <END_RESULT>
4882 <RESULT IF_PASS COUNT 1>
4883 (?is)\berror:
4884 <END_RESULT>
4885 <RESULT IF_PASS POSITIVE>
4886 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4887 <END_RESULT>
4888
4889 <END_TC>
4890 :exmp.
4891
4892 .*---------------------------------------------------------------------*
4893 :h3.TTCN-3::ScopeUnits-> Altstep_runs_on: timer definition -> Control part
4894 .*---------------------------------------------------------------------*
4895 :xmp tab=0.
4896 <TC - TTCN-3::ScopeUnits-> Altstep_runs_on: timer definition -> Control part>
4897
4898 <COMPILE>
4899 <VERDICT_LEAF PASS>
4900 <MODULE TTCN ModuleA ModuleA.ttcn>
4901 module ModuleA {
4902 type component MyCompType {}
4903 altstep MyCompAltstep() runs on MyCompType {
4904 timer MyCompAltstepTimer := 16.7;
4905 [] any port.check {};
4906 [else] {};
4907 }
4908 control {
4909 MyCompAltstepTimer.start;
4910 }
4911 }
4912 <END_MODULE>
4913 <RESULT IF_PASS COUNT 1>
4914 (?im)\berror\b.+?no.+?definition.+?MyCompAltstepTimer
4915 <END_RESULT>
4916 <RESULT IF_PASS COUNT 1>
4917 (?is)\berror:
4918 <END_RESULT>
4919 <RESULT IF_PASS POSITIVE>
4920 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4921 <END_RESULT>
4922
4923 <END_TC>
4924 :exmp.
4925
4926 .*---------------------------------------------------------------------*
4927 :h3.TTCN-3::ScopeUnits-> Altstep_runs_on: const definition -> Function
4928 .*---------------------------------------------------------------------*
4929 :xmp tab=0.
4930 <TC - TTCN-3::ScopeUnits-> Altstep_runs_on: const definition -> Function>
4931
4932 <COMPILE>
4933 <VERDICT_LEAF PASS>
4934 <MODULE TTCN ModuleA ModuleA.ttcn>
4935 module ModuleA {
4936 type component MyCompType {}
4937 altstep MyCompAltstep() runs on MyCompType {
4938 const integer MyCompAltstepIntConst := 16;
4939 [] any port.check {};
4940 [else] {};
4941 }
4942 function MyFunc() return integer {
4943 return MyCompAltstepIntConst;
4944 }
4945 }
4946 <END_MODULE>
4947 <RESULT IF_PASS COUNT 1>
4948 (?im)\berror\b.+?no.+?definition.+?MyCompAltstepIntConst
4949 <END_RESULT>
4950 <RESULT IF_PASS COUNT 1>
4951 (?is)\berror:
4952 <END_RESULT>
4953 <RESULT IF_PASS POSITIVE>
4954 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4955 <END_RESULT>
4956
4957 <END_TC>
4958 :exmp.
4959
4960 .*---------------------------------------------------------------------*
4961 :h3.TTCN-3::ScopeUnits-> Altstep_runs_on: var definition -> Function
4962 .*---------------------------------------------------------------------*
4963 :xmp tab=0.
4964 <TC - TTCN-3::ScopeUnits-> Altstep_runs_on: var definition -> Function>
4965
4966 <COMPILE>
4967 <VERDICT_LEAF PASS>
4968 <MODULE TTCN ModuleA ModuleA.ttcn>
4969 module ModuleA {
4970 type component MyCompType {}
4971 altstep MyCompAltstep() runs on MyCompType {
4972 var integer MyCompAltstepInt := 16;
4973 [] any port.check {};
4974 [else] {};
4975 }
4976 function MyFunc() return integer {
4977 return MyCompAltstepInt;
4978 }
4979 }
4980 <END_MODULE>
4981 <RESULT IF_PASS COUNT 1>
4982 (?im)\berror\b.+?no.+?definition.+?MyCompAltstepInt
4983 <END_RESULT>
4984 <RESULT IF_PASS COUNT 1>
4985 (?is)\berror:
4986 <END_RESULT>
4987 <RESULT IF_PASS POSITIVE>
4988 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4989 <END_RESULT>
4990
4991 <END_TC>
4992 :exmp.
4993
4994 .*---------------------------------------------------------------------*
4995 :h3.TTCN-3::ScopeUnits-> Altstep_runs_on: timer definition -> Function
4996 .*---------------------------------------------------------------------*
4997 :xmp tab=0.
4998 <TC - TTCN-3::ScopeUnits-> Altstep_runs_on: timer definition -> Function>
4999
5000 <COMPILE>
5001 <VERDICT_LEAF PASS>
5002 <MODULE TTCN ModuleA ModuleA.ttcn>
5003 module ModuleA {
5004 type component MyCompType {}
5005 altstep MyCompAltstep() runs on MyCompType {
5006 timer MyCompAltstepTimer := 16.8;
5007 [] any port.check {};
5008 [else] {};
5009 }
5010 function MyFunc() {
5011 MyCompAltstepTimer.start;
5012 }
5013 }
5014 <END_MODULE>
5015 <RESULT IF_PASS COUNT 1>
5016 (?im)\berror\b.+?no.+?definition.+?MyCompAltstepTimer
5017 <END_RESULT>
5018 <RESULT IF_PASS COUNT 1>
5019 (?is)\berror:
5020 <END_RESULT>
5021 <RESULT IF_PASS POSITIVE>
5022 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5023 <END_RESULT>
5024
5025 <END_TC>
5026 :exmp.
5027
5028 .*---------------------------------------------------------------------*
5029 :h3.TTCN-3::ScopeUnits-> Altstep_runs_on: const definition -> Altstep
5030 .*---------------------------------------------------------------------*
5031 :xmp tab=0.
5032 <TC - TTCN-3::ScopeUnits-> Altstep_runs_on: const definition -> Altstep>
5033
5034 <COMPILE>
5035 <VERDICT_LEAF PASS>
5036 <MODULE TTCN ModuleA ModuleA.ttcn>
5037 module ModuleA {
5038 type component MyCompType {}
5039 altstep MyCompAltstep () runs on MyCompType {
5040 const integer MyCompAltstepIntConst := 16;
5041 [] any port.check {};
5042 [else] {};
5043 }
5044 altstep MyAltstep () {
5045 const integer MyAltstepIntConst := MyCompAltstepIntConst;
5046 [] any port.check {};
5047 [else] {};
5048 }
5049 }
5050 <END_MODULE>
5051 <RESULT IF_PASS COUNT 1>
5052 (?im)\berror\b.+?no.+?definition.+?MyCompAltstepIntConst
5053 <END_RESULT>
5054 <RESULT IF_PASS COUNT 1>
5055 (?is)\berror:
5056 <END_RESULT>
5057 <RESULT IF_PASS POSITIVE>
5058 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5059 <END_RESULT>
5060
5061 <END_TC>
5062 :exmp.
5063
5064 .*---------------------------------------------------------------------*
5065 :h3.TTCN-3::ScopeUnits-> Altstep_runs_on: var definition -> Altstep
5066 .*---------------------------------------------------------------------*
5067 :xmp tab=0.
5068 <TC - TTCN-3::ScopeUnits-> Altstep_runs_on: var definition -> Altstep>
5069
5070 <COMPILE>
5071 <VERDICT_LEAF PASS>
5072 <MODULE TTCN ModuleA ModuleA.ttcn>
5073 module ModuleA {
5074 type component MyCompType {}
5075 altstep MyCompAltstep () runs on MyCompType {
5076 var integer MyCompAltstepInt := 16;
5077 [] any port.check {};
5078 [else] {};
5079 }
5080 altstep MyAltstep () {
5081 var integer MyAltstepInt := MyCompAltstepInt;
5082 [] any port.check {};
5083 [else] {};
5084 }
5085 }
5086 <END_MODULE>
5087 <RESULT IF_PASS COUNT 1>
5088 (?im)\berror\b.+?no.+?definition.+?MyCompAltstepInt
5089 <END_RESULT>
5090 <RESULT IF_PASS COUNT 1>
5091 (?is)\berror:
5092 <END_RESULT>
5093 <RESULT IF_PASS POSITIVE>
5094 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5095 <END_RESULT>
5096
5097 <END_TC>
5098 :exmp.
5099
5100 .*---------------------------------------------------------------------*
5101 :h3.TTCN-3::ScopeUnits-> Altstep_runs_on: timer definition -> Altstep
5102 .*---------------------------------------------------------------------*
5103 :xmp tab=0.
5104 <TC - TTCN-3::ScopeUnits-> Altstep_runs_on: timer definition -> Altstep>
5105
5106 <COMPILE>
5107 <VERDICT_LEAF PASS>
5108 <MODULE TTCN ModuleA ModuleA.ttcn>
5109 module ModuleA {
5110 type component MyCompType {}
5111 altstep MyCompAltstep () runs on MyCompType {
5112 timer MyCompAltstepTimer := 16.9;
5113 [] any port.check {};
5114 [else] {};
5115 }
5116 altstep MyAltstep () {
5117 [] MyCompAltstepTimer.timeout {};
5118 [else] {};
5119 }
5120 }
5121 <END_MODULE>
5122 <RESULT IF_PASS COUNT 1>
5123 (?im)\berror\b.+?no.+?definition.+?MyCompAltstepTimer
5124 <END_RESULT>
5125 <RESULT IF_PASS COUNT 1>
5126 (?is)\berror:
5127 <END_RESULT>
5128 <RESULT IF_PASS POSITIVE>
5129 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5130 <END_RESULT>
5131
5132 <END_TC>
5133 :exmp.
5134
5135 .*---------------------------------------------------------------------*
5136 :h3.TTCN-3::ScopeUnits-> Altstep_runs_on: const definition -> Function_runs_on
5137 .*---------------------------------------------------------------------*
5138 :xmp tab=0.
5139 <TC - TTCN-3::ScopeUnits-> Altstep_runs_on: const definition -> Function_runs_on>
5140
5141 <COMPILE>
5142 <VERDICT_LEAF PASS>
5143 <MODULE TTCN ModuleA ModuleA.ttcn>
5144 module ModuleA {
5145 type component MyCompType {}
5146 function MyCompFunc() runs on MyCompType {
5147 const integer MyCompFuncIntConst := MyCompAltstepIntConst;
5148 }
5149 altstep MyCompAltstep() runs on MyCompType {
5150 const integer MyCompAltstepIntConst := 16;
5151 [] any port.check {};
5152 [else] {};
5153 }
5154 }
5155 <END_MODULE>
5156 <RESULT IF_PASS COUNT 1>
5157 (?im)\berror\b.+?no.+?definition.+?MyCompAltstepIntConst
5158 <END_RESULT>
5159 <RESULT IF_PASS COUNT 1>
5160 (?is)\berror:
5161 <END_RESULT>
5162 <RESULT IF_PASS POSITIVE>
5163 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5164 <END_RESULT>
5165
5166 <END_TC>
5167 :exmp.
5168
5169 .*---------------------------------------------------------------------*
5170 :h3.TTCN-3::ScopeUnits-> Altstep_runs_on: var definition -> Function_runs_on
5171 .*---------------------------------------------------------------------*
5172 :xmp tab=0.
5173 <TC - TTCN-3::ScopeUnits-> Altstep_runs_on: var definition -> Function_runs_on>
5174
5175 <COMPILE>
5176 <VERDICT_LEAF PASS>
5177 <MODULE TTCN ModuleA ModuleA.ttcn>
5178 module ModuleA {
5179 type component MyCompType {}
5180 function MyCompFunc() runs on MyCompType {
5181 var integer MyCompFuncInt := MyCompAltstepInt;
5182 }
5183 altstep MyCompAltstep() runs on MyCompType {
5184 var integer MyCompAltstepInt := 16;
5185 [] any port.check {};
5186 [else] {};
5187 }
5188 }
5189 <END_MODULE>
5190 <RESULT IF_PASS COUNT 1>
5191 (?im)\berror\b.+?no.+?definition.+?MyCompAltstepInt
5192 <END_RESULT>
5193 <RESULT IF_PASS COUNT 1>
5194 (?is)\berror:
5195 <END_RESULT>
5196 <RESULT IF_PASS POSITIVE>
5197 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5198 <END_RESULT>
5199
5200 <END_TC>
5201 :exmp.
5202
5203 .*---------------------------------------------------------------------*
5204 :h3.TTCN-3::ScopeUnits-> Altstep_runs_on: timer definition -> Function_runs_on
5205 .*---------------------------------------------------------------------*
5206 :xmp tab=0.
5207 <TC - TTCN-3::ScopeUnits-> Altstep_runs_on: timer definition -> Function_runs_on>
5208
5209 <COMPILE>
5210 <VERDICT_LEAF PASS>
5211 <MODULE TTCN ModuleA ModuleA.ttcn>
5212 module ModuleA {
5213 type component MyCompType {}
5214 function MyCompFunc() runs on MyCompType {
5215 MyCompAltstepTimer.start;
5216 }
5217 altstep MyCompAltstep() runs on MyCompType {
5218 timer MyCompAltstepTimer := 16.3;
5219 [] any port.check {};
5220 [else] {};
5221 }
5222 }
5223 <END_MODULE>
5224 <RESULT IF_PASS COUNT 1>
5225 (?im)\berror\b.+?no.+?definition.+?MyCompAltstepTimer
5226 <END_RESULT>
5227 <RESULT IF_PASS COUNT 1>
5228 (?is)\berror:
5229 <END_RESULT>
5230 <RESULT IF_PASS POSITIVE>
5231 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5232 <END_RESULT>
5233
5234 <END_TC>
5235 :exmp.
5236
5237 .*---------------------------------------------------------------------*
5238 :h3.TTCN-3::ScopeUnits-> Altstep_runs_on: const definition -> Testcase
5239 .*---------------------------------------------------------------------*
5240 :xmp tab=0.
5241 <TC - TTCN-3::ScopeUnits-> Altstep_runs_on: const definition -> Testcase>
5242
5243 <COMPILE>
5244 <VERDICT_LEAF PASS>
5245 <MODULE TTCN ModuleA ModuleA.ttcn>
5246 module ModuleA {
5247 type component MyCompType {}
5248 altstep MyCompAltstep() runs on MyCompType {
5249 const integer MyCompAltstepIntConst := 16;
5250 [] any port.check {};
5251 [else] {};
5252 }
5253 testcase MyTestcase() runs on MyCompType {
5254 const integer MyTestcaseIntConst := MyCompAltstepIntConst;
5255 }
5256 }
5257 <END_MODULE>
5258 <RESULT IF_PASS COUNT 1>
5259 (?im)\berror\b.+?no.+?definition.+?MyCompAltstepIntConst
5260 <END_RESULT>
5261 <RESULT IF_PASS COUNT 1>
5262 (?is)\berror:
5263 <END_RESULT>
5264 <RESULT IF_PASS POSITIVE>
5265 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5266 <END_RESULT>
5267
5268 <END_TC>
5269 :exmp.
5270
5271 .*---------------------------------------------------------------------*
5272 :h3.TTCN-3::ScopeUnits-> Altstep_runs_on: var definition -> Testcase
5273 .*---------------------------------------------------------------------*
5274 :xmp tab=0.
5275 <TC - TTCN-3::ScopeUnits-> Altstep_runs_on: var definition -> Testcase>
5276
5277 <COMPILE>
5278 <VERDICT_LEAF PASS>
5279 <MODULE TTCN ModuleA ModuleA.ttcn>
5280 module ModuleA {
5281 type component MyCompType {}
5282 altstep MyCompAltstep() runs on MyCompType {
5283 var integer MyCompAltstepInt := 16;
5284 [] any port.check {};
5285 [else] {};
5286 }
5287 testcase MyTestcase() runs on MyCompType {
5288 var integer MyTestcaseInt := MyCompAltstepInt;
5289 }
5290 }
5291 <END_MODULE>
5292 <RESULT IF_PASS COUNT 1>
5293 (?im)\berror\b.+?no.+?definition.+?MyCompAltstepInt
5294 <END_RESULT>
5295 <RESULT IF_PASS COUNT 1>
5296 (?is)\berror:
5297 <END_RESULT>
5298 <RESULT IF_PASS POSITIVE>
5299 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5300 <END_RESULT>
5301
5302 <END_TC>
5303 :exmp.
5304
5305 .*---------------------------------------------------------------------*
5306 :h3.TTCN-3::ScopeUnits-> Altstep_runs_on: timer definition -> Testcase
5307 .*---------------------------------------------------------------------*
5308 :xmp tab=0.
5309 <TC - TTCN-3::ScopeUnits-> Altstep_runs_on: timer definition -> Testcase>
5310
5311 <COMPILE>
5312 <VERDICT_LEAF PASS>
5313 <MODULE TTCN ModuleA ModuleA.ttcn>
5314 module ModuleA {
5315 type component MyCompType {}
5316 altstep MyCompAltstep() runs on MyCompType {
5317 timer MyCompAltstepTimer := 16.2;
5318 [] any port.check {};
5319 [else] {};
5320 }
5321 testcase MyTestcase() runs on MyCompType {
5322 MyCompAltstepTimer.start;
5323 }
5324 }
5325 <END_MODULE>
5326 <RESULT IF_PASS COUNT 1>
5327 (?im)\berror\b.+?no.+?definition.+?MyCompAltstepTimer
5328 <END_RESULT>
5329 <RESULT IF_PASS COUNT 1>
5330 (?is)\berror:
5331 <END_RESULT>
5332 <RESULT IF_PASS POSITIVE>
5333 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5334 <END_RESULT>
5335
5336 <END_TC>
5337 :exmp.
5338
5339 .*---------------------------------------------------------------------*
5340 :h3.TTCN-3::ScopeUnits-> Testcase: embedded case -- const definition
5341 .*---------------------------------------------------------------------*
5342 :xmp tab=0.
5343 <TC - TTCN-3::ScopeUnits-> Testcase: embedded case -- const definition>
5344
5345 <COMPILE>
5346 <VERDICT_LEAF PASS>
5347 <MODULE TTCN ModuleA ModuleA.ttcn>
5348 module ModuleA {
5349 type component MyCompType {}
5350 testcase MyTestcase() runs on MyCompType {
5351 if ( true ) {
5352 const integer MyTestcaseIntConstE := 25;
5353 }
5354 if ( MyTestcaseIntConstE == 0 ) {};
5355 }
5356 }
5357 <END_MODULE>
5358 <RESULT IF_PASS COUNT 1>
5359 (?im)\berror\b.+?no.+?definition.+?MyTestcaseIntConstE
5360 <END_RESULT>
5361 <RESULT IF_PASS COUNT 1>
5362 (?is)\berror:
5363 <END_RESULT>
5364 <RESULT IF_PASS POSITIVE>
5365 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5366 <END_RESULT>
5367
5368 <END_TC>
5369 :exmp.
5370
5371 .*---------------------------------------------------------------------*
5372 :h3.TTCN-3::ScopeUnits-> Testcase: embedded case -- var definition
5373 .*---------------------------------------------------------------------*
5374 :xmp tab=0.
5375 <TC - TTCN-3::ScopeUnits-> Testcase: embedded case -- var definition>
5376
5377 <COMPILE>
5378 <VERDICT_LEAF PASS>
5379 <MODULE TTCN ModuleA ModuleA.ttcn>
5380 module ModuleA {
5381 type component MyCompType {}
5382 testcase MyTestcase() runs on MyCompType {
5383 if ( true ) {
5384 var integer MyTestcaseIntE := 25;
5385 }
5386 if ( MyTestcaseIntE == 0 ) {};
5387 }
5388 }
5389 <END_MODULE>
5390 <RESULT IF_PASS COUNT 1>
5391 (?im)\berror\b.+?no.+?definition.+?MyTestcaseIntE
5392 <END_RESULT>
5393 <RESULT IF_PASS COUNT 1>
5394 (?is)\berror:
5395 <END_RESULT>
5396 <RESULT IF_PASS POSITIVE>
5397 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5398 <END_RESULT>
5399
5400 <END_TC>
5401 :exmp.
5402
5403 .*---------------------------------------------------------------------*
5404 :h3.TTCN-3::ScopeUnits-> Testcase: embedded case -- timer definition
5405 .*---------------------------------------------------------------------*
5406 :xmp tab=0.
5407 <TC - TTCN-3::ScopeUnits-> Testcase: embedded case -- timer definition>
5408
5409 <COMPILE>
5410 <VERDICT_LEAF PASS>
5411 <MODULE TTCN ModuleA ModuleA.ttcn>
5412 module ModuleA {
5413 type component MyCompType {}
5414 testcase MyTestcase() runs on MyCompType {
5415 if ( true ) {
5416 timer MyTestcaseTimerE := 25.9;
5417 }
5418 MyTestcaseTimerE.start;
5419 }
5420 }
5421 <END_MODULE>
5422 <RESULT IF_PASS COUNT 1>
5423 (?im)\berror\b.+?no.+?definition.+?MyTestcaseTimerE
5424 <END_RESULT>
5425 <RESULT IF_PASS COUNT 1>
5426 (?is)\berror:
5427 <END_RESULT>
5428 <RESULT IF_PASS POSITIVE>
5429 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5430 <END_RESULT>
5431
5432 <END_TC>
5433 :exmp.
5434
5435 .*---------------------------------------------------------------------*
5436 :h3.TTCN-3::ScopeUnits-> Testcase: const definition -> Component type
5437 .*---------------------------------------------------------------------*
5438 :xmp tab=0.
5439 <TC - TTCN-3::ScopeUnits-> Testcase: const definition -> Component type>
5440
5441 <COMPILE>
5442 <VERDICT_LEAF PASS>
5443 <MODULE TTCN ModuleA ModuleA.ttcn>
5444 module ModuleA {
5445 type component MyCompType {
5446 const integer MyComponentIntConst := MyTestcaseIntConst;
5447 }
5448 testcase MyTestcase() runs on MyCompType {
5449 const integer MyTestcaseIntConst := 25;
5450 }
5451 }
5452 <END_MODULE>
5453 <RESULT IF_PASS COUNT 1>
5454 (?im)\berror\b.+?no.+?definition.+?MyTestcaseIntConst
5455 <END_RESULT>
5456 <RESULT IF_PASS COUNT 1>
5457 (?is)\berror:
5458 <END_RESULT>
5459 <RESULT IF_PASS POSITIVE>
5460 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5461 <END_RESULT>
5462
5463 <END_TC>
5464 :exmp.
5465
5466 .*---------------------------------------------------------------------*
5467 :h3.TTCN-3::ScopeUnits-> Testcase: var definition -> Component type
5468 .*---------------------------------------------------------------------*
5469 NOTE:
5470 :nl.The implementation does not support the variable initialized with
5471 :nl.another variable in the component type (but it would be possible
5472 :nl.according to TTCN-3 specification ).
5473
5474 :xmp tab=0.
5475
5476 <TC - TTCN-3::ScopeUnits-> Testcase: var definition -> Component type>
5477
5478 <COMPILE>
5479 <VERDICT_LEAF PASS>
5480 <MODULE TTCN ModuleA ModuleA.ttcn>
5481 module ModuleA {
5482 type component MyCompType {
5483 var integer MyComponentInt := MyTestcaseInt;
5484 }
5485 testcase MyTestcase() runs on MyCompType {
5486 var integer MyTestcaseInt := 25;
5487 }
5488 }
5489 <END_MODULE>
5490 <RESULT IF_PASS COUNT 1>
5491 (?im)\berror\b.+?no.+?definition.+?MyTestcaseInt
5492 <END_RESULT>
5493 <RESULT IF_PASS COUNT 1>
5494 (?is)\berror:
5495 <END_RESULT>
5496 <RESULT IF_PASS POSITIVE>
5497 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5498 <END_RESULT>
5499
5500 <END_TC>
5501 :exmp.
5502
5503 .*---------------------------------------------------------------------*
5504 :h3.TTCN-3::ScopeUnits-> Testcase (value parameter) -> Component type
5505 .*---------------------------------------------------------------------*
5506 NOTE:
5507 :nl.The implementation does not support the variable initialized with
5508 :nl.another variable in the component type (but it would be possible
5509 :nl.according to TTCN-3 specification ).
5510
5511 :xmp tab=0.
5512
5513 <TC - TTCN-3::ScopeUnits-> Testcase (value parameter) -> Component type>
5514
5515 <COMPILE>
5516 <VERDICT_LEAF PASS>
5517 <MODULE TTCN ModuleA ModuleA.ttcn>
5518 module ModuleA {
5519 type component MyCompType {
5520 var integer MyComponentInt := MyTestcaseInt;
5521 }
5522 testcase MyTestcase( integer MyTestcaseInt ) runs on MyCompType {}
5523 }
5524 <END_MODULE>
5525 <RESULT IF_PASS COUNT 1>
5526 (?im)\berror\b.+?no.+?definition.+?MyTestcaseInt
5527 <END_RESULT>
5528 <RESULT IF_PASS COUNT 1>
5529 (?is)\berror:
5530 <END_RESULT>
5531 <RESULT IF_PASS POSITIVE>
5532 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5533 <END_RESULT>
5534
5535 <END_TC>
5536 :exmp.
5537
5538 .*---------------------------------------------------------------------*
5539 :h3.TTCN-3::ScopeUnits-> Testcase (value parameter) -> Control part
5540 .*---------------------------------------------------------------------*
5541 :xmp tab=0.
5542 <TC - TTCN-3::ScopeUnits-> Testcase (value parameter) -> Control part>
5543
5544 <COMPILE>
5545 <VERDICT_LEAF PASS>
5546 <MODULE TTCN ModuleA ModuleA.ttcn>
5547 module ModuleA {
5548 type component MyCompType {}
5549 testcase MyTestcase( integer MyTestcaseInt ) runs on MyCompType {}
5550 control {
5551 var integer MyControlInt := MyTestcaseInt;
5552 }
5553 }
5554 <END_MODULE>
5555 <RESULT IF_PASS COUNT 1>
5556 (?im)\berror\b.+?no.+?definition.+?MyTestcaseInt
5557 <END_RESULT>
5558 <RESULT IF_PASS COUNT 1>
5559 (?is)\berror:
5560 <END_RESULT>
5561 <RESULT IF_PASS POSITIVE>
5562 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5563 <END_RESULT>
5564
5565 <END_TC>
5566 :exmp.
5567
5568 .*---------------------------------------------------------------------*
5569 :h3.TTCN-3::ScopeUnits-> Testcase (value parameter) -> Function
5570 .*---------------------------------------------------------------------*
5571 :xmp tab=0.
5572 <TC - TTCN-3::ScopeUnits-> Testcase (value parameter) -> Function>
5573
5574 <COMPILE>
5575 <VERDICT_LEAF PASS>
5576 <MODULE TTCN ModuleA ModuleA.ttcn>
5577 module ModuleA {
5578 type component MyCompType {}
5579 testcase MyTestcase( integer MyTestcaseInt ) runs on MyCompType {}
5580 function MyFunc() return integer {
5581 return MyTestcaseInt;
5582 }
5583 }
5584 <END_MODULE>
5585 <RESULT IF_PASS COUNT 1>
5586 (?im)\berror\b.+?no.+?definition.+?MyTestcaseInt
5587 <END_RESULT>
5588 <RESULT IF_PASS COUNT 1>
5589 (?is)\berror:
5590 <END_RESULT>
5591 <RESULT IF_PASS POSITIVE>
5592 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5593 <END_RESULT>
5594
5595 <END_TC>
5596 :exmp.
5597
5598 .*---------------------------------------------------------------------*
5599 :h3.TTCN-3::ScopeUnits-> Testcase (value parameter) -> Altstep
5600 .*---------------------------------------------------------------------*
5601 :xmp tab=0.
5602 <TC - TTCN-3::ScopeUnits-> Testcase (value parameter) -> Altstep>
5603
5604 <COMPILE>
5605 <VERDICT_LEAF PASS>
5606 <MODULE TTCN ModuleA ModuleA.ttcn>
5607 module ModuleA {
5608 type component MyCompType {}
5609 testcase MyTestcase( integer MyTestcaseInt ) runs on MyCompType {}
5610 altstep MyAltstep () {
5611 var integer MyAltstepInt := MyTestcaseInt;
5612 [] any port.check {};
5613 [else] {};
5614 }
5615 }
5616 <END_MODULE>
5617 <RESULT IF_PASS COUNT 1>
5618 (?im)\berror\b.+?no.+?definition.+?MyTestcaseInt
5619 <END_RESULT>
5620 <RESULT IF_PASS COUNT 1>
5621 (?is)\berror:
5622 <END_RESULT>
5623 <RESULT IF_PASS POSITIVE>
5624 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5625 <END_RESULT>
5626
5627 <END_TC>
5628 :exmp.
5629
5630 .*---------------------------------------------------------------------*
5631 :h3.TTCN-3::ScopeUnits-> Testcase (value parameter) -> Function_runs_on
5632 .*---------------------------------------------------------------------*
5633 :xmp tab=0.
5634 <TC - TTCN-3::ScopeUnits-> Testcase (value parameter) -> Function_runs_on>
5635
5636 <COMPILE>
5637 <VERDICT_LEAF PASS>
5638 <MODULE TTCN ModuleA ModuleA.ttcn>
5639 module ModuleA {
5640 type component MyCompType {}
5641 function MyCompFunc() runs on MyCompType return integer {
5642 return MyTestcaseInt;
5643 }
5644 testcase MyTestcase( integer MyTestcaseInt ) runs on MyCompType {}
5645 }
5646 <END_MODULE>
5647 <RESULT IF_PASS COUNT 1>
5648 (?im)\berror\b.+?no.+?definition.+?MyTestcaseInt
5649 <END_RESULT>
5650 <RESULT IF_PASS COUNT 1>
5651 (?is)\berror:
5652 <END_RESULT>
5653 <RESULT IF_PASS POSITIVE>
5654 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5655 <END_RESULT>
5656
5657 <END_TC>
5658 :exmp.
5659
5660 .*---------------------------------------------------------------------*
5661 :h3.TTCN-3::ScopeUnits-> Testcase (value parameter) -> Altstep_runs_on
5662 .*---------------------------------------------------------------------*
5663 :xmp tab=0.
5664 <TC - TTCN-3::ScopeUnits-> Testcase (value parameter) -> Altstep_runs_on>
5665
5666 <COMPILE>
5667 <VERDICT_LEAF PASS>
5668 <MODULE TTCN ModuleA ModuleA.ttcn>
5669 module ModuleA {
5670 type component MyCompType {}
5671 testcase MyTestcase( integer MyTestcaseInt ) runs on MyCompType {}
5672 altstep MyCompAltstep() runs on MyCompType {
5673 var integer MyCompAltstepInt := MyTestcaseInt;
5674 [] any port.check {};
5675 [else] {};
5676 }
5677 }
5678 <END_MODULE>
5679 <RESULT IF_PASS COUNT 1>
5680 (?im)\berror\b.+?no.+?definition.+?MyTestcaseInt
5681 <END_RESULT>
5682 <RESULT IF_PASS COUNT 1>
5683 (?is)\berror:
5684 <END_RESULT>
5685 <RESULT IF_PASS POSITIVE>
5686 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5687 <END_RESULT>
5688
5689 <END_TC>
5690 :exmp.
5691
5692 .*---------------------------------------------------------------------*
5693 :h3.TTCN-3::ScopeUnits-> Testcase: const definition -> Control part
5694 .*---------------------------------------------------------------------*
5695 :xmp tab=0.
5696 <TC - TTCN-3::ScopeUnits-> Testcase: const definition -> Control part>
5697
5698 <COMPILE>
5699 <VERDICT_LEAF PASS>
5700 <MODULE TTCN ModuleA ModuleA.ttcn>
5701 module ModuleA {
5702 type component MyCompType {}
5703 testcase MyTestcase() runs on MyCompType {
5704 const integer MyTestcaseIntConst := 25;
5705 }
5706 control {
5707 const integer MyControlIntConst := MyTestcaseIntConst;
5708 }
5709 }
5710 <END_MODULE>
5711 <RESULT IF_PASS COUNT 1>
5712 (?im)\berror\b.+?no.+?definition.+?MyTestcaseIntConst
5713 <END_RESULT>
5714 <RESULT IF_PASS COUNT 1>
5715 (?is)\berror:
5716 <END_RESULT>
5717 <RESULT IF_PASS POSITIVE>
5718 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5719 <END_RESULT>
5720
5721 <END_TC>
5722 :exmp.
5723
5724 .*---------------------------------------------------------------------*
5725 :h3.TTCN-3::ScopeUnits-> Testcase: var definition -> Control part
5726 .*---------------------------------------------------------------------*
5727 :xmp tab=0.
5728 <TC - TTCN-3::ScopeUnits-> Testcase: var definition -> Control part>
5729
5730 <COMPILE>
5731 <VERDICT_LEAF PASS>
5732 <MODULE TTCN ModuleA ModuleA.ttcn>
5733 module ModuleA {
5734 type component MyCompType {}
5735 testcase MyTestcase() runs on MyCompType {
5736 var integer MyTestcaseInt := 25;
5737 }
5738 control {
5739 var integer MyControlInt := MyTestcaseInt;
5740 }
5741 }
5742 <END_MODULE>
5743 <RESULT IF_PASS COUNT 1>
5744 (?im)\berror\b.+?no.+?definition.+?MyTestcaseInt
5745 <END_RESULT>
5746 <RESULT IF_PASS COUNT 1>
5747 (?is)\berror:
5748 <END_RESULT>
5749 <RESULT IF_PASS POSITIVE>
5750 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5751 <END_RESULT>
5752
5753 <END_TC>
5754 :exmp.
5755
5756 .*---------------------------------------------------------------------*
5757 :h3.TTCN-3::ScopeUnits-> Testcase: timer definition -> Control part
5758 .*---------------------------------------------------------------------*
5759 :xmp tab=0.
5760 <TC - TTCN-3::ScopeUnits-> Testcase: timer definition -> Control part>
5761
5762 <COMPILE>
5763 <VERDICT_LEAF PASS>
5764 <MODULE TTCN ModuleA ModuleA.ttcn>
5765 module ModuleA {
5766 type component MyCompType {}
5767 testcase MyTestcase() runs on MyCompType {
5768 timer MyTestcaseTimer := 25.5;
5769 }
5770 control {
5771 MyTestcaseTimer.start;
5772 }
5773 }
5774 <END_MODULE>
5775 <RESULT IF_PASS COUNT 1>
5776 (?im)\berror\b.+?no.+?definition.+?MyTestcaseTimer
5777 <END_RESULT>
5778 <RESULT IF_PASS COUNT 1>
5779 (?is)\berror:
5780 <END_RESULT>
5781 <RESULT IF_PASS POSITIVE>
5782 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5783 <END_RESULT>
5784
5785 <END_TC>
5786 :exmp.
5787
5788 .*---------------------------------------------------------------------*
5789 :h3.TTCN-3::ScopeUnits-> Testcase: const definition -> Function
5790 .*---------------------------------------------------------------------*
5791 :xmp tab=0.
5792 <TC - TTCN-3::ScopeUnits-> Testcase: const definition -> Function>
5793
5794 <COMPILE>
5795 <VERDICT_LEAF PASS>
5796 <MODULE TTCN ModuleA ModuleA.ttcn>
5797 module ModuleA {
5798 type component MyCompType {}
5799 testcase MyTestcase() runs on MyCompType {
5800 const integer MyTestcaseIntConst := 25;
5801 }
5802 function MyFunc() return integer {
5803 return MyTestcaseIntConst;
5804 }
5805 }
5806 <END_MODULE>
5807 <RESULT IF_PASS COUNT 1>
5808 (?im)\berror\b.+?no.+?definition.+?MyTestcaseIntConst
5809 <END_RESULT>
5810 <RESULT IF_PASS COUNT 1>
5811 (?is)\berror:
5812 <END_RESULT>
5813 <RESULT IF_PASS POSITIVE>
5814 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5815 <END_RESULT>
5816
5817 <END_TC>
5818 :exmp.
5819
5820 .*---------------------------------------------------------------------*
5821 :h3.TTCN-3::ScopeUnits-> Testcase: var definition -> Function
5822 .*---------------------------------------------------------------------*
5823 :xmp tab=0.
5824 <TC - TTCN-3::ScopeUnits-> Testcase: var definition -> Function>
5825
5826 <COMPILE>
5827 <VERDICT_LEAF PASS>
5828 <MODULE TTCN ModuleA ModuleA.ttcn>
5829 module ModuleA {
5830 type component MyCompType {}
5831 testcase MyTestcase() runs on MyCompType {
5832 var integer MyTestcaseInt := 25;
5833 }
5834 function MyFunc() return integer {
5835 return MyTestcaseInt;
5836 }
5837 }
5838 <END_MODULE>
5839 <RESULT IF_PASS COUNT 1>
5840 (?im)\berror\b.+?no.+?definition.+?MyTestcaseInt
5841 <END_RESULT>
5842 <RESULT IF_PASS COUNT 1>
5843 (?is)\berror:
5844 <END_RESULT>
5845 <RESULT IF_PASS POSITIVE>
5846 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5847 <END_RESULT>
5848
5849 <END_TC>
5850 :exmp.
5851
5852 .*---------------------------------------------------------------------*
5853 :h3.TTCN-3::ScopeUnits-> Testcase: timer definition -> Function
5854 .*---------------------------------------------------------------------*
5855 :xmp tab=0.
5856 <TC - TTCN-3::ScopeUnits-> Testcase: timer definition -> Function>
5857
5858 <COMPILE>
5859 <VERDICT_LEAF PASS>
5860 <MODULE TTCN ModuleA ModuleA.ttcn>
5861 module ModuleA {
5862 type component MyCompType {}
5863 testcase MyTestcase() runs on MyCompType {
5864 timer MyTestcaseTimer := 25.8;
5865 }
5866 function MyFunc() {
5867 MyTestcaseTimer.start;
5868 }
5869 }
5870 <END_MODULE>
5871 <RESULT IF_PASS COUNT 1>
5872 (?im)\berror\b.+?no.+?definition.+?MyTestcaseTimer
5873 <END_RESULT>
5874 <RESULT IF_PASS COUNT 1>
5875 (?is)\berror:
5876 <END_RESULT>
5877 <RESULT IF_PASS POSITIVE>
5878 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5879 <END_RESULT>
5880
5881 <END_TC>
5882 :exmp.
5883
5884 .*---------------------------------------------------------------------*
5885 :h3.TTCN-3::ScopeUnits-> Testcase: const definition -> Altstep
5886 .*---------------------------------------------------------------------*
5887 :xmp tab=0.
5888 <TC - TTCN-3::ScopeUnits-> Testcase: const definition -> Altstep>
5889
5890 <COMPILE>
5891 <VERDICT_LEAF PASS>
5892 <MODULE TTCN ModuleA ModuleA.ttcn>
5893 module ModuleA {
5894 type component MyCompType {}
5895 testcase MyTestcase() runs on MyCompType {
5896 const integer MyTestcaseIntConst := 25;
5897 }
5898 altstep MyAltstep () {
5899 const integer MyAltstepIntConst := MyTestcaseIntConst;
5900 [] any port.check {};
5901 [else] {};
5902 }
5903 }
5904 <END_MODULE>
5905 <RESULT IF_PASS COUNT 1>
5906 (?im)\berror\b.+?no.+?definition.+?MyTestcaseIntConst
5907 <END_RESULT>
5908 <RESULT IF_PASS COUNT 1>
5909 (?is)\berror:
5910 <END_RESULT>
5911 <RESULT IF_PASS POSITIVE>
5912 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5913 <END_RESULT>
5914
5915 <END_TC>
5916 :exmp.
5917
5918 .*---------------------------------------------------------------------*
5919 :h3.TTCN-3::ScopeUnits-> Testcase: var definition -> Altstep
5920 .*---------------------------------------------------------------------*
5921 :xmp tab=0.
5922 <TC - TTCN-3::ScopeUnits-> Testcase: var definition -> Altstep>
5923
5924 <COMPILE>
5925 <VERDICT_LEAF PASS>
5926 <MODULE TTCN ModuleA ModuleA.ttcn>
5927 module ModuleA {
5928 type component MyCompType {}
5929 testcase MyTestcase() runs on MyCompType {
5930 var integer MyTestcaseInt := 25;
5931 }
5932 altstep MyAltstep () {
5933 var integer MyAltstepInt := MyTestcaseInt;
5934 [] any port.check {};
5935 [else] {};
5936 }
5937 }
5938 <END_MODULE>
5939 <RESULT IF_PASS COUNT 1>
5940 (?im)\berror\b.+?no.+?definition.+?MyTestcaseInt
5941 <END_RESULT>
5942 <RESULT IF_PASS COUNT 1>
5943 (?is)\berror:
5944 <END_RESULT>
5945 <RESULT IF_PASS POSITIVE>
5946 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5947 <END_RESULT>
5948
5949 <END_TC>
5950 :exmp.
5951
5952 .*---------------------------------------------------------------------*
5953 :h3.TTCN-3::ScopeUnits-> Testcase: timer definition -> Altstep
5954 .*---------------------------------------------------------------------*
5955 :xmp tab=0.
5956 <TC - TTCN-3::ScopeUnits-> Testcase: timer definition -> Altstep>
5957
5958 <COMPILE>
5959 <VERDICT_LEAF PASS>
5960 <MODULE TTCN ModuleA ModuleA.ttcn>
5961 module ModuleA {
5962 type component MyCompType {}
5963 testcase MyTestcase() runs on MyCompType {
5964 timer MyTestcaseTimer := 25.7;
5965 }
5966 altstep MyAltstep () {
5967 [] MyTestcaseTimer.timeout {};
5968 [else] {};
5969 }
5970 }
5971 <END_MODULE>
5972 <RESULT IF_PASS COUNT 1>
5973 (?im)\berror\b.+?no.+?definition.+?MyTestcaseTimer
5974 <END_RESULT>
5975 <RESULT IF_PASS COUNT 1>
5976 (?is)\berror:
5977 <END_RESULT>
5978 <RESULT IF_PASS POSITIVE>
5979 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5980 <END_RESULT>
5981
5982 <END_TC>
5983 :exmp.
5984
5985 .*---------------------------------------------------------------------*
5986 :h3.TTCN-3::ScopeUnits-> Testcase: const definition -> Function_runs_on
5987 .*---------------------------------------------------------------------*
5988 :xmp tab=0.
5989 <TC - TTCN-3::ScopeUnits-> Testcase: const definition -> Function_runs_on>
5990
5991 <COMPILE>
5992 <VERDICT_LEAF PASS>
5993 <MODULE TTCN ModuleA ModuleA.ttcn>
5994 module ModuleA {
5995 type component MyCompType {}
5996 function MyCompFunc() runs on MyCompType return integer {
5997 return MyTestcaseIntConst;
5998 }
5999 testcase MyTestcase() runs on MyCompType {
6000 const integer MyTestcaseIntConst := 25;
6001 }
6002 }
6003 <END_MODULE>
6004 <RESULT IF_PASS COUNT 1>
6005 (?im)\berror\b.+?no.+?definition.+?MyTestcaseIntConst
6006 <END_RESULT>
6007 <RESULT IF_PASS COUNT 1>
6008 (?is)\berror:
6009 <END_RESULT>
6010 <RESULT IF_PASS POSITIVE>
6011 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6012 <END_RESULT>
6013
6014 <END_TC>
6015 :exmp.
6016
6017 .*---------------------------------------------------------------------*
6018 :h3.TTCN-3::ScopeUnits-> Testcase: var definition -> Function_runs_on
6019 .*---------------------------------------------------------------------*
6020 :xmp tab=0.
6021 <TC - TTCN-3::ScopeUnits-> Testcase: var definition -> Function_runs_on>
6022
6023 <COMPILE>
6024 <VERDICT_LEAF PASS>
6025 <MODULE TTCN ModuleA ModuleA.ttcn>
6026 module ModuleA {
6027 type component MyCompType {}
6028 function MyCompFunc() runs on MyCompType return integer {
6029 return MyTestcaseInt;
6030 }
6031 testcase MyTestcase() runs on MyCompType {
6032 var integer MyTestcaseInt := 25;
6033 }
6034 }
6035 <END_MODULE>
6036 <RESULT IF_PASS COUNT 1>
6037 (?im)\berror\b.+?no.+?definition.+?MyTestcaseInt
6038 <END_RESULT>
6039 <RESULT IF_PASS COUNT 1>
6040 (?is)\berror:
6041 <END_RESULT>
6042 <RESULT IF_PASS POSITIVE>
6043 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6044 <END_RESULT>
6045
6046 <END_TC>
6047 :exmp.
6048
6049 .*---------------------------------------------------------------------*
6050 :h3.TTCN-3::ScopeUnits-> Testcase: timer definition -> Function_runs_on
6051 .*---------------------------------------------------------------------*
6052 :xmp tab=0.
6053 <TC - TTCN-3::ScopeUnits-> Testcase: timer definition -> Function_runs_on>
6054
6055 <COMPILE>
6056 <VERDICT_LEAF PASS>
6057 <MODULE TTCN ModuleA ModuleA.ttcn>
6058 module ModuleA {
6059 type component MyCompType {}
6060 function MyCompFunc() runs on MyCompType {
6061 MyTestcaseTimer.start;
6062 }
6063 testcase MyTestcase() runs on MyCompType {
6064 timer MyTestcaseTimer := 25.3;
6065 }
6066 }
6067 <END_MODULE>
6068 <RESULT IF_PASS COUNT 1>
6069 (?im)\berror\b.+?no.+?definition.+?MyTestcaseTimer
6070 <END_RESULT>
6071 <RESULT IF_PASS COUNT 1>
6072 (?is)\berror:
6073 <END_RESULT>
6074 <RESULT IF_PASS POSITIVE>
6075 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6076 <END_RESULT>
6077
6078 <END_TC>
6079 :exmp.
6080
6081 .*---------------------------------------------------------------------*
6082 :h3.TTCN-3::ScopeUnits-> Testcase: const definition -> Altstep_runs_on
6083 .*---------------------------------------------------------------------*
6084 :xmp tab=0.
6085 <TC - TTCN-3::ScopeUnits-> Testcase: const definition -> Altstep_runs_on>
6086
6087 <COMPILE>
6088 <VERDICT_LEAF PASS>
6089 <MODULE TTCN ModuleA ModuleA.ttcn>
6090 module ModuleA {
6091 type component MyCompType {}
6092 testcase MyTestcase() runs on MyCompType {
6093 const integer MyTestcaseIntConst := 25;
6094 }
6095 altstep MyCompAltstep() runs on MyCompType {
6096 const integer MyCompAltstepIntConst := MyTestcaseIntConst;
6097 [] any port.check {};
6098 [else] {};
6099 }
6100 }
6101 <END_MODULE>
6102 <RESULT IF_PASS COUNT 1>
6103 (?im)\berror\b.+?no.+?definition.+?MyTestcaseIntConst
6104 <END_RESULT>
6105 <RESULT IF_PASS COUNT 1>
6106 (?is)\berror:
6107 <END_RESULT>
6108 <RESULT IF_PASS POSITIVE>
6109 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6110 <END_RESULT>
6111
6112 <END_TC>
6113 :exmp.
6114
6115 .*---------------------------------------------------------------------*
6116 :h3.TTCN-3::ScopeUnits-> Testcase: var definition -> Altstep_runs_on
6117 .*---------------------------------------------------------------------*
6118 :xmp tab=0.
6119 <TC - TTCN-3::ScopeUnits-> Testcase: var definition -> Altstep_runs_on>
6120
6121 <COMPILE>
6122 <VERDICT_LEAF PASS>
6123 <MODULE TTCN ModuleA ModuleA.ttcn>
6124 module ModuleA {
6125 type component MyCompType {}
6126 testcase MyTestcase() runs on MyCompType {
6127 var integer MyTestcaseInt := 25;
6128 }
6129 altstep MyCompAltstep() runs on MyCompType {
6130 var integer MyCompAltstepInt := MyTestcaseInt;
6131 [] any port.check {};
6132 [else] {};
6133 }
6134 }
6135 <END_MODULE>
6136 <RESULT IF_PASS COUNT 1>
6137 (?im)\berror\b.+?no.+?definition.+?MyTestcaseInt
6138 <END_RESULT>
6139 <RESULT IF_PASS COUNT 1>
6140 (?is)\berror:
6141 <END_RESULT>
6142 <RESULT IF_PASS POSITIVE>
6143 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6144 <END_RESULT>
6145
6146 <END_TC>
6147 :exmp.
6148
6149 .*---------------------------------------------------------------------*
6150 :h3.TTCN-3::ScopeUnits-> Testcase: timer definition -> Altstep_runs_on
6151 .*---------------------------------------------------------------------*
6152 :xmp tab=0.
6153 <TC - TTCN-3::ScopeUnits-> Testcase: timer definition -> Altstep_runs_on>
6154
6155 <COMPILE>
6156 <VERDICT_LEAF PASS>
6157 <MODULE TTCN ModuleA ModuleA.ttcn>
6158 module ModuleA {
6159 type component MyCompType {}
6160 testcase MyTestcase() runs on MyCompType {
6161 timer MyTestcaseTimer := 25.1;
6162 }
6163 altstep MyCompAltstep() runs on MyCompType {
6164 [] MyTestcaseTimer.timeout {};
6165 [else] {};
6166 }
6167 }
6168 <END_MODULE>
6169 <RESULT IF_PASS COUNT 1>
6170 (?im)\berror\b.+?no.+?definition.+?MyTestcaseTimer
6171 <END_RESULT>
6172 <RESULT IF_PASS COUNT 1>
6173 (?is)\berror:
6174 <END_RESULT>
6175 <RESULT IF_PASS POSITIVE>
6176 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6177 <END_RESULT>
6178
6179 <END_TC>
6180 :exmp.
6181
6182 .*---------------------------------------------------------------------*
6183 :h3.TTCN-3::ScopeUnits-> For statement
6184 .*---------------------------------------------------------------------*
6185 Explanation:
6186 :nl.The index variable of a for loop can be declared before being used
6187 in the for statement or can be declared and initialized in the for
6188 statement header. If the index variable is declared and initialized
6189 in the for statement header, the scope of the index variable is limited
6190 to the loop body, i.e. it is only visible inside the loop body.
6191
6192 :xmp tab=0.
6193
6194 <TC - TTCN-3::ScopeUnits-> For statement>
6195
6196 <COMPILE>
6197 <VERDICT_LEAF PASS>
6198 <MODULE TTCN ModuleA ModuleA.ttcn>
6199 module ModuleA {
6200 control {
6201 var integer counter1;
6202 for ( counter1:=1; counter1 < 7; counter1 := counter1+1 ) {
6203 var integer x1 := counter1;
6204 }
6205 for ( var float counter2:=11.7; counter2 > 4.0; counter2 := counter2-1.35 ) {
6206 var integer x1 := counter1;
6207 var float x2 := counter2;
6208 }
6209 if ( counter2 < 6.0) {
6210 counter1 := 0;
6211 }
6212 }
6213 }
6214 <END_MODULE>
6215 <RESULT IF_PASS COUNT 1>
6216 (?im)\berror\b.+?no.+?local.+?or.+?imported.+?definition.+?counter2
6217 <END_RESULT>
6218 <RESULT IF_PASS COUNT 1>
6219 (?is)\berror:
6220 <END_RESULT>
6221 <RESULT IF_PASS POSITIVE>
6222 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6223 <END_RESULT>
6224
6225 <END_TC>
6226 :exmp.
6227
6228 :np.
6229 .*---------------------------------------------------------------------*
6230 :h2.Identifier overloading
6231 .*---------------------------------------------------------------------*
6232 :nl.This test case group covers the requirement SA-3/2.
6233 :p. Explanation:
6234 :nl.TTCN-3 does not support overloading of identifiers i.e. all identifiers
6235 in the same scope hierarchy shall be unique.
6236
6237 :p.Test strategy:
6238 :nl.- The type and const definition is checked in MDP.
6239 :nl.- Every bubble is checked with its all children (from left to right).
6240 :nl.- The whole branch is checked if a bubble has only one child.
6241 :nl.- We checked "const" identifier (definition), integer identifier
6242 (parameter) and other identifiers (e.g. function identifier).
6243 :nl.
6244 :nl.- Examples:
6245 :nl.
6246 :nl. MDP bubble:
6247 :nl. - Definition of a const in MDP is compared to the identifier in MCP,
6248 CT, FUN, ALT.
6249 :nl.
6250 :nl. FUN bubble:
6251 :nl. - The FUN identifier (name) is checked in the function's parameter list.
6252 :nl. - The value parameter (integer) is checked in the BS.
6253 :nl.
6254 :nl. FUN's BS bubble:
6255 :nl. - Definition of a const is checked in the FUN's EBS.
6256
6257 .*---------------------------------------------------------------------*
6258 :h3.TTCN-3::IdentifierOverloading->Same type identifier: definitions part
6259 .*---------------------------------------------------------------------*
6260 :xmp tab=0.
6261 <TC - TTCN-3::IdentifierOverloading->Same type identifier: definitions part>
6262
6263 <COMPILE>
6264 <VERDICT_LEAF PASS>
6265 <MODULE TTCN ModuleA ModuleA.ttcn>
6266 module ModuleA {
6267 type record MyId {}
6268 type integer MyId;
6269 }
6270 <END_MODULE>
6271 <RESULT IF_PASS COUNT 1>
6272 (?im)\berror\b.+?Duplicate.+?MyId
6273 <END_RESULT>
6274 <RESULT IF_PASS COUNT 1>
6275 (?im)\bnote\b.+?Previous.+?MyId.+?here
6276 <END_RESULT>
6277 <RESULT IF_PASS COUNT 1>
6278 (?is)\berror:
6279 <END_RESULT>
6280 <RESULT IF_PASS POSITIVE>
6281 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6282 <END_RESULT>
6283
6284 <END_TC>
6285 :exmp.
6286
6287 .*---------------------------------------------------------------------*
6288 :h3.TTCN-3::IdentifierOverloading->Same type and const id.: definitions part
6289 .*---------------------------------------------------------------------*
6290 :xmp tab=0.
6291 <TC - TTCN-3::IdentifierOverloading->Same type and const id.: definitions part>
6292
6293 <COMPILE>
6294 <VERDICT_LEAF PASS>
6295 <MODULE TTCN ModuleA ModuleA.ttcn>
6296 module ModuleA {
6297 type record MyId {}
6298 const integer MyId := 1;
6299 }
6300 <END_MODULE>
6301 <RESULT IF_PASS COUNT 1>
6302 (?im)\berror\b.+?Duplicate.+?MyId
6303 <END_RESULT>
6304 <RESULT IF_PASS COUNT 1>
6305 (?im)\bnote\b.+?Previous.+?MyId.+?here
6306 <END_RESULT>
6307 <RESULT IF_PASS COUNT 1>
6308 (?is)\berror:
6309 <END_RESULT>
6310 <RESULT IF_PASS POSITIVE>
6311 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6312 <END_RESULT>
6313
6314 <END_TC>
6315 :exmp.
6316
6317 .*---------------------------------------------------------------------*
6318 :h3.TTCN-3::IdentifierOverloading->Same const id.: definitions part--control part
6319 .*---------------------------------------------------------------------*
6320 :xmp tab=0.
6321 <TC - TTCN-3::IdentifierOverloading->Same const id.: definitions part--control part>
6322
6323 <COMPILE>
6324 <VERDICT_LEAF PASS>
6325 <MODULE TTCN ModuleA ModuleA.ttcn>
6326 module ModuleA {
6327 const integer MyIntConst := 1;
6328 control {
6329 const integer MyIntConst := 4;
6330 }
6331 }
6332 <END_MODULE>
6333 <RESULT IF_PASS COUNT 1>
6334 (?im)\berror\b.+?MyIntConst.+?not.+?unique
6335 <END_RESULT>
6336 <RESULT IF_PASS COUNT 1>
6337 (?im)\bnote\b.+?MyIntConst.+?higher.+?scope
6338 <END_RESULT>
6339 <RESULT IF_PASS COUNT 1>
6340 (?is)\berror:
6341 <END_RESULT>
6342 <RESULT IF_PASS POSITIVE>
6343 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6344 <END_RESULT>
6345
6346 <END_TC>
6347 :exmp.
6348
6349 .*---------------------------------------------------------------------*
6350 :h3.TTCN-3::IdentifierOverloading->Definitions part const--component type id.
6351 .*---------------------------------------------------------------------*
6352 :xmp tab=0.
6353 <TC - TTCN-3::IdentifierOverloading->Definitions part const--component type id.>
6354
6355 <COMPILE>
6356 <VERDICT_LEAF PASS>
6357 <MODULE TTCN ModuleA ModuleA.ttcn>
6358 module ModuleA {
6359 const integer MyId := 1;
6360 type component MyId {}
6361 }
6362 <END_MODULE>
6363 <RESULT IF_PASS COUNT 1>
6364 (?im)\berror\b.+?Duplicate.+?MyId
6365 <END_RESULT>
6366 <RESULT IF_PASS COUNT 1>
6367 (?im)\bnote\b.+?Previous.+?MyId.+?here
6368 <END_RESULT>
6369 <RESULT IF_PASS COUNT 1>
6370 (?is)\berror:
6371 <END_RESULT>
6372 <RESULT IF_PASS POSITIVE>
6373 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6374 <END_RESULT>
6375
6376 <END_TC>
6377 :exmp.
6378
6379 .*---------------------------------------------------------------------*
6380 :h3.TTCN-3::IdentifierOverloading->Same const id.: definitions part--component type
6381 .*---------------------------------------------------------------------*
6382 :xmp tab=0.
6383 <TC - TTCN-3::IdentifierOverloading->Same const id.: definitions part--component type>
6384
6385 <COMPILE>
6386 <VERDICT_LEAF PASS>
6387 <MODULE TTCN ModuleA ModuleA.ttcn>
6388 module ModuleA {
6389 const integer MyIntConst := 1;
6390 type component MyCompType {
6391 const integer MyIntConst := 3;
6392 }
6393 }
6394 <END_MODULE>
6395 <RESULT IF_PASS COUNT 1>
6396 (?im)\berror\b.+?MyIntConst.+?not.+?unique
6397 <END_RESULT>
6398 <RESULT IF_PASS COUNT 1>
6399 (?im)\bnote\b.+?MyIntConst.+?higher.+?scope
6400 <END_RESULT>
6401 <RESULT IF_PASS COUNT 1>
6402 (?is)\berror:
6403 <END_RESULT>
6404 <RESULT IF_PASS POSITIVE>
6405 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6406 <END_RESULT>
6407
6408 <END_TC>
6409 :exmp.
6410
6411 .*---------------------------------------------------------------------*
6412 :h3.TTCN-3::IdentifierOverloading->Definitions part const--function identifier
6413 .*---------------------------------------------------------------------*
6414 :xmp tab=0.
6415 <TC - TTCN-3::IdentifierOverloading->Definitions part const--function identifier>
6416
6417 <COMPILE>
6418 <VERDICT_LEAF PASS>
6419 <MODULE TTCN ModuleA ModuleA.ttcn>
6420 module ModuleA {
6421 const integer MyId := 1;
6422 function MyId() {}
6423 }
6424 <END_MODULE>
6425 <RESULT IF_PASS COUNT 1>
6426 (?im)\berror\b.+?Duplicate.+?MyId
6427 <END_RESULT>
6428 <RESULT IF_PASS COUNT 1>
6429 (?im)\bnote\b.+?Previous.+?MyId.+?here
6430 <END_RESULT>
6431 <RESULT IF_PASS COUNT 1>
6432 (?is)\berror:
6433 <END_RESULT>
6434 <RESULT IF_PASS POSITIVE>
6435 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6436 <END_RESULT>
6437
6438 <END_TC>
6439 :exmp.
6440
6441 .*---------------------------------------------------------------------*
6442 :h3.TTCN-3::IdentifierOverloading->Definitions part const--function parameter
6443 .*---------------------------------------------------------------------*
6444 :xmp tab=0.
6445 <TC - TTCN-3::IdentifierOverloading->Definitions part const--function parameter>
6446
6447 <COMPILE>
6448 <VERDICT_LEAF PASS>
6449 <MODULE TTCN ModuleA ModuleA.ttcn>
6450 module ModuleA {
6451 const integer MyIntConst := 1;
6452 function MyFunc( integer MyIntConst ) {}
6453 }
6454 <END_MODULE>
6455 <RESULT IF_PASS COUNT 1>
6456 (?im)\berror\b.+?MyIntConst.+?not.+?unique
6457 <END_RESULT>
6458 <RESULT IF_PASS COUNT 1>
6459 (?im)\bnote\b.+?MyIntConst.+?higher.+?scope
6460 <END_RESULT>
6461 <RESULT IF_PASS COUNT 1>
6462 (?is)\berror:
6463 <END_RESULT>
6464 <RESULT IF_PASS POSITIVE>
6465 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6466 <END_RESULT>
6467
6468 <END_TC>
6469 :exmp.
6470
6471 .*---------------------------------------------------------------------*
6472 :h3.TTCN-3::IdentifierOverloading->Definitions part const--altstep identifier
6473 .*---------------------------------------------------------------------*
6474 :xmp tab=0.
6475 <TC - TTCN-3::IdentifierOverloading->Definitions part const--altstep identifier>
6476
6477 <COMPILE>
6478 <VERDICT_LEAF PASS>
6479 <MODULE TTCN ModuleA ModuleA.ttcn>
6480 module ModuleA {
6481 const integer MyId := 1;
6482 altstep MyId() {
6483 [] any port.check {};
6484 [else] {};
6485 }
6486 }
6487 <END_MODULE>
6488 <RESULT IF_PASS COUNT 1>
6489 (?im)\berror\b.+?Duplicate.+?MyId
6490 <END_RESULT>
6491 <RESULT IF_PASS COUNT 1>
6492 (?im)\bnote\b.+?Previous.+?MyId.+?here
6493 <END_RESULT>
6494 <RESULT IF_PASS COUNT 1>
6495 (?is)\berror:
6496 <END_RESULT>
6497 <RESULT IF_PASS POSITIVE>
6498 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6499 <END_RESULT>
6500
6501 <END_TC>
6502 :exmp.
6503
6504 .*---------------------------------------------------------------------*
6505 :h3.TTCN-3::IdentifierOverloading->Definitions part const--altstep parameter
6506 .*---------------------------------------------------------------------*
6507 :xmp tab=0.
6508 <TC - TTCN-3::IdentifierOverloading->Definitions part const--altstep parameter>
6509
6510 <COMPILE>
6511 <VERDICT_LEAF PASS>
6512 <MODULE TTCN ModuleA ModuleA.ttcn>
6513 module ModuleA {
6514 const integer MyIntConst := 1;
6515 altstep MyAltstep( integer MyIntConst ) {
6516 [] any port.check {};
6517 [else] {};
6518 }
6519 }
6520 <END_MODULE>
6521 <RESULT IF_PASS COUNT 1>
6522 (?im)\berror\b.+?MyIntConst.+?not.+?unique
6523 <END_RESULT>
6524 <RESULT IF_PASS COUNT 1>
6525 (?im)\bnote\b.+?MyIntConst.+?higher.+?scope
6526 <END_RESULT>
6527 <RESULT IF_PASS COUNT 1>
6528 (?is)\berror:
6529 <END_RESULT>
6530 <RESULT IF_PASS POSITIVE>
6531 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6532 <END_RESULT>
6533
6534 <END_TC>
6535 :exmp.
6536
6537 .*---------------------------------------------------------------------*
6538 :h3.TTCN-3::IdentifierOverloading->Same const id.: embedded case--control part
6539 .*---------------------------------------------------------------------*
6540 :xmp tab=0.
6541 <TC - TTCN-3::IdentifierOverloading->Same const id.: embedded case--control part>
6542
6543 <COMPILE>
6544 <VERDICT_LEAF PASS>
6545 <MODULE TTCN ModuleA ModuleA.ttcn>
6546 module ModuleA {
6547 control {
6548 const integer MyIntConst := 1;
6549 if ( true ) {
6550 const integer MyIntConst := 2;
6551 }
6552 }
6553 }
6554 <END_MODULE>
6555 <RESULT IF_PASS COUNT 1>
6556 (?im)\berror\b.+?MyIntConst.+?not.+?unique
6557 <END_RESULT>
6558 <RESULT IF_PASS COUNT 1>
6559 (?im)\bnote\b.+?MyIntConst.+?higher.+?scope
6560 <END_RESULT>
6561 <RESULT IF_PASS COUNT 1>
6562 (?is)\berror:
6563 <END_RESULT>
6564 <RESULT IF_PASS POSITIVE>
6565 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6566 <END_RESULT>
6567
6568 <END_TC>
6569 :exmp.
6570
6571 .*---------------------------------------------------------------------*
6572 :h3.TTCN-3::IdentifierOverloading->Component type const--function_runs_on id.
6573 .*---------------------------------------------------------------------*
6574 :xmp tab=0.
6575 <TC - TTCN-3::IdentifierOverloading->Component type const--function_runs_on id.>
6576
6577 <COMPILE>
6578 <VERDICT_LEAF PASS>
6579 <MODULE TTCN ModuleA ModuleA.ttcn>
6580 module ModuleA {
6581 type component MyCompType {
6582 const integer MyId := 1;
6583 }
6584 function MyId() runs on MyCompType {}
6585 }
6586 <END_MODULE>
6587 <RESULT IF_PASS COUNT 1>
6588 (?im)\berror\b.+?MyId.+?not.+?unique
6589 <END_RESULT>
6590 <RESULT IF_PASS COUNT 1>
6591 (?im)\bnote\b.+?MyId.+?higher.+?scope
6592 <END_RESULT>
6593 <RESULT IF_PASS COUNT 1>
6594 (?is)\berror:
6595 <END_RESULT>
6596 <RESULT IF_PASS POSITIVE>
6597 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6598 <END_RESULT>
6599
6600 <END_TC>
6601 :exmp.
6602
6603 .*---------------------------------------------------------------------*
6604 :h3.TTCN-3::IdentifierOverloading->Component type const--function_runs_on par.
6605 .*---------------------------------------------------------------------*
6606 :xmp tab=0.
6607 <TC - TTCN-3::IdentifierOverloading->Component type const--function_runs_on par.>
6608
6609 <COMPILE>
6610 <VERDICT_LEAF PASS>
6611 <MODULE TTCN ModuleA ModuleA.ttcn>
6612 module ModuleA {
6613 type component MyCompType {
6614 const integer MyIntConst := 1;
6615 }
6616 function MyCompFunc( integer MyIntConst ) runs on MyCompType {}
6617 }
6618 <END_MODULE>
6619 <RESULT IF_PASS COUNT 1>
6620 (?im)\berror\b.+?MyIntConst.+?not.+?unique
6621 <END_RESULT>
6622 <RESULT IF_PASS COUNT 1>
6623 (?im)\bnote\b.+?MyIntConst.+?higher.+?scope
6624 <END_RESULT>
6625 <RESULT IF_PASS COUNT 1>
6626 (?is)\berror:
6627 <END_RESULT>
6628 <RESULT IF_PASS POSITIVE>
6629 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6630 <END_RESULT>
6631
6632 <END_TC>
6633 :exmp.
6634
6635 .*---------------------------------------------------------------------*
6636 :h3.TTCN-3::IdentifierOverloading->Component type const--altstep_runs_on id.
6637 .*---------------------------------------------------------------------*
6638 :xmp tab=0.
6639 <TC - TTCN-3::IdentifierOverloading->Component type const--altstep_runs_on id.>
6640
6641 <COMPILE>
6642 <VERDICT_LEAF PASS>
6643 <MODULE TTCN ModuleA ModuleA.ttcn>
6644 module ModuleA {
6645 type component MyCompType {
6646 const integer MyId := 1;
6647 }
6648 altstep MyId() runs on MyCompType {
6649 [] any port.check {};
6650 [else] {};
6651 }
6652 }
6653 <END_MODULE>
6654 <RESULT IF_PASS COUNT 1>
6655 (?im)\berror\b.+?MyId.+?not.+?unique
6656 <END_RESULT>
6657 <RESULT IF_PASS COUNT 1>
6658 (?im)\bnote\b.+?MyId.+?higher.+?scope
6659 <END_RESULT>
6660 <RESULT IF_PASS COUNT 1>
6661 (?is)\berror:
6662 <END_RESULT>
6663 <RESULT IF_PASS POSITIVE>
6664 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6665 <END_RESULT>
6666
6667 <END_TC>
6668 :exmp.
6669
6670 .*---------------------------------------------------------------------*
6671 :h3.TTCN-3::IdentifierOverloading->Component type const--altstep_runs_on par.
6672 .*---------------------------------------------------------------------*
6673 :xmp tab=0.
6674 <TC - TTCN-3::IdentifierOverloading->Component type const--altstep_runs_on par.>
6675
6676 <COMPILE>
6677 <VERDICT_LEAF PASS>
6678 <MODULE TTCN ModuleA ModuleA.ttcn>
6679 module ModuleA {
6680 type component MyCompType {
6681 const integer MyIntConst := 1;
6682 }
6683 altstep MyAltstep( integer MyIntConst ) runs on MyCompType {
6684 [] any port.check {};
6685 [else] {};
6686 }
6687 }
6688 <END_MODULE>
6689 <RESULT IF_PASS COUNT 1>
6690 (?im)\berror\b.+?MyIntConst.+?not.+?unique
6691 <END_RESULT>
6692 <RESULT IF_PASS COUNT 1>
6693 (?im)\bnote\b.+?MyIntConst.+?higher.+?scope
6694 <END_RESULT>
6695 <RESULT IF_PASS COUNT 1>
6696 (?is)\berror:
6697 <END_RESULT>
6698 <RESULT IF_PASS POSITIVE>
6699 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6700 <END_RESULT>
6701
6702 <END_TC>
6703 :exmp.
6704
6705 .*---------------------------------------------------------------------*
6706 :h3.TTCN-3::IdentifierOverloading->Component type const--testcase identifier
6707 .*---------------------------------------------------------------------*
6708 :xmp tab=0.
6709 <TC - TTCN-3::IdentifierOverloading->Component type const--testcase identifier>
6710
6711 <COMPILE>
6712 <VERDICT_LEAF PASS>
6713 <MODULE TTCN ModuleA ModuleA.ttcn>
6714 module ModuleA {
6715 type component MyCompType {
6716 const integer MyId := 1;
6717 }
6718 testcase MyId() runs on MyCompType {}
6719 }
6720 <END_MODULE>
6721 <RESULT IF_PASS COUNT 1>
6722 (?im)\berror\b.+?MyId.+?not.+?unique
6723 <END_RESULT>
6724 <RESULT IF_PASS COUNT 1>
6725 (?im)\bnote\b.+?MyId.+?higher.+?scope
6726 <END_RESULT>
6727 <RESULT IF_PASS COUNT 1>
6728 (?is)\berror:
6729 <END_RESULT>
6730 <RESULT IF_PASS POSITIVE>
6731 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6732 <END_RESULT>
6733
6734 <END_TC>
6735 :exmp.
6736
6737 .*---------------------------------------------------------------------*
6738 :h3.TTCN-3::IdentifierOverloading->Component type const--testcase parameter
6739 .*---------------------------------------------------------------------*
6740 :xmp tab=0.
6741 <TC - TTCN-3::IdentifierOverloading->Component type const--testcase parameter>
6742
6743 <COMPILE>
6744 <VERDICT_LEAF PASS>
6745 <MODULE TTCN ModuleA ModuleA.ttcn>
6746 module ModuleA {
6747 type component MyCompType {
6748 const integer MyIntConst := 1;
6749 }
6750 testcase MyTestcase( integer MyIntConst ) runs on MyCompType {}
6751 }
6752 <END_MODULE>
6753 <RESULT IF_PASS COUNT 1>
6754 (?im)\berror\b.+?MyIntConst.+?not.+?unique
6755 <END_RESULT>
6756 <RESULT IF_PASS COUNT 1>
6757 (?im)\bnote\b.+?MyIntConst.+?higher.+?scope
6758 <END_RESULT>
6759 <RESULT IF_PASS COUNT 1>
6760 (?is)\berror:
6761 <END_RESULT>
6762 <RESULT IF_PASS POSITIVE>
6763 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6764 <END_RESULT>
6765
6766 <END_TC>
6767 :exmp.
6768
6769 .*---------------------------------------------------------------------*
6770 :h3.TTCN-3::IdentifierOverloading->Function: identifier--parameter
6771 .*---------------------------------------------------------------------*
6772 :xmp tab=0.
6773 <TC - TTCN-3::IdentifierOverloading->Function: identifier--parameter>
6774
6775 <COMPILE>
6776 <VERDICT_LEAF PASS>
6777 <MODULE TTCN ModuleA ModuleA.ttcn>
6778 module ModuleA {
6779 function MyFunc( integer MyFunc ) {}
6780 }
6781 <END_MODULE>
6782 <RESULT IF_PASS COUNT 1>
6783 (?im)\berror\b.+?Parameter.+?MyFunc.+?not.+?unique
6784 <END_RESULT>
6785 <RESULT IF_PASS COUNT 1>
6786 (?im)\bnote\b.+?Symbol.+?MyFunc.+?already.+?defined.+?higher.+?scope
6787 <END_RESULT>
6788 <RESULT IF_PASS COUNT 1>
6789 (?is)\berror:
6790 <END_RESULT>
6791 <RESULT IF_PASS POSITIVE>
6792 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6793 <END_RESULT>
6794
6795 <END_TC>
6796 :exmp.
6797
6798 .*---------------------------------------------------------------------*
6799 :h3.TTCN-3::IdentifierOverloading->Function parameter--function const
6800 .*---------------------------------------------------------------------*
6801 :xmp tab=0.
6802 <TC - TTCN-3::IdentifierOverloading->Function parameter--function const>
6803
6804 <COMPILE>
6805 <VERDICT_LEAF PASS>
6806 <MODULE TTCN ModuleA ModuleA.ttcn>
6807 module ModuleA {
6808 function MyFunc( integer MyIntConst ) {
6809 const integer MyIntConst := 1;
6810 }
6811 }
6812 <END_MODULE>
6813 <RESULT IF_PASS COUNT 1>
6814 (?im)\berror\b.+?MyIntConst.+?not.+?unique
6815 <END_RESULT>
6816 <RESULT IF_PASS COUNT 1>
6817 (?im)\bnote\b.+?MyIntConst.+?higher.+?scope
6818 <END_RESULT>
6819 <RESULT IF_PASS COUNT 1>
6820 (?is)\berror:
6821 <END_RESULT>
6822 <RESULT IF_PASS POSITIVE>
6823 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6824 <END_RESULT>
6825
6826 <END_TC>
6827 :exmp.
6828
6829 .*---------------------------------------------------------------------*
6830 :h3.TTCN-3::IdentifierOverloading->Same const id.: embedded case--function
6831 .*---------------------------------------------------------------------*
6832 :xmp tab=0.
6833 <TC - TTCN-3::IdentifierOverloading->Same const id.: embedded case--function>
6834
6835 <COMPILE>
6836 <VERDICT_LEAF PASS>
6837 <MODULE TTCN ModuleA ModuleA.ttcn>
6838 module ModuleA {
6839 function MyFunc() {
6840 const integer MyIntConst := 1;
6841 if ( true ) {
6842 const integer MyIntConst := 2;
6843 }
6844 }
6845 }
6846 <END_MODULE>
6847 <RESULT IF_PASS COUNT 1>
6848 (?im)\berror\b.+?MyIntConst.+?not.+?unique
6849 <END_RESULT>
6850 <RESULT IF_PASS COUNT 1>
6851 (?im)\bnote\b.+?MyIntConst.+?higher.+?scope
6852 <END_RESULT>
6853 <RESULT IF_PASS COUNT 1>
6854 (?is)\berror:
6855 <END_RESULT>
6856 <RESULT IF_PASS POSITIVE>
6857 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6858 <END_RESULT>
6859
6860 <END_TC>
6861 :exmp.
6862
6863 .*---------------------------------------------------------------------*
6864 :h3.TTCN-3::IdentifierOverloading->Altstep: identifier--parameter
6865 .*---------------------------------------------------------------------*
6866 :xmp tab=0.
6867 <TC - TTCN-3::IdentifierOverloading->Altstep: identifier--parameter>
6868
6869 <COMPILE>
6870 <VERDICT_LEAF PASS>
6871 <MODULE TTCN ModuleA ModuleA.ttcn>
6872 module ModuleA {
6873 altstep MyAltstep( integer MyAltstep ) {
6874 [] any port.check {};
6875 [else] {};
6876 }
6877 }
6878 <END_MODULE>
6879 <RESULT IF_PASS COUNT 1>
6880 (?im)\berror\b.+?Parameter.+?MyAltstep.+?not.+?unique
6881 <END_RESULT>
6882 <RESULT IF_PASS COUNT 1>
6883 (?im)\bnote\b.+?Symbol.+?MyAltstep.+?already.+?defined.+?higher.+?scope
6884 <END_RESULT>
6885 <RESULT IF_PASS COUNT 1>
6886 (?is)\berror:
6887 <END_RESULT>
6888 <RESULT IF_PASS POSITIVE>
6889 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6890 <END_RESULT>
6891
6892 <END_TC>
6893 :exmp.
6894
6895 .*---------------------------------------------------------------------*
6896 :h3.TTCN-3::IdentifierOverloading->Altstep parameter--altstep const
6897 .*---------------------------------------------------------------------*
6898 :xmp tab=0.
6899 <TC - TTCN-3::IdentifierOverloading->Altstep parameter--altstep const>
6900
6901 <COMPILE>
6902 <VERDICT_LEAF PASS>
6903 <MODULE TTCN ModuleA ModuleA.ttcn>
6904 module ModuleA {
6905 altstep MyAltstep( integer MyIntConst ) {
6906 const integer MyIntConst := 1;
6907 [] any port.check {};
6908 [else] {};
6909 }
6910 }
6911 <END_MODULE>
6912 <RESULT IF_PASS COUNT 1>
6913 (?im)\berror\b.+?MyIntConst.+?not.+?unique
6914 <END_RESULT>
6915 <RESULT IF_PASS COUNT 1>
6916 (?im)\bnote\b.+?MyIntConst.+?higher.+?scope
6917 <END_RESULT>
6918 <RESULT IF_PASS COUNT 1>
6919 (?is)\berror:
6920 <END_RESULT>
6921 <RESULT IF_PASS POSITIVE>
6922 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6923 <END_RESULT>
6924
6925 <END_TC>
6926 :exmp.
6927
6928 .*---------------------------------------------------------------------*
6929 :h3.TTCN-3::IdentifierOverloading->Same const id.: embedded case--altstep
6930 .*---------------------------------------------------------------------*
6931 :xmp tab=0.
6932 <TC - TTCN-3::IdentifierOverloading->Same const id.: embedded case--altstep>
6933
6934 <COMPILE>
6935 <VERDICT_LEAF PASS>
6936 <MODULE TTCN ModuleA ModuleA.ttcn>
6937 module ModuleA {
6938 altstep MyAltstep() {
6939 const integer MyIntConst := 1;
6940 [] any port.check {
6941 const integer MyIntConst := 3;
6942 };
6943 [else] {};
6944 }
6945 }
6946 <END_MODULE>
6947 <RESULT IF_PASS COUNT 1>
6948 (?im)\berror\b.+?MyIntConst.+?not.+?unique
6949 <END_RESULT>
6950 <RESULT IF_PASS COUNT 1>
6951 (?im)\bnote\b.+?MyIntConst.+?higher.+?scope
6952 <END_RESULT>
6953 <RESULT IF_PASS COUNT 1>
6954 (?is)\berror:
6955 <END_RESULT>
6956 <RESULT IF_PASS POSITIVE>
6957 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6958 <END_RESULT>
6959
6960 <END_TC>
6961 :exmp.
6962
6963 .*---------------------------------------------------------------------*
6964 :h3.TTCN-3::IdentifierOverloading->Function_runs_on: identifier--parameter
6965 .*---------------------------------------------------------------------*
6966 :xmp tab=0.
6967 <TC - TTCN-3::IdentifierOverloading->Function_runs_on: identifier--parameter>
6968
6969 <COMPILE>
6970 <VERDICT_LEAF PASS>
6971 <MODULE TTCN ModuleA ModuleA.ttcn>
6972 module ModuleA {
6973 type component MyCompType {}
6974 function MyCompFunc( integer MyCompFunc ) runs on MyCompType {}
6975 }
6976 <END_MODULE>
6977 <RESULT IF_PASS COUNT 1>
6978 (?im)\berror\b.+?Parameter.+?MyCompFunc.+?not.+?unique
6979 <END_RESULT>
6980 <RESULT IF_PASS COUNT 1>
6981 (?im)\bnote\b.+?Symbol.+?MyCompFunc.+?already.+?defined.+?higher.+?scope
6982 <END_RESULT>
6983 <RESULT IF_PASS COUNT 1>
6984 (?is)\berror:
6985 <END_RESULT>
6986 <RESULT IF_PASS POSITIVE>
6987 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6988 <END_RESULT>
6989
6990 <END_TC>
6991 :exmp.
6992
6993 .*---------------------------------------------------------------------*
6994 :h3.TTCN-3::IdentifierOverloading->Function_runs_on par.--function_runs_on const
6995 .*---------------------------------------------------------------------*
6996 :xmp tab=0.
6997 <TC - TTCN-3::IdentifierOverloading->Function_runs_on par.--function_runs_on const>
6998
6999 <COMPILE>
7000 <VERDICT_LEAF PASS>
7001 <MODULE TTCN ModuleA ModuleA.ttcn>
7002 module ModuleA {
7003 type component MyCompType {}
7004 function MyCompFunc( integer MyIntConst ) runs on MyCompType {
7005 const integer MyIntConst := 1;
7006 }
7007 }
7008 <END_MODULE>
7009 <RESULT IF_PASS COUNT 1>
7010 (?im)\berror\b.+?MyIntConst.+?not.+?unique
7011 <END_RESULT>
7012 <RESULT IF_PASS COUNT 1>
7013 (?im)\bnote\b.+?MyIntConst.+?higher.+?scope
7014 <END_RESULT>
7015 <RESULT IF_PASS COUNT 1>
7016 (?is)\berror:
7017 <END_RESULT>
7018 <RESULT IF_PASS POSITIVE>
7019 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7020 <END_RESULT>
7021
7022 <END_TC>
7023 :exmp.
7024
7025 .*---------------------------------------------------------------------*
7026 :h3.TTCN-3::IdentifierOverloading->Same const id.: embedded case--function_runs_on
7027 .*---------------------------------------------------------------------*
7028 :xmp tab=0.
7029 <TC - TTCN-3::IdentifierOverloading->Same const id.: embedded case--function_runs_on>
7030
7031 <COMPILE>
7032 <VERDICT_LEAF PASS>
7033 <MODULE TTCN ModuleA ModuleA.ttcn>
7034 module ModuleA {
7035 type component MyCompType {}
7036 function MyCompFunc() runs on MyCompType {
7037 const integer MyIntConst := 1;
7038 if ( true ) {
7039 const integer MyIntConst := 2;
7040 }
7041 }
7042 }
7043 <END_MODULE>
7044 <RESULT IF_PASS COUNT 1>
7045 (?im)\berror\b.+?MyIntConst.+?not.+?unique
7046 <END_RESULT>
7047 <RESULT IF_PASS COUNT 1>
7048 (?im)\bnote\b.+?MyIntConst.+?higher.+?scope
7049 <END_RESULT>
7050 <RESULT IF_PASS COUNT 1>
7051 (?is)\berror:
7052 <END_RESULT>
7053 <RESULT IF_PASS POSITIVE>
7054 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7055 <END_RESULT>
7056
7057 <END_TC>
7058 :exmp.
7059
7060 .*---------------------------------------------------------------------*
7061 :h3.TTCN-3::IdentifierOverloading->Altstep_runs_on: identifier--parameter
7062 .*---------------------------------------------------------------------*
7063 :xmp tab=0.
7064 <TC - TTCN-3::IdentifierOverloading->Altstep_runs_on: identifier--parameter>
7065
7066 <COMPILE>
7067 <VERDICT_LEAF PASS>
7068 <MODULE TTCN ModuleA ModuleA.ttcn>
7069 module ModuleA {
7070 type component MyCompType {}
7071 altstep MyCompAltstep( integer MyCompAltstep ) runs on MyCompType {
7072 [] any port.check {};
7073 [else] {};
7074 }
7075 }
7076 <END_MODULE>
7077 <RESULT IF_PASS COUNT 1>
7078 (?im)\berror\b.+?Parameter.+?MyCompAltstep.+?not.+?unique
7079 <END_RESULT>
7080 <RESULT IF_PASS COUNT 1>
7081 (?im)\bnote\b.+?Symbol.+?MyCompAltstep.+?already.+?defined.+?higher.+?scope
7082 <END_RESULT>
7083 <RESULT IF_PASS COUNT 1>
7084 (?is)\berror:
7085 <END_RESULT>
7086 <RESULT IF_PASS POSITIVE>
7087 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7088 <END_RESULT>
7089
7090 <END_TC>
7091 :exmp.
7092
7093 .*---------------------------------------------------------------------*
7094 :h3.TTCN-3::IdentifierOverloading->Altstep_runs_on par.--altstep_runs_on const
7095 .*---------------------------------------------------------------------*
7096 :xmp tab=0.
7097 <TC - TTCN-3::IdentifierOverloading->Altstep_runs_on par.--altstep_runs_on const>
7098
7099 <COMPILE>
7100 <VERDICT_LEAF PASS>
7101 <MODULE TTCN ModuleA ModuleA.ttcn>
7102 module ModuleA {
7103 type component MyCompType {}
7104 altstep MyCompAltstep( integer MyIntConst ) runs on MyCompType {
7105 const integer MyIntConst := 5;
7106 [] any port.check {};
7107 [else] {};
7108 }
7109 }
7110 <END_MODULE>
7111 <RESULT IF_PASS COUNT 1>
7112 (?im)\berror\b.+?MyIntConst.+?not.+?unique
7113 <END_RESULT>
7114 <RESULT IF_PASS COUNT 1>
7115 (?im)\bnote\b.+?MyIntConst.+?higher.+?scope
7116 <END_RESULT>
7117 <RESULT IF_PASS COUNT 1>
7118 (?is)\berror:
7119 <END_RESULT>
7120 <RESULT IF_PASS POSITIVE>
7121 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7122 <END_RESULT>
7123
7124 <END_TC>
7125 :exmp.
7126
7127 .*---------------------------------------------------------------------*
7128 :h3.TTCN-3::IdentifierOverloading->Same const id.: embedded case--altstep_runs_on
7129 .*---------------------------------------------------------------------*
7130 :xmp tab=0.
7131 <TC - TTCN-3::IdentifierOverloading->Same const id.: embedded case--altstep_runs_on>
7132
7133 <COMPILE>
7134 <VERDICT_LEAF PASS>
7135 <MODULE TTCN ModuleA ModuleA.ttcn>
7136 module ModuleA {
7137 type component MyCompType {}
7138 altstep MyCompAltstep() runs on MyCompType {
7139 const integer MyIntConst := 5;
7140 [] any port.check {
7141 const integer MyIntConst := 3;
7142 };
7143 [else] {};
7144 }
7145 }
7146 <END_MODULE>
7147 <RESULT IF_PASS COUNT 1>
7148 (?im)\berror\b.+?MyIntConst.+?not.+?unique
7149 <END_RESULT>
7150 <RESULT IF_PASS COUNT 1>
7151 (?im)\bnote\b.+?MyIntConst.+?higher.+?scope
7152 <END_RESULT>
7153 <RESULT IF_PASS COUNT 1>
7154 (?is)\berror:
7155 <END_RESULT>
7156 <RESULT IF_PASS POSITIVE>
7157 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7158 <END_RESULT>
7159
7160 <END_TC>
7161 :exmp.
7162
7163 .*---------------------------------------------------------------------*
7164 :h3.TTCN-3::IdentifierOverloading->Testcase: identifier--parameter
7165 .*---------------------------------------------------------------------*
7166 :xmp tab=0.
7167 <TC - TTCN-3::IdentifierOverloading->Testcase: identifier--parameter>
7168
7169 <COMPILE>
7170 <VERDICT_LEAF PASS>
7171 <MODULE TTCN ModuleA ModuleA.ttcn>
7172 module ModuleA {
7173 type component MyCompType {}
7174 testcase MyTestcase( integer MyTestcase ) runs on MyCompType {}
7175 }
7176 <END_MODULE>
7177 <RESULT IF_PASS COUNT 1>
7178 (?im)\berror\b.+?Parameter.+?MyTestcase.+?not.+?unique
7179 <END_RESULT>
7180 <RESULT IF_PASS COUNT 1>
7181 (?im)\bnote\b.+?Symbol.+?MyTestcase.+?already.+?defined.+?higher.+?scope
7182 <END_RESULT>
7183 <RESULT IF_PASS COUNT 1>
7184 (?is)\berror:
7185 <END_RESULT>
7186 <RESULT IF_PASS POSITIVE>
7187 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7188 <END_RESULT>
7189
7190 <END_TC>
7191 :exmp.
7192
7193 .*---------------------------------------------------------------------*
7194 :h3.TTCN-3::IdentifierOverloading->Testcase parameter--testcase const
7195 .*---------------------------------------------------------------------*
7196 :xmp tab=0.
7197 <TC - TTCN-3::IdentifierOverloading->Testcase parameter--testcase const>
7198
7199 <COMPILE>
7200 <VERDICT_LEAF PASS>
7201 <MODULE TTCN ModuleA ModuleA.ttcn>
7202 module ModuleA {
7203 type component MyCompType {}
7204 testcase MyTestcase( integer MyIntConst ) runs on MyCompType {
7205 const integer MyIntConst := 3;
7206 }
7207 }
7208 <END_MODULE>
7209 <RESULT IF_PASS COUNT 1>
7210 (?im)\berror\b.+?MyIntConst.+?not.+?unique
7211 <END_RESULT>
7212 <RESULT IF_PASS COUNT 1>
7213 (?im)\bnote\b.+?MyIntConst.+?higher.+?scope
7214 <END_RESULT>
7215 <RESULT IF_PASS COUNT 1>
7216 (?is)\berror:
7217 <END_RESULT>
7218 <RESULT IF_PASS POSITIVE>
7219 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7220 <END_RESULT>
7221
7222 <END_TC>
7223 :exmp.
7224
7225 .*---------------------------------------------------------------------*
7226 :h3.TTCN-3::IdentifierOverloading->Same const id.: embedded case--testcase
7227 .*---------------------------------------------------------------------*
7228 :xmp tab=0.
7229 <TC - TTCN-3::IdentifierOverloading->Same const id.: embedded case--testcase>
7230
7231 <COMPILE>
7232 <VERDICT_LEAF PASS>
7233 <MODULE TTCN ModuleA ModuleA.ttcn>
7234 module ModuleA {
7235 type component MyCompType {}
7236 testcase MyTestcase() runs on MyCompType {
7237 const integer MyIntConst := 3;
7238 if ( true ) {
7239 const integer MyIntConst := 2;
7240 }
7241 }
7242 }
7243 <END_MODULE>
7244 <RESULT IF_PASS COUNT 1>
7245 (?im)\berror\b.+?MyIntConst.+?not.+?unique
7246 <END_RESULT>
7247 <RESULT IF_PASS COUNT 1>
7248 (?im)\bnote\b.+?MyIntConst.+?higher.+?scope
7249 <END_RESULT>
7250 <RESULT IF_PASS COUNT 1>
7251 (?is)\berror:
7252 <END_RESULT>
7253 <RESULT IF_PASS POSITIVE>
7254 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7255 <END_RESULT>
7256
7257 <END_TC>
7258 :exmp.
7259
7260 .*---------------------------------------------------------------------*
7261 :h3.TTCN-3::IdentifierOverloading->Port type
7262 .*---------------------------------------------------------------------*
7263 NOTE: TR684 segfault when a symbol is not found
7264
7265 :xmp tab=0.
7266
7267 <TC - TTCN-3::IdentifierOverloading->Port type>
7268 <COMPILE>
7269 <VERDICT_LEAF PASS>
7270 <MODULE TTCN ModuleA ModuleA.ttcn>
7271 module m {
7272
7273 type port p message { inout integer }
7274 type component c { port pt p }
7275
7276 function f() runs on c return integer {
7277 alt {
7278 [] any port.trigger {}
7279 }
7280 return 9
7281 }
7282
7283 function g() runs on c {
7284 alt {
7285 [] p.receive(f()) {}
7286 [else] {}
7287 }
7288 }
7289 }
7290 <END_MODULE>
7291 <RESULT IF_PASS COUNT 1>
7292 (?im)\berror\b.+?p.+?not.+?unique
7293 <END_RESULT>
7294 <RESULT IF_PASS COUNT 1>
7295 (?im)\bnote\b.+?Symbol.+?p.+?already.+?defined.+?higher.+?scope
7296 <END_RESULT>
7297 <RESULT IF_PASS COUNT 1>
7298 (?im)\berror\b.+?no.+?local.+?or.+?imported.+?definition.+?pt
7299 <END_RESULT>
7300 <RESULT IF_PASS COUNT 2>
7301 (?is)\berror:
7302 <END_RESULT>
7303 <RESULT IF_PASS POSITIVE>
7304 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7305 <END_RESULT>
7306 <END_TC>
7307 :exmp.
7308
7309 .*---------------------------------------------------------------------*
7310 :h3.Identifier overloading in parameter list
7311 .*---------------------------------------------------------------------*
7312 Strategy:
7313 :nl.- Make a testcase for every case where we can use parameter list.
7314
7315 .*---------------------------------------------------------------------*
7316 :h4.TTCN-3::IdentifierOverloading->ParameterList: modulepar
7317 .*---------------------------------------------------------------------*
7318 :xmp tab=0.
7319 <TC - TTCN-3::IdentifierOverloading->ParameterList: modulepar>
7320
7321 <COMPILE>
7322 <VERDICT_LEAF PASS>
7323 <MODULE TTCN ModuleA ModuleA.ttcn>
7324 module ModuleA {
7325 modulepar {
7326 boolean par_1 := false;
7327 integer par_2, par_3;
7328 octetstring par_1
7329 }
7330 }
7331 <END_MODULE>
7332 <RESULT IF_PASS COUNT 1>
7333 (?im)\berror\b.+?Duplicate.+?definition.+?par_1
7334 <END_RESULT>
7335 <RESULT IF_PASS COUNT 1>
7336 (?im)\bnote\b.+?Previous.+?definition.+?par_1.+?here
7337 <END_RESULT>
7338 <RESULT IF_PASS COUNT 1>
7339 (?is)\berror:
7340 <END_RESULT>
7341 <RESULT IF_PASS POSITIVE>
7342 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7343 <END_RESULT>
7344
7345 <END_TC>
7346 :exmp.
7347
7348 .*---------------------------------------------------------------------*
7349 :h4.TTCN-3::IdentifierOverloading->ParameterList: function
7350 .*---------------------------------------------------------------------*
7351 :xmp tab=0.
7352 <TC - TTCN-3::IdentifierOverloading->ParameterList: function>
7353
7354 <COMPILE>
7355 <VERDICT_LEAF PASS>
7356 <MODULE TTCN ModuleA ModuleA.ttcn>
7357 module ModuleA {
7358 function MyFunc( integer par_1, integer par_2, boolean par_1 ) {}
7359 }
7360 <END_MODULE>
7361 <RESULT IF_PASS COUNT 1>
7362 (?im)\berror\b.+?Duplicate.+?parameter.+?par_1
7363 <END_RESULT>
7364 <RESULT IF_PASS COUNT 1>
7365 (?im)\bnote\b.+?Previous.+?definition.+?par_1.+?here
7366 <END_RESULT>
7367 <RESULT IF_PASS COUNT 1>
7368 (?is)\berror:
7369 <END_RESULT>
7370 <RESULT IF_PASS POSITIVE>
7371 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7372 <END_RESULT>
7373
7374 <END_TC>
7375 :exmp.
7376
7377 .*---------------------------------------------------------------------*
7378 :h4.TTCN-3::IdentifierOverloading->ParameterList: function_runs_on
7379 .*---------------------------------------------------------------------*
7380 :xmp tab=0.
7381 <TC - TTCN-3::IdentifierOverloading->ParameterList: function_runs_on>
7382
7383 <COMPILE>
7384 <VERDICT_LEAF PASS>
7385 <MODULE TTCN ModuleA ModuleA.ttcn>
7386 module ModuleA {
7387 type component MyCT {}
7388 function MyFunc( integer par_1, integer par_2, boolean par_1 ) runs on MyCT {}
7389 }
7390 <END_MODULE>
7391 <RESULT IF_PASS COUNT 1>
7392 (?im)\berror\b.+?Duplicate.+?parameter.+?par_1
7393 <END_RESULT>
7394 <RESULT IF_PASS COUNT 1>
7395 (?im)\bnote\b.+?Previous.+?definition.+?par_1.+?here
7396 <END_RESULT>
7397 <RESULT IF_PASS COUNT 1>
7398 (?is)\berror:
7399 <END_RESULT>
7400 <RESULT IF_PASS POSITIVE>
7401 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7402 <END_RESULT>
7403
7404 <END_TC>
7405 :exmp.
7406
7407 .*---------------------------------------------------------------------*
7408 :h4.TTCN-3::IdentifierOverloading->ParameterList: external function
7409 .*---------------------------------------------------------------------*
7410 :xmp tab=0.
7411 <TC - TTCN-3::IdentifierOverloading->ParameterList: external function>
7412
7413 <COMPILE>
7414 <VERDICT_LEAF PASS>
7415 <MODULE TTCN ModuleA ModuleA.ttcn>
7416 module ModuleA {
7417 external function MyExtFunc(
7418 integer par_1,
7419 timer par_2,
7420 template boolean par_1
7421 );
7422 }
7423 <END_MODULE>
7424 <RESULT IF_PASS COUNT 1>
7425 (?im)\berror\b.+?Duplicate.+?parameter.+?par_1
7426 <END_RESULT>
7427 <RESULT IF_PASS COUNT 1>
7428 (?im)\bnote\b.+?Previous.+?definition.+?par_1.+?here
7429 <END_RESULT>
7430 <RESULT IF_PASS COUNT 1>
7431 (?is)\berror:
7432 <END_RESULT>
7433 <RESULT IF_PASS POSITIVE>
7434 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7435 <END_RESULT>
7436
7437 <END_TC>
7438 :exmp.
7439
7440 .*---------------------------------------------------------------------*
7441 :h4.TTCN-3::IdentifierOverloading->ParameterList: altstep
7442 .*---------------------------------------------------------------------*
7443 :xmp tab=0.
7444 <TC - TTCN-3::IdentifierOverloading->ParameterList: altstep>
7445
7446 <COMPILE>
7447 <VERDICT_LEAF PASS>
7448 <MODULE TTCN ModuleA ModuleA.ttcn>
7449 module ModuleA {
7450 altstep MyAlt( integer par_1, integer par_2, boolean par_1 ) {
7451 [else] {}
7452 }
7453 }
7454 <END_MODULE>
7455 <RESULT IF_PASS COUNT 1>
7456 (?im)\berror\b.+?Duplicate.+?parameter.+?par_1
7457 <END_RESULT>
7458 <RESULT IF_PASS COUNT 1>
7459 (?im)\bnote\b.+?Previous.+?definition.+?par_1.+?here
7460 <END_RESULT>
7461 <RESULT IF_PASS COUNT 1>
7462 (?is)\berror:
7463 <END_RESULT>
7464 <RESULT IF_PASS POSITIVE>
7465 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7466 <END_RESULT>
7467
7468 <END_TC>
7469 :exmp.
7470
7471 .*---------------------------------------------------------------------*
7472 :h4.TTCN-3::IdentifierOverloading->ParameterList: altstep_runs_on
7473 .*---------------------------------------------------------------------*
7474 :xmp tab=0.
7475 <TC - TTCN-3::IdentifierOverloading->ParameterList: altstep_runs_on>
7476
7477 <COMPILE>
7478 <VERDICT_LEAF PASS>
7479 <MODULE TTCN ModuleA ModuleA.ttcn>
7480 module ModuleA {
7481 type component MyCT {}
7482 altstep MyAlt( integer par_1, integer par_2, boolean par_1 ) runs on MyCT {
7483 [else] {}
7484 }
7485 }
7486 <END_MODULE>
7487 <RESULT IF_PASS COUNT 1>
7488 (?im)\berror\b.+?Duplicate.+?parameter.+?par_1
7489 <END_RESULT>
7490 <RESULT IF_PASS COUNT 1>
7491 (?im)\bnote\b.+?Previous.+?definition.+?par_1.+?here
7492 <END_RESULT>
7493 <RESULT IF_PASS COUNT 1>
7494 (?is)\berror:
7495 <END_RESULT>
7496 <RESULT IF_PASS POSITIVE>
7497 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7498 <END_RESULT>
7499
7500 <END_TC>
7501 :exmp.
7502
7503 .*---------------------------------------------------------------------*
7504 :h4.TTCN-3::IdentifierOverloading->ParameterList: testcase
7505 .*---------------------------------------------------------------------*
7506 :xmp tab=0.
7507 <TC - TTCN-3::IdentifierOverloading->ParameterList: tetscase>
7508
7509 <COMPILE>
7510 <VERDICT_LEAF PASS>
7511 <MODULE TTCN ModuleA ModuleA.ttcn>
7512 module ModuleA {
7513 type component MyCT {}
7514 testcase MyTC( integer par_1, integer par_2, boolean par_1 ) runs on MyCT {}
7515 }
7516 <END_MODULE>
7517 <RESULT IF_PASS COUNT 1>
7518 (?im)\berror\b.+?Duplicate.+?parameter.+?par_1
7519 <END_RESULT>
7520 <RESULT IF_PASS COUNT 1>
7521 (?im)\bnote\b.+?Previous.+?definition.+?par_1.+?here
7522 <END_RESULT>
7523 <RESULT IF_PASS COUNT 1>
7524 (?is)\berror:
7525 <END_RESULT>
7526 <RESULT IF_PASS POSITIVE>
7527 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7528 <END_RESULT>
7529
7530 <END_TC>
7531 :exmp.
7532
7533 .*---------------------------------------------------------------------*
7534 :h4.TTCN-3::IdentifierOverloading->ParameterList: template
7535 .*---------------------------------------------------------------------*
7536 :xmp tab=0.
7537 <TC - TTCN-3::IdentifierOverloading->ParameterList: template>
7538
7539 <COMPILE>
7540 <VERDICT_LEAF PASS>
7541 <MODULE TTCN ModuleA ModuleA.ttcn>
7542 module ModuleA {
7543 type record MyMessageType {
7544 integer field1 optional,
7545 charstring field2,
7546 boolean field3,
7547 integer field4
7548 }
7549 template MyMessageType MyTemplate( integer par_1, boolean par_2, integer par_1 ) := {
7550 field1 := par_1,
7551 field2 := ?,
7552 field3 := par_2,
7553 field4 := par_1
7554 }
7555 }
7556 <END_MODULE>
7557 <RESULT IF_PASS COUNT 1>
7558 (?im)\berror\b.+?Duplicate.+?parameter.+?par_1
7559 <END_RESULT>
7560 <RESULT IF_PASS COUNT 1>
7561 (?im)\bnote\b.+?Previous.+?definition.+?par_1.+?here
7562 <END_RESULT>
7563 <RESULT IF_PASS COUNT 1>
7564 (?is)\berror:
7565 <END_RESULT>
7566 <RESULT IF_PASS POSITIVE>
7567 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7568 <END_RESULT>
7569
7570 <END_TC>
7571 :exmp.
7572
7573 .*---------------------------------------------------------------------*
7574 :h4.TTCN-3::IdentifierOverloading->ParameterList: signature
7575 .*---------------------------------------------------------------------*
7576 :xmp tab=0.
7577 <TC - TTCN-3::IdentifierOverloading->ParameterList: signature>
7578
7579 <COMPILE>
7580 <VERDICT_LEAF PASS>
7581 <MODULE TTCN ModuleA ModuleA.ttcn>
7582 module ModuleA {
7583 signature MySig (in integer par_1, out float par_2, inout integer par_2);
7584 }
7585 <END_MODULE>
7586 <RESULT IF_PASS COUNT 1>
7587 (?im)\berror\b.+?Duplicate.+?parameter.+?par_2
7588 <END_RESULT>
7589 <RESULT IF_PASS COUNT 1>
7590 (?im)\bnote\b.+?Parameter.+?par_2.+?already.+?here
7591 <END_RESULT>
7592 <RESULT IF_PASS COUNT 1>
7593 (?is)\berror:
7594 <END_RESULT>
7595 <RESULT IF_PASS POSITIVE>
7596 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7597 <END_RESULT>
7598
7599 <END_TC>
7600 :exmp.
7601
7602 :np.
7603 .*---------------------------------------------------------------------*
7604 :h2.Ambiguous symbol reference
7605 .*---------------------------------------------------------------------*
7606 This test case group covers the requirement SA-3/3.
7607 :p. Explanation:
7608 :nl.SA shall detect if a symbol reference is ambiguous.
7609
7610 :p.Test strategy:
7611 :nl. Every test has an explanation for the rule. The testcases are
7612 clear. See there.
7613
7614 .*---------------------------------------------------------------------*
7615 :h3.TTCN-3::AmbiguousSymbolReference->A.B notation
7616 .*---------------------------------------------------------------------*
7617 Requirement: A.B notation.
7618 :p. Explanation:
7619 :nl.A.B notation may refer to modul A or a local type called A ( where
7620 :nl.the name of the current module may be A or something else ).
7621
7622 :xmp tab=0.
7623
7624 <TC - TTCN-3::AmbiguousSymbolReference->A.B notation>
7625
7626 <COMPILE>
7627 <VERDICT_LEAF PASS>
7628 <MODULE TTCN A A.ttcn>
7629 module A {
7630 type integer B;
7631 type record Rec {
7632 A.B field // "A" meaning the module identifier
7633 }
7634 function Func(Rec FuncIn) return integer {
7635 return FuncIn.field;
7636 }
7637 control {
7638 var integer X := Func( {5} );
7639 }
7640 }
7641 <END_MODULE>
7642 <MODULE TTCN AA AA.ttcn>
7643 module AA {
7644 type boolean B;
7645 type record AA {
7646 integer B
7647 }
7648 type record Rec {
7649 AA.B field // "AA" meaning the record type not the module identifier
7650 }
7651 function Func(Rec FuncIn) return integer {
7652 return FuncIn.field;
7653 }
7654 control {
7655 var integer X := Func( {5} );
7656 }
7657 }
7658 <END_MODULE>
7659 <MODULE TTCN AAA AAA.ttcn>
7660 module AAA {
7661 type integer B;
7662 type record AAA {
7663 boolean B
7664 }
7665 type record Rec {
7666 AAA.objid{0 4 0}.B field // "AAA" meaning the record type not the module identifier
7667 }
7668 function Func(Rec FuncIn) return integer {
7669 return FuncIn.field;
7670 }
7671 control {
7672 var integer X := Func( {5} );
7673 }
7674 }
7675 <END_MODULE>
7676 <RESULT IF_PASS COUNT 2>
7677 (?im)\bwarning\b.+?Definition.+?AA.+?hides.+?module
7678 <END_RESULT>
7679 <RESULT IF_PASS POSITIVE>
7680 (?im)\bnotify\b.+?Generating.+?code
7681 <END_RESULT>
7682
7683 <END_TC>
7684 :exmp.
7685
7686 .*---------------------------------------------------------------------*
7687 :h3.TTCN-3::AmbiguousSymbolReference->Same name difference objid
7688 .*---------------------------------------------------------------------*
7689 Requirement: A.B notation.
7690 :p. Explanation:
7691 :nl.Two module names are the same but have different objid value, but a
7692 :nl.reference is used only with the module name.
7693 :p. NOTE: Objid is not supported yet in the module name.
7694
7695 :xmp tab=0.
7696
7697 <TC - TTCN-3::AmbiguousSymbolReference->Same name difference objid>
7698
7699 <COMPILE>
7700 <VERDICT_LEAF PASS>
7701 <MODULE TTCN A0 A0.ttcn>
7702 module A.objid{0 4 0} {
7703 type integer B;
7704 }
7705 <END_MODULE>
7706 <MODULE TTCN A1 A1.ttcn>
7707 module A.objid{0 4 1} {
7708 type boolean B;
7709 }
7710 <END_MODULE>
7711 <MODULE TTCN B B.ttcn>
7712 module B {
7713 import from A.objid{0 4 0} all;
7714 import from A.objid{0 4 1} all;
7715 type record Rec1{
7716 A.objid{0 4 0}.B field1, //reference is unambiguous
7717 A.objid{0 4 1}.B field2 //reference is unambiguous
7718 }
7719 type record Rec2{
7720 A.B field1 //reference is ambiguous
7721 }
7722 }
7723 <END_MODULE>
7724 <RESULT IF_PASS COUNT 1>
7725 (?im)\berror\b.+?module.+?identifier.+?A.+?already
7726 <END_RESULT>
7727 <RESULT IF_PASS COUNT 1>
7728 (?im)\berror\b.+?This.+?first.+?module
7729 <END_RESULT>
7730 <RESULT IF_PASS COUNT 2>
7731 (?is)\berror:
7732 <END_RESULT>
7733 <RESULT IF_PASS POSITIVE>
7734 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7735 <END_RESULT>
7736
7737 <END_TC>
7738 :exmp.
7739
7740 .*---------------------------------------------------------------------*
7741 :h3.TTCN-3::AmbiguousSymbolReference->Two symbols with the same name are imported
7742 .*---------------------------------------------------------------------*
7743 Requirement: A.B notation.
7744 :p. Explanation:
7745 :nl.Two symbols with the same name are imported from two modules. A reference
7746 like 'A' is ambiguous.
7747
7748 :xmp tab=0.
7749
7750 <TC - TTCN-3::AmbiguousSymbolReference->Two symbols with the same name are imported>
7751
7752 <COMPILE>
7753 <VERDICT_LEAF PASS>
7754 <MODULE TTCN ModuleA ModuleA.ttcn>
7755 module ModuleA {
7756 import from ModuleB all;
7757 import from ModuleC all;
7758 type record ModuleA { T field }
7759 }
7760 <END_MODULE>
7761 <MODULE TTCN ModuleB ModuleB.ttcn>
7762 module ModuleB {
7763 type integer T;
7764 }
7765 <END_MODULE>
7766 <MODULE TTCN ModuleC ModuleC.ttcn>
7767 module ModuleC {
7768 type integer T;
7769 }
7770 <END_MODULE>
7771 <RESULT IF_PASS COUNT 1>
7772 (?im)\bwarning\b.+?Definition.+?ModuleA.+?hides.+?module
7773 <END_RESULT>
7774 <RESULT IF_PASS COUNT 1>
7775 (?im)\berror\b.+?resolve.+?reference.+?unambiguously
7776 <END_RESULT>
7777 <RESULT IF_PASS COUNT 1>
7778 (?is)\berror:
7779 <END_RESULT>
7780 <RESULT IF_PASS POSITIVE>
7781 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7782 <END_RESULT>
7783
7784 <END_TC>
7785 :exmp.
7786
7787 :np.
7788 .*---------------------------------------------------------------------*
7789 :h2.Imports
7790 .*---------------------------------------------------------------------*
7791 This test case group covers the requirement SA-3/4.
7792 :p. Explanation:
7793 :nl. Special rules applied when importing identifiers.
7794
7795 :p.Test strategy:
7796 :nl. Every test group has an explanation for the rule. The testcases are
7797 clear. See there.
7798
7799 :p.TODO:
7800 :nl. Harmonize the specification and the implementation (e.g. recursive,
7801 selective import).
7802
7803 .*---------------------------------------------------------------------*
7804 :h3.TTCN-3::Import->Objid in the modulename in import part
7805 .*---------------------------------------------------------------------*
7806 Requirement: Objid in the modulename in import part (7.5.0).
7807 :p. Explanation:
7808 :nl.If the object identifier is provided as part of the module name (from
7809 which the definitions are imported from) in the import statement, this
7810 object identifier shall be used to identify the correct module.
7811 :p. NOTE: objid value is currently ignored, thus only the module name is
7812 considered when identifying a module.
7813
7814 .*---------------------------------------------------------------------*
7815 :h3.TTCN-3::Import->Attributes of the imported definitions
7816 .*---------------------------------------------------------------------*
7817 Requirement: Attributes of the imported definitions (7.5.0).
7818 :p. Explanation:
7819 :nl.If an imported definition has attributes (defined by means of a with
7820 statement) then the attributes shall also be imported. If the module has
7821 global attributes they are associated to definitions without these
7822 attributes.
7823 :p. NOTE: how to verify? should be covered in codec tests ?
7824
7825 .*---------------------------------------------------------------------*
7826 :h3.TTCN-3::Import->Only top-level definitions: control part
7827 .*---------------------------------------------------------------------*
7828 Requirement: Only top-level definitions (7.5.2)
7829 :p. Explanation:
7830 :nl.Only top-level definitions in the module may be imported.
7831 :nl.Definitions which occur at a lower scope (e.g. local constants defined
7832 in a function) shall not be imported.
7833
7834 :xmp tab=0.
7835
7836 <TC - TTCN-3::Import->Only top-level definitions: control part>
7837
7838 <COMPILE>
7839 <VERDICT_LEAF PASS>
7840 <MODULE TTCN ModuleA ModuleA.ttcn>
7841 module ModuleA {
7842 import from ModuleB all;
7843 const integer MyConst := B;
7844 }
7845 <END_MODULE>
7846 <MODULE TTCN ModuleB ModuleB.ttcn>
7847 module ModuleB {
7848 control {
7849 const integer B := 222;
7850 }
7851 }
7852 <END_MODULE>
7853 <RESULT IF_PASS COUNT 1>
7854 (?im)\berror\b.+?no.+?imported.+?definition.+?B
7855 <END_RESULT>
7856 <RESULT IF_PASS COUNT 1>
7857 (?is)\berror:
7858 <END_RESULT>
7859 <RESULT IF_PASS POSITIVE>
7860 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7861 <END_RESULT>
7862
7863 <END_TC>
7864 :exmp.
7865
7866 .*---------------------------------------------------------------------*
7867 :h3.TTCN-3::Import->Only top-level definitions: component type
7868 .*---------------------------------------------------------------------*
7869 :xmp tab=0.
7870 <TC - TTCN-3::Import->Only top-level definitions: component type>
7871
7872 <COMPILE>
7873 <VERDICT_LEAF PASS>
7874 <MODULE TTCN ModuleA ModuleA.ttcn>
7875 module ModuleA {
7876 import from ModuleB all;
7877 const integer MyConst := B;
7878 }
7879 <END_MODULE>
7880 <MODULE TTCN ModuleB ModuleB.ttcn>
7881 module ModuleB {
7882 type component CT {
7883 const integer B := 222;
7884 }
7885 }
7886 <END_MODULE>
7887 <RESULT IF_PASS COUNT 1>
7888 (?im)\berror\b.+?no.+?imported.+?definition.+?B
7889 <END_RESULT>
7890 <RESULT IF_PASS COUNT 1>
7891 (?is)\berror:
7892 <END_RESULT>
7893 <RESULT IF_PASS POSITIVE>
7894 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7895 <END_RESULT>
7896
7897 <END_TC>
7898 :exmp.
7899
7900 .*---------------------------------------------------------------------*
7901 :h3.TTCN-3::Import->Only top-level definitions: function
7902 .*---------------------------------------------------------------------*
7903 :xmp tab=0.
7904 <TC - TTCN-3::Import->Only top-level definitions: function>
7905
7906 <COMPILE>
7907 <VERDICT_LEAF PASS>
7908 <MODULE TTCN ModuleA ModuleA.ttcn>
7909 module ModuleA {
7910 import from ModuleB all;
7911 const integer MyConst := B;
7912 }
7913 <END_MODULE>
7914 <MODULE TTCN ModuleB ModuleB.ttcn>
7915 module ModuleB {
7916 function FUN() {
7917 const integer B := 222;
7918 }
7919 }
7920 <END_MODULE>
7921 <RESULT IF_PASS COUNT 1>
7922 (?im)\berror\b.+?no.+?imported.+?definition.+?B
7923 <END_RESULT>
7924 <RESULT IF_PASS COUNT 1>
7925 (?is)\berror:
7926 <END_RESULT>
7927 <RESULT IF_PASS POSITIVE>
7928 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7929 <END_RESULT>
7930
7931 <END_TC>
7932 :exmp.
7933
7934 .*---------------------------------------------------------------------*
7935 :h3.TTCN-3::Import->Only top-level definitions: altstep
7936 .*---------------------------------------------------------------------*
7937 :xmp tab=0.
7938 <TC - TTCN-3::Import->Only top-level definitions: altstep>
7939
7940 <COMPILE>
7941 <VERDICT_LEAF PASS>
7942 <MODULE TTCN ModuleA ModuleA.ttcn>
7943 module ModuleA {
7944 import from ModuleB all;
7945 const integer MyConst := B;
7946 }
7947 <END_MODULE>
7948 <MODULE TTCN ModuleB ModuleB.ttcn>
7949 module ModuleB {
7950 altstep ALT() {
7951 const integer B := 222;
7952 [else] {};
7953 }
7954 }
7955 <END_MODULE>
7956 <RESULT IF_PASS COUNT 1>
7957 (?im)\berror\b.+?no.+?imported.+?definition.+?B
7958 <END_RESULT>
7959 <RESULT IF_PASS COUNT 1>
7960 (?is)\berror:
7961 <END_RESULT>
7962 <RESULT IF_PASS POSITIVE>
7963 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7964 <END_RESULT>
7965
7966 <END_TC>
7967 :exmp.
7968
7969 .*---------------------------------------------------------------------*
7970 :h3.TTCN-3::Import->Only top-level definitions: function_runs_on
7971 .*---------------------------------------------------------------------*
7972 :xmp tab=0.
7973 <TC - TTCN-3::Import->Only top-level definitions: function_runs_on>
7974
7975 <COMPILE>
7976 <VERDICT_LEAF PASS>
7977 <MODULE TTCN ModuleA ModuleA.ttcn>
7978 module ModuleA {
7979 import from ModuleB all;
7980 const integer MyConst := B;
7981 }
7982 <END_MODULE>
7983 <MODULE TTCN ModuleB ModuleB.ttcn>
7984 module ModuleB {
7985 type component CT {}
7986 function FWR() runs on CT {
7987 const integer B := 222;
7988 }
7989 }
7990 <END_MODULE>
7991 <RESULT IF_PASS COUNT 1>
7992 (?im)\berror\b.+?no.+?imported.+?definition.+?B
7993 <END_RESULT>
7994 <RESULT IF_PASS COUNT 1>
7995 (?is)\berror:
7996 <END_RESULT>
7997 <RESULT IF_PASS POSITIVE>
7998 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7999 <END_RESULT>
8000
8001 <END_TC>
8002 :exmp.
8003
8004 .*---------------------------------------------------------------------*
8005 :h3.TTCN-3::Import->Only top-level definitions: altstep_runs_on
8006 .*---------------------------------------------------------------------*
8007 :xmp tab=0.
8008 <TC - TTCN-3::Import->Only top-level definitions: altstep_runs_on>
8009
8010 <COMPILE>
8011 <VERDICT_LEAF PASS>
8012 <MODULE TTCN ModuleA ModuleA.ttcn>
8013 module ModuleA {
8014 import from ModuleB all;
8015 const integer MyConst := B;
8016 }
8017 <END_MODULE>
8018 <MODULE TTCN ModuleB ModuleB.ttcn>
8019 module ModuleB {
8020 type component CT {}
8021 altstep AWR() runs on CT {
8022 const integer B := 222;
8023 [else] {};
8024 }
8025 }
8026 <END_MODULE>
8027 <RESULT IF_PASS COUNT 1>
8028 (?im)\berror\b.+?no.+?imported.+?definition.+?B
8029 <END_RESULT>
8030 <RESULT IF_PASS COUNT 1>
8031 (?is)\berror:
8032 <END_RESULT>
8033 <RESULT IF_PASS POSITIVE>
8034 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
8035 <END_RESULT>
8036
8037 <END_TC>
8038 :exmp.
8039
8040 .*---------------------------------------------------------------------*
8041 :h3.TTCN-3::Import->Only top-level definitions: testcase
8042 .*---------------------------------------------------------------------*
8043 :xmp tab=0.
8044 <TC - TTCN-3::Import->Only top-level definitions: testcase>
8045
8046 <COMPILE>
8047 <VERDICT_LEAF PASS>
8048 <MODULE TTCN ModuleA ModuleA.ttcn>
8049 module ModuleA {
8050 import from ModuleB all;
8051 const integer MyConst := B;
8052 }
8053 <END_MODULE>
8054 <MODULE TTCN ModuleB ModuleB.ttcn>
8055 module ModuleB {
8056 type component CT {}
8057 testcase TC() runs on CT {
8058 const integer B := 222;
8059 }
8060 }
8061 <END_MODULE>
8062 <RESULT IF_PASS COUNT 1>
8063 (?im)\berror\b.+?no.+?imported.+?definition.+?B
8064 <END_RESULT>
8065 <RESULT IF_PASS COUNT 1>
8066 (?is)\berror:
8067 <END_RESULT>
8068 <RESULT IF_PASS POSITIVE>
8069 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
8070 <END_RESULT>
8071
8072 <END_TC>
8073 :exmp.
8074
8075 .*---------------------------------------------------------------------*
8076 :h3.TTCN-3::Import->Direct importing
8077 .*---------------------------------------------------------------------*
8078 Requirement: Direct importing (7.5.2).
8079 :p. Explanation:
8080 :nl.Only direct importing from the source module of a definition (i.e.
8081 the module where the actual definition for the identifier referenced
8082 in the import statement resides) is allowed.
8083
8084 :xmp tab=0.
8085
8086 <TC - TTCN-3::Import->Direct importing>
8087
8088 <COMPILE>
8089 <VERDICT_LEAF PASS>
8090 <MODULE TTCN ModuleA ModuleA.ttcn>
8091 module ModuleA {
8092 import from ModuleB all;
8093 type MyType MyType3;
8094 type MyType2 MyType4;
8095 }
8096 <END_MODULE>
8097 <MODULE TTCN ModuleB ModuleB.ttcn>
8098 module ModuleB {
8099 import from ModuleC all;
8100 type MyType MyType2;
8101 }
8102 <END_MODULE>
8103 <MODULE TTCN ModuleC ModuleC.ttcn>
8104 module ModuleC {
8105 type integer MyType;
8106 }
8107 <END_MODULE>
8108 <RESULT IF_PASS COUNT 1>
8109 (?im)\berror\b.+?no.+?definition.+?\bMyType\b
8110 <END_RESULT>
8111 <RESULT IF_PASS COUNT 1>
8112 (?is)\berror:
8113 <END_RESULT>
8114 <RESULT IF_PASS POSITIVE>
8115 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
8116 <END_RESULT>
8117
8118 <END_TC>
8119 :exmp.
8120
8121 .*---------------------------------------------------------------------*
8122 :h3.TTCN-3::Import->Field name importing
8123 .*---------------------------------------------------------------------*
8124 Requirement: Field name importing (7.5.2).
8125 :p. Explanation:
8126 :nl.A definition is imported together with its name and all local definitions.
8127 :p. NOTE: A local definition, e.g. a field name of a user-defined record type,
8128 only has meaning in the context of the definitions in which it is defined,
8129 e.g. the field name of a record type can only be used to access a field of
8130 the record type and not outside this context.
8131
8132 :xmp tab=0.
8133
8134 <TC - TTCN-3::Import->Field name importing>
8135
8136 <COMPILE>
8137 <VERDICT_LEAF PASS>
8138 <MODULE TTCN ModuleA ModuleA.ttcn>
8139 module ModuleA {
8140 import from ModuleB all;
8141 control {
8142 var integer MyInt := field1;
8143 }
8144 }
8145 <END_MODULE>
8146 <MODULE TTCN ModuleB ModuleB.ttcn>
8147 module ModuleB {
8148 type record RecType {
8149 integer field1,
8150 boolean field2
8151 }
8152 }
8153 <END_MODULE>
8154 <RESULT IF_PASS COUNT 1>
8155 (?im)\berror\b.+?no.+?imported.+?definition.+?field1
8156 <END_RESULT>
8157 <RESULT IF_PASS COUNT 1>
8158 (?is)\berror:
8159 <END_RESULT>
8160 <RESULT IF_PASS POSITIVE>
8161 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
8162 <END_RESULT>
8163
8164 <END_TC>
8165 :exmp.
8166
8167 .*---------------------------------------------------------------------*
8168 :h3.TTCN-3::Import->Transitive importing
8169 .*---------------------------------------------------------------------*
8170 Requirement: Transitive importing (7.5.2).
8171 :p. Explanation:
8172 :nl.A definition is imported together with all information of referenced
8173 definitions that are necessary for the usage of the referenced definition.
8174 :p. NOTE: Import statement are transitive, e.g. if a module A imports a
8175 a definition from module B that uses a type reference defined in module C,
8176 the corresponding information necessary for the the usage of that type
8177 is automatically imported into module A.
8178
8179 :xmp tab=0.
8180
8181 <TC - TTCN-3::Import->Transitive importing>
8182
8183 <COMPILEGCC>
8184 <VERDICT_LEAF PASS>
8185 <MODULE TTCN ModuleA ModuleA.ttcn>
8186 module ModuleA {
8187 import from ModuleB all;
8188 const MyTypeB MyConst := { field1 := 10, field2 := McHalls }
8189 }
8190 <END_MODULE>
8191 <MODULE TTCN ModuleB ModuleB.ttcn>
8192 module ModuleB {
8193 import from ModuleC all;
8194 type record MyTypeB { integer field1, HiddenType field2 };
8195 }
8196 <END_MODULE>
8197 <MODULE TTCN ModuleC ModuleC.ttcn>
8198 module ModuleC {
8199 type enumerated HiddenType { McHalls(0), was(1), here(9) };
8200 }
8201 <END_MODULE>
8202 <RESULT IF_PASS NEGATIVE>
8203 (?is)\berror:
8204 <END_RESULT>
8205 <RESULT IF_PASS POSITIVE>
8206 (?im)\bnotify\b.+?\bGenerating\b.+?\bcode\b
8207 <END_RESULT>
8208
8209 <END_TC>
8210 :exmp.
8211
8212 .*---------------------------------------------------------------------*
8213 :h3.TTCN-3::Import->Non-recursive importing
8214 .*---------------------------------------------------------------------*
8215 Requirement: Non-recursive importing (7.5.2).
8216 :p. Explanation:
8217 :nl.As default, the identifiers of referenced definitions are not
8218 automatically imported. If the identifiers of the referenced
8219 definitions are wished to be implicitly imported, the recursive
8220 directive shall be used.
8221
8222 :xmp tab=0.
8223
8224 <TC - TTCN-3::Import->Non-recursive importing>
8225
8226 <COMPILE>
8227 <VERDICT_LEAF PASS>
8228 <MODULE TTCN ModuleA ModuleA.ttcn>
8229 module ModuleA {
8230 import from ModuleB all;
8231 const MyTypeB MyConst := { field1 := 10, field2 := McHalls }
8232 const HiddenType MyConst2 := was;
8233 }
8234 <END_MODULE>
8235 <MODULE TTCN ModuleB ModuleB.ttcn>
8236 module ModuleB {
8237 import from ModuleC all;
8238 type record MyTypeB { integer field1, HiddenType field2 };
8239 }
8240 <END_MODULE>
8241 <MODULE TTCN ModuleC ModuleC.ttcn>
8242 module ModuleC {
8243 type enumerated HiddenType { McHalls(0), was(1), here(9) };
8244 }
8245 <END_MODULE>
8246 <RESULT IF_PASS COUNT 1>
8247 (?im)\berror\b.+?no.+?definition.+?\bHiddenType\b
8248 <END_RESULT>
8249 <RESULT IF_PASS COUNT 1>
8250 (?im)\berror\b.+?no.+?definition.+?\bwas\b
8251 <END_RESULT>
8252 <RESULT IF_PASS COUNT 2>
8253 (?is)\berror:
8254 <END_RESULT>
8255 <RESULT IF_PASS POSITIVE>
8256 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
8257 <END_RESULT>
8258
8259 <END_TC>
8260 :exmp.
8261
8262 .*---------------------------------------------------------------------*
8263 :h3.TTCN-3::Import->Recursive importing are not transitive in module boundaries
8264 .*---------------------------------------------------------------------*
8265 Requirement: Recursive importing are not transitive in module boundaries (7.5.2).
8266 :p. Explanation:
8267 :nl.As default, the identifiers of referenced definitions are not
8268 automatically imported. If the identifiers of the referenced definitions
8269 are wished to be implicitly imported, the recursive directive shall be
8270 used.
8271 :p.NOTE: since selective importing is not supported, this requirement cannot
8272 be tested, only that no difference is shown no matter whether 'recursive'
8273 is used or not.
8274
8275 :xmp tab=0.
8276
8277 <TC - TTCN-3::Import->Recursive importing are not transitive in module boundaries>
8278
8279 <COMPILE>
8280 <VERDICT_LEAF PASS>
8281 <MODULE TTCN ModuleA ModuleA.ttcn>
8282 module ModuleA {
8283 import from ModuleB recursive all;
8284 const MyTypeB MyConst := { field1 := 10, field2 := McHalls }
8285 const HiddenType MyConst2 := was;
8286 }
8287 <END_MODULE>
8288 <MODULE TTCN ModuleB ModuleB.ttcn>
8289 module ModuleB {
8290 import from ModuleC all;
8291 type record MyTypeB { integer field1, HiddenType field2 };
8292 }
8293 <END_MODULE>
8294 <MODULE TTCN ModuleC ModuleC.ttcn>
8295 module ModuleC {
8296 type enumerated HiddenType { McHalls(0), was(1), here(9) };
8297 }
8298 <END_MODULE>
8299 <RESULT IF_PASS COUNT 1>
8300 (?im)\berror\b.+?no.+?definition.+?\bHiddenType\b
8301 <END_RESULT>
8302 <RESULT IF_PASS COUNT 1>
8303 (?im)\berror\b.+?no.+?definition.+?\bwas\b
8304 <END_RESULT>
8305 <RESULT IF_PASS COUNT 2>
8306 (?is)\berror:
8307 <END_RESULT>
8308 <RESULT IF_PASS POSITIVE>
8309 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
8310 <END_RESULT>
8311
8312 <END_TC>
8313 :exmp.
8314
8315 .*---------------------------------------------------------------------*
8316 :h3.TTCN-3::Import->Selective imports
8317 .*---------------------------------------------------------------------*
8318 Requirement: Selective imports (7.5.2.f, 7.5.4, 7.5.7).
8319 :p. Explanation:
8320 :nl.When importing a type, function, altstep or testcase the corresponding
8321 behaviour specifications and all definitions used inside the behaviour
8322 specifications remain invisible for the importing module.
8323 :p. NOTE: Selective imports are not supported
8324 :nl.The result is positive but the implementation is inconsistent according
8325 to the TTCN-3 specification
8326
8327 :xmp tab=0.
8328
8329 <TC - TTCN-3::Import->Selective imports>
8330
8331 <COMPILE>
8332 <VERDICT_LEAF PASS>
8333 <MODULE TTCN ModuleA ModuleA.ttcn>
8334 module ModuleA {
8335 import from ModuleB {
8336 function TC
8337 };
8338 type record RecTypeA {
8339 RecTypeB field_1,
8340 RecTypeB field_2
8341 }
8342 function FWR() runs on CT {}
8343 control {
8344 execute ( TC( {15,true} ) );
8345 }
8346 }
8347 <END_MODULE>
8348 <MODULE TTCN ModuleB ModuleB.ttcn>
8349 module ModuleB {
8350 type record RecTypeB {
8351 integer field1,
8352 boolean field2
8353 }
8354 type component CT {}
8355 testcase TC( RecTypeB MyPar ) runs on CT {}
8356 }
8357 <END_MODULE>
8358 <RESULT IF_PASS COUNT 1>
8359 (?im)\bwarning\b.+?Unsupported.+?selective.+?import
8360 <END_RESULT>
8361 <RESULT IF_PASS POSITIVE>
8362 (?im)\bnotify\b.+?Generating.+?code
8363 <END_RESULT>
8364
8365 <END_TC>
8366 :exmp.
8367
8368 .*---------------------------------------------------------------------*
8369 :h3.TTCN-3::Import->Circular imports
8370 .*---------------------------------------------------------------------*
8371 Requirement: Circular imports (7.5.2).
8372 :p. Explanation:
8373 :nl.Circular imports are forbidden
8374 :p. NOTE: Circular imports are allowed and reported as warnings
8375
8376 :xmp tab=0.
8377
8378 <TC - TTCN-3::Import->Circular imports>
8379
8380 <COMPILEGCC>
8381 <VERDICT_LEAF PASS>
8382 <MODULE TTCN ModuleA ModuleA.ttcn>
8383 module ModuleA {
8384 import from ModuleB all;
8385 }
8386 <END_MODULE>
8387 <MODULE TTCN ModuleB ModuleB.ttcn>
8388 module ModuleB {
8389 import from ModuleC all;
8390 }
8391 <END_MODULE>
8392 <MODULE TTCN ModuleC ModuleC.ttcn>
8393 module ModuleC {
8394 import from ModuleA all;
8395 }
8396 <END_MODULE>
8397 <RESULT IF_PASS COUNT 3>
8398 (?im)\bwarning\b.+?Circular.+?import
8399 <END_RESULT>
8400 <RESULT IF_PASS NEGATIVE>
8401 (?is)\berror:
8402 <END_RESULT>
8403 <RESULT IF_PASS POSITIVE>
8404 (?im)\bnotify\b.+?\bGenerating\b.+?\bcode\b
8405 <END_RESULT>
8406
8407 <END_TC>
8408 :exmp.
8409
8410 .*---------------------------------------------------------------------*
8411 :h3.TTCN-3::Import->Import from the same module
8412 .*---------------------------------------------------------------------*
8413 Requirement: Import from the same module (7.5).
8414 :p. Explanation:
8415 :nl.A module cannot import from itself.
8416
8417 :xmp tab=0.
8418
8419 <TC - TTCN-3::Import->Import from the same module>
8420
8421 <COMPILE>
8422 <VERDICT_LEAF PASS>
8423 <MODULE TTCN ModuleA ModuleA.ttcn>
8424 module ModuleA {
8425 import from ModuleA all;
8426 const integer MyConst := 666;
8427 }
8428 <END_MODULE>
8429 <RESULT IF_PASS COUNT 1>
8430 (?im)\berror\b.+?cannot.+?import.+?itself
8431 <END_RESULT>
8432 <RESULT IF_PASS COUNT 1>
8433 (?is)\berror:
8434 <END_RESULT>
8435 <RESULT IF_PASS POSITIVE>
8436 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
8437 <END_RESULT>
8438
8439 <END_TC>
8440 :exmp.
8441
8442 .*---------------------------------------------------------------------*
8443 :h3.TTCN-3::Import->Duplicated import
8444 .*---------------------------------------------------------------------*
8445 Requirement: Duplicated import (7.5).
8446 :p. Explanation:
8447 :nl.A modulename is listed twice to import from, not problem but inefficient.
8448
8449 :xmp tab=0.
8450
8451 <TC - TTCN-3::Import->Duplicated import>
8452
8453 <COMPILE>
8454 <VERDICT_LEAF PASS>
8455 <MODULE TTCN ModuleA ModuleA.ttcn>
8456 module ModuleA {
8457 import from ModuleB all;
8458 import from ModuleB all;
8459 const integer MyConst := 666;
8460 }
8461 <END_MODULE>
8462 <MODULE TTCN ModuleB ModuleB.ttcn>
8463 module ModuleB {
8464 const integer MyConstB := 666;
8465 }
8466 <END_MODULE>
8467 <RESULT IF_PASS NEGATIVE>
8468 (?is)\berror:
8469 <END_RESULT>
8470 <RESULT IF_PASS POSITIVE>
8471 (?im)Notify: File `ModuleA.hh' was generated.
8472 <END_RESULT>
8473 <END_TC>
8474
8475 <END_TC>
8476 :exmp.
8477
8478 .*---------------------------------------------------------------------*
8479 :h3.TTCN-3::Import->Importing groups
8480 .*---------------------------------------------------------------------*
8481 Requirement: Importing groups (7.5.6).
8482 :p.NOTE: Groups cannot be imported
8483
8484 .*---------------------------------------------------------------------*
8485 :h3.TTCN-3::Import->Name clash on import->Same identifier is imported
8486 .*---------------------------------------------------------------------*
8487 Requirement: Name clash on import (7.5.8).
8488 :p. Explanation:
8489 :nl.Two identical identifiers are used in two different modules. If these
8490 identifiers are imported into the same module, it is not possible to
8491 differentiate them unless they are prefixed with the module's name.
8492
8493 :xmp tab=0.
8494
8495 <TC - TTCN-3::Import->Name clash on import->Same identifier is imported>
8496
8497 <COMPILE>
8498 <VERDICT_LEAF PASS>
8499 <MODULE TTCN ModuleA ModuleA.ttcn>
8500 module ModuleA {
8501 import from ModuleB all;
8502 import from ModuleC all;
8503 // TR 630: Error message is not really applicable
8504 const MyType MyConst := 10;
8505 const ModuleB.MyType MyConst2 := 10;
8506 }
8507 <END_MODULE>
8508 <MODULE TTCN ModuleB ModuleB.ttcn>
8509 module ModuleB {
8510 type integer MyType;
8511 }
8512 <END_MODULE>
8513 <MODULE TTCN ModuleC ModuleC.ttcn>
8514 module ModuleC {
8515 type integer MyType;
8516 }
8517 <END_MODULE>
8518 <RESULT IF_PASS COUNT 1>
8519 (?im)\berror\b.+?resolve.+?reference.+?unambiguously
8520 <END_RESULT>
8521 <RESULT IF_PASS COUNT 1>
8522 (?is)\berror:
8523 <END_RESULT>
8524 <RESULT IF_PASS POSITIVE>
8525 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
8526 <END_RESULT>
8527
8528 <END_TC>
8529 :exmp.
8530
8531 .*---------------------------------------------------------------------*
8532 :h3.TTCN-3::Import->Name clash on import->A.B notation
8533 .*---------------------------------------------------------------------*
8534 Requirement: Name clash on import (7.5.8).
8535 :p. Explanation:
8536 :nl.A reference cannot be resolved if the imported module "A" uses an
8537 identifier "B" and there is a local variable or constant whose name
8538 is "A" and has a field named "B". The notation "A.B" causes confusion.
8539
8540 :xmp tab=0.
8541
8542 <TC - TTCN-3::Import->Name clash on import->A.B notation>
8543
8544 <COMPILE>
8545 <VERDICT_LEAF PASS>
8546 <MODULE TTCN ModuleA ModuleA.ttcn>
8547 module ModuleA {
8548 import from ModuleB all;
8549 type record MyType { integer B }
8550 const MyType ModuleB := { B := 10 };
8551 // TR 631: name clash using the A.B notation
8552 const integer MyConst1 := ModuleB.B;
8553 const integer MyConst2 := ModuleA.ModuleB.B;
8554 }
8555 <END_MODULE>
8556 <MODULE TTCN ModuleB ModuleB.ttcn>
8557 module ModuleB {
8558 const integer B := 666;
8559 }
8560 <END_MODULE>
8561 <RESULT IF_PASS COUNT 1>
8562 (?im)\bwarning\b.+?Definition.+?ModuleB.+?hides
8563 <END_RESULT>
8564 <RESULT IF_PASS NEGATIVE>
8565 (?is)\berror:
8566 <END_RESULT>
8567 <RESULT IF_PASS POSITIVE>
8568 (?im)\bnotify\b.+?\bGenerating\b.+?\bcode\b
8569 <END_RESULT>
8570
8571 <END_TC>
8572 :exmp.
8573
8574 :np.
8575 .*---------------------------------------------------------------------*
8576 :h2.Uniqueness of field names
8577 .*---------------------------------------------------------------------*
8578 This test case group covers the requirement SA-3/5.
8579 :p. Explanation:
8580 :nl.- Field names within compound types shall be unique locally.
8581
8582 :p. Test strategy:
8583 :nl.- Make a testcase for every type where we can use fields.
8584
8585 .*---------------------------------------------------------------------*
8586 :h3.TTCN-3::Uniqueness_Of_Field_Names-> Record type
8587 .*---------------------------------------------------------------------*
8588 :xmp tab=0.
8589 <TC - TTCN-3::Uniqueness_Of_Field_Names-> Record type>
8590
8591 <COMPILE>
8592 <VERDICT_LEAF PASS>
8593 <MODULE TTCN ModuleA ModuleA.ttcn>
8594 module ModuleA {
8595 type record MyRecord {
8596 integer field1,
8597 charstring field2,
8598 integer field1,
8599 boolean field2 optional
8600 }
8601 }
8602 <END_MODULE>
8603 <RESULT IF_PASS COUNT 1>
8604 (?im)\berror\b.+?Duplicate.+?field.+?name.+?field1
8605 <END_RESULT>
8606 <RESULT IF_PASS COUNT 1>
8607 (?im)\bnote\b.+?Field.+?field1.+?here
8608 <END_RESULT>
8609 <RESULT IF_PASS COUNT 1>
8610 (?im)\berror\b.+?Duplicate.+?field.+?name.+?field2
8611 <END_RESULT>
8612 <RESULT IF_PASS COUNT 1>
8613 (?im)\bnote\b.+?Field.+?field2.+?here
8614 <END_RESULT>
8615 <RESULT IF_PASS COUNT 2>
8616 (?is)\berror:
8617 <END_RESULT>
8618 <RESULT IF_PASS POSITIVE>
8619 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
8620 <END_RESULT>
8621
8622 <END_TC>
8623 :exmp.
8624
8625 .*---------------------------------------------------------------------*
8626 :h3.TTCN-3::Uniqueness_Of_Field_Names-> Union type
8627 .*---------------------------------------------------------------------*
8628 :xmp tab=0.
8629 <TC - TTCN-3::Uniqueness_Of_Field_Names-> Union type>
8630
8631 <COMPILE>
8632 <VERDICT_LEAF PASS>
8633 <MODULE TTCN ModuleA ModuleA.ttcn>
8634 module ModuleA {
8635 type union MyUnion {
8636 integer field1,
8637 charstring field2,
8638 integer field1,
8639 boolean field2
8640 }
8641 }
8642 <END_MODULE>
8643 <RESULT IF_PASS COUNT 1>
8644 (?im)\berror\b.+?Duplicate.+?field.+?name.+?field1
8645 <END_RESULT>
8646 <RESULT IF_PASS COUNT 1>
8647 (?im)\bnote\b.+?Field.+?field1.+?here
8648 <END_RESULT>
8649 <RESULT IF_PASS COUNT 1>
8650 (?im)\berror\b.+?Duplicate.+?field.+?name.+?field2
8651 <END_RESULT>
8652 <RESULT IF_PASS COUNT 1>
8653 (?im)\bnote\b.+?Field.+?field2.+?here
8654 <END_RESULT>
8655 <RESULT IF_PASS COUNT 2>
8656 (?is)\berror:
8657 <END_RESULT>
8658 <RESULT IF_PASS POSITIVE>
8659 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
8660 <END_RESULT>
8661
8662 <END_TC>
8663 :exmp.
8664
8665 .*---------------------------------------------------------------------*
8666 :h3.TTCN-3::Uniqueness_Of_Field_Names-> Set type
8667 .*---------------------------------------------------------------------*
8668 :xmp tab=0.
8669 <TC - TTCN-3::Uniqueness_Of_Field_Names-> Set type>
8670
8671 <COMPILE>
8672 <VERDICT_LEAF PASS>
8673 <MODULE TTCN ModuleA ModuleA.ttcn>
8674 module ModuleA {
8675 type set MySet {
8676 integer field1,
8677 charstring field2,
8678 integer field1,
8679 boolean field2 optional
8680 }
8681 }
8682 <END_MODULE>
8683 <RESULT IF_PASS COUNT 1>
8684 (?im)\berror\b.+?Duplicate.+?field.+?name.+?field1
8685 <END_RESULT>
8686 <RESULT IF_PASS COUNT 1>
8687 (?im)\bnote\b.+?Field.+?field1.+?here
8688 <END_RESULT>
8689 <RESULT IF_PASS COUNT 1>
8690 (?im)\berror\b.+?Duplicate.+?field.+?name.+?field2
8691 <END_RESULT>
8692 <RESULT IF_PASS COUNT 1>
8693 (?im)\bnote\b.+?Field.+?field2.+?here
8694 <END_RESULT>
8695 <RESULT IF_PASS COUNT 2>
8696 (?is)\berror:
8697 <END_RESULT>
8698 <RESULT IF_PASS POSITIVE>
8699 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
8700 <END_RESULT>
8701
8702 <END_TC>
8703 :exmp.
8704
8705 .*---------------------------------------------------------------------*
8706 :h3.TTCN-3::Uniqueness_Of_Field_Names-> Template
8707 .*---------------------------------------------------------------------*
8708 :xmp tab=0.
8709 <TC - TTCN-3::Uniqueness_Of_Field_Names-> Template>
8710
8711 <COMPILE>
8712 <VERDICT_LEAF PASS>
8713 <MODULE TTCN ModuleA ModuleA.ttcn>
8714 module ModuleA {
8715 type record MyMessageType {
8716 integer field1 optional,
8717 charstring field2,
8718 boolean field3,
8719 integer field4
8720 }
8721 template MyMessageType MyTemplate( integer par_1, boolean par_2, integer par_3 ) := {
8722 field1 := par_1,
8723 field2 := ?,
8724 field3 := par_2,
8725 field4 := par_1,
8726 field1 := par_3
8727 }
8728 }
8729 <END_MODULE>
8730 <RESULT IF_PASS COUNT 1>
8731 (?im)\berror\b.+?Duplicate.+?field.+?field1.+?template
8732 <END_RESULT>
8733 <RESULT IF_PASS COUNT 1>
8734 (?im)\bnote\b.+?Field.+?field1.+?here
8735 <END_RESULT>
8736 <RESULT IF_PASS COUNT 1>
8737 (?is)\berror:
8738 <END_RESULT>
8739 <RESULT IF_PASS POSITIVE>
8740 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
8741 <END_RESULT>
8742
8743 <END_TC>
8744 :exmp.
8745
8746 :np.
8747 .*---------------------------------------------------------------------*
8748 :h2.Uniqueness of enumeration identifiers
8749 .*---------------------------------------------------------------------*
8750 This test case group covers the requirement SA-3/6.
8751 :p. Explanation:
8752 :nl.- Enumeration identifiers shall be unique within the enumerated type.
8753 :nl.- Enumeration identifiers shall only be reused within other sructured
8754 type definitions (such as element identifiers) and shall not be used
8755 for identifiers of local or global visibility at the same or a lower
8756 level of the same branch of the scope hierarchy.
8757
8758 :p. Test strategy:
8759 :nl.- First the same enumeration identifiers are checked in the same
8760 enumerated type (one case).
8761 :nl.- The MDP bubble (enum definition) is checked with every bubble on the
8762 1.,2. and 3. levels (left to right direction).
8763 The whole branch is checked if a bubble has only one child.
8764 Every testcase is positive but it is not correct result because the
8765 implementation is inconsistent according to the TTCN-3 specification.
8766
8767 :p. TODO:
8768 :nl. Harmonize the specification and the implementation.
8769
8770 .*---------------------------------------------------------------------*
8771 :h3.TTCN-3::UniquenessEnumId-> Duplicated enumeration identifier
8772 .*---------------------------------------------------------------------*
8773 :xmp tab=0.
8774 <TC - TTCN-3::UniquenessEnumId-> Duplicated enumeration identifier>
8775
8776 <COMPILE>
8777 <VERDICT_LEAF PASS>
8778 <MODULE TTCN ModuleA ModuleA.ttcn>
8779 module ModuleA {
8780 type enumerated MyEnum {Monday, T, W, Monday};
8781 }
8782 <END_MODULE>
8783 <RESULT IF_PASS COUNT 1>
8784 (?im)\berror\b.+?Duplicate.+?identifier.+?Monday
8785 <END_RESULT>
8786 <RESULT IF_PASS COUNT 1>
8787 (?im)\bnote\b.+?Previous.+?Monday.+?here
8788 <END_RESULT>
8789 <RESULT IF_PASS COUNT 1>
8790 (?is)\berror:
8791 <END_RESULT>
8792 <RESULT IF_PASS POSITIVE>
8793 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
8794 <END_RESULT>
8795
8796 <END_TC>
8797 :exmp.
8798
8799 .*---------------------------------------------------------------------*
8800 :h3.TTCN-3::UniquenessEnumId-> Same level: another type identifier
8801 .*---------------------------------------------------------------------*
8802 :xmp tab=0.
8803 <TC - TTCN-3::UniquenessEnumId-> Same level: another type identifier>
8804
8805 <COMPILE>
8806 <VERDICT_LEAF PASS>
8807 <MODULE TTCN ModuleA ModuleA.ttcn>
8808 module ModuleA {
8809 type enumerated MyEnum {Monday, T, W};
8810 type integer Monday;
8811 }
8812 <END_MODULE>
8813 <RESULT IF_PASS NEGATIVE>
8814 (?is)\berror:
8815 <END_RESULT>
8816 <RESULT IF_PASS POSITIVE>
8817 (?im)\bnotify\b.+?\bGenerating\b.+?\bcode\b
8818 <END_RESULT>
8819
8820 <END_TC>
8821 :exmp.
8822
8823 .*---------------------------------------------------------------------*
8824 :h3.TTCN-3::UniquenessEnumId-> Same level: const identifier
8825 .*---------------------------------------------------------------------*
8826 :xmp tab=0.
8827 <TC - TTCN-3::UniquenessEnumId-> Same level: const identifier>
8828
8829 <COMPILE>
8830 <VERDICT_LEAF PASS>
8831 <MODULE TTCN ModuleA ModuleA.ttcn>
8832 module ModuleA {
8833 type enumerated MyEnum {Monday, T, W};
8834 const integer Monday := 1;
8835 }
8836 <END_MODULE>
8837 <RESULT IF_PASS NEGATIVE>
8838 (?is)\berror:
8839 <END_RESULT>
8840 <RESULT IF_PASS POSITIVE>
8841 (?im)\bnotify\b.+?\bGenerating\b.+?\bcode\b
8842 <END_RESULT>
8843
8844 <END_TC>
8845 :exmp.
8846
8847 .*---------------------------------------------------------------------*
8848 :h3.TTCN-3::UniquenessEnumId-> Control part: const identifier
8849 .*---------------------------------------------------------------------*
8850 :xmp tab=0.
8851 <TC - TTCN-3::UniquenessEnumId-> Control part: const identifier>
8852
8853 <COMPILEGCC>
8854 <VERDICT_LEAF PASS>
8855 <MODULE TTCN ModuleA ModuleA.ttcn>
8856 module ModuleA {
8857 type enumerated MyEnum {Monday, T, W};
8858 control {
8859 const integer Monday := 1;
8860 }
8861 }
8862 <END_MODULE>
8863 <RESULT IF_PASS NEGATIVE>
8864 (?is)\berror:
8865 <END_RESULT>
8866 <RESULT IF_PASS POSITIVE>
8867 (?im)\bnotify\b.+?\bGenerating\b.+?\bcode\b
8868 <END_RESULT>
8869
8870 <END_TC>
8871 :exmp.
8872
8873 .*---------------------------------------------------------------------*
8874 :h3.TTCN-3::UniquenessEnumId-> Component type identifier
8875 .*---------------------------------------------------------------------*
8876 :xmp tab=0.
8877 <TC - TTCN-3::UniquenessEnumId-> Component type identifier>
8878
8879 <COMPILE>
8880 <VERDICT_LEAF PASS>
8881 <MODULE TTCN ModuleA ModuleA.ttcn>
8882 module ModuleA {
8883 type enumerated MyEnum {Monday, T, W};
8884 type component Monday {}
8885 }
8886 <END_MODULE>
8887 <RESULT IF_PASS NEGATIVE>
8888 (?is)\berror:
8889 <END_RESULT>
8890 <RESULT IF_PASS POSITIVE>
8891 (?im)\bnotify\b.+?\bGenerating\b.+?\bcode\b
8892 <END_RESULT>
8893
8894 <END_TC>
8895 :exmp.
8896
8897 .*---------------------------------------------------------------------*
8898 :h3.TTCN-3::UniquenessEnumId-> Component type: const identifier
8899 .*---------------------------------------------------------------------*
8900 :xmp tab=0.
8901 <TC - TTCN-3::UniquenessEnumId-> Component type: const identifier>
8902
8903 <COMPILEGCC>
8904 <VERDICT_LEAF PASS>
8905 <MODULE TTCN ModuleA ModuleA.ttcn>
8906 module ModuleA {
8907 type enumerated MyEnum {Monday, T, W};
8908 type component MyCompType {
8909 const integer Monday := 1;
8910 }
8911 }
8912 <END_MODULE>
8913 <RESULT IF_PASS NEGATIVE>
8914 (?is)\berror:
8915 <END_RESULT>
8916 <RESULT IF_PASS POSITIVE>
8917 (?im)\bnotify\b.+?\bGenerating\b.+?\bcode\b
8918 <END_RESULT>
8919
8920 <END_TC>
8921 :exmp.
8922
8923 .*---------------------------------------------------------------------*
8924 :h3.TTCN-3::UniquenessEnumId-> Function identifier
8925 .*---------------------------------------------------------------------*
8926 :xmp tab=0.
8927 <TC - TTCN-3::UniquenessEnumId-> Function identifier>
8928
8929 <COMPILE>
8930 <VERDICT_LEAF PASS>
8931 <MODULE TTCN ModuleA ModuleA.ttcn>
8932 module ModuleA {
8933 type enumerated MyEnum {Monday, T, W};
8934 function Monday() {}
8935 }
8936 <END_MODULE>
8937 <RESULT IF_PASS NEGATIVE>
8938 (?is)\berror:
8939 <END_RESULT>
8940 <RESULT IF_PASS POSITIVE>
8941 (?im)\bnotify\b.+?\bGenerating\b.+?\bcode\b
8942 <END_RESULT>
8943
8944 <END_TC>
8945 :exmp.
8946
8947 .*---------------------------------------------------------------------*
8948 :h3.TTCN-3::UniquenessEnumId-> Function: const identifier
8949 .*---------------------------------------------------------------------*
8950 :xmp tab=0.
8951 <TC - TTCN-3::UniquenessEnumId-> Function: const identifier>
8952
8953 <COMPILEGCC>
8954 <VERDICT_LEAF PASS>
8955 <MODULE TTCN ModuleA ModuleA.ttcn>
8956 module ModuleA {
8957 type enumerated MyEnum {Monday, T, W};
8958 function MyFunc() {
8959 const integer Monday := 1;
8960 }
8961 }
8962 <END_MODULE>
8963 <RESULT IF_PASS NEGATIVE>
8964 (?is)\berror:
8965 <END_RESULT>
8966 <RESULT IF_PASS POSITIVE>
8967 (?im)\bnotify\b.+?\bGenerating\b.+?\bcode\b
8968 <END_RESULT>
8969
8970 <END_TC>
8971 :exmp.
8972
8973 .*---------------------------------------------------------------------*
8974 :h3.TTCN-3::UniquenessEnumId-> Altstep identifier
8975 .*---------------------------------------------------------------------*
8976 :xmp tab=0.
8977 <TC - TTCN-3::UniquenessEnumId-> Altstep identifier>
8978
8979 <COMPILE>
8980 <VERDICT_LEAF PASS>
8981 <MODULE TTCN ModuleA ModuleA.ttcn>
8982 module ModuleA {
8983 type enumerated MyEnum {Monday, T, W};
8984 altstep Monday() {
8985 [] any port.check {};
8986 [else] {};
8987 }
8988 }
8989 <END_MODULE>
8990 <RESULT IF_PASS NEGATIVE>
8991 (?is)\berror:
8992 <END_RESULT>
8993 <RESULT IF_PASS POSITIVE>
8994 (?im)\bnotify\b.+?\bGenerating\b.+?\bcode\b
8995 <END_RESULT>
8996
8997 <END_TC>
8998 :exmp.
8999
9000 .*---------------------------------------------------------------------*
9001 :h3.TTCN-3::UniquenessEnumId-> Altstep: const identifier
9002 .*---------------------------------------------------------------------*
9003 :xmp tab=0.
9004 <TC - TTCN-3::UniquenessEnumId-> Altstep: const identifier>
9005
9006 <COMPILEGCC>
9007 <VERDICT_LEAF PASS>
9008 <MODULE TTCN ModuleA ModuleA.ttcn>
9009 module ModuleA {
9010 type enumerated MyEnum {Monday, T, W};
9011 altstep MyAltstep() {
9012 const integer Monday := 1;
9013 [] any port.check {};
9014 [else] {};
9015 }
9016 }
9017 <END_MODULE>
9018 <RESULT IF_PASS NEGATIVE>
9019 (?is)\berror:
9020 <END_RESULT>
9021 <RESULT IF_PASS POSITIVE>
9022 (?im)\bnotify\b.+?\bGenerating\b.+?\bcode\b
9023 <END_RESULT>
9024
9025 <END_TC>
9026 :exmp.
9027
9028 .*---------------------------------------------------------------------*
9029 :h3.TTCN-3::UniquenessEnumId-> Function_runs_on identifier
9030 .*---------------------------------------------------------------------*
9031 :xmp tab=0.
9032 <TC - TTCN-3::UniquenessEnumId-> Function_runs_on identifier>
9033
9034 <COMPILE>
9035 <VERDICT_LEAF PASS>
9036 <MODULE TTCN ModuleA ModuleA.ttcn>
9037 module ModuleA {
9038 type enumerated MyEnum {Monday, T, W};
9039 type component MyCompType {}
9040 function Monday() runs on MyCompType {}
9041 }
9042 <END_MODULE>
9043 <RESULT IF_PASS NEGATIVE>
9044 (?is)\berror:
9045 <END_RESULT>
9046 <RESULT IF_PASS POSITIVE>
9047 (?im)\bnotify\b.+?\bGenerating\b.+?\bcode\b
9048 <END_RESULT>
9049
9050 <END_TC>
9051 :exmp.
9052
9053 .*---------------------------------------------------------------------*
9054 :h3.TTCN-3::UniquenessEnumId-> Function_runs_on: const identifier
9055 .*---------------------------------------------------------------------*
9056 :xmp tab=0.
9057 <TC - TTCN-3::UniquenessEnumId-> Function_runs_on: const identifier>
9058
9059 <COMPILEGCC>
9060 <VERDICT_LEAF PASS>
9061 <MODULE TTCN ModuleA ModuleA.ttcn>
9062 module ModuleA {
9063 type enumerated MyEnum {Monday, T, W};
9064 type component MyCompType {}
9065 function MyCompFunc() runs on MyCompType {
9066 const integer Monday := 3;
9067 }
9068 }
9069 <END_MODULE>
9070 <RESULT IF_PASS NEGATIVE>
9071 (?is)\berror:
9072 <END_RESULT>
9073 <RESULT IF_PASS POSITIVE>
9074 (?im)\bnotify\b.+?\bGenerating\b.+?\bcode\b
9075 <END_RESULT>
9076
9077 <END_TC>
9078 :exmp.
9079
9080 .*---------------------------------------------------------------------*
9081 :h3.TTCN-3::UniquenessEnumId-> Altstep_runs_on identifier
9082 .*---------------------------------------------------------------------*
9083 :xmp tab=0.
9084 <TC - TTCN-3::UniquenessEnumId-> Altstep_runs_on identifier>
9085
9086 <COMPILE>
9087 <VERDICT_LEAF PASS>
9088 <MODULE TTCN ModuleA ModuleA.ttcn>
9089 module ModuleA {
9090 type enumerated MyEnum {Monday, T, W};
9091 type component MyCompType {}
9092 altstep Monday() runs on MyCompType {
9093 [] any port.check {};
9094 [else] {};
9095 }
9096 }
9097 <END_MODULE>
9098 <RESULT IF_PASS NEGATIVE>
9099 (?is)\berror:
9100 <END_RESULT>
9101 <RESULT IF_PASS POSITIVE>
9102 (?im)\bnotify\b.+?\bGenerating\b.+?\bcode\b
9103 <END_RESULT>
9104
9105 <END_TC>
9106 :exmp.
9107
9108 .*---------------------------------------------------------------------*
9109 :h3.TTCN-3::UniquenessEnumId-> Altstep_runs_on: const identifier
9110 .*---------------------------------------------------------------------*
9111 :xmp tab=0.
9112 <TC - TTCN-3::UniquenessEnumId-> Altstep_runs_on: const identifier>
9113
9114 <COMPILEGCC>
9115 <VERDICT_LEAF PASS>
9116 <MODULE TTCN ModuleA ModuleA.ttcn>
9117 module ModuleA {
9118 type enumerated MyEnum {Monday, T, W};
9119 type component MyCompType {}
9120 altstep MyCompAltstep() runs on MyCompType {
9121 const integer Monday := 1;
9122 [] any port.check {};
9123 [else] {};
9124 }
9125 }
9126 <END_MODULE>
9127 <RESULT IF_PASS NEGATIVE>
9128 (?is)\berror:
9129 <END_RESULT>
9130 <RESULT IF_PASS POSITIVE>
9131 (?im)\bnotify\b.+?\bGenerating\b.+?\bcode\b
9132 <END_RESULT>
9133
9134 <END_TC>
9135 :exmp.
9136
9137 .*---------------------------------------------------------------------*
9138 :h3.TTCN-3::UniquenessEnumId-> Testcase identifier
9139 .*---------------------------------------------------------------------*
9140 :xmp tab=0.
9141 <TC - TTCN-3::UniquenessEnumId-> Testcase identifier>
9142
9143 <COMPILEGCC>
9144 <VERDICT_LEAF PASS>
9145 <MODULE TTCN ModuleA ModuleA.ttcn>
9146 module ModuleA {
9147 type enumerated MyEnum {Monday, T, W};
9148 type component MyCompType {}
9149 testcase Monday() runs on MyCompType {}
9150 }
9151 <END_MODULE>
9152 <RESULT IF_PASS NEGATIVE>
9153 (?is)\berror:
9154 <END_RESULT>
9155 <RESULT IF_PASS POSITIVE>
9156 (?im)\bnotify\b.+?\bGenerating\b.+?\bcode\b
9157 <END_RESULT>
9158
9159 <END_TC>
9160 :exmp.
9161
9162 .*---------------------------------------------------------------------*
9163 :h3.TTCN-3::UniquenessEnumId-> Testcase: const identifier
9164 .*---------------------------------------------------------------------*
9165 :xmp tab=0.
9166 <TC - TTCN-3::UniquenessEnumId-> Testcase: const identifier>
9167
9168 <COMPILEGCC>
9169 <VERDICT_LEAF PASS>
9170 <MODULE TTCN ModuleA ModuleA.ttcn>
9171 module ModuleA {
9172 type enumerated MyEnum {Monday, T, W};
9173 type component MyCompType {}
9174 testcase MyTestcase() runs on MyCompType {
9175 const integer Monday := 3;
9176 }
9177 }
9178 <END_MODULE>
9179 <RESULT IF_PASS NEGATIVE>
9180 (?is)\berror:
9181 <END_RESULT>
9182 <RESULT IF_PASS POSITIVE>
9183 (?im)\bnotify\b.+?\bGenerating\b.+?\bcode\b
9184 <END_RESULT>
9185
9186 <END_TC>
9187 :exmp.
9188
9189 :np.
9190 .*---------------------------------------------------------------------*
9191 :h2.Uniqueness of group names
9192 .*---------------------------------------------------------------------*
9193 This test case group covers the requirement SA-3/7.
9194 :p. Explanation:
9195 :nl.- Group identifiers across the whole module need not necessarily be unique.
9196 However, all group identifiers on the same level of hierarchy shall be
9197 unique and sub-groups in a lower level of hierarchy shall not have the
9198 same name as a group in a higher level of hierarchy.
9199
9200
9201 .*---------------------------------------------------------------------*
9202 :h3. group scope test 1
9203 .*---------------------------------------------------------------------*
9204 :xmp tab=0.
9205 <TC - group scope test 1 >
9206 <COMPILE>
9207 <VERDICT_LEAF FAIL>
9208 <MODULE TTCN ModuleA ModuleA.ttcn>
9209 module ModuleA {
9210 group grp1 {
9211 type integer int1;
9212 }
9213 group grp1 {
9214 type integer int2;
9215 }
9216 }
9217 <END_MODULE>
9218 <RESULT IF_FAIL COUNT 1>
9219 (?im)\berror\b.+Duplicate group with name
9220 <END_RESULT>
9221 <RESULT IF_FAIL COUNT 1>
9222 (?im)\bnote\b.+Group .+ is already defined here
9223 <END_RESULT>
9224 <END_TC>
9225 :exmp.
9226
9227 .*---------------------------------------------------------------------*
9228 :h3. group scope test 2
9229 .*---------------------------------------------------------------------*
9230 :xmp tab=0.
9231 <TC - group scope test 2 >
9232 <COMPILE>
9233 <VERDICT_LEAF FAIL>
9234 <MODULE TTCN ModuleA ModuleA.ttcn>
9235 module ModuleA {
9236 group grp1 {
9237 type integer int1
9238 }
9239 group grp2 {
9240 type integer int1
9241 }
9242 }
9243 <END_MODULE>
9244 <RESULT IF_FAIL COUNT 1>
9245 (?im)\berror\b.+Duplicate definition with name
9246 <END_RESULT>
9247 <END_TC>
9248 :exmp.
9249
9250 .*---------------------------------------------------------------------*
9251 :h3. group scope test 3
9252 .*---------------------------------------------------------------------*
9253 :xmp tab=0.
9254 <TC - group scope test 3 >
9255 <COMPILE>
9256 <VERDICT_LEAF FAIL>
9257 <MODULE TTCN ModuleA ModuleA.ttcn>
9258 module ModuleA {
9259 type integer int1
9260 group grp1 {
9261 type integer int1
9262 }
9263 }
9264 <END_MODULE>
9265 <RESULT IF_FAIL COUNT 1>
9266 (?im)\berror\b.+Duplicate definition with name
9267 <END_RESULT>
9268 <END_TC>
9269 :exmp.
9270
9271 .*---------------------------------------------------------------------*
9272 :h3. group scope test 4
9273 .*---------------------------------------------------------------------*
9274 :xmp tab=0.
9275 <TC - group scope test 4 >
9276 <COMPILE>
9277 <VERDICT_LEAF PASS>
9278 <MODULE TTCN ModuleA ModuleA.ttcn>
9279 module ModuleA {
9280 group grp1 {
9281 group grp3 {
9282 }
9283 }
9284 group grp2 {
9285 group grp3 {
9286 }
9287 }
9288 }
9289 <END_MODULE>
9290 <RESULT IF_PASS NEGATIVE>
9291 (?im)\berror\b
9292 <END_RESULT>
9293 <RESULT IF_PASS NEGATIVE>
9294 (?im)\bwarning\b
9295 <END_RESULT>
9296 <END_TC>
9297 :exmp.
9298
9299 .*---------------------------------------------------------------------*
9300 :h3. group scope test 5
9301 .*---------------------------------------------------------------------*
9302 :xmp tab=0.
9303 <TC - group scope test 5 >
9304 <COMPILE>
9305 <VERDICT_LEAF PASS>
9306 <MODULE TTCN ModuleA ModuleA.ttcn>
9307 module ModuleA {
9308 group grp1 {
9309 group grp3 {
9310 type integer my_type_1;
9311 }
9312 }
9313 group grp2 {
9314 group grp3 {
9315 type charstring my_type_2;
9316 }
9317 }
9318 control
9319 {
9320 const my_type_1 i1 := 1;
9321 const my_type_2 c1 := "";
9322 }
9323 }
9324 <END_MODULE>
9325 <RESULT IF_PASS NEGATIVE>
9326 (?im)\berror\b
9327 <END_RESULT>
9328 <RESULT IF_PASS NEGATIVE>
9329 (?im)\bwarning\b
9330 <END_RESULT>
9331 <END_TC>
9332 :exmp.
9333
9334 :np.
9335 .*---------------------------------------------------------------------*
9336 :h2.Runs on self functions
9337 .*---------------------------------------------------------------------*
9338 This test case group covers the requirement SA-x/x.
9339 :p. Explanation:
9340 :nl.- There is no need to predefine and set the component where the function
9341 will run any more. Instead the "runs on self" clause can be used in case.
9342 This type of function and function reference cannot be a part any of the send
9343 or receive statement, not compatible with other functions with exacly defined
9344 runs on clause.
9345 And also function with runs on clause cannot be the argument of any
9346 Component's start().
9347
9348
9349 .*---------------------------------------------------------------------*
9350 :h3.TTCN-3:: Runs on self: type mismatch
9351 .*---------------------------------------------------------------------*
9352 :xmp tab=0.
9353 <TC - TTCN-3::Runs on self: type mismatch>
9354
9355 <COMPILE>
9356 <VERDICT_LEAF PASS>
9357 <MODULE TTCN ModuleA ModuleA.ttcn>
9358 module ModuleA {
9359
9360 type function CallbackFunctionRefRunsonLib () runs on Library_CT;
9361 type function CallbackFunctionRefRunsonSelf () runs on self;
9362
9363 type component Library_CT
9364 {
9365 var CallbackFunctionRefRunsonSelf v_CallbackRef_self := null;
9366 var CallbackFunctionRefRunsonLib v_CallbackRef_LibCT := null;
9367 var integer v_Lib;
9368 }
9369
9370 function f_testFunc() runs on Library_CT
9371 {
9372 v_CallbackRef_self := v_CallbackRef_LibCT;
9373
9374 v_CallbackRef_LibCT := v_CallbackRef_self;
9375 }
9376
9377 }
9378 <END_MODULE>
9379 <RESULT IF_PASS COUNT 1>
9380 (?im)\berror: Type mismatch: a value of type `@ModuleA.CallbackFunctionRefRunsonSelf' was expected instead of `@ModuleA.CallbackFunctionRefRunsonLib'
9381 <END_RESULT>
9382 <RESULT IF_PASS COUNT 1>
9383 (?is)\berror: Type mismatch: a value of type `@ModuleA.CallbackFunctionRefRunsonLib' was expected instead of `@ModuleA.CallbackFunctionRefRunsonSelf'
9384 <END_RESULT>
9385 <RESULT IF_PASS POSITIVE>
9386 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
9387 <END_RESULT>
9388
9389 <END_TC>
9390 :exmp.
9391
9392
9393 .*---------------------------------------------------------------------*
9394 :h3.TTCN-3:: Runs on self: start
9395 .*---------------------------------------------------------------------*
9396 :xmp tab=0.
9397 <TC - TTCN-3::Runs on self: start>
9398
9399 <COMPILE>
9400 <VERDICT_LEAF PASS>
9401 <MODULE TTCN ModuleA ModuleA.ttcn>
9402 module ModuleA {
9403
9404 type function CallbackFunctionRefRunsonLib () runs on Library_CT;
9405 type function CallbackFunctionRefRunsonSelf () runs on self;
9406
9407 type component Library_CT
9408 {
9409 var CallbackFunctionRefRunsonSelf v_CallbackRef_self := null;
9410 var CallbackFunctionRefRunsonLib v_CallbackRef_LibCT := null;
9411 var integer v_Lib;
9412 }
9413
9414 function f_testFunc() runs on Library_CT
9415 {
9416
9417 var Library_CT libCT := Library_CT.create;
9418
9419 libCT.start(derefers(v_CallbackRef_self)());
9420
9421 }
9422
9423 }
9424 <END_MODULE>
9425 <RESULT IF_PASS COUNT 1>
9426 (?im)\berror: The argument cannot be a function reference with 'runs on self' clause
9427 <END_RESULT>
9428 <RESULT IF_PASS POSITIVE>
9429 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
9430 <END_RESULT>
9431
9432 <END_TC>
9433 :exmp.
9434
9435 .*---------------------------------------------------------------------*
9436 :h3.TTCN-3:: Runs on self: send
9437 .*---------------------------------------------------------------------*
9438 :xmp tab=0.
9439 <TC - TTCN-3::Runs on self: send>
9440
9441 <COMPILE>
9442 <VERDICT_LEAF PASS>
9443 <MODULE TTCN ModuleA ModuleA.ttcn>
9444 module ModuleA {
9445
9446 type port MyPort_PT message
9447 {
9448 inout myRec_t
9449 }
9450
9451 type function CallbackFunctionRefRunsonLib () runs on Library_CT;
9452 type function CallbackFunctionRefRunsonSelf () runs on self;
9453
9454 type record myRec_t
9455 {
9456 integer i,
9457 CallbackFunctionRefRunsonSelf callbSelf
9458 }
9459
9460 type component Library_CT
9461 {
9462 var CallbackFunctionRefRunsonSelf v_CallbackRef_self := null;
9463 var CallbackFunctionRefRunsonLib v_CallbackRef_LibCT := null;
9464 var integer v_Lib;
9465
9466 port MyPort_PT MyPort;
9467 }
9468
9469 function f_testFunc() runs on Library_CT
9470 {
9471
9472 var myRec_t myrec := {i := 0, callbSelf := refers(f_testFunc)};
9473
9474 MyPort.send(myrec);
9475
9476 }
9477
9478 }
9479 <END_MODULE>
9480 <RESULT IF_PASS COUNT 1>
9481 (?im)\berror: Function type `@ModuleA.CallbackFunctionRefRunsonSelf' with 'runs on self' clause cannot be sent or received on a port
9482 <END_RESULT>
9483 <RESULT IF_PASS POSITIVE>
9484 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
9485 <END_RESULT>
9486
9487 <END_TC>
9488 :exmp.
9489
9490 .*---------------------------------------------------------------------*
9491 :h3.TTCN-3:: Runs on self: module parameter
9492 .*---------------------------------------------------------------------*
9493 :xmp tab=0.
9494 <TC - TTCN-3::Runs on self: module parameter>
9495
9496 <COMPILE>
9497 <VERDICT_LEAF PASS>
9498 <MODULE TTCN ModuleA ModuleA.ttcn>
9499 module ModuleA {
9500
9501 type function f_runsonSelf () runs on self;
9502 modulepar f_runsonSelf m_modPar;
9503
9504 }
9505 <END_MODULE>
9506 <RESULT IF_PASS COUNT 1>
9507 (?im)\berror: Type of module parameter cannot be of function reference type.+?which has runs on self clause
9508 <END_RESULT>
9509 <RESULT IF_PASS POSITIVE>
9510 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
9511 <END_RESULT>
9512
9513 <END_TC>
9514 :exmp.
9515
9516 .*---------------------------------------------------------------------*
9517 :h1.Abbreviations
9518 .*---------------------------------------------------------------------*
9519 :list.
9520 :li D='ASN.1'.Abstract Syntax Notation 1
9521 :li D='EDML'.Ericsson Document Markup Language
9522 :li D='SA'.Semantic Analyser
9523 :li D='TTCN-3'.Test and Test Control Notation version 3
9524 :elist.
9525
9526 .*---------------------------------------------------------------------*
9527 :h1.References
9528 .*---------------------------------------------------------------------*
9529 :list.
9530 :li D='[1]'.3/ETH/RUS-2003:0087 Uen
9531 :nl.Requirement Specification for TITAN's TTCN-3 Semantic Analyser
9532 :li D='[2]'.1/174 02-FCPCA 101 42 Uen
9533 :nl.Statement of Compliance for TITAN project
9534 :li D='[3]'.ETSI ES 201 873-1, v3.0.0 Mockup v1 (2004-03):
9535 :nl.Testing and Test Control Notation version 3.,
9536 :nl.Part 1: TTCN-3 Core Language
9537 :elist.
9538
9539 .*---------------------------------------------------------------------*
9540 :h1.Terminology
9541 .*---------------------------------------------------------------------*
9542 :list.
9543 :li D='TITAN'.Ericsson's TTCN-3 Test Environment
9544 :elist.
9545
9546 :etext.
9547
This page took 0.247796 seconds and 5 git commands to generate.