Sync with 5.4.0
[deliverable/titan.core.git] / function_test / Semantic_Analyser / TTCN3_SA_6_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.17/152 91-CRL 113 200/3 Uen
18 :rev.A
19 :date.2015-04-27
20
21 :prep.ETH/XZ Jeno Balasko
22 :appr.ETH/XZ (Gyula Koos)
23 :checked.EKRISZA
24
25 :title.Test description of the TTCN-3 Semantic Analyzer: Values, Value Lists, Ranges, Length, Dimensions, Durations and Subtyping
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-17 ESNDPAL New document for TITAN R6
37 A 2005-03-18 ESNDPAL Approved after review
38 B 2005-12-16 EKRISZA Updates for TITAN R6D
39 C 2006-07-31 EDMDELI Updates for TITAN R6E
40 D 2007-03-06 EJNOSZA Updates for TITAN R7A
41 PE1 2008-01-22 EFERKOV Changes for TITAN R7C
42 PE2 2008-01-25 ETHNBA Updates for TITAN R7C
43 F 2009-06-11 EKRISZA Name correction
44 G 2009-09-10 EKRISZA New tests for modified templates.
45 H 2010-01-25 EKRISZA Refreshed version number
46 I 2010-07-02 EKRISZA version update
47 J 2010-07-02 EKRISZA version update
48 K 2010-12-14 EKRISZA version update
49 PL1 2011-02-23 ESZABRE Constant folding for indexes
50 L 2011-02-23 EKRISZA removed line ending whitespaces
51 M 2011-10-10 EKRISZA version update
52 A 2011-12-12 EKRISZA Updated for release
53 A 2012-06-27 EFERKOV Updated for release
54 A 2013-01-17 EKRIPND Updated for release
55 :exmp.
56 .*---------------------------------------------------------------------*
57 :h2.Purpose
58 .*---------------------------------------------------------------------*
59 The purpose of this Test Description is to define and describe the function
60 test activity for the Semantic Analyser functionality of the TTCN-3 compiler:
61 :nl.SA-6/x: Values, Value Lists, Ranges, Length, Dimensions, Durations and Subtyping.
62 :p.The specification of the test cases can be found in this document.
63 .*---------------------------------------------------------------------*
64 :h1.Test environment
65 .*---------------------------------------------------------------------*
66 .*---------------------------------------------------------------------*
67 :h2.Hardware
68 .*---------------------------------------------------------------------*
69 No specific hardware requirement.
70 .*---------------------------------------------------------------------*
71 :h2.Software
72 .*---------------------------------------------------------------------*
73 Tests shall be carried out on the following platforms:
74 :list.
75 :li D='1.'.Solaris 8 (Sun OS 5.8) (gcc 3.0.4)
76 :li D='2.'.SUSE Linux Enterprise server 8 (2.4.19-4GB) (gcc 3.2)
77 :li D='3.'.CYGWIN_NT-5.0 (Cygwin DLL: 1.5.12) on Windows 2000 (gcc 3.3.3)
78 :elist.
79 .*---------------------------------------------------------------------*
80 :h2.Configuration
81 .*---------------------------------------------------------------------*
82 The test environment had been setup in CVS. The tester program is stored in:
83 :nl.TTCNv3/function_test/Tools/SAtester.pl
84 :nl.Test cases are stored with extension .script in the directory:
85 :nl.TTCNv3/function_test/Semantic_Analyser/
86 .*---------------------------------------------------------------------*
87 :h2.Installation
88 .*---------------------------------------------------------------------*
89 Install proper TITAN binaries on the used platforms and make sure that
90 your environment settings are correct:
91 :list.
92 :li D='1.'.TTCN3_DIR is set
93 :li D='2.'.$TTCN3_DIR/bin is added to the PATH variable
94 :li D='3.'.$TTCN3_DIR/lib is added to the LD_LIBRARY_PATH variable
95 :li D='4.'.Perl 5.6.0 or higher is available on the platform
96 :li D='5.'.Create a symlink to your Perl binary into the directory where the
97 test cases are stored:
98 :nl.ln -s <your Perl> perl
99 :elist.
100 .*---------------------------------------------------------------------*
101 :h2.Test Tools
102 .*---------------------------------------------------------------------*
103 A tester program had been written in Perl especially for the Semantic Analyser
104 tests. For the list of command line parameters, type 'SAtester.pl -help', for the
105 complete documentation, type 'SAtester.pl -doc'.
106 :p.Test cases are specified in the Test Description documents in EDML format.
107 The tester program parses these files and generates the TTCN-3/ASN.1 modules, then
108 calls the compiler to compile them. The result printout is then matched against
109 different patterns to be able to set the verdict. Test cases contain not only
110 the source modules, but the patterns as well.
111 :p.The tester program allows one-by-one execution of test cases and batched
112 execution as well.
113 :p.NOTE: the tester program requires Perl 5.6.0 or higher.
114 .*---------------------------------------------------------------------*
115 :h1.Test cases
116 .*---------------------------------------------------------------------*
117 Ref [1]: SA-6/x: Values, Value Lists, Ranges, Length, Dimensions, Durations and Subtyping
118 .*---------------------------------------------------------------------*
119 :h2.Subtyping
120 .*---------------------------------------------------------------------*
121 .*---------------------------------------------------------------------*
122 :h3.Allowed subtyping
123 .*---------------------------------------------------------------------*
124
125 This test case group covers the requirement SA-6/1.
126
127 Strategy: TTCN-3 Core Language side:26, Table 3.
128 :nl.All not allowed subtyping shall be tested based in the table.
129 For all types in the table, there shall be one case when the subtyping is
130 used directly with the type name and one for a named type that has a root
131 type of the tested type, for example:
132 :xmp tab=2.
133 type integer i1 length(10);
134 type i1 i2 length(10);
135 :exmp.
136 Both types are defined in one module.
137
138 TODO: port, component and default tests are missing.
139
140 NOTE: the address type is a user defined type so we won't test it.
141
142 .*---------------------------------------------------------------------*
143 :h4. Allowed subtyping - integer length
144 .*---------------------------------------------------------------------*
145 :xmp tab=0.
146
147 <TC - Allowed subtyping - integer length>
148
149 <COMPILE>
150 <VERDICT_LEAF PASS>
151 <MODULE TTCN Temp Temp.ttcn>
152 module Temp {
153
154 type integer FaultyInt1 length(10);
155 type integer Int;
156 type Int FaultyInt2 length(4);
157
158 }
159 <END_MODULE>
160 <RESULT IF_PASS COUNT 2>
161 (?im)Length.+?subtyping.+?not.+?allowed
162 <END_RESULT>
163 <RESULT IF_PASS>
164 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
165 <END_RESULT>
166 <RESULT IF_PASS COUNT 2>
167 (?is)\berror:
168 <END_RESULT>
169 <END_TC>
170
171 :exmp.
172
173 .*---------------------------------------------------------------------*
174 :h4. Allowed subtyping - float length
175 .*---------------------------------------------------------------------*
176 :xmp tab=0.
177
178 <TC - Allowed subtyping - float length>
179
180 <COMPILE>
181 <VERDICT_LEAF PASS>
182 <MODULE TTCN Temp Temp.ttcn>
183 module Temp {
184
185 type float FaultyFloat1 length(10);
186 type float Float;
187 type Float FaultyFloat2 length(4);
188
189 }
190 <END_MODULE>
191 <RESULT IF_PASS COUNT 2>
192 (?im)Length.+?subtyping.+?not.+?allowed
193 <END_RESULT>
194 <RESULT>
195 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
196 <END_RESULT>
197 <RESULT IF_PASS COUNT 2>
198 (?is)\berror:
199 <END_RESULT>
200 <END_TC>
201
202 :exmp.
203
204 .*---------------------------------------------------------------------*
205 :h4. Allowed subtyping - boolean range
206 .*---------------------------------------------------------------------*
207 :xmp tab=0.
208
209 <TC - Allowed subtyping - boolean range>
210
211 <COMPILE>
212 <VERDICT_LEAF PASS>
213 <MODULE TTCN Temp Temp.ttcn>
214 module Temp {
215
216 type boolean FaultyBool1 (false..true);
217 type boolean Bool;
218 type Bool FaultyBool2 (false..true);
219 type boolean FaultyBool3 (true..true);
220 type boolean FaultyBool4 (true..false);
221
222 }
223 <END_MODULE>
224 <RESULT IF_PASS COUNT 4>
225 (?im)Range.+?subtyping.+?not.+?allowed
226 <END_RESULT>
227 <RESULT>
228 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
229 <END_RESULT>
230 <RESULT IF_PASS COUNT 4>
231 (?is)\berror:
232 <END_RESULT>
233 <END_TC>
234
235 :exmp.
236
237 .*---------------------------------------------------------------------*
238 :h4. Allowed subtyping - boolean length
239 .*---------------------------------------------------------------------*
240 :xmp tab=0.
241
242 <TC - Allowed subtyping - boolean length>
243
244 <COMPILE>
245 <VERDICT_LEAF PASS>
246 <MODULE TTCN Temp Temp.ttcn>
247 module Temp {
248
249 type boolean FaultyBool1 length(1);
250 type boolean Bool;
251 type Bool FaultyBool2 length(2);
252
253 }
254 <END_MODULE>
255 <RESULT IF_PASS COUNT 2>
256 (?im)Length.+?subtyping.+?not.+?allowed
257 <END_RESULT>
258 <RESULT>
259 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
260 <END_RESULT>
261 <RESULT IF_PASS COUNT 2>
262 (?is)\berror:
263 <END_RESULT>
264 <END_TC>
265
266 :exmp.
267
268 .*---------------------------------------------------------------------*
269 :h4. Allowed subtyping - objid range
270 .*---------------------------------------------------------------------*
271 :xmp tab=0.
272
273 <TC - Allowed subtyping - objid range>
274
275 <COMPILE>
276 <VERDICT_LEAF PASS>
277 <MODULE TTCN Temp Temp.ttcn>
278 module Temp {
279
280 type objid FaultyObjid1 (objid{0 1 2} .. objid{0 1 4});
281 type objid Objid;
282 type Objid FaultyObjid2 (objid{0 1 2} .. objid{0 1 4});
283 type objid FaultyObjid3 (objid{0 2 4} .. objid{0 1 2});
284
285 }
286 <END_MODULE>
287 <RESULT IF_PASS COUNT 3>
288 (?im)subtyping.+?not.+?allowed
289 <END_RESULT>
290 <RESULT>
291 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
292 <END_RESULT>
293 <RESULT IF_PASS COUNT 3>
294 (?is)\berror:
295 <END_RESULT>
296 <END_TC>
297
298 :exmp.
299
300 .*---------------------------------------------------------------------*
301 :h4. Allowed subtyping - objid length
302 .*---------------------------------------------------------------------*
303 :xmp tab=0.
304
305 <TC - Allowed subtyping - objid length>
306
307 <COMPILE>
308 <VERDICT_LEAF PASS>
309 <MODULE TTCN Temp Temp.ttcn>
310 module Temp {
311
312 type objid FaultyObjid1 length(3);
313 type objid Objid;
314 type Objid FaultyObjid2 length(4)
315
316 }
317 <END_MODULE>
318 <RESULT IF_PASS COUNT 2>
319 (?im)subtyping.+?not.+?allowed
320 <END_RESULT>
321 <RESULT>
322 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
323 <END_RESULT>
324 <RESULT IF_PASS COUNT 2>
325 (?is)\berror:
326 <END_RESULT>
327 <END_TC>
328
329 :exmp.
330
331 .*---------------------------------------------------------------------*
332 :h4. Allowed subtyping - verdicttype range
333 .*---------------------------------------------------------------------*
334 :xmp tab=0.
335
336 <TC - Allowed subtyping - verdicttype range>
337
338 <COMPILE>
339 <VERDICT_LEAF PASS>
340 <MODULE TTCN Temp Temp.ttcn>
341 module Temp {
342
343 type verdicttype FaultyVerdict1 (pass..error);
344 type verdicttype Verdict;
345 type verdicttype FaultyVerdict2 (pass..fail);
346
347 }
348 <END_MODULE>
349 <RESULT IF_PASS COUNT 2>
350 (?im)subtyping.+?not.+?allowed
351 <END_RESULT>
352 <RESULT>
353 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
354 <END_RESULT>
355 <RESULT IF_PASS COUNT 2>
356 (?is)\berror:
357 <END_RESULT>
358 <END_TC>
359
360 :exmp.
361
362 .*---------------------------------------------------------------------*
363 :h4. Allowed subtyping - verdicttype length
364 .*---------------------------------------------------------------------*
365 :xmp tab=0.
366
367 <TC - Allowed subtyping - verdicttype length>
368
369 <COMPILE>
370 <VERDICT_LEAF PASS>
371 <MODULE TTCN Temp Temp.ttcn>
372 module Temp {
373
374 type verdicttype FaultyVerdict1 length(1);
375 type verdicttype Verdict;
376 type Verdict FaultyVerdict2 length(2);
377
378 }
379 <END_MODULE>
380 <RESULT IF_PASS COUNT 2>
381 (?im)subtyping.+?not.+?allowed
382 <END_RESULT>
383 <RESULT>
384 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
385 <END_RESULT>
386 <RESULT IF_PASS COUNT 2>
387 (?is)\berror:
388 <END_RESULT>
389 <END_TC>
390
391 :exmp.
392
393 .*---------------------------------------------------------------------*
394 :h4. Allowed subtyping - bitstring range
395 .*---------------------------------------------------------------------*
396 :xmp tab=0.
397
398 <TC - Allowed subtyping - bitstring range>
399
400 <COMPILE>
401 <VERDICT_LEAF PASS>
402 <MODULE TTCN Temp Temp.ttcn>
403 module Temp {
404
405 type bitstring FaultyBS1 ('0000'B .. '0111'B);
406 type bitstring BS;
407 type BS FaultyBS2 ('1000'B .. '1111'B);
408
409 }
410 <END_MODULE>
411 <RESULT IF_PASS COUNT 2>
412 (?im)subtyping.+?not.+?allowed
413 <END_RESULT>
414 <RESULT>
415 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
416 <END_RESULT>
417 <RESULT IF_PASS COUNT 2>
418 (?is)\berror:
419 <END_RESULT>
420 <END_TC>
421
422 :exmp.
423
424 .*---------------------------------------------------------------------*
425 :h4. Allowed subtyping - hexstring range
426 .*---------------------------------------------------------------------*
427 :xmp tab=0.
428
429 <TC - Allowed subtyping - hexstring range>
430
431 <COMPILE>
432 <VERDICT_LEAF PASS>
433 <MODULE TTCN Temp Temp.ttcn>
434 module Temp {
435
436 type hexstring FaultyHS1 ('000'H .. 'A53'H);
437 type hexstring HS;
438 type HS FaultyHS2 ('100'H .. 'FFF'H);
439
440 }
441 <END_MODULE>
442 <RESULT IF_PASS COUNT 2>
443 (?im)subtyping.+?not.+?allowed
444 <END_RESULT>
445 <RESULT>
446 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
447 <END_RESULT>
448 <RESULT IF_PASS COUNT 2>
449 (?is)\berror:
450 <END_RESULT>
451 <END_TC>
452
453 :exmp.
454
455 .*---------------------------------------------------------------------*
456 :h4. Allowed subtyping - octetstring range
457 .*---------------------------------------------------------------------*
458 :xmp tab=0.
459
460 <TC - Allowed subtyping - octetstring range>
461
462 <COMPILE>
463 <VERDICT_LEAF PASS>
464 <MODULE TTCN Temp Temp.ttcn>
465 module Temp {
466
467 type octetstring FaultyOS1 ('0000'O .. 'AB53'O);
468 type octetstring OS;
469 type OS FaultyOS2 ('00'O .. '7F'O);
470
471 }
472 <END_MODULE>
473 <RESULT IF_PASS COUNT 2>
474 (?im)subtyping.+?not.+?allowed
475 <END_RESULT>
476 <RESULT>
477 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
478 <END_RESULT>
479 <RESULT IF_PASS COUNT 2>
480 (?is)\berror:
481 <END_RESULT>
482 <END_TC>
483
484 :exmp.
485
486 .*---------------------------------------------------------------------*
487 :h4. Allowed subtyping - record range
488 .*---------------------------------------------------------------------*
489 :xmp tab=0.
490
491 <TC - Allowed subtyping - record range>
492
493 <COMPILE>
494 <VERDICT_LEAF PASS>
495 <MODULE TTCN Temp Temp.ttcn>
496 module Temp {
497
498 type record Record {
499 integer intField,
500 float floatField
501 }
502
503 const Record c_lower := {0, 0.0};
504 const Record c_upper := {10, 10.0};
505
506 type Record FaultyRecord1 (0 .. 10);
507 type Record FaultyRecord2 (c_lower .. c_upper);
508
509 }
510 <END_MODULE>
511 <RESULT IF_PASS COUNT 2>
512 (?im)subtyping.+?not.+?allowed
513 <END_RESULT>
514 <RESULT IF_PASS COUNT 1>
515 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
516 <END_RESULT>
517 <RESULT IF_PASS COUNT 2>
518 (?is)\berror:
519 <END_RESULT>
520 <END_TC>
521
522 :exmp.
523
524 .*---------------------------------------------------------------------*
525 :h4. Allowed subtyping - record length
526 .*---------------------------------------------------------------------*
527 :xmp tab=0.
528
529 <TC - Allowed subtyping - record length>
530
531 <COMPILE>
532 <VERDICT_LEAF PASS>
533 <MODULE TTCN Temp Temp.ttcn>
534 module Temp {
535
536 type record Record {
537 integer intField,
538 float floatField
539 }
540 type Record FaultyRecord length(12);
541
542 }
543 <END_MODULE>
544 <RESULT IF_PASS COUNT 1>
545 (?im)subtyping.+?not.+?allowed
546 <END_RESULT>
547 <RESULT IF_PASS COUNT 1>
548 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
549 <END_RESULT>
550 <RESULT IF_PASS COUNT 1>
551 (?is)\berror:
552 <END_RESULT>
553 <END_TC>
554
555 :exmp.
556
557 .*---------------------------------------------------------------------*
558 :h4. Allowed subtyping - record of range
559 .*---------------------------------------------------------------------*
560 :xmp tab=0.
561
562 <TC - Allowed subtyping - record of range>
563
564 <COMPILE>
565 <VERDICT_LEAF PASS>
566 <MODULE TTCN Temp Temp.ttcn>
567 module Temp {
568
569 type record of integer RecordOfInt;
570
571 const RecordOfInt c_lower := {0, 0};
572 const RecordOfInt c_upper := {10, 10};
573
574 type RecordOfInt FaultyRecordOfInt1 (0 .. 10);
575 type RecordOfInt FaultyRecordOfInt2 (c_lower .. c_upper);
576
577 }
578 <END_MODULE>
579 <RESULT IF_PASS COUNT 2>
580 (?im)subtyping.+?not.+?allowed
581 <END_RESULT>
582 <RESULT IF_PASS COUNT 1>
583 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
584 <END_RESULT>
585 <RESULT IF_PASS COUNT 2>
586 (?is)\berror:
587 <END_RESULT>
588 <END_TC>
589
590 :exmp.
591
592 .*---------------------------------------------------------------------*
593 :h4. Allowed subtyping - set range
594 .*---------------------------------------------------------------------*
595 :xmp tab=0.
596
597 <TC - Allowed subtyping - set range>
598
599 <COMPILE>
600 <VERDICT_LEAF PASS>
601 <MODULE TTCN Temp Temp.ttcn>
602 module Temp {
603
604 type set Set {
605 integer intField,
606 float floatField
607 }
608
609 const Set c_lower := {0, 0.0};
610 const Set c_upper := {10, 10.0};
611
612 type Set FaultySet1 (0 .. 10);
613 type Set FaultySet2 (c_lower .. c_upper);
614
615 }
616 <END_MODULE>
617 <RESULT IF_PASS COUNT 2>
618 (?im)Value.+?list.+?notation.+?cannot.+?used
619 <END_RESULT>
620 <RESULT IF_PASS COUNT 2>
621 (?im)subtyping.+?not.+?allowed
622 <END_RESULT>
623 <RESULT IF_PASS COUNT 1>
624 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
625 <END_RESULT>
626 <RESULT IF_PASS COUNT 4>
627 (?is)\berror:
628 <END_RESULT>
629 <END_TC>
630
631 :exmp.
632
633 .*---------------------------------------------------------------------*
634 :h4. Allowed subtyping - set length
635 .*---------------------------------------------------------------------*
636 :xmp tab=0.
637
638 <TC - Allowed subtyping - set length>
639
640 <COMPILE>
641 <VERDICT_LEAF PASS>
642 <MODULE TTCN Temp Temp.ttcn>
643 module Temp {
644
645 type set Set {
646 integer intField,
647 float floatField
648 }
649 type Set FaultySet length(12);
650
651 }
652 <END_MODULE>
653 <RESULT IF_PASS COUNT 1>
654 (?im)subtyping.+?not.+?allowed
655 <END_RESULT>
656 <RESULT IF_PASS COUNT 1>
657 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
658 <END_RESULT>
659 <RESULT IF_PASS COUNT 1>
660 (?is)\berror:
661 <END_RESULT>
662 <END_TC>
663
664 :exmp.
665
666 .*---------------------------------------------------------------------*
667 :h4. Allowed subtyping - set of range
668 .*---------------------------------------------------------------------*
669 :xmp tab=0.
670
671 <TC - Allowed subtyping - set of range>
672
673 <COMPILE>
674 <VERDICT_LEAF PASS>
675 <MODULE TTCN Temp Temp.ttcn>
676 module Temp {
677
678 type set of integer SetOfInt;
679
680 const SetOfInt c_lower := {0, 0};
681 const SetOfInt c_upper := {10, 10};
682
683 type SetOfInt FaultySetOfInt1 (0 .. 10);
684 type SetOfInt FaultySetOfInt2 (c_lower .. c_upper);
685
686 }
687 <END_MODULE>
688 <RESULT IF_PASS COUNT 2>
689 (?im)subtyping.+?not.+?allowed
690 <END_RESULT>
691 <RESULT IF_PASS COUNT 1>
692 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
693 <END_RESULT>
694 <RESULT IF_PASS COUNT 2>
695 (?is)\berror:
696 <END_RESULT>
697 <END_TC>
698
699 :exmp.
700
701 .*---------------------------------------------------------------------*
702 :h4. Allowed subtyping - enumerated range
703 .*---------------------------------------------------------------------*
704 :xmp tab=0.
705
706 <TC - Allowed subtyping - enumerated range>
707
708 <COMPILE>
709 <VERDICT_LEAF PASS>
710 <MODULE TTCN Temp Temp.ttcn>
711 module Temp {
712
713 type enumerated Enum { EnumValue0(0), EnumValue1(1), EnumValue2(2), EnumValue3(3) };
714 type Enum FaultyEnum1 (0..2);
715 type Enum FaultyEnum2 (EnumValue0..EnumValue2);
716
717 }
718 <END_MODULE>
719 <RESULT IF_PASS COUNT 2>
720 (?im)subtyping.+?not.+?allowed
721 <END_RESULT>
722 <RESULT IF_PASS COUNT 1>
723 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
724 <END_RESULT>
725 <RESULT IF_PASS COUNT 2>
726 (?is)\berror:
727 <END_RESULT>
728 <END_TC>
729
730 :exmp.
731
732 .*---------------------------------------------------------------------*
733 :h4. Allowed subtyping - enumerated length
734 .*---------------------------------------------------------------------*
735 :xmp tab=0.
736
737 <TC - Allowed subtyping - enumerated length>
738
739 <COMPILE>
740 <VERDICT_LEAF PASS>
741 <MODULE TTCN Temp Temp.ttcn>
742 module Temp {
743
744 type enumerated Enum { EnumValue0(0), EnumValue1(1), EnumValue2(2), EnumValue3(3) };
745 type Enum FaultyEnum length(4);
746
747 }
748 <END_MODULE>
749 <RESULT IF_PASS COUNT 1>
750 (?im)subtyping.+?not.+?allowed
751 <END_RESULT>
752 <RESULT IF_PASS COUNT 1>
753 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
754 <END_RESULT>
755 <RESULT IF_PASS COUNT 1>
756 (?is)\berror:
757 <END_RESULT>
758 <END_TC>
759
760 :exmp.
761
762 .*---------------------------------------------------------------------*
763 :h4. Allowed subtyping - union range
764 .*---------------------------------------------------------------------*
765 :xmp tab=0.
766
767 <TC - Allowed subtyping - union range>
768
769 <COMPILE>
770 <VERDICT_LEAF PASS>
771 <MODULE TTCN Temp Temp.ttcn>
772 module Temp {
773
774 type union Union {
775 integer intField,
776 float floatField
777 }
778
779 const Union c_lower := {intField := 0};
780 const Union c_upper := {intField := 10};
781
782 type Union FaultyUnion1 (0 .. 10);
783 type Union FaultyUnion2 (c_record_lower .. c_record_upper);
784
785 }
786 <END_MODULE>
787 <RESULT IF_PASS COUNT 2>
788 (?im)subtyping.+?not.+?allowed
789 <END_RESULT>
790 <RESULT IF_PASS COUNT 1>
791 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
792 <END_RESULT>
793 <RESULT IF_PASS COUNT 2>
794 (?is)\berror:
795 <END_RESULT>
796 <END_TC>
797
798 :exmp.
799
800 .*---------------------------------------------------------------------*
801 :h4. Allowed subtyping - union length
802 .*---------------------------------------------------------------------*
803 :xmp tab=0.
804
805 <TC - Allowed subtyping - union length>
806
807 <COMPILE>
808 <VERDICT_LEAF PASS>
809 <MODULE TTCN Temp Temp.ttcn>
810 module Temp {
811
812 type union Union {
813 integer intField,
814 float floatField
815 }
816 type Union FaultyUnion length(8);
817
818 }
819 <END_MODULE>
820 <RESULT IF_PASS COUNT 1>
821 (?im)subtyping.+?not.+?allowed
822 <END_RESULT>
823 <RESULT IF_PASS COUNT 1>
824 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
825 <END_RESULT>
826 <RESULT IF_PASS COUNT 1>
827 (?is)\berror:
828 <END_RESULT>
829 <END_TC>
830
831 :exmp.
832
833 .*---------------------------------------------------------------------*
834 :h4. TTCN-3::FunctionReference->Subtyping: length
835 .*---------------------------------------------------------------------*
836 :xmp tab=0.
837 <TC - TTCN-3::FunctionReference->Subtyping: length>
838 <COMPILE>
839 <VERDICT_LEAF FAIL>
840 <MODULE TTCN Temp Temp.ttcn>
841 module Temp {
842 type function fntype() length(10);
843 }
844 <END_MODULE>
845 <RESULT IF_FAIL COUNT 1>
846 (?im)\berror\b.+?syntax.+?error
847 <END_RESULT>
848 <RESULT IF_FAIL POSITIVE>
849 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
850 <END_RESULT>
851 <END_TC>
852 :exmp.
853
854 .*---------------------------------------------------------------------*
855 :h4. TTCN-3::FunctionReference->Subtyping: range
856 .*---------------------------------------------------------------------*
857 :xmp tab=0.
858 <TC - TTCN-3::FunctionReference->Subtyping: range>
859 <COMPILE>
860 <VERDICT_LEAF FAIL>
861 <MODULE TTCN Temp Temp.ttcn>
862 module Temp {
863 function fn1() { }
864 function fn2() { }
865 function fn3() { }
866 type function fntype() (fn1..fn3);
867 }
868 <END_MODULE>
869 <RESULT IF_FAIL COUNT 1>
870 (?im)\berror\b.+?syntax.+?error
871 <END_RESULT>
872 <RESULT IF_FAIL POSITIVE>
873 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
874 <END_RESULT>
875 <END_TC>
876 :exmp.
877
878 .*---------------------------------------------------------------------*
879 :h3.True subset
880 .*---------------------------------------------------------------------*
881
882 This test case group covers the requirement SA-6/2.
883
884 Strategy: the values in the list shall be a true subset of the values defined by the root type
885 All occurances shall be tested, where such a notation can be used.
886
887 .*---------------------------------------------------------------------*
888 :h3.Mixing different subset notations
889 .*---------------------------------------------------------------------*
890
891 This test case group covers the requirement SA-6/3.
892
893 Strategy: Mixing different subset notations is not allowed for the specific type
894 All occurances shall be tested, where such a notation can be used.
895
896 .*---------------------------------------------------------------------*
897 :h3.Invalid subset notation
898 .*---------------------------------------------------------------------*
899
900 This test case group covers the requirement SA-6/4.
901
902 Strategy: the value notation used for subtyping is invalid due to:
903 :list.
904 :li D='-'.duplicated element in a list of values
905 :li D='-'.ranges/lists have intersection (common elements)
906 :li D='-'.lower boundary is greater than upper boundary
907 :li D='-'.the boundaries shall evaluate to valid character positions according to the coded character set table(s) of the type (for example the given position shall not be empty)
908 :elist.
909 All occurances shall be tested, where such a notation can be used.
910
911 .*---------------------------------------------------------------------*
912 :h2.Value notations
913 .*---------------------------------------------------------------------*
914 .*---------------------------------------------------------------------*
915 :h3.Mixing value notations
916 .*---------------------------------------------------------------------*
917
918 This test case group covers the requirement SA-6/5.
919
920 Strategy: check that mixing assignment and value notations are detected
921 for all types that allow the usage of at least one of the notations
922 (that is value, assignment). All occurances shall be tested, where
923 such a notation can be used.
924
925 Tested: - record and set in function
926
927 TODO: only a couple of TCs are written, this shall be implemented ones the SA performs the checking and not the parser.
928
929 .*---------------------------------------------------------------------*
930 :h4.Mixing value notations - assignment notation in value list (record const in function)
931 .*---------------------------------------------------------------------*
932 :xmp tab=0.
933 <TC - Mixing value notations - assignment notation in value list (record const in function)>
934 <COMPILE>
935 <VERDICT_LEAF FAIL>
936 <MODULE TTCN x x.ttcn>
937 module x {
938
939 type record Record {
940 integer I,
941 float F,
942 charstring CS
943 }
944 function MyFunc() {
945 // NOTE: catched by the parser
946 // TR 709: Not allowed value notation reporting
947 var Record FaultyRecord := { 10, F:= 0.0, "error" };
948 }
949
950 }
951 <END_MODULE>
952 <RESULT IF_FAIL COUNT 1>
953 (?im)\berror\b.+?syntax.+?error.+?unexpected.+?:=
954 <END_RESULT>
955 <END_TC>
956 :exmp.
957
958 .*---------------------------------------------------------------------*
959 :h4.Mixing value notations - assignment notation in value list (set const in function)
960 .*---------------------------------------------------------------------*
961 :xmp tab=0.
962 <TC - Mixing value notations - assignment notation in value list (set const in function)>
963 <COMPILE>
964 <VERDICT_LEAF FAIL>
965 <MODULE TTCN x x.ttcn>
966 module x {
967
968 type set setType {
969 integer I,
970 float F,
971 charstring CS
972 }
973 function MyFunc() {
974 // NOTE: catched by the parser
975 // TR 709: Not allowed value notation reporting
976 const setType s := { 10, F:= 0.0, "error" };
977 }
978
979 }
980
981 <END_MODULE>
982 <RESULT IF_FAIL COUNT 1>
983 (?im)\berror\b.+?syntax.+?error.+?unexpected.+?:=
984 <END_RESULT>
985 <END_TC>
986 :exmp.
987
988 .*---------------------------------------------------------------------*
989 :h3.Allowed value notations
990 .*---------------------------------------------------------------------*
991
992 This test case group covers the requirement SA-6/6.
993
994 Startegy:
995 All occurances shall be tested, where such a notation can be used:
996 :list.
997 :li D='-'.in constants and variables
998 :li D='-'.in templates (static, modified, dynamic)
999 :elist.
1000 All elements in the tables below are tested in 2 situations (whenever it is allowed):
1001 in module definition part and within a function.
1002
1003 :xmp tab=0.
1004 :nl.for constants and variables:
1005 :nl.=================================================================================
1006 :nl. type assignment | value list | array | value assignment notation
1007 :nl.=================================================================================
1008 :nl.basic types T T O T
1009 :nl.---------------------------------------------------------------------------------
1010 :nl.string types T T - T
1011 :nl.---------------------------------------------------------------------------------
1012 :nl.record - - O O
1013 :nl.---------------------------------------------------------------------------------
1014 :nl.set - O O O
1015 :nl.---------------------------------------------------------------------------------
1016 :nl.union - T O O
1017 :nl.---------------------------------------------------------------------------------
1018 :nl.record of T - - O
1019 :nl.---------------------------------------------------------------------------------
1020 :nl.set of T - - O
1021 :nl.---------------------------------------------------------------------------------
1022 :nl.enumerated T T O T
1023 :nl.---------------------------------------------------------------------------------
1024 :nl.
1025 :nl.for templates and dynamic templates:
1026 :nl.=================================================================================
1027 :nl. type assignment | value list | array | value assignment notation
1028 :nl.=================================================================================
1029 :nl.basic types T T O T
1030 :nl.---------------------------------------------------------------------------------
1031 :nl.string types T T - T
1032 :nl.---------------------------------------------------------------------------------
1033 :nl.record - - O O
1034 :nl.---------------------------------------------------------------------------------
1035 :nl.set - O O O
1036 :nl.---------------------------------------------------------------------------------
1037 :nl.union - T O O
1038 :nl.---------------------------------------------------------------------------------
1039 :nl.record of T - - O
1040 :nl.---------------------------------------------------------------------------------
1041 :nl.set of T - - O
1042 :nl.---------------------------------------------------------------------------------
1043 :nl.enumerated T T O T
1044 :nl.---------------------------------------------------------------------------------
1045 :nl.
1046 :nl.for modified templates:
1047 :nl.=================================================================================
1048 :nl. type assignment | value list | value assignment notation
1049 :nl.=================================================================================
1050 :nl.basic types T T T
1051 :nl.---------------------------------------------------------------------------------
1052 :nl.string types T T T
1053 :nl.---------------------------------------------------------------------------------
1054 :nl.record - - O
1055 :nl.---------------------------------------------------------------------------------
1056 :nl.set - O O
1057 :nl.---------------------------------------------------------------------------------
1058 :nl.union - T O
1059 :nl.---------------------------------------------------------------------------------
1060 :nl.record of T - -
1061 :nl.---------------------------------------------------------------------------------
1062 :nl.set of T - O
1063 :nl.---------------------------------------------------------------------------------
1064 :nl.enumerated T T T
1065 :nl.---------------------------------------------------------------------------------
1066 :nl.(array notation is not used for modified templates)
1067 :nl.
1068 :exmp.
1069
1070 basic types: integer, float, boolean, objid, verdicttype, anytype, address, port, component, default
1071 string types: bitstring, hexstring, charstring, octetstring, universal charstring
1072
1073 T: type compatibility error, shall not be tested here
1074 :nl.O: semantic error, shall be tested here
1075 :nl.-: allowed, so cannot be negative-tested
1076
1077 Tested: The upper tables for:
1078 :list.
1079 :li D='-'.constants in definition part and function
1080 :li D='-'.templates in definition part
1081 :elist.
1082
1083 TODO: - Dinamic template tests are not ready.
1084
1085 NOTE:
1086 :nl.- type "anytype" haven't implemented yet. Can't use array notation for type "port".
1087 :nl.- the type "address" in the TITAN implementation is a user defined type, so we won't test it.
1088
1089 .*---------------------------------------------------------------------*
1090 :h4.Allowed value notations - array notation (const integer in def. part)
1091 .*---------------------------------------------------------------------*
1092 :xmp tab=0.
1093 <TC - Allowed value notations - array notation (const integer in def. part)>
1094 <COMPILE>
1095 <VERDICT_LEAF PASS>
1096 <MODULE TTCN x x.ttcn>
1097 module x{
1098
1099 const integer r:= 233;
1100
1101 const integer f:= r[0];
1102
1103 }
1104 <END_MODULE>
1105 <RESULT IF_PASS COUNT 1>
1106 (?im)Type.+?cannot.+?be.+?indexed
1107 <END_RESULT>
1108 <RESULT IF_PASS COUNT 1>
1109 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1110 <END_RESULT>
1111 <RESULT IF_PASS COUNT 1>
1112 (?is)\berror:
1113 <END_RESULT>
1114 <END_TC>
1115 :exmp.
1116
1117 .*---------------------------------------------------------------------*
1118 :h4.Allowed value notations - array notation (const integer in function)
1119 .*---------------------------------------------------------------------*
1120 :xmp tab=0.
1121 <TC - Allowed value notations - array notation (const integer in function)>
1122 <COMPILE>
1123 <VERDICT_LEAF PASS>
1124 <MODULE TTCN x x.ttcn>
1125 module x{
1126
1127 function myFunct(){
1128 const integer r:= 233;
1129 const integer f:= r[0];
1130 }
1131 }
1132 <END_MODULE>
1133 <RESULT IF_PASS COUNT 1>
1134 (?im)Type.+?cannot.+?be.+?indexed
1135 <END_RESULT>
1136 <RESULT IF_PASS COUNT 1>
1137 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1138 <END_RESULT>
1139 <RESULT IF_PASS COUNT 1>
1140 (?is)\berror:
1141 <END_RESULT>
1142 <END_TC>
1143 :exmp.
1144
1145 .*---------------------------------------------------------------------*
1146 :h4.Allowed value notations - array notation (template integer in def. part)
1147 .*---------------------------------------------------------------------*
1148 :xmp tab=0.
1149 <TC - Allowed value notations - array notation (template integer in def. part)>
1150 <COMPILE>
1151 <VERDICT_LEAF PASS>
1152 <MODULE TTCN x x.ttcn>
1153 module x{
1154
1155 template integer r:= 233;
1156 template integer f:= r[0];
1157
1158 }
1159 <END_MODULE>
1160 <RESULT IF_PASS COUNT 1>
1161 (?im)Type.+?cannot.+?be.+?indexed
1162 <END_RESULT>
1163 <RESULT IF_PASS COUNT 1>
1164 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1165 <END_RESULT>
1166 <RESULT IF_PASS COUNT 1>
1167 (?is)\berror:
1168 <END_RESULT>
1169 <END_TC>
1170 :exmp.
1171
1172 .*---------------------------------------------------------------------*
1173 :h4.Allowed value notations - array notation (const float in def. part)
1174 .*---------------------------------------------------------------------*
1175 :xmp tab=0.
1176 <TC - Allowed value notations - array notation (const float in def. part)>
1177 <COMPILE>
1178 <VERDICT_LEAF PASS>
1179 <MODULE TTCN x x.ttcn>
1180 module x{
1181
1182 const float r:= 23.3;
1183
1184 const float f:= r[0];
1185
1186 }
1187
1188 <END_MODULE>
1189 <RESULT IF_PASS COUNT 1>
1190 (?im)Type.+?cannot.+?be.+?indexed
1191 <END_RESULT>
1192 <RESULT IF_PASS COUNT 1>
1193 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1194 <END_RESULT>
1195 <RESULT IF_PASS COUNT 1>
1196 (?is)\berror:
1197 <END_RESULT>
1198 <END_TC>
1199 :exmp.
1200
1201 .*---------------------------------------------------------------------*
1202 :h4.Allowed value notations - array notation (const float in function)
1203 .*---------------------------------------------------------------------*
1204 :xmp tab=0.
1205 <TC - Allowed value notations - array notation (const float in function)>
1206 <COMPILE>
1207 <VERDICT_LEAF PASS>
1208 <MODULE TTCN x x.ttcn>
1209 module x{
1210
1211 function myFunct(){
1212 const float r:= 23.3;
1213 const float f:= r[0];
1214 }
1215 }
1216
1217 <END_MODULE>
1218 <RESULT IF_PASS COUNT 1>
1219 (?im)Type.+?cannot.+?be.+?indexed
1220 <END_RESULT>
1221 <RESULT IF_PASS COUNT 1>
1222 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1223 <END_RESULT>
1224 <RESULT IF_PASS COUNT 1>
1225 (?is)\berror:
1226 <END_RESULT>
1227 <END_TC>
1228 :exmp.
1229
1230 .*---------------------------------------------------------------------*
1231 :h4.Allowed value notations - array notation (template float in def. part)
1232 .*---------------------------------------------------------------------*
1233 :xmp tab=0.
1234 <TC - Allowed value notations - array notation (template float in def. part)>
1235 <COMPILE>
1236 <VERDICT_LEAF PASS>
1237 <MODULE TTCN x x.ttcn>
1238 module x{
1239
1240 template float r:= 23.3;
1241
1242 template float f:= r[0];
1243
1244 }
1245
1246 <END_MODULE>
1247 <RESULT IF_PASS COUNT 1>
1248 (?im)Type.+?cannot.+?be.+?indexed
1249 <END_RESULT>
1250 <RESULT IF_PASS COUNT 1>
1251 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1252 <END_RESULT>
1253 <RESULT IF_PASS COUNT 1>
1254 (?is)\berror:
1255 <END_RESULT>
1256 <END_TC>
1257 :exmp.
1258
1259 .*---------------------------------------------------------------------*
1260 :h4.Allowed value notations - array notation (const boolean in def. part)
1261 .*---------------------------------------------------------------------*
1262 :xmp tab=0.
1263 <TC - Allowed value notations - array notation (const boolean in def. part)>
1264 <COMPILE>
1265 <VERDICT_LEAF PASS>
1266 <MODULE TTCN x x.ttcn>
1267 module x{
1268
1269 const boolean r:= true;
1270
1271 const boolean f:= r[0];
1272
1273 }
1274
1275 <END_MODULE>
1276 <RESULT IF_PASS COUNT 1>
1277 (?im)Type.+?cannot.+?be.+?indexed
1278 <END_RESULT>
1279 <RESULT IF_PASS COUNT 1>
1280 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1281 <END_RESULT>
1282 <RESULT IF_PASS COUNT 1>
1283 (?is)\berror:
1284 <END_RESULT>
1285 <END_TC>
1286 :exmp.
1287
1288 .*---------------------------------------------------------------------*
1289 :h4.Allowed value notations - array notation (const boolean in function)
1290 .*---------------------------------------------------------------------*
1291 :xmp tab=0.
1292 <TC - Allowed value notations - array notation (const boolean in function)>
1293 <COMPILE>
1294 <VERDICT_LEAF PASS>
1295 <MODULE TTCN x x.ttcn>
1296 module x{
1297
1298 function myFunct(){
1299 const boolean r:= true;
1300 const boolean f:= r[0];
1301 }
1302 }
1303
1304 <END_MODULE>
1305 <RESULT IF_PASS COUNT 1>
1306 (?im)Type.+?cannot.+?be.+?indexed
1307 <END_RESULT>
1308 <RESULT IF_PASS COUNT 1>
1309 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1310 <END_RESULT>
1311 <RESULT IF_PASS COUNT 1>
1312 (?is)\berror:
1313 <END_RESULT>
1314 <END_TC>
1315 :exmp.
1316
1317 .*---------------------------------------------------------------------*
1318 :h4.Allowed value notations - array notation (template boolean in def. part)
1319 .*---------------------------------------------------------------------*
1320 :xmp tab=0.
1321 <TC - Allowed value notations - array notation (template boolean in def. part)>
1322 <COMPILE>
1323 <VERDICT_LEAF PASS>
1324 <MODULE TTCN x x.ttcn>
1325 module x{
1326
1327 template boolean r:= true;
1328
1329 template boolean f:= r[0];
1330
1331 }
1332
1333 <END_MODULE>
1334 <RESULT IF_PASS COUNT 1>
1335 (?im)Type.+?cannot.+?be.+?indexed
1336 <END_RESULT>
1337 <RESULT IF_PASS COUNT 1>
1338 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1339 <END_RESULT>
1340 <RESULT IF_PASS COUNT 1>
1341 (?is)\berror:
1342 <END_RESULT>
1343 <END_TC>
1344 :exmp.
1345
1346 .*---------------------------------------------------------------------*
1347 :h4.Allowed value notations - array notation (const objid in def. part)
1348 .*---------------------------------------------------------------------*
1349 :xmp tab=0.
1350 <TC - Allowed value notations - array notation (const objid in def. part)>
1351 <COMPILE>
1352 <VERDICT_LEAF PASS>
1353 <MODULE TTCN x x.ttcn>
1354 module x{
1355
1356 const objid r:= objid{ 0 4 };
1357
1358 const objid f:= r[0];
1359
1360 }
1361
1362 <END_MODULE>
1363 <RESULT IF_PASS COUNT 1>
1364 (?im)Type.+?cannot.+?be.+?indexed
1365 <END_RESULT>
1366 <RESULT IF_PASS COUNT 1>
1367 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1368 <END_RESULT>
1369 <RESULT IF_PASS COUNT 1>
1370 (?is)\berror:
1371 <END_RESULT>
1372 <END_TC>
1373 :exmp.
1374
1375 .*---------------------------------------------------------------------*
1376 :h4.Allowed value notations - array notation (const objid in function)
1377 .*---------------------------------------------------------------------*
1378 :xmp tab=0.
1379 <TC - Allowed value notations - array notation (const objid in function)>
1380 <COMPILE>
1381 <VERDICT_LEAF PASS>
1382 <MODULE TTCN x x.ttcn>
1383 module x{
1384
1385 function myFunct(){
1386 const objid r:= objid{ 0 4 };
1387 const objid f:= r[0];
1388 }
1389 }
1390
1391 <END_MODULE>
1392 <RESULT IF_PASS COUNT 1>
1393 (?im)Type.+?cannot.+?be.+?indexed
1394 <END_RESULT>
1395 <RESULT IF_PASS COUNT 1>
1396 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1397 <END_RESULT>
1398 <RESULT IF_PASS COUNT 1>
1399 (?is)\berror:
1400 <END_RESULT>
1401 <END_TC>
1402 :exmp.
1403
1404 .*---------------------------------------------------------------------*
1405 :h4.Allowed value notations - array notation (template objid in def. part)
1406 .*---------------------------------------------------------------------*
1407 :xmp tab=0.
1408 <TC - Allowed value notations - array notation (template objid in def. part)>
1409 <COMPILE>
1410 <VERDICT_LEAF PASS>
1411 <MODULE TTCN x x.ttcn>
1412 module x{
1413
1414 template objid r:= objid{ 0 4 };
1415
1416 template objid f:= r[0];
1417
1418 }
1419
1420 <END_MODULE>
1421 <RESULT IF_PASS COUNT 1>
1422 (?im)Type.+?cannot.+?be.+?indexed
1423 <END_RESULT>
1424 <RESULT IF_PASS COUNT 1>
1425 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1426 <END_RESULT>
1427 <RESULT IF_PASS COUNT 1>
1428 (?is)\berror:
1429 <END_RESULT>
1430 <END_TC>
1431 :exmp.
1432
1433 .*---------------------------------------------------------------------*
1434 :h4.Allowed value notations - array notation (const verdicttype in def. part)
1435 .*---------------------------------------------------------------------*
1436 :xmp tab=0.
1437 <TC - Allowed value notations - array notation (const verdicttype in def. part)>
1438 <COMPILE>
1439 <VERDICT_LEAF PASS>
1440 <MODULE TTCN x x.ttcn>
1441 module x{
1442
1443 const verdicttype r:= pass;
1444
1445 const verdicttype f:= r[0];
1446
1447 }
1448
1449 <END_MODULE>
1450 <RESULT IF_PASS COUNT 1>
1451 (?im)Type.+?cannot.+?be.+?indexed
1452 <END_RESULT>
1453 <RESULT IF_PASS COUNT 1>
1454 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1455 <END_RESULT>
1456 <RESULT IF_PASS COUNT 1>
1457 (?is)\berror:
1458 <END_RESULT>
1459 <END_TC>
1460 :exmp.
1461
1462 .*---------------------------------------------------------------------*
1463 :h4.Allowed value notations - array notation (const verdicttype in function)
1464 .*---------------------------------------------------------------------*
1465 :xmp tab=0.
1466 <TC - Allowed value notations - array notation (const verdicttype in function)>
1467 <COMPILE>
1468 <VERDICT_LEAF PASS>
1469 <MODULE TTCN x x.ttcn>
1470 module x{
1471
1472 function myFunct(){
1473 const verdicttype r:= pass;
1474 const verdicttype f:= r[0];
1475 }
1476 }
1477
1478 <END_MODULE>
1479 <RESULT IF_PASS COUNT 1>
1480 (?im)Type.+?cannot.+?be.+?indexed
1481 <END_RESULT>
1482 <RESULT IF_PASS COUNT 1>
1483 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1484 <END_RESULT>
1485 <RESULT IF_PASS COUNT 1>
1486 (?is)\berror:
1487 <END_RESULT>
1488 <END_TC>
1489 :exmp.
1490
1491 .*---------------------------------------------------------------------*
1492 :h4.Allowed value notations - array notation (template verdicttype in def. part)
1493 .*---------------------------------------------------------------------*
1494 :xmp tab=0.
1495 <TC - Allowed value notations - array notation (template verdicttype in def. part)>
1496 <COMPILE>
1497 <VERDICT_LEAF PASS>
1498 <MODULE TTCN x x.ttcn>
1499 module x{
1500
1501 template verdicttype r:= pass;
1502
1503 template verdicttype f:= r[0];
1504
1505 }
1506
1507 <END_MODULE>
1508 <RESULT IF_PASS COUNT 1>
1509 (?im)Type.+?cannot.+?be.+?indexed
1510 <END_RESULT>
1511 <RESULT IF_PASS COUNT 1>
1512 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1513 <END_RESULT>
1514 <RESULT IF_PASS COUNT 1>
1515 (?is)\berror:
1516 <END_RESULT>
1517 <END_TC>
1518 :exmp.
1519
1520 .*---------------------------------------------------------------------*
1521 :h4.Allowed value notations - array notation (const component in def. part)
1522 .*---------------------------------------------------------------------*
1523 :xmp tab=0.
1524 <TC - Allowed value notations - array notation (const component in def. part)>
1525 <COMPILE>
1526 <VERDICT_LEAF PASS>
1527 <MODULE TTCN x x.ttcn>
1528 module x{
1529
1530 type component c{ };
1531 const c r:= null;
1532
1533 const c f:= r[0];
1534 }
1535
1536 <END_MODULE>
1537 <RESULT IF_PASS COUNT 1>
1538 (?im)Type.+?cannot.+?be.+?indexed
1539 <END_RESULT>
1540 <RESULT IF_PASS COUNT 1>
1541 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1542 <END_RESULT>
1543 <RESULT IF_PASS COUNT 1>
1544 (?is)\berror:
1545 <END_RESULT>
1546 <END_TC>
1547 :exmp.
1548
1549 .*---------------------------------------------------------------------*
1550 :h4.Allowed value notations - array notation (const component in function)
1551 .*---------------------------------------------------------------------*
1552 :xmp tab=0.
1553 <TC - Allowed value notations - array notation (const component in function)>
1554 <COMPILE>
1555 <VERDICT_LEAF PASS>
1556 <MODULE TTCN x x.ttcn>
1557 module x{
1558
1559 type component c{ };
1560
1561 function myFunct(){
1562 const c r:= null;
1563 const c f:= r[0];
1564 }
1565 }
1566 <END_MODULE>
1567 <RESULT IF_PASS COUNT 1>
1568 (?im)Type.+?cannot.+?be.+?indexed
1569 <END_RESULT>
1570 <RESULT IF_PASS COUNT 1>
1571 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1572 <END_RESULT>
1573 <RESULT IF_PASS COUNT 1>
1574 (?is)\berror:
1575 <END_RESULT>
1576 <END_TC>
1577 :exmp.
1578
1579 .*---------------------------------------------------------------------*
1580 :h4.Allowed value notations - array notation (template component in def. part)
1581 .*---------------------------------------------------------------------*
1582 :xmp tab=0.
1583 <TC - Allowed value notations - array notation (template component in def. part)>
1584 <COMPILE>
1585 <VERDICT_LEAF PASS>
1586 <MODULE TTCN x x.ttcn>
1587 module x{
1588
1589 type component c{ };
1590 template c r:= null;
1591
1592 template c f:= r[0];
1593 }
1594
1595 <END_MODULE>
1596 <RESULT IF_PASS COUNT 1>
1597 (?im)Type.+?cannot.+?be.+?indexed
1598 <END_RESULT>
1599 <RESULT IF_PASS COUNT 1>
1600 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1601 <END_RESULT>
1602 <RESULT IF_PASS COUNT 1>
1603 (?is)\berror:
1604 <END_RESULT>
1605 <END_TC>
1606 :exmp.
1607
1608 .*---------------------------------------------------------------------*
1609 :h4.Allowed value notations - array notation (const default in def. part)
1610 .*---------------------------------------------------------------------*
1611 :xmp tab=0.
1612 <TC - Allowed value notations - array notation (const default in def. part)>
1613 <COMPILE>
1614 <VERDICT_LEAF PASS>
1615 <MODULE TTCN x x.ttcn>
1616 module x{
1617
1618 const default r:= null;
1619
1620 const default f:= r[0];
1621 }
1622
1623 <END_MODULE>
1624 <RESULT IF_PASS COUNT 1>
1625 (?im)Type.+?cannot.+?be.+?indexed
1626 <END_RESULT>
1627 <RESULT IF_PASS COUNT 1>
1628 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1629 <END_RESULT>
1630 <RESULT IF_PASS COUNT 1>
1631 (?is)\berror:
1632 <END_RESULT>
1633 <END_TC>
1634 :exmp.
1635
1636 .*---------------------------------------------------------------------*
1637 :h4.Allowed value notations - array notation (const default in function)
1638 .*---------------------------------------------------------------------*
1639 :xmp tab=0.
1640 <TC - Allowed value notations - array notation (const default in function)>
1641 <COMPILE>
1642 <VERDICT_LEAF PASS>
1643 <MODULE TTCN x x.ttcn>
1644 module x{
1645
1646 function myFunct(){
1647 const default r:= null;
1648 const default f:= r[0];
1649 }
1650 }
1651 <END_MODULE>
1652 <RESULT IF_PASS COUNT 1>
1653 (?im)Type.+?cannot.+?be.+?indexed
1654 <END_RESULT>
1655 <RESULT IF_PASS COUNT 1>
1656 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1657 <END_RESULT>
1658 <RESULT IF_PASS COUNT 1>
1659 (?is)\berror:
1660 <END_RESULT>
1661 <END_TC>
1662 :exmp.
1663
1664 .*---------------------------------------------------------------------*
1665 :h4.Allowed value notations - array notation (template default in def. part)
1666 .*---------------------------------------------------------------------*
1667 :xmp tab=0.
1668 <TC - Allowed value notations - array notation (template default in def. part)>
1669 <COMPILE>
1670 <VERDICT_LEAF PASS>
1671 <MODULE TTCN x x.ttcn>
1672 module x{
1673
1674 template default r:= null;
1675
1676 template default f:= r[0];
1677 }
1678
1679 <END_MODULE>
1680 <RESULT IF_PASS COUNT 1>
1681 (?im)Type.+?cannot.+?be.+?indexed
1682 <END_RESULT>
1683 <RESULT IF_PASS COUNT 1>
1684 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1685 <END_RESULT>
1686 <RESULT IF_PASS COUNT 1>
1687 (?is)\berror:
1688 <END_RESULT>
1689 <END_TC>
1690 :exmp.
1691
1692 .*---------------------------------------------------------------------*
1693 :h4.Allowed value notations - array notation (template bitstring in def. part)
1694 .*---------------------------------------------------------------------*
1695 :xmp tab=0.
1696 <TC - Allowed value notations - array notation (template bitstring in def. part)>
1697 <COMPILE>
1698 <VERDICT_LEAF PASS>
1699 <MODULE TTCN x x.ttcn>
1700 module x{
1701
1702 template bitstring r:= '01011'B;
1703 template bitstring f:= r[0];
1704
1705 }
1706
1707 <END_MODULE>
1708 <RESULT IF_PASS COUNT 1>
1709 (?im)type.+?cannot.+?be.+?indexed
1710 <END_RESULT>
1711 <RESULT IF_PASS COUNT 1>
1712 (?im)\bNotify\b.+?\bCode\b.+?\bnot\b.+?\bgenerated\b
1713 <END_RESULT>
1714 <RESULT IF_PASS COUNT 1>
1715 (?is)\berror:
1716 <END_RESULT>
1717 <END_TC>
1718 :exmp.
1719
1720 .*---------------------------------------------------------------------*
1721 :h4.Allowed value notations - array notation (template hexstring in def. part)
1722 .*---------------------------------------------------------------------*
1723 :xmp tab=0.
1724 <TC - Allowed value notations - array notation (template hexstring in def. part)>
1725 <COMPILE>
1726 <VERDICT_LEAF PASS>
1727 <MODULE TTCN x x.ttcn>
1728 module x{
1729
1730 template hexstring r:= 'AB01D'H;
1731 template hexstring f:= r[0];
1732
1733 }
1734
1735 <END_MODULE>
1736 <RESULT IF_PASS COUNT 1>
1737 (?im)type.+?cannot.+?be.+?indexed
1738 <END_RESULT>
1739 <RESULT IF_PASS COUNT 1>
1740 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1741 <END_RESULT>
1742 <RESULT IF_PASS COUNT 1>
1743 (?is)\berror:
1744 <END_RESULT>
1745 <END_TC>
1746 :exmp.
1747
1748 .*---------------------------------------------------------------------*
1749 :h4.Allowed value notations - array notation (template octetstring in def. part)
1750 .*---------------------------------------------------------------------*
1751 :xmp tab=0.
1752 <TC - Allowed value notations - array notation (template octetstring in def. part)>
1753 <COMPILE>
1754 <VERDICT_LEAF PASS>
1755 <MODULE TTCN x x.ttcn>
1756 module x{
1757
1758 template octetstring r:= '000000'O;
1759 template octetstring f:= r[0];
1760
1761 }
1762
1763 <END_MODULE>
1764 <RESULT IF_PASS COUNT 1>
1765 (?im)type.+?cannot.+?be.+?indexed
1766 <END_RESULT>
1767 <RESULT IF_PASS COUNT 1>
1768 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1769 <END_RESULT>
1770 <RESULT IF_PASS COUNT 1>
1771 (?is)\berror:
1772 <END_RESULT>
1773 <END_TC>
1774 :exmp.
1775
1776 .*---------------------------------------------------------------------*
1777 :h4.Allowed value notations - array notation (template charstring in def. part)
1778 .*---------------------------------------------------------------------*
1779 :xmp tab=0.
1780 <TC - Allowed value notations - array notation (template charstring in def. part)>
1781 <COMPILE>
1782 <VERDICT_LEAF PASS>
1783 <MODULE TTCN x x.ttcn>
1784 module x{
1785
1786 template charstring r:= "aiyyo";
1787 template charstring f:= r[0];
1788
1789 }
1790
1791 <END_MODULE>
1792 <RESULT IF_PASS COUNT 1>
1793 (?im)type.+?cannot.+?be.+?indexed
1794 <END_RESULT>
1795 <RESULT IF_PASS COUNT 1>
1796 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1797 <END_RESULT>
1798 <RESULT IF_PASS COUNT 1>
1799 (?is)\berror:
1800 <END_RESULT>
1801 <END_TC>
1802 :exmp.
1803
1804 .*---------------------------------------------------------------------*
1805 :h4.Allowed value notations - array notation (template universal charstring in def. part)
1806 .*---------------------------------------------------------------------*
1807 :xmp tab=0.
1808 <TC - Allowed value notations - array notation (template universal charstring in def. part)>
1809 <COMPILE>
1810 <VERDICT_LEAF PASS>
1811 <MODULE TTCN x x.ttcn>
1812 module x{
1813
1814 template universal charstring r:= "aiyyo" & char( 0, 0, 1, 113) & "yo";
1815 template universal charstring f:= r[0];
1816
1817 }
1818
1819 <END_MODULE>
1820 <RESULT IF_PASS COUNT 1>
1821 (?im)type.+?cannot.+?be.+?indexed
1822 <END_RESULT>
1823 <RESULT IF_PASS COUNT 1>
1824 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1825 <END_RESULT>
1826 <RESULT IF_PASS COUNT 1>
1827 (?is)\berror:
1828 <END_RESULT>
1829 <END_TC>
1830 :exmp.
1831
1832 .*---------------------------------------------------------------------*
1833 :h4.Allowed value notations - array notation (const record in def. part)
1834 .*---------------------------------------------------------------------*
1835 :xmp tab=0.
1836 <TC - Allowed value notations - array notation (const record in def. part)>
1837 <COMPILE>
1838 <VERDICT_LEAF PASS>
1839 <MODULE TTCN x x.ttcn>
1840 module x {
1841
1842 type record Record {
1843 integer I,
1844 float F optional,
1845 charstring CS
1846 }
1847
1848 const Record r := { 1, 0.0, "error" };
1849 const integer f := r[0];
1850
1851 }
1852 <END_MODULE>
1853 <RESULT IF_PASS COUNT 1>
1854 (?im)Type.+?cannot.+?be.+?indexed
1855 <END_RESULT>
1856 <RESULT IF_PASS COUNT 1>
1857 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1858 <END_RESULT>
1859 <RESULT IF_PASS COUNT 1>
1860 (?is)\berror:
1861 <END_RESULT>
1862 <END_TC>
1863 :exmp.
1864
1865 .*---------------------------------------------------------------------*
1866 :h4.Allowed value notations - array notation (const record in function)
1867 .*---------------------------------------------------------------------*
1868 :xmp tab=0.
1869 <TC - Allowed value notations - array notation (const record in function)>
1870 <COMPILE>
1871 <VERDICT_LEAF PASS>
1872 <MODULE TTCN x x.ttcn>
1873 module x {
1874
1875 type record Record {
1876 integer I,
1877 float F optional,
1878 charstring CS
1879 }
1880
1881 function MyFunc() {
1882
1883 const Record r := { 1, 0.0, "aiyyo" };
1884 const integer f := r[0];
1885 }
1886 }
1887 <END_MODULE>
1888 <RESULT IF_PASS COUNT 1>
1889 (?im)Type.+?cannot.+?be.+?indexed
1890 <END_RESULT>
1891 <RESULT IF_PASS COUNT 1>
1892 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1893 <END_RESULT>
1894 <RESULT IF_PASS COUNT 1>
1895 (?is)\berror:
1896 <END_RESULT>
1897 <END_TC>
1898 :exmp.
1899
1900 .*---------------------------------------------------------------------*
1901 :h4.Allowed value notations - array notation (template record in def. part)
1902 .*---------------------------------------------------------------------*
1903 :xmp tab=0.
1904 <TC - Allowed value notations - array notation (template record in def. part)>
1905 <COMPILE>
1906 <VERDICT_LEAF PASS>
1907 <MODULE TTCN x x.ttcn>
1908 module x {
1909
1910 type record recT {
1911 integer I,
1912 float F,
1913 charstring CS
1914 }
1915
1916 template recT r := { I:= 1, F:= 0.0, CS:= "aiyyo" };
1917 template recT f := r[0];
1918
1919 }
1920 <END_MODULE>
1921 <RESULT IF_PASS COUNT 1>
1922 (?im)Type.+?cannot.+?be.+?indexed
1923 <END_RESULT>
1924 <RESULT IF_PASS COUNT 1>
1925 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1926 <END_RESULT>
1927 <RESULT IF_PASS COUNT 1>
1928 (?is)\berror:
1929 <END_RESULT>
1930 <END_TC>
1931 :exmp.
1932
1933 .*---------------------------------------------------------------------*
1934 :h4.Allowed value notations - value assignment notation (const record in def. part)
1935 .*---------------------------------------------------------------------*
1936 :xmp tab=0.
1937 <TC - Allowed value notations - value assignment notation (const record in def. part)>
1938 <COMPILE>
1939 <VERDICT_LEAF FAIL>
1940 <MODULE TTCN x x.ttcn>
1941 module x{
1942
1943 type record recT{
1944 integer f1,
1945 float f2,
1946 charstring f3
1947 }
1948
1949 const recT f:={
1950 [1]:= 1,
1951 [2]:= 0.9,
1952 [3]:= "aiyyo"
1953 }
1954
1955 }
1956 <END_MODULE>
1957 <RESULT IF_FAIL POSITIVE>
1958 (?is)\berror: Indexed assignment notation cannot be used for record type `@x.recT'
1959 <END_RESULT>
1960 <END_TC>
1961 :exmp.
1962
1963 .*---------------------------------------------------------------------*
1964 :h4.Allowed value notations - value assignment notation (const record in function)
1965 .*---------------------------------------------------------------------*
1966 :xmp tab=0.
1967 <TC - Allowed value notations - value assignment notation (const record in function)>
1968 <COMPILE>
1969 <VERDICT_LEAF FAIL>
1970 <MODULE TTCN x x.ttcn>
1971 module x{
1972
1973 type record recT{
1974 integer f1,
1975 float f2,
1976 charstring f3
1977 }
1978
1979 function MyFunc() {
1980 const recT f:={
1981 [1]:= 1,
1982 [2]:= 0.9,
1983 [3]:= "pass"
1984 }
1985 }
1986 }
1987 <END_MODULE>
1988 <RESULT IF_FAIL POSITIVE>
1989 (?is)\berror: Indexed assignment notation cannot be used for record type `@x.recT'
1990 <END_RESULT>
1991 <END_TC>
1992 :exmp.
1993
1994 .*---------------------------------------------------------------------*
1995 :h4.Allowed value notations - value assignment notation (template record in def. part)
1996 .*---------------------------------------------------------------------*
1997 :xmp tab=0.
1998 <TC - Allowed value notations - value assignment notation (template record in def. part)>
1999 <COMPILE>
2000 <VERDICT_LEAF FAIL>
2001 <MODULE TTCN x x.ttcn>
2002 module x{
2003
2004 type record recT{
2005 integer f1,
2006 float f2,
2007 charstring f3
2008 }
2009
2010 template recT f:={
2011 [1]:= 1,
2012 [2]:= 0.9,
2013 [3]:= "aiyyo"
2014 }
2015
2016 }
2017 <END_MODULE>
2018 <RESULT IF_FAIL COUNT 1>
2019 (?im)\berror\b.+?assignment.+?notation.+?with.+?array.+?indices.+?cannot.+?be.+?used.+?for.+?record.+?type
2020 <END_RESULT>
2021 <RESULT IF_FAIL COUNT 1>
2022 (?is)\berror:
2023 <END_RESULT>
2024 <END_TC>
2025 :exmp.
2026
2027 .*---------------------------------------------------------------------*
2028 :h4.Allowed value notations - value assignment notation (timer-array in function)
2029 .*---------------------------------------------------------------------*
2030 :xmp tab=0.
2031 <TC - Allowed value notations - value assignment notation (timer-array in function)>
2032 <COMPILE>
2033 <VERDICT_LEAF FAIL>
2034 <MODULE TTCN x x.ttcn>
2035 module x{
2036
2037 function MyFunc() {
2038 timer timerarray[3] := {[0] := 1, [1] := 2, [2] := 3};
2039 }
2040 }
2041 <END_MODULE>
2042 <RESULT IF_FAIL COUNT 3>
2043 (?is)\bA value or expression of type float was expected
2044 <END_RESULT>
2045 <RESULT IF_FAIL COUNT 3>
2046 (?is)\berror:
2047 <END_RESULT>
2048 <END_TC>
2049 :exmp.
2050
2051 .*---------------------------------------------------------------------*
2052 :h4.Allowed value notations - value assignment notation (port-array in function)
2053 .*---------------------------------------------------------------------*
2054 :xmp tab=0.
2055 <TC - Allowed value notations - value assignment notation (port-array in function)>
2056 <COMPILE>
2057 <VERDICT_LEAF FAIL>
2058 <MODULE TTCN x x.ttcn>
2059 module x{
2060
2061 type port myport message{inout charstring};
2062
2063 type component self_comp{
2064 port myport ports[3];
2065 }
2066
2067 function MyFunc() runs on self_comp{
2068 ports := {[0] := 1.0, [1] := 2.0, [2] := 3.0};
2069 }
2070 }
2071 <END_MODULE>
2072 <RESULT IF_FAIL COUNT 1>
2073 (?im)\berror\b.+?Reference.+?to.+?a.+?variable.+?or.+?template.+?variable.+?was.+?expected
2074 <END_RESULT>
2075 <RESULT IF_FAIL COUNT 1>
2076 (?is)\berror:
2077 <END_RESULT>
2078 <END_TC>
2079 :exmp.
2080
2081 .*---------------------------------------------------------------------*
2082 :h4.Allowed value notations - value assignment notation (modified template record in def. part)
2083 .*---------------------------------------------------------------------*
2084 :xmp tab=0.
2085 <TC - Allowed value notations - value assignment notation (modified template record in def. part)>
2086 <COMPILE>
2087 <VERDICT_LEAF FAIL>
2088 <MODULE TTCN x x.ttcn>
2089 module x{
2090
2091 type record recT{
2092 integer f1,
2093 float f2,
2094 charstring f3
2095 }
2096
2097 template recT r:={
2098 f1:= 1,
2099 f2:= 0.9,
2100 f3:= "aiyyo"
2101 }
2102
2103 template recT f modifies r:= { [0]:= 1, [2]:= 0.9 };
2104
2105 }
2106 <END_MODULE>
2107 <RESULT IF_FAIL COUNT 1>
2108 (?im)\berror\b.+?assignment.+?notation.+?with.+?array.+?indices.+?cannot.+?be.+?used.+?for.+?record.+?type
2109 <END_RESULT>
2110 <RESULT IF_FAIL COUNT 1>
2111 (?is)\berror:
2112 <END_RESULT>
2113 <END_TC>
2114 :exmp.
2115
2116 .*---------------------------------------------------------------------*
2117 :h4.Allowed value notations - value list notation (modified template record in def. part)
2118 .*---------------------------------------------------------------------*
2119 :xmp tab=0.
2120 <TC - Allowed value notations - value list notation (modified template record in def. part)>
2121 <COMPILE>
2122 <VERDICT_LEAF FAIL>
2123 <MODULE TTCN x x.ttcn>
2124 module x{
2125
2126 type record recT{
2127 integer f1,
2128 float f2,
2129 charstring f3
2130 }
2131
2132 template recT r:={
2133 f1:= 1,
2134 f2:= 0.9,
2135 f3:= "aiyyo"
2136 }
2137
2138 template recT f modifies r:= ({ f1:= 1, f2:= 0.9 }, { f1 := 1, f2 := 0.9, f3 := "pppp" });
2139
2140 }
2141 <END_MODULE>
2142 <RESULT IF_FAIL COUNT 1>
2143 (?im)\berror\b.+?field.+?f3.+?is.+?missing.+?from.+?template.+?for.+?record.+?type
2144 <END_RESULT>
2145 <RESULT IF_FAIL COUNT 1>
2146 (?is)\berror:
2147 <END_RESULT>
2148 <END_TC>
2149 :exmp.
2150
2151 .*---------------------------------------------------------------------*
2152 :h4.Allowed value notations - complement value list notation (modified template record in def. part)
2153 .*---------------------------------------------------------------------*
2154 :xmp tab=0.
2155 <TC - Allowed value notations - complement value list notation (modified template record in def. part)>
2156 <COMPILE>
2157 <VERDICT_LEAF FAIL>
2158 <MODULE TTCN x x.ttcn>
2159 module x{
2160
2161 type record recT{
2162 integer f1,
2163 float f2,
2164 charstring f3
2165 }
2166
2167 template recT r:={
2168 f1:= 1,
2169 f2:= 0.9,
2170 f3:= "aiyyo"
2171 }
2172
2173 template recT f modifies r:= complement({ f1:= 1, f2:= 0.9 }, { f1:= 1, f2:= 0.9, f3 := "pppp" });
2174
2175 }
2176 <END_MODULE>
2177 <RESULT IF_FAIL COUNT 1>
2178 (?im)\berror\b.+?field.+?f3.+?is.+?missing.+?from.+?template.+?for.+?record.+?type
2179 <END_RESULT>
2180 <RESULT IF_FAIL COUNT 1>
2181 (?is)\berror:
2182 <END_RESULT>
2183 <END_TC>
2184 :exmp.
2185
2186 .*---------------------------------------------------------------------*
2187 :h4.Allowed value notations - value list (const set in def. part)
2188 .*---------------------------------------------------------------------*
2189 :xmp tab=0.
2190 <TC - Allowed value notations - value list (const set in def. part)>
2191 <COMPILE>
2192 <VERDICT_LEAF PASS>
2193 <MODULE TTCN x x.ttcn>
2194 module x {
2195
2196 type set Set {
2197 integer I,
2198 float F,
2199 charstring CS
2200 }
2201
2202 const Set s := { 3.14, "error", 9 };
2203
2204 }
2205 <END_MODULE>
2206 <RESULT IF_PASS COUNT 1>
2207 (?im)value.+?list.+?notation.+?cannot.+?be.+?used
2208 <END_RESULT>
2209 <RESULT IF_PASS COUNT 1>
2210 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2211 <END_RESULT>
2212 <RESULT IF_PASS COUNT 1>
2213 (?is)\berror:
2214 <END_RESULT>
2215 <END_TC>
2216 :exmp.
2217
2218 .*---------------------------------------------------------------------*
2219 :h4.Allowed value notations - value list (const set in function)
2220 .*---------------------------------------------------------------------*
2221 :xmp tab=0.
2222 <TC - Allowed value notations - value list (const set in function)>
2223 <COMPILE>
2224 <VERDICT_LEAF PASS>
2225 <MODULE TTCN x x.ttcn>
2226 module x {
2227
2228 type set Set {
2229 integer I,
2230 float F,
2231 charstring CS
2232 }
2233
2234 function MyFunc() {
2235
2236 const Set s := { 3.14, "error", 9 };
2237 }
2238 }
2239 <END_MODULE>
2240 <RESULT IF_PASS COUNT 1>
2241 (?im)value.+?list.+?notation.+?cannot.+?be.+?used
2242 <END_RESULT>
2243 <RESULT IF_PASS COUNT 1>
2244 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2245 <END_RESULT>
2246 <RESULT IF_PASS COUNT 1>
2247 (?is)\berror:
2248 <END_RESULT>
2249 <END_TC>
2250 :exmp.
2251
2252 .*---------------------------------------------------------------------*
2253 :h4.Allowed value notations - value list (template set in def. part)
2254 .*---------------------------------------------------------------------*
2255 :xmp tab=0.
2256 <TC - Allowed value notations - value list (template set in def. part)>
2257 <COMPILE>
2258 <VERDICT_LEAF PASS>
2259 <MODULE TTCN x x.ttcn>
2260 module x {
2261
2262 type set Set {
2263 integer I,
2264 float F,
2265 charstring CS
2266 }
2267
2268 template Set s := { 3.14, "error", 9 };
2269
2270 }
2271 <END_MODULE>
2272 <RESULT IF_PASS COUNT 1>
2273 (?im)Value.+?list.+?notation.+?not.+?allowed
2274 <END_RESULT>
2275 <RESULT IF_PASS COUNT 1>
2276 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2277 <END_RESULT>
2278 <RESULT IF_PASS COUNT 1>
2279 (?is)\berror:
2280 <END_RESULT>
2281 <END_TC>
2282 :exmp.
2283
2284 .*---------------------------------------------------------------------*
2285 :h4.Allowed value notations - value list (modified template set in def. part)
2286 .*---------------------------------------------------------------------*
2287 :xmp tab=0.
2288 <TC - Allowed value notations - value list (modified template set in def. part)>
2289 <COMPILE>
2290 <VERDICT_LEAF PASS>
2291 <MODULE TTCN x x.ttcn>
2292 module x {
2293
2294 type set setT {
2295 integer I,
2296 float F,
2297 charstring CS
2298 }
2299
2300 template setT s:= { F:= 3.14, CS:= "aiyyo", I:= 9 };
2301
2302 template setT f modifies s:= { 0, 8.8, "gerappa" };
2303
2304 }
2305 <END_MODULE>
2306 <RESULT IF_PASS COUNT 1>
2307 (?im)Value.+?list.+?notation.+?not.+?allowed
2308 <END_RESULT>
2309 <RESULT IF_PASS COUNT 1>
2310 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2311 <END_RESULT>
2312 <RESULT IF_PASS COUNT 1>
2313 (?is)\berror:
2314 <END_RESULT>
2315 <END_TC>
2316 :exmp.
2317
2318 .*---------------------------------------------------------------------*
2319 :h4.Allowed value notations - array notation (const set in def. part)
2320 .*---------------------------------------------------------------------*
2321 :xmp tab=0.
2322 <TC - Allowed value notations - array notation (const set in def. part)>
2323 <COMPILE>
2324 <VERDICT_LEAF PASS>
2325 <MODULE TTCN x x.ttcn>
2326 module x {
2327
2328 type set Set {
2329 integer I,
2330 float F optional,
2331 charstring CS
2332 }
2333
2334 const Set cSet := {
2335 I:= 1,
2336 F:= 0.0,
2337 CS:= "error"
2338 };
2339
2340 const integer FaultyField := cSet[0];
2341
2342 }
2343 <END_MODULE>
2344 <RESULT IF_PASS COUNT 1>
2345 (?im)Type.+?cannot.+?be.+?indexed
2346 <END_RESULT>
2347 <RESULT IF_PASS COUNT 1>
2348 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2349 <END_RESULT>
2350 <RESULT IF_PASS COUNT 1>
2351 (?is)\berror:
2352 <END_RESULT>
2353 <END_TC>
2354 :exmp.
2355
2356 .*---------------------------------------------------------------------*
2357 :h4.Allowed value notations - array notation (const set in function)
2358 .*---------------------------------------------------------------------*
2359 :xmp tab=0.
2360 <TC - Allowed value notations - array notation (const set in function)>
2361 <COMPILE>
2362 <VERDICT_LEAF PASS>
2363 <MODULE TTCN x x.ttcn>
2364 module x {
2365
2366 type set Set {
2367 integer I,
2368 float F optional,
2369 charstring CS
2370 }
2371
2372 function MyFunc() {
2373
2374 const Set cSet := {
2375 I:= 1,
2376 F:= 0.0,
2377 CS:= "error"
2378 };
2379
2380 const integer FaultyField := cSet[0];
2381 }
2382 }
2383 <END_MODULE>
2384 <RESULT IF_PASS COUNT 1>
2385 (?im)Type.+?cannot.+?be.+?indexed
2386 <END_RESULT>
2387 <RESULT IF_PASS COUNT 1>
2388 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2389 <END_RESULT>
2390 <RESULT IF_PASS COUNT 1>
2391 (?is)\berror:
2392 <END_RESULT>
2393 <END_TC>
2394 :exmp.
2395
2396 .*---------------------------------------------------------------------*
2397 :h4.Allowed value notations - array notation (template set in def. part)
2398 .*---------------------------------------------------------------------*
2399 :xmp tab=0.
2400 <TC - Allowed value notations - array notation (template set in def. part)>
2401 <COMPILE>
2402 <VERDICT_LEAF PASS>
2403 <MODULE TTCN x x.ttcn>
2404 module x {
2405
2406 type set Set {
2407 integer I,
2408 float F optional,
2409 charstring CS
2410 }
2411
2412 template Set cSet := {
2413 I:= 1,
2414 F:= 0.0,
2415 CS:= "error"
2416 };
2417
2418 template integer FaultyField := cSet[0];
2419
2420 }
2421 <END_MODULE>
2422 <RESULT IF_PASS COUNT 1>
2423 (?im)Type.+?cannot.+?be.+?indexed
2424 <END_RESULT>
2425 <RESULT IF_PASS COUNT 1>
2426 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2427 <END_RESULT>
2428 <RESULT IF_PASS COUNT 1>
2429 (?is)\berror:
2430 <END_RESULT>
2431 <END_TC>
2432 :exmp.
2433
2434 .*---------------------------------------------------------------------*
2435 :h4.Allowed value notations - value assignment notation (const set in def. part)
2436 .*---------------------------------------------------------------------*
2437 :xmp tab=0.
2438 <TC - Allowed value notations - value assignment notation (const set in def. part)>
2439 <COMPILE>
2440 <VERDICT_LEAF FAIL>
2441 <MODULE TTCN x x.ttcn>
2442 module x{
2443
2444 type set setT{
2445 integer f1,
2446 float f2,
2447 charstring f3
2448 }
2449
2450 const setT f:={
2451 [1]:= 1,
2452 [2]:= 0.9,
2453 [3]:= "pass"
2454 }
2455
2456 }
2457 <END_MODULE>
2458 <RESULT IF_FAIL POSITIVE>
2459 (?is)\berror:
2460 <END_RESULT>
2461 <END_TC>
2462 :exmp.
2463
2464 .*---------------------------------------------------------------------*
2465 :h4.Allowed value notations - value assignment notation (template set in def. part)
2466 .*---------------------------------------------------------------------*
2467 :xmp tab=0.
2468 <TC - Allowed value notations - value assignment notation (template set in def. part)>
2469 <COMPILE>
2470 <VERDICT_LEAF FAIL>
2471 <MODULE TTCN x x.ttcn>
2472 module x{
2473
2474 type set setT{
2475 integer f1,
2476 float f2,
2477 charstring f3
2478 }
2479
2480 template setT f:={
2481 [1]:= 1,
2482 [2]:= 0.9,
2483 [3]:= "pass"
2484 }
2485
2486 }
2487 <END_MODULE>
2488 <RESULT IF_FAIL COUNT 1>
2489 (?im)\berror\b.+?assignment.+?notation.+?with.+?array.+?indices.+?cannot.+?be.+?used.+?for.+?set.+?type
2490 <END_RESULT>
2491 <RESULT IF_FAIL COUNT 1>
2492 (?is)\berror:
2493 <END_RESULT>
2494 <END_TC>
2495 :exmp.
2496
2497 .*---------------------------------------------------------------------*
2498 :h4.Allowed value notations - value assignment notation (modified template set in def. part)
2499 .*---------------------------------------------------------------------*
2500 :xmp tab=0.
2501 <TC - Allowed value notations - value assignment notation (modified template set in def. part)>
2502 <COMPILE>
2503 <VERDICT_LEAF FAIL>
2504 <MODULE TTCN x x.ttcn>
2505 module x{
2506
2507 type set setT{
2508 integer f1,
2509 float f2,
2510 charstring f3
2511 }
2512
2513 template setT r:={
2514 f1:= 1,
2515 f2:= 0.9,
2516 f3:= "aiyyo"
2517 }
2518
2519 // TR 711: A nonexistent reference is reported only once
2520 template setT f modifies r:= { [0]:= 1, [2]:= 0.9 };
2521
2522 }
2523 <END_MODULE>
2524 <RESULT IF_FAIL COUNT 1>
2525 (?im)\berror\b.+?assignment.+?notation.+?with.+?array.+?indices.+?cannot.+?be.+?used.+?for.+?set.+?type
2526 <END_RESULT>
2527 <RESULT IF_FAIL COUNT 1>
2528 (?is)\berror:
2529 <END_RESULT>
2530 <END_TC>
2531 :exmp.
2532
2533 .*---------------------------------------------------------------------*
2534 :h4.Allowed value notations - array notation (const union in def. part)
2535 .*---------------------------------------------------------------------*
2536 :xmp tab=0.
2537 <TC - Allowed value notations - array notation (const union in def. part)>
2538 <COMPILE>
2539 <VERDICT_LEAF PASS>
2540 <MODULE TTCN x x.ttcn>
2541 module x {
2542
2543 type union u {
2544 integer f_int,
2545 float f_float
2546 }
2547
2548 const u r := { f_int:=1 };
2549
2550 const u f:= r[0];
2551 }
2552 <END_MODULE>
2553 <RESULT IF_PASS COUNT 1>
2554 (?im)Type.+?cannot.+?be.+?indexed
2555 <END_RESULT>
2556 <RESULT IF_PASS COUNT 1>
2557 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2558 <END_RESULT>
2559 <RESULT IF_PASS COUNT 1>
2560 (?is)\berror:
2561 <END_RESULT>
2562 <END_TC>
2563 :exmp.
2564
2565 .*---------------------------------------------------------------------*
2566 :h4.Allowed value notations - array notation (const union in function)
2567 .*---------------------------------------------------------------------*
2568 :xmp tab=0.
2569 <TC - Allowed value notations - array notation (const union in function)>
2570 <COMPILE>
2571 <VERDICT_LEAF PASS>
2572 <MODULE TTCN x x.ttcn>
2573 module x {
2574
2575 type union u {
2576 integer f_int,
2577 float f_float
2578 }
2579
2580 function myFunct(){
2581 const u r := { f_int:=1 };
2582 const u f:= r[0];
2583 }
2584 }
2585 <END_MODULE>
2586 <RESULT IF_PASS COUNT 1>
2587 (?im)Type.+?cannot.+?be.+?indexed
2588 <END_RESULT>
2589 <RESULT IF_PASS COUNT 1>
2590 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2591 <END_RESULT>
2592 <RESULT IF_PASS COUNT 1>
2593 (?is)\berror:
2594 <END_RESULT>
2595 <END_TC>
2596 :exmp.
2597
2598 .*---------------------------------------------------------------------*
2599 :h4.Allowed value notations - array notation (template union in def. part)
2600 .*---------------------------------------------------------------------*
2601 :xmp tab=0.
2602 <TC - Allowed value notations - array notation (template union in def. part)>
2603 <COMPILE>
2604 <VERDICT_LEAF PASS>
2605 <MODULE TTCN x x.ttcn>
2606 module x {
2607
2608 type union u {
2609 integer f_int,
2610 float f_float
2611 }
2612
2613 template u r := { f_int:=1 };
2614
2615 template u f:= r[0];
2616 }
2617 <END_MODULE>
2618 <RESULT IF_PASS COUNT 1>
2619 (?im)Type.+?cannot.+?be.+?indexed
2620 <END_RESULT>
2621 <RESULT IF_PASS COUNT 1>
2622 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2623 <END_RESULT>
2624 <RESULT IF_PASS COUNT 1>
2625 (?is)\berror:
2626 <END_RESULT>
2627 <END_TC>
2628 :exmp.
2629
2630 .*---------------------------------------------------------------------*
2631 :h4.Allowed value notations - value assignment notation (const union in def. part)
2632 .*---------------------------------------------------------------------*
2633 :xmp tab=0.
2634 <TC - Allowed value notations - value assignment notation (const union in def. part)>
2635 <COMPILE>
2636 <VERDICT_LEAF FAIL>
2637 <MODULE TTCN x x.ttcn>
2638 module x{
2639
2640 type union uniT{
2641 integer f1,
2642 float f2,
2643 charstring f3
2644 }
2645
2646 const uniT f:={
2647 [1]:= 1
2648 }
2649
2650 }
2651 <END_MODULE>
2652 <RESULT IF_FAIL POSITIVE>
2653 (?is)\berror: union value was expected for type `@x.uniT'
2654 <END_RESULT>
2655 <RESULT IF_FAIL COUNT 1>
2656 (?is)\berror:
2657 <END_RESULT>
2658 <END_TC>
2659 :exmp.
2660
2661 .*---------------------------------------------------------------------*
2662 :h4.Allowed value notations - value assignment notation (const union in function)
2663 .*---------------------------------------------------------------------*
2664 :xmp tab=0.
2665 <TC - Allowed value notations - value assignment notation (const union in function)>
2666 <COMPILE>
2667 <VERDICT_LEAF FAIL>
2668 <MODULE TTCN x x.ttcn>
2669 module x{
2670
2671 type union uniT{
2672 integer f1,
2673 float f2,
2674 charstring f3
2675 }
2676
2677 function myFunct(){
2678 const uniT f:={
2679 [1]:= 1
2680 }
2681 }
2682 }
2683 <END_MODULE>
2684 <RESULT IF_FAIL POSITIVE>
2685 (?is)\berror: union value was expected for type `@x.uniT'
2686 <END_RESULT>
2687 <RESULT IF_FAIL COUNT 1>
2688 (?is)\berror:
2689 <END_RESULT>
2690 <END_TC>
2691 :exmp.
2692
2693 .*---------------------------------------------------------------------*
2694 :h4.Allowed value notations - value assignment notation (template union in def. part)
2695 .*---------------------------------------------------------------------*
2696 :xmp tab=0.
2697 <TC - Allowed value notations - value assignment notation (template union in def. part)>
2698 <COMPILE>
2699 <VERDICT_LEAF FAIL>
2700 <MODULE TTCN x x.ttcn>
2701 module x{
2702
2703 type union uniT{
2704 integer f1,
2705 float f2,
2706 charstring f3
2707 }
2708
2709 // TR 710: Incorrect error message
2710 template uniT f:={
2711 [1]:= 1
2712 }
2713
2714 }
2715 <END_MODULE>
2716 <RESULT IF_FAIL COUNT 1>
2717 (?im)\berror\b.+?assignment.+?notation.+?with.+?array.+?indices.+?cannot.+?be.+?used.+?for.+?union.+?type
2718 <END_RESULT>
2719 <RESULT IF_FAIL COUNT 1>
2720 (?is)\berror:
2721 <END_RESULT>
2722 <END_TC>
2723 :exmp.
2724
2725 .*---------------------------------------------------------------------*
2726 :h4.Allowed value notations - value assignment notation (modified template union in def. part)
2727 .*---------------------------------------------------------------------*
2728 :xmp tab=0.
2729 <TC - Allowed value notations - value assignment notation (modified template union in def. part)>
2730 <COMPILE>
2731 <VERDICT_LEAF FAIL>
2732 <MODULE TTCN x x.ttcn>
2733 module x {
2734
2735 type union u {
2736 integer f_int,
2737 float f_float
2738 }
2739
2740 template u r := { f_int:=1 };
2741
2742 // TR 710: Incorrect error message
2743 template u f modifies r:= { [0]:= 2 };
2744
2745 }
2746 <END_MODULE>
2747 <RESULT IF_FAIL COUNT 1>
2748 (?im)\berror\b.+?assignment.+?notation.+?with.+?array.+?indices.+?cannot.+?be.+?used.+?for.+?union.+?type
2749 <END_RESULT>
2750 <RESULT IF_FAIL COUNT 1>
2751 (?is)\berror:
2752 <END_RESULT>
2753 <END_TC>
2754 :exmp.
2755
2756 .*---------------------------------------------------------------------*
2757 :h4.Allowed value notations - array notation (const enumerated in def. part)
2758 .*---------------------------------------------------------------------*
2759 :xmp tab=0.
2760 <TC - Allowed value notations - array notation (const enumerated in def. part)>
2761 <COMPILE>
2762 <VERDICT_LEAF PASS>
2763 <MODULE TTCN x x.ttcn>
2764 module x {
2765
2766 type enumerated enum { ONE(1), TWO(2), THREE(3) };
2767
2768 const enum r:= ONE;
2769
2770 const enum f:= r[0];
2771 }
2772
2773 <END_MODULE>
2774 <RESULT IF_PASS COUNT 1>
2775 (?im)Type.+?cannot.+?be.+?indexed
2776 <END_RESULT>
2777 <RESULT IF_PASS COUNT 1>
2778 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2779 <END_RESULT>
2780 <RESULT IF_PASS COUNT 1>
2781 (?is)\berror:
2782 <END_RESULT>
2783 <END_TC>
2784 :exmp.
2785
2786 .*---------------------------------------------------------------------*
2787 :h4.Allowed value notations - array notation (const enumerated in function)
2788 .*---------------------------------------------------------------------*
2789 :xmp tab=0.
2790 <TC - Allowed value notations - array notation (const enumerated in function)>
2791 <COMPILE>
2792 <VERDICT_LEAF PASS>
2793 <MODULE TTCN x x.ttcn>
2794 module x {
2795
2796 type enumerated enum { ONE(1), TWO(2), THREE(3) };
2797
2798 function myFunct(){
2799 const enum r:= ONE;
2800 const enum f:= r[0];
2801 }
2802 }
2803 <END_MODULE>
2804 <RESULT IF_PASS COUNT 1>
2805 (?im)Type.+?cannot.+?be.+?indexed
2806 <END_RESULT>
2807 <RESULT IF_PASS COUNT 1>
2808 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2809 <END_RESULT>
2810 <RESULT IF_PASS COUNT 1>
2811 (?is)\berror:
2812 <END_RESULT>
2813 <END_TC>
2814 :exmp.
2815
2816 .*---------------------------------------------------------------------*
2817 :h4.Allowed value notations - array notation (template enumerated in def. part)
2818 .*---------------------------------------------------------------------*
2819 :xmp tab=0.
2820 <TC - Allowed value notations - array notation (template enumerated in def. part)>
2821 <COMPILE>
2822 <VERDICT_LEAF PASS>
2823 <MODULE TTCN x x.ttcn>
2824 module x {
2825
2826 type enumerated enum { ONE(1), TWO(2), THREE(3) };
2827
2828 template enum r:= ONE;
2829
2830 template enum f:= r[0];
2831 }
2832
2833 <END_MODULE>
2834 <RESULT IF_PASS COUNT 1>
2835 (?im)Type.+?cannot.+?be.+?indexed
2836 <END_RESULT>
2837 <RESULT IF_PASS COUNT 1>
2838 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2839 <END_RESULT>
2840 <RESULT IF_PASS COUNT 1>
2841 (?is)\berror:
2842 <END_RESULT>
2843 <END_TC>
2844 :exmp.
2845
2846 .*---------------------------------------------------------------------*
2847 :h4.Value notations - value assignment notation (timer-array in function)
2848 .*---------------------------------------------------------------------*
2849 :xmp tab=0.
2850 <TC - Value notations - value assignment notation (timer-array in function)>
2851 <COMPILE>
2852 <VERDICT_LEAF FAIL>
2853 <MODULE TTCN x x.ttcn>
2854 module x{
2855
2856 function MyFunc() {
2857 timer timerarray[3] := {[0] := 1.0, [1] := 2.0, [2] := 3.0, [3] := 4.0};
2858 timer timerarray2[3] := {[0.0] := 1.0, [1] := 2.0, [2] := 3.0};
2859 timer timerarray3[3] := {[0] := 1.0, [1] := 2.0};
2860 timer timerarray4[3] := {[-1] := 1.0, [0] := 2.0, [1] := 3.0};
2861 timer timerarray5[3] := {[0] := 1.0, [0] := 2.0, [1] := 3.0};
2862 }
2863 }
2864 <END_MODULE>
2865 <RESULT IF_FAIL COUNT 1>
2866 (?im)\berror: Array index overflow: the index value must be at most `2' instead of `3'
2867 <END_RESULT>
2868 <RESULT IF_FAIL COUNT 1>
2869 (?im)\berror: A value or expression of type integer was expected
2870 <END_RESULT>
2871 <RESULT IF_FAIL COUNT 1>
2872 (?im)\berror: Array index underflow: the index value must be at least `0' instead of `-1'
2873 <END_RESULT>
2874 <RESULT IF_FAIL COUNT 1>
2875 (?im)\berror: Duplicate index value `0' for timer array elements `2' and `1'
2876 <END_RESULT>
2877 <RESULT IF_FAIL COUNT 4>
2878 (?is)\berror:
2879 <END_RESULT>
2880 <END_TC>
2881 :exmp.
2882
2883 .*---------------------------------------------------------------------*
2884 :h4.Value notations - value assignment notation (index out of bound)
2885 .*---------------------------------------------------------------------*
2886 :xmp tab=0.
2887 <TC - Value notations - value assignment notation (index out of bound)>
2888 <COMPILE>
2889 <VERDICT_LEAF PASS>
2890 <MODULE TTCN x x.ttcn>
2891 module x{
2892
2893 type integer myIntType[3];
2894
2895 function MyFunc() {
2896 var myIntType myintarray := {[0] := 0, [1] := 1, [2]:= 2};
2897 var myIntType myintarray2 := {[0] := 0, [1] := 1};
2898 var myIntType myintarray3 := {[0] := 0, [1] := 1, [2]:= 2, [2] := 3};
2899
2900 var integer i := 2;
2901 var myIntType myintarray4 := {[i] := 0, [i] := 1, [i]:= 2};
2902
2903 }
2904 }
2905 <END_MODULE>
2906 <RESULT IF_PASS COUNT 1>
2907 (?im)\berror: Duplicate index value `2' for components `4' and `3'
2908 <END_RESULT>
2909 <RESULT IF_PASS COUNT 1>
2910 (?is)\berror:
2911 <END_RESULT>
2912 <RESULT IF_PASS POSITIVE>
2913 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2914 <END_RESULT>
2915 <END_TC>
2916 :exmp.
2917
2918 .*---------------------------------------------------------------------*
2919 :h4.Value notations - value assignment notation (negative index is used)
2920 .*---------------------------------------------------------------------*
2921 :xmp tab=0.
2922 <TC - Value notations - value assignment notation (negative index is used)>
2923 <COMPILE>
2924 <VERDICT_LEAF PASS>
2925 <MODULE TTCN x x.ttcn>
2926 module x{
2927
2928 type integer myIntType[3];
2929
2930 function MyFunc() {
2931 var myIntType myintarray := {[0] := 0, [-1] := 1, [2]:= 2};
2932 var myIntType myintarray2 := {[0.0] := 0, [1.0] := 1, [2.3]:= 2};
2933
2934 var integer i := -56;
2935 var myIntType myintarray3 := {[i] := 0, [i] := 1, [i]:= 2};
2936
2937 }
2938 }
2939 <END_MODULE>
2940 <RESULT IF_PASS COUNT 1>
2941 (?im)\berror: Array index underflow: the index value must be at least `0' instead of `-1'
2942 <END_RESULT>
2943 <RESULT IF_PASS COUNT 3>
2944 (?im)\berror: A value or expression of type integer was expected
2945 <END_RESULT>
2946 <RESULT IF_PASS POSITIVE>
2947 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2948 <END_RESULT>
2949 <RESULT IF_PASS COUNT 4>
2950 (?is)\berror:
2951 <END_RESULT>
2952 <END_TC>
2953 :exmp.
2954
2955 .*---------------------------------------------------------------------*
2956 :h4.Value notations - value assignment notation (structured types)
2957 .*---------------------------------------------------------------------*
2958 :xmp tab=0.
2959 <TC - Value notations - value assignment notation (structured types)>
2960 <COMPILE>
2961 <VERDICT_LEAF PASS>
2962 <MODULE TTCN x x.ttcn>
2963 module x{
2964
2965 type integer myIntType[3];
2966 type record myTestRec
2967 {
2968 myIntType intlist,
2969 integer myint
2970 }
2971
2972 type record of myTestRec myTestRecList;
2973
2974 type record of integer myIntegerList;
2975
2976 type record myTestRec2
2977 {
2978 myIntegerList myintegerlist,
2979 integer myint
2980 }
2981
2982
2983 function MyFunc() {
2984
2985 var myTestRecList mytestreclist := {[0] := {intlist := {[0]:=0, [1]:= 1, [2]:=2}, myint:= 1}};
2986 var myTestRecList mytestreclist2 := {[0] := {intlist := {[0]:=0, [1]:= 1, [-2]:=2}, myint:= 1}};
2987 var myTestRecList mytestreclist3 := {[0] := {intlist := {[0]:=0, [1]:= 1, [2.0]:=2}, myint:= 1}};
2988 var myTestRecList mytestreclist4 := {[0] := {intlist := {[0]:=0, [1]:= 1}, myint:= 1}};
2989 var myTestRecList mytestreclist5 := {[0] := {intlist := {[0]:=0, [1]:= 1, [2]:=2, [3] := 3}, myint:= 1}};
2990 var myTestRecList mytestreclist6 := {[0] := {intlist := {[0]:=0, [1]:= 1, [1]:=2}, myint:= 1}};
2991
2992 var myTestRec2 mytestrec := {myintegerlist := {[0]:= 0, [1] := 1, [2] := 2}, myint := 1};
2993 var myTestRec2 mytestrec2 := {myintegerlist := {[0.0]:= 0, [1] := 1, [2] := 2}, myint := 1};
2994 var myTestRec2 mytestrec3 := {myintegerlist := {[0]:= 0, [-1] := 1, [2] := 2}, myint := 1};
2995 var myTestRec2 mytestrec4 := {myintegerlist := {[0]:= 0, [1] := 1, [1] := 2}, myint := 1};
2996
2997 }
2998 }
2999 <END_MODULE>
3000 <RESULT IF_PASS COUNT 1>
3001 (?im)\berror: Array index underflow: the index value must be at least `0' instead of `-2'
3002 <END_RESULT>
3003 <RESULT IF_PASS COUNT 2>
3004 (?im)\berror: A value or expression of type integer was expected
3005 <END_RESULT>
3006 <RESULT IF_PASS COUNT 1>
3007 (?im)\berror: Array index overflow: the index value must be at most `2' instead of `3'
3008 <END_RESULT>
3009 <RESULT IF_PASS COUNT 2>
3010 (?im)\berror: Duplicate index value `1' for components `3' and `2'
3011 <END_RESULT>
3012 <RESULT IF_PASS COUNT 1>
3013 (?im)\berror: A non-negative integer value was expected for indexing type `@x.myIntegerList' instead of `-1'
3014 <END_RESULT>
3015 <RESULT IF_PASS POSITIVE>
3016 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3017 <END_RESULT>
3018 <RESULT IF_PASS COUNT 7>
3019 (?is)\berror:
3020 <END_RESULT>
3021 <END_TC>
3022 :exmp.
3023
3024 .*---------------------------------------------------------------------*
3025 :h4.Value notations - value assignment notation (modify template)
3026 .*---------------------------------------------------------------------*
3027 :xmp tab=0.
3028 <TC - Value notations - value assignment notation (modify template)>
3029 <COMPILE>
3030 <VERDICT_LEAF PASS>
3031 <MODULE TTCN x x.ttcn>
3032 module x{
3033
3034 type record of integer MyIntType;
3035 template MyIntType T1 := {0, 1, 2};
3036 template MyIntType T2 modifies T1:= {[0] := 1, [0]:= 5};
3037 template MyIntType T3 modifies T1:= {[0] := 1, [-5]:= 5};
3038
3039 }
3040 <END_MODULE>
3041 <RESULT IF_PASS COUNT 1>
3042 (?im)\berror: Duplicate index value `0' for components `2' and `1'
3043 <END_RESULT>
3044 <RESULT IF_PASS COUNT 1>
3045 (?im)\berror: A non-negative integer value was expected for indexing type `@x.MyIntType' instead of `-5'
3046 <END_RESULT>
3047 <RESULT IF_PASS POSITIVE>
3048 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3049 <END_RESULT>
3050 <RESULT IF_PASS COUNT 2>
3051 (?is)\berror:
3052 <END_RESULT>
3053 <END_TC>
3054 :exmp.
3055
3056 .*---------------------------------------------------------------------*
3057 :h4.Value notations - value assignment notation (modify template2)
3058 .*---------------------------------------------------------------------*
3059 :xmp tab=0.
3060 <TC - Value notations - value assignment notation (modify template2)>
3061 <COMPILE>
3062 <VERDICT_LEAF PASS>
3063 <MODULE TTCN x x.ttcn>
3064 module x{
3065
3066 type integer IntType[3];
3067
3068 type record of integer MyIntType;
3069 template MyIntType T1 := {0, 1, 2};
3070 template MyIntType T2 modifies T1:= {[0.1] := 1, [1]:= 5};
3071 template MyIntType T3 modifies T1:= {[0] := 1, [1.0]:= 5};
3072
3073 function MyFunc() {
3074
3075 var IntType myintarray := {['00'O] := 0, [1.5] := 1, [2]:= 2};
3076 }
3077
3078
3079 }
3080 <END_MODULE>
3081 <RESULT IF_PASS COUNT 4>
3082 (?im)\bA value or expression of type integer was expected
3083 <END_RESULT>
3084 <RESULT IF_PASS POSITIVE>
3085 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3086 <END_RESULT>
3087 <RESULT IF_PASS COUNT 4>
3088 (?is)\berror:
3089 <END_RESULT>
3090 <END_TC>
3091 :exmp.
3092
3093 .*---------------------------------------------------------------------*
3094 :h3. Value notations - Value notations shall assign a value to a specific element only once
3095 .*---------------------------------------------------------------------*
3096 This test case group covers the requirement SA-6/7.
3097
3098 Startegy: In one value notation an element can get value only once.
3099 All occurances shall be tested, where such a notation can be used.
3100
3101 Tested:
3102 :list.
3103 :li D='-'.record and set constants in definition part and function
3104 :li D='-'.record modified template in definition part
3105 :li D='-'.enumerated type in definition part
3106 :elist.
3107
3108 .*---------------------------------------------------------------------*
3109 :h4.Value notations - A value notation shall assign a value to a specific element only once - duplicated element assignment in record (const in def. part)
3110 .*---------------------------------------------------------------------*
3111 :xmp tab=0.
3112 <TC - A value notation shall assign a value to a specific element only once - duplicated element assignment in record (const in def. part)>
3113 <COMPILE>
3114 <VERDICT_LEAF PASS>
3115 <MODULE TTCN x x.ttcn>
3116 module x {
3117
3118 type record Record {
3119 integer I,
3120 float F,
3121 charstring CS
3122 }
3123
3124 const Record wrongRecord := {
3125 I:= 1,
3126 F:= 0.0,
3127 CS:= "error",
3128 F:= 2.0
3129 };
3130
3131 }
3132 <END_MODULE>
3133 <RESULT IF_PASS COUNT 1>
3134 (?im)Duplicate.+?record.+?field
3135 <END_RESULT>
3136 <RESULT IF_PASS COUNT 1>
3137 (?im)Field.+?already.+?given
3138 <END_RESULT>
3139 <RESULT IF_PASS COUNT 1>
3140 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3141 <END_RESULT>
3142 <RESULT IF_PASS COUNT 1>
3143 (?is)\berror:
3144 <END_RESULT>
3145 <END_TC>
3146 :exmp.
3147
3148 .*---------------------------------------------------------------------*
3149 :h4.Value notations - A value notation shall assign a value to a specific element only once - duplicated element assignment in record (const in function)
3150 .*---------------------------------------------------------------------*
3151 :xmp tab=0.
3152 <TC - A value notation shall assign a value to a specific element only once - duplicated element assignment in record (const in function)>
3153 <COMPILE>
3154 <VERDICT_LEAF PASS>
3155 <MODULE TTCN x x.ttcn>
3156 module x {
3157
3158 type record Record {
3159 integer I,
3160 float F,
3161 charstring CS
3162 }
3163
3164 function MyFunc() {
3165
3166 const Record wrongRecord := {
3167 I:= 1,
3168 F:= 0.0,
3169 CS:= "error",
3170 F:= 2.0
3171 };
3172 }
3173 }
3174 <END_MODULE>
3175 <RESULT IF_PASS COUNT 1>
3176 (?im)Duplicate.+?record.+?field
3177 <END_RESULT>
3178 <RESULT IF_PASS COUNT 1>
3179 (?im)Field.+?already.+?given
3180 <END_RESULT>
3181 <RESULT IF_PASS COUNT 1>
3182 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3183 <END_RESULT>
3184 <RESULT IF_PASS COUNT 1>
3185 (?is)\berror:
3186 <END_RESULT>
3187 <END_TC>
3188 :exmp.
3189
3190 .*---------------------------------------------------------------------*
3191 :h4.Value notations - A value notation shall assign a value to a specific element only once - duplicated element assignment in set (const in def. part)
3192 .*---------------------------------------------------------------------*
3193 :xmp tab=0.
3194 <TC - A value notation shall assign a value to a specific element only once - duplicated element assignment in set (const in def. part)>
3195 <COMPILE>
3196 <VERDICT_LEAF PASS>
3197 <MODULE TTCN x x.ttcn>
3198 module x {
3199
3200 type set Set {
3201 integer I,
3202 float F,
3203 charstring CS
3204 }
3205
3206 const Set s := {
3207 F:= 0.0,
3208 I:= 3,
3209 CS:= "error",
3210 F:= 9.0
3211 };
3212
3213 }
3214 <END_MODULE>
3215 <RESULT IF_PASS COUNT 1>
3216 (?im)Duplicate.+?set.+?field
3217 <END_RESULT>
3218 <RESULT IF_PASS COUNT 1>
3219 (?im)Field.+?already.+?given
3220 <END_RESULT>
3221 <RESULT IF_PASS COUNT 1>
3222 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3223 <END_RESULT>
3224 <RESULT IF_PASS COUNT 1>
3225 (?is)\berror:
3226 <END_RESULT>
3227 <END_TC>
3228 :exmp.
3229
3230 .*---------------------------------------------------------------------*
3231 :h4.Value notations - A value notation shall assign a value to a specific element only once - duplicated element assignment in record of (modified template in def. part)
3232 .*---------------------------------------------------------------------*
3233 :xmp tab=0.
3234 <TC - A value notation shall assign a value to a specific element only once - duplicated element assignment in record of (modified template in def. part)>
3235 <COMPILE>
3236 <VERDICT_LEAF FAIL>
3237 <MODULE TTCN x x.ttcn>
3238 module x {
3239
3240 type record of integer rofT;
3241
3242 template rofT temp:= { 1, 2, 3, 4, 5};
3243
3244 template rofT modTemp modifies temp:= { [2]:= 7, [3]:= 10, [2]:= 14 };
3245
3246 }
3247 <END_MODULE>
3248 <RESULT IF_FAIL COUNT 1>
3249 (?im)\berror\b.+?Duplicate.+?index.+?value
3250 <END_RESULT>
3251 <RESULT IF_FAIL COUNT 1>
3252 (?is)\berror:
3253 <END_RESULT>
3254 <END_TC>
3255 :exmp.
3256
3257 .*---------------------------------------------------------------------*
3258 :h4.Value notations - A value notation shall assign a value to a specific element only once - duplicated element assignment in set (const in function)
3259 .*---------------------------------------------------------------------*
3260 :xmp tab=0.
3261 <TC - A value notation shall assign a value to a specific element only once - duplicated element assignment in set (const in function)>
3262 <COMPILE>
3263 <VERDICT_LEAF PASS>
3264 <MODULE TTCN x x.ttcn>
3265 module x {
3266
3267 type set Set {
3268 integer I,
3269 float F,
3270 charstring CS
3271 }
3272
3273 function MyFunc() {
3274
3275 const Set s := {
3276 F:= 0.0,
3277 I:= 3,
3278 CS:= "error",
3279 F:= 9.0
3280 };
3281 }
3282 }
3283 <END_MODULE>
3284 <RESULT IF_PASS COUNT 1>
3285 (?im)Duplicate.+?set.+?field
3286 <END_RESULT>
3287 <RESULT IF_PASS COUNT 1>
3288 (?im)Field.+?already.+?given
3289 <END_RESULT>
3290 <RESULT IF_PASS COUNT 1>
3291 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3292 <END_RESULT>
3293 <RESULT IF_PASS COUNT 1>
3294 (?is)\berror:
3295 <END_RESULT>
3296 <END_TC>
3297 :exmp.
3298
3299 .*---------------------------------------------------------------------*
3300 :h4.Value notations - A value notation shall assign a value to a specific element only once - duplicated element assignment in enumerated type (in def. part)
3301 .*---------------------------------------------------------------------*
3302 :xmp tab=0.
3303 <TC - A value notation shall assign a value to a specific element only once - duplicated element assignment in enumerated type (in def. part)>
3304 <COMPILE>
3305 <VERDICT_LEAF PASS>
3306 <MODULE TTCN x x.ttcn>
3307 module x {
3308
3309 type enumerated Enum { ONE(1), TWO(2), THREE(1) };
3310
3311 }
3312 <END_MODULE>
3313 <RESULT IF_PASS COUNT 1>
3314 (?im)Duplicate.+?value.+?enumeration
3315 <END_RESULT>
3316 <RESULT IF_PASS COUNT 1>
3317 (?im)already.+?assigned
3318 <END_RESULT>
3319 <RESULT IF_PASS COUNT 1>
3320 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3321 <END_RESULT>
3322 <RESULT IF_PASS COUNT 1>
3323 (?is)\berror:
3324 <END_RESULT>
3325 <END_TC>
3326 :exmp.
3327
3328 .*---------------------------------------------------------------------*
3329 :h2.Allowed values (each evaluated expression shall conform to the context-specific rules)
3330 .*---------------------------------------------------------------------*
3331 .*---------------------------------------------------------------------*
3332 :h3.Allowed values of an object identifier
3333 .*---------------------------------------------------------------------*
3334
3335 This test case group covers the requirement SA-6/8.
3336
3337 Startegy: in assignment of an object identifier the first two elements have to be defined.
3338 We can define these elements in three ways:
3339 :list.
3340 :li D='-'.with numbers : { 0 4 ...}
3341 :li D='-'.with identifiers : { itu_t identified_organization ...}
3342 :li D='-'.with both of them : { itu_t(0) identified_organization(4) ...}
3343 :elist.
3344 For more information see the ITU-T X.660.
3345 All occurances shall be tested, where such a notation can be used.
3346
3347 Tested:
3348 :list.
3349 :li D='-'.wrong first number in definition part and function
3350 :li D='-'.wrong identifier in definition part and function
3351 :elist.
3352 .*---------------------------------------------------------------------*
3353 :h4.Allowed values of an object identifier - wrong first number (const in def. part)
3354 .*---------------------------------------------------------------------*
3355 :xmp tab=0.
3356 <TC - Allowed values of an object identifier - wrong first number (const in def. part)>
3357 <COMPILE>
3358 <VERDICT_LEAF PASS>
3359 <MODULE TTCN x x.ttcn>
3360 module x {
3361
3362 const objid o:= objid{ 6 1 0 0 };
3363 }
3364 <END_MODULE>
3365 <RESULT IF_PASS COUNT 1>
3366 (?im)value.+?first.+?OBJECT.+?IDENTIFIER.+?must.+?between.+?instead
3367 <END_RESULT>
3368 <RESULT IF_PASS COUNT 1>
3369 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3370 <END_RESULT>
3371 <RESULT IF_PASS COUNT 1>
3372 (?is)\berror:
3373 <END_RESULT>
3374 <END_TC>
3375 :exmp.
3376
3377 .*---------------------------------------------------------------------*
3378 :h4.Allowed values of an object identifier - wrong first number (const in function)
3379 .*---------------------------------------------------------------------*
3380 :xmp tab=0.
3381 <TC - Allowed values of an object identifier - wrong first number (const in function)>
3382 <COMPILE>
3383 <VERDICT_LEAF PASS>
3384 <MODULE TTCN x x.ttcn>
3385 module x {
3386
3387 function MyFunc() {
3388
3389 const objid o:= objid{ 6 1 0 0 };
3390 }
3391 }
3392 <END_MODULE>
3393 <RESULT IF_PASS COUNT 1>
3394 (?im)value.+?first.+?OBJECT.+?IDENTIFIER.+?must.+?between.+?instead
3395 <END_RESULT>
3396 <RESULT IF_PASS COUNT 1>
3397 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3398 <END_RESULT>
3399 <RESULT IF_PASS COUNT 1>
3400 (?is)\berror:
3401 <END_RESULT>
3402 <END_TC>
3403 :exmp.
3404
3405 .*---------------------------------------------------------------------*
3406 :h4.Allowed values of an object identifier - wrong identifier (const in def. part)
3407 .*---------------------------------------------------------------------*
3408 :xmp tab=0.
3409 <TC - Allowed values of an object identifier - wrong identifier (const in def. part)>
3410 <COMPILE>
3411 <VERDICT_LEAF PASS>
3412 <MODULE TTCN x x.ttcn>
3413 module x {
3414
3415 const objid o:= objid{ ecci identified_organization ehh(0) behh(0) };
3416 }
3417 <END_MODULE>
3418 <RESULT IF_PASS COUNT 2>
3419 (?im)error.+?no.+?local.+?imported.+?definition
3420 <END_RESULT>
3421 <RESULT IF_PASS COUNT 1>
3422 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3423 <END_RESULT>
3424 <RESULT IF_PASS COUNT 2>
3425 (?is)\berror:
3426 <END_RESULT>
3427 <END_TC>
3428 :exmp.
3429
3430 .*---------------------------------------------------------------------*
3431 :h4.Allowed values of an object identifier - wrong identifier (const in function)
3432 .*---------------------------------------------------------------------*
3433 :xmp tab=0.
3434 <TC - Allowed values of an object identifier - wrong identifier (const in function)>
3435 <COMPILE>
3436 <VERDICT_LEAF PASS>
3437 <MODULE TTCN x x.ttcn>
3438 module x {
3439
3440 function MyFunc() {
3441
3442 const objid o:= objid{ ecci identified_organization ehh(0) behh(0) };
3443 }
3444 }
3445 <END_MODULE>
3446 <RESULT IF_PASS COUNT 2>
3447 (?im)error.+?no.+?local.+?imported.+?definition
3448 <END_RESULT>
3449 <RESULT IF_PASS COUNT 1>
3450 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3451 <END_RESULT>
3452 <RESULT IF_PASS COUNT 2>
3453 (?is)\berror:
3454 <END_RESULT>
3455 <END_TC>
3456 :exmp.
3457
3458 .*---------------------------------------------------------------------*
3459 :h3.Allowed values of an universal charstring
3460 .*---------------------------------------------------------------------*
3461 This test case group covers the requirement SA-6/9.
3462
3463 Strategy: for information see the ISO/IEC 10646.
3464 :nl. First number: 0-128
3465 :nl. Second number: 0-255
3466 :nl. Third number: 0-255
3467 :nl. Fourth number: 0-255
3468 :nl. Only numbers are allowed.
3469 All occurances shall be tested, where such a notation can be used.
3470
3471 Tested:
3472 :list.
3473 :li D='-'.wrong first number in definition part and function
3474 :li D='-'.operator in definition part
3475 :li D='-'.constant in function
3476 :elist.
3477
3478 .*---------------------------------------------------------------------*
3479 :h4.Allowed values of an universal charstring - wrong first number (const in def. part)
3480 .*---------------------------------------------------------------------*
3481 :xmp tab=0.
3482 <TC - Allowed values of an universal charstring - wrong first number (const in def. part)>
3483 <COMPILE>
3484 <VERDICT_LEAF FAIL>
3485 <MODULE TTCN x x.ttcn>
3486 module x {
3487
3488 const universal charstring f:= "aiyyo" & char( 130, 25, 10, 25) & "gerappa";
3489 }
3490 <END_MODULE>
3491 <RESULT IF_FAIL COUNT 1>
3492 (?im)\berror\b.+?first.+?number.+?must.+?within.+?range
3493 <END_RESULT>
3494 <RESULT IF_FAIL COUNT 1>
3495 (?is)\berror:
3496 <END_RESULT>
3497 <END_TC>
3498 :exmp.
3499
3500 .*---------------------------------------------------------------------*
3501 :h4.Allowed values of an universal charstring - wrong first number (const in function)
3502 .*---------------------------------------------------------------------*
3503 :xmp tab=0.
3504 <TC - Allowed values of an universal charstring - wrong first number (const in function)>
3505 <COMPILE>
3506 <VERDICT_LEAF FAIL>
3507 <MODULE TTCN x x.ttcn>
3508 module x {
3509
3510 function MyFunc() {
3511
3512 const universal charstring f:= "aiyyo" & char( 130, 25, 10, 25) & "gerappa";
3513
3514 }
3515 }
3516 <END_MODULE>
3517 <RESULT IF_FAIL COUNT 1>
3518 (?im)\berror\b.+?first.+?number.+?must.+?within.+?range
3519 <END_RESULT>
3520 <RESULT IF_FAIL COUNT 1>
3521 (?is)\berror:
3522 <END_RESULT>
3523 <END_TC>
3524 :exmp.
3525
3526 .*---------------------------------------------------------------------*
3527 :h4.Allowed values of an universal charstring - operator (const in def. part)
3528 .*---------------------------------------------------------------------*
3529 :xmp tab=0.
3530 <TC - Allowed values of an universal charstring - operator (const in def. part)>
3531 <COMPILE>
3532 <VERDICT_LEAF FAIL>
3533 <MODULE TTCN x x.ttcn>
3534 module x {
3535
3536 const universal charstring f:= "aiyyo" & char( 13, 25+32, 10, 25) & "gerappa";
3537 }
3538 <END_MODULE>
3539 <RESULT IF_FAIL COUNT 1>
3540 (?im)\berror\b.+?syntax.+?error.+?unexpected.+?\+
3541 <END_RESULT>
3542 <RESULT IF_FAIL COUNT 1>
3543 (?is)\berror:
3544 <END_RESULT>
3545 <END_TC>
3546 :exmp.
3547
3548 .*---------------------------------------------------------------------*
3549 :h4.Allowed values of an universal charstring - constant (const in function)
3550 .*---------------------------------------------------------------------*
3551 :xmp tab=0.
3552 <TC - Allowed values of an universal charstring - constant (const in function)>
3553 <COMPILE>
3554 <VERDICT_LEAF FAIL>
3555 <MODULE TTCN x x.ttcn>
3556 module x {
3557
3558 const integer i:= 12;
3559
3560 function MyFunc() {
3561
3562 const universal charstring f:= "aiyyo" & char( i, 25, 10, 25) & "gerappa";
3563
3564 }
3565 }
3566 <END_MODULE>
3567 <RESULT IF_FAIL COUNT 1>
3568 (?im)\berror\b.+?syntax.+?error.+?unexpected.+?identifier
3569 <END_RESULT>
3570 <RESULT IF_FAIL COUNT 2>
3571 (?is)\berror:
3572 <END_RESULT>
3573 <END_TC>
3574 :exmp.
3575
3576 .*---------------------------------------------------------------------*
3577 :h4.Function reference - incompatible types
3578 .*---------------------------------------------------------------------*
3579 :xmp tab=0.
3580 <TC - Function reference - incompatible types>
3581 <COMPILE>
3582 <VERDICT_LEAF FAIL>
3583 <MODULE TTCN x x.ttcn>
3584 module x {
3585 type function fntype1();
3586 type function fntype2();
3587 function MyFunc() {
3588 var fntype1 f1;
3589 var fntype2 f2;
3590 if (f1==f2) { }
3591 }
3592 }
3593 <END_MODULE>
3594 <RESULT IF_FAIL COUNT 1>
3595 (?is)\berror:
3596 <END_RESULT>
3597 <RESULT IF_FAIL POSITIVE>
3598 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3599 <END_RESULT>
3600 <END_TC>
3601 :exmp.
3602
3603 .*---------------------------------------------------------------------*
3604 :h4.Allowed values of an function reference - 1
3605 .*---------------------------------------------------------------------*
3606 :xmp tab=0.
3607 <TC - Allowed values of an function reference - 1 >
3608 <COMPILE>
3609 <VERDICT_LEAF FAIL>
3610 <MODULE TTCN x x.ttcn>
3611 module x {
3612 type function fntype();
3613 function fn1(integer i) { }
3614 function fn2() { }
3615 function MyFunc() {
3616 var fntype f1 := refers(fn1);
3617 var fntype f2 := refers(fn2);
3618 }
3619 }
3620 <END_MODULE>
3621 <RESULT IF_FAIL COUNT 1>
3622 (?is)\berror:
3623 <END_RESULT>
3624 <RESULT IF_FAIL POSITIVE>
3625 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3626 <END_RESULT>
3627 <END_TC>
3628 :exmp.
3629
3630 .*---------------------------------------------------------------------*
3631 :h4.Allowed values of an function reference - 2
3632 .*---------------------------------------------------------------------*
3633 :xmp tab=0.
3634 <TC - Allowed values of an function reference - 2>
3635 <COMPILE>
3636 <VERDICT_LEAF FAIL>
3637 <MODULE TTCN x x.ttcn>
3638 module x {
3639 type function fntype();
3640 function fn1() { }
3641 function fn2() return charstring { return ""; }
3642 function MyFunc() {
3643 var fntype f1:= refers(fn1);
3644 var fntype f2:= refers(fn2);
3645 }
3646 }
3647 <END_MODULE>
3648 <RESULT IF_FAIL COUNT 1>
3649 (?is)\berror:
3650 <END_RESULT>
3651 <RESULT IF_FAIL POSITIVE>
3652 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3653 <END_RESULT>
3654 <END_TC>
3655 :exmp.
3656
3657 .*---------------------------------------------------------------------*
3658 :h4.Allowed values of an function reference - 3
3659 .*---------------------------------------------------------------------*
3660 :xmp tab=0.
3661 <TC - Allowed values of an function reference - 3>
3662 <COMPILE>
3663 <VERDICT_LEAF PASS>
3664 <MODULE TTCN x x.ttcn>
3665 module x {
3666 type function fntype(integer a);
3667 function fn1(integer b) { }
3668 function fn2(integer a) { }
3669 function MyFunc() {
3670 var fntype f1:= refers(fn1);
3671 var fntype f2:= refers(fn2);
3672 }
3673 }
3674 <END_MODULE>
3675 <RESULT IF_PASS COUNT 1>
3676 (?im)\bwarning\b.+?name.+?of.+?parameter.+?not.+?the.+?same
3677 <END_RESULT>
3678 <RESULT IF_FAIL POSITIVE>
3679 (?is)\berror:
3680 <END_RESULT>
3681 <RESULT IF_FAIL POSITIVE>
3682 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3683 <END_RESULT>
3684 <END_TC>
3685 :exmp.
3686
3687 .*---------------------------------------------------------------------*
3688 :h3.Allowed values of an index when accessing a single element of a string value
3689 .*---------------------------------------------------------------------*
3690
3691 This test case group covers the requirement SA-6/10.
3692
3693 Strategy: indexing of string values has to beginning with 0. So shall not
3694 use negative numbers or higher numbers than size(string)-1.
3695 All occurances shall be tested, where such a notation can be used.
3696
3697 Tested:
3698 :list.
3699 :li D='-'.higher number in index than the size in definition part and function
3700 :li D='-'.negative index in definition part and function
3701 :elist.
3702
3703 .*---------------------------------------------------------------------*
3704 :h4.String indexing - indexing begin with zero (const in def. part)
3705 .*---------------------------------------------------------------------*
3706 :xmp tab=0.
3707 <TC - String indexing - indexing begin with zero (const in def. part)>
3708 <COMPILE>
3709 <VERDICT_LEAF PASS>
3710 <MODULE TTCN x x.ttcn>
3711 module x {
3712
3713 const charstring CS:="WRONG";
3714 const charstring wrongCS := CS[5];
3715
3716 }
3717 <END_MODULE>
3718 <RESULT IF_PASS COUNT 1>
3719 (?im)Index.+?overflow.+?string.+?element
3720 <END_RESULT>
3721 <RESULT IF_PASS COUNT 1>
3722 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3723 <END_RESULT>
3724 <RESULT IF_PASS COUNT 1>
3725 (?is)\berror:
3726 <END_RESULT>
3727 <END_TC>
3728 :exmp.
3729
3730 .*---------------------------------------------------------------------*
3731 :h4.String indexing - indexing begin with zero (const in function)
3732 .*---------------------------------------------------------------------*
3733 :xmp tab=0.
3734 <TC - String indexing - indexing begin with zero (const in function)>
3735 <COMPILE>
3736 <VERDICT_LEAF PASS>
3737 <MODULE TTCN x x.ttcn>
3738 module x {
3739
3740 function MyFunc() {
3741
3742 const charstring CS:="WRONG";
3743 const charstring wrongCS := CS[5];
3744 }
3745 }
3746 <END_MODULE>
3747 <RESULT IF_PASS COUNT 1>
3748 (?im)Index.+?overflow.+?string.+?element
3749 <END_RESULT>
3750 <RESULT IF_PASS COUNT 1>
3751 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3752 <END_RESULT>
3753 <RESULT IF_PASS COUNT 1>
3754 (?is)\berror:
3755 <END_RESULT>
3756 <END_TC>
3757 :exmp.
3758
3759 .*---------------------------------------------------------------------*
3760 :h4.String indexing - indexing must be non-negative (const in def. part)
3761 .*---------------------------------------------------------------------*
3762 :xmp tab=0.
3763 <TC - String indexing - indexing must be non-negative (const in def. part)>
3764 <COMPILE>
3765 <VERDICT_LEAF PASS>
3766 <MODULE TTCN x x.ttcn>
3767 module x {
3768
3769 const charstring CS:="WRONG";
3770 const charstring wrongCS := CS[-1];
3771
3772 }
3773 <END_MODULE>
3774 <RESULT IF_PASS COUNT 1>
3775 (?im)non-negative.+?value.+?expected.+?instead of.+?indexing.+?string.+?element
3776 <END_RESULT>
3777 <RESULT IF_PASS COUNT 1>
3778 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3779 <END_RESULT>
3780 <RESULT IF_PASS COUNT 1>
3781 (?is)\berror:
3782 <END_RESULT>
3783 <END_TC>
3784 :exmp.
3785
3786 .*---------------------------------------------------------------------*
3787 :h4.String indexing - indexing must be non-negative (const in function)
3788 .*---------------------------------------------------------------------*
3789 :xmp tab=0.
3790 <TC - String indexing - indexing must be non-negative (const in function)>
3791 <COMPILE>
3792 <VERDICT_LEAF PASS>
3793 <MODULE TTCN x x.ttcn>
3794 module x {
3795
3796 function MyFunc() {
3797
3798 const charstring CS:="WRONG";
3799 const charstring wrongCS := CS[-1];
3800 }
3801 }
3802 <END_MODULE>
3803 <RESULT IF_PASS COUNT 1>
3804 (?im)non-negative.+?value.+?expected.+?instead of.+?indexing.+?string.+?element
3805 <END_RESULT>
3806 <RESULT IF_PASS COUNT 1>
3807 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3808 <END_RESULT>
3809 <RESULT IF_PASS COUNT 1>
3810 (?is)\berror:
3811 <END_RESULT>
3812 <END_TC>
3813 :exmp.
3814
3815 .*---------------------------------------------------------------------*
3816 :h3.Omitting mandatory fields
3817 .*---------------------------------------------------------------------*
3818
3819 This test case group covers the requirement SA-6/11.
3820
3821 Strategy: shall not omitting mandatory fields
3822 All occurances shall be tested, where such a notation can be used.
3823
3824 Tested: - record and set fields in definition part and function
3825
3826 .*---------------------------------------------------------------------*
3827 :h4.Omitting mandatory fields - wrong optional record field (const in def. part)
3828 .*---------------------------------------------------------------------*
3829 :xmp tab=0.
3830 <TC - Omitting mandatory fields - wrong optional record field (const in def. part)>
3831 <COMPILE>
3832 <VERDICT_LEAF PASS>
3833 <MODULE TTCN x x.ttcn>
3834 module x {
3835
3836 type record Record {
3837 integer I,
3838 float F optional,
3839 charstring CS
3840 }
3841
3842 const Record r := { omit, 0.0, "error" };
3843
3844 }
3845 <END_MODULE>
3846 <RESULT IF_PASS COUNT 1>
3847 (?im)omit.+?not.+?allowed
3848 <END_RESULT>
3849 <RESULT IF_PASS COUNT 1>
3850 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3851 <END_RESULT>
3852 <RESULT IF_PASS COUNT 1>
3853 (?is)\berror:
3854 <END_RESULT>
3855 <END_TC>
3856 :exmp.
3857
3858 .*---------------------------------------------------------------------*
3859 :h4.Omitting mandatory fields - referencing unbound (const in def. part)
3860 .*---------------------------------------------------------------------*
3861 :xmp tab=0.
3862 <TC - Omitting mandatory fields - referencing unbound (const in def. part)>
3863 <COMPILE>
3864 <VERDICT_LEAF PASS>
3865 <MODULE TTCN x x.ttcn>
3866 module x {
3867
3868 type record Record {
3869 integer a,
3870 integer b
3871 }
3872
3873 const Record c_R := { b := 1 };
3874 const integer c_i := c_R.a
3875
3876 }
3877 <END_MODULE>
3878 <RESULT IF_PASS COUNT 1>
3879 (?im)Reference.+?unbound.+?field
3880 <END_RESULT>
3881 <RESULT IF_PASS COUNT 1>
3882 (?is)\berror:
3883 <END_RESULT>
3884 <END_TC>
3885 :exmp.
3886
3887 .*---------------------------------------------------------------------*
3888 :h4.Omitting mandatory fields - wrong optional record field (const in function)
3889 .*---------------------------------------------------------------------*
3890 :xmp tab=0.
3891 <TC - Omitting mandatory fields - wrong optional record field (const in function)>
3892 <COMPILE>
3893 <VERDICT_LEAF PASS>
3894 <MODULE TTCN x x.ttcn>
3895 module x {
3896
3897 type record Record {
3898 integer I,
3899 float F optional,
3900 charstring CS
3901 }
3902
3903 function MyFunc() {
3904
3905 const Record r := { omit, 0.0, "error" };
3906 }
3907
3908 }
3909 <END_MODULE>
3910 <RESULT IF_PASS COUNT 1>
3911 (?im)omit.+?not.+?allowed
3912 <END_RESULT>
3913 <RESULT IF_PASS COUNT 1>
3914 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3915 <END_RESULT>
3916 <RESULT IF_PASS COUNT 1>
3917 (?is)\berror:
3918 <END_RESULT>
3919 <END_TC>
3920 :exmp.
3921
3922 .*---------------------------------------------------------------------*
3923 :h4.Omitting mandatory fields - wrong optional set field (const in def. part)
3924 .*---------------------------------------------------------------------*
3925 :xmp tab=0.
3926 <TC - Omitting mandatory fields - wrong optional set field> (const in def. part)
3927 <COMPILE>
3928 <VERDICT_LEAF PASS>
3929 <MODULE TTCN x x.ttcn>
3930 module x {
3931
3932 type set Set {
3933 integer I,
3934 float F optional,
3935 charstring CS
3936 }
3937
3938 const Set s := {
3939 F:= 0.0,
3940 I:= omit,
3941 CS:= "error"
3942 };
3943
3944 }
3945 <END_MODULE>
3946 <RESULT IF_PASS COUNT 1>
3947 (?im)omit.+?not.+?allowed
3948 <END_RESULT>
3949 <RESULT IF_PASS COUNT 1>
3950 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3951 <END_RESULT>
3952 <RESULT IF_PASS COUNT 1>
3953 (?is)\berror:
3954 <END_RESULT>
3955 <END_TC>
3956 :exmp.
3957
3958 .*---------------------------------------------------------------------*
3959 :h4.Omitting mandatory fields - wrong optional set field (const in function)
3960 .*---------------------------------------------------------------------*
3961 :xmp tab=0.
3962 <TC - Omitting mandatory fields - wrong optional set field> (const in function)
3963 <COMPILE>
3964 <VERDICT_LEAF PASS>
3965 <MODULE TTCN x x.ttcn>
3966 module x {
3967
3968 type set Set {
3969 integer I,
3970 float F optional,
3971 charstring CS
3972 }
3973
3974 function MyFunc() {
3975
3976 const Set s := {
3977 F:= 0.0,
3978 I:= omit,
3979 CS:= "error"
3980 };
3981 }
3982 }
3983 <END_MODULE>
3984 <RESULT IF_PASS COUNT 1>
3985 (?im)omit.+?not.+?allowed
3986 <END_RESULT>
3987 <RESULT IF_PASS COUNT 1>
3988 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3989 <END_RESULT>
3990 <RESULT IF_PASS COUNT 1>
3991 (?is)\berror:
3992 <END_RESULT>
3993 <END_TC>
3994 :exmp.
3995
3996 .*---------------------------------------------------------------------*
3997 :h3.Values are not constants or literals in subtype-specifications
3998 .*---------------------------------------------------------------------*
3999
4000 This test case group covers the requirement SA-6/12.
4001
4002 Strategy: values in list, range and string length shall be initialized with constants or literal values.
4003 So it shall not contains functions returned with random values, and hand-made functions neither.
4004 See the table 3, side 26.
4005 All occurances shall be tested, where such a notation can be used.
4006
4007 Tested:
4008 :list.
4009 :li D='-'.inner random and hand-made functions in charstring length
4010 :li D='-'.inner random and hand-made functions in bitstring length-range
4011 :li D='-'.both type of functions in bitstring length-range
4012 :li D='-'.inner random and hand-made functions in integer-range
4013 :li D='-'.both type of functions in float-range
4014 :li D='-'.inner random and hand-made functions in integer-list
4015 :li D='-'.both type of functions in float-list
4016 :elist.
4017
4018 .*---------------------------------------------------------------------*
4019 :h4.Values are not constants or literals in subtype-specifications - rnd() in length (charstring )
4020 .*---------------------------------------------------------------------*
4021 :xmp tab=0.
4022
4023 <TC - Values are not constants or literals in subtype-specifications - rnd() in length (charstring )>
4024
4025 <COMPILE>
4026 <VERDICT_LEAF PASS>
4027 <MODULE TTCN x x.ttcn>
4028 module x {
4029
4030 type charstring myCharType length( float2int(rnd()) );
4031
4032 }
4033 <END_MODULE>
4034 <RESULT IF_PASS COUNT 1>
4035 (?im)error.+?evaluatable.+?constant.+?value.+?expected.+?instead.+?of.+?operation
4036 <END_RESULT>
4037 <RESULT IF_PASS COUNT 1>
4038 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4039 <END_RESULT>
4040 <RESULT IF_PASS COUNT 1>
4041 (?is)\berror:
4042 <END_RESULT>
4043 <END_TC>
4044
4045 :exmp.
4046
4047 .*---------------------------------------------------------------------*
4048 :h4.Values are not constants or literals in subtype-specifications - hand-made function in length (charstring )
4049 .*---------------------------------------------------------------------*
4050 :xmp tab=0.
4051
4052 <TC - Values are not constants or literals in subtype-specifications - hand-made function in length (charstring )>
4053
4054 <COMPILE>
4055 <VERDICT_LEAF PASS>
4056 <MODULE TTCN x x.ttcn>
4057 module x {
4058
4059 function myFunct() return integer{
4060 return 5;
4061 }
4062
4063 type charstring myCharType length( myFunct() );
4064
4065 }
4066 <END_MODULE>
4067 <RESULT IF_PASS COUNT 1>
4068 (?im)error.+?Reference.+?constant.+?expected.+?instead
4069 <END_RESULT>
4070 <RESULT IF_PASS COUNT 1>
4071 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4072 <END_RESULT>
4073 <RESULT IF_PASS COUNT 1>
4074 (?is)\berror:
4075 <END_RESULT>
4076 <END_TC>
4077
4078 :exmp.
4079
4080 .*---------------------------------------------------------------------*
4081 :h4.Values are not constants or literals in subtype-specifications - rnd() in length range (bitstring )
4082 .*---------------------------------------------------------------------*
4083 :xmp tab=0.
4084
4085 <TC - Values are not constants or literals in subtype-specifications - rnd() in length range (bitstring )>
4086
4087 <COMPILE>
4088 <VERDICT_LEAF PASS>
4089 <MODULE TTCN x x.ttcn>
4090 module x {
4091
4092 type charstring myCharType length( float2int(rnd()) .. 5 );
4093
4094 }
4095 <END_MODULE>
4096 <RESULT IF_PASS COUNT 1>
4097 (?im)error.+?evaluatable.+?constant.+?value.+?expected.+?instead.+?of.+?operation
4098 <END_RESULT>
4099 <RESULT IF_PASS COUNT 1>
4100 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4101 <END_RESULT>
4102 <RESULT IF_PASS COUNT 1>
4103 (?is)\berror:
4104 <END_RESULT>
4105 <END_TC>
4106
4107 :exmp.
4108
4109 .*---------------------------------------------------------------------*
4110 :h4.Values are not constants or literals in subtype-specifications - hand-made function in length range (bitstring )
4111 .*---------------------------------------------------------------------*
4112 :xmp tab=0.
4113
4114 <TC - Values are not constants or literals in subtype-specifications - hand-made function in length range (bitstring )>
4115
4116 <COMPILE>
4117 <VERDICT_LEAF PASS>
4118 <MODULE TTCN x x.ttcn>
4119 module x {
4120
4121 function myFunct() return integer{
4122 return 5;
4123 }
4124
4125 type charstring myCharType length( 2 .. myFunct());
4126
4127 }
4128 <END_MODULE>
4129 <RESULT IF_PASS COUNT 1>
4130 (?im)error.+?Reference.+?constant.+?expected.+?instead
4131 <END_RESULT>
4132 <RESULT IF_PASS COUNT 1>
4133 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4134 <END_RESULT>
4135 <RESULT IF_PASS COUNT 1>
4136 (?is)\berror:
4137 <END_RESULT>
4138 <END_TC>
4139
4140 :exmp.
4141
4142 .*---------------------------------------------------------------------*
4143 :h4.Values are not constants or literals in subtype-specifications - both types of functions in length range (bitstring )
4144 .*---------------------------------------------------------------------*
4145 :xmp tab=0.
4146
4147 <TC - Values are not constants or literals in subtype-specifications - both types of functions in length range (bitstring )>
4148
4149 <COMPILE>
4150 <VERDICT_LEAF PASS>
4151 <MODULE TTCN x x.ttcn>
4152 module x {
4153
4154 function myFunct() return integer{
4155 return 5;
4156 }
4157
4158 type charstring myCharType length( float2int(rnd()) .. myFunct());
4159
4160 }
4161 <END_MODULE>
4162 <RESULT IF_PASS COUNT 1>
4163 (?im)error.+?evaluatable.+?constant.+?value.+?expected.+?instead.+?of.+?operation
4164 <END_RESULT>
4165 <RESULT IF_PASS COUNT 1>
4166 (?im)error.+?Reference.+?constant.+?expected.+?instead
4167 <END_RESULT>
4168 <RESULT IF_PASS COUNT 1>
4169 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4170 <END_RESULT>
4171 <RESULT IF_PASS COUNT 2>
4172 (?is)\berror:
4173 <END_RESULT>
4174 <END_TC>
4175
4176 :exmp.
4177
4178 .*---------------------------------------------------------------------*
4179 :h4.Values are not constants or literals in subtype-specifications - rnd() in range (integer )
4180 .*---------------------------------------------------------------------*
4181 :xmp tab=0.
4182
4183 <TC - Values are not constants or literals in subtype-specifications - rnd() in range (integer )>
4184
4185 <COMPILE>
4186 <VERDICT_LEAF PASS>
4187 <MODULE TTCN x x.ttcn>
4188 module x {
4189
4190 type integer myIntType ( float2int(rnd()) .. 255 );
4191
4192 }
4193 <END_MODULE>
4194 <RESULT IF_PASS COUNT 1>
4195 (?im)error.+?evaluatable.+?constant.+?value.+?expected.+?instead.+?of.+?operation
4196 <END_RESULT>
4197 <RESULT IF_PASS COUNT 1>
4198 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4199 <END_RESULT>
4200 <RESULT IF_PASS COUNT 1>
4201 (?is)\berror:
4202 <END_RESULT>
4203 <END_TC>
4204
4205 :exmp.
4206
4207 .*---------------------------------------------------------------------*
4208 :h4.Values are not constants or literals in subtype-specifications - hand-made function in range (integer )
4209 .*---------------------------------------------------------------------*
4210 :xmp tab=0.
4211
4212 <TC - Values are not constants or literals in subtype-specifications - hand-made function in range (integer )>
4213
4214 <COMPILE>
4215 <VERDICT_LEAF PASS>
4216 <MODULE TTCN x x.ttcn>
4217 module x {
4218
4219 function myFunct() return integer{
4220 return 5;
4221 }
4222
4223 type integer myIntType ( 255 .. myFunct() );
4224
4225 }
4226 <END_MODULE>
4227 <RESULT IF_PASS COUNT 1>
4228 (?im)error.+?Reference.+?constant.+?expected.+?instead
4229 <END_RESULT>
4230 <RESULT IF_PASS COUNT 1>
4231 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4232 <END_RESULT>
4233 <RESULT IF_PASS COUNT 1>
4234 (?is)\berror:
4235 <END_RESULT>
4236 <END_TC>
4237
4238 :exmp.
4239
4240 .*---------------------------------------------------------------------*
4241 :h4.Values are not constants or literals in subtype-specifications - both types of functions in range (float )
4242 .*---------------------------------------------------------------------*
4243 :xmp tab=0.
4244
4245 <TC - Values are not constants or literals in subtype-specifications - both types of functions in range (float )>
4246
4247 <COMPILE>
4248 <VERDICT_LEAF PASS>
4249 <MODULE TTCN x x.ttcn>
4250 module x {
4251
4252 function myFunct() return float{
4253 return 5.0;
4254 }
4255
4256 type float myIntType ( rnd() .. myFunct() );
4257
4258 }
4259 <END_MODULE>
4260 <RESULT IF_PASS COUNT 1>
4261 (?im)error.+?evaluatable.+?constant.+?value.+?expected.+?instead.+?of.+?operation
4262 <END_RESULT>
4263 <RESULT IF_PASS COUNT 1>
4264 (?im)error.+?Reference.+?constant.+?expected.+?instead
4265 <END_RESULT>
4266 <RESULT IF_PASS COUNT 1>
4267 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4268 <END_RESULT>
4269 <RESULT IF_PASS COUNT 2>
4270 (?is)\berror:
4271 <END_RESULT>
4272 <END_TC>
4273
4274 :exmp.
4275
4276 .*---------------------------------------------------------------------*
4277 :h4.Values are not constants or literals in subtype-specifications - rnd() in list (integer )
4278 .*---------------------------------------------------------------------*
4279 :xmp tab=0.
4280
4281 <TC - Values are not constants or literals in subtype-specifications - rnd() in list (integer )>
4282
4283 <COMPILE>
4284 <VERDICT_LEAF PASS>
4285 <MODULE TTCN x x.ttcn>
4286 module x {
4287
4288 type integer myIntType ( float2int(rnd()), 255 );
4289
4290 }
4291 <END_MODULE>
4292 <RESULT IF_PASS COUNT 1>
4293 (?im)error.+?evaluatable.+?constant.+?value.+?expected.+?instead.+?of.+?operation
4294 <END_RESULT>
4295 <RESULT IF_PASS COUNT 1>
4296 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4297 <END_RESULT>
4298 <RESULT IF_PASS COUNT 1>
4299 (?is)\berror:
4300 <END_RESULT>
4301 <END_TC>
4302
4303 :exmp.
4304
4305 .*---------------------------------------------------------------------*
4306 :h4.Values are not constants or literals in subtype-specifications - hand-made function in list (integer )
4307 .*---------------------------------------------------------------------*
4308 :xmp tab=0.
4309
4310 <TC - Values are not constants or literals in subtype-specifications - hand-made function in list (integer )>
4311
4312 <COMPILE>
4313 <VERDICT_LEAF PASS>
4314 <MODULE TTCN x x.ttcn>
4315 module x {
4316
4317 function myFunct() return integer{
4318 return 5;
4319 }
4320
4321 type integer myIntType ( 255, myFunct() );
4322
4323 }
4324 <END_MODULE>
4325 <RESULT IF_PASS COUNT 1>
4326 (?im)error.+?Reference.+?constant.+?expected.+?instead
4327 <END_RESULT>
4328 <RESULT IF_PASS COUNT 1>
4329 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4330 <END_RESULT>
4331 <RESULT IF_PASS COUNT 1>
4332 (?is)\berror:
4333 <END_RESULT>
4334 <END_TC>
4335
4336 :exmp.
4337
4338 .*---------------------------------------------------------------------*
4339 :h4.Values are not constants or literals in subtype-specifications - both types of functions in list (float )
4340 .*---------------------------------------------------------------------*
4341 :xmp tab=0.
4342
4343 <TC - Values are not constants or literals in subtype-specifications - both types of functions in list (float )>
4344
4345 <COMPILE>
4346 <VERDICT_LEAF PASS>
4347 <MODULE TTCN x x.ttcn>
4348 module x {
4349
4350 function myFunct() return float{
4351 return 5.0;
4352 }
4353
4354 type float myIntType ( rnd(), 255.0, myFunct() );
4355
4356 }
4357 <END_MODULE>
4358 <RESULT IF_PASS COUNT 1>
4359 (?im)error.+?evaluatable.+?constant.+?value.+?expected.+?instead.+?of.+?operation
4360 <END_RESULT>
4361 <RESULT IF_PASS COUNT 1>
4362 (?im)error.+?Reference.+?constant.+?expected.+?instead
4363 <END_RESULT>
4364 <RESULT IF_PASS COUNT 1>
4365 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4366 <END_RESULT>
4367 <RESULT IF_PASS COUNT 2>
4368 (?is)\berror:
4369 <END_RESULT>
4370 <END_TC>
4371
4372 :exmp.
4373
4374 .*---------------------------------------------------------------------*
4375 :h3.Negative string lengths
4376 .*---------------------------------------------------------------------*
4377
4378 This test case group covers the requirement SA-6/13.
4379
4380 Strategy: TTCN-3 permits specification of length restrictions on string types. In all cases, the boundaries shall evaluate to non-negative integer or derived integer constant values.
4381 All occurances shall be tested, where such a notation can be used.
4382
4383 Tested:
4384 :list.
4385 :li D='-'.type and ranged type definition in definition part for charstring
4386 :li D='-'.charstring in definition part
4387 :li D='-'.bitstring in function
4388 :elist.
4389
4390 .*---------------------------------------------------------------------*
4391 :h4.Negative string lengths - type definition (charstring in def.part)
4392 .*---------------------------------------------------------------------*
4393 :xmp tab=0.
4394
4395 <TC - Negative string lengths - type definition (charstring in def.part)>
4396
4397 <COMPILE>
4398 <VERDICT_LEAF PASS>
4399 <MODULE TTCN x x.ttcn>
4400 module x {
4401
4402 const integer i:= -6;
4403
4404 type charstring myChars length( i);
4405
4406 }
4407 <END_MODULE>
4408 <RESULT IF_PASS COUNT 1>
4409 (?im)error.+?length.+?restriction.+?must.+?non-negative
4410 <END_RESULT>
4411 <RESULT IF_PASS COUNT 1>
4412 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4413 <END_RESULT>
4414 <RESULT IF_PASS COUNT 1>
4415 (?is)\berror:
4416 <END_RESULT>
4417 <END_TC>
4418
4419 :exmp.
4420
4421 .*---------------------------------------------------------------------*
4422 :h4.Negative string lengths - ranged type definition (charstring in def.part)
4423 .*---------------------------------------------------------------------*
4424 :xmp tab=0.
4425
4426 <TC - Negative string lengths - ranged type definition (charstring in def.part)>
4427
4428 <COMPILE>
4429 <VERDICT_LEAF PASS>
4430 <MODULE TTCN x x.ttcn>
4431 module x {
4432
4433 const integer i:= -5;
4434
4435 type charstring myChars length( i..3);
4436
4437 }
4438 <END_MODULE>
4439 <RESULT IF_PASS COUNT 1>
4440 (?im)error.+?Lower.+?boundary.+?length.+?restriction.+?must.+?non-negative
4441 <END_RESULT>
4442 <RESULT IF_PASS COUNT 1>
4443 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4444 <END_RESULT>
4445 <RESULT IF_PASS COUNT 1>
4446 (?is)\berror:
4447 <END_RESULT>
4448 <END_TC>
4449
4450 :exmp.
4451
4452 .*---------------------------------------------------------------------*
4453 :h4.Negative string lengths - using (charstring in def.part)
4454 .*---------------------------------------------------------------------*
4455 :xmp tab=0.
4456
4457 <TC - Negative string lengths - using (charstring in def.part)>
4458
4459 <COMPILE>
4460 <VERDICT_LEAF PASS>
4461 <MODULE TTCN x x.ttcn>
4462 module x {
4463
4464 const charstring myChars:= "aiyyo";
4465 const charstring f:= myChars[-1];
4466
4467 }
4468 <END_MODULE>
4469 <RESULT IF_PASS COUNT 1>
4470 (?im)error.+?non-negative.+?value.+?expected
4471 <END_RESULT>
4472 <RESULT IF_PASS COUNT 1>
4473 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4474 <END_RESULT>
4475 <RESULT IF_PASS COUNT 1>
4476 (?is)\berror:
4477 <END_RESULT>
4478 <END_TC>
4479
4480 :exmp.
4481
4482 .*---------------------------------------------------------------------*
4483 :h4.Negative string lengths - using (bitstring in function)
4484 .*---------------------------------------------------------------------*
4485 :xmp tab=0.
4486
4487 <TC - Negative string lengths - using (bitstring in function)>
4488
4489 <COMPILE>
4490 <VERDICT_LEAF PASS>
4491 <MODULE TTCN x x.ttcn>
4492 module x {
4493
4494 const integer i:= -9;
4495 const bitstring myBits:= '100001'B;
4496 const bitstring f:= myBits[i];
4497
4498 }
4499 <END_MODULE>
4500 <RESULT IF_PASS COUNT 1>
4501 (?im)error.+?non-negative.+?value.+?expected
4502 <END_RESULT>
4503 <RESULT IF_PASS COUNT 1>
4504 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4505 <END_RESULT>
4506 <RESULT IF_PASS COUNT 1>
4507 (?is)\berror:
4508 <END_RESULT>
4509 <END_TC>
4510
4511 :exmp.
4512
4513 .*---------------------------------------------------------------------*
4514 :h3.Dimension in arrays
4515 .*---------------------------------------------------------------------*
4516
4517 This test case group covers the requirement SA-6/14.
4518
4519 Strategy: Array dimensions shall be specified using constant expressions which shall evaluate to a positive integer value.
4520 All occurances shall be tested, where such a notation can be used.
4521
4522 Tested:
4523 :list.
4524 :li D='-'.declaration of integer array with references in control part and function
4525 :li D='-'.declaration of timer array with references in control part and function
4526 :li D='-'.declaration of integer ranged array with references in control part and function
4527 :li D='-'.declaration of timer ranged array with references in control part and function
4528 :li D='-'.declaration of integer array with negative numbers in control part and function
4529 :li D='-'.declaration of timer array with negative numbers in control part and function
4530 :li D='-'.declaration of port array with negative numbers in definition part
4531 :li D='-'.declaration of integer ranged array with negative numbers in control part and function
4532 :li D='-'.declaration of timer ranged array with negative numbers in control part and function
4533 :li D='-'.declaration of port ranged array with negative numbers in control part and function
4534 :li D='-'.declaration of integer array with zero number in control part and function
4535 :li D='-'.declaration of timer array with zero numbers in control part and function
4536 :li D='-'.declaration of port array with zero numbers in definition part
4537 :li D='-'.using of integer array with negative numbers in control part and function
4538 :li D='-'.using of timer array with negative numbers in control part and function
4539 :li D='-'.using of port array with negative numbers in function
4540 :li D='-'.using of integer ranged array with negative numbers in control part and function
4541 :li D='-'.using of timer ranged array with negative numbers in control part and function
4542 :li D='-'.using of port ranged array with negative numbers in function
4543 :elist.
4544 NOTE: it works for timer arrays
4545
4546 .*---------------------------------------------------------------------*
4547 :h4.Dimension in arrays - variable declaration with references (integer array in control part)
4548 .*---------------------------------------------------------------------*
4549 :xmp tab=0.
4550
4551 <TC - Dimension in arrays - variable declaration with references (integer array in control part)>
4552
4553 <COMPILE>
4554 <VERDICT_LEAF FAIL>
4555 <MODULE TTCN x x.ttcn>
4556 module x {
4557
4558 control{
4559 var integer i:= 4;
4560
4561 // TR693
4562 var integer myArr[2][i];
4563 }
4564 }
4565 <END_MODULE>
4566 <RESULT IF_PASS COUNT 1>
4567 (?im)error.+?Reference.+?to.+?constant.+?value.+?expected
4568 <END_RESULT>
4569 <RESULT IF_PASS COUNT 1>
4570 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4571 <END_RESULT>
4572 <RESULT IF_PASS COUNT 1>
4573 (?is)\berror:
4574 <END_RESULT>
4575 <RESULT IF_FAIL COUNT 1>
4576 (?is)\berror:
4577 <END_RESULT>
4578 <END_TC>
4579
4580 :exmp.
4581
4582 .*---------------------------------------------------------------------*
4583 :h4.Dimension in arrays - variable declaration with references (integer array in function)
4584 .*---------------------------------------------------------------------*
4585 :xmp tab=0.
4586
4587 <TC - Dimension in arrays - variable declaration with references (integer array in function)>
4588
4589 <COMPILE>
4590 <VERDICT_LEAF FAIL>
4591 <MODULE TTCN x x.ttcn>
4592 module x {
4593
4594 function myFunct(){
4595 var integer i:= 9;
4596
4597 // TR693
4598 var integer myArr[i][3];
4599 }
4600 }
4601 <END_MODULE>
4602 <RESULT IF_PASS COUNT 1>
4603 (?im)error.+?Reference.+?to.+?constant.+?value.+?expected
4604 <END_RESULT>
4605 <RESULT IF_PASS COUNT 1>
4606 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4607 <END_RESULT>
4608 <RESULT IF_PASS COUNT 1>
4609 (?is)\berror:
4610 <END_RESULT>
4611 <RESULT IF_FAIL COUNT 1>
4612 (?is)\berror:
4613 <END_RESULT>
4614 <END_TC>
4615
4616 :exmp.
4617
4618 .*---------------------------------------------------------------------*
4619 :h4.Dimension in arrays - timer declaration with references (in control part)
4620 .*---------------------------------------------------------------------*
4621 :xmp tab=0.
4622
4623 <TC - Dimension in arrays - timer declaration with references (in control part)>
4624
4625 <COMPILE>
4626 <VERDICT_LEAF PASS>
4627 <MODULE TTCN x x.ttcn>
4628 module x {
4629
4630 control{
4631 var integer i:= 4;
4632 timer myTimerArr[2][i];
4633 }
4634 }
4635 <END_MODULE>
4636 <RESULT IF_PASS COUNT 1>
4637 (?im)error.+?Reference.+?to.+?constant.+?value.+?expected
4638 <END_RESULT>
4639 <RESULT IF_PASS COUNT 1>
4640 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4641 <END_RESULT>
4642 <RESULT IF_PASS COUNT 1>
4643 (?is)\berror:
4644 <END_RESULT>
4645 <END_TC>
4646
4647 :exmp.
4648
4649 .*---------------------------------------------------------------------*
4650 :h4.Dimension in arrays - timer declaration with references (in function)
4651 .*---------------------------------------------------------------------*
4652 :xmp tab=0.
4653
4654 <TC - Dimension in arrays - timer declaration with references (in function)>
4655
4656 <COMPILE>
4657 <VERDICT_LEAF PASS>
4658 <MODULE TTCN x x.ttcn>
4659 module x {
4660
4661 function myFunct(){
4662 var integer i:= 9;
4663
4664 // TR 693
4665 timer myTimerArr[i][3];
4666 }
4667 }
4668 <END_MODULE>
4669 <RESULT IF_PASS COUNT 1>
4670 (?im)error.+?Reference.+?to.+?constant.+?value.+?expected
4671 <END_RESULT>
4672 <RESULT IF_PASS COUNT 1>
4673 (?is)\berror:
4674 <END_RESULT>
4675 <END_TC>
4676
4677 :exmp.
4678
4679 .*---------------------------------------------------------------------*
4680 :h4.Dimension in arrays - port declaration with references (in def.part)
4681 .*---------------------------------------------------------------------*
4682 :xmp tab=0.
4683
4684 <TC - Dimension in arrays - port declaration with references (in def.part)>
4685
4686 <COMPILE>
4687 <VERDICT_LEAF PASS>
4688 <MODULE TTCN x x.ttcn>
4689 module x {
4690
4691 //TR 726
4692 type port myport message{inout charstring};
4693 type myport akarmi[5];
4694
4695 }
4696 <END_MODULE>
4697 <RESULT IF_PASS COUNT 1>
4698 (?im)error.+?cannot.+?embedded.+?into.+?array.+?type
4699 <END_RESULT>
4700 <RESULT IF_PASS COUNT 1>
4701 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4702 <END_RESULT>
4703 <RESULT IF_PASS COUNT 1>
4704 (?is)\berror:
4705 <END_RESULT>
4706 <END_TC>
4707
4708 :exmp.
4709
4710 .*---------------------------------------------------------------------*
4711 :h4.Dimension in arrays - variable declaration with references (integer ranged-array in control part)
4712 .*---------------------------------------------------------------------*
4713 :xmp tab=0.
4714
4715 <TC - Dimension in arrays - variable declaration with references (integer ranged-array in control part)>
4716
4717 <COMPILE>
4718 <VERDICT_LEAF FAIL>
4719 <MODULE TTCN x x.ttcn>
4720 module x {
4721
4722 control{
4723 var integer i:= 4;
4724
4725 // TR 693
4726 var integer myArr[2..i][3..4];
4727 }
4728 }
4729 <END_MODULE>
4730 <RESULT IF_PASS COUNT 1>
4731 (?im)error.+?Reference.+?to.+?constant.+?value.+?expected
4732 <END_RESULT>
4733 <RESULT IF_PASS COUNT 1>
4734 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4735 <END_RESULT>
4736 <RESULT IF_PASS COUNT 1>
4737 (?is)\berror:
4738 <END_RESULT>
4739 <RESULT IF_FAIL COUNT 1>
4740 (?is)\berror:
4741 <END_RESULT>
4742 <END_TC>
4743
4744 :exmp.
4745
4746 .*---------------------------------------------------------------------*
4747 :h4.Dimension in arrays - variable declaration with references (integer ranged-array in function)
4748 .*---------------------------------------------------------------------*
4749 :xmp tab=0.
4750
4751 <TC - Dimension in arrays - variable declaration with references (integer ranged-array in function)>
4752
4753 <COMPILE>
4754 <VERDICT_LEAF FAIL>
4755 <MODULE TTCN x x.ttcn>
4756 module x {
4757
4758 function myFunct(){
4759 var integer i:= 4;
4760
4761 // TR 693
4762 var integer myArr[2..6][3..i];
4763 }
4764 }
4765 <END_MODULE>
4766 <RESULT IF_PASS COUNT 1>
4767 (?im)error.+?Reference.+?to.+?constant.+?value.+?expected
4768 <END_RESULT>
4769 <RESULT IF_PASS COUNT 1>
4770 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4771 <END_RESULT>
4772 <RESULT IF_PASS COUNT 1>
4773 (?is)\berror:
4774 <END_RESULT>
4775 <RESULT IF_FAIL COUNT 1>
4776 (?is)\berror:
4777 <END_RESULT>
4778 <END_TC>
4779
4780 :exmp.
4781
4782 .*---------------------------------------------------------------------*
4783 :h4.Dimension in arrays - timer declaration with references (ranged-array in control part)
4784 .*---------------------------------------------------------------------*
4785 :xmp tab=0.
4786
4787 <TC - Dimension in arrays - timer declaration with references (ranged-array in control part)>
4788
4789 <COMPILE>
4790 <VERDICT_LEAF PASS>
4791 <MODULE TTCN x x.ttcn>
4792 module x {
4793
4794 control{
4795 var integer i:= 4;
4796 timer myTimerArr[i..6][3..4];
4797 }
4798 }
4799 <END_MODULE>
4800 <RESULT IF_PASS COUNT 1>
4801 (?im)error.+?Reference.+?to.+?constant.+?value.+?expected
4802 <END_RESULT>
4803 <RESULT IF_PASS COUNT 1>
4804 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4805 <END_RESULT>
4806 <RESULT IF_PASS COUNT 1>
4807 (?is)\berror:
4808 <END_RESULT>
4809 <END_TC>
4810
4811 :exmp.
4812
4813 .*---------------------------------------------------------------------*
4814 :h4.Dimension in arrays - timer declaration with references (ranged-array in function)
4815 .*---------------------------------------------------------------------*
4816 :xmp tab=0.
4817
4818 <TC - Dimension in arrays - timer declaration with references (ranged-array in function)>
4819
4820 <COMPILE>
4821 <VERDICT_LEAF PASS>
4822 <MODULE TTCN x x.ttcn>
4823 module x {
4824
4825 function myFunct(){
4826 var integer i:= 4;
4827 timer myTimerArr[2..i][3..4];
4828 }
4829 }
4830 <END_MODULE>
4831 <RESULT IF_PASS COUNT 1>
4832 (?im)error.+?Reference.+?to.+?constant.+?value.+?expected
4833 <END_RESULT>
4834 <RESULT IF_PASS COUNT 1>
4835 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4836 <END_RESULT>
4837 <RESULT IF_PASS COUNT 1>
4838 (?is)\berror:
4839 <END_RESULT>
4840 <END_TC>
4841
4842 :exmp.
4843
4844 .*---------------------------------------------------------------------*
4845 :h4.Dimension in arrays - variable declaration with negative literal (integer array in control part)
4846 .*---------------------------------------------------------------------*
4847 :xmp tab=0.
4848
4849 <TC - Dimension in arrays - variable declaration with negative literal (integer array in control part)>
4850
4851 <COMPILE>
4852 <VERDICT_LEAF PASS>
4853 <MODULE TTCN x x.ttcn>
4854 module x {
4855
4856 control{
4857 var integer myArr[2][-3];
4858 }
4859 }
4860 <END_MODULE>
4861 <RESULT IF_PASS COUNT 1>
4862 (?im)error.+?positive.+?value.+?expected.+?array.+?size
4863 <END_RESULT>
4864 <RESULT IF_PASS COUNT 1>
4865 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4866 <END_RESULT>
4867 <RESULT IF_PASS COUNT 1>
4868 (?is)\berror:
4869 <END_RESULT>
4870 <END_TC>
4871
4872 :exmp.
4873
4874 .*---------------------------------------------------------------------*
4875 :h4.Dimension in arrays - variable declaration with negative constants (integer array in function)
4876 .*---------------------------------------------------------------------*
4877 :xmp tab=0.
4878
4879 <TC - Dimension in arrays - variable declaration with negative constants (integer array in function)>
4880
4881 <COMPILE>
4882 <VERDICT_LEAF PASS>
4883 <MODULE TTCN x x.ttcn>
4884 module x {
4885
4886 function myFunct(){
4887
4888 const integer i:= -5;
4889 var integer myArr[i][3];
4890 }
4891 }
4892 <END_MODULE>
4893 <RESULT IF_PASS COUNT 1>
4894 (?im)error.+?positive.+?value.+?expected.+?array.+?size
4895 <END_RESULT>
4896 <RESULT IF_PASS COUNT 1>
4897 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4898 <END_RESULT>
4899 <RESULT IF_PASS COUNT 1>
4900 (?is)\berror:
4901 <END_RESULT>
4902 <END_TC>
4903
4904 :exmp.
4905
4906 .*---------------------------------------------------------------------*
4907 :h4.Dimension in arrays - timer declaration with negative literal (in control part)
4908 .*---------------------------------------------------------------------*
4909 :xmp tab=0.
4910
4911 <TC - Dimension in arrays - timer declaration with negative literal (in control part)>
4912
4913 <COMPILE>
4914 <VERDICT_LEAF PASS>
4915 <MODULE TTCN x x.ttcn>
4916 module x {
4917
4918 control{
4919 timer myArr[2][-3];
4920 }
4921 }
4922 <END_MODULE>
4923 <RESULT IF_PASS COUNT 1>
4924 (?im)error.+?positive.+?integer.+?value.+?expected
4925 <END_RESULT>
4926 <RESULT IF_PASS COUNT 1>
4927 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4928 <END_RESULT>
4929 <RESULT IF_PASS COUNT 1>
4930 (?is)\berror:
4931 <END_RESULT>
4932 <END_TC>
4933
4934 :exmp.
4935
4936 .*---------------------------------------------------------------------*
4937 :h4.Dimension in arrays - timer declaration with negative constants (in function)
4938 .*---------------------------------------------------------------------*
4939 :xmp tab=0.
4940
4941 <TC - Dimension in arrays - timer declaration with negative constants (in function)>
4942
4943 <COMPILE>
4944 <VERDICT_LEAF PASS>
4945 <MODULE TTCN x x.ttcn>
4946 module x {
4947
4948 function myFunct(){
4949
4950 const integer i:= -5;
4951 timer myArr[i][3];
4952 }
4953 }
4954 <END_MODULE>
4955 <RESULT IF_PASS COUNT 1>
4956 (?im)error.+?positive.+?integer.+?value.+?expected
4957 <END_RESULT>
4958 <RESULT IF_PASS COUNT 1>
4959 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4960 <END_RESULT>
4961 <RESULT IF_PASS COUNT 1>
4962 (?is)\berror:
4963 <END_RESULT>
4964 <END_TC>
4965
4966 :exmp.
4967
4968 .*---------------------------------------------------------------------*
4969 :h4.Dimension in arrays - port declaration with negative constants (in def. part)
4970 .*---------------------------------------------------------------------*
4971 :xmp tab=0.
4972
4973 <TC - Dimension in arrays - port declaration with negative constants (in def. part)>
4974
4975 <COMPILE>
4976 <VERDICT_LEAF PASS>
4977 <MODULE TTCN x x.ttcn>
4978 module x {
4979
4980 type port myPort message{inout charstring};
4981
4982 const integer i := -5;
4983
4984 type component myComp{
4985 port myPort ports[i];
4986 }
4987 }
4988 <END_MODULE>
4989 <RESULT IF_PASS COUNT 1>
4990 (?im)error.+?positive.+?integer.+?value.+?expected
4991 <END_RESULT>
4992 <RESULT IF_PASS COUNT 1>
4993 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4994 <END_RESULT>
4995 <RESULT IF_PASS COUNT 1>
4996 (?is)\berror:
4997 <END_RESULT>
4998 <END_TC>
4999
5000 :exmp.
5001
5002
5003 .*---------------------------------------------------------------------*
5004 :h4.Dimension in arrays - variable declaration with negative literal (integer ranged-array in control part)
5005 .*---------------------------------------------------------------------*
5006 :xmp tab=0.
5007
5008 <TC - Dimension in arrays - variable declaration with negative literal (integer ranged-array in control part)>
5009
5010 <COMPILEGCC>
5011 <VERDICT_LEAF PASS>
5012 <MODULE TTCN x x.ttcn>
5013 module x {
5014
5015 control{
5016
5017 var integer myArr[2..6][-8..10];
5018 }
5019 }
5020 <END_MODULE>
5021 <RESULT IF_PASS NEGATIVE>
5022 (?is)\berror:
5023 <END_RESULT>
5024 <END_TC>
5025
5026 :exmp.
5027
5028 .*---------------------------------------------------------------------*
5029 :h4.Dimension in arrays - variable declaration with negative constants (integer ranged-array in function)
5030 .*---------------------------------------------------------------------*
5031 :xmp tab=0.
5032
5033 <TC - Dimension in arrays - variable declaration with negative constants (integer ranged-array in function)>
5034
5035 <COMPILEGCC>
5036 <VERDICT_LEAF PASS>
5037 <MODULE TTCN x x.ttcn>
5038 module x {
5039
5040 function myFunct(){
5041
5042 const integer i:= -3;
5043 var integer myArr[i..6][8..10];
5044 }
5045 }
5046 <END_MODULE>
5047 <RESULT IF_PASS NEGATIVE>
5048 (?is)\berror:
5049 <END_RESULT>
5050 <END_TC>
5051
5052 :exmp.
5053
5054 .*---------------------------------------------------------------------*
5055 :h4.Dimension in arrays - timer declaration with negative literal (ranged-array in control part)
5056 .*---------------------------------------------------------------------*
5057 :xmp tab=0.
5058
5059 <TC - Dimension in arrays - timer declaration with negative literal (ranged-array in control part)>
5060
5061 <COMPILEGCC>
5062 <VERDICT_LEAF PASS>
5063 <MODULE TTCN x x.ttcn>
5064 module x {
5065
5066 control{
5067
5068 timer myArr[2..6][-8..10];
5069 }
5070 }
5071 <END_MODULE>
5072 <RESULT IF_PASS NEGATIVE>
5073 (?is)\berror:
5074 <END_RESULT>
5075 <END_TC>
5076
5077 :exmp.
5078
5079 .*---------------------------------------------------------------------*
5080 :h4.Dimension in arrays - timer declaration with negative constants (ranged-array in function)
5081 .*---------------------------------------------------------------------*
5082 :xmp tab=0.
5083
5084 <TC - Dimension in arrays - timer declaration with negative constants (ranged-array in function)>
5085
5086 <COMPILEGCC>
5087 <VERDICT_LEAF PASS>
5088 <MODULE TTCN x x.ttcn>
5089 module x {
5090
5091 function myFunct(){
5092
5093 const integer i:= -3;
5094 timer myArr[i..6][8..10];
5095 }
5096 }
5097 <END_MODULE>
5098 <RESULT IF_PASS NEGATIVE>
5099 (?is)\berror:
5100 <END_RESULT>
5101 <END_TC>
5102
5103 :exmp.
5104
5105 .*---------------------------------------------------------------------*
5106 :h4.Dimension in arrays - port declaration with negative constants (ranged-array in def. part)
5107 .*---------------------------------------------------------------------*
5108 :xmp tab=0.
5109
5110 <TC - Dimension in arrays - port declaration with negative constants (ranged-array in def. part)>
5111
5112 <COMPILE>
5113 <VERDICT_LEAF PASS>
5114 <MODULE TTCN x x.ttcn>
5115 module x {
5116
5117 type port myPort message{inout charstring};
5118
5119 const integer i := -5;
5120
5121 type component myComp{
5122 port myPort ports[i..10];
5123 }
5124
5125 }
5126 <END_MODULE>
5127 <RESULT IF_PASS NEGATIVE>
5128 (?is)\berror:
5129 <END_RESULT>
5130 <END_TC>
5131
5132 :exmp.
5133
5134 .*---------------------------------------------------------------------*
5135 :h4.Dimension in arrays - variable declaration with zero constants (integer array in control part)
5136 .*---------------------------------------------------------------------*
5137 :xmp tab=0.
5138
5139 <TC - Dimension in arrays - variable declaration with zero constants (integer array in control part)>
5140
5141 <COMPILE>
5142 <VERDICT_LEAF PASS>
5143 <MODULE TTCN x x.ttcn>
5144 module x {
5145
5146 control{
5147
5148 var integer myArr[0];
5149 }
5150 }
5151 <END_MODULE>
5152 <RESULT IF_PASS COUNT 1>
5153 (?im)error.+?positive.+?value.+?expected.+?array.+?size
5154 <END_RESULT>
5155 <RESULT IF_PASS COUNT 1>
5156 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5157 <END_RESULT>
5158 <RESULT IF_PASS COUNT 1>
5159 (?is)\berror:
5160 <END_RESULT>
5161 <END_TC>
5162
5163 :exmp.
5164
5165 .*---------------------------------------------------------------------*
5166 :h4.Dimension in arrays - variable declaration with zero literal (integer array in function)
5167 .*---------------------------------------------------------------------*
5168 :xmp tab=0.
5169
5170 <TC - Dimension in arrays - variable declaration with zero literal (integer array in function)>
5171
5172 <COMPILE>
5173 <VERDICT_LEAF PASS>
5174 <MODULE TTCN x x.ttcn>
5175 module x {
5176
5177 function myFunct(){
5178
5179 const integer i:= 0;
5180 var integer myArr[i];
5181 }
5182 }
5183 <END_MODULE>
5184 <RESULT IF_PASS COUNT 1>
5185 (?im)error.+?positive.+?value.+?expected.+?array.+?size
5186 <END_RESULT>
5187 <RESULT IF_PASS COUNT 1>
5188 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5189 <END_RESULT>
5190 <RESULT IF_PASS COUNT 1>
5191 (?is)\berror:
5192 <END_RESULT>
5193 <END_TC>
5194
5195 :exmp.
5196
5197 .*---------------------------------------------------------------------*
5198 :h4.Dimension in arrays - timer declaration with zero constants (in control part)
5199 .*---------------------------------------------------------------------*
5200 :xmp tab=0.
5201
5202 <TC - Dimension in arrays - timer declaration with zero constants (in control part)>
5203
5204 <COMPILE>
5205 <VERDICT_LEAF PASS>
5206 <MODULE TTCN x x.ttcn>
5207 module x {
5208
5209 control{
5210
5211 timer myArr[0];
5212 }
5213 }
5214 <END_MODULE>
5215 <RESULT IF_PASS COUNT 1>
5216 (?im)error.+?positive.+?integer.+?value.+?expected
5217 <END_RESULT>
5218 <RESULT IF_PASS COUNT 1>
5219 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5220 <END_RESULT>
5221 <RESULT IF_PASS COUNT 1>
5222 (?is)\berror:
5223 <END_RESULT>
5224 <END_TC>
5225
5226 :exmp.
5227
5228 .*---------------------------------------------------------------------*
5229 :h4.Dimension in arrays - port declaration with zero constants (in def. part)
5230 .*---------------------------------------------------------------------*
5231 :xmp tab=0.
5232
5233 <TC - Dimension in arrays - port declaration with zero constants (in def. part)>
5234
5235 <COMPILE>
5236 <VERDICT_LEAF PASS>
5237 <MODULE TTCN x x.ttcn>
5238 module x {
5239
5240 type port myPort message{inout charstring};
5241
5242 type component myComp{
5243 port myPort ports[0];
5244 }
5245
5246 }
5247 <END_MODULE>
5248 <RESULT IF_PASS COUNT 1>
5249 (?im)error.+?positive.+?integer.+?value.+?expected
5250 <END_RESULT>
5251 <RESULT IF_PASS COUNT 1>
5252 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5253 <END_RESULT>
5254 <RESULT IF_PASS COUNT 1>
5255 (?is)\berror:
5256 <END_RESULT>
5257 <END_TC>
5258
5259 :exmp.
5260
5261 .*---------------------------------------------------------------------*
5262 :h4.Dimension in arrays - timer declaration with zero literal (in function)
5263 .*---------------------------------------------------------------------*
5264 :xmp tab=0.
5265
5266 <TC - Dimension in arrays - timer declaration with zero literal (in function)>
5267
5268 <COMPILE>
5269 <VERDICT_LEAF PASS>
5270 <MODULE TTCN x x.ttcn>
5271 module x {
5272
5273 function myFunct(){
5274
5275 const integer i:= 0;
5276 timer myArr[i];
5277 }
5278 }
5279 <END_MODULE>
5280 <RESULT IF_PASS COUNT 1>
5281 (?im)error.+?positive.+?integer.+?value.+?expected
5282 <END_RESULT>
5283 <RESULT IF_PASS COUNT 1>
5284 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5285 <END_RESULT>
5286 <RESULT IF_PASS COUNT 1>
5287 (?is)\berror:
5288 <END_RESULT>
5289 <END_TC>
5290
5291 :exmp.
5292
5293 .*---------------------------------------------------------------------*
5294 :h4.Dimension in arrays - port declaration with zero literal (in def. part)
5295 .*---------------------------------------------------------------------*
5296 :xmp tab=0.
5297
5298 <TC - Dimension in arrays - port declaration with zero literal (in def. part)>
5299
5300 <COMPILE>
5301 <VERDICT_LEAF PASS>
5302 <MODULE TTCN x x.ttcn>
5303 module x {
5304
5305 type port myPort message{inout charstring};
5306
5307 const integer i := 0;
5308
5309 type component myComp{
5310 port myPort ports[i];
5311 }
5312
5313 }
5314 <END_MODULE>
5315 <RESULT IF_PASS COUNT 1>
5316 (?im)error.+?positive.+?integer.+?value.+?expected
5317 <END_RESULT>
5318 <RESULT IF_PASS COUNT 1>
5319 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5320 <END_RESULT>
5321 <RESULT IF_PASS COUNT 1>
5322 (?is)\berror:
5323 <END_RESULT>
5324 <END_TC>
5325
5326 :exmp.
5327
5328
5329 .*---------------------------------------------------------------------*
5330 :h4.Dimension in arrays - using (timer array in control part)
5331 .*---------------------------------------------------------------------*
5332 :xmp tab=0.
5333
5334 <TC - Dimension in arrays - using (timer array in control part)>
5335
5336 <COMPILE>
5337 <VERDICT_LEAF PASS>
5338 <MODULE TTCN x x.ttcn>
5339 module x {
5340
5341 control{
5342
5343 timer myArr[3];
5344
5345 myArr[-1].start( 2.0);
5346 }
5347 }
5348 <END_MODULE>
5349 <RESULT IF_PASS COUNT 1>
5350 (?im)error.+?Array.+?index.+?underflow
5351 <END_RESULT>
5352 <RESULT IF_PASS COUNT 1>
5353 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5354 <END_RESULT>
5355 <RESULT IF_PASS COUNT 1>
5356 (?is)\berror:
5357 <END_RESULT>
5358 <END_TC>
5359
5360 :exmp.
5361
5362 .*---------------------------------------------------------------------*
5363 :h4.Dimension in arrays - using (timer array in function)
5364 .*---------------------------------------------------------------------*
5365 :xmp tab=0.
5366
5367 <TC - Dimension in arrays - using (timer array in function)>
5368
5369 <COMPILE>
5370 <VERDICT_LEAF PASS>
5371 <MODULE TTCN x x.ttcn>
5372 module x {
5373
5374 function myFunct(){
5375
5376 timer myArr[3];
5377 const integer i:= -3;
5378
5379 myArr[i].start( 2.0);
5380 }
5381 }
5382 <END_MODULE>
5383 <RESULT IF_PASS COUNT 1>
5384 (?im)error.+?Array.+?index.+?underflow
5385 <END_RESULT>
5386 <RESULT IF_PASS COUNT 1>
5387 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5388 <END_RESULT>
5389 <RESULT IF_PASS COUNT 1>
5390 (?is)\berror:
5391 <END_RESULT>
5392 <END_TC>
5393
5394 :exmp.
5395
5396 .*---------------------------------------------------------------------*
5397 :h4.Dimension in arrays - using (port array in function)
5398 .*---------------------------------------------------------------------*
5399 :xmp tab=0.
5400
5401 <TC - Dimension in arrays - using (port array in function)>
5402
5403 <COMPILE>
5404 <VERDICT_LEAF PASS>
5405 <MODULE TTCN x x.ttcn>
5406 module x {
5407
5408 type port myPort message{inout charstring};
5409
5410 type component myComp{
5411 port myPort ports[3];
5412 }
5413
5414 function myFunc() runs on myComp{
5415 const integer i := -3;
5416 ports[i].start;
5417 }
5418
5419 }
5420 <END_MODULE>
5421 <RESULT IF_PASS COUNT 1>
5422 (?im)\berror\b.+?index.+?underflow
5423 <END_RESULT>
5424 <RESULT IF_PASS COUNT 1>
5425 (?is)\berror:
5426 <END_RESULT>
5427 <END_TC>
5428
5429 :exmp.
5430
5431 .*---------------------------------------------------------------------*
5432 :h4.Dimension in arrays - using (integer ranged-array in control part)
5433 .*---------------------------------------------------------------------*
5434 :xmp tab=0.
5435
5436 <TC - Dimension in arrays - using (integer ranged-array in control part)>
5437
5438 <COMPILE>
5439 <VERDICT_LEAF PASS>
5440 <MODULE TTCN x x.ttcn>
5441 module x {
5442
5443 control{
5444
5445 var integer myArr[4..6][8..10];
5446
5447 const integer i:= -3;
5448
5449 // TR694
5450 var integer f:= myArr[i][9];
5451 }
5452 }
5453 <END_MODULE>
5454 <RESULT IF_FAIL NEGATIVE>
5455 (?is)\berror:
5456 <END_RESULT>
5457 <END_TC>
5458
5459 :exmp.
5460
5461 .*---------------------------------------------------------------------*
5462 :h4.Dimension in arrays - using (integer ranged-array in function)
5463 .*---------------------------------------------------------------------*
5464 :xmp tab=0.
5465
5466 <TC - Dimension in arrays - using (integer ranged-array in function)>
5467
5468 <COMPILE>
5469 <VERDICT_LEAF PASS>
5470 <MODULE TTCN x x.ttcn>
5471 module x {
5472
5473 function myFunct(){
5474
5475 const integer i:= 3;
5476 var integer myArr[i..6][8..10];
5477
5478 // TR694
5479 var integer f:= myArr[4][-9];
5480 }
5481 }
5482 <END_MODULE>
5483 <RESULT IF_FAIL NEGATIVE>
5484 (?is)\berror:
5485 <END_RESULT>
5486 <END_TC>
5487
5488 :exmp.
5489
5490 .*---------------------------------------------------------------------*
5491 :h4.Dimension in arrays - using (timer ranged-array in control part)
5492 .*---------------------------------------------------------------------*
5493 :xmp tab=0.
5494
5495 <TC - Dimension in arrays - using (timer ranged-array in control part)>
5496
5497 <COMPILE>
5498 <VERDICT_LEAF PASS>
5499 <MODULE TTCN x x.ttcn>
5500 module x {
5501
5502 control{
5503
5504 timer myArr[3..6][1..10];
5505 const integer i:= -3;
5506
5507 // TR695
5508 myArr[i][2].start(9.0);
5509
5510 }
5511 }
5512 <END_MODULE>
5513 <RESULT IF_PASS COUNT 1>
5514 (?im)\berror\b.+?index.+?underflow
5515 <END_RESULT>
5516 <RESULT IF_PASS COUNT 1>
5517 (?is)\berror:
5518 <END_RESULT>
5519 <END_TC>
5520
5521 :exmp.
5522
5523 .*---------------------------------------------------------------------*
5524 :h4.Dimension in arrays - using (timer ranged-array in function)
5525 .*---------------------------------------------------------------------*
5526 :xmp tab=0.
5527
5528 <TC - Dimension in arrays - using (timer ranged-array in function)>
5529
5530 <COMPILE>
5531 <VERDICT_LEAF PASS>
5532 <MODULE TTCN x x.ttcn>
5533 module x {
5534
5535 function myFunct(){
5536
5537 timer myArr[3..6][1..10];
5538 const integer i:= -3;
5539
5540 // TR695
5541 myArr[i][2].start(9.0);
5542 }
5543 }
5544 <END_MODULE>
5545 <RESULT IF_PASS COUNT 1>
5546 (?im)\berror\b.+?index.+?underflow
5547 <END_RESULT>
5548 <RESULT IF_PASS COUNT 1>
5549 (?is)\berror:
5550 <END_RESULT>
5551 <END_TC>
5552
5553 :exmp.
5554
5555 .*---------------------------------------------------------------------*
5556 :h4.Dimension in arrays - using (port ranged-array in function)
5557 .*---------------------------------------------------------------------*
5558 :xmp tab=0.
5559
5560 <TC - Dimension in arrays - using (port ranged-array in function)>
5561
5562 <COMPILE>
5563 <VERDICT_LEAF PASS>
5564 <MODULE TTCN x x.ttcn>
5565 module x {
5566
5567 type port myPort message{inout charstring};
5568
5569 type component myComp{
5570 port myPort ports[3..5];
5571 }
5572
5573 function myFunc() runs on myComp{
5574 const integer i := -3;
5575 ports[i].start;
5576 }
5577
5578 }
5579 <END_MODULE>
5580 <RESULT IF_PASS COUNT 1>
5581 (?im)\berror\b.+?index.+?underflow
5582 <END_RESULT>
5583 <RESULT IF_PASS COUNT 1>
5584 (?is)\berror:
5585 <END_RESULT>
5586 <END_TC>
5587
5588 :exmp.
5589
5590 .*---------------------------------------------------------------------*
5591 :h3.Upper and lower boundaries
5592 .*---------------------------------------------------------------------*
5593
5594 This test case group covers the requirement SA-6/15.
5595
5596 Strategy: The lower boundary shall be smaller than the upper boundary in array definitions, string length restrictions and in
5597 definitions using ranges.
5598 All occurances shall be tested, where such a notation can be used.
5599
5600 Tested:
5601 :list.
5602 :li D='-'.charstring and integer value-ranges in definition part
5603 :li D='-'.mixed integer list and value-ranges in definition part
5604 :li D='-'.charstring and bitstring length restriction in definition part
5605 :li D='-'.integer array declaration in control part
5606 :li D='-'.timer array declaration in definition part
5607 :li D='-'.port array declaration in definition part
5608 :li D='-'.charstring array declaration in function
5609 :elist.
5610
5611 .*---------------------------------------------------------------------*
5612 :h4.Upper and lower boundaries - value-range (charstring in def.part)
5613 .*---------------------------------------------------------------------*
5614 :xmp tab=0.
5615
5616 <TC - Upper and lower boundaries - value-range (charstring in def.part)>
5617
5618 <COMPILE>
5619 <VERDICT_LEAF PASS>
5620 <MODULE TTCN x x.ttcn>
5621 module x {
5622
5623 type charstring f ( "z".."a");
5624 }
5625 <END_MODULE>
5626 <RESULT IF_PASS COUNT 1>
5627 (?im)error.+?lower.+?boundary.+?bigger.+?than.+?upper
5628 <END_RESULT>
5629 <RESULT IF_PASS COUNT 1>
5630 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5631 <END_RESULT>
5632 <RESULT IF_PASS COUNT 1>
5633 (?is)\berror:
5634 <END_RESULT>
5635 <END_TC>
5636
5637 :exmp.
5638
5639 .*---------------------------------------------------------------------*
5640 :h4.Upper and lower boundaries - value-range (integer in def.part)
5641 .*---------------------------------------------------------------------*
5642 :xmp tab=0.
5643
5644 <TC - Upper and lower boundaries - value-range (integer in def.part)>
5645
5646 <COMPILE>
5647 <VERDICT_LEAF PASS>
5648 <MODULE TTCN x x.ttcn>
5649 module x {
5650
5651 const integer i:= 500;
5652 type integer f (i..255);
5653 }
5654 <END_MODULE>
5655 <RESULT IF_PASS COUNT 1>
5656 (?im)error.+?lower.+?boundary.+?bigger.+?than.+?upper
5657 <END_RESULT>
5658 <RESULT IF_PASS COUNT 1>
5659 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5660 <END_RESULT>
5661 <RESULT IF_PASS COUNT 1>
5662 (?is)\berror:
5663 <END_RESULT>
5664 <END_TC>
5665
5666 :exmp.
5667
5668 .*---------------------------------------------------------------------*
5669 :h4.Upper and lower boundaries - mixed value-list and value-range (integer in def.part)
5670 .*---------------------------------------------------------------------*
5671 :xmp tab=0.
5672
5673 <TC - Upper and lower boundaries - mixed value-list and value-range (integer in def.part)>
5674
5675 <COMPILE>
5676 <VERDICT_LEAF PASS>
5677 <MODULE TTCN x x.ttcn>
5678 module x {
5679
5680 type integer f ( 1, 2, 300..255, 500);
5681 }
5682 <END_MODULE>
5683 <RESULT IF_PASS COUNT 1>
5684 (?im)error.+?lower.+?boundary.+?bigger.+?than.+?upper
5685 <END_RESULT>
5686 <RESULT IF_PASS COUNT 1>
5687 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5688 <END_RESULT>
5689 <RESULT IF_PASS COUNT 1>
5690 (?is)\berror:
5691 <END_RESULT>
5692 <END_TC>
5693
5694 :exmp.
5695
5696 .*---------------------------------------------------------------------*
5697 :h4.Upper and lower boundaries - length restriction (charstring in def.part)
5698 .*---------------------------------------------------------------------*
5699 :xmp tab=0.
5700
5701 <TC - Upper and lower boundaries - length restriction (charstring in def.part)>
5702
5703 <COMPILE>
5704 <VERDICT_LEAF PASS>
5705 <MODULE TTCN x x.ttcn>
5706 module x {
5707
5708 const integer i:= 5;
5709 type charstring f length(7..i);
5710 }
5711 <END_MODULE>
5712 <RESULT IF_PASS COUNT 1>
5713 (?im)error.+?upper.+?boundary.+?length.+?restriction.+?cannot.+?be.+?smaller.+?than.+?lower
5714 <END_RESULT>
5715 <RESULT IF_PASS COUNT 1>
5716 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5717 <END_RESULT>
5718 <RESULT IF_PASS COUNT 1>
5719 (?is)\berror:
5720 <END_RESULT>
5721 <END_TC>
5722
5723 :exmp.
5724
5725 .*---------------------------------------------------------------------*
5726 :h4.Upper and lower boundaries - length restriction (bitstring in def.part)
5727 .*---------------------------------------------------------------------*
5728 :xmp tab=0.
5729
5730 <TC - Upper and lower boundaries - length restriction (bitstring in def.part)>
5731
5732 <COMPILE>
5733 <VERDICT_LEAF PASS>
5734 <MODULE TTCN x x.ttcn>
5735 module x {
5736
5737 type bitstring f length(6..3);
5738 }
5739 <END_MODULE>
5740 <RESULT IF_PASS COUNT 1>
5741 (?im)error.+?upper.+?boundary.+?length.+?restriction.+?cannot.+?be.+?smaller.+?than.+?lower
5742 <END_RESULT>
5743 <RESULT IF_PASS COUNT 1>
5744 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5745 <END_RESULT>
5746 <RESULT IF_PASS COUNT 1>
5747 (?is)\berror:
5748 <END_RESULT>
5749 <END_TC>
5750
5751 :exmp.
5752
5753 .*---------------------------------------------------------------------*
5754 :h4.Upper and lower boundaries - array definition (integer in control part)
5755 .*---------------------------------------------------------------------*
5756 :xmp tab=0.
5757
5758 <TC - Upper and lower boundaries - array definition (integer in control part)>
5759
5760 <COMPILE>
5761 <VERDICT_LEAF PASS>
5762 <MODULE TTCN x x.ttcn>
5763 module x {
5764
5765 control{
5766 const integer i:= 7;
5767 var integer f [1..2][i..4][3..4];
5768 }
5769 }
5770 <END_MODULE>
5771 <RESULT IF_PASS COUNT 1>
5772 (?im)error.+?lower.+?bound.+?array.+?greater.+?upper.+?bound
5773 <END_RESULT>
5774 <RESULT IF_PASS COUNT 1>
5775 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5776 <END_RESULT>
5777 <RESULT IF_PASS COUNT 1>
5778 (?is)\berror:
5779 <END_RESULT>
5780 <END_TC>
5781
5782 :exmp.
5783
5784 .*---------------------------------------------------------------------*
5785 :h4.Upper and lower boundaries - array definition (charstring in function)
5786 .*---------------------------------------------------------------------*
5787 :xmp tab=0.
5788
5789 <TC - Upper and lower boundaries - array definition (charstring in function)>
5790
5791 <COMPILE>
5792 <VERDICT_LEAF PASS>
5793 <MODULE TTCN x x.ttcn>
5794 module x {
5795
5796 function myFunct(){
5797 var charstring f [9..2][1..5];
5798 }
5799 }
5800 <END_MODULE>
5801 <RESULT IF_PASS COUNT 1>
5802 (?im)error.+?lower.+?bound.+?array.+?greater.+?upper.+?bound
5803 <END_RESULT>
5804 <RESULT IF_PASS COUNT 1>
5805 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5806 <END_RESULT>
5807 <RESULT IF_PASS COUNT 1>
5808 (?is)\berror:
5809 <END_RESULT>
5810 <END_TC>
5811
5812 :exmp.
5813
5814 .*---------------------------------------------------------------------*
5815 :h4.Upper and lower boundaries - timer-array definition (in control part)
5816 .*---------------------------------------------------------------------*
5817 :xmp tab=0.
5818
5819 <TC - Upper and lower boundaries - timer-array definition (in control part)>
5820
5821 <COMPILE>
5822 <VERDICT_LEAF PASS>
5823 <MODULE TTCN x x.ttcn>
5824 module x {
5825
5826 control{
5827 const integer i:= 7;
5828 timer f [1..2][i..4][3..4];
5829 }
5830 }
5831 <END_MODULE>
5832 <RESULT IF_PASS COUNT 1>
5833 (?im)error.+?lower.+?bound.+?array.+?index.+?greater.+?than.+?upper
5834 <END_RESULT>
5835 <RESULT IF_PASS COUNT 1>
5836 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5837 <END_RESULT>
5838 <RESULT IF_PASS COUNT 1>
5839 (?is)\berror:
5840 <END_RESULT>
5841 <END_TC>
5842
5843 :exmp.
5844
5845 .*---------------------------------------------------------------------*
5846 :h4.Upper and lower boundaries - timer-array definition (in function)
5847 .*---------------------------------------------------------------------*
5848 :xmp tab=0.
5849
5850 <TC - Upper and lower boundaries - timer-array definition (in function)>
5851
5852 <COMPILE>
5853 <VERDICT_LEAF PASS>
5854 <MODULE TTCN x x.ttcn>
5855 module x {
5856
5857 function myFunct(){
5858 timer f [9..2][1..5];
5859 }
5860 }
5861 <END_MODULE>
5862 <RESULT IF_PASS COUNT 1>
5863 (?im)error.+?lower.+?bound.+?array.+?index.+?greater.+?than.+?upper
5864 <END_RESULT>
5865 <RESULT IF_PASS COUNT 1>
5866 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5867 <END_RESULT>
5868 <RESULT IF_PASS COUNT 1>
5869 (?is)\berror:
5870 <END_RESULT>
5871 <END_TC>
5872
5873 :exmp.
5874
5875 .*---------------------------------------------------------------------*
5876 :h4.Upper and lower boundaries - port-array definition (in def. part)
5877 .*---------------------------------------------------------------------*
5878 :xmp tab=0.
5879
5880 <TC - Upper and lower boundaries - port-array definition (in def. part)>
5881
5882 <COMPILE>
5883 <VERDICT_LEAF PASS>
5884 <MODULE TTCN x x.ttcn>
5885 module x {
5886
5887 type port myport message{
5888 inout charstring
5889 }
5890
5891 type component mycomp{
5892 port myport ports[6..5]
5893 }
5894 }
5895 <END_MODULE>
5896 <RESULT IF_PASS COUNT 1>
5897 (?im)error.+?lower.+?bound.+?array.+?index.+?greater.+?than.+?upper
5898 <END_RESULT>
5899 <RESULT IF_PASS COUNT 1>
5900 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5901 <END_RESULT>
5902 <RESULT IF_PASS COUNT 1>
5903 (?is)\berror:
5904 <END_RESULT>
5905 <END_TC>
5906
5907 :exmp.
5908
5909 .*---------------------------------------------------------------------*
5910 :h4.Upper and lower boundaries - port-array definition (in def. part) 2
5911 .*---------------------------------------------------------------------*
5912 :xmp tab=0.
5913
5914 <TC - Upper and lower boundaries - port-array definition (in def. part) 2>
5915
5916 <COMPILE>
5917 <VERDICT_LEAF PASS>
5918 <MODULE TTCN x x.ttcn>
5919 module x {
5920
5921 type port myport message{
5922 inout charstring
5923 }
5924
5925 const integer i := 6;
5926
5927 type component mycomp{
5928 port myport ports[i..5]
5929 }
5930 }
5931 <END_MODULE>
5932 <RESULT IF_PASS COUNT 1>
5933 (?im)error.+?lower.+?bound.+?array.+?index.+?greater.+?than.+?upper
5934 <END_RESULT>
5935 <RESULT IF_PASS COUNT 1>
5936 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5937 <END_RESULT>
5938 <RESULT IF_PASS COUNT 1>
5939 (?is)\berror:
5940 <END_RESULT>
5941 <END_TC>
5942
5943 .*---------------------------------------------------------------------*
5944 :h3.Overindexing
5945 .*---------------------------------------------------------------------*
5946
5947 This test case group covers the requirement SA-6/16.
5948
5949 Strategy: When referencing an element of an array, the index shall evaluate to a valid position within string and array.
5950 All occurances shall be tested, where such a notation can be used.
5951
5952 Tested:
5953 :nl.Overindexing
5954 :list.
5955 :li D='-'.bitstring in definition part
5956 :li D='-'.charstring in control part
5957 :li D='-'.hexstring in function
5958 :li D='-'.integer array in control part
5959 :li D='-'.timer array in control part and function
5960 :li D='-'.port array in definition part
5961 :li D='-'.charstring array in function
5962 :li D='-'.integer ranged array in control part
5963 :li D='-'.timer ranged array in control part and function
5964 :li D='-'.port ranged array in definition part
5965 :li D='-'.float arnged array in function
5966 :elist.
5967 :nl.Underindexing
5968 :list.
5969 :li D='-'.integer ranged array in control part
5970 :li D='-'.timer array in control part and function
5971 :li D='-'.timer ranged array in control part and function
5972 :li D='-'.port array in definition part
5973 :li D='-'.port ranged array in definition part
5974 :li D='-'.float ranged array in function
5975 :elist.
5976
5977 .*---------------------------------------------------------------------*
5978 :h4.Overindexing - string overindexing (bitstring in def.part)
5979 .*---------------------------------------------------------------------*
5980 :xmp tab=0.
5981
5982 <TC - Overindexing - string overindexing (bitstring in def.part)>
5983
5984 <COMPILE>
5985 <VERDICT_LEAF PASS>
5986 <MODULE TTCN x x.ttcn>
5987 module x {
5988
5989 type bitstring myBits length(3..5);
5990
5991 const myBits r:= '11111'B;
5992 const bitstring f:= r[5];
5993 }
5994 <END_MODULE>
5995 <RESULT IF_PASS COUNT 1>
5996 (?im)error.+?Index.+?overflow.+?accessing.+?string.+?element
5997 <END_RESULT>
5998 <RESULT IF_PASS COUNT 1>
5999 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6000 <END_RESULT>
6001 <RESULT IF_PASS COUNT 1>
6002 (?is)\berror:
6003 <END_RESULT>
6004 <END_TC>
6005
6006 :exmp.
6007
6008 .*---------------------------------------------------------------------*
6009 :h4.Overindexing - string overindexing (charstring in control part)
6010 .*---------------------------------------------------------------------*
6011 :xmp tab=0.
6012
6013 <TC - Overindexing - string overindexing (charstring in control part)>
6014
6015 <COMPILE>
6016 <VERDICT_LEAF PASS>
6017 <MODULE TTCN x x.ttcn>
6018 module x {
6019
6020 type charstring myChars length(3..13);
6021
6022 const myChars r:= "Ford Fairlane";
6023
6024 control{
6025 const charstring f:= r[15];
6026 }
6027 }
6028 <END_MODULE>
6029 <RESULT IF_PASS COUNT 1>
6030 (?im)error.+?Index.+?overflow.+?accessing.+?string.+?element
6031 <END_RESULT>
6032 <RESULT IF_PASS COUNT 1>
6033 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6034 <END_RESULT>
6035 <RESULT IF_PASS COUNT 1>
6036 (?is)\berror:
6037 <END_RESULT>
6038 <END_TC>
6039
6040 :exmp.
6041
6042 .*---------------------------------------------------------------------*
6043 :h4.Overindexing - string overindexing (hexstring in function)
6044 .*---------------------------------------------------------------------*
6045 :xmp tab=0.
6046
6047 <TC - Overindexing - string overindexing (hexstring in function)>
6048
6049 <COMPILE>
6050 <VERDICT_LEAF PASS>
6051 <MODULE TTCN x x.ttcn>
6052 module x {
6053
6054 type hexstring myHexes length(1..10);
6055
6056 const myHexes r:= 'AbbaBaba'H;
6057
6058 function myFunct(){
6059 const hexstring f:= r[9];
6060 }
6061 }
6062 <END_MODULE>
6063 <RESULT IF_PASS COUNT 1>
6064 (?im)error.+?Index.+?overflow.+?accessing.+?string.+?element
6065 <END_RESULT>
6066 <RESULT IF_PASS COUNT 1>
6067 (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6068 <END_RESULT>
6069 <RESULT IF_PASS COUNT 1>
6070 (?is)\berror:
6071 <END_RESULT>
6072 <END_TC>
6073
6074 :exmp.
6075
6076 .*---------------------------------------------------------------------*
6077 :h4.Overindexing - array overindexing (integer in control part)
6078 .*---------------------------------------------------------------------*
6079 :xmp tab=0.
6080
6081 <TC - Overindexing - array overindexing (integer in control part)>
6082
6083 <COMPILE>
6084 <VERDICT_LEAF PASS>
6085 <MODULE TTCN x x.ttcn>
6086 module x {
6087
6088 const integer i:= 10;
6089
6090 control{
6091 var integer myArr[2][4];
6092 myArr[1]:= { 1, 2, 3, 4 };
6093
6094 // TR694
6095 var integer f:= myArr[1][i];
6096 }
6097 }
6098 <END_MODULE>
6099 <RESULT IF_FAIL NEGATIVE>
6100 (?is)\berror:
6101 <END_RESULT>
6102 <END_TC>
6103
6104 :exmp.
6105
6106 .*---------------------------------------------------------------------*
6107 :h4.Overindexing - array overindexing (charstring in function)
6108 .*---------------------------------------------------------------------*
6109 :xmp tab=0.
6110
6111 <TC - Overindexing - array overindexing (charstring in function)>
6112
6113 <COMPILE>
6114 <VERDICT_LEAF PASS>
6115 <MODULE TTCN x x.ttcn>
6116 module x {
6117
6118 function myFunct(){
6119 var charstring myArr[2][4];
6120 myArr[1]:= { "EEE", "MUHAHA", "AIYYO", "GERAPPA"};
6121
6122 // TR694
6123 myArr[2][6]:= "ERIXON";
6124 }
6125 }
6126 <END_MODULE>
6127 <RESULT IF_FAIL NEGATIVE>
6128 (?is)\berror:
6129 <END_RESULT>
6130 <END_TC>
6131
6132 :exmp.
6133
6134 .*---------------------------------------------------------------------*
6135 :h4.Overindexing - timer-array overindexing (in control part)
6136 .*---------------------------------------------------------------------*
6137 :xmp tab=0.
6138
6139 <TC - Overindexing - timer-array overindexing (in control part)>
6140
6141 <COMPILE>
6142 <VERDICT_LEAF PASS>
6143 <MODULE TTCN x x.ttcn>
6144 module x {
6145
6146 control{
6147 timer myArr[2][4]:= {{ 1.0, 2.0, 3.0, 4.0 }, { 1.0, 2.0, 3.0, 4.0 }};
6148 timer f;
6149 const integer i:= 5;
6150
6151 // TR695
6152 f.start( myArr[1][i].read);
6153 }
6154 }
6155 <END_MODULE>
6156 <RESULT IF_PASS COUNT 1>
6157 (?im)\berror\b.+?index.+?overflow
6158 <END_RESULT>
6159 <RESULT IF_PASS COUNT 1>
6160 (?is)\berror:
6161 <END_RESULT>
6162 <END_TC>
6163
6164 :exmp.
6165
6166 .*---------------------------------------------------------------------*
6167 :h4.Overindexing - timer-array overindexing (in function)
6168 .*---------------------------------------------------------------------*
6169 :xmp tab=0.
6170
6171 <TC - Overindexing - timer-array overindexing (in function)>
6172
6173 <COMPILE>
6174 <VERDICT_LEAF PASS>
6175 <MODULE TTCN x x.ttcn>
6176 module x {
6177
6178 function myFunct(){
6179 timer myArr[2][4]:= {{ 1.0, 2.0, 3.0, 4.0 }, { 1.0, 2.0, 3.0, 4.0 }};
6180 timer f;
6181 const integer i:= 5;
6182
6183 // TR695
6184 f.start( myArr[1][i].read);
6185 }
6186 }
6187 <END_MODULE>
6188 <RESULT IF_PASS COUNT 1>
6189 (?im)\berror\b.+?index.+?overflow
6190 <END_RESULT>
6191 <RESULT IF_PASS COUNT 1>
6192 (?is)\berror:
6193 <END_RESULT>
6194 <END_TC>
6195
6196 :exmp.
6197
6198 .*---------------------------------------------------------------------*
6199 :h4.Overindexing - port-array overindexing (in function)
6200 .*---------------------------------------------------------------------*
6201 :xmp tab=0.
6202
6203 <TC - Overindexing - port-array overindexing (in function>
6204
6205 <COMPILE>
6206 <VERDICT_LEAF PASS>
6207 <MODULE TTCN x x.ttcn>
6208 module x {
6209
6210 type port myport message{
6211 inout charstring
6212 }
6213
6214 type component mycomp{
6215 port myport ports[5]
6216 }
6217
6218 function myFunc() runs on mycomp{
6219 ports[5].start;
6220 }
6221 }
6222 <END_MODULE>
6223 <RESULT IF_PASS COUNT 1>
6224 (?im)\berror\b.+?index.+?overflow
6225 <END_RESULT>
6226 <RESULT IF_PASS COUNT 1>
6227 (?is)\berror:
6228 <END_RESULT>
6229 <END_TC>
6230
6231 :exmp.
6232
6233 .*---------------------------------------------------------------------*
6234 :h4.Overindexing - ranged-array overindexing (integer in control part)
6235 .*---------------------------------------------------------------------*
6236 :xmp tab=0.
6237
6238 <TC - Overindexing - ranged-array overindexing (integer in control part)>
6239
6240 <COMPILE>
6241 <VERDICT_LEAF PASS>
6242 <MODULE TTCN x x.ttcn>
6243 module x {
6244
6245 control{
6246 var integer myArr[2..4][5..8];
6247
6248 // TR694
6249 var integer f:= myArr[6][9];
6250 }
6251 }
6252 <END_MODULE>
6253 <RESULT IF_FAIL NEGATIVE>
6254 (?is)\berror:
6255 <END_RESULT>
6256 <END_TC>
6257
6258 :exmp.
6259
6260 .*---------------------------------------------------------------------*
6261 :h4.Overindexing - ranged-array overindexing (float in function)
6262 .*---------------------------------------------------------------------*
6263 :xmp tab=0.
6264
6265 <TC - Overindexing - ranged-array overindexing (float in function)>
6266
6267 <COMPILE>
6268 <VERDICT_LEAF PASS>
6269 <MODULE TTCN x x.ttcn>
6270 module x {
6271
6272 const integer i:= 6;
6273 const integer j:= 10;
6274
6275 function myFunct(){
6276 var float myArr[2..4][5..8];
6277
6278 // TR694
6279 myArr[i][j]:= 3.14;
6280 }
6281 }
6282 <END_MODULE>
6283 <RESULT IF_FAIL NEGATIVE>
6284 (?is)\berror:
6285 <END_RESULT>
6286 <END_TC>
6287
6288 :exmp.
6289
6290 .*---------------------------------------------------------------------*
6291 :h4.Overindexing - ranged timer-array overindexing (in control part)
6292 .*---------------------------------------------------------------------*
6293 :xmp tab=0.
6294
6295 <TC - Overindexing - ranged timer-array overindexing (in control part)>
6296
6297 <COMPILE>
6298 <VERDICT_LEAF PASS>
6299 <MODULE TTCN x x.ttcn>
6300 module x {
6301
6302 control{
6303 timer myArr[2..3][4..7]:= {{ 1.0, 2.0, 3.0, 4.0 }, { 1.0, 2.0, 3.0, 4.0 }};
6304 timer f;
6305 const integer i:= 9;
6306
6307 // TR695
6308 f.start( myArr[2][i].read);
6309 }
6310 }
6311 <END_MODULE>
6312 <RESULT IF_PASS COUNT 1>
6313 (?im)\berror\b.+?index.+?overflow
6314 <END_RESULT>
6315 <RESULT IF_PASS COUNT 1>
6316 (?is)\berror:
6317 <END_RESULT>
6318 <END_TC>
6319
6320 :exmp.
6321
6322 .*---------------------------------------------------------------------*
6323 :h4.Overindexing - ranged timer-array overindexing (in function)
6324 .*---------------------------------------------------------------------*
6325 :xmp tab=0.
6326
6327 <TC - Overindexing - ranged timer-array overindexing (in function)>
6328
6329 <COMPILE>
6330 <VERDICT_LEAF PASS>
6331 <MODULE TTCN x x.ttcn>
6332 module x {
6333
6334 function myFunct(){
6335 timer myArr[2..3][4..7]:= {{ 1.0, 2.0, 3.0, 4.0 }, { 1.0, 2.0, 3.0, 4.0 }};
6336 timer f;
6337 const integer i:= 9;
6338
6339 // TR695
6340 f.start( myArr[2][i].read);
6341 }
6342 }
6343 <END_MODULE>
6344 <RESULT IF_PASS COUNT 1>
6345 (?im)\berror\b.+?index.+?overflow
6346 <END_RESULT>
6347 <RESULT IF_PASS COUNT 1>
6348 (?is)\berror:
6349 <END_RESULT>
6350 <END_TC>
6351
6352 :exmp.
6353
6354 .*---------------------------------------------------------------------*
6355 :h4.Overindexing - ranged port-array overindexing (in function)
6356 .*---------------------------------------------------------------------*
6357 :xmp tab=0.
6358
6359 <TC - Overindexing - ranged port-array overindexing (in function>
6360
6361 <COMPILE>
6362 <VERDICT_LEAF PASS>
6363 <MODULE TTCN x x.ttcn>
6364 module x {
6365
6366 type port myport message{
6367 inout charstring
6368 }
6369
6370 type component mycomp{
6371 port myport ports[5..6]
6372 }
6373
6374 function myFunc() runs on mycomp{
6375 ports[7].start;
6376 }
6377 }
6378 <END_MODULE>
6379 <RESULT IF_PASS COUNT 1>
6380 (?im)\berror\b.+?index.+?overflow
6381 <END_RESULT>
6382 <RESULT IF_PASS COUNT 1>
6383 (?is)\berror:
6384 <END_RESULT>
6385 <END_TC>
6386
6387 :exmp.
6388
6389 .*---------------------------------------------------------------------*
6390 :h4.Overindexing - ranged-array underindexing (integer in control part)
6391 .*---------------------------------------------------------------------*
6392 :xmp tab=0.
6393
6394 <TC - Overindexing - ranged-array underindexing (integer in control part)>
6395
6396 <COMPILE>
6397 <VERDICT_LEAF PASS>
6398 <MODULE TTCN x x.ttcn>
6399 module x {
6400
6401 control{
6402 var integer myArr[2..4][5..8];
6403
6404 // TR694
6405 var integer f:= myArr[1][3];
6406 }
6407 }
6408 <END_MODULE>
6409 <RESULT IF_FAIL NEGATIVE>
6410 (?is)\berror:
6411 <END_RESULT>
6412 <END_TC>
6413
6414 :exmp.
6415
6416 .*---------------------------------------------------------------------*
6417 :h4.Overindexing - ranged-array underindexing (integer in function)
6418 .*---------------------------------------------------------------------*
6419 :xmp tab=0.
6420
6421 <TC - Overindexing - ranged-array underindexing (integer in function)>
6422
6423 <COMPILE>
6424 <VERDICT_LEAF PASS>
6425 <MODULE TTCN x x.ttcn>
6426 module x {
6427
6428 type integer myint[5..6];
6429
6430 function myFunc(){
6431 var myint f := {1,2};
6432 f[4] := 1;
6433 }
6434 }
6435 <END_MODULE>
6436 <RESULT IF_PASS COUNT 1>
6437 (?im)\berror\b.+?index.+?underflow
6438 <END_RESULT>
6439 <RESULT IF_PASS COUNT 1>
6440 (?is)\berror:
6441 <END_RESULT>
6442 <END_TC>
6443
6444 :exmp.
6445
6446
6447 .*---------------------------------------------------------------------*
6448 :h4.Overindexing - ranged-array underindexing (float in function)
6449 .*---------------------------------------------------------------------*
6450 :xmp tab=0.
6451
6452 <TC - Overindexing - ranged-array underindexing (float in function)>
6453
6454 <COMPILE>
6455 <VERDICT_LEAF PASS>
6456 <MODULE TTCN x x.ttcn>
6457 module x {
6458
6459 const integer i:= 0;
6460 const integer j:= 4;
6461
6462 function myFunct(){
6463 var float myArr[2..4][5..8];
6464
6465 // TR694
6466 myArr[i][j]:= 3.14;
6467 }
6468 }
6469 <END_MODULE>
6470 <RESULT IF_FAIL NEGATIVE>
6471 (?is)\berror:
6472 <END_RESULT>
6473 <END_TC>
6474
6475 :exmp.
6476
6477 .*---------------------------------------------------------------------*
6478 :h4.Overindexing - ranged timer-array underindexing (in control part)
6479 .*---------------------------------------------------------------------*
6480 :xmp tab=0.
6481
6482 <TC - Overindexing - ranged timer-array underindexing (in control part)>
6483
6484 <COMPILE>
6485 <VERDICT_LEAF PASS>
6486 <MODULE TTCN x x.ttcn>
6487 module x {
6488
6489 control{
6490 timer myArr[2..3][4..7]:= {{ 1.0, 2.0, 3.0, 4.0 }, { 1.0, 2.0, 3.0, 4.0 }};
6491 timer f;
6492 const integer i:= 1;
6493
6494 // TR695
6495 f.start( myArr[i][6].read);
6496 }
6497 }
6498 <END_MODULE>
6499 <RESULT IF_PASS COUNT 1>
6500 (?im)\berror\b.+?index.+?underflow
6501 <END_RESULT>
6502 <RESULT IF_PASS COUNT 1>
6503 (?is)\berror:
6504 <END_RESULT>
6505 <END_TC>
6506
6507 :exmp.
6508
6509 .*---------------------------------------------------------------------*
6510 :h4.Overindexing - ranged timer-array underindexing (in function)
6511 .*---------------------------------------------------------------------*
6512 :xmp tab=0.
6513
6514 <TC - Overindexing - ranged timer-array underindexing (in function)>
6515
6516 <COMPILE>
6517 <VERDICT_LEAF PASS>
6518 <MODULE TTCN x x.ttcn>
6519 module x {
6520
6521 function myFunct(){
6522 timer myArr[2..3][4..7]:= {{ 1.0, 2.0, 3.0, 4.0 }, { 1.0, 2.0, 3.0, 4.0 }};
6523 timer f;
6524 const integer i:= 2;
6525
6526 // TR695
6527 f.start( myArr[2][i].read);
6528 }
6529 }
6530 <END_MODULE>
6531 <RESULT IF_PASS COUNT 1>
6532 (?im)\berror\b.+?index.+?underflow
6533 <END_RESULT>
6534 <RESULT IF_PASS COUNT 1>
6535 (?is)\berror:
6536 <END_RESULT>
6537 <END_TC>
6538
6539 :exmp.
6540
6541 .*---------------------------------------------------------------------*
6542 :h4.Overindexing - ranged port-array underindexing (in function)
6543 .*---------------------------------------------------------------------*
6544 :xmp tab=0.
6545
6546 <TC - Overindexing - ranged port-array underindexing (in function)>
6547
6548 <COMPILE>
6549 <VERDICT_LEAF PASS>
6550 <MODULE TTCN x x.ttcn>
6551 module x {
6552
6553 type port myport message{
6554 inout charstring
6555 }
6556
6557 type component mycomp{
6558 port myport ports[5..6]
6559 }
6560
6561 function myFunc() runs on mycomp{
6562 ports[4].start;
6563 }
6564 }
6565 <END_MODULE>
6566 <RESULT IF_PASS COUNT 1>
6567 (?im)\berror\b.+?index.+?underflow
6568 <END_RESULT>
6569 <RESULT IF_PASS COUNT 1>
6570 (?is)\berror:
6571 <END_RESULT>
6572 <END_TC>
6573
6574 :exmp.
6575
6576 .*---------------------------------------------------------------------*
6577 :h3.Negative timer duration
6578 .*---------------------------------------------------------------------*
6579
6580 This test case group covers the requirement SA-6/17.
6581
6582 Strategy: A timer declaration may have an optional default duration value assigned to it. The timer shall be started with this
6583 value if no other value is specified. This value shall be positive, but we can use constants too. Same is true for timer
6584 arrays and the oprional timer of the execute operation.
6585 All occurances shall be tested, where such a notation can be used.
6586
6587 Tested:
6588 :list.
6589 :li D='-'.timer default values in control part and function
6590 :li D='-'.timer starting values in control part and function
6591 :li D='-'.timer-array default values in control part and function
6592 :li D='-'.timer-array starting values in control part and function
6593 :li D='-'.execution timer
6594 :elist.
6595
6596 .*---------------------------------------------------------------------*
6597 :h4.Negative timer duration - default (in control part)
6598 .*---------------------------------------------------------------------*
6599 :xmp tab=0.
6600
6601 <TC - Negative timer duration - default (in control part)>
6602
6603 <COMPILE>
6604 <VERDICT_LEAF PASS>
6605 <MODULE TTCN x x.ttcn>
6606 module x {
6607
6608 control{
6609 timer T:= -12.0;
6610 }
6611 }
6612 <END_MODULE>
6613 <RESULT IF_PASS COUNT 1>
6614 (?im)error.+?non-negative.+?float.+?value.+?expected
6615 <END_RESULT>
6616 <RESULT IF_PASS COUNT 1>
6617 (?is)\berror:
6618 <END_RESULT>
6619 <END_TC>
6620
6621 :exmp.
6622
6623 .*---------------------------------------------------------------------*
6624 :h4.Negative timer duration - default (in function)
6625 .*---------------------------------------------------------------------*
6626 :xmp tab=0.
6627
6628 <TC - Negative timer duration - default (in function)>
6629
6630 <COMPILE>
6631 <VERDICT_LEAF PASS>
6632 <MODULE TTCN x x.ttcn>
6633 module x {
6634
6635 const float f:= -2.22;
6636
6637 function myFunct(){
6638 timer T:= f;
6639 }
6640 }
6641 <END_MODULE>
6642 <RESULT IF_PASS COUNT 1>
6643 (?im)error.+?non-negative.+?float.+?value.+?expected
6644 <END_RESULT>
6645 <RESULT IF_PASS COUNT 1>
6646 (?is)\berror:
6647 <END_RESULT>
6648 <END_TC>
6649
6650 :exmp.
6651
6652 .*---------------------------------------------------------------------*
6653 :h4.Negative timer duration - array default (in control part)
6654 .*---------------------------------------------------------------------*
6655 :xmp tab=0.
6656
6657 <TC - Negative timer duration - array default (in control part)>
6658
6659 <COMPILE>
6660 <VERDICT_LEAF PASS>
6661 <MODULE TTCN x x.ttcn>
6662 module x {
6663
6664 control{
6665 timer T[5]:= { 1.0, 8.9, -3.14, 1.1, 1.5 };
6666 }
6667 }
6668 <END_MODULE>
6669 <RESULT IF_PASS COUNT 1>
6670 (?im)error.+?non-negative.+?float.+?value.+?expected
6671 <END_RESULT>
6672 <RESULT IF_PASS COUNT 1>
6673 (?is)\berror:
6674 <END_RESULT>
6675 <END_TC>
6676
6677 :exmp.
6678
6679 .*---------------------------------------------------------------------*
6680 :h4.Negative timer duration - array default (in function)
6681 .*---------------------------------------------------------------------*
6682 :xmp tab=0.
6683
6684 <TC - Negative timer duration - array default (in function)>
6685
6686 <COMPILE>
6687 <VERDICT_LEAF PASS>
6688 <MODULE TTCN x x.ttcn>
6689 module x {
6690
6691 const float f:= -2.22;
6692
6693 function myFunct(){
6694 timer T[5]:= { 1.0, f, 3.14, -, 1.5 };
6695 }
6696 }
6697 <END_MODULE>
6698 <RESULT IF_PASS COUNT 1>
6699 (?im)error.+?non-negative.+?float.+?value.+?expected
6700 <END_RESULT>
6701 <RESULT IF_PASS COUNT 1>
6702 (?is)\berror:
6703 <END_RESULT>
6704 <END_TC>
6705
6706 :exmp.
6707
6708 .*---------------------------------------------------------------------*
6709 :h4.Negative timer duration - starting value (in control part)
6710 .*---------------------------------------------------------------------*
6711 :xmp tab=0.
6712
6713 <TC - Negative timer duration - starting value (in control part)>
6714
6715 <COMPILE>
6716 <VERDICT_LEAF PASS>
6717 <MODULE TTCN x x.ttcn>
6718 module x {
6719
6720 control{
6721 timer T:= 12.0;
6722
6723 T.start( -5.9 );
6724 }
6725 }
6726 <END_MODULE>
6727 <RESULT IF_PASS COUNT 1>
6728 (?im)error.+?timer.+?duration.+?negative
6729 <END_RESULT>
6730 <RESULT IF_PASS COUNT 1>
6731 (?is)\berror:
6732 <END_RESULT>
6733 <END_TC>
6734
6735 :exmp.
6736
6737 .*---------------------------------------------------------------------*
6738 :h4.Negative timer duration - starting value (in function)
6739 .*---------------------------------------------------------------------*
6740 :xmp tab=0.
6741
6742 <TC - Negative timer duration - starting value (in function)>
6743
6744 <COMPILE>
6745 <VERDICT_LEAF PASS>
6746 <MODULE TTCN x x.ttcn>
6747 module x {
6748
6749 const float f:= -66.3;
6750
6751 function myFunct(){
6752 timer T:= 1234.56;
6753
6754 T.start( f );
6755 }
6756 }
6757 <END_MODULE>
6758 <RESULT IF_PASS COUNT 1>
6759 (?im)error.+?timer.+?duration.+?negative
6760 <END_RESULT>
6761 <RESULT IF_PASS COUNT 1>
6762 (?is)\berror:
6763 <END_RESULT>
6764 <END_TC>
6765
6766 :exmp.
6767
6768 .*---------------------------------------------------------------------*
6769 :h4.Negative timer duration - array starting value (in control part)
6770 .*---------------------------------------------------------------------*
6771 :xmp tab=0.
6772
6773 <TC - Negative timer duration - array starting value (in control part)>
6774
6775 <COMPILE>
6776 <VERDICT_LEAF PASS>
6777 <MODULE TTCN x x.ttcn>
6778 module x {
6779
6780 control{
6781 timer T[5]:= { 1.0, 8.9, 3.14, 1.1, 1.5 };
6782
6783 T[1].start( - 125.0 );
6784 }
6785 }
6786 <END_MODULE>
6787 <RESULT IF_PASS COUNT 1>
6788 (?im)error.+?timer.+?duration.+?negative
6789 <END_RESULT>
6790 <RESULT IF_PASS COUNT 1>
6791 (?is)\berror:
6792 <END_RESULT>
6793 <END_TC>
6794
6795 :exmp.
6796
6797 .*---------------------------------------------------------------------*
6798 :h4.Negative timer duration - array starting value (in function)
6799 .*---------------------------------------------------------------------*
6800 :xmp tab=0.
6801
6802 <TC - Negative timer duration - array starting value (in function)>
6803
6804 <COMPILE>
6805 <VERDICT_LEAF PASS>
6806 <MODULE TTCN x x.ttcn>
6807 module x {
6808
6809 const float f:= -18.07;
6810
6811 function myFunct(){
6812 timer T[5]:= { 3.3, 3.4, 3.14, 4.1, 2.3 };
6813
6814 T[1].start( f );
6815 }
6816 }
6817 <END_MODULE>
6818 <RESULT IF_PASS COUNT 1>
6819 (?im)error.+?timer.+?duration.+?negative
6820 <END_RESULT>
6821 <RESULT IF_PASS COUNT 1>
6822 (?is)\berror:
6823 <END_RESULT>
6824 <END_TC>
6825
6826 :exmp.
6827
6828 .*---------------------------------------------------------------------*
6829 :h4.Negative timer duration - execution timer
6830 .*---------------------------------------------------------------------*
6831 :xmp tab=0.
6832
6833 <TC - Negative timer duration - execution timer>
6834
6835 <COMPILE>
6836 <VERDICT_LEAF PASS>
6837 <MODULE TTCN x x.ttcn>
6838 module x {
6839
6840 type component myComponent{
6841 const integer i:= 1;
6842 }
6843
6844 function myFunct(){
6845
6846 timer T1:= 20.0;
6847 T1.start;
6848 }
6849
6850 testcase myTestCase() runs on myComponent{
6851
6852 myFunct();
6853 }
6854
6855 control{
6856
6857 execute( myTestCase(), -5.3 );
6858 }
6859
6860 }
6861 <END_MODULE>
6862 <RESULT IF_PASS COUNT 1>
6863 (?im)error.+?testcase.+?guard.+?timer.+?negative.+?duration
6864 <END_RESULT>
6865 <RESULT IF_PASS COUNT 1>
6866 (?is)\berror:
6867 <END_RESULT>
6868 <END_TC>
6869
6870 :exmp.
6871
6872 .*---------------------------------------------------------------------*
6873 :h3.Default module parameters
6874 .*---------------------------------------------------------------------*
6875
6876 This test case group covers the requirement SA-6/18.
6877
6878 Strategy: Default values of module parameters shall be constant expression only.
6879 All occurances shall be tested, where such a notation can be used.
6880
6881 Tested:
6882 :list.
6883 :li D='-'.module parameters with inner function
6884 :li D='-'.module parameters with hand-made function
6885 :elist.
6886
6887 .*---------------------------------------------------------------------*
6888 :h4.Default module parameters - inner function
6889 .*---------------------------------------------------------------------*
6890 :xmp tab=0.
6891
6892 <TC - Default module parameters - inner function>
6893
6894 <COMPILE>
6895 <VERDICT_LEAF PASS>
6896 <MODULE TTCN x x.ttcn>
6897 module x {
6898
6899 modulepar { integer i:= float2int( rnd()); charstring ch:= "aiyyo" };
6900 }
6901 <END_MODULE>
6902 <RESULT IF_PASS COUNT 1>
6903 (?im)error.+?evaluatable.+?constant.+?value.+?expected.+?instead.+?of.+?operation
6904 <END_RESULT>
6905 <RESULT IF_PASS COUNT 1>
6906 (?is)\berror:
6907 <END_RESULT>
6908 <END_TC>
6909
6910 :exmp.
6911
6912 .*---------------------------------------------------------------------*
6913 :h4.Default module parameters - hand-made function
6914 .*---------------------------------------------------------------------*
6915 :xmp tab=0.
6916
6917 <TC - Default module parameters - hand-made function>
6918
6919 <COMPILE>
6920 <VERDICT_LEAF PASS>
6921 <MODULE TTCN x x.ttcn>
6922 module x {
6923
6924 function myFunct() return charstring{
6925 return "RETURNED";
6926 }
6927
6928 modulepar { integer i:= 3; charstring ch:= "aiyyo" & myFunct() };
6929
6930 }
6931 <END_MODULE>
6932 <RESULT IF_PASS COUNT 1>
6933 (?im)error.+?Reference.+?constant.+?value.+?expected
6934 <END_RESULT>
6935 <RESULT IF_PASS COUNT 1>
6936 (?is)\berror:
6937 <END_RESULT>
6938 <END_TC>
6939
6940 :exmp.
6941
6942 .*---------------------------------------------------------------------*
6943 :h2.Variable references
6944 .*---------------------------------------------------------------------*
6945
6946 Rule: each variable reference shall conform to the context-specific rules
6947
6948 .*---------------------------------------------------------------------*
6949 :h3.No value shall be assigned to constant elements
6950 .*---------------------------------------------------------------------*
6951
6952 This test case group covers the requirement SA-6/19.
6953
6954 Strategy: can't change the value of constants, external constants and module parameters.
6955 All occurances shall be tested, where such a notation can be used.
6956
6957 Tested:
6958 :list.
6959 :li D='-'.constants, external constants and module parameters in control part and function with ":="
6960 :li D='-'.constants, external constants and module parameters in function with "-> value"
6961 :elist.
6962
6963 .*---------------------------------------------------------------------*
6964 :h4.No value shall be assigned to constant elements - const in control part (:=)
6965 .*---------------------------------------------------------------------*
6966 :xmp tab=0.
6967
6968 <TC - No value shall be assigned to constant elements - const in control part (:=)>
6969
6970 <COMPILE>
6971 <VERDICT_LEAF PASS>
6972 <MODULE TTCN x x.ttcn>
6973 module x {
6974
6975 const integer c:= 1;
6976
6977 control{
6978
6979 c:=2;
6980 }
6981 }
6982 <END_MODULE>
6983 <RESULT IF_PASS COUNT 1>
6984 (?im)error.+?Reference.+?variable.+?template.+?expected
6985 <END_RESULT>
6986 <RESULT IF_PASS COUNT 1>
6987 (?is)\berror:
6988 <END_RESULT>
6989 <END_TC>
6990
6991 :exmp.
6992
6993 .*---------------------------------------------------------------------*
6994 :h4.No value shall be assigned to constant elements - const in function (:=)
6995 .*---------------------------------------------------------------------*
6996 :xmp tab=0.
6997
6998 <TC - No value shall be assigned to constant elements - const in function (:=)>
6999
7000 <COMPILE>
7001 <VERDICT_LEAF PASS>
7002 <MODULE TTCN x x.ttcn>
7003 module x {
7004
7005 const integer c:= 1;
7006
7007 function myFunct(){
7008
7009 c:=2;
7010 }
7011 }
7012 <END_MODULE>
7013 <RESULT IF_PASS COUNT 1>
7014 (?im)error.+?Reference.+?variable.+?template.+?expected
7015 <END_RESULT>
7016 <RESULT IF_PASS COUNT 1>
7017 (?is)\berror:
7018 <END_RESULT>
7019 <END_TC>
7020
7021 :exmp.
7022
7023 .*---------------------------------------------------------------------*
7024 :h4.No value shall be assigned to constant elements - const in function ( -> value)
7025 .*---------------------------------------------------------------------*
7026 :xmp tab=0.
7027
7028 <TC - No value shall be assigned to constant elements - const in function ( -> value)>
7029
7030 <COMPILE>
7031 <VERDICT_LEAF PASS>
7032 <MODULE TTCN x x.ttcn>
7033 module x {
7034
7035 const integer c:= 2;
7036
7037 type port portT message {
7038 in integer
7039 } with {extension "internal"}
7040
7041 type component comp {
7042 port portT myPort;
7043 }
7044
7045 function myFunct() runs on comp {
7046 myPort.receive( ?) -> value c;
7047 }
7048
7049 }
7050 <END_MODULE>
7051 <RESULT IF_PASS COUNT 1>
7052 (?im)error.+?Reference.+?variable.+?value.+?parameter.+?expected
7053 <END_RESULT>
7054 <RESULT IF_PASS COUNT 1>
7055 (?is)\berror:
7056 <END_RESULT>
7057 <END_TC>
7058
7059 :exmp.
7060
7061 .*---------------------------------------------------------------------*
7062 :h4.No value shall be assigned to constant elements - external const in control part (:=)
7063 .*---------------------------------------------------------------------*
7064 :xmp tab=0.
7065
7066 <TC - No value shall be assigned to constant elements - external const in control part (:=)>
7067
7068 <COMPILE>
7069 <VERDICT_LEAF PASS>
7070 <MODULE TTCN x x.ttcn>
7071 module x {
7072
7073 external const integer c;
7074
7075 control{
7076
7077 c:=2;
7078 }
7079 }
7080 <END_MODULE>
7081 <RESULT IF_PASS COUNT 1>
7082 (?im)error.+?Reference.+?variable.+?template.+?expected
7083 <END_RESULT>
7084 <RESULT IF_PASS COUNT 1>
7085 (?is)\berror:
7086 <END_RESULT>
7087 <END_TC>
7088
7089 :exmp.
7090
7091 .*---------------------------------------------------------------------*
7092 :h4.No value shall be assigned to constant elements - external const in function (:=)
7093 .*---------------------------------------------------------------------*
7094 :xmp tab=0.
7095
7096 <TC - No value shall be assigned to constant elements - external const in function (:=)>
7097
7098 <COMPILE>
7099 <VERDICT_LEAF PASS>
7100 <MODULE TTCN x x.ttcn>
7101 module x {
7102
7103 external const integer c;
7104
7105 function myFunct(){
7106
7107 c:=2;
7108 }
7109 }
7110 <END_MODULE>
7111 <RESULT IF_PASS COUNT 1>
7112 (?im)error.+?Reference.+?variable.+?template.+?expected
7113 <END_RESULT>
7114 <RESULT IF_PASS COUNT 1>
7115 (?is)\berror:
7116 <END_RESULT>
7117 <END_TC>
7118
7119 :exmp.
7120
7121 .*---------------------------------------------------------------------*
7122 :h4.No value shall be assigned to constant elements - external const in function ( -> value)
7123 .*---------------------------------------------------------------------*
7124 :xmp tab=0.
7125
7126 <TC - No value shall be assigned to constant elements - external const in function ( -> value)>
7127
7128 <COMPILE>
7129 <VERDICT_LEAF PASS>
7130 <MODULE TTCN x x.ttcn>
7131 module x {
7132
7133 external const integer c;
7134
7135 type port portT message {
7136 in integer
7137 } with {extension "internal"}
7138
7139 type component comp {
7140 port portT myPort;
7141 }
7142
7143 function myFunct() runs on comp {
7144 myPort.receive( ?) -> value c;
7145 }
7146
7147 }
7148 <END_MODULE>
7149 <RESULT IF_PASS COUNT 1>
7150 (?im)error.+?Reference.+?variable.+?value.+?parameter.+?expected
7151 <END_RESULT>
7152 <RESULT IF_PASS COUNT 1>
7153 (?is)\berror:
7154 <END_RESULT>
7155 <END_TC>
7156
7157 :exmp.
7158
7159 .*---------------------------------------------------------------------*
7160 :h4.No value shall be assigned to constant elements - module parameter in control part (:=)
7161 .*---------------------------------------------------------------------*
7162 :xmp tab=0.
7163
7164 <TC - No value shall be assigned to constant elements - module parameter in control part (:=)>
7165
7166 <COMPILE>
7167 <VERDICT_LEAF PASS>
7168 <MODULE TTCN x x.ttcn>
7169 module x {
7170
7171 modulepar{
7172 integer c
7173 }
7174
7175 control{
7176 c:= 3;
7177 }
7178 }
7179 <END_MODULE>
7180 <RESULT IF_PASS COUNT 1>
7181 (?im)error.+?Reference.+?variable.+?template.+?expected
7182 <END_RESULT>
7183 <RESULT IF_PASS COUNT 1>
7184 (?is)\berror:
7185 <END_RESULT>
7186 <END_TC>
7187
7188 :exmp.
7189
7190 .*---------------------------------------------------------------------*
7191 :h4.No value shall be assigned to constant elements - module parameter in function (:=)
7192 .*---------------------------------------------------------------------*
7193 :xmp tab=0.
7194
7195 <TC - No value shall be assigned to constant elements - module parameter in function (:=)>
7196
7197 <COMPILE>
7198 <VERDICT_LEAF PASS>
7199 <MODULE TTCN x x.ttcn>
7200 module x {
7201
7202 modulepar{
7203 integer c
7204 }
7205
7206 function myFunct(){
7207 c:= 3;
7208 }
7209 }
7210 <END_MODULE>
7211 <RESULT IF_PASS COUNT 1>
7212 (?im)error.+?Reference.+?variable.+?template.+?expected
7213 <END_RESULT>
7214 <RESULT IF_PASS COUNT 1>
7215 (?is)\berror:
7216 <END_RESULT>
7217 <END_TC>
7218
7219 :exmp.
7220
7221 .*---------------------------------------------------------------------*
7222 :h4.No value shall be assigned to constant elements - module parameter in function (-> value)
7223 .*---------------------------------------------------------------------*
7224 :xmp tab=0.
7225
7226 <TC - No value shall be assigned to constant elements - module parameter in function (-> value)>
7227
7228 <COMPILE>
7229 <VERDICT_LEAF PASS>
7230 <MODULE TTCN x x.ttcn>
7231 module x {
7232
7233 modulepar{
7234 integer c
7235 }
7236
7237 type port portT message {
7238 in integer
7239 } with {extension "internal"}
7240
7241 type component comp {
7242 port portT myPort;
7243 }
7244
7245 function myFunct() runs on comp {
7246 myPort.receive( ?) -> value c;
7247 }
7248
7249 }
7250 <END_MODULE>
7251 <RESULT IF_PASS COUNT 1>
7252 (?im)error.+?Reference.+?variable.+?value.+?parameter.+?expected
7253 <END_RESULT>
7254 <RESULT IF_PASS COUNT 1>
7255 (?is)\berror:
7256 <END_RESULT>
7257 <END_TC>
7258
7259 :exmp.
7260
7261 .*---------------------------------------------------------------------*
7262 :h2.Allowed matching mechanisms
7263 .*---------------------------------------------------------------------*
7264 .*---------------------------------------------------------------------*
7265 :h3.Allowed matching mechanisms
7266 .*---------------------------------------------------------------------*
7267
7268 This test case group covers the requirement SA-6/20.
7269
7270 Strategy: SA shall detect if a template of a type uses not allowed matching mechanism.(Table 6, side 68)
7271 Either can be used the following operations: create (99), mtc (101),
7272 system (101), self (101), running (102), getverdict (123)
7273
7274 All occurances shall be tested, where such a notation can be used.
7275
7276 Tested: range, superset, subset, length-restriction, ifpresent mechanisms in definition part, control part and function for
7277 templates and range, superset, subset, length-restriction, ifpresent mechanisms in function for inline-templates
7278
7279 except
7280 - "inside values" columns are not tested
7281
7282 .*---------------------------------------------------------------------*
7283 :h4.Allowed matching mechanisms - template range (boolean in def.part)
7284 .*---------------------------------------------------------------------*
7285 :xmp tab=0.
7286
7287 <TC - Allowed matching mechanisms - template range (boolean in def.part)>
7288
7289 <COMPILE>
7290 <VERDICT_LEAF PASS>
7291 <MODULE TTCN x x.ttcn>
7292 module x {
7293
7294 template boolean r:= (false .. true);
7295
7296 }
7297 <END_MODULE>
7298 <RESULT IF_PASS COUNT 1>
7299 (?im)error.+?value.+?range.+?match.+?cannot.+?used
7300 <END_RESULT>
7301 <RESULT IF_PASS COUNT 1>
7302 (?is)\berror:
7303 <END_RESULT>
7304 <END_TC>
7305
7306 :exmp.
7307
7308 .*---------------------------------------------------------------------*
7309 :h4.Allowed matching mechanisms - template range (boolean in control part)
7310 .*---------------------------------------------------------------------*
7311 :xmp tab=0.
7312
7313 <TC - Allowed matching mechanisms - template range (boolean in control part)>
7314
7315 <COMPILE>
7316 <VERDICT_LEAF PASS>
7317 <MODULE TTCN x x.ttcn>
7318 module x {
7319
7320 control{
7321 var template boolean r:= (false .. true);
7322 }
7323
7324 }
7325 <END_MODULE>
7326 <RESULT IF_PASS COUNT 1>
7327 (?im)error.+?value.+?range.+?match.+?cannot.+?used
7328 <END_RESULT>
7329 <RESULT IF_PASS COUNT 1>
7330 (?is)\berror:
7331 <END_RESULT>
7332 <END_TC>
7333
7334 :exmp.
7335
7336 .*---------------------------------------------------------------------*
7337 :h4.Allowed matching mechanisms - template range (boolean in function)
7338 .*---------------------------------------------------------------------*
7339 :xmp tab=0.
7340
7341 <TC - Allowed matching mechanisms - template range (boolean in function)>
7342
7343 <COMPILE>
7344 <VERDICT_LEAF PASS>
7345 <MODULE TTCN x x.ttcn>
7346 module x {
7347
7348 function myFunct(){
7349 var template boolean r:= (false .. true);
7350 }
7351
7352 }
7353 <END_MODULE>
7354 <RESULT IF_PASS COUNT 1>
7355 (?im)error.+?value.+?range.+?match.+?cannot.+?used
7356 <END_RESULT>
7357 <RESULT IF_PASS COUNT 1>
7358 (?is)\berror:
7359 <END_RESULT>
7360 <END_TC>
7361
7362 :exmp.
7363
7364 .*---------------------------------------------------------------------*
7365 :h4.Allowed matching mechanisms - template range (bitstring in def.part)
7366 .*---------------------------------------------------------------------*
7367 :xmp tab=0.
7368
7369 <TC - Allowed matching mechanisms - template range (bitstring in def.part)>
7370
7371 <COMPILE>
7372 <VERDICT_LEAF PASS>
7373 <MODULE TTCN x x.ttcn>
7374 module x {
7375
7376 template bitstring r:= ('000'B .. '111'B);
7377
7378 }
7379 <END_MODULE>
7380 <RESULT IF_PASS COUNT 1>
7381 (?im)error.+?Value.+?range.+?match.+?cannot.+?used
7382 <END_RESULT>
7383 <RESULT IF_PASS COUNT 1>
7384 (?is)\berror:
7385 <END_RESULT>
7386 <END_TC>
7387
7388 :exmp.
7389
7390 .*---------------------------------------------------------------------*
7391 :h4.Allowed matching mechanisms - template range (bitstring in control part)
7392 .*---------------------------------------------------------------------*
7393 :xmp tab=0.
7394
7395 <TC - Allowed matching mechanisms - template range (bitstring in control part)>
7396
7397 <COMPILE>
7398 <VERDICT_LEAF PASS>
7399 <MODULE TTCN x x.ttcn>
7400 module x {
7401
7402 control{
7403 var template bitstring r:= ('000'B .. '111'B);
7404 }
7405
7406 }
7407 <END_MODULE>
7408 <RESULT IF_PASS COUNT 1>
7409 (?im)error.+?Value.+?range.+?match.+?cannot.+?used
7410 <END_RESULT>
7411 <RESULT IF_PASS COUNT 1>
7412 (?is)\berror:
7413 <END_RESULT>
7414 <END_TC>
7415
7416 :exmp.
7417
7418 .*---------------------------------------------------------------------*
7419 :h4.Allowed matching mechanisms - template range (bitstring in function)
7420 .*---------------------------------------------------------------------*
7421 :xmp tab=0.
7422
7423 <TC - Allowed matching mechanisms - template range (bitstring in function)>
7424
7425 <COMPILE>
7426 <VERDICT_LEAF PASS>
7427 <MODULE TTCN x x.ttcn>
7428 module x {
7429
7430 function myFunct(){
7431 var template bitstring r:= ('000'B .. '111'B);
7432 }
7433
7434 }
7435 <END_MODULE>
7436 <RESULT IF_PASS COUNT 1>
7437 (?im)error.+?Value.+?range.+?match.+?cannot.+?used
7438 <END_RESULT>
7439 <RESULT IF_PASS COUNT 1>
7440 (?is)\berror:
7441 <END_RESULT>
7442 <END_TC>
7443
7444 :exmp.
7445
7446 .*---------------------------------------------------------------------*
7447 :h4.Allowed matching mechanisms - template range (octetstring in def.part)
7448 .*---------------------------------------------------------------------*
7449 :xmp tab=0.
7450
7451 <TC - Allowed matching mechanisms - template range (octetstring in def.part)>
7452
7453 <COMPILE>
7454 <VERDICT_LEAF PASS>
7455 <MODULE TTCN x x.ttcn>
7456 module x {
7457
7458 template octetstring r:= ('0011'O .. '1111'O);
7459
7460 }
7461 <END_MODULE>
7462 <RESULT IF_PASS COUNT 1>
7463 (?im)error.+?Value.+?range.+?match.+?cannot.+?used
7464 <END_RESULT>
7465 <RESULT IF_PASS COUNT 1>
7466 (?is)\berror:
7467 <END_RESULT>
7468 <END_TC>
7469
7470 :exmp.
7471
7472 .*---------------------------------------------------------------------*
7473 :h4.Allowed matching mechanisms - template range (octetstring in control part)
7474 .*---------------------------------------------------------------------*
7475 :xmp tab=0.
7476
7477 <TC - Allowed matching mechanisms - template range (octetstring in control part)>
7478
7479 <COMPILE>
7480 <VERDICT_LEAF PASS>
7481 <MODULE TTCN x x.ttcn>
7482 module x {
7483
7484 control{
7485 var template octetstring r:= ('0011'O .. '1111'O);
7486 }
7487
7488 }
7489 <END_MODULE>
7490 <RESULT IF_PASS COUNT 1>
7491 (?im)error.+?Value.+?range.+?match.+?cannot.+?used
7492 <END_RESULT>
7493 <RESULT IF_PASS COUNT 1>
7494 (?is)\berror:
7495 <END_RESULT>
7496 <END_TC>
7497
7498 :exmp.
7499
7500 .*---------------------------------------------------------------------*
7501 :h4.Allowed matching mechanisms - template range (octetstring in function)
7502 .*---------------------------------------------------------------------*
7503 :xmp tab=0.
7504
7505 <TC - Allowed matching mechanisms - template range (octetstring in function)>
7506
7507 <COMPILE>
7508 <VERDICT_LEAF PASS>
7509 <MODULE TTCN x x.ttcn>
7510 module x {
7511
7512 function myFunct(){
7513 var template octetstring r:= ('0011'O .. '1111'O);
7514 }
7515
7516 }
7517 <END_MODULE>
7518 <RESULT IF_PASS COUNT 1>
7519 (?im)error.+?Value.+?range.+?match.+?cannot.+?used
7520 <END_RESULT>
7521 <RESULT IF_PASS COUNT 1>
7522 (?is)\berror:
7523 <END_RESULT>
7524 <END_TC>
7525
7526 :exmp.
7527
7528 .*---------------------------------------------------------------------*
7529 :h4.Allowed matching mechanisms - template range (hexstring in def.part)
7530 .*---------------------------------------------------------------------*
7531 :xmp tab=0.
7532
7533 <TC - Allowed matching mechanisms - template range (hexstring in def.part)>
7534
7535 <COMPILE>
7536 <VERDICT_LEAF PASS>
7537 <MODULE TTCN x x.ttcn>
7538 module x {
7539
7540 template hexstring r:= ('0011'H .. '1111'H);
7541
7542 }
7543 <END_MODULE>
7544 <RESULT IF_PASS COUNT 1>
7545 (?im)error.+?Value.+?range.+?match.+?cannot.+?used
7546 <END_RESULT>
7547 <RESULT IF_PASS COUNT 1>
7548 (?is)\berror:
7549 <END_RESULT>
7550 <END_TC>
7551
7552 :exmp.
7553
7554 .*---------------------------------------------------------------------*
7555 :h4.Allowed matching mechanisms - template range (hexstring in control part)
7556 .*---------------------------------------------------------------------*
7557 :xmp tab=0.
7558
7559 <TC - Allowed matching mechanisms - template range (hexstring in control part)>
7560
7561 <COMPILE>
7562 <VERDICT_LEAF PASS>
7563 <MODULE TTCN x x.ttcn>
7564 module x {
7565
7566 control{
7567 var template hexstring r:= ('0011'H .. '1111'H);
7568 }
7569
7570 }
7571 <END_MODULE>
7572 <RESULT IF_PASS COUNT 1>
7573 (?im)error.+?Value.+?range.+?match.+?cannot.+?used
7574 <END_RESULT>
7575 <RESULT IF_PASS COUNT 1>
7576 (?is)\berror:
7577 <END_RESULT>
7578 <END_TC>
7579
7580 :exmp.
7581
7582 .*---------------------------------------------------------------------*
7583 :h4.Allowed matching mechanisms - template range (hexstring in function)
7584 .*---------------------------------------------------------------------*
7585 :xmp tab=0.
7586
7587 <TC - Allowed matching mechanisms - template range (hexstring in function)>
7588
7589 <COMPILE>
7590 <VERDICT_LEAF PASS>
7591 <MODULE TTCN x x.ttcn>
7592 module x {
7593
7594 function myFunct(){
7595 var template hexstring r:= ('0011'H .. '1111'H);
7596 }
7597
7598 }
7599 <END_MODULE>
7600 <RESULT IF_PASS COUNT 1>
7601 (?im)error.+?Value.+?range.+?match.+?cannot.+?used
7602 <END_RESULT>
7603 <RESULT IF_PASS COUNT 1>
7604 (?is)\berror:
7605 <END_RESULT>
7606 <END_TC>
7607
7608 :exmp.
7609
7610 .*---------------------------------------------------------------------*
7611 :h4.Allowed matching mechanisms - template range (record in def.part)
7612 .*---------------------------------------------------------------------*
7613 :xmp tab=0.
7614
7615 <TC - Allowed matching mechanisms - template range (record in def.part)>
7616
7617 <COMPILE>
7618 <VERDICT_LEAF PASS>
7619 <MODULE TTCN x x.ttcn>
7620 module x {
7621
7622 type record recT{
7623 integer f1,
7624 float f2
7625 }
7626
7627 const recT c1:= { f1:= 1, f2:= 2.0};
7628 const recT c2:= { f1:= 5, f2:= 7.0};
7629
7630 template recT r:= (c1 .. c2);
7631
7632 }
7633 <END_MODULE>
7634 <RESULT IF_PASS COUNT 1>
7635 (?im)error.+?value.+?range.+?match.+?cannot.+?used
7636 <END_RESULT>
7637 <RESULT IF_PASS COUNT 1>
7638 (?is)\berror:
7639 <END_RESULT>
7640 <END_TC>
7641
7642 :exmp.
7643
7644 .*---------------------------------------------------------------------*
7645 :h4.Allowed matching mechanisms - template range (record in control part)
7646 .*---------------------------------------------------------------------*
7647 :xmp tab=0.
7648
7649 <TC - Allowed matching mechanisms - template range (record in control part)>
7650
7651 <COMPILE>
7652 <VERDICT_LEAF PASS>
7653 <MODULE TTCN x x.ttcn>
7654 module x {
7655
7656 type record recT{
7657 integer f1,
7658 float f2
7659 }
7660
7661 const recT c1:= { f1:= 1, f2:= 2.0};
7662 const recT c2:= { f1:= 5, f2:= 7.0};
7663
7664 control{
7665 var template recT r:= (c1 .. c2);
7666 }
7667
7668 }
7669 <END_MODULE>
7670 <RESULT IF_PASS COUNT 1>
7671 (?im)error.+?value.+?range.+?match.+?cannot.+?used
7672 <END_RESULT>
7673 <RESULT IF_PASS COUNT 1>
7674 (?is)\berror:
7675 <END_RESULT>
7676 <END_TC>
7677
7678 :exmp.
7679
7680 .*---------------------------------------------------------------------*
7681 :h4.Allowed matching mechanisms - template range (record in function)
7682 .*---------------------------------------------------------------------*
7683 :xmp tab=0.
7684
7685 <TC - Allowed matching mechanisms - template range (record in function)>
7686
7687 <COMPILE>
7688 <VERDICT_LEAF PASS>
7689 <MODULE TTCN x x.ttcn>
7690 module x {
7691
7692 type record recT{
7693 integer f1,
7694 float f2
7695 }
7696
7697 const recT c1:= { f1:= 1, f2:= 2.0};
7698 const recT c2:= { f1:= 5, f2:= 7.0};
7699
7700 function myFunct(){
7701 var template recT r:= (c1 .. c2);
7702 }
7703
7704 }
7705 <END_MODULE>
7706 <RESULT IF_PASS COUNT 1>
7707 (?im)error.+?value.+?range.+?match.+?cannot.+?used
7708 <END_RESULT>
7709 <RESULT IF_PASS COUNT 1>
7710 (?is)\berror:
7711 <END_RESULT>
7712 <END_TC>
7713
7714 :exmp.
7715
7716 .*---------------------------------------------------------------------*
7717 :h4.Allowed matching mechanisms - template range (record of in def.part)
7718 .*---------------------------------------------------------------------*
7719 :xmp tab=0.
7720
7721 <TC - Allowed matching mechanisms - template range (record of in def.part)>
7722
7723 <COMPILE>
7724 <VERDICT_LEAF PASS>
7725 <MODULE TTCN x x.ttcn>
7726 module x {
7727
7728 type record of integer rofT;
7729
7730 const rofT c1:= { 1, 2, 3 };
7731 const rofT c2:= { 4, 5, 6 };
7732
7733 template rofT r:= (c1 .. c2);
7734
7735 }
7736 <END_MODULE>
7737 <RESULT IF_PASS COUNT 1>
7738 (?im)error.+?value.+?range.+?match.+?cannot.+?used
7739 <END_RESULT>
7740 <RESULT IF_PASS COUNT 1>
7741 (?is)\berror:
7742 <END_RESULT>
7743 <END_TC>
7744
7745 :exmp.
7746
7747 .*---------------------------------------------------------------------*
7748 :h4.Allowed matching mechanisms - template range (record of in control part)
7749 .*---------------------------------------------------------------------*
7750 :xmp tab=0.
7751
7752 <TC - Allowed matching mechanisms - template range (record of in control part)>
7753
7754 <COMPILE>
7755 <VERDICT_LEAF PASS>
7756 <MODULE TTCN x x.ttcn>
7757 module x {
7758
7759 type record of integer rofT;
7760
7761 const rofT c1:= { 1, 2, 3 };
7762 const rofT c2:= { 4, 5, 6 };
7763
7764 control{
7765 var template rofT r:= (c1 .. c2);
7766 }
7767
7768 }
7769 <END_MODULE>
7770 <RESULT IF_PASS COUNT 1>
7771 (?im)error.+?value.+?range.+?match.+?cannot.+?used
7772 <END_RESULT>
7773 <RESULT IF_PASS COUNT 1>
7774 (?is)\berror:
7775 <END_RESULT>
7776 <END_TC>
7777
7778 :exmp.
7779
7780 .*---------------------------------------------------------------------*
7781 :h4.Allowed matching mechanisms - template range (record of in function)
7782 .*---------------------------------------------------------------------*
7783 :xmp tab=0.
7784
7785 <TC - Allowed matching mechanisms - template range (record of in function)>
7786
7787 <COMPILE>
7788 <VERDICT_LEAF PASS>
7789 <MODULE TTCN x x.ttcn>
7790 module x {
7791
7792 type record of integer rofT;
7793
7794 const rofT c1:= { 1, 2, 3 };
7795 const rofT c2:= { 4, 5, 6 };
7796
7797 function myFunct(){
7798 var template rofT r:= (c1 .. c2);
7799 }
7800
7801 }
7802 <END_MODULE>
7803 <RESULT IF_PASS COUNT 1>
7804 (?im)error.+?value.+?range.+?match.+?cannot.+?used
7805 <END_RESULT>
7806 <RESULT IF_PASS COUNT 1>
7807 (?is)\berror:
7808 <END_RESULT>
7809 <END_TC>
7810
7811 :exmp.
7812
7813 .*---------------------------------------------------------------------*
7814 :h4.Allowed matching mechanisms - template range (set in def.part)
7815 .*---------------------------------------------------------------------*
7816 :xmp tab=0.
7817
7818 <TC - Allowed matching mechanisms - template range (set in def.part)>
7819
7820 <COMPILE>
7821 <VERDICT_LEAF PASS>
7822 <MODULE TTCN x x.ttcn>
7823 module x {
7824
7825 type set setT{
7826 integer f1,
7827 float f2
7828 }
7829
7830 const setT c1:= { f1:= 1, f2:= 2.0};
7831 const setT c2:= { f1:= 5, f2:= 7.0};
7832
7833
7834 template setT r:= (c1 .. c2);
7835
7836 }
7837 <END_MODULE>
7838 <RESULT IF_PASS COUNT 1>
7839 (?im)error.+?value.+?range.+?match.+?cannot.+?used
7840 <END_RESULT>
7841 <RESULT IF_PASS COUNT 1>
7842 (?is)\berror:
7843 <END_RESULT>
7844 <END_TC>
7845
7846 :exmp.
7847
7848 .*---------------------------------------------------------------------*
7849 :h4.Allowed matching mechanisms - template range (set in control part)
7850 .*---------------------------------------------------------------------*
7851 :xmp tab=0.
7852
7853 <TC - Allowed matching mechanisms - template range (set in control part)>
7854
7855 <COMPILE>
7856 <VERDICT_LEAF PASS>
7857 <MODULE TTCN x x.ttcn>
7858 module x {
7859
7860 type set setT{
7861 integer f1,
7862 float f2
7863 }
7864
7865 const setT c1:= { f1:= 1, f2:= 2.0};
7866 const setT c2:= { f1:= 5, f2:= 7.0};
7867
7868
7869 control{
7870 var template setT r:= (c1 .. c2);
7871 }
7872
7873 }
7874 <END_MODULE>
7875 <RESULT IF_PASS COUNT 1>
7876 (?im)error.+?value.+?range.+?match.+?cannot.+?used
7877 <END_RESULT>
7878 <RESULT IF_PASS COUNT 1>
7879 (?is)\berror:
7880 <END_RESULT>
7881 <END_TC>
7882
7883 :exmp.
7884
7885 .*---------------------------------------------------------------------*
7886 :h4.Allowed matching mechanisms - template range (set in function)
7887 .*---------------------------------------------------------------------*
7888 :xmp tab=0.
7889
7890 <TC - Allowed matching mechanisms - template range (set in function)>
7891
7892 <COMPILE>
7893 <VERDICT_LEAF PASS>
7894 <MODULE TTCN x x.ttcn>
7895 module x {
7896
7897 type set setT{
7898 integer f1,
7899 float f2
7900 }
7901
7902 const setT c1:= { f1:= 1, f2:= 2.0};
7903 const setT c2:= { f1:= 5, f2:= 7.0};
7904
7905
7906 function myFunct(){
7907 var template setT r:= (c1 .. c2);
7908 }
7909
7910 }
7911 <END_MODULE>
7912 <RESULT IF_PASS COUNT 1>
7913 (?im)error.+?value.+?range.+?match.+?cannot.+?used
7914 <END_RESULT>
7915 <RESULT IF_PASS COUNT 1>
7916 (?is)\berror:
7917 <END_RESULT>
7918 <END_TC>
7919
7920 :exmp.
7921
7922 .*---------------------------------------------------------------------*
7923 :h4.Allowed matching mechanisms - template range (set of in def.part)
7924 .*---------------------------------------------------------------------*
7925 :xmp tab=0.
7926
7927 <TC - Allowed matching mechanisms - template range (set of in def.part)>
7928
7929 <COMPILE>
7930 <VERDICT_LEAF PASS>
7931 <MODULE TTCN x x.ttcn>
7932 module x {
7933
7934 type set of integer sofT;
7935
7936 const sofT c1:= { 1, 2, 3 };
7937 const sofT c2:= { 4, 5, 6 };
7938
7939
7940 template sofT r:= (c1 .. c2);
7941
7942 }
7943 <END_MODULE>
7944 <RESULT IF_PASS COUNT 1>
7945 (?im)error.+?value.+?range.+?match.+?cannot.+?used
7946 <END_RESULT>
7947 <RESULT IF_PASS COUNT 1>
7948 (?is)\berror:
7949 <END_RESULT>
7950 <END_TC>
7951
7952 :exmp.
7953
7954 .*---------------------------------------------------------------------*
7955 :h4.Allowed matching mechanisms - template range (set of in control part)
7956 .*---------------------------------------------------------------------*
7957 :xmp tab=0.
7958
7959 <TC - Allowed matching mechanisms - template range (set of in control part)>
7960
7961 <COMPILE>
7962 <VERDICT_LEAF PASS>
7963 <MODULE TTCN x x.ttcn>
7964 module x {
7965
7966 type set of integer sofT;
7967
7968 const sofT c1:= { 1, 2, 3 };
7969 const sofT c2:= { 4, 5, 6 };
7970
7971
7972 control{
7973 var template sofT r:= (c1 .. c2);
7974 }
7975
7976 }
7977 <END_MODULE>
7978 <RESULT IF_PASS COUNT 1>
7979 (?im)error.+?value.+?range.+?match.+?cannot.+?used
7980 <END_RESULT>
7981 <RESULT IF_PASS COUNT 1>
7982 (?is)\berror:
7983 <END_RESULT>
7984 <END_TC>
7985
7986 :exmp.
7987
7988 .*---------------------------------------------------------------------*
7989 :h4.Allowed matching mechanisms - template range (set of in function)
7990 .*---------------------------------------------------------------------*
7991 :xmp tab=0.
7992
7993 <TC - Allowed matching mechanisms - template range (set of in function)>
7994
7995 <COMPILE>
7996 <VERDICT_LEAF PASS>
7997 <MODULE TTCN x x.ttcn>
7998 module x {
7999
8000 type set of integer sofT;
8001
8002 const sofT c1:= { 1, 2, 3 };
8003 const sofT c2:= { 4, 5, 6 };
8004
8005
8006 function myFunct(){
8007 var template sofT r:= (c1 .. c2);
8008 }
8009
8010 }
8011 <END_MODULE>
8012 <RESULT IF_PASS COUNT 1>
8013 (?im)error.+?value.+?range.+?match.+?cannot.+?used
8014 <END_RESULT>
8015 <RESULT IF_PASS COUNT 1>
8016 (?is)\berror:
8017 <END_RESULT>
8018 <END_TC>
8019
8020 :exmp.
8021
8022 .*---------------------------------------------------------------------*
8023 :h4.Allowed matching mechanisms - template range (enumerated in def.part)
8024 .*---------------------------------------------------------------------*
8025 :xmp tab=0.
8026
8027 <TC - Allowed matching mechanisms - template range (enumerated in def.part)>
8028
8029 <COMPILE>
8030 <VERDICT_LEAF PASS>
8031 <MODULE TTCN x x.ttcn>
8032 module x {
8033
8034 type enumerated enumT{ ONE(1), TWO(2), THREE(3)};
8035
8036 const enumT c1:= ONE;
8037 const enumT c2:= THREE;
8038
8039 template enumT r:= (c1 .. c2);
8040
8041 }
8042 <END_MODULE>
8043 <RESULT IF_PASS COUNT 1>
8044 (?im)error.+?value.+?range.+?match.+?cannot.+?used
8045 <END_RESULT>
8046 <RESULT IF_PASS COUNT 1>
8047 (?is)\berror:
8048 <END_RESULT>
8049 <END_TC>
8050
8051 :exmp.
8052
8053 .*---------------------------------------------------------------------*
8054 :h4.Allowed matching mechanisms - template range (enumerated in control part)
8055 .*---------------------------------------------------------------------*
8056 :xmp tab=0.
8057
8058 <TC - Allowed matching mechanisms - template range (enumerated in control part)>
8059
8060 <COMPILE>
8061 <VERDICT_LEAF PASS>
8062 <MODULE TTCN x x.ttcn>
8063 module x {
8064
8065 type enumerated enumT{ ONE(1), TWO(2), THREE(3)};
8066
8067 const enumT c1:= ONE;
8068 const enumT c2:= THREE;
8069
8070 control{
8071 var template enumT r:= (c1 .. c2);
8072 }
8073
8074 }
8075 <END_MODULE>
8076 <RESULT IF_PASS COUNT 1>
8077 (?im)error.+?value.+?range.+?match.+?cannot.+?used
8078 <END_RESULT>
8079 <RESULT IF_PASS COUNT 1>
8080 (?is)\berror:
8081 <END_RESULT>
8082 <END_TC>
8083
8084 :exmp.
8085
8086 .*---------------------------------------------------------------------*
8087 :h4.Allowed matching mechanisms - template range (enumerated in function)
8088 .*---------------------------------------------------------------------*
8089 :xmp tab=0.
8090
8091 <TC - Allowed matching mechanisms - template range (enumerated in function)>
8092
8093 <COMPILE>
8094 <VERDICT_LEAF PASS>
8095 <MODULE TTCN x x.ttcn>
8096 module x {
8097
8098 type enumerated enumT{ ONE(1), TWO(2), THREE(3)};
8099
8100 const enumT c1:= ONE;
8101 const enumT c2:= THREE;
8102
8103 function myFunct(){
8104 var template enumT r:= (c1 .. c2);
8105 }
8106
8107 }
8108 <END_MODULE>
8109 <RESULT IF_PASS COUNT 1>
8110 (?im)error.+?value.+?range.+?match.+?cannot.+?used
8111 <END_RESULT>
8112 <RESULT IF_PASS COUNT 1>
8113 (?is)\berror:
8114 <END_RESULT>
8115 <END_TC>
8116
8117 :exmp.
8118
8119 .*---------------------------------------------------------------------*
8120 :h4.Allowed matching mechanisms - template range (union in def.part)
8121 .*---------------------------------------------------------------------*
8122 :xmp tab=0.
8123
8124 <TC - Allowed matching mechanisms - template range (union in def.part)>
8125
8126 <COMPILE>
8127 <VERDICT_LEAF PASS>
8128 <MODULE TTCN x x.ttcn>
8129 module x {
8130
8131 type union uniT{
8132 integer f1,
8133 float f2,
8134 charstring f3
8135 }
8136
8137 const uniT c1:= { f1:= 1 };
8138 const uniT c2:= { f1:= 5 };
8139
8140 template uniT r:= (c1 .. c2);
8141
8142 }
8143 <END_MODULE>
8144 <RESULT IF_PASS COUNT 1>
8145 (?im)error.+?value.+?range.+?match.+?cannot.+?used
8146 <END_RESULT>
8147 <RESULT IF_PASS COUNT 1>
8148 (?is)\berror:
8149 <END_RESULT>
8150 <END_TC>
8151
8152 :exmp.
8153
8154 .*---------------------------------------------------------------------*
8155 :h4.Allowed matching mechanisms - template range (union in control part)
8156 .*---------------------------------------------------------------------*
8157 :xmp tab=0.
8158
8159 <TC - Allowed matching mechanisms - template range (union in control part)>
8160
8161 <COMPILE>
8162 <VERDICT_LEAF PASS>
8163 <MODULE TTCN x x.ttcn>
8164 module x {
8165
8166 type union uniT{
8167 integer f1,
8168 float f2,
8169 charstring f3
8170 }
8171
8172 const uniT c1:= { f1:= 1 };
8173 const uniT c2:= { f1:= 5 };
8174
8175 control{
8176 var template uniT r:= (c1 .. c2);
8177 }
8178
8179 }
8180 <END_MODULE>
8181 <RESULT IF_PASS COUNT 1>
8182 (?im)error.+?value.+?range.+?match.+?cannot.+?used
8183 <END_RESULT>
8184 <RESULT IF_PASS COUNT 1>
8185 (?is)\berror:
8186 <END_RESULT>
8187 <END_TC>
8188
8189 :exmp.
8190
8191 .*---------------------------------------------------------------------*
8192 :h4.Allowed matching mechanisms - template range (union in function)
8193 .*---------------------------------------------------------------------*
8194 :xmp tab=0.
8195
8196 <TC - Allowed matching mechanisms - template range (union in function)>
8197
8198 <COMPILE>
8199 <VERDICT_LEAF PASS>
8200 <MODULE TTCN x x.ttcn>
8201 module x {
8202
8203 type union uniT{
8204 integer f1,
8205 float f2,
8206 charstring f3
8207 }
8208
8209 const uniT c1:= { f1:= 1 };
8210 const uniT c2:= { f1:= 5 };
8211
8212 function myFunct(){
8213 var template uniT r:= (c1 .. c2);
8214 }
8215
8216 }
8217 <END_MODULE>
8218 <RESULT IF_PASS COUNT 1>
8219 (?im)error.+?value.+?range.+?match.+?cannot.+?used
8220 <END_RESULT>
8221 <RESULT IF_PASS COUNT 1>
8222 (?is)\berror:
8223 <END_RESULT>
8224 <END_TC>
8225
8226 :exmp.
8227
8228 .*---------------------------------------------------------------------*
8229 :h4.Allowed matching mechanisms - template range (array in def.part)
8230 .*---------------------------------------------------------------------*
8231 :xmp tab=0.
8232
8233 <TC - Allowed matching mechanisms - template range (array in def.part)>
8234
8235 <COMPILE>
8236 <VERDICT_LEAF PASS>
8237 <MODULE TTCN x x.ttcn>
8238 module x {
8239
8240 type integer myint[1];
8241
8242 const myint c1:={1};
8243 const myint c2 :={3};
8244
8245 template myint r :=(c1..c2);
8246
8247 }
8248 <END_MODULE>
8249 <RESULT IF_PASS COUNT 1>
8250 (?im)error.+?value.+?range.+?match.+?cannot.+?used
8251 <END_RESULT>
8252 <RESULT IF_PASS COUNT 1>
8253 (?is)\berror:
8254 <END_RESULT>
8255 <END_TC>
8256
8257 :exmp.
8258
8259 .*---------------------------------------------------------------------*
8260 :h4.Allowed matching mechanisms - template range (array in control part)
8261 .*---------------------------------------------------------------------*
8262 :xmp tab=0.
8263
8264 <TC - Allowed matching mechanisms - template range (array in control part)>
8265
8266 <COMPILE>
8267 <VERDICT_LEAF PASS>
8268 <MODULE TTCN x x.ttcn>
8269 module x {
8270
8271 type integer myint[1];
8272
8273 const myint c1:={1};
8274 const myint c2 :={3};
8275
8276 control{
8277 template myint r :=(c1..c2);
8278 }
8279 }
8280 <END_MODULE>
8281 <RESULT IF_PASS COUNT 1>
8282 (?im)error.+?value.+?range.+?match.+?cannot.+?used
8283 <END_RESULT>
8284 <RESULT IF_PASS COUNT 1>
8285 (?is)\berror:
8286 <END_RESULT>
8287 <END_TC>
8288
8289 :exmp.
8290
8291 .*---------------------------------------------------------------------*
8292 :h4.Allowed matching mechanisms - template range (array in function)
8293 .*---------------------------------------------------------------------*
8294 :xmp tab=0.
8295
8296 <TC - Allowed matching mechanisms - template range (array in function)>
8297
8298 <COMPILE>
8299 <VERDICT_LEAF PASS>
8300 <MODULE TTCN x x.ttcn>
8301 module x {
8302
8303 type integer myint[1];
8304
8305 const myint c1:={1};
8306 const myint c2 :={3};
8307
8308 function myFunct(){
8309 template myint r :=(c1..c2);
8310 }
8311 }
8312 <END_MODULE>
8313 <RESULT IF_PASS COUNT 1>
8314 (?im)error.+?value.+?range.+?match.+?cannot.+?used
8315 <END_RESULT>
8316 <RESULT IF_PASS COUNT 1>
8317 (?is)\berror:
8318 <END_RESULT>
8319 <END_TC>
8320
8321 :exmp.
8322
8323 .*---------------------------------------------------------------------*
8324 :h4.Allowed matching mechanisms - template superset (boolean in def.part)
8325 .*---------------------------------------------------------------------*
8326 :xmp tab=0.
8327
8328 <TC - Allowed matching mechanisms - template superset (boolean in def.part)>
8329
8330 <COMPILE>
8331 <VERDICT_LEAF PASS>
8332 <MODULE TTCN x x.ttcn>
8333 module x {
8334
8335 const boolean c1:= false;
8336 const boolean c2:= true;
8337
8338 template boolean r:= superset (c1, c2);
8339
8340 }
8341 <END_MODULE>
8342 <RESULT IF_PASS COUNT 1>
8343 (?im)error.+?superset.+?match.+?cannot.+?used
8344 <END_RESULT>
8345 <RESULT IF_PASS COUNT 1>
8346 (?is)\berror:
8347 <END_RESULT>
8348 <END_TC>
8349
8350 :exmp.
8351
8352 .*---------------------------------------------------------------------*
8353 :h4.Allowed matching mechanisms - template superset (boolean in control part)
8354 .*---------------------------------------------------------------------*
8355 :xmp tab=0.
8356
8357 <TC - Allowed matching mechanisms - template superset (boolean in control part)>
8358
8359 <COMPILE>
8360 <VERDICT_LEAF PASS>
8361 <MODULE TTCN x x.ttcn>
8362 module x {
8363
8364 const boolean c1:= false;
8365 const boolean c2:= true;
8366
8367 control{
8368 var template boolean r:= superset (c1, c2);
8369 }
8370
8371 }
8372 <END_MODULE>
8373 <RESULT IF_PASS COUNT 1>
8374 (?im)error.+?superset.+?match.+?cannot.+?used
8375 <END_RESULT>
8376 <RESULT IF_PASS COUNT 1>
8377 (?is)\berror:
8378 <END_RESULT>
8379 <END_TC>
8380
8381 :exmp.
8382
8383 .*---------------------------------------------------------------------*
8384 :h4.Allowed matching mechanisms - template superset (boolean in function)
8385 .*---------------------------------------------------------------------*
8386 :xmp tab=0.
8387
8388 <TC - Allowed matching mechanisms - template superset (boolean in function)>
8389
8390 <COMPILE>
8391 <VERDICT_LEAF PASS>
8392 <MODULE TTCN x x.ttcn>
8393 module x {
8394
8395 const boolean c1:= false;
8396 const boolean c2:= true;
8397
8398 function myFunct(){
8399 var template boolean r:= superset (c1, c2);
8400 }
8401
8402 }
8403 <END_MODULE>
8404 <RESULT IF_PASS COUNT 1>
8405 (?im)error.+?superset.+?match.+?cannot.+?used
8406 <END_RESULT>
8407 <RESULT IF_PASS COUNT 1>
8408 (?is)\berror:
8409 <END_RESULT>
8410 <END_TC>
8411
8412 :exmp.
8413
8414 .*---------------------------------------------------------------------*
8415 :h4.Allowed matching mechanisms - template superset (integer in def.part)
8416 .*---------------------------------------------------------------------*
8417 :xmp tab=0.
8418
8419 <TC - Allowed matching mechanisms - template superset (integer in def.part)>
8420
8421 <COMPILE>
8422 <VERDICT_LEAF PASS>
8423 <MODULE TTCN x x.ttcn>
8424 module x {
8425
8426 const integer c1:= 1;
8427 const integer c2:= 2;
8428 const integer c3:= 3;
8429
8430 template integer r:= superset (c1, c2, c3);
8431
8432 }
8433 <END_MODULE>
8434 <RESULT IF_PASS COUNT 1>
8435 (?im)error.+?superset.+?match.+?cannot.+?used
8436 <END_RESULT>
8437 <RESULT IF_PASS COUNT 1>
8438 (?is)\berror:
8439 <END_RESULT>
8440 <END_TC>
8441
8442 :exmp.
8443
8444 .*---------------------------------------------------------------------*
8445 :h4.Allowed matching mechanisms - template superset (integer in control part)
8446 .*---------------------------------------------------------------------*
8447 :xmp tab=0.
8448
8449 <TC - Allowed matching mechanisms - template superset (integer in control part)>
8450
8451 <COMPILE>
8452 <VERDICT_LEAF PASS>
8453 <MODULE TTCN x x.ttcn>
8454 module x {
8455
8456 const integer c1:= 1;
8457 const integer c2:= 2;
8458 const integer c3:= 3;
8459
8460 control{
8461 var template integer r:= superset (c1, c2, c3);
8462 }
8463
8464 }
8465 <END_MODULE>
8466 <RESULT IF_PASS COUNT 1>
8467 (?im)error.+?superset.+?match.+?cannot.+?used
8468 <END_RESULT>
8469 <RESULT IF_PASS COUNT 1>
8470 (?is)\berror:
8471 <END_RESULT>
8472 <END_TC>
8473
8474 :exmp.
8475
8476 .*---------------------------------------------------------------------*
8477 :h4.Allowed matching mechanisms - template superset (integer in function)
8478 .*---------------------------------------------------------------------*
8479 :xmp tab=0.
8480
8481 <TC - Allowed matching mechanisms - template superset (integer in function)>
8482
8483 <COMPILE>
8484 <VERDICT_LEAF PASS>
8485 <MODULE TTCN x x.ttcn>
8486 module x {
8487
8488 const integer c1:= 1;
8489 const integer c2:= 2;
8490 const integer c3:= 3;
8491
8492 function myFunct(){
8493 var template integer r:= superset (c1, c2, c3);
8494 }
8495
8496 }
8497 <END_MODULE>
8498 <RESULT IF_PASS COUNT 1>
8499 (?im)error.+?superset.+?match.+?cannot.+?used
8500 <END_RESULT>
8501 <RESULT IF_PASS COUNT 1>
8502 (?is)\berror:
8503 <END_RESULT>
8504 <END_TC>
8505
8506 :exmp.
8507
8508 .*---------------------------------------------------------------------*
8509 :h4.Allowed matching mechanisms - template superset (float in def.part)
8510 .*---------------------------------------------------------------------*
8511 :xmp tab=0.
8512
8513 <TC - Allowed matching mechanisms - template superset (float in def.part)>
8514
8515 <COMPILE>
8516 <VERDICT_LEAF PASS>
8517 <MODULE TTCN x x.ttcn>
8518 module x {
8519
8520 const float c1:= 1.6;
8521 const float c2:= 2.4;
8522 const float c3:= 3.9;
8523
8524 template float r:= superset (c1, c2, c3);
8525
8526 }
8527 <END_MODULE>
8528 <RESULT IF_PASS COUNT 1>
8529 (?im)error.+?superset.+?match.+?cannot.+?used
8530 <END_RESULT>
8531 <RESULT IF_PASS COUNT 1>
8532 (?is)\berror:
8533 <END_RESULT>
8534 <END_TC>
8535
8536 :exmp.
8537
8538 .*---------------------------------------------------------------------*
8539 :h4.Allowed matching mechanisms - template superset (float in control part)
8540 .*---------------------------------------------------------------------*
8541 :xmp tab=0.
8542
8543 <TC - Allowed matching mechanisms - template superset (float in control part)>
8544
8545 <COMPILE>
8546 <VERDICT_LEAF PASS>
8547 <MODULE TTCN x x.ttcn>
8548 module x {
8549
8550 const float c1:= 1.1;
8551 const float c2:= 2.3;
8552 const float c3:= 3.1;
8553
8554 control{
8555 var template float r:= superset (c1, c2, c3);
8556 }
8557
8558 }
8559 <END_MODULE>
8560 <RESULT IF_PASS COUNT 1>
8561 (?im)error.+?superset.+?match.+?cannot.+?used
8562 <END_RESULT>
8563 <RESULT IF_PASS COUNT 1>
8564 (?is)\berror:
8565 <END_RESULT>
8566 <END_TC>
8567
8568 :exmp.
8569
8570 .*---------------------------------------------------------------------*
8571 :h4.Allowed matching mechanisms - template superset (float in function)
8572 .*---------------------------------------------------------------------*
8573 :xmp tab=0.
8574
8575 <TC - Allowed matching mechanisms - template superset (float in function)>
8576
8577 <COMPILE>
8578 <VERDICT_LEAF PASS>
8579 <MODULE TTCN x x.ttcn>
8580 module x {
8581
8582 const float c1:= 1.1;
8583 const float c2:= 2.9;
8584 const float c3:= 3.2;
8585
8586 function myFunct(){
8587 var template float r:= superset (c1, c2, c3);
8588 }
8589
8590 }
8591 <END_MODULE>
8592 <RESULT IF_PASS COUNT 1>
8593 (?im)error.+?superset.+?match.+?cannot.+?used
8594 <END_RESULT>
8595 <RESULT IF_PASS COUNT 1>
8596 (?is)\berror:
8597 <END_RESULT>
8598 <END_TC>
8599
8600 :exmp.
8601
8602 .*---------------------------------------------------------------------*
8603 :h4.Allowed matching mechanisms - template superset (bitstring in def.part)
8604 .*---------------------------------------------------------------------*
8605 :xmp tab=0.
8606
8607 <TC - Allowed matching mechanisms - template superset (bitstring in def.part)>
8608
8609 <COMPILE>
8610 <VERDICT_LEAF PASS>
8611 <MODULE TTCN x x.ttcn>
8612 module x {
8613
8614 const bitstring c1:= '101'B;
8615 const bitstring c2:= '110'B;
8616 const bitstring c3:= '111'B;
8617
8618 template bitstring r:= superset (c1, c2, c3);
8619
8620 }
8621 <END_MODULE>
8622 <RESULT IF_PASS COUNT 1>
8623 (?im)error.+?superset.+?match.+?cannot.+?used
8624 <END_RESULT>
8625 <RESULT IF_PASS COUNT 1>
8626 (?is)\berror:
8627 <END_RESULT>
8628 <END_TC>
8629
8630 :exmp.
8631
8632 .*---------------------------------------------------------------------*
8633 :h4.Allowed matching mechanisms - template superset (bitstring in control part)
8634 .*---------------------------------------------------------------------*
8635 :xmp tab=0.
8636
8637 <TC - Allowed matching mechanisms - template superset (bitstring in control part)>
8638
8639 <COMPILE>
8640 <VERDICT_LEAF PASS>
8641 <MODULE TTCN x x.ttcn>
8642 module x {
8643
8644 const bitstring c1:= '101'B;
8645 const bitstring c2:= '110'B;
8646 const bitstring c3:= '111'B;
8647
8648 control{
8649 var template bitstring r:= superset (c1, c2, c3);
8650 }
8651
8652 }
8653 <END_MODULE>
8654 <RESULT IF_PASS COUNT 1>
8655 (?im)error.+?superset.+?match.+?cannot.+?used
8656 <END_RESULT>
8657 <RESULT IF_PASS COUNT 1>
8658 (?is)\berror:
8659 <END_RESULT>
8660 <END_TC>
8661
8662 :exmp.
8663
8664 .*---------------------------------------------------------------------*
8665 :h4.Allowed matching mechanisms - template superset (bitstring in function)
8666 .*---------------------------------------------------------------------*
8667 :xmp tab=0.
8668
8669 <TC - Allowed matching mechanisms - template superset (bitstring in function)>
8670
8671 <COMPILE>
8672 <VERDICT_LEAF PASS>
8673 <MODULE TTCN x x.ttcn>
8674 module x {
8675
8676 const bitstring c1:= '101'B;
8677 const bitstring c2:= '110'B;
8678 const bitstring c3:= '111'B;
8679
8680 function myFunct(){
8681 var template bitstring r:= superset (c1, c2, c3);
8682 }
8683
8684 }
8685 <END_MODULE>
8686 <RESULT IF_PASS COUNT 1>
8687 (?im)error.+?superset.+?match.+?cannot.+?used
8688 <END_RESULT>
8689 <RESULT IF_PASS COUNT 1>
8690 (?is)\berror:
8691 <END_RESULT>
8692 <END_TC>
8693
8694 :exmp.
8695
8696 .*---------------------------------------------------------------------*
8697 :h4.Allowed matching mechanisms - template superset (octetstring in def.part)
8698 .*---------------------------------------------------------------------*
8699 :xmp tab=0.
8700
8701 <TC - Allowed matching mechanisms - template superset (octetstring in def.part)>
8702
8703 <COMPILE>
8704 <VERDICT_LEAF PASS>
8705 <MODULE TTCN x x.ttcn>
8706 module x {
8707
8708 const octetstring c1:= '1011'O;
8709 const octetstring c2:= '1110'O;
8710 const octetstring c3:= '1111'O;
8711
8712 template octetstring r:= superset (c1, c2, c3);
8713
8714 }
8715 <END_MODULE>
8716 <RESULT IF_PASS COUNT 1>
8717 (?im)error.+?superset.+?match.+?cannot.+?used
8718 <END_RESULT>
8719 <RESULT IF_PASS COUNT 1>
8720 (?is)\berror:
8721 <END_RESULT>
8722 <END_TC>
8723
8724 :exmp.
8725
8726 .*---------------------------------------------------------------------*
8727 :h4.Allowed matching mechanisms - template superset (octetstring in control part)
8728 .*---------------------------------------------------------------------*
8729 :xmp tab=0.
8730
8731 <TC - Allowed matching mechanisms - template superset (octetstring in control part)>
8732
8733 <COMPILE>
8734 <VERDICT_LEAF PASS>
8735 <MODULE TTCN x x.ttcn>
8736 module x {
8737
8738 const octetstring c1:= '1011'O;
8739 const octetstring c2:= '1110'O;
8740 const octetstring c3:= '1111'O;
8741
8742 control{
8743 var template octetstring r:= superset (c1, c2, c3);
8744 }
8745
8746 }
8747 <END_MODULE>
8748 <RESULT IF_PASS COUNT 1>
8749 (?im)error.+?superset.+?match.+?cannot.+?used
8750 <END_RESULT>
8751 <RESULT IF_PASS COUNT 1>
8752 (?is)\berror:
8753 <END_RESULT>
8754 <END_TC>
8755
8756 :exmp.
8757
8758 .*---------------------------------------------------------------------*
8759 :h4.Allowed matching mechanisms - template superset (octetstring in function)
8760 .*---------------------------------------------------------------------*
8761 :xmp tab=0.
8762
8763 <TC - Allowed matching mechanisms - template superset (octetstring in function)>
8764
8765 <COMPILE>
8766 <VERDICT_LEAF PASS>
8767 <MODULE TTCN x x.ttcn>
8768 module x {
8769
8770 const octetstring c1:= '1011'O;
8771 const octetstring c2:= '1110'O;
8772 const octetstring c3:= '1111'O;
8773
8774 function myFunct(){
8775 var template octetstring r:= superset (c1, c2, c3);
8776 }
8777
8778 }
8779 <END_MODULE>
8780 <RESULT IF_PASS COUNT 1>
8781 (?im)error.+?superset.+?match.+?cannot.+?used
8782 <END_RESULT>
8783 <RESULT IF_PASS COUNT 1>
8784 (?is)\berror:
8785 <END_RESULT>
8786 <END_TC>
8787
8788 :exmp.
8789
8790 .*---------------------------------------------------------------------*
8791 :h4.Allowed matching mechanisms - template superset (hexstring in def.part)
8792 .*---------------------------------------------------------------------*
8793 :xmp tab=0.
8794
8795 <TC - Allowed matching mechanisms - template superset (hexstring in def.part)>
8796
8797 <COMPILE>
8798 <VERDICT_LEAF PASS>
8799 <MODULE TTCN x x.ttcn>
8800 module x {
8801
8802 const hexstring c1:= '1011'H;
8803 const hexstring c2:= '1110'H;
8804 const hexstring c3:= '1111'H;
8805
8806 template hexstring r:= superset (c1, c2, c3);
8807
8808 }
8809 <END_MODULE>
8810 <RESULT IF_PASS COUNT 1>
8811 (?im)error.+?superset.+?match.+?cannot.+?used
8812 <END_RESULT>
8813 <RESULT IF_PASS COUNT 1>
8814 (?is)\berror:
8815 <END_RESULT>
8816 <END_TC>
8817
8818 :exmp.
8819
8820 .*---------------------------------------------------------------------*
8821 :h4.Allowed matching mechanisms - template superset (hexstring in control part)
8822 .*---------------------------------------------------------------------*
8823 :xmp tab=0.
8824
8825 <TC - Allowed matching mechanisms - template superset (hexstring in control part)>
8826
8827 <COMPILE>
8828 <VERDICT_LEAF PASS>
8829 <MODULE TTCN x x.ttcn>
8830 module x {
8831
8832 const hexstring c1:= '1011'H;
8833 const hexstring c2:= '1110'H;
8834 const hexstring c3:= '1111'H;
8835
8836 control{
8837 var template hexstring r:= superset (c1, c2, c3);
8838 }
8839
8840 }
8841 <END_MODULE>
8842 <RESULT IF_PASS COUNT 1>
8843 (?im)error.+?superset.+?match.+?cannot.+?used
8844 <END_RESULT>
8845 <RESULT IF_PASS COUNT 1>
8846 (?is)\berror:
8847 <END_RESULT>
8848 <END_TC>
8849
8850 :exmp.
8851
8852 .*---------------------------------------------------------------------*
8853 :h4.Allowed matching mechanisms - template superset (hexstring in function)
8854 .*---------------------------------------------------------------------*
8855 :xmp tab=0.
8856
8857 <TC - Allowed matching mechanisms - template superset (hexstring in function)>
8858
8859 <COMPILE>
8860 <VERDICT_LEAF PASS>
8861 <MODULE TTCN x x.ttcn>
8862 module x {
8863
8864 const hexstring c1:= '1011'H;
8865 const hexstring c2:= '1110'H;
8866 const hexstring c3:= '1111'H;
8867
8868 function myFunct(){
8869 var template hexstring r:= superset (c1, c2, c3);
8870 }
8871
8872 }
8873 <END_MODULE>
8874 <RESULT IF_PASS COUNT 1>
8875 (?im)error.+?superset.+?match.+?cannot.+?used
8876 <END_RESULT>
8877 <RESULT IF_PASS COUNT 1>
8878 (?is)\berror:
8879 <END_RESULT>
8880 <END_TC>
8881
8882 :exmp.
8883
8884 .*---------------------------------------------------------------------*
8885 :h4.Allowed matching mechanisms - template superset (charstring in def.part)
8886 .*---------------------------------------------------------------------*
8887 :xmp tab=0.
8888
8889 <TC - Allowed matching mechanisms - template superset (charstring in def.part)>
8890
8891 <COMPILE>
8892 <VERDICT_LEAF PASS>
8893 <MODULE TTCN x x.ttcn>
8894 module x {
8895
8896 const charstring c1:= "ogin";
8897 const charstring c2:= "dwa";
8898 const charstring c3:= "try";
8899
8900 template charstring r:= superset (c1, c2, c3);
8901
8902 }
8903 <END_MODULE>
8904 <RESULT IF_PASS COUNT 1>
8905 (?im)error.+?superset.+?match.+?cannot.+?used
8906 <END_RESULT>
8907 <RESULT IF_PASS COUNT 1>
8908 (?is)\berror:
8909 <END_RESULT>
8910 <END_TC>
8911
8912 :exmp.
8913
8914 .*---------------------------------------------------------------------*
8915 :h4.Allowed matching mechanisms - template superset (charstring in control part)
8916 .*---------------------------------------------------------------------*
8917 :xmp tab=0.
8918
8919 <TC - Allowed matching mechanisms - template superset (charstring in control part)>
8920
8921 <COMPILE>
8922 <VERDICT_LEAF PASS>
8923 <MODULE TTCN x x.ttcn>
8924 module x {
8925
8926 const charstring c1:= "ogin";
8927 const charstring c2:= "dwa";
8928 const charstring c3:= "try";
8929
8930 control{
8931 var template charstring r:= superset (c1, c2, c3);
8932 }
8933
8934 }
8935 <END_MODULE>
8936 <RESULT IF_PASS COUNT 1>
8937 (?im)error.+?superset.+?match.+?cannot.+?used
8938 <END_RESULT>
8939 <RESULT IF_PASS COUNT 1>
8940 (?is)\berror:
8941 <END_RESULT>
8942 <END_TC>
8943
8944 :exmp.
8945
8946 .*---------------------------------------------------------------------*
8947 :h4.Allowed matching mechanisms - template superset (charstring in function)
8948 .*---------------------------------------------------------------------*
8949 :xmp tab=0.
8950
8951 <TC - Allowed matching mechanisms - template superset (charstring in function)>
8952
8953 <COMPILE>
8954 <VERDICT_LEAF PASS>
8955 <MODULE TTCN x x.ttcn>
8956 module x {
8957
8958 const charstring c1:= "ogin";
8959 const charstring c2:= "dwa";
8960 const charstring c3:= "try";
8961
8962 function myFunct(){
8963 var template charstring r:= superset (c1, c2, c3);
8964 }
8965
8966 }
8967 <END_MODULE>
8968 <RESULT IF_PASS COUNT 1>
8969 (?im)error.+?superset.+?match.+?cannot.+?used
8970 <END_RESULT>
8971 <RESULT IF_PASS COUNT 1>
8972 (?is)\berror:
8973 <END_RESULT>
8974 <END_TC>
8975
8976 :exmp.
8977
8978 .*---------------------------------------------------------------------*
8979 :h4.Allowed matching mechanisms - template superset (record in def.part)
8980 .*---------------------------------------------------------------------*
8981 :xmp tab=0.
8982
8983 <TC - Allowed matching mechanisms - template superset (record in def.part)>
8984
8985 <COMPILE>
8986 <VERDICT_LEAF PASS>
8987 <MODULE TTCN x x.ttcn>
8988 module x {
8989
8990 type record recT{
8991 integer f1,
8992 float f2,
8993 charstring f3
8994 }
8995
8996 const recT c1:= { f1:= 1, f2:= 2.0, f3:= "a"};
8997 const recT c2:= { f1:= 5, f2:= 7.0, f3:= "z"};
8998
8999 template recT r:= superset (c1, c2);
9000
9001 }
9002 <END_MODULE>
9003 <RESULT IF_PASS COUNT 1>
9004 (?im)error.+?superset.+?match.+?cannot.+?used
9005 <END_RESULT>
9006 <RESULT IF_PASS COUNT 1>
9007 (?is)\berror:
9008 <END_RESULT>
9009 <END_TC>
9010
9011 :exmp.
9012
9013 .*---------------------------------------------------------------------*
9014 :h4.Allowed matching mechanisms - template superset (record in control part)
9015 .*---------------------------------------------------------------------*
9016 :xmp tab=0.
9017
9018 <TC - Allowed matching mechanisms - template superset (record in control part)>
9019
9020 <COMPILE>
9021 <VERDICT_LEAF PASS>
9022 <MODULE TTCN x x.ttcn>
9023 module x {
9024
9025 type record recT{
9026 integer f1,
9027 float f2,
9028 charstring f3
9029 }
9030
9031 const recT c1:= { f1:= 1, f2:= 2.0, f3:= "a"};
9032 const recT c2:= { f1:= 5, f2:= 7.0, f3:= "z"};
9033
9034 control{
9035 var template recT r:= superset (c1, c2);
9036 }
9037
9038 }
9039 <END_MODULE>
9040 <RESULT IF_PASS COUNT 1>
9041 (?im)error.+?superset.+?match.+?cannot.+?used
9042 <END_RESULT>
9043 <RESULT IF_PASS COUNT 1>
9044 (?is)\berror:
9045 <END_RESULT>
9046 <END_TC>
9047
9048 :exmp.
9049
9050 .*---------------------------------------------------------------------*
9051 :h4.Allowed matching mechanisms - template superset (record in function)
9052 .*---------------------------------------------------------------------*
9053 :xmp tab=0.
9054
9055 <TC - Allowed matching mechanisms - template superset (record in function)>
9056
9057 <COMPILE>
9058 <VERDICT_LEAF PASS>
9059 <MODULE TTCN x x.ttcn>
9060 module x {
9061
9062 type record recT{
9063 integer f1,
9064 float f2,
9065 charstring f3
9066 }
9067
9068 const recT c1:= { f1:= 1, f2:= 2.0, f3:= "a"};
9069 const recT c2:= { f1:= 5, f2:= 7.0, f3:= "z"};
9070
9071 function myFunct(){
9072 var template recT r:= superset (c1, c2);
9073 }
9074
9075 }
9076 <END_MODULE>
9077 <RESULT IF_PASS COUNT 1>
9078 (?im)error.+?superset.+?match.+?cannot.+?used
9079 <END_RESULT>
9080 <RESULT IF_PASS COUNT 1>
9081 (?is)\berror:
9082 <END_RESULT>
9083 <END_TC>
9084
9085 :exmp.
9086
9087 .*---------------------------------------------------------------------*
9088 :h4.Allowed matching mechanisms - template superset (record of in def.part)
9089 .*---------------------------------------------------------------------*
9090 :xmp tab=0.
9091
9092 <TC - Allowed matching mechanisms - template superset (record of in def.part)>
9093
9094 <COMPILE>
9095 <VERDICT_LEAF PASS>
9096 <MODULE TTCN x x.ttcn>
9097 module x {
9098
9099 type record of integer rofT;
9100
9101 const rofT c1:= { 1, 2, 3 };
9102 const rofT c2:= { 4, 5, 6 };
9103
9104 template rofT r:= superset (c1, c2);
9105
9106 }
9107 <END_MODULE>
9108 <RESULT IF_PASS COUNT 1>
9109 (?im)error.+?superset.+?match.+?cannot.+?used
9110 <END_RESULT>
9111 <RESULT IF_PASS COUNT 1>
9112 (?is)\berror:
9113 <END_RESULT>
9114 <END_TC>
9115
9116 :exmp.
9117
9118 .*---------------------------------------------------------------------*
9119 :h4.Allowed matching mechanisms - template superset (record of in control part)
9120 .*---------------------------------------------------------------------*
9121 :xmp tab=0.
9122
9123 <TC - Allowed matching mechanisms - template superset (record of in control part)>
9124
9125 <COMPILE>
9126 <VERDICT_LEAF PASS>
9127 <MODULE TTCN x x.ttcn>
9128 module x {
9129
9130 type record of integer rofT;
9131
9132 const rofT c1:= { 1, 2, 3 };
9133 const rofT c2:= { 4, 5, 6 };
9134
9135 control{
9136 var template rofT r:= superset (c1, c2);
9137 }
9138
9139 }
9140 <END_MODULE>
9141 <RESULT IF_PASS COUNT 1>
9142 (?im)error.+?superset.+?match.+?cannot.+?used
9143 <END_RESULT>
9144 <RESULT IF_PASS COUNT 1>
9145 (?is)\berror:
9146 <END_RESULT>
9147 <END_TC>
9148
9149 :exmp.
9150
9151 .*---------------------------------------------------------------------*
9152 :h4.Allowed matching mechanisms - template superset (record of in function)
9153 .*---------------------------------------------------------------------*
9154 :xmp tab=0.
9155
9156 <TC - Allowed matching mechanisms - template superset (record of in function)>
9157
9158 <COMPILE>
9159 <VERDICT_LEAF PASS>
9160 <MODULE TTCN x x.ttcn>
9161 module x {
9162
9163 type record of integer rofT;
9164
9165 const rofT c1:= { 1, 2, 3 };
9166 const rofT c2:= { 4, 5, 6 };
9167
9168 function myFunct(){
9169 var template rofT r:= superset (c1, c2);
9170 }
9171
9172 }
9173 <END_MODULE>
9174 <RESULT IF_PASS COUNT 1>
9175 (?im)error.+?superset.+?match.+?cannot.+?used
9176 <END_RESULT>
9177 <RESULT IF_PASS COUNT 1>
9178 (?is)\berror:
9179 <END_RESULT>
9180 <END_TC>
9181
9182 :exmp.
9183
9184 .*---------------------------------------------------------------------*
9185 :h4.Allowed matching mechanisms - template superset (set in def.part)
9186 .*---------------------------------------------------------------------*
9187 :xmp tab=0.
9188
9189 <TC - Allowed matching mechanisms - template superset (set in def.part)>
9190
9191 <COMPILE>
9192 <VERDICT_LEAF PASS>
9193 <MODULE TTCN x x.ttcn>
9194 module x {
9195
9196 type set setT{
9197 integer f1,
9198 float f2,
9199 charstring f3
9200 }
9201
9202 const setT c1:= { f1:= 1, f2:= 2.0, f3:= "a"};
9203 const setT c2:= { f1:= 5, f2:= 7.0, f3:= "z"};
9204
9205 template setT r:= superset (c1, c2);
9206
9207 }
9208 <END_MODULE>
9209 <RESULT IF_PASS COUNT 1>
9210 (?im)error.+?superset.+?match.+?cannot.+?used
9211 <END_RESULT>
9212 <RESULT IF_PASS COUNT 1>
9213 (?is)\berror:
9214 <END_RESULT>
9215 <END_TC>
9216
9217 :exmp.
9218
9219 .*---------------------------------------------------------------------*
9220 :h4.Allowed matching mechanisms - template superset (set in control part)
9221 .*---------------------------------------------------------------------*
9222 :xmp tab=0.
9223
9224 <TC - Allowed matching mechanisms - template superset (set in control part)>
9225
9226 <COMPILE>
9227 <VERDICT_LEAF PASS>
9228 <MODULE TTCN x x.ttcn>
9229 module x {
9230
9231 type set setT{
9232 integer f1,
9233 float f2,
9234 charstring f3
9235 }
9236
9237 const setT c1:= { f1:= 1, f2:= 2.0, f3:= "a"};
9238 const setT c2:= { f1:= 5, f2:= 7.0, f3:= "z"};
9239
9240 control{
9241 var template setT r:= superset (c1, c2);
9242 }
9243
9244 }
9245 <END_MODULE>
9246 <RESULT IF_PASS COUNT 1>
9247 (?im)error.+?superset.+?match.+?cannot.+?used
9248 <END_RESULT>
9249 <RESULT IF_PASS COUNT 1>
9250 (?is)\berror:
9251 <END_RESULT>
9252 <END_TC>
9253
9254 :exmp.
9255
9256 .*---------------------------------------------------------------------*
9257 :h4.Allowed matching mechanisms - template superset (set in function)
9258 .*---------------------------------------------------------------------*
9259 :xmp tab=0.
9260
9261 <TC - Allowed matching mechanisms - template superset (set in function)>
9262
9263 <COMPILE>
9264 <VERDICT_LEAF PASS>
9265 <MODULE TTCN x x.ttcn>
9266 module x {
9267
9268 type set setT{
9269 integer f1,
9270 float f2,
9271 charstring f3
9272 }
9273
9274 const setT c1:= { f1:= 1, f2:= 2.0, f3:= "a"};
9275 const setT c2:= { f1:= 5, f2:= 7.0, f3:= "z"};
9276
9277 function myFunct(){
9278 var template setT r:= superset (c1, c2);
9279 }
9280
9281 }
9282 <END_MODULE>
9283 <RESULT IF_PASS COUNT 1>
9284 (?im)error.+?superset.+?match.+?cannot.+?used
9285 <END_RESULT>
9286 <RESULT IF_PASS COUNT 1>
9287 (?is)\berror:
9288 <END_RESULT>
9289 <END_TC>
9290
9291 :exmp.
9292
9293 .*---------------------------------------------------------------------*
9294 :h4.Allowed matching mechanisms - template superset (enumerated in def.part)
9295 .*---------------------------------------------------------------------*
9296 :xmp tab=0.
9297
9298 <TC - Allowed matching mechanisms - template superset (enumerated in def.part)>
9299
9300 <COMPILE>
9301 <VERDICT_LEAF PASS>
9302 <MODULE TTCN x x.ttcn>
9303 module x {
9304
9305 type enumerated enumT { ONE(1), TWO(2), THREE(3) };
9306
9307 const enumT c1:= ONE;
9308 const enumT c2:= TWO;
9309
9310 template enumT r:= superset (c1, c2);
9311
9312 }
9313 <END_MODULE>
9314 <RESULT IF_PASS COUNT 1>
9315 (?im)error.+?superset.+?match.+?cannot.+?used
9316 <END_RESULT>
9317 <RESULT IF_PASS COUNT 1>
9318 (?is)\berror:
9319 <END_RESULT>
9320 <END_TC>
9321
9322 :exmp.
9323
9324 .*---------------------------------------------------------------------*
9325 :h4.Allowed matching mechanisms - template superset (enumerated in control part)
9326 .*---------------------------------------------------------------------*
9327 :xmp tab=0.
9328
9329 <TC - Allowed matching mechanisms - template superset (enumerated in control part)>
9330
9331 <COMPILE>
9332 <VERDICT_LEAF PASS>
9333 <MODULE TTCN x x.ttcn>
9334 module x {
9335
9336 type enumerated enumT { ONE(1), TWO(2), THREE(3) };
9337
9338 const enumT c1:= ONE;
9339 const enumT c2:= TWO;
9340
9341 control{
9342 var template enumT r:= superset (c1, c2);
9343 }
9344
9345 }
9346 <END_MODULE>
9347 <RESULT IF_PASS COUNT 1>
9348 (?im)error.+?superset.+?match.+?cannot.+?used
9349 <END_RESULT>
9350 <RESULT IF_PASS COUNT 1>
9351 (?is)\berror:
9352 <END_RESULT>
9353 <END_TC>
9354
9355 :exmp.
9356
9357 .*---------------------------------------------------------------------*
9358 :h4.Allowed matching mechanisms - template superset (enumerated in function)
9359 .*---------------------------------------------------------------------*
9360 :xmp tab=0.
9361
9362 <TC - Allowed matching mechanisms - template superset (enumerated in function)>
9363
9364 <COMPILE>
9365 <VERDICT_LEAF PASS>
9366 <MODULE TTCN x x.ttcn>
9367 module x {
9368
9369 type enumerated enumT { ONE(1), TWO(2), THREE(3) };
9370
9371 const enumT c1:= ONE;
9372 const enumT c2:= TWO;
9373
9374 function myFunct(){
9375 var template enumT r:= superset (c1, c2);
9376 }
9377
9378 }
9379 <END_MODULE>
9380 <RESULT IF_PASS COUNT 1>
9381 (?im)error.+?superset.+?match.+?cannot.+?used
9382 <END_RESULT>
9383 <RESULT IF_PASS COUNT 1>
9384 (?is)\berror:
9385 <END_RESULT>
9386 <END_TC>
9387
9388 :exmp.
9389
9390 .*---------------------------------------------------------------------*
9391 :h4.Allowed matching mechanisms - template superset (union in def.part)
9392 .*---------------------------------------------------------------------*
9393 :xmp tab=0.
9394
9395 <TC - Allowed matching mechanisms - template superset (union in def.part)>
9396
9397 <COMPILE>
9398 <VERDICT_LEAF PASS>
9399 <MODULE TTCN x x.ttcn>
9400 module x {
9401
9402 type union uniT{
9403 integer f1,
9404 float f2,
9405 charstring f3
9406 }
9407
9408 const uniT c1:= { f1:= 1 };
9409 const uniT c2:= { f2:= 7.0 };
9410
9411 template uniT r:= superset (c1, c2);
9412
9413 }
9414 <END_MODULE>
9415 <RESULT IF_PASS COUNT 1>
9416 (?im)error.+?superset.+?match.+?cannot.+?used
9417 <END_RESULT>
9418 <RESULT IF_PASS COUNT 1>
9419 (?is)\berror:
9420 <END_RESULT>
9421 <END_TC>
9422
9423 :exmp.
9424
9425 .*---------------------------------------------------------------------*
9426 :h4.Allowed matching mechanisms - template superset (union in control part)
9427 .*---------------------------------------------------------------------*
9428 :xmp tab=0.
9429
9430 <TC - Allowed matching mechanisms - template superset (union in control part)>
9431
9432 <COMPILE>
9433 <VERDICT_LEAF PASS>
9434 <MODULE TTCN x x.ttcn>
9435 module x {
9436
9437 type union uniT{
9438 integer f1,
9439 float f2,
9440 charstring f3
9441 }
9442
9443 const uniT c1:= { f1:= 1 };
9444 const uniT c2:= { f2:= 7.0 };
9445
9446 control{
9447 var template uniT r:= superset (c1, c2);
9448 }
9449
9450 }
9451 <END_MODULE>
9452 <RESULT IF_PASS COUNT 1>
9453 (?im)error.+?superset.+?match.+?cannot.+?used
9454 <END_RESULT>
9455 <RESULT IF_PASS COUNT 1>
9456 (?is)\berror:
9457 <END_RESULT>
9458 <END_TC>
9459
9460 :exmp.
9461
9462 .*---------------------------------------------------------------------*
9463 :h4.Allowed matching mechanisms - template superset (union in function)
9464 .*---------------------------------------------------------------------*
9465 :xmp tab=0.
9466
9467 <TC - Allowed matching mechanisms - template superset (union in function)>
9468
9469 <COMPILE>
9470 <VERDICT_LEAF PASS>
9471 <MODULE TTCN x x.ttcn>
9472 module x {
9473
9474 type union uniT{
9475 integer f1,
9476 float f2,
9477 charstring f3
9478 }
9479
9480 const uniT c1:= { f1:= 1 };
9481 const uniT c2:= { f2:= 7.0 };
9482
9483 function myFunct(){
9484 var template uniT r:= superset (c1, c2);
9485 }
9486
9487 }
9488 <END_MODULE>
9489 <RESULT IF_PASS COUNT 1>
9490 (?im)error.+?superset.+?match.+?cannot.+?used
9491 <END_RESULT>
9492 <RESULT IF_PASS COUNT 1>
9493 (?is)\berror:
9494 <END_RESULT>
9495 <END_TC>
9496
9497 :exmp.
9498
9499 .*---------------------------------------------------------------------*
9500 :h4.Allowed matching mechanisms - template superset (array in def. part)
9501 .*---------------------------------------------------------------------*
9502 :xmp tab=0.
9503
9504 <TC - Allowed matching mechanisms - template superset (array in def.part)>
9505
9506 <COMPILE>
9507 <VERDICT_LEAF PASS>
9508 <MODULE TTCN x x.ttcn>
9509 module x {
9510
9511 type integer myint[1];
9512
9513 const myint c1:={1};
9514 const myint c2 :={3};
9515
9516 template myint r := superset(c1,c2);
9517
9518 }
9519 <END_MODULE>
9520 <RESULT IF_PASS COUNT 1>
9521 (?im)error.+?superset.+?match.+?cannot.+?used
9522 <END_RESULT>
9523 <RESULT IF_PASS COUNT 1>
9524 (?is)\berror:
9525 <END_RESULT>
9526 <END_TC>
9527
9528 :exmp.
9529
9530 .*---------------------------------------------------------------------*
9531 :h4.Allowed matching mechanisms - template superset (array in control part)
9532 .*---------------------------------------------------------------------*
9533 :xmp tab=0.
9534
9535 <TC - Allowed matching mechanisms - template superset (array in control part)>
9536
9537 <COMPILE>
9538 <VERDICT_LEAF PASS>
9539 <MODULE TTCN x x.ttcn>
9540 module x {
9541
9542 type integer myint[1];
9543
9544 const myint c1:={1};
9545 const myint c2 :={3};
9546
9547 control{
9548 template myint r := superset(c1,c2);
9549 }
9550 }
9551 <END_MODULE>
9552 <RESULT IF_PASS COUNT 1>
9553 (?im)error.+?superset.+?match.+?cannot.+?used
9554 <END_RESULT>
9555 <RESULT IF_PASS COUNT 1>
9556 (?is)\berror:
9557 <END_RESULT>
9558 <END_TC>
9559
9560 :exmp.
9561
9562 .*---------------------------------------------------------------------*
9563 :h4.Allowed matching mechanisms - template superset (array in function)
9564 .*---------------------------------------------------------------------*
9565 :xmp tab=0.
9566
9567 <TC - Allowed matching mechanisms - template superset (array in function)>
9568
9569 <COMPILE>
9570 <VERDICT_LEAF PASS>
9571 <MODULE TTCN x x.ttcn>
9572 module x {
9573
9574 type integer myint[1];
9575
9576 const myint c1:={1};
9577 const myint c2 :={3};
9578
9579 function myFunct(){
9580 template myint r := superset(c1,c2);
9581 }
9582 }
9583 <END_MODULE>
9584 <RESULT IF_PASS COUNT 1>
9585 (?im)error.+?superset.+?match.+?cannot.+?used
9586 <END_RESULT>
9587 <RESULT IF_PASS COUNT 1>
9588 (?is)\berror:
9589 <END_RESULT>
9590 <END_TC>
9591
9592 :exmp.
9593
9594 .*---------------------------------------------------------------------*
9595 :h4.Allowed matching mechanisms - template subset (boolean in def.part)
9596 .*---------------------------------------------------------------------*
9597 :xmp tab=0.
9598
9599 <TC - Allowed matching mechanisms - template subset (boolean in def.part)>
9600
9601 <COMPILE>
9602 <VERDICT_LEAF PASS>
9603 <MODULE TTCN x x.ttcn>
9604 module x {
9605
9606 const boolean c1:= false;
9607 const boolean c2:= true;
9608
9609 template boolean r:= subset (c1, c2);
9610
9611 }
9612 <END_MODULE>
9613 <RESULT IF_PASS COUNT 1>
9614 (?im)error.+?subset.+?match.+?cannot.+?used
9615 <END_RESULT>
9616 <RESULT IF_PASS COUNT 1>
9617 (?is)\berror:
9618 <END_RESULT>
9619 <END_TC>
9620
9621 :exmp.
9622
9623 .*---------------------------------------------------------------------*
9624 :h4.Allowed matching mechanisms - template subset (boolean in control part)
9625 .*---------------------------------------------------------------------*
9626 :xmp tab=0.
9627
9628 <TC - Allowed matching mechanisms - template subset (boolean in control part)>
9629
9630 <COMPILE>
9631 <VERDICT_LEAF PASS>
9632 <MODULE TTCN x x.ttcn>
9633 module x {
9634
9635 const boolean c1:= false;
9636 const boolean c2:= true;
9637
9638 control{
9639 var template boolean r:= subset (c1, c2);
9640 }
9641
9642 }
9643 <END_MODULE>
9644 <RESULT IF_PASS COUNT 1>
9645 (?im)error.+?subset.+?match.+?cannot.+?used
9646 <END_RESULT>
9647 <RESULT IF_PASS COUNT 1>
9648 (?is)\berror:
9649 <END_RESULT>
9650 <END_TC>
9651
9652 :exmp.
9653
9654 .*---------------------------------------------------------------------*
9655 :h4.Allowed matching mechanisms - template subset (boolean in function)
9656 .*---------------------------------------------------------------------*
9657 :xmp tab=0.
9658
9659 <TC - Allowed matching mechanisms - template subset (boolean in function)>
9660
9661 <COMPILE>
9662 <VERDICT_LEAF PASS>
9663 <MODULE TTCN x x.ttcn>
9664 module x {
9665
9666 const boolean c1:= false;
9667 const boolean c2:= true;
9668
9669 function myFunct(){
9670 var template boolean r:= subset (c1, c2);
9671 }
9672
9673 }
9674 <END_MODULE>
9675 <RESULT IF_PASS COUNT 1>
9676 (?im)error.+?subset.+?match.+?cannot.+?used
9677 <END_RESULT>
9678 <RESULT IF_PASS COUNT 1>
9679 (?is)\berror:
9680 <END_RESULT>
9681 <END_TC>
9682
9683 :exmp.
9684
9685 .*---------------------------------------------------------------------*
9686 :h4.Allowed matching mechanisms - template subset (integer in def.part)
9687 .*---------------------------------------------------------------------*
9688 :xmp tab=0.
9689
9690 <TC - Allowed matching mechanisms - template subset (integer in def.part)>
9691
9692 <COMPILE>
9693 <VERDICT_LEAF PASS>
9694 <MODULE TTCN x x.ttcn>
9695 module x {
9696
9697 const integer c1:= 1;
9698 const integer c2:= 2;
9699 const integer c3:= 3;
9700
9701 template integer r:= subset (c1, c2, c3);
9702
9703 }
9704 <END_MODULE>
9705 <RESULT IF_PASS COUNT 1>
9706 (?im)error.+?subset.+?match.+?cannot.+?used
9707 <END_RESULT>
9708 <RESULT IF_PASS COUNT 1>
9709 (?is)\berror:
9710 <END_RESULT>
9711 <END_TC>
9712
9713 :exmp.
9714
9715 .*---------------------------------------------------------------------*
9716 :h4.Allowed matching mechanisms - template subset (integer in control part)
9717 .*---------------------------------------------------------------------*
9718 :xmp tab=0.
9719
9720 <TC - Allowed matching mechanisms - template subset (integer in control part)>
9721
9722 <COMPILE>
9723 <VERDICT_LEAF PASS>
9724 <MODULE TTCN x x.ttcn>
9725 module x {
9726
9727 const integer c1:= 1;
9728 const integer c2:= 2;
9729 const integer c3:= 3;
9730
9731 control{
9732 var template integer r:= subset (c1, c2, c3);
9733 }
9734
9735 }
9736 <END_MODULE>
9737 <RESULT IF_PASS COUNT 1>
9738 (?im)error.+?subset.+?match.+?cannot.+?used
9739 <END_RESULT>
9740 <RESULT IF_PASS COUNT 1>
9741 (?is)\berror:
9742 <END_RESULT>
9743 <END_TC>
9744
9745 :exmp.
9746
9747 .*---------------------------------------------------------------------*
9748 :h4.Allowed matching mechanisms - template subset (integer in function)
9749 .*---------------------------------------------------------------------*
9750 :xmp tab=0.
9751
9752 <TC - Allowed matching mechanisms - template subset (integer in function)>
9753
9754 <COMPILE>
9755 <VERDICT_LEAF PASS>
9756 <MODULE TTCN x x.ttcn>
9757 module x {
9758
9759 const integer c1:= 1;
9760 const integer c2:= 2;
9761 const integer c3:= 3;
9762
9763 function myFunct(){
9764 var template integer r:= subset (c1, c2, c3);
9765 }
9766
9767 }
9768 <END_MODULE>
9769 <RESULT IF_PASS COUNT 1>
9770 (?im)error.+?subset.+?match.+?cannot.+?used
9771 <END_RESULT>
9772 <RESULT IF_PASS COUNT 1>
9773 (?is)\berror:
9774 <END_RESULT>
9775 <END_TC>
9776
9777 :exmp.
9778
9779 .*---------------------------------------------------------------------*
9780 :h4.Allowed matching mechanisms - template subset (float in def.part)
9781 .*---------------------------------------------------------------------*
9782 :xmp tab=0.
9783
9784 <TC - Allowed matching mechanisms - template subset (float in def.part)>
9785
9786 <COMPILE>
9787 <VERDICT_LEAF PASS>
9788 <MODULE TTCN x x.ttcn>
9789 module x {
9790
9791 const float c1:= 1.6;
9792 const float c2:= 2.4;
9793 const float c3:= 3.9;
9794
9795 template float r:= subset (c1, c2, c3);
9796
9797 }
9798 <END_MODULE>
9799 <RESULT IF_PASS COUNT 1>
9800 (?im)error.+?subset.+?match.+?cannot.+?used
9801 <END_RESULT>
9802 <RESULT IF_PASS COUNT 1>
9803 (?is)\berror:
9804 <END_RESULT>
9805 <END_TC>
9806
9807 :exmp.
9808
9809 .*---------------------------------------------------------------------*
9810 :h4.Allowed matching mechanisms - template subset (float in control part)
9811 .*---------------------------------------------------------------------*
9812 :xmp tab=0.
9813
9814 <TC - Allowed matching mechanisms - template subset (float in control part)>
9815
9816 <COMPILE>
9817 <VERDICT_LEAF PASS>
9818 <MODULE TTCN x x.ttcn>
9819 module x {
9820
9821 const float c1:= 1.1;
9822 const float c2:= 2.3;
9823 const float c3:= 3.1;
9824
9825 control{
9826 var template float r:= subset (c1, c2, c3);
9827 }
9828
9829 }
9830 <END_MODULE>
9831 <RESULT IF_PASS COUNT 1>
9832 (?im)error.+?subset.+?match.+?cannot.+?used
9833 <END_RESULT>
9834 <RESULT IF_PASS COUNT 1>
9835 (?is)\berror:
9836 <END_RESULT>
9837 <END_TC>
9838
9839 :exmp.
9840
9841 .*---------------------------------------------------------------------*
9842 :h4.Allowed matching mechanisms - template subset (float in function)
9843 .*---------------------------------------------------------------------*
9844 :xmp tab=0.
9845
9846 <TC - Allowed matching mechanisms - template subset (float in function)>
9847
9848 <COMPILE>
9849 <VERDICT_LEAF PASS>
9850 <MODULE TTCN x x.ttcn>
9851 module x {
9852
9853 const float c1:= 1.1;
9854 const float c2:= 2.9;
9855 const float c3:= 3.2;
9856
9857 function myFunct(){
9858 var template float r:= subset (c1, c2, c3);
9859 }
9860
9861 }
9862 <END_MODULE>
9863 <RESULT IF_PASS COUNT 1>
9864 (?im)error.+?subset.+?match.+?cannot.+?used
9865 <END_RESULT>
9866 <RESULT IF_PASS COUNT 1>
9867 (?is)\berror:
9868 <END_RESULT>
9869 <END_TC>
9870
9871 :exmp.
9872
9873 .*---------------------------------------------------------------------*
9874 :h4.Allowed matching mechanisms - template subset (bitstring in def.part)
9875 .*---------------------------------------------------------------------*
9876 :xmp tab=0.
9877
9878 <TC - Allowed matching mechanisms - template subset (bitstring in def.part)>
9879
9880 <COMPILE>
9881 <VERDICT_LEAF PASS>
9882 <MODULE TTCN x x.ttcn>
9883 module x {
9884
9885 const bitstring c1:= '101'B;
9886 const bitstring c2:= '110'B;
9887 const bitstring c3:= '111'B;
9888
9889 template bitstring r:= subset (c1, c2, c3);
9890
9891 }
9892 <END_MODULE>
9893 <RESULT IF_PASS COUNT 1>
9894 (?im)error.+?subset.+?match.+?cannot.+?used
9895 <END_RESULT>
9896 <RESULT IF_PASS COUNT 1>
9897 (?is)\berror:
9898 <END_RESULT>
9899 <END_TC>
9900
9901 :exmp.
9902
9903 .*---------------------------------------------------------------------*
9904 :h4.Allowed matching mechanisms - template subset (bitstring in control part)
9905 .*---------------------------------------------------------------------*
9906 :xmp tab=0.
9907
9908 <TC - Allowed matching mechanisms - template subset (bitstring in control part)>
9909
9910 <COMPILE>
9911 <VERDICT_LEAF PASS>
9912 <MODULE TTCN x x.ttcn>
9913 module x {
9914
9915 const bitstring c1:= '101'B;
9916 const bitstring c2:= '110'B;
9917 const bitstring c3:= '111'B;
9918
9919 control{
9920 var template bitstring r:= subset (c1, c2, c3);
9921 }
9922
9923 }
9924 <END_MODULE>
9925 <RESULT IF_PASS COUNT 1>
9926 (?im)error.+?subset.+?match.+?cannot.+?used
9927 <END_RESULT>
9928 <RESULT IF_PASS COUNT 1>
9929 (?is)\berror:
9930 <END_RESULT>
9931 <END_TC>
9932
9933 :exmp.
9934
9935 .*---------------------------------------------------------------------*
9936 :h4.Allowed matching mechanisms - template subset (bitstring in function)
9937 .*---------------------------------------------------------------------*
9938 :xmp tab=0.
9939
9940 <TC - Allowed matching mechanisms - template subset (bitstring in function)>
9941
9942 <COMPILE>
9943 <VERDICT_LEAF PASS>
9944 <MODULE TTCN x x.ttcn>
9945 module x {
9946
9947 const bitstring c1:= '101'B;
9948 const bitstring c2:= '110'B;
9949 const bitstring c3:= '111'B;
9950
9951 function myFunct(){
9952 var template bitstring r:= subset (c1, c2, c3);
9953 }
9954
9955 }
9956 <END_MODULE>
9957 <RESULT IF_PASS COUNT 1>
9958 (?im)error.+?subset.+?match.+?cannot.+?used
9959 <END_RESULT>
9960 <RESULT IF_PASS COUNT 1>
9961 (?is)\berror:
9962 <END_RESULT>
9963 <END_TC>
9964
9965 :exmp.
9966
9967 .*---------------------------------------------------------------------*
9968 :h4.Allowed matching mechanisms - template subset (octetstring in def.part)
9969 .*---------------------------------------------------------------------*
9970 :xmp tab=0.
9971
9972 <TC - Allowed matching mechanisms - template subset (octetstring in def.part)>
9973
9974 <COMPILE>
9975 <VERDICT_LEAF PASS>
9976 <MODULE TTCN x x.ttcn>
9977 module x {
9978
9979 const octetstring c1:= '1011'O;
9980 const octetstring c2:= '1110'O;
9981 const octetstring c3:= '1111'O;
9982
9983 template octetstring r:= subset (c1, c2, c3);
9984
9985 }
9986 <END_MODULE>
9987 <RESULT IF_PASS COUNT 1>
9988 (?im)error.+?subset.+?match.+?cannot.+?used
9989 <END_RESULT>
9990 <RESULT IF_PASS COUNT 1>
9991 (?is)\berror:
9992 <END_RESULT>
9993 <END_TC>
9994
9995 :exmp.
9996
9997 .*---------------------------------------------------------------------*
9998 :h4.Allowed matching mechanisms - template subset (octetstring in control part)
9999 .*---------------------------------------------------------------------*
10000 :xmp tab=0.
10001
10002 <TC - Allowed matching mechanisms - template subset (octetstring in control part)>
10003
10004 <COMPILE>
10005 <VERDICT_LEAF PASS>
10006 <MODULE TTCN x x.ttcn>
10007 module x {
10008
10009 const octetstring c1:= '1011'O;
10010 const octetstring c2:= '1110'O;
10011 const octetstring c3:= '1111'O;
10012
10013 control{
10014 var template octetstring r:= subset (c1, c2, c3);
10015 }
10016
10017 }
10018 <END_MODULE>
10019 <RESULT IF_PASS COUNT 1>
10020 (?im)error.+?subset.+?match.+?cannot.+?used
10021 <END_RESULT>
10022 <RESULT IF_PASS COUNT 1>
10023 (?is)\berror:
10024 <END_RESULT>
10025 <END_TC>
10026
10027 :exmp.
10028
10029 .*---------------------------------------------------------------------*
10030 :h4.Allowed matching mechanisms - template subset (octetstring in function)
10031 .*---------------------------------------------------------------------*
10032 :xmp tab=0.
10033
10034 <TC - Allowed matching mechanisms - template subset (octetstring in function)>
10035
10036 <COMPILE>
10037 <VERDICT_LEAF PASS>
10038 <MODULE TTCN x x.ttcn>
10039 module x {
10040
10041 const octetstring c1:= '1011'O;
10042 const octetstring c2:= '1110'O;
10043 const octetstring c3:= '1111'O;
10044
10045 function myFunct(){
10046 var template octetstring r:= subset (c1, c2, c3);
10047 }
10048
10049 }
10050 <END_MODULE>
10051 <RESULT IF_PASS COUNT 1>
10052 (?im)error.+?subset.+?match.+?cannot.+?used
10053 <END_RESULT>
10054 <RESULT IF_PASS COUNT 1>
10055 (?is)\berror:
10056 <END_RESULT>
10057 <END_TC>
10058
10059 :exmp.
10060
10061 .*---------------------------------------------------------------------*
10062 :h4.Allowed matching mechanisms - template subset (hexstring in def.part)
10063 .*---------------------------------------------------------------------*
10064 :xmp tab=0.
10065
10066 <TC - Allowed matching mechanisms - template subset (hexstring in def.part)>
10067
10068 <COMPILE>
10069 <VERDICT_LEAF PASS>
10070 <MODULE TTCN x x.ttcn>
10071 module x {
10072
10073 const hexstring c1:= '1011'H;
10074 const hexstring c2:= '1110'H;
10075 const hexstring c3:= '1111'H;
10076
10077 template hexstring r:= subset (c1, c2, c3);
10078
10079 }
10080 <END_MODULE>
10081 <RESULT IF_PASS COUNT 1>
10082 (?im)error.+?subset.+?match.+?cannot.+?used
10083 <END_RESULT>
10084 <RESULT IF_PASS COUNT 1>
10085 (?is)\berror:
10086 <END_RESULT>
10087 <END_TC>
10088
10089 :exmp.
10090
10091 .*---------------------------------------------------------------------*
10092 :h4.Allowed matching mechanisms - template subset (hexstring in control part)
10093 .*---------------------------------------------------------------------*
10094 :xmp tab=0.
10095
10096 <TC - Allowed matching mechanisms - template subset (hexstring in control part)>
10097
10098 <COMPILE>
10099 <VERDICT_LEAF PASS>
10100 <MODULE TTCN x x.ttcn>
10101 module x {
10102
10103 const hexstring c1:= '1011'H;
10104 const hexstring c2:= '1110'H;
10105 const hexstring c3:= '1111'H;
10106
10107 control{
10108 var template hexstring r:= subset (c1, c2, c3);
10109 }
10110
10111 }
10112 <END_MODULE>
10113 <RESULT IF_PASS COUNT 1>
10114 (?im)error.+?subset.+?match.+?cannot.+?used
10115 <END_RESULT>
10116 <RESULT IF_PASS COUNT 1>
10117 (?is)\berror:
10118 <END_RESULT>
10119 <END_TC>
10120
10121 :exmp.
10122
10123 .*---------------------------------------------------------------------*
10124 :h4.Allowed matching mechanisms - template subset (hexstring in function)
10125 .*---------------------------------------------------------------------*
10126 :xmp tab=0.
10127
10128 <TC - Allowed matching mechanisms - template subset (hexstring in function)>
10129
10130 <COMPILE>
10131 <VERDICT_LEAF PASS>
10132 <MODULE TTCN x x.ttcn>
10133 module x {
10134
10135 const hexstring c1:= '1011'H;
10136 const hexstring c2:= '1110'H;
10137 const hexstring c3:= '1111'H;
10138
10139 function myFunct(){
10140 var template hexstring r:= subset (c1, c2, c3);
10141 }
10142
10143 }
10144 <END_MODULE>
10145 <RESULT IF_PASS COUNT 1>
10146 (?im)error.+?subset.+?match.+?cannot.+?used
10147 <END_RESULT>
10148 <RESULT IF_PASS COUNT 1>
10149 (?is)\berror:
10150 <END_RESULT>
10151 <END_TC>
10152
10153 :exmp.
10154
10155 .*---------------------------------------------------------------------*
10156 :h4.Allowed matching mechanisms - template subset (charstring in def.part)
10157 .*---------------------------------------------------------------------*
10158 :xmp tab=0.
10159
10160 <TC - Allowed matching mechanisms - template subset (charstring in def.part)>
10161
10162 <COMPILE>
10163 <VERDICT_LEAF PASS>
10164 <MODULE TTCN x x.ttcn>
10165 module x {
10166
10167 const charstring c1:= "ogin";
10168 const charstring c2:= "dwa";
10169 const charstring c3:= "try";
10170
10171 template charstring r:= subset (c1, c2, c3);
10172
10173 }
10174 <END_MODULE>
10175 <RESULT IF_PASS COUNT 1>
10176 (?im)error.+?subset.+?match.+?cannot.+?used
10177 <END_RESULT>
10178 <RESULT IF_PASS COUNT 1>
10179 (?is)\berror:
10180 <END_RESULT>
10181 <END_TC>
10182
10183 :exmp.
10184
10185 .*---------------------------------------------------------------------*
10186 :h4.Allowed matching mechanisms - template subset (charstring in control part)
10187 .*---------------------------------------------------------------------*
10188 :xmp tab=0.
10189
10190 <TC - Allowed matching mechanisms - template subset (charstring in control part)>
10191
10192 <COMPILE>
10193 <VERDICT_LEAF PASS>
10194 <MODULE TTCN x x.ttcn>
10195 module x {
10196
10197 const charstring c1:= "ogin";
10198 const charstring c2:= "dwa";
10199 const charstring c3:= "try";
10200
10201 control{
10202 var template charstring r:= subset (c1, c2, c3);
10203 }
10204
10205 }
10206 <END_MODULE>
10207 <RESULT IF_PASS COUNT 1>
10208 (?im)error.+?subset.+?match.+?cannot.+?used
10209 <END_RESULT>
10210 <RESULT IF_PASS COUNT 1>
10211 (?is)\berror:
10212 <END_RESULT>
10213 <END_TC>
10214
10215 :exmp.
10216
10217 .*---------------------------------------------------------------------*
10218 :h4.Allowed matching mechanisms - template subset (charstring in function)
10219 .*---------------------------------------------------------------------*
10220 :xmp tab=0.
10221
10222 <TC - Allowed matching mechanisms - template subset (charstring in function)>
10223
10224 <COMPILE>
10225 <VERDICT_LEAF PASS>
10226 <MODULE TTCN x x.ttcn>
10227 module x {
10228
10229 const charstring c1:= "ogin";
10230 const charstring c2:= "dwa";
10231 const charstring c3:= "try";
10232
10233 function myFunct(){
10234 var template charstring r:= subset (c1, c2, c3);
10235 }
10236
10237 }
10238 <END_MODULE>
10239 <RESULT IF_PASS COUNT 1>
10240 (?im)error.+?subset.+?match.+?cannot.+?used
10241 <END_RESULT>
10242 <RESULT IF_PASS COUNT 1>
10243 (?is)\berror:
10244 <END_RESULT>
10245 <END_TC>
10246
10247 :exmp.
10248
10249 .*---------------------------------------------------------------------*
10250 :h4.Allowed matching mechanisms - template subset (record in def.part)
10251 .*---------------------------------------------------------------------*
10252 :xmp tab=0.
10253
10254 <TC - Allowed matching mechanisms - template subset (record in def.part)>
10255
10256 <COMPILE>
10257 <VERDICT_LEAF PASS>
10258 <MODULE TTCN x x.ttcn>
10259 module x {
10260
10261 type record recT{
10262 integer f1,
10263 float f2,
10264 charstring f3
10265 }
10266
10267 const recT c1:= { f1:= 1, f2:= 2.0, f3:= "a"};
10268 const recT c2:= { f1:= 5, f2:= 7.0, f3:= "z"};
10269
10270 template recT r:= subset (c1, c2);
10271
10272 }
10273 <END_MODULE>
10274 <RESULT IF_PASS COUNT 1>
10275 (?im)error.+?subset.+?match.+?cannot.+?used
10276 <END_RESULT>
10277 <RESULT IF_PASS COUNT 1>
10278 (?is)\berror:
10279 <END_RESULT>
10280 <END_TC>
10281
10282 :exmp.
10283
10284 .*---------------------------------------------------------------------*
10285 :h4.Allowed matching mechanisms - template subset (record in control part)
10286 .*---------------------------------------------------------------------*
10287 :xmp tab=0.
10288
10289 <TC - Allowed matching mechanisms - template subset (record in control part)>
10290
10291 <COMPILE>
10292 <VERDICT_LEAF PASS>
10293 <MODULE TTCN x x.ttcn>
10294 module x {
10295
10296 type record recT{
10297 integer f1,
10298 float f2,
10299 charstring f3
10300 }
10301
10302 const recT c1:= { f1:= 1, f2:= 2.0, f3:= "a"};
10303 const recT c2:= { f1:= 5, f2:= 7.0, f3:= "z"};
10304
10305 control{
10306 var template recT r:= subset (c1, c2);
10307 }
10308
10309 }
10310 <END_MODULE>
10311 <RESULT IF_PASS COUNT 1>
10312 (?im)error.+?subset.+?match.+?cannot.+?used
10313 <END_RESULT>
10314 <RESULT IF_PASS COUNT 1>
10315 (?is)\berror:
10316 <END_RESULT>
10317 <END_TC>
10318
10319 :exmp.
10320
10321 .*---------------------------------------------------------------------*
10322 :h4.Allowed matching mechanisms - template subset (record in function)
10323 .*---------------------------------------------------------------------*
10324 :xmp tab=0.
10325
10326 <TC - Allowed matching mechanisms - template subset (record in function)>
10327
10328 <COMPILE>
10329 <VERDICT_LEAF PASS>
10330 <MODULE TTCN x x.ttcn>
10331 module x {
10332
10333 type record recT{
10334 integer f1,
10335 float f2,
10336 charstring f3
10337 }
10338
10339 const recT c1:= { f1:= 1, f2:= 2.0, f3:= "a"};
10340 const recT c2:= { f1:= 5, f2:= 7.0, f3:= "z"};
10341
10342 function myFunct(){
10343 var template recT r:= subset (c1, c2);
10344 }
10345
10346 }
10347 <END_MODULE>
10348 <RESULT IF_PASS COUNT 1>
10349 (?im)error.+?subset.+?match.+?cannot.+?used
10350 <END_RESULT>
10351 <RESULT IF_PASS COUNT 1>
10352 (?is)\berror:
10353 <END_RESULT>
10354 <END_TC>
10355
10356 :exmp.
10357
10358 .*---------------------------------------------------------------------*
10359 :h4.Allowed matching mechanisms - template subset (record of in def.part)
10360 .*---------------------------------------------------------------------*
10361 :xmp tab=0.
10362
10363 <TC - Allowed matching mechanisms - template subset (record of in def.part)>
10364
10365 <COMPILE>
10366 <VERDICT_LEAF PASS>
10367 <MODULE TTCN x x.ttcn>
10368 module x {
10369
10370 type record of integer rofT;
10371
10372 const rofT c1:= { 1, 2, 3 };
10373 const rofT c2:= { 4, 5, 6 };
10374
10375 template rofT r:= subset (c1, c2);
10376
10377 }
10378 <END_MODULE>
10379 <RESULT IF_PASS COUNT 1>
10380 (?im)error.+?subset.+?match.+?cannot.+?used
10381 <END_RESULT>
10382 <RESULT IF_PASS COUNT 1>
10383 (?is)\berror:
10384 <END_RESULT>
10385 <END_TC>
10386
10387 :exmp.
10388
10389 .*---------------------------------------------------------------------*
10390 :h4.Allowed matching mechanisms - template subset (record of in control part)
10391 .*---------------------------------------------------------------------*
10392 :xmp tab=0.
10393
10394 <TC - Allowed matching mechanisms - template subset (record of in control part)>
10395
10396 <COMPILE>
10397 <VERDICT_LEAF PASS>
10398 <MODULE TTCN x x.ttcn>
10399 module x {
10400
10401 type record of integer rofT;
10402
10403 const rofT c1:= { 1, 2, 3 };
10404 const rofT c2:= { 4, 5, 6 };
10405
10406 control{
10407 var template rofT r:= subset (c1, c2);
10408 }
10409
10410 }
10411 <END_MODULE>
10412 <RESULT IF_PASS COUNT 1>
10413 (?im)error.+?subset.+?match.+?cannot.+?used
10414 <END_RESULT>
10415 <RESULT IF_PASS COUNT 1>
10416 (?is)\berror:
10417 <END_RESULT>
10418 <END_TC>
10419
10420 :exmp.
10421
10422 .*---------------------------------------------------------------------*
10423 :h4.Allowed matching mechanisms - template subset (record of in function)
10424 .*---------------------------------------------------------------------*
10425 :xmp tab=0.
10426
10427 <TC - Allowed matching mechanisms - template subset (record of in function)>
10428
10429 <COMPILE>
10430 <VERDICT_LEAF PASS>
10431 <MODULE TTCN x x.ttcn>
10432 module x {
10433
10434 type record of integer rofT;
10435
10436 const rofT c1:= { 1, 2, 3 };
10437 const rofT c2:= { 4, 5, 6 };
10438
10439 function myFunct(){
10440 var template rofT r:= subset (c1, c2);
10441 }
10442
10443 }
10444 <END_MODULE>
10445 <RESULT IF_PASS COUNT 1>
10446 (?im)error.+?subset.+?match.+?cannot.+?used
10447 <END_RESULT>
10448 <RESULT IF_PASS COUNT 1>
10449 (?is)\berror:
10450 <END_RESULT>
10451 <END_TC>
10452
10453 :exmp.
10454
10455 .*---------------------------------------------------------------------*
10456 :h4.Allowed matching mechanisms - template subset (set in def.part)
10457 .*---------------------------------------------------------------------*
10458 :xmp tab=0.
10459
10460 <TC - Allowed matching mechanisms - template subset (set in def.part)>
10461
10462 <COMPILE>
10463 <VERDICT_LEAF PASS>
10464 <MODULE TTCN x x.ttcn>
10465 module x {
10466
10467 type set setT{
10468 integer f1,
10469 float f2,
10470 charstring f3
10471 }
10472
10473 const setT c1:= { f1:= 1, f2:= 2.0, f3:= "a"};
10474 const setT c2:= { f1:= 5, f2:= 7.0, f3:= "z"};
10475
10476 template setT r:= subset (c1, c2);
10477
10478 }
10479 <END_MODULE>
10480 <RESULT IF_PASS COUNT 1>
10481 (?im)error.+?subset.+?match.+?cannot.+?used
10482 <END_RESULT>
10483 <RESULT IF_PASS COUNT 1>
10484 (?is)\berror:
10485 <END_RESULT>
10486 <END_TC>
10487
10488 :exmp.
10489
10490 .*---------------------------------------------------------------------*
10491 :h4.Allowed matching mechanisms - template subset (set in control part)
10492 .*---------------------------------------------------------------------*
10493 :xmp tab=0.
10494
10495 <TC - Allowed matching mechanisms - template subset (set in control part)>
10496
10497 <COMPILE>
10498 <VERDICT_LEAF PASS>
10499 <MODULE TTCN x x.ttcn>
10500 module x {
10501
10502 type set setT{
10503 integer f1,
10504 float f2,
10505 charstring f3
10506 }
10507
10508 const setT c1:= { f1:= 1, f2:= 2.0, f3:= "a"};
10509 const setT c2:= { f1:= 5, f2:= 7.0, f3:= "z"};
10510
10511 control{
10512 var template setT r:= subset (c1, c2);
10513 }
10514
10515 }
10516 <END_MODULE>
10517 <RESULT IF_PASS COUNT 1>
10518 (?im)error.+?subset.+?match.+?cannot.+?used
10519 <END_RESULT>
10520 <RESULT IF_PASS COUNT 1>
10521 (?is)\berror:
10522 <END_RESULT>
10523 <END_TC>
10524
10525 :exmp.
10526
10527 .*---------------------------------------------------------------------*
10528 :h4.Allowed matching mechanisms - template subset (set in function)
10529 .*---------------------------------------------------------------------*
10530 :xmp tab=0.
10531
10532 <TC - Allowed matching mechanisms - template subset (set in function)>
10533
10534 <COMPILE>
10535 <VERDICT_LEAF PASS>
10536 <MODULE TTCN x x.ttcn>
10537 module x {
10538
10539 type set setT{
10540 integer f1,
10541 float f2,
10542 charstring f3
10543 }
10544
10545 const setT c1:= { f1:= 1, f2:= 2.0, f3:= "a"};
10546 const setT c2:= { f1:= 5, f2:= 7.0, f3:= "z"};
10547
10548 function myFunct(){
10549 var template setT r:= subset (c1, c2);
10550 }
10551
10552 }
10553 <END_MODULE>
10554 <RESULT IF_PASS COUNT 1>
10555 (?im)error.+?subset.+?match.+?cannot.+?used
10556 <END_RESULT>
10557 <RESULT IF_PASS COUNT 1>
10558 (?is)\berror:
10559 <END_RESULT>
10560 <END_TC>
10561
10562 :exmp.
10563
10564 .*---------------------------------------------------------------------*
10565 :h4.Allowed matching mechanisms - template subset (enumerated in def.part)
10566 .*---------------------------------------------------------------------*
10567 :xmp tab=0.
10568
10569 <TC - Allowed matching mechanisms - template subset (enumerated in def.part)>
10570
10571 <COMPILE>
10572 <VERDICT_LEAF PASS>
10573 <MODULE TTCN x x.ttcn>
10574 module x {
10575
10576 type enumerated enumT { ONE(1), TWO(2), THREE(3) };
10577
10578 const enumT c1:= ONE;
10579 const enumT c2:= TWO;
10580
10581 template enumT r:= subset (c1, c2);
10582
10583 }
10584 <END_MODULE>
10585 <RESULT IF_PASS COUNT 1>
10586 (?im)error.+?subset.+?match.+?cannot.+?used
10587 <END_RESULT>
10588 <RESULT IF_PASS COUNT 1>
10589 (?is)\berror:
10590 <END_RESULT>
10591 <END_TC>
10592
10593 :exmp.
10594
10595 .*---------------------------------------------------------------------*
10596 :h4.Allowed matching mechanisms - template subset (enumerated in control part)
10597 .*---------------------------------------------------------------------*
10598 :xmp tab=0.
10599
10600 <TC - Allowed matching mechanisms - template subset (enumerated in control part)>
10601
10602 <COMPILE>
10603 <VERDICT_LEAF PASS>
10604 <MODULE TTCN x x.ttcn>
10605 module x {
10606
10607 type enumerated enumT { ONE(1), TWO(2), THREE(3) };
10608
10609 const enumT c1:= ONE;
10610 const enumT c2:= TWO;
10611
10612 control{
10613 var template enumT r:= subset (c1, c2);
10614 }
10615
10616 }
10617 <END_MODULE>
10618 <RESULT IF_PASS COUNT 1>
10619 (?im)error.+?subset.+?match.+?cannot.+?used
10620 <END_RESULT>
10621 <RESULT IF_PASS COUNT 1>
10622 (?is)\berror:
10623 <END_RESULT>
10624 <END_TC>
10625
10626 :exmp.
10627
10628 .*---------------------------------------------------------------------*
10629 :h4.Allowed matching mechanisms - template subset (enumerated in function)
10630 .*---------------------------------------------------------------------*
10631 :xmp tab=0.
10632
10633 <TC - Allowed matching mechanisms - template subset (enumerated in function)>
10634
10635 <COMPILE>
10636 <VERDICT_LEAF PASS>
10637 <MODULE TTCN x x.ttcn>
10638 module x {
10639
10640 type enumerated enumT { ONE(1), TWO(2), THREE(3) };
10641
10642 const enumT c1:= ONE;
10643 const enumT c2:= TWO;
10644
10645 function myFunct(){
10646 var template enumT r:= subset (c1, c2);
10647 }
10648
10649 }
10650 <END_MODULE>
10651 <RESULT IF_PASS COUNT 1>
10652 (?im)error.+?subset.+?match.+?cannot.+?used
10653 <END_RESULT>
10654 <RESULT IF_PASS COUNT 1>
10655 (?is)\berror:
10656 <END_RESULT>
10657 <END_TC>
10658
10659 :exmp.
10660
10661 .*---------------------------------------------------------------------*
10662 :h4.Allowed matching mechanisms - template subset (union in def.part)
10663 .*---------------------------------------------------------------------*
10664 :xmp tab=0.
10665
10666 <TC - Allowed matching mechanisms - template subset (union in def.part)>
10667
10668 <COMPILE>
10669 <VERDICT_LEAF PASS>
10670 <MODULE TTCN x x.ttcn>
10671 module x {
10672
10673 type union uniT{
10674 integer f1,
10675 float f2,
10676 charstring f3
10677 }
10678
10679 const uniT c1:= { f1:= 1 };
10680 const uniT c2:= { f2:= 7.0 };
10681
10682 template uniT r:= subset (c1, c2);
10683
10684 }
10685 <END_MODULE>
10686 <RESULT IF_PASS COUNT 1>
10687 (?im)error.+?subset.+?match.+?cannot.+?used
10688 <END_RESULT>
10689 <RESULT IF_PASS COUNT 1>
10690 (?is)\berror:
10691 <END_RESULT>
10692 <END_TC>
10693
10694 :exmp.
10695
10696 .*---------------------------------------------------------------------*
10697 :h4.Allowed matching mechanisms - template subset (union in control part)
10698 .*---------------------------------------------------------------------*
10699 :xmp tab=0.
10700
10701 <TC - Allowed matching mechanisms - template subset (union in control part)>
10702
10703 <COMPILE>
10704 <VERDICT_LEAF PASS>
10705 <MODULE TTCN x x.ttcn>
10706 module x {
10707
10708 type union uniT{
10709 integer f1,
10710 float f2,
10711 charstring f3
10712 }
10713
10714 const uniT c1:= { f1:= 1 };
10715 const uniT c2:= { f2:= 7.0 };
10716
10717 control{
10718 var template uniT r:= subset (c1, c2);
10719 }
10720
10721 }
10722 <END_MODULE>
10723 <RESULT IF_PASS COUNT 1>
10724 (?im)error.+?subset.+?match.+?cannot.+?used
10725 <END_RESULT>
10726 <RESULT IF_PASS COUNT 1>
10727 (?is)\berror:
10728 <END_RESULT>
10729 <END_TC>
10730
10731 :exmp.
10732
10733 .*---------------------------------------------------------------------*
10734 :h4.Allowed matching mechanisms - template subset (union in function)
10735 .*---------------------------------------------------------------------*
10736 :xmp tab=0.
10737
10738 <TC - Allowed matching mechanisms - template subset (union in function)>
10739
10740 <COMPILE>
10741 <VERDICT_LEAF PASS>
10742 <MODULE TTCN x x.ttcn>
10743 module x {
10744
10745 type union uniT{
10746 integer f1,
10747 float f2,
10748 charstring f3
10749 }
10750
10751 const uniT c1:= { f1:= 1 };
10752 const uniT c2:= { f2:= 7.0 };
10753
10754 function myFunct(){
10755 var template uniT r:= subset (c1, c2);
10756 }
10757
10758 }
10759 <END_MODULE>
10760 <RESULT IF_PASS COUNT 1>
10761 (?im)error.+?subset.+?match.+?cannot.+?used
10762 <END_RESULT>
10763 <RESULT IF_PASS COUNT 1>
10764 (?is)\berror:
10765 <END_RESULT>
10766 <END_TC>
10767
10768 :exmp.
10769
10770 .*---------------------------------------------------------------------*
10771 :h4.Allowed matching mechanisms - template subset (array in def. part)
10772 .*---------------------------------------------------------------------*
10773 :xmp tab=0.
10774
10775 <TC - Allowed matching mechanisms - template subset (array in def.part)>
10776
10777 <COMPILE>
10778 <VERDICT_LEAF PASS>
10779 <MODULE TTCN x x.ttcn>
10780 module x {
10781
10782 type integer myint[1];
10783
10784 const myint c1:={1};
10785 const myint c2 :={3};
10786
10787 template myint r := subset(c1,c2);
10788
10789 }
10790 <END_MODULE>
10791 <RESULT IF_PASS COUNT 1>
10792 (?im)error.+?subset.+?match.+?cannot.+?used
10793 <END_RESULT>
10794 <RESULT IF_PASS COUNT 1>
10795 (?is)\berror:
10796 <END_RESULT>
10797 <END_TC>
10798
10799 :exmp.
10800
10801 .*---------------------------------------------------------------------*
10802 :h4.Allowed matching mechanisms - template subset (array in control part)
10803 .*---------------------------------------------------------------------*
10804 :xmp tab=0.
10805
10806 <TC - Allowed matching mechanisms - template subset (array in control part)>
10807
10808 <COMPILE>
10809 <VERDICT_LEAF PASS>
10810 <MODULE TTCN x x.ttcn>
10811 module x {
10812
10813 type integer myint[1];
10814
10815 const myint c1:={1};
10816 const myint c2 :={3};
10817
10818 control{
10819 template myint r := subset(c1,c2);
10820 }
10821 }
10822 <END_MODULE>
10823 <RESULT IF_PASS COUNT 1>
10824 (?im)error.+?subset.+?match.+?cannot.+?used
10825 <END_RESULT>
10826 <RESULT IF_PASS COUNT 1>
10827 (?is)\berror:
10828 <END_RESULT>
10829 <END_TC>
10830
10831 :exmp.
10832
10833 .*---------------------------------------------------------------------*
10834 :h4.Allowed matching mechanisms - template subset (array in function)
10835 .*---------------------------------------------------------------------*
10836 :xmp tab=0.
10837
10838 <TC - Allowed matching mechanisms - template subset (array in function)>
10839
10840 <COMPILE>
10841 <VERDICT_LEAF PASS>
10842 <MODULE TTCN x x.ttcn>
10843 module x {
10844
10845 type integer myint[1];
10846
10847 const myint c1:={1};
10848 const myint c2 :={3};
10849
10850 function myFunct(){
10851 template myint r := subset(c1,c2);
10852 }
10853 }
10854 <END_MODULE>
10855 <RESULT IF_PASS COUNT 1>
10856 (?im)error.+?subset.+?match.+?cannot.+?used
10857 <END_RESULT>
10858 <RESULT IF_PASS COUNT 1>
10859 (?is)\berror:
10860 <END_RESULT>
10861 <END_TC>
10862
10863 :exmp.
10864
10865 .*---------------------------------------------------------------------*
10866 :h4.Allowed matching mechanisms - template length-restriction (boolean in def.part)
10867 .*---------------------------------------------------------------------*
10868 :xmp tab=0.
10869
10870 <TC - Allowed matching mechanisms - template length-restriction (boolean in def.part)>
10871
10872 <COMPILE>
10873 <VERDICT_LEAF PASS>
10874 <MODULE TTCN x x.ttcn>
10875 module x {
10876
10877 template boolean r:= ? length(1);
10878
10879 }
10880 <END_MODULE>
10881 <RESULT IF_PASS COUNT 1>
10882 (?im)error.+?Length.+?restriction.+?cannot.+?used
10883 <END_RESULT>
10884 <RESULT IF_PASS COUNT 1>
10885 (?is)\berror:
10886 <END_RESULT>
10887 <END_TC>
10888
10889 :exmp.
10890
10891 .*---------------------------------------------------------------------*
10892 :h4.Allowed matching mechanisms - template length-restriction (boolean in control part)
10893 .*---------------------------------------------------------------------*
10894 :xmp tab=0.
10895
10896 <TC - Allowed matching mechanisms - template length-restriction (boolean in control part)>
10897
10898 <COMPILE>
10899 <VERDICT_LEAF PASS>
10900 <MODULE TTCN x x.ttcn>
10901 module x {
10902
10903 control{
10904 var template boolean r:= ? length(1);
10905 }
10906
10907 }
10908 <END_MODULE>
10909 <RESULT IF_PASS COUNT 1>
10910 (?im)error.+?Length.+?restriction.+?cannot.+?used
10911 <END_RESULT>
10912 <RESULT IF_PASS COUNT 1>
10913 (?is)\berror:
10914 <END_RESULT>
10915 <END_TC>
10916
10917 :exmp.
10918
10919 .*---------------------------------------------------------------------*
10920 :h4.Allowed matching mechanisms - template length-restriction (boolean in function)
10921 .*---------------------------------------------------------------------*
10922 :xmp tab=0.
10923
10924 <TC - Allowed matching mechanisms - template length-restriction (boolean in function)>
10925
10926 <COMPILE>
10927 <VERDICT_LEAF PASS>
10928 <MODULE TTCN x x.ttcn>
10929 module x {
10930
10931 function myFunct(){
10932 var template boolean r:= ? length(1);
10933 }
10934
10935 }
10936 <END_MODULE>
10937 <RESULT IF_PASS COUNT 1>
10938 (?im)error.+?Length.+?restriction.+?cannot.+?used
10939 <END_RESULT>
10940 <RESULT IF_PASS COUNT 1>
10941 (?is)\berror:
10942 <END_RESULT>
10943 <END_TC>
10944
10945 :exmp.
10946
10947 .*---------------------------------------------------------------------*
10948 :h4.Allowed matching mechanisms - template length-restriction (integer in def.part)
10949 .*---------------------------------------------------------------------*
10950 :xmp tab=0.
10951
10952 <TC - Allowed matching mechanisms - template length-restriction (integer in def.part)>
10953
10954 <COMPILE>
10955 <VERDICT_LEAF PASS>
10956 <MODULE TTCN x x.ttcn>
10957 module x {
10958
10959 template integer r:= ? length(1);
10960
10961 }
10962 <END_MODULE>
10963 <RESULT IF_PASS COUNT 1>
10964 (?im)error.+?Length.+?restriction.+?cannot.+?used
10965 <END_RESULT>
10966 <RESULT IF_PASS COUNT 1>
10967 (?is)\berror:
10968 <END_RESULT>
10969 <END_TC>
10970
10971 :exmp.
10972
10973 .*---------------------------------------------------------------------*
10974 :h4.Allowed matching mechanisms - template length-restriction (integer in control part)
10975 .*---------------------------------------------------------------------*
10976 :xmp tab=0.
10977
10978 <TC - Allowed matching mechanisms - template length-restriction (integer in control part)>
10979
10980 <COMPILE>
10981 <VERDICT_LEAF PASS>
10982 <MODULE TTCN x x.ttcn>
10983 module x {
10984
10985 control{
10986 var template integer r:= ? length(1);
10987 }
10988
10989 }
10990 <END_MODULE>
10991 <RESULT IF_PASS COUNT 1>
10992 (?im)error.+?Length.+?restriction.+?cannot.+?used
10993 <END_RESULT>
10994 <RESULT IF_PASS COUNT 1>
10995 (?is)\berror:
10996 <END_RESULT>
10997 <END_TC>
10998
10999 :exmp.
11000
11001 .*---------------------------------------------------------------------*
11002 :h4.Allowed matching mechanisms - template length-restriction (integer in function)
11003 .*---------------------------------------------------------------------*
11004 :xmp tab=0.
11005
11006 <TC - Allowed matching mechanisms - template length-restriction (integer in function)>
11007
11008 <COMPILE>
11009 <VERDICT_LEAF PASS>
11010 <MODULE TTCN x x.ttcn>
11011 module x {
11012
11013 function myFunct(){
11014 var template integer r:= ? length(1);
11015 }
11016
11017 }
11018 <END_MODULE>
11019 <RESULT IF_PASS COUNT 1>
11020 (?im)error.+?Length.+?restriction.+?cannot.+?used
11021 <END_RESULT>
11022 <RESULT IF_PASS COUNT 1>
11023 (?is)\berror:
11024 <END_RESULT>
11025 <END_TC>
11026
11027 :exmp.
11028
11029 .*---------------------------------------------------------------------*
11030 :h4.Allowed matching mechanisms - template length-restriction (float in def.part)
11031 .*---------------------------------------------------------------------*
11032 :xmp tab=0.
11033
11034 <TC - Allowed matching mechanisms - template length-restriction (float in def.part)>
11035
11036 <COMPILE>
11037 <VERDICT_LEAF PASS>
11038 <MODULE TTCN x x.ttcn>
11039 module x {
11040
11041 template float r:= ? length(1);
11042
11043 }
11044 <END_MODULE>
11045 <RESULT IF_PASS COUNT 1>
11046 (?im)error.+?Length.+?restriction.+?cannot.+?used
11047 <END_RESULT>
11048 <RESULT IF_PASS COUNT 1>
11049 (?is)\berror:
11050 <END_RESULT>
11051 <END_TC>
11052
11053 :exmp.
11054
11055 .*---------------------------------------------------------------------*
11056 :h4.Allowed matching mechanisms - template length-restriction (float in control part)
11057 .*---------------------------------------------------------------------*
11058 :xmp tab=0.
11059
11060 <TC - Allowed matching mechanisms - template length-restriction (float in control part)>
11061
11062 <COMPILE>
11063 <VERDICT_LEAF PASS>
11064 <MODULE TTCN x x.ttcn>
11065 module x {
11066
11067 control{
11068 var template float r:= ? length(1);
11069 }
11070
11071 }
11072 <END_MODULE>
11073 <RESULT IF_PASS COUNT 1>
11074 (?im)error.+?Length.+?restriction.+?cannot.+?used
11075 <END_RESULT>
11076 <RESULT IF_PASS COUNT 1>
11077 (?is)\berror:
11078 <END_RESULT>
11079 <END_TC>
11080
11081 :exmp.
11082
11083 .*---------------------------------------------------------------------*
11084 :h4.Allowed matching mechanisms - template length-restriction (float in function)
11085 .*---------------------------------------------------------------------*
11086 :xmp tab=0.
11087
11088 <TC - Allowed matching mechanisms - template length-restriction (float in function)>
11089
11090 <COMPILE>
11091 <VERDICT_LEAF PASS>
11092 <MODULE TTCN x x.ttcn>
11093 module x {
11094
11095 function myFunct(){
11096 var template float r:= ? length(1);
11097 }
11098
11099 }
11100 <END_MODULE>
11101 <RESULT IF_PASS COUNT 1>
11102 (?im)error.+?Length.+?restriction.+?cannot.+?used
11103 <END_RESULT>
11104 <RESULT IF_PASS COUNT 1>
11105 (?is)\berror:
11106 <END_RESULT>
11107 <END_TC>
11108
11109 :exmp.
11110
11111 .*---------------------------------------------------------------------*
11112 :h4.Allowed matching mechanisms - template length-restriction (record in def.part)
11113 .*---------------------------------------------------------------------*
11114 :xmp tab=0.
11115
11116 <TC - Allowed matching mechanisms - template length-restriction (record in def.part)>
11117
11118 <COMPILE>
11119 <VERDICT_LEAF PASS>
11120 <MODULE TTCN x x.ttcn>
11121 module x {
11122
11123 type record recT{
11124 integer f1,
11125 float f2,
11126 charstring f3
11127 }
11128
11129 template recT r:= ? length(1);
11130
11131 }
11132 <END_MODULE>
11133 <RESULT IF_PASS COUNT 1>
11134 (?im)error.+?Length.+?restriction.+?cannot.+?used
11135 <END_RESULT>
11136 <RESULT IF_PASS COUNT 1>
11137 (?is)\berror:
11138 <END_RESULT>
11139 <END_TC>
11140
11141 :exmp.
11142
11143 .*---------------------------------------------------------------------*
11144 :h4.Allowed matching mechanisms - template length-restriction (record in control part)
11145 .*---------------------------------------------------------------------*
11146 :xmp tab=0.
11147
11148 <TC - Allowed matching mechanisms - template length-restriction (record in control part)>
11149
11150 <COMPILE>
11151 <VERDICT_LEAF PASS>
11152 <MODULE TTCN x x.ttcn>
11153 module x {
11154
11155 type record recT{
11156 integer f1,
11157 float f2,
11158 charstring f3
11159 }
11160
11161 control{
11162 var template recT r:= ? length(1);
11163 }
11164
11165 }
11166 <END_MODULE>
11167 <RESULT IF_PASS COUNT 1>
11168 (?im)error.+?Length.+?restriction.+?cannot.+?used
11169 <END_RESULT>
11170 <RESULT IF_PASS COUNT 1>
11171 (?is)\berror:
11172 <END_RESULT>
11173 <END_TC>
11174
11175 :exmp.
11176
11177 .*---------------------------------------------------------------------*
11178 :h4.Allowed matching mechanisms - template length-restriction (record in function)
11179 .*---------------------------------------------------------------------*
11180 :xmp tab=0.
11181
11182 <TC - Allowed matching mechanisms - template length-restriction (record in function)>
11183
11184 <COMPILE>
11185 <VERDICT_LEAF PASS>
11186 <MODULE TTCN x x.ttcn>
11187 module x {
11188
11189 type record recT{
11190 integer f1,
11191 float f2,
11192 charstring f3
11193 }
11194
11195 function myFunct(){
11196 var template recT r:= ? length(1);
11197 }
11198
11199 }
11200 <END_MODULE>
11201 <RESULT IF_PASS COUNT 1>
11202 (?im)error.+?Length.+?restriction.+?cannot.+?used
11203 <END_RESULT>
11204 <RESULT IF_PASS COUNT 1>
11205 (?is)\berror:
11206 <END_RESULT>
11207 <END_TC>
11208
11209 :exmp.
11210
11211 .*---------------------------------------------------------------------*
11212 :h4.Allowed matching mechanisms - template length-restriction (set in def.part)
11213 .*---------------------------------------------------------------------*
11214 :xmp tab=0.
11215
11216 <TC - Allowed matching mechanisms - template length-restriction (set in def.part)>
11217
11218 <COMPILE>
11219 <VERDICT_LEAF PASS>
11220 <MODULE TTCN x x.ttcn>
11221 module x {
11222
11223 type set setT{
11224 integer f1,
11225 float f2,
11226 charstring f3
11227 }
11228
11229 template setT r:= ? length(1);
11230
11231 }
11232 <END_MODULE>
11233 <RESULT IF_PASS COUNT 1>
11234 (?im)error.+?Length.+?restriction.+?cannot.+?used
11235 <END_RESULT>
11236 <RESULT IF_PASS COUNT 1>
11237 (?is)\berror:
11238 <END_RESULT>
11239 <END_TC>
11240
11241 :exmp.
11242
11243 .*---------------------------------------------------------------------*
11244 :h4.Allowed matching mechanisms - template length-restriction (set in control part)
11245 .*---------------------------------------------------------------------*
11246 :xmp tab=0.
11247
11248 <TC - Allowed matching mechanisms - template length-restriction (set in control part)>
11249
11250 <COMPILE>
11251 <VERDICT_LEAF PASS>
11252 <MODULE TTCN x x.ttcn>
11253 module x {
11254
11255 type set setT{
11256 integer f1,
11257 float f2,
11258 charstring f3
11259 }
11260
11261 control{
11262 var template setT r:= ? length(1);
11263 }
11264
11265 }
11266 <END_MODULE>
11267 <RESULT IF_PASS COUNT 1>
11268 (?im)error.+?Length.+?restriction.+?cannot.+?used
11269 <END_RESULT>
11270 <RESULT IF_PASS COUNT 1>
11271 (?is)\berror:
11272 <END_RESULT>
11273 <END_TC>
11274
11275 :exmp.
11276
11277 .*---------------------------------------------------------------------*
11278 :h4.Allowed matching mechanisms - template length-restriction (set in function)
11279 .*---------------------------------------------------------------------*
11280 :xmp tab=0.
11281
11282 <TC - Allowed matching mechanisms - template length-restriction (set in function)>
11283
11284 <COMPILE>
11285 <VERDICT_LEAF PASS>
11286 <MODULE TTCN x x.ttcn>
11287 module x {
11288
11289 type set setT{
11290 integer f1,
11291 float f2,
11292 charstring f3
11293 }
11294
11295 function myFunct(){
11296 var template setT r:= ? length(1);
11297 }
11298
11299 }
11300 <END_MODULE>
11301 <RESULT IF_PASS COUNT 1>
11302 (?im)error.+?Length.+?restriction.+?cannot.+?used
11303 <END_RESULT>
11304 <RESULT IF_PASS COUNT 1>
11305 (?is)\berror:
11306 <END_RESULT>
11307 <END_TC>
11308
11309 :exmp.
11310
11311 .*---------------------------------------------------------------------*
11312 :h4.Allowed matching mechanisms - template length-restriction (enumerated in def.part)
11313 .*---------------------------------------------------------------------*
11314 :xmp tab=0.
11315
11316 <TC - Allowed matching mechanisms - template length-restriction (enumerated in def.part)>
11317
11318 <COMPILE>
11319 <VERDICT_LEAF PASS>
11320 <MODULE TTCN x x.ttcn>
11321 module x {
11322
11323 type enumerated enumT { ONE(1), TWO(2), THREE(3) };
11324
11325 template enumT r:= ? length(1);
11326
11327 }
11328 <END_MODULE>
11329 <RESULT IF_PASS COUNT 1>
11330 (?im)error.+?Length.+?restriction.+?cannot.+?used
11331 <END_RESULT>
11332 <RESULT IF_PASS COUNT 1>
11333 (?is)\berror:
11334 <END_RESULT>
11335 <END_TC>
11336
11337 :exmp.
11338
11339 .*---------------------------------------------------------------------*
11340 :h4.Allowed matching mechanisms - template length-restriction (enumerated in control part)
11341 .*---------------------------------------------------------------------*
11342 :xmp tab=0.
11343
11344 <TC - Allowed matching mechanisms - template length-restriction (enumerated in control part)>
11345
11346 <COMPILE>
11347 <VERDICT_LEAF PASS>
11348 <MODULE TTCN x x.ttcn>
11349 module x {
11350
11351 type enumerated enumT { ONE(1), TWO(2), THREE(3) };
11352
11353 control{
11354 var template enumT r:= ? length(1);
11355 }
11356
11357 }
11358 <END_MODULE>
11359 <RESULT IF_PASS COUNT 1>
11360 (?im)error.+?Length.+?restriction.+?cannot.+?used
11361 <END_RESULT>
11362 <RESULT IF_PASS COUNT 1>
11363 (?is)\berror:
11364 <END_RESULT>
11365 <END_TC>
11366
11367 :exmp.
11368
11369 .*---------------------------------------------------------------------*
11370 :h4.Allowed matching mechanisms - template length-restriction (enumerated in function)
11371 .*---------------------------------------------------------------------*
11372 :xmp tab=0.
11373
11374 <TC - Allowed matching mechanisms - template length-restriction (enumerated in function)>
11375
11376 <COMPILE>
11377 <VERDICT_LEAF PASS>
11378 <MODULE TTCN x x.ttcn>
11379 module x {
11380
11381 type enumerated enumT { ONE(1), TWO(2), THREE(3) };
11382
11383 function myFunct(){
11384 var template enumT r:= ? length(1);
11385 }
11386
11387 }
11388 <END_MODULE>
11389 <RESULT IF_PASS COUNT 1>
11390 (?im)error.+?Length.+?restriction.+?cannot.+?used
11391 <END_RESULT>
11392 <RESULT IF_PASS COUNT 1>
11393 (?is)\berror:
11394 <END_RESULT>
11395 <END_TC>
11396
11397 :exmp.
11398
11399 .*---------------------------------------------------------------------*
11400 :h4.Allowed matching mechanisms - template length-restriction (union in def.part)
11401 .*---------------------------------------------------------------------*
11402 :xmp tab=0.
11403
11404 <TC - Allowed matching mechanisms - template length-restriction (union in def.part)>
11405
11406 <COMPILE>
11407 <VERDICT_LEAF PASS>
11408 <MODULE TTCN x x.ttcn>
11409 module x {
11410
11411 type union uniT{
11412 integer f1,
11413 float f2,
11414 charstring f3
11415 }
11416
11417 template uniT r:= ? length(1);
11418
11419 }
11420 <END_MODULE>
11421 <RESULT IF_PASS COUNT 1>
11422 (?im)error.+?Length.+?restriction.+?cannot.+?used
11423 <END_RESULT>
11424 <RESULT IF_PASS COUNT 1>
11425 (?is)\berror:
11426 <END_RESULT>
11427 <END_TC>
11428
11429 :exmp.
11430
11431 .*---------------------------------------------------------------------*
11432 :h4.Allowed matching mechanisms - template length-restriction (union in control part)
11433 .*---------------------------------------------------------------------*
11434 :xmp tab=0.
11435
11436 <TC - Allowed matching mechanisms - template length-restriction (union in control part)>
11437
11438 <COMPILE>
11439 <VERDICT_LEAF PASS>
11440 <MODULE TTCN x x.ttcn>
11441 module x {
11442
11443 type union uniT{
11444 integer f1,
11445 float f2,
11446 charstring f3
11447 }
11448
11449 control{
11450 var template uniT r:= ? length(1);
11451 }
11452
11453 }
11454 <END_MODULE>
11455 <RESULT IF_PASS COUNT 1>
11456 (?im)error.+?Length.+?restriction.+?cannot.+?used
11457 <END_RESULT>
11458 <RESULT IF_PASS COUNT 1>
11459 (?is)\berror:
11460 <END_RESULT>
11461 <END_TC>
11462
11463 :exmp.
11464
11465 .*---------------------------------------------------------------------*
11466 :h4.Allowed matching mechanisms - template length-restriction (union in function)
11467 .*---------------------------------------------------------------------*
11468 :xmp tab=0.
11469
11470 <TC - Allowed matching mechanisms - template length-restriction (union in function)>
11471
11472 <COMPILE>
11473 <VERDICT_LEAF PASS>
11474 <MODULE TTCN x x.ttcn>
11475 module x {
11476
11477 type union uniT{
11478 integer f1,
11479 float f2,
11480 charstring f3
11481 }
11482
11483 function myFunct(){
11484 var template uniT r:= ? length(1);
11485 }
11486
11487 }
11488 <END_MODULE>
11489 <RESULT IF_PASS COUNT 1>
11490 (?im)error.+?Length.+?restriction.+?cannot.+?used
11491 <END_RESULT>
11492 <RESULT IF_PASS COUNT 1>
11493 (?is)\berror:
11494 <END_RESULT>
11495 <END_TC>
11496
11497 :exmp.
11498
11499 .*---------------------------------------------------------------------*
11500 :h4.Allowed matching mechanisms - template length-restriction (array in def.part)
11501 .*---------------------------------------------------------------------*
11502 :xmp tab=0.
11503
11504 <TC - Allowed matching mechanisms - template length-restriction (array in def.part)>
11505
11506 <COMPILE>
11507 <VERDICT_LEAF PASS>
11508 <MODULE TTCN x x.ttcn>
11509 module x {
11510
11511 type integer arrint[1];
11512 //TR 727
11513 template arrint r:= ? length(10);
11514
11515 }
11516 <END_MODULE>
11517 <RESULT IF_PASS COUNT 1>
11518 (?im)error.+?number.+?elements.+?allowed.+?length.+?restriction.+?contradicts.+?array.+?size
11519 <END_RESULT>
11520 <RESULT IF_PASS COUNT 1>
11521 (?is)\berror:
11522 <END_RESULT>
11523 <END_TC>
11524
11525 :exmp.
11526
11527 .*---------------------------------------------------------------------*
11528 :h4.Allowed matching mechanisms - template length-restriction (array in control part)
11529 .*---------------------------------------------------------------------*
11530 :xmp tab=0.
11531
11532 <TC - Allowed matching mechanisms - template length-restriction (array in control part)>
11533
11534 <COMPILE>
11535 <VERDICT_LEAF PASS>
11536 <MODULE TTCN x x.ttcn>
11537 module x {
11538
11539 type integer arrint[1];
11540
11541 control{
11542 //TR 727
11543 template arrint r:= ? length(10);
11544 }
11545 }
11546 <END_MODULE>
11547 <RESULT IF_PASS COUNT 1>
11548 (?im)error.+?number.+?elements.+?allowed.+?length.+?restriction.+?contradicts.+?array.+?size
11549 <END_RESULT>
11550 <RESULT IF_PASS COUNT 1>
11551 (?is)\berror:
11552 <END_RESULT>
11553 <END_TC>
11554
11555 :exmp.
11556
11557 .*---------------------------------------------------------------------*
11558 :h4.Allowed matching mechanisms - template length-restriction (array in function)
11559 .*---------------------------------------------------------------------*
11560 :xmp tab=0.
11561
11562 <TC - Allowed matching mechanisms - template length-restriction (array in function)>
11563
11564 <COMPILE>
11565 <VERDICT_LEAF PASS>
11566 <MODULE TTCN x x.ttcn>
11567 module x {
11568
11569 type integer arrint[1];
11570
11571 function myFunct(){
11572 //TR 727
11573 template arrint r:= ? length(10);
11574 }
11575 }
11576 <END_MODULE>
11577 <RESULT IF_PASS COUNT 1>
11578 (?im)error.+?number.+?elements.+?allowed.+?length.+?restriction.+?contradicts.+?array.+?size
11579 <END_RESULT>
11580 <RESULT IF_PASS COUNT 1>
11581 (?is)\berror:
11582 <END_RESULT>
11583 <END_TC>
11584
11585 :exmp.
11586
11587 .*---------------------------------------------------------------------*
11588 :h4.Allowed matching mechanisms - template ifpresent (boolean in def.part)
11589 .*---------------------------------------------------------------------*
11590 :xmp tab=0.
11591
11592 <TC - Allowed matching mechanisms - template ifpresent (boolean in def.part)>
11593
11594 <COMPILEGCC>
11595 <VERDICT_LEAF PASS>
11596 <MODULE TTCN x x.ttcn>
11597 module x {
11598
11599 template boolean f:= ? ifpresent;
11600
11601 }
11602 <END_MODULE>
11603 <RESULT IF_PASS NEGATIVE>
11604 (?is)\berror:
11605 <END_RESULT>
11606 <END_TC>
11607
11608 :exmp.
11609
11610 .*---------------------------------------------------------------------*
11611 :h4.Allowed matching mechanisms - template ifpresent (boolean in control part)
11612 .*---------------------------------------------------------------------*
11613 :xmp tab=0.
11614
11615 <TC - Allowed matching mechanisms - template ifpresent (boolean in control part)>
11616
11617 <COMPILEGCC>
11618 <VERDICT_LEAF PASS>
11619 <MODULE TTCN x x.ttcn>
11620 module x {
11621
11622 control{
11623 var template boolean f:= ? ifpresent;
11624 }
11625
11626 }
11627 <END_MODULE>
11628 <RESULT IF_PASS NEGATIVE>
11629 (?is)\berror:
11630 <END_RESULT>
11631 <END_TC>
11632
11633 :exmp.
11634
11635 .*---------------------------------------------------------------------*
11636 :h4.Allowed matching mechanisms - template ifpresent (boolean in function)
11637 .*---------------------------------------------------------------------*
11638 :xmp tab=0.
11639
11640 <TC - Allowed matching mechanisms - template ifpresent (boolean in function)>
11641
11642 <COMPILEGCC>
11643 <VERDICT_LEAF PASS>
11644 <MODULE TTCN x x.ttcn>
11645 module x {
11646
11647 function myFunct(){
11648 var template boolean f:= ? ifpresent;
11649 }
11650
11651 }
11652 <END_MODULE>
11653 <RESULT IF_PASS NEGATIVE>
11654 (?is)\berror:
11655 <END_RESULT>
11656 <END_TC>
11657
11658 :exmp.
11659
11660 .*---------------------------------------------------------------------*
11661 :h4.Allowed matching mechanisms - template ifpresent (integer in def.part)
11662 .*---------------------------------------------------------------------*
11663 :xmp tab=0.
11664
11665 <TC - Allowed matching mechanisms - template ifpresent (integer in def.part)>
11666
11667 <COMPILEGCC>
11668 <VERDICT_LEAF PASS>
11669 <MODULE TTCN x x.ttcn>
11670 module x {
11671
11672 template integer f:= ? ifpresent;
11673
11674 }
11675 <END_MODULE>
11676 <RESULT IF_PASS NEGATIVE>
11677 (?is)\berror:
11678 <END_RESULT>
11679 <END_TC>
11680
11681 :exmp.
11682
11683 .*---------------------------------------------------------------------*
11684 :h4.Allowed matching mechanisms - template ifpresent (integer in control part)
11685 .*---------------------------------------------------------------------*
11686 :xmp tab=0.
11687
11688 <TC - Allowed matching mechanisms - template ifpresent (integer in control part)>
11689
11690 <COMPILEGCC>
11691 <VERDICT_LEAF PASS>
11692 <MODULE TTCN x x.ttcn>
11693 module x {
11694
11695 control{
11696 var template integer f:= ? ifpresent;
11697 }
11698
11699 }
11700 <END_MODULE>
11701 <RESULT IF_PASS NEGATIVE>
11702 (?is)\berror:
11703 <END_RESULT>
11704 <END_TC>
11705
11706 :exmp.
11707
11708 .*---------------------------------------------------------------------*
11709 :h4.Allowed matching mechanisms - template ifpresent (integer in function)
11710 .*---------------------------------------------------------------------*
11711 :xmp tab=0.
11712
11713 <TC - Allowed matching mechanisms - template ifpresent (integer in function)>
11714
11715 <COMPILEGCC>
11716 <VERDICT_LEAF PASS>
11717 <MODULE TTCN x x.ttcn>
11718 module x {
11719
11720 function myFunct(){
11721 var template integer f:= ? ifpresent;
11722 }
11723
11724 }
11725 <END_MODULE>
11726 <RESULT IF_PASS NEGATIVE>
11727 (?is)\berror:
11728 <END_RESULT>
11729 <END_TC>
11730
11731 :exmp.
11732
11733 .*---------------------------------------------------------------------*
11734 :h4.Allowed matching mechanisms - template ifpresent (float in def.part)
11735 .*---------------------------------------------------------------------*
11736 :xmp tab=0.
11737
11738 <TC - Allowed matching mechanisms - template ifpresent (float in def.part)>
11739
11740 <COMPILEGCC>
11741 <VERDICT_LEAF PASS>
11742 <MODULE TTCN x x.ttcn>
11743 module x {
11744
11745 template float f:= ? ifpresent;
11746
11747 }
11748 <END_MODULE>
11749 <RESULT IF_PASS NEGATIVE>
11750 (?is)\berror:
11751 <END_RESULT>
11752 <END_TC>
11753
11754 :exmp.
11755
11756 .*---------------------------------------------------------------------*
11757 :h4.Allowed matching mechanisms - template ifpresent (float in control part)
11758 .*---------------------------------------------------------------------*
11759 :xmp tab=0.
11760
11761 <TC - Allowed matching mechanisms - template ifpresent (float in control part)>
11762
11763 <COMPILEGCC>
11764 <VERDICT_LEAF PASS>
11765 <MODULE TTCN x x.ttcn>
11766 module x {
11767
11768 control{
11769 var template float f:= ? ifpresent;
11770 }
11771
11772 }
11773 <END_MODULE>
11774 <RESULT IF_PASS NEGATIVE>
11775 (?is)\berror:
11776 <END_RESULT>
11777 <END_TC>
11778
11779 :exmp.
11780
11781 .*---------------------------------------------------------------------*
11782 :h4.Allowed matching mechanisms - template ifpresent (float in function)
11783 .*---------------------------------------------------------------------*
11784 :xmp tab=0.
11785
11786 <TC - Allowed matching mechanisms - template ifpresent (float in function)>
11787
11788 <COMPILEGCC>
11789 <VERDICT_LEAF PASS>
11790 <MODULE TTCN x x.ttcn>
11791 module x {
11792
11793 function myFunct(){
11794 var template float f:= ? ifpresent;
11795 }
11796
11797 }
11798 <END_MODULE>
11799 <RESULT IF_PASS NEGATIVE>
11800 (?is)\berror:
11801 <END_RESULT>
11802 <END_TC>
11803
11804 :exmp.
11805
11806 .*---------------------------------------------------------------------*
11807 :h4.Allowed matching mechanisms - template ifpresent (bitstring in def.part)
11808 .*---------------------------------------------------------------------*
11809 :xmp tab=0.
11810
11811 <TC - Allowed matching mechanisms - template ifpresent (bitstring in def.part)>
11812
11813 <COMPILEGCC>
11814 <VERDICT_LEAF PASS>
11815 <MODULE TTCN x x.ttcn>
11816 module x {
11817
11818 template bitstring f:= ? ifpresent;
11819
11820 }
11821 <END_MODULE>
11822 <RESULT IF_PASS NEGATIVE>
11823 (?is)\berror:
11824 <END_RESULT>
11825 <END_TC>
11826
11827 :exmp.
11828
11829 .*---------------------------------------------------------------------*
11830 :h4.Allowed matching mechanisms - template ifpresent (bitstring in control part)
11831 .*---------------------------------------------------------------------*
11832 :xmp tab=0.
11833
11834 <TC - Allowed matching mechanisms - template ifpresent (bitstring in control part)>
11835
11836 <COMPILEGCC>
11837 <VERDICT_LEAF PASS>
11838 <MODULE TTCN x x.ttcn>
11839 module x {
11840
11841 control{
11842 var template bitstring f:= ? ifpresent;
11843 }
11844
11845 }
11846 <END_MODULE>
11847 <RESULT IF_PASS NEGATIVE>
11848 (?is)\berror:
11849 <END_RESULT>
11850 <END_TC>
11851
11852 :exmp.
11853
11854 .*---------------------------------------------------------------------*
11855 :h4.Allowed matching mechanisms - template ifpresent (bitstring in function)
11856 .*---------------------------------------------------------------------*
11857 :xmp tab=0.
11858
11859 <TC - Allowed matching mechanisms - template ifpresent (bitstring in function)>
11860
11861 <COMPILEGCC>
11862 <VERDICT_LEAF PASS>
11863 <MODULE TTCN x x.ttcn>
11864 module x {
11865
11866 function myFunct(){
11867 var template bitstring f:= ? ifpresent;
11868 }
11869
11870 }
11871 <END_MODULE>
11872 <RESULT IF_PASS NEGATIVE>
11873 (?is)\berror:
11874 <END_RESULT>
11875 <END_TC>
11876
11877 :exmp.
11878
11879 .*---------------------------------------------------------------------*
11880 :h4.Allowed matching mechanisms - template ifpresent (octetstring in def.part)
11881 .*---------------------------------------------------------------------*
11882 :xmp tab=0.
11883
11884 <TC - Allowed matching mechanisms - template ifpresent (octetstring in def.part)>
11885
11886 <COMPILEGCC>
11887 <VERDICT_LEAF PASS>
11888 <MODULE TTCN x x.ttcn>
11889 module x {
11890
11891 template octetstring f:= ? ifpresent;
11892
11893 }
11894 <END_MODULE>
11895 <RESULT IF_PASS NEGATIVE>
11896 (?is)\berror:
11897 <END_RESULT>
11898 <END_TC>
11899
11900 :exmp.
11901
11902 .*---------------------------------------------------------------------*
11903 :h4.Allowed matching mechanisms - template ifpresent (octetstring in control part)
11904 .*---------------------------------------------------------------------*
11905 :xmp tab=0.
11906
11907 <TC - Allowed matching mechanisms - template ifpresent (octetstring in control part)>
11908
11909 <COMPILEGCC>
11910 <VERDICT_LEAF PASS>
11911 <MODULE TTCN x x.ttcn>
11912 module x {
11913
11914 control{
11915 var template octetstring f:= ? ifpresent;
11916 }
11917
11918 }
11919 <END_MODULE>
11920 <RESULT IF_PASS NEGATIVE>
11921 (?is)\berror:
11922 <END_RESULT>
11923 <END_TC>
11924
11925 :exmp.
11926
11927 .*---------------------------------------------------------------------*
11928 :h4.Allowed matching mechanisms - template ifpresent (octetstring in function)
11929 .*---------------------------------------------------------------------*
11930 :xmp tab=0.
11931
11932 <TC - Allowed matching mechanisms - template ifpresent (octetstring in function)>
11933
11934 <COMPILEGCC>
11935 <VERDICT_LEAF PASS>
11936 <MODULE TTCN x x.ttcn>
11937 module x {
11938
11939 function myFunct(){
11940 var template octetstring f:= ? ifpresent;
11941 }
11942
11943 }
11944 <END_MODULE>
11945 <RESULT IF_PASS NEGATIVE>
11946 (?is)\berror:
11947 <END_RESULT>
11948 <END_TC>
11949
11950 :exmp.
11951
11952 .*---------------------------------------------------------------------*
11953 :h4.Allowed matching mechanisms - template ifpresent (hexstring in def.part)
11954 .*---------------------------------------------------------------------*
11955 :xmp tab=0.
11956
11957 <TC - Allowed matching mechanisms - template ifpresent (hexstring in def.part)>
11958
11959 <COMPILEGCC>
11960 <VERDICT_LEAF PASS>
11961 <MODULE TTCN x x.ttcn>
11962 module x {
11963
11964 template hexstring f:= ? ifpresent;
11965
11966 }
11967 <END_MODULE>
11968 <RESULT IF_PASS NEGATIVE>
11969 (?is)\berror:
11970 <END_RESULT>
11971 <END_TC>
11972
11973 :exmp.
11974
11975 .*---------------------------------------------------------------------*
11976 :h4.Allowed matching mechanisms - template ifpresent (hexstring in control part)
11977 .*---------------------------------------------------------------------*
11978 :xmp tab=0.
11979
11980 <TC - Allowed matching mechanisms - template ifpresent (hexstring in control part)>
11981
11982 <COMPILEGCC>
11983 <VERDICT_LEAF PASS>
11984 <MODULE TTCN x x.ttcn>
11985 module x {
11986
11987 control{
11988 var template hexstring f:= ? ifpresent;
11989 }
11990
11991 }
11992 <END_MODULE>
11993 <RESULT IF_PASS NEGATIVE>
11994 (?is)\berror:
11995 <END_RESULT>
11996 <END_TC>
11997
11998 :exmp.
11999
12000 .*---------------------------------------------------------------------*
12001 :h4.Allowed matching mechanisms - template ifpresent (hexstring in function)
12002 .*---------------------------------------------------------------------*
12003 :xmp tab=0.
12004
12005 <TC - Allowed matching mechanisms - template ifpresent (hexstring in function)>
12006
12007 <COMPILEGCC>
12008 <VERDICT_LEAF PASS>
12009 <MODULE TTCN x x.ttcn>
12010 module x {
12011
12012 function myFunct(){
12013 var template hexstring f:= ? ifpresent;
12014 }
12015
12016 }
12017 <END_MODULE>
12018 <RESULT IF_PASS NEGATIVE>
12019 (?is)\berror:
12020 <END_RESULT>
12021 <END_TC>
12022
12023 :exmp.
12024
12025 .*---------------------------------------------------------------------*
12026 :h4.Allowed matching mechanisms - template ifpresent (charstring in def.part)
12027 .*---------------------------------------------------------------------*
12028 :xmp tab=0.
12029
12030 <TC - Allowed matching mechanisms - template ifpresent (charstring in def.part)>
12031
12032 <COMPILEGCC>
12033 <VERDICT_LEAF PASS>
12034 <MODULE TTCN x x.ttcn>
12035 module x {
12036
12037 template charstring f:= ? ifpresent;
12038
12039 }
12040 <END_MODULE>
12041 <RESULT IF_PASS NEGATIVE>
12042 (?is)\berror:
12043 <END_RESULT>
12044 <END_TC>
12045
12046 :exmp.
12047
12048 .*---------------------------------------------------------------------*
12049 :h4.Allowed matching mechanisms - template ifpresent (charstring in control part)
12050 .*---------------------------------------------------------------------*
12051 :xmp tab=0.
12052
12053 <TC - Allowed matching mechanisms - template ifpresent (charstring in control part)>
12054
12055 <COMPILEGCC>
12056 <VERDICT_LEAF PASS>
12057 <MODULE TTCN x x.ttcn>
12058 module x {
12059
12060 control{
12061 var template charstring f:= ? ifpresent;
12062 }
12063
12064 }
12065 <END_MODULE>
12066 <RESULT IF_PASS NEGATIVE>
12067 (?is)\berror:
12068 <END_RESULT>
12069 <END_TC>
12070
12071 :exmp.
12072
12073 .*---------------------------------------------------------------------*
12074 :h4.Allowed matching mechanisms - template ifpresent (charstring in function)
12075 .*---------------------------------------------------------------------*
12076 :xmp tab=0.
12077
12078 <TC - Allowed matching mechanisms - template ifpresent (charstring in function)>
12079
12080 <COMPILEGCC>
12081 <VERDICT_LEAF PASS>
12082 <MODULE TTCN x x.ttcn>
12083 module x {
12084
12085 function myFunct(){
12086 var template charstring f:= ? ifpresent;
12087 }
12088
12089 }
12090 <END_MODULE>
12091 <RESULT IF_PASS NEGATIVE>
12092 (?is)\berror:
12093 <END_RESULT>
12094 <END_TC>
12095
12096 :exmp.
12097
12098 .*---------------------------------------------------------------------*
12099 :h4.Allowed matching mechanisms - template ifpresent (record of in def.part)
12100 .*---------------------------------------------------------------------*
12101 :xmp tab=0.
12102
12103 <TC - Allowed matching mechanisms - template ifpresent (record of in def.part)>
12104
12105 <COMPILEGCC>
12106 <VERDICT_LEAF PASS>
12107 <MODULE TTCN x x.ttcn>
12108 module x {
12109
12110 type record of integer rofT;
12111
12112 template rofT f:= ? ifpresent;
12113
12114 }
12115 <END_MODULE>
12116 <RESULT IF_PASS NEGATIVE>
12117 (?is)\berror:
12118 <END_RESULT>
12119 <END_TC>
12120
12121 :exmp.
12122
12123 .*---------------------------------------------------------------------*
12124 :h4.Allowed matching mechanisms - template ifpresent (record of in control part)
12125 .*---------------------------------------------------------------------*
12126 :xmp tab=0.
12127
12128 <TC - Allowed matching mechanisms - template ifpresent (record of in control part)>
12129
12130 <COMPILEGCC>
12131 <VERDICT_LEAF PASS>
12132 <MODULE TTCN x x.ttcn>
12133 module x {
12134
12135 type record of integer rofT;
12136
12137 control{
12138 var template rofT f:= ? ifpresent;
12139 }
12140
12141 }
12142 <END_MODULE>
12143 <RESULT IF_PASS NEGATIVE>
12144 (?is)\berror:
12145 <END_RESULT>
12146 <END_TC>
12147
12148 :exmp.
12149
12150 .*---------------------------------------------------------------------*
12151 :h4.Allowed matching mechanisms - template ifpresent (record of in function)
12152 .*---------------------------------------------------------------------*
12153 :xmp tab=0.
12154
12155 <TC - Allowed matching mechanisms - template ifpresent (record of in function)>
12156
12157 <COMPILEGCC>
12158 <VERDICT_LEAF PASS>
12159 <MODULE TTCN x x.ttcn>
12160 module x {
12161
12162 type record of integer rofT;
12163
12164 function myFunct(){
12165 var template rofT f:= ? ifpresent;
12166 }
12167
12168 }
12169 <END_MODULE>
12170 <RESULT IF_PASS NEGATIVE>
12171 (?is)\berror:
12172 <END_RESULT>
12173 <END_TC>
12174
12175 :exmp.
12176
12177 .*---------------------------------------------------------------------*
12178 :h4.Allowed matching mechanisms - template ifpresent (set of in def.part)
12179 .*---------------------------------------------------------------------*
12180 :xmp tab=0.
12181
12182 <TC - Allowed matching mechanisms - template ifpresent (set of in def.part)>
12183
12184 <COMPILEGCC>
12185 <VERDICT_LEAF PASS>
12186 <MODULE TTCN x x.ttcn>
12187 module x {
12188
12189 type set of integer sofT;
12190
12191 template sofT f:= ? ifpresent;
12192
12193 }
12194 <END_MODULE>
12195 <RESULT IF_PASS NEGATIVE>
12196 (?is)\berror:
12197 <END_RESULT>
12198 <END_TC>
12199
12200 :exmp.
12201
12202 .*---------------------------------------------------------------------*
12203 :h4.Allowed matching mechanisms - template ifpresent (set of in control part)
12204 .*---------------------------------------------------------------------*
12205 :xmp tab=0.
12206
12207 <TC - Allowed matching mechanisms - template ifpresent (set of in control part)>
12208
12209 <COMPILEGCC>
12210 <VERDICT_LEAF PASS>
12211 <MODULE TTCN x x.ttcn>
12212 module x {
12213
12214 type set of integer sofT;
12215
12216 control{
12217 var template sofT f:= ? ifpresent;
12218 }
12219
12220 }
12221 <END_MODULE>
12222 <RESULT IF_PASS NEGATIVE>
12223 (?is)\berror:
12224 <END_RESULT>
12225 <END_TC>
12226
12227 :exmp.
12228
12229 .*---------------------------------------------------------------------*
12230 :h4.Allowed matching mechanisms - template ifpresent (set of in function)
12231 .*---------------------------------------------------------------------*
12232 :xmp tab=0.
12233
12234 <TC - Allowed matching mechanisms - template ifpresent (set of in function)>
12235
12236 <COMPILEGCC>
12237 <VERDICT_LEAF PASS>
12238 <MODULE TTCN x x.ttcn>
12239 module x {
12240
12241 type set of integer sofT;
12242
12243 function myFunct(){
12244 var template sofT f:= ? ifpresent;
12245 }
12246
12247 }
12248 <END_MODULE>
12249 <RESULT IF_PASS NEGATIVE>
12250 (?is)\berror:
12251 <END_RESULT>
12252 <END_TC>
12253
12254 :exmp.
12255
12256 .*---------------------------------------------------------------------*
12257 :h4.Allowed matching mechanisms - template ifpresent (enumerated in def.part)
12258 .*---------------------------------------------------------------------*
12259 :xmp tab=0.
12260
12261 <TC - Allowed matching mechanisms - template ifpresent (enumerated in def.part)>
12262
12263 <COMPILEGCC>
12264 <VERDICT_LEAF PASS>
12265 <MODULE TTCN x x.ttcn>
12266 module x {
12267
12268 type enumerated enumT { ONE(1), TWO(2), THREE(3) };
12269
12270 template enumT f:= ? ifpresent;
12271
12272 }
12273 <END_MODULE>
12274 <RESULT IF_PASS NEGATIVE>
12275 (?is)\berror:
12276 <END_RESULT>
12277 <END_TC>
12278
12279 :exmp.
12280
12281 .*---------------------------------------------------------------------*
12282 :h4.Allowed matching mechanisms - template ifpresent (enumerated in control part)
12283 .*---------------------------------------------------------------------*
12284 :xmp tab=0.
12285
12286 <TC - Allowed matching mechanisms - template ifpresent (enumerated in control part)>
12287
12288 <COMPILEGCC>
12289 <VERDICT_LEAF PASS>
12290 <MODULE TTCN x x.ttcn>
12291 module x {
12292
12293 type enumerated enumT { ONE(1), TWO(2), THREE(3) };
12294
12295 control{
12296 var template enumT f:= ? ifpresent;
12297 }
12298
12299 }
12300 <END_MODULE>
12301 <RESULT IF_PASS NEGATIVE>
12302 (?is)\berror:
12303 <END_RESULT>
12304 <END_TC>
12305
12306 :exmp.
12307
12308 .*---------------------------------------------------------------------*
12309 :h4.Allowed matching mechanisms - template ifpresent (enumerated in function)
12310 .*---------------------------------------------------------------------*
12311 :xmp tab=0.
12312
12313 <TC - Allowed matching mechanisms - template ifpresent (enumerated in function)>
12314
12315 <COMPILEGCC>
12316 <VERDICT_LEAF PASS>
12317 <MODULE TTCN x x.ttcn>
12318 module x {
12319
12320 type enumerated enumT { ONE(1), TWO(2), THREE(3) };
12321
12322 function myFunct(){
12323 var template enumT f:= ? ifpresent;
12324 }
12325
12326 }
12327 <END_MODULE>
12328 <RESULT IF_PASS NEGATIVE>
12329 (?is)\berror:
12330 <END_RESULT>
12331 <END_TC>
12332
12333 :exmp.
12334
12335 .*---------------------------------------------------------------------*
12336 :h4.Allowed matching mechanisms - template ifpresent (union in def.part)
12337 .*---------------------------------------------------------------------*
12338 :xmp tab=0.
12339
12340 <TC - Allowed matching mechanisms - template ifpresent (union in def.part)>
12341
12342 <COMPILEGCC>
12343 <VERDICT_LEAF PASS>
12344 <MODULE TTCN x x.ttcn>
12345 module x {
12346
12347 type union uniT{
12348 integer f1,
12349 float f2,
12350 charstring f3
12351 }
12352
12353 template uniT f:= ? ifpresent;
12354
12355 }
12356 <END_MODULE>
12357 <RESULT IF_PASS NEGATIVE>
12358 (?is)\berror:
12359 <END_RESULT>
12360 <END_TC>
12361
12362 :exmp.
12363
12364 .*---------------------------------------------------------------------*
12365 :h4.Allowed matching mechanisms - template ifpresent (union in control part)
12366 .*---------------------------------------------------------------------*
12367 :xmp tab=0.
12368
12369 <TC - Allowed matching mechanisms - template ifpresent (union in control part)>
12370
12371 <COMPILEGCC>
12372 <VERDICT_LEAF PASS>
12373 <MODULE TTCN x x.ttcn>
12374 module x {
12375
12376 type union uniT{
12377 integer f1,
12378 float f2,
12379 charstring f3
12380 }
12381
12382 control{
12383 var template uniT f:= ? ifpresent;
12384 }
12385
12386 }
12387 <END_MODULE>
12388 <RESULT IF_PASS NEGATIVE>
12389 (?is)\berror:
12390 <END_RESULT>
12391 <END_TC>
12392
12393 :exmp.
12394
12395 .*---------------------------------------------------------------------*
12396 :h4.Allowed matching mechanisms - template ifpresent (union in function)
12397 .*---------------------------------------------------------------------*
12398 :xmp tab=0.
12399
12400 <TC - Allowed matching mechanisms - template ifpresent (union in function)>
12401
12402 <COMPILEGCC>
12403 <VERDICT_LEAF PASS>
12404 <MODULE TTCN x x.ttcn>
12405 module x {
12406
12407 type union uniT{
12408 integer f1,
12409 float f2,
12410 charstring f3
12411 }
12412
12413 function myFunct(){
12414 var template uniT f:= ? ifpresent;
12415 }
12416
12417 }
12418 <END_MODULE>
12419 <RESULT IF_PASS NEGATIVE>
12420 (?is)\berror:
12421 <END_RESULT>
12422 <END_TC>
12423
12424 :exmp.
12425
12426 .*---------------------------------------------------------------------*
12427 :h4.Allowed matching mechanisms - template ifpresent (array in def.part)
12428 .*---------------------------------------------------------------------*
12429 :xmp tab=0.
12430
12431 <TC - Allowed matching mechanisms - template ifpresent (array in def.part)>
12432
12433 <COMPILEGCC>
12434 <VERDICT_LEAF PASS>
12435 <MODULE TTCN x x.ttcn>
12436 module x {
12437
12438 type integer arrint[1];
12439
12440 template arrint f:= ? ifpresent;
12441
12442 }
12443 <END_MODULE>
12444 <RESULT IF_PASS NEGATIVE>
12445 (?is)\berror:
12446 <END_RESULT>
12447 <END_TC>
12448
12449 :exmp.
12450
12451 .*---------------------------------------------------------------------*
12452 :h4.Allowed matching mechanisms - template ifpresent (array in control part)
12453 .*---------------------------------------------------------------------*
12454 :xmp tab=0.
12455
12456 <TC - Allowed matching mechanisms - template ifpresent (array in control part)>
12457
12458 <COMPILEGCC>
12459 <VERDICT_LEAF PASS>
12460 <MODULE TTCN x x.ttcn>
12461 module x {
12462
12463 type integer arrint[1];
12464
12465 control{
12466 template arrint f:= ? ifpresent;
12467 }
12468
12469 }
12470 <END_MODULE>
12471 <RESULT IF_PASS NEGATIVE>
12472 (?is)\berror:
12473 <END_RESULT>
12474 <END_TC>
12475
12476 :exmp.
12477
12478 .*---------------------------------------------------------------------*
12479 :h4.Allowed matching mechanisms - template ifpresent (array in function)
12480 .*---------------------------------------------------------------------*
12481 :xmp tab=0.
12482
12483 <TC - Allowed matching mechanisms - template ifpresent (array in function)>
12484
12485 <COMPILEGCC>
12486 <VERDICT_LEAF PASS>
12487 <MODULE TTCN x x.ttcn>
12488 module x {
12489
12490 type integer arrint[1];
12491
12492 function myFunct(){
12493 template arrint f:= ? ifpresent;
12494 }
12495
12496 }
12497 <END_MODULE>
12498 <RESULT IF_PASS NEGATIVE>
12499 (?is)\berror:
12500 <END_RESULT>
12501 <END_TC>
12502
12503 :exmp.
12504
12505 .*---------------------------------------------------------------------*
12506 :h4.Allowed matching mechanisms - inline-template range (boolean in function)
12507 .*---------------------------------------------------------------------*
12508 :xmp tab=0.
12509
12510 <TC - Allowed matching mechanisms - inline-template range (boolean in function)>
12511
12512 <COMPILE>
12513 <VERDICT_LEAF PASS>
12514 <MODULE TTCN x x.ttcn>
12515 module x {
12516
12517 type port portT message {
12518 in boolean
12519 } with {extension "internal"}
12520
12521 type component c {
12522 port portT myPort;
12523 }
12524
12525 function myFunct() runs on c {
12526
12527 const boolean c1:= false;
12528 const boolean c2:= true;
12529
12530 alt{
12531 [] myPort.receive( (c1..c2) )
12532 {}
12533 }
12534 }
12535
12536 }
12537 <END_MODULE>
12538 <RESULT IF_PASS COUNT 1>
12539 (?im)error.+?value.+?range.+?match.+?cannot.+?used
12540 <END_RESULT>
12541 <RESULT IF_PASS COUNT 1>
12542 (?is)\berror:
12543 <END_RESULT>
12544 <END_TC>
12545
12546 :exmp.
12547 .*---------------------------------------------------------------------*
12548 :h4.Allowed matching mechanisms - inline-template range (bitstring in function)
12549 .*---------------------------------------------------------------------*
12550 :xmp tab=0.
12551
12552 <TC - Allowed matching mechanisms - inline-template range (bitstring in function)>
12553
12554 <COMPILE>
12555 <VERDICT_LEAF PASS>
12556 <MODULE TTCN x x.ttcn>
12557 module x {
12558
12559 type port portT message {
12560 in bitstring
12561 } with {extension "internal"}
12562
12563 type component c {
12564 port portT myPort;
12565 }
12566
12567 function myFunct() runs on c {
12568
12569 const bitstring c1:= '000'B;
12570 const bitstring c2:= '111'B;
12571
12572 alt{
12573 [] myPort.receive( (c1..c2) )
12574 {}
12575 }
12576 }
12577
12578 }
12579 <END_MODULE>
12580 <RESULT IF_PASS COUNT 1>
12581 (?im)error.+?value.+?range.+?match.+?cannot.+?used
12582 <END_RESULT>
12583 <RESULT IF_PASS COUNT 1>
12584 (?is)\berror:
12585 <END_RESULT>
12586 <END_TC>
12587
12588 :exmp.
12589
12590 .*---------------------------------------------------------------------*
12591 :h4.Allowed matching mechanisms - inline-template range (octetstring in function)
12592 .*---------------------------------------------------------------------*
12593 :xmp tab=0.
12594
12595 <TC - Allowed matching mechanisms - inline-template range (octetstring in function)>
12596
12597 <COMPILE>
12598 <VERDICT_LEAF PASS>
12599 <MODULE TTCN x x.ttcn>
12600 module x {
12601
12602 type port portT message {
12603 in octetstring
12604 } with {extension "internal"}
12605
12606 type component c {
12607 port portT myPort;
12608 }
12609
12610 function myFunct() runs on c {
12611
12612 const octetstring c1:= '0000'O;
12613 const octetstring c2:= '1111'O;
12614
12615 alt{
12616 [] myPort.receive( (c1..c2) )
12617 {}
12618 }
12619 }
12620
12621 }
12622 <END_MODULE>
12623 <RESULT IF_PASS COUNT 1>
12624 (?im)error.+?value.+?range.+?match.+?cannot.+?used
12625 <END_RESULT>
12626 <RESULT IF_PASS COUNT 1>
12627 (?is)\berror:
12628 <END_RESULT>
12629 <END_TC>
12630
12631 :exmp.
12632
12633 .*---------------------------------------------------------------------*
12634 :h4.Allowed matching mechanisms - inline-template range (hexstring in function)
12635 .*---------------------------------------------------------------------*
12636 :xmp tab=0.
12637
12638 <TC - Allowed matching mechanisms - inline-template range (hexstring in function)>
12639
12640 <COMPILE>
12641 <VERDICT_LEAF PASS>
12642 <MODULE TTCN x x.ttcn>
12643 module x {
12644
12645 type port portT message {
12646 in hexstring
12647 } with {extension "internal"}
12648
12649 type component c {
12650 port portT myPort;
12651 }
12652
12653 function myFunct() runs on c {
12654
12655 const hexstring c1:= '0000'H;
12656 const hexstring c2:= '1111'H;
12657
12658 alt{
12659 [] myPort.receive( (c1..c2) )
12660 {}
12661 }
12662 }
12663
12664 }
12665 <END_MODULE>
12666 <RESULT IF_PASS COUNT 1>
12667 (?im)error.+?value.+?range.+?match.+?cannot.+?used
12668 <END_RESULT>
12669 <RESULT IF_PASS COUNT 1>
12670 (?is)\berror:
12671 <END_RESULT>
12672 <END_TC>
12673
12674 :exmp.
12675
12676 .*---------------------------------------------------------------------*
12677 :h4.Allowed matching mechanisms - inline-template range (record in function)
12678 .*---------------------------------------------------------------------*
12679 :xmp tab=0.
12680
12681 <TC - Allowed matching mechanisms - inline-template range (record in function)>
12682
12683 <COMPILE>
12684 <VERDICT_LEAF PASS>
12685 <MODULE TTCN x x.ttcn>
12686 module x {
12687
12688 type record recT{
12689 integer f1,
12690 float f2,
12691 charstring f3
12692 }
12693
12694 type port portT message {
12695 in recT
12696 } with {extension "internal"}
12697
12698 type component c {
12699 port portT myPort;
12700 }
12701
12702 const recT c1:= { f1:= 1, f2:= 2.0, f3:= "a"};
12703 const recT c2:= { f1:= 5, f2:= 7.0, f3:= "z"};
12704
12705 function myFunct() runs on c {
12706
12707 alt{
12708 [] myPort.receive( (c1..c2) )
12709 {}
12710 }
12711 }
12712
12713 }
12714 <END_MODULE>
12715 <RESULT IF_PASS COUNT 1>
12716 (?im)error.+?value.+?range.+?match.+?cannot.+?used
12717 <END_RESULT>
12718 <RESULT IF_PASS COUNT 1>
12719 (?is)\berror:
12720 <END_RESULT>
12721 <END_TC>
12722
12723 :exmp.
12724
12725 .*---------------------------------------------------------------------*
12726 :h4.Allowed matching mechanisms - inline-template range (record of in function)
12727 .*---------------------------------------------------------------------*
12728 :xmp tab=0.
12729
12730 <TC - Allowed matching mechanisms - inline-template range (record of in function)>
12731
12732 <COMPILE>
12733 <VERDICT_LEAF PASS>
12734 <MODULE TTCN x x.ttcn>
12735 module x {
12736
12737 type record of integer rofT;
12738
12739 const rofT c1:= { 1, 2, 3 };
12740 const rofT c2:= { 4, 5, 6 };
12741
12742 type port portT message {
12743 in rofT
12744 } with {extension "internal"}
12745
12746 type component c {
12747 port portT myPort;
12748 }
12749
12750 function myFunct() runs on c {
12751
12752 alt{
12753 [] myPort.receive( (c1..c2) )
12754 {}
12755 }
12756 }
12757
12758 }
12759 <END_MODULE>
12760 <RESULT IF_PASS COUNT 1>
12761 (?im)error.+?value.+?range.+?match.+?cannot.+?used
12762 <END_RESULT>
12763 <RESULT IF_PASS COUNT 1>
12764 (?is)\berror:
12765 <END_RESULT>
12766 <END_TC>
12767
12768 :exmp.
12769
12770 .*---------------------------------------------------------------------*
12771 :h4.Allowed matching mechanisms - inline-template range (set in function)
12772 .*---------------------------------------------------------------------*
12773 :xmp tab=0.
12774
12775 <TC - Allowed matching mechanisms - inline-template range (set in function)>
12776
12777 <COMPILE>
12778 <VERDICT_LEAF PASS>
12779 <MODULE TTCN x x.ttcn>
12780 module x {
12781
12782 type set setT{
12783 integer f1,
12784 float f2,
12785 charstring f3
12786 }
12787
12788 type port portT message {
12789 in setT
12790 } with {extension "internal"}
12791
12792 type component c {
12793 port portT myPort;
12794 }
12795
12796 const setT c1:= { f1:= 1, f2:= 2.0, f3:= "a"};
12797 const setT c2:= { f1:= 5, f2:= 7.0, f3:= "z"};
12798
12799 function myFunct() runs on c {
12800
12801 alt{
12802 [] myPort.receive( (c1..c2) )
12803 {}
12804 }
12805 }
12806
12807 }
12808 <END_MODULE>
12809 <RESULT IF_PASS COUNT 1>
12810 (?im)error.+?value.+?range.+?match.+?cannot.+?used
12811 <END_RESULT>
12812 <RESULT IF_PASS COUNT 1>
12813 (?is)\berror:
12814 <END_RESULT>
12815 <END_TC>
12816
12817 :exmp.
12818
12819 .*---------------------------------------------------------------------*
12820 :h4.Allowed matching mechanisms - inline-template range (set of in function)
12821 .*---------------------------------------------------------------------*
12822 :xmp tab=0.
12823
12824 <TC - Allowed matching mechanisms - inline-template range (set of in function)>
12825
12826 <COMPILE>
12827 <VERDICT_LEAF PASS>
12828 <MODULE TTCN x x.ttcn>
12829 module x {
12830
12831 type set of integer sofT;
12832
12833 const sofT c1:= { 1, 2, 3 };
12834 const sofT c2:= { 4, 5, 6 };
12835
12836 type port portT message {
12837 in sofT
12838 } with {extension "internal"}
12839
12840 type component c {
12841 port portT myPort;
12842 }
12843
12844 function myFunct() runs on c {
12845
12846 alt{
12847 [] myPort.receive( (c1..c2) )
12848 {}
12849 }
12850 }
12851
12852 }
12853 <END_MODULE>
12854 <RESULT IF_PASS COUNT 1>
12855 (?im)error.+?value.+?range.+?match.+?cannot.+?used
12856 <END_RESULT>
12857 <RESULT IF_PASS COUNT 1>
12858 (?is)\berror:
12859 <END_RESULT>
12860 <END_TC>
12861
12862 :exmp.
12863
12864 .*---------------------------------------------------------------------*
12865 :h4.Allowed matching mechanisms - inline-template range (enumerated in function)
12866 .*---------------------------------------------------------------------*
12867 :xmp tab=0.
12868
12869 <TC - Allowed matching mechanisms - inline-template range (enumerated in function)>
12870
12871 <COMPILE>
12872 <VERDICT_LEAF PASS>
12873 <MODULE TTCN x x.ttcn>
12874 module x {
12875
12876 type enumerated enumT { ONE(1), TWO(2), THREE(3) };
12877
12878 const enumT c1:= ONE;
12879 const enumT c2:= TWO;
12880
12881 type port portT message {
12882 in enumT
12883 } with {extension "internal"}
12884
12885 type component c {
12886 port portT myPort;
12887 }
12888
12889 function myFunct() runs on c {
12890
12891 alt{
12892 [] myPort.receive( (c1..c2) )
12893 {}
12894 }
12895 }
12896
12897 }
12898 <END_MODULE>
12899 <RESULT IF_PASS COUNT 1>
12900 (?im)error.+?value.+?range.+?match.+?cannot.+?used
12901 <END_RESULT>
12902 <RESULT IF_PASS COUNT 1>
12903 (?is)\berror:
12904 <END_RESULT>
12905 <END_TC>
12906
12907 :exmp.
12908
12909 .*---------------------------------------------------------------------*
12910 :h4.Allowed matching mechanisms - inline-template range (union in function)
12911 .*---------------------------------------------------------------------*
12912 :xmp tab=0.
12913
12914 <TC - Allowed matching mechanisms - inline-template range (union in function)>
12915
12916 <COMPILE>
12917 <VERDICT_LEAF PASS>
12918 <MODULE TTCN x x.ttcn>
12919 module x {
12920
12921 type union uniT{
12922 integer f1,
12923 float f2,
12924 charstring f3
12925 }
12926
12927 const uniT c1:= { f1:= 1 };
12928 const uniT c2:= { f1:= 5 };
12929
12930 type port portT message {
12931 in uniT
12932 } with {extension "internal"}
12933
12934 type component c {
12935 port portT myPort;
12936 }
12937
12938 function myFunct() runs on c {
12939
12940 alt{
12941 [] myPort.receive( (c1..c2) )
12942 {}
12943 }
12944 }
12945
12946 }
12947 <END_MODULE>
12948 <RESULT IF_PASS COUNT 1>
12949 (?im)error.+?value.+?range.+?match.+?cannot.+?used
12950 <END_RESULT>
12951 <RESULT IF_PASS COUNT 1>
12952 (?is)\berror:
12953 <END_RESULT>
12954 <END_TC>
12955
12956 :exmp.
12957
12958 .*---------------------------------------------------------------------*
12959 :h4.Allowed matching mechanisms - inline-template range (array in function)
12960 .*---------------------------------------------------------------------*
12961 :xmp tab=0.
12962
12963 <TC - Allowed matching mechanisms - inline-template range (array in function)>
12964
12965 <COMPILE>
12966 <VERDICT_LEAF PASS>
12967 <MODULE TTCN x x.ttcn>
12968 module x {
12969
12970 type integer arrint[1];
12971
12972 const arrint c1:= { 1 };
12973 const arrint c2:= { 5 };
12974
12975 type port portT message {
12976 in arrint
12977 } with {extension "internal"}
12978
12979 type component c {
12980 port portT myPort;
12981 }
12982
12983 function myFunct() runs on c {
12984 //TR 728
12985 alt{
12986 [] myPort.receive( (c1..c2) )
12987 {}
12988 }
12989 }
12990
12991 }
12992 <END_MODULE>
12993 <RESULT IF_PASS COUNT 1>
12994 (?im)error.+?value.+?range.+?match.+?cannot.+?used
12995 <END_RESULT>
12996 <RESULT IF_PASS COUNT 1>
12997 (?is)\berror:
12998 <END_RESULT>
12999 <END_TC>
13000
13001 :exmp.
13002
13003
13004 .*---------------------------------------------------------------------*
13005 :h4.Allowed matching mechanisms - inline-template superset (boolean in function)
13006 .*---------------------------------------------------------------------*
13007 :xmp tab=0.
13008
13009 <TC - Allowed matching mechanisms - inline-template superset (boolean in function)>
13010
13011 <COMPILE>
13012 <VERDICT_LEAF PASS>
13013 <MODULE TTCN x x.ttcn>
13014 module x {
13015
13016 const boolean c1:= false;
13017 const boolean c2:= true;
13018
13019 type port portT message {
13020 in boolean
13021 } with {extension "internal"}
13022
13023 type component c {
13024 port portT myPort;
13025 }
13026
13027 function myFunct() runs on c {
13028
13029 alt{
13030 [] myPort.receive( superset(c1,c2) )
13031 {}
13032 }
13033 }
13034
13035 }
13036 <END_MODULE>
13037 <RESULT IF_PASS COUNT 1>
13038 (?im)error.+?superset.+?match.+?cannot.+?used
13039 <END_RESULT>
13040 <RESULT IF_PASS COUNT 1>
13041 (?is)\berror:
13042 <END_RESULT>
13043 <END_TC>
13044
13045 :exmp.
13046
13047 .*---------------------------------------------------------------------*
13048 :h4.Allowed matching mechanisms - inline-template superset (integer in function)
13049 .*---------------------------------------------------------------------*
13050 :xmp tab=0.
13051
13052 <TC - Allowed matching mechanisms - inline-template superset (integer in function)>
13053
13054 <COMPILE>
13055 <VERDICT_LEAF PASS>
13056 <MODULE TTCN x x.ttcn>
13057 module x {
13058
13059 const integer c1:= 1;
13060 const integer c2:= 5;
13061
13062 type port portT message {
13063 in integer
13064 } with {extension "internal"}
13065
13066 type component c {
13067 port portT myPort;
13068 }
13069
13070 function myFunct() runs on c {
13071
13072 alt{
13073 [] myPort.receive( superset(c1,c2) )
13074 {}
13075 }
13076 }
13077
13078 }
13079 <END_MODULE>
13080 <RESULT IF_PASS COUNT 1>
13081 (?im)error.+?superset.+?match.+?cannot.+?used
13082 <END_RESULT>
13083 <RESULT IF_PASS COUNT 1>
13084 (?is)\berror:
13085 <END_RESULT>
13086 <END_TC>
13087
13088 :exmp.
13089
13090 .*---------------------------------------------------------------------*
13091 :h4.Allowed matching mechanisms - inline-template superset (float in function)
13092 .*---------------------------------------------------------------------*
13093 :xmp tab=0.
13094
13095 <TC - Allowed matching mechanisms - inline-template superset (float in function)>
13096
13097 <COMPILE>
13098 <VERDICT_LEAF PASS>
13099 <MODULE TTCN x x.ttcn>
13100 module x {
13101
13102 const float c1:= 1.0;
13103 const float c2:= 5.0;
13104
13105 type port portT message {
13106 in float
13107 } with {extension "internal"}
13108
13109 type component c {
13110 port portT myPort;
13111 }
13112
13113 function myFunct() runs on c {
13114
13115 alt{
13116 [] myPort.receive( superset(c1,c2) )
13117 {}
13118 }
13119 }
13120
13121 }
13122 <END_MODULE>
13123 <RESULT IF_PASS COUNT 1>
13124 (?im)error.+?superset.+?match.+?cannot.+?used
13125 <END_RESULT>
13126 <RESULT IF_PASS COUNT 1>
13127 (?is)\berror:
13128 <END_RESULT>
13129 <END_TC>
13130
13131 :exmp.
13132
13133 .*---------------------------------------------------------------------*
13134 :h4.Allowed matching mechanisms - inline-template superset (bitstring in function)
13135 .*---------------------------------------------------------------------*
13136 :xmp tab=0.
13137
13138 <TC - Allowed matching mechanisms - inline-template superset (bitstring in function)>
13139
13140 <COMPILE>
13141 <VERDICT_LEAF PASS>
13142 <MODULE TTCN x x.ttcn>
13143 module x {
13144
13145 const bitstring c1:= '0000'B;
13146 const bitstring c2:= '1111'B;
13147
13148 type port portT message {
13149 in bitstring
13150 } with {extension "internal"}
13151
13152 type component c {
13153 port portT myPort;
13154 }
13155
13156 function myFunct() runs on c {
13157
13158 alt{
13159 [] myPort.receive( superset(c1,c2) )
13160 {}
13161 }
13162 }
13163
13164 }
13165 <END_MODULE>
13166 <RESULT IF_PASS COUNT 1>
13167 (?im)error.+?superset.+?match.+?cannot.+?used
13168 <END_RESULT>
13169 <RESULT IF_PASS COUNT 1>
13170 (?is)\berror:
13171 <END_RESULT>
13172 <END_TC>
13173
13174 :exmp.
13175
13176 .*---------------------------------------------------------------------*
13177 :h4.Allowed matching mechanisms - inline-template superset (octetstring in function)
13178 .*---------------------------------------------------------------------*
13179 :xmp tab=0.
13180
13181 <TC - Allowed matching mechanisms - inline-template superset (octetstring in function)>
13182
13183 <COMPILE>
13184 <VERDICT_LEAF PASS>
13185 <MODULE TTCN x x.ttcn>
13186 module x {
13187
13188 const octetstring c1:= '0000'O;
13189 const octetstring c2:= '1111'O;
13190
13191 type port portT message {
13192 in octetstring
13193 } with {extension "internal"}
13194
13195 type component c {
13196 port portT myPort;
13197 }
13198
13199 function myFunct() runs on c {
13200
13201 alt{
13202 [] myPort.receive( superset(c1,c2) )
13203 {}
13204 }
13205 }
13206
13207 }
13208 <END_MODULE>
13209 <RESULT IF_PASS COUNT 1>
13210 (?im)error.+?superset.+?match.+?cannot.+?used
13211 <END_RESULT>
13212 <RESULT IF_PASS COUNT 1>
13213 (?is)\berror:
13214 <END_RESULT>
13215 <END_TC>
13216
13217 :exmp.
13218
13219 .*---------------------------------------------------------------------*
13220 :h4.Allowed matching mechanisms - inline-template superset (hexstring in function)
13221 .*---------------------------------------------------------------------*
13222 :xmp tab=0.
13223
13224 <TC - Allowed matching mechanisms - inline-template superset (hexstring in function)>
13225
13226 <COMPILE>
13227 <VERDICT_LEAF PASS>
13228 <MODULE TTCN x x.ttcn>
13229 module x {
13230
13231 const hexstring c1:= '0000'H;
13232 const hexstring c2:= '1111'H;
13233
13234 type port portT message {
13235 in hexstring
13236 } with {extension "internal"}
13237
13238 type component c {
13239 port portT myPort;
13240 }
13241
13242 function myFunct() runs on c {
13243
13244 alt{
13245 [] myPort.receive( superset(c1,c2) )
13246 {}
13247 }
13248 }
13249
13250 }
13251 <END_MODULE>
13252 <RESULT IF_PASS COUNT 1>
13253 (?im)error.+?superset.+?match.+?cannot.+?used
13254 <END_RESULT>
13255 <RESULT IF_PASS COUNT 1>
13256 (?is)\berror:
13257 <END_RESULT>
13258 <END_TC>
13259
13260 :exmp.
13261
13262 .*---------------------------------------------------------------------*
13263 :h4.Allowed matching mechanisms - inline-template superset (charstring in function)
13264 .*---------------------------------------------------------------------*
13265 :xmp tab=0.
13266
13267 <TC - Allowed matching mechanisms - inline-template superset (charstring in function)>
13268
13269 <COMPILE>
13270 <VERDICT_LEAF PASS>
13271 <MODULE TTCN x x.ttcn>
13272 module x {
13273
13274 const charstring c1:= "a";
13275 const charstring c2:= "z";
13276
13277 type port portT message {
13278 in charstring
13279 } with {extension "internal"}
13280
13281 type component c {
13282 port portT myPort;
13283 }
13284
13285 function myFunct() runs on c {
13286
13287 alt{
13288 [] myPort.receive( superset(c1,c2) )
13289 {}
13290 }
13291 }
13292
13293 }
13294 <END_MODULE>
13295 <RESULT IF_PASS COUNT 1>
13296 (?im)error.+?superset.+?match.+?cannot.+?used
13297 <END_RESULT>
13298 <RESULT IF_PASS COUNT 1>
13299 (?is)\berror:
13300 <END_RESULT>
13301 <END_TC>
13302
13303 :exmp.
13304
13305 .*---------------------------------------------------------------------*
13306 :h4.Allowed matching mechanisms - inline-template superset (record in function)
13307 .*---------------------------------------------------------------------*
13308 :xmp tab=0.
13309
13310 <TC - Allowed matching mechanisms - inline-template superset (record in function)>
13311
13312 <COMPILE>
13313 <VERDICT_LEAF PASS>
13314 <MODULE TTCN x x.ttcn>
13315 module x {
13316
13317 type record recT{
13318 integer f1,
13319 float f2,
13320 charstring f3
13321 }
13322
13323 const recT c1:= { f1:= 1, f2:= 2.0, f3:= "a"};
13324 const recT c2:= { f1:= 5, f2:= 7.0, f3:= "z"};
13325
13326 type port portT message {
13327 in recT
13328 } with {extension "internal"}
13329
13330 type component c {
13331 port portT myPort;
13332 }
13333
13334 function myFunct() runs on c {
13335
13336 alt{
13337 [] myPort.receive( superset(c1,c2) )
13338 {}
13339 }
13340 }
13341
13342 }
13343 <END_MODULE>
13344 <RESULT IF_PASS COUNT 1>
13345 (?im)error.+?superset.+?match.+?cannot.+?used
13346 <END_RESULT>
13347 <RESULT IF_PASS COUNT 1>
13348 (?is)\berror:
13349 <END_RESULT>
13350 <END_TC>
13351
13352 :exmp.
13353
13354 .*---------------------------------------------------------------------*
13355 :h4.Allowed matching mechanisms - inline-template superset (record of in function)
13356 .*---------------------------------------------------------------------*
13357 :xmp tab=0.
13358
13359 <TC - Allowed matching mechanisms - inline-template superset (record of in function)>
13360
13361 <COMPILE>
13362 <VERDICT_LEAF PASS>
13363 <MODULE TTCN x x.ttcn>
13364 module x {
13365
13366 type record of integer rofT;
13367
13368 const rofT c1:= { 1, 2, 3 };
13369 const rofT c2:= { 4, 5, 6 };
13370
13371 type port portT message {
13372 in rofT
13373 } with {extension "internal"}
13374
13375 type component c {
13376 port portT myPort;
13377 }
13378
13379 function myFunct() runs on c {
13380
13381 alt{
13382 [] myPort.receive( superset(c1,c2) )
13383 {}
13384 }
13385 }
13386
13387 }
13388 <END_MODULE>
13389 <RESULT IF_PASS COUNT 1>
13390 (?im)error.+?superset.+?match.+?cannot.+?used
13391 <END_RESULT>
13392 <RESULT IF_PASS COUNT 1>
13393 (?is)\berror:
13394 <END_RESULT>
13395 <END_TC>
13396
13397 :exmp.
13398
13399 .*---------------------------------------------------------------------*
13400 :h4.Allowed matching mechanisms - inline-template superset (set in function)
13401 .*---------------------------------------------------------------------*
13402 :xmp tab=0.
13403
13404 <TC - Allowed matching mechanisms - inline-template superset (set in function)>
13405
13406 <COMPILE>
13407 <VERDICT_LEAF PASS>
13408 <MODULE TTCN x x.ttcn>
13409 module x {
13410
13411 type set setT{
13412 integer f1,
13413 float f2,
13414 charstring f3
13415 }
13416
13417 const setT c1:= { f1:= 1, f2:= 2.0, f3:= "a"};
13418 const setT c2:= { f1:= 5, f2:= 7.0, f3:= "z"};
13419
13420 type port portT message {
13421 in setT
13422 } with {extension "internal"}
13423
13424 type component c {
13425 port portT myPort;
13426 }
13427
13428 function myFunct() runs on c {
13429
13430 alt{
13431 [] myPort.receive( superset(c1,c2) )
13432 {}
13433 }
13434 }
13435
13436 }
13437 <END_MODULE>
13438 <RESULT IF_PASS COUNT 1>
13439 (?im)error.+?superset.+?match.+?cannot.+?used
13440 <END_RESULT>
13441 <RESULT IF_PASS COUNT 1>
13442 (?is)\berror:
13443 <END_RESULT>
13444 <END_TC>
13445
13446 :exmp.
13447
13448 .*---------------------------------------------------------------------*
13449 :h4.Allowed matching mechanisms - inline-template superset (enumerated in function)
13450 .*---------------------------------------------------------------------*
13451 :xmp tab=0.
13452
13453 <TC - Allowed matching mechanisms - inline-template superset (enumerated in function)>
13454
13455 <COMPILE>
13456 <VERDICT_LEAF PASS>
13457 <MODULE TTCN x x.ttcn>
13458 module x {
13459
13460 type enumerated enumT { ONE(1), TWO(2), THREE(3) };
13461
13462 const enumT c1:= ONE;
13463 const enumT c2:= TWO;
13464
13465 type port portT message {
13466 in enumT
13467 } with {extension "internal"}
13468
13469 type component c {
13470 port portT myPort;
13471 }
13472
13473 function myFunct() runs on c {
13474
13475 alt{
13476 [] myPort.receive( superset(c1,c2) )
13477 {}
13478 }
13479 }
13480
13481 }
13482 <END_MODULE>
13483 <RESULT IF_PASS COUNT 1>
13484 (?im)error.+?superset.+?match.+?cannot.+?used
13485 <END_RESULT>
13486 <RESULT IF_PASS COUNT 1>
13487 (?is)\berror:
13488 <END_RESULT>
13489 <END_TC>
13490
13491 :exmp.
13492
13493 .*---------------------------------------------------------------------*
13494 :h4.Allowed matching mechanisms - inline-template superset (union in function)
13495 .*---------------------------------------------------------------------*
13496 :xmp tab=0.
13497
13498 <TC - Allowed matching mechanisms - inline-template superset (union in function)>
13499
13500 <COMPILE>
13501 <VERDICT_LEAF PASS>
13502 <MODULE TTCN x x.ttcn>
13503 module x {
13504
13505 type union uniT{
13506 integer f1,
13507 float f2,
13508 charstring f3
13509 }
13510
13511 const uniT c1:= { f3:= "a"};
13512 const uniT c2:= { f3:= "z"};
13513
13514 type port portT message {
13515 in uniT
13516 } with {extension "internal"}
13517
13518 type component c {
13519 port portT myPort;
13520 }
13521
13522 function myFunct() runs on c {
13523
13524 alt{
13525 [] myPort.receive( superset(c1,c2) )
13526 {}
13527 }
13528 }
13529
13530 }
13531 <END_MODULE>
13532 <RESULT IF_PASS COUNT 1>
13533 (?im)error.+?superset.+?match.+?cannot.+?used
13534 <END_RESULT>
13535 <RESULT IF_PASS COUNT 1>
13536 (?is)\berror:
13537 <END_RESULT>
13538 <END_TC>
13539
13540 :exmp.
13541
13542 .*---------------------------------------------------------------------*
13543 :h4.Allowed matching mechanisms - inline-template superset (array in function)
13544 .*---------------------------------------------------------------------*
13545 :xmp tab=0.
13546
13547 <TC - Allowed matching mechanisms - inline-template superset (array in function)>
13548
13549 <COMPILE>
13550 <VERDICT_LEAF PASS>
13551 <MODULE TTCN x x.ttcn>
13552 module x {
13553
13554 type integer arrint[1];
13555
13556 const arrint c1:= { 1 };
13557 const arrint c2:= { 5 };
13558
13559 type port portT message {
13560 in arrint
13561 } with {extension "internal"}
13562
13563 type component c {
13564 port portT myPort;
13565 }
13566
13567 function myFunct() runs on c {
13568
13569 alt{
13570 [] myPort.receive( superset(c1,c2) )
13571 {}
13572 }
13573 }
13574
13575 }
13576 <END_MODULE>
13577 <RESULT IF_PASS COUNT 1>
13578 (?im)error.+?superset.+?match.+?cannot.+?used
13579 <END_RESULT>
13580 <RESULT IF_PASS COUNT 1>
13581 (?is)\berror:
13582 <END_RESULT>
13583 <END_TC>
13584
13585 :exmp.
13586
13587 .*---------------------------------------------------------------------*
13588 :h4.Allowed matching mechanisms - inline-template subset (boolean in function)
13589 .*---------------------------------------------------------------------*
13590 :xmp tab=0.
13591
13592 <TC - Allowed matching mechanisms - inline-template subset (boolean in function)>
13593
13594 <COMPILE>
13595 <VERDICT_LEAF PASS>
13596 <MODULE TTCN x x.ttcn>
13597 module x {
13598
13599 const boolean c1:= false;
13600 const boolean c2:= true;
13601
13602 type port portT message {
13603 in boolean
13604 } with {extension "internal"}
13605
13606 type component c {
13607 port portT myPort;
13608 }
13609
13610 function myFunct() runs on c {
13611
13612 alt{
13613 [] myPort.receive( subset(c1,c2) )
13614 {}
13615 }
13616 }
13617
13618 }
13619 <END_MODULE>
13620 <RESULT IF_PASS COUNT 1>
13621 (?im)error.+?subset.+?match.+?cannot.+?used
13622 <END_RESULT>
13623 <RESULT IF_PASS COUNT 1>
13624 (?is)\berror:
13625 <END_RESULT>
13626 <END_TC>
13627
13628 :exmp.
13629
13630 .*---------------------------------------------------------------------*
13631 :h4.Allowed matching mechanisms - inline-template subset (integer in function)
13632 .*---------------------------------------------------------------------*
13633 :xmp tab=0.
13634
13635 <TC - Allowed matching mechanisms - inline-template subset (integer in function)>
13636
13637 <COMPILE>
13638 <VERDICT_LEAF PASS>
13639 <MODULE TTCN x x.ttcn>
13640 module x {
13641
13642 const integer c1:= 1;
13643 const integer c2:= 5;
13644
13645 type port portT message {
13646 in integer
13647 } with {extension "internal"}
13648
13649 type component c {
13650 port portT myPort;
13651 }
13652
13653 function myFunct() runs on c {
13654
13655 alt{
13656 [] myPort.receive( subset(c1,c2) )
13657 {}
13658 }
13659 }
13660
13661 }
13662 <END_MODULE>
13663 <RESULT IF_PASS COUNT 1>
13664 (?im)error.+?subset.+?match.+?cannot.+?used
13665 <END_RESULT>
13666 <RESULT IF_PASS COUNT 1>
13667 (?is)\berror:
13668 <END_RESULT>
13669 <END_TC>
13670
13671 :exmp.
13672
13673 .*---------------------------------------------------------------------*
13674 :h4.Allowed matching mechanisms - inline-template subset (float in function)
13675 .*---------------------------------------------------------------------*
13676 :xmp tab=0.
13677
13678 <TC - Allowed matching mechanisms - inline-template subset (float in function)>
13679
13680 <COMPILE>
13681 <VERDICT_LEAF PASS>
13682 <MODULE TTCN x x.ttcn>
13683 module x {
13684
13685 const float c1:= 1.0;
13686 const float c2:= 5.0;
13687
13688 type port portT message {
13689 in float
13690 } with {extension "internal"}
13691
13692 type component c {
13693 port portT myPort;
13694 }
13695
13696 function myFunct() runs on c {
13697
13698 alt{
13699 [] myPort.receive( subset(c1,c2) )
13700 {}
13701 }
13702 }
13703
13704 }
13705 <END_MODULE>
13706 <RESULT IF_PASS COUNT 1>
13707 (?im)error.+?subset.+?match.+?cannot.+?used
13708 <END_RESULT>
13709 <RESULT IF_PASS COUNT 1>
13710 (?is)\berror:
13711 <END_RESULT>
13712 <END_TC>
13713
13714 :exmp.
13715
13716 .*---------------------------------------------------------------------*
13717 :h4.Allowed matching mechanisms - inline-template subset (bitstring in function)
13718 .*---------------------------------------------------------------------*
13719 :xmp tab=0.
13720
13721 <TC - Allowed matching mechanisms - inline-template subset (bitstring in function)>
13722
13723 <COMPILE>
13724 <VERDICT_LEAF PASS>
13725 <MODULE TTCN x x.ttcn>
13726 module x {
13727
13728 const bitstring c1:= '0000'B;
13729 const bitstring c2:= '1111'B;
13730
13731 type port portT message {
13732 in bitstring
13733 } with {extension "internal"}
13734
13735 type component c {
13736 port portT myPort;
13737 }
13738
13739 function myFunct() runs on c {
13740
13741 alt{
13742 [] myPort.receive( subset(c1,c2) )
13743 {}
13744 }
13745 }
13746
13747 }
13748 <END_MODULE>
13749 <RESULT IF_PASS COUNT 1>
13750 (?im)error.+?subset.+?match.+?cannot.+?used
13751 <END_RESULT>
13752 <RESULT IF_PASS COUNT 1>
13753 (?is)\berror:
13754 <END_RESULT>
13755 <END_TC>
13756
13757 :exmp.
13758
13759 .*---------------------------------------------------------------------*
13760 :h4.Allowed matching mechanisms - inline-template subset (octetstring in function)
13761 .*---------------------------------------------------------------------*
13762 :xmp tab=0.
13763
13764 <TC - Allowed matching mechanisms - inline-template subset (octetstring in function)>
13765
13766 <COMPILE>
13767 <VERDICT_LEAF PASS>
13768 <MODULE TTCN x x.ttcn>
13769 module x {
13770
13771 const octetstring c1:= '0000'O;
13772 const octetstring c2:= '1111'O;
13773
13774 type port portT message {
13775 in octetstring
13776 } with {extension "internal"}
13777
13778 type component c {
13779 port portT myPort;
13780 }
13781
13782 function myFunct() runs on c {
13783
13784 alt{
13785 [] myPort.receive( subset(c1,c2) )
13786 {}
13787 }
13788 }
13789
13790 }
13791 <END_MODULE>
13792 <RESULT IF_PASS COUNT 1>
13793 (?im)error.+?subset.+?match.+?cannot.+?used
13794 <END_RESULT>
13795 <RESULT IF_PASS COUNT 1>
13796 (?is)\berror:
13797 <END_RESULT>
13798 <END_TC>
13799
13800 :exmp.
13801
13802 .*---------------------------------------------------------------------*
13803 :h4.Allowed matching mechanisms - inline-template subset (hexstring in function)
13804 .*---------------------------------------------------------------------*
13805 :xmp tab=0.
13806
13807 <TC - Allowed matching mechanisms - inline-template subset (hexstring in function)>
13808
13809 <COMPILE>
13810 <VERDICT_LEAF PASS>
13811 <MODULE TTCN x x.ttcn>
13812 module x {
13813
13814 const hexstring c1:= '0000'H;
13815 const hexstring c2:= '1111'H;
13816
13817 type port portT message {
13818 in hexstring
13819 } with {extension "internal"}
13820
13821 type component c {
13822 port portT myPort;
13823 }
13824
13825 function myFunct() runs on c {
13826
13827 alt{
13828 [] myPort.receive( subset(c1,c2) )
13829 {}
13830 }
13831 }
13832
13833 }
13834 <END_MODULE>
13835 <RESULT IF_PASS COUNT 1>
13836 (?im)error.+?subset.+?match.+?cannot.+?used
13837 <END_RESULT>
13838 <RESULT IF_PASS COUNT 1>
13839 (?is)\berror:
13840 <END_RESULT>
13841 <END_TC>
13842
13843 :exmp.
13844
13845 .*---------------------------------------------------------------------*
13846 :h4.Allowed matching mechanisms - inline-template subset (charstring in function)
13847 .*---------------------------------------------------------------------*
13848 :xmp tab=0.
13849
13850 <TC - Allowed matching mechanisms - inline-template subset (charstring in function)>
13851
13852 <COMPILE>
13853 <VERDICT_LEAF PASS>
13854 <MODULE TTCN x x.ttcn>
13855 module x {
13856
13857 const charstring c1:= "a";
13858 const charstring c2:= "z";
13859
13860 type port portT message {
13861 in charstring
13862 } with {extension "internal"}
13863
13864 type component c {
13865 port portT myPort;
13866 }
13867
13868 function myFunct() runs on c {
13869
13870 alt{
13871 [] myPort.receive( subset(c1,c2) )
13872 {}
13873 }
13874 }
13875
13876 }
13877 <END_MODULE>
13878 <RESULT IF_PASS COUNT 1>
13879 (?im)error.+?subset.+?match.+?cannot.+?used
13880 <END_RESULT>
13881 <RESULT IF_PASS COUNT 1>
13882 (?is)\berror:
13883 <END_RESULT>
13884 <END_TC>
13885
13886 :exmp.
13887
13888 .*---------------------------------------------------------------------*
13889 :h4.Allowed matching mechanisms - inline-template subset (record in function)
13890 .*---------------------------------------------------------------------*
13891 :xmp tab=0.
13892
13893 <TC - Allowed matching mechanisms - inline-template subset (record in function)>
13894
13895 <COMPILE>
13896 <VERDICT_LEAF PASS>
13897 <MODULE TTCN x x.ttcn>
13898 module x {
13899
13900 type record recT{
13901 integer f1,
13902 float f2,
13903 charstring f3
13904 }
13905
13906 const recT c1:= { f1:= 1, f2:= 2.0, f3:= "a"};
13907 const recT c2:= { f1:= 5, f2:= 7.0, f3:= "z"};
13908
13909 type port portT message {
13910 in recT
13911 } with {extension "internal"}
13912
13913 type component c {
13914 port portT myPort;
13915 }
13916
13917 function myFunct() runs on c {
13918
13919 alt{
13920 [] myPort.receive( subset(c1,c2) )
13921 {}
13922 }
13923 }
13924
13925 }
13926 <END_MODULE>
13927 <RESULT IF_PASS COUNT 1>
13928 (?im)error.+?subset.+?match.+?cannot.+?used
13929 <END_RESULT>
13930 <RESULT IF_PASS COUNT 1>
13931 (?is)\berror:
13932 <END_RESULT>
13933 <END_TC>
13934
13935 :exmp.
13936
13937 .*---------------------------------------------------------------------*
13938 :h4.Allowed matching mechanisms - inline-template subset (record of in function)
13939 .*---------------------------------------------------------------------*
13940 :xmp tab=0.
13941
13942 <TC - Allowed matching mechanisms - inline-template subset (record of in function)>
13943
13944 <COMPILE>
13945 <VERDICT_LEAF PASS>
13946 <MODULE TTCN x x.ttcn>
13947 module x {
13948
13949 type record of integer rofT;
13950
13951 const rofT c1:= { 1, 2, 3 };
13952 const rofT c2:= { 4, 5, 6 };
13953
13954 type port portT message {
13955 in rofT
13956 } with {extension "internal"}
13957
13958 type component c {
13959 port portT myPort;
13960 }
13961
13962 function myFunct() runs on c {
13963
13964 alt{
13965 [] myPort.receive( subset(c1,c2) )
13966 {}
13967 }
13968 }
13969
13970 }
13971 <END_MODULE>
13972 <RESULT IF_PASS COUNT 1>
13973 (?im)error.+?subset.+?match.+?cannot.+?used
13974 <END_RESULT>
13975 <RESULT IF_PASS COUNT 1>
13976 (?is)\berror:
13977 <END_RESULT>
13978 <END_TC>
13979
13980 :exmp.
13981
13982 .*---------------------------------------------------------------------*
13983 :h4.Allowed matching mechanisms - inline-template subset (set in function)
13984 .*---------------------------------------------------------------------*
13985 :xmp tab=0.
13986
13987 <TC - Allowed matching mechanisms - inline-template subset (set in function)>
13988
13989 <COMPILE>
13990 <VERDICT_LEAF PASS>
13991 <MODULE TTCN x x.ttcn>
13992 module x {
13993
13994 type set setT{
13995 integer f1,
13996 float f2,
13997 charstring f3
13998 }
13999
14000 const setT c1:= { f1:= 1, f2:= 2.0, f3:= "a"};
14001 const setT c2:= { f1:= 5, f2:= 7.0, f3:= "z"};
14002
14003 type port portT message {
14004 in setT
14005 } with {extension "internal"}
14006
14007 type component c {
14008 port portT myPort;
14009 }
14010
14011 function myFunct() runs on c {
14012
14013 alt{
14014 [] myPort.receive( subset(c1,c2) )
14015 {}
14016 }
14017 }
14018
14019 }
14020 <END_MODULE>
14021 <RESULT IF_PASS COUNT 1>
14022 (?im)error.+?subset.+?match.+?cannot.+?used
14023 <END_RESULT>
14024 <RESULT IF_PASS COUNT 1>
14025 (?is)\berror:
14026 <END_RESULT>
14027 <END_TC>
14028
14029 :exmp.
14030
14031 .*---------------------------------------------------------------------*
14032 :h4.Allowed matching mechanisms - inline-template subset (enumerated in function)
14033 .*---------------------------------------------------------------------*
14034 :xmp tab=0.
14035
14036 <TC - Allowed matching mechanisms - inline-template subset (enumerated in function)>
14037
14038 <COMPILE>
14039 <VERDICT_LEAF PASS>
14040 <MODULE TTCN x x.ttcn>
14041 module x {
14042
14043 type enumerated enumT { ONE(1), TWO(2), THREE(3) };
14044
14045 const enumT c1:= ONE;
14046 const enumT c2:= TWO;
14047
14048 type port portT message {
14049 in enumT
14050 } with {extension "internal"}
14051
14052 type component c {
14053 port portT myPort;
14054 }
14055
14056 function myFunct() runs on c {
14057
14058 alt{
14059 [] myPort.receive( subset(c1,c2) )
14060 {}
14061 }
14062 }
14063
14064 }
14065 <END_MODULE>
14066 <RESULT IF_PASS COUNT 1>
14067 (?im)error.+?subset.+?match.+?cannot.+?used
14068 <END_RESULT>
14069 <RESULT IF_PASS COUNT 1>
14070 (?is)\berror:
14071 <END_RESULT>
14072 <END_TC>
14073
14074 :exmp.
14075
14076 .*---------------------------------------------------------------------*
14077 :h4.Allowed matching mechanisms - inline-template subset (union in function)
14078 .*---------------------------------------------------------------------*
14079 :xmp tab=0.
14080
14081 <TC - Allowed matching mechanisms - inline-template subset (union in function)>
14082
14083 <COMPILE>
14084 <VERDICT_LEAF PASS>
14085 <MODULE TTCN x x.ttcn>
14086 module x {
14087
14088 type union uniT{
14089 integer f1,
14090 float f2,
14091 charstring f3
14092 }
14093
14094 const uniT c1:= { f3:= "a"};
14095 const uniT c2:= { f3:= "z"};
14096
14097 type port portT message {
14098 in uniT
14099 } with {extension "internal"}
14100
14101 type component c {
14102 port portT myPort;
14103 }
14104
14105 function myFunct() runs on c {
14106
14107 alt{
14108 [] myPort.receive( subset(c1,c2) )
14109 {}
14110 }
14111 }
14112
14113 }
14114 <END_MODULE>
14115 <RESULT IF_PASS COUNT 1>
14116 (?im)error.+?subset.+?match.+?cannot.+?used
14117 <END_RESULT>
14118 <RESULT IF_PASS COUNT 1>
14119 (?is)\berror:
14120 <END_RESULT>
14121 <END_TC>
14122
14123 :exmp.
14124
14125 .*---------------------------------------------------------------------*
14126 :h4.Allowed matching mechanisms - inline-template subset (array in function)
14127 .*---------------------------------------------------------------------*
14128 :xmp tab=0.
14129
14130 <TC - Allowed matching mechanisms - inline-template subset (array in function)>
14131
14132 <COMPILE>
14133 <VERDICT_LEAF PASS>
14134 <MODULE TTCN x x.ttcn>
14135 module x {
14136
14137 type integer arrint[1];
14138
14139 const arrint c1:= { 1 };
14140 const arrint c2:= { 5 };
14141
14142 type port portT message {
14143 in arrint
14144 } with {extension "internal"}
14145
14146 type component c {
14147 port portT myPort;
14148 }
14149
14150 function myFunct() runs on c {
14151
14152 alt{
14153 [] myPort.receive( subset(c1,c2) )
14154 {}
14155 }
14156 }
14157
14158 }
14159 <END_MODULE>
14160 <RESULT IF_PASS COUNT 1>
14161 (?im)error.+?subset.+?match.+?cannot.+?used
14162 <END_RESULT>
14163 <RESULT IF_PASS COUNT 1>
14164 (?is)\berror:
14165 <END_RESULT>
14166 <END_TC>
14167
14168 :exmp.
14169
14170 .*---------------------------------------------------------------------*
14171 :h4.Allowed matching mechanisms - inline-template length-restriction (boolean in function)
14172 .*---------------------------------------------------------------------*
14173 :xmp tab=0.
14174
14175 <TC - Allowed matching mechanisms - inline-template length-restriction (boolean in function)>
14176
14177 <COMPILE>
14178 <VERDICT_LEAF PASS>
14179 <MODULE TTCN x x.ttcn>
14180 module x {
14181
14182 type port portT message {
14183 in boolean
14184 } with {extension "internal"}
14185
14186 type component c {
14187 port portT myPort;
14188 }
14189
14190 function myFunct() runs on c {
14191
14192 alt{
14193 [] myPort.receive( ? length(1) )
14194 {}
14195 }
14196 }
14197
14198 }
14199 <END_MODULE>
14200 <RESULT IF_PASS COUNT 1>
14201 (?im)error.+?Length.+?restriction.+?cannot.+?used
14202 <END_RESULT>
14203 <RESULT IF_PASS COUNT 1>
14204 (?is)\berror:
14205 <END_RESULT>
14206 <END_TC>
14207
14208 :exmp.
14209
14210 .*---------------------------------------------------------------------*
14211 :h4.Allowed matching mechanisms - inline-template length-restriction (integer in function)
14212 .*---------------------------------------------------------------------*
14213 :xmp tab=0.
14214
14215 <TC - Allowed matching mechanisms - inline-template length-restriction (integer in function)>
14216
14217 <COMPILE>
14218 <VERDICT_LEAF PASS>
14219 <MODULE TTCN x x.ttcn>
14220 module x {
14221
14222 type port portT message {
14223 in integer
14224 } with {extension "internal"}
14225
14226 type component c {
14227 port portT myPort;
14228 }
14229
14230 function myFunct() runs on c {
14231
14232 alt{
14233 [] myPort.receive( ? length(1) )
14234 {}
14235 }
14236 }
14237
14238 }
14239 <END_MODULE>
14240 <RESULT IF_PASS COUNT 1>
14241 (?im)error.+?Length.+?restriction.+?cannot.+?used
14242 <END_RESULT>
14243 <RESULT IF_PASS COUNT 1>
14244 (?is)\berror:
14245 <END_RESULT>
14246 <END_TC>
14247
14248 :exmp.
14249
14250 .*---------------------------------------------------------------------*
14251 :h4.Allowed matching mechanisms - inline-template length-restriction (float in function)
14252 .*---------------------------------------------------------------------*
14253 :xmp tab=0.
14254
14255 <TC - Allowed matching mechanisms - inline-template length-restriction (float in function)>
14256
14257 <COMPILE>
14258 <VERDICT_LEAF PASS>
14259 <MODULE TTCN x x.ttcn>
14260 module x {
14261
14262 type port portT message {
14263 in float
14264 } with {extension "internal"}
14265
14266 type component c {
14267 port portT myPort;
14268 }
14269
14270 function myFunct() runs on c {
14271
14272 alt{
14273 [] myPort.receive( ? length(1) )
14274 {}
14275 }
14276 }
14277
14278 }
14279 <END_MODULE>
14280 <RESULT IF_PASS COUNT 1>
14281 (?im)error.+?Length.+?restriction.+?cannot.+?used
14282 <END_RESULT>
14283 <RESULT IF_PASS COUNT 1>
14284 (?is)\berror:
14285 <END_RESULT>
14286 <END_TC>
14287
14288 :exmp.
14289
14290 .*---------------------------------------------------------------------*
14291 :h4.Allowed matching mechanisms - inline-template length-restriction (record in function)
14292 .*---------------------------------------------------------------------*
14293 :xmp tab=0.
14294
14295 <TC - Allowed matching mechanisms - inline-template length-restriction (record in function)>
14296
14297 <COMPILE>
14298 <VERDICT_LEAF PASS>
14299 <MODULE TTCN x x.ttcn>
14300 module x {
14301
14302 type record recT{
14303 integer f1,
14304 float f2,
14305 charstring f3
14306 }
14307
14308 type port portT message {
14309 in recT
14310 } with {extension "internal"}
14311
14312 type component c {
14313 port portT myPort;
14314 }
14315
14316 function myFunct() runs on c {
14317
14318 alt{
14319 [] myPort.receive( ? length(1) )
14320 {}
14321 }
14322 }
14323
14324 }
14325 <END_MODULE>
14326 <RESULT IF_PASS COUNT 1>
14327 (?im)error.+?Length.+?restriction.+?cannot.+?used
14328 <END_RESULT>
14329 <RESULT IF_PASS COUNT 1>
14330 (?is)\berror:
14331 <END_RESULT>
14332 <END_TC>
14333
14334 :exmp.
14335
14336 .*---------------------------------------------------------------------*
14337 :h4.Allowed matching mechanisms - inline-template length-restriction (set in function)
14338 .*---------------------------------------------------------------------*
14339 :xmp tab=0.
14340
14341 <TC - Allowed matching mechanisms - inline-template length-restriction (set in function)>
14342
14343 <COMPILE>
14344 <VERDICT_LEAF PASS>
14345 <MODULE TTCN x x.ttcn>
14346 module x {
14347
14348 type set setT{
14349 integer f1,
14350 float f2,
14351 charstring f3
14352 }
14353
14354 type port portT message {
14355 in setT
14356 } with {extension "internal"}
14357
14358 type component c {
14359 port portT myPort;
14360 }
14361
14362 function myFunct() runs on c {
14363
14364 alt{
14365 [] myPort.receive( ? length(1) )
14366 {}
14367 }
14368 }
14369
14370 }
14371 <END_MODULE>
14372 <RESULT IF_PASS COUNT 1>
14373 (?im)error.+?Length.+?restriction.+?cannot.+?used
14374 <END_RESULT>
14375 <RESULT IF_PASS COUNT 1>
14376 (?is)\berror:
14377 <END_RESULT>
14378 <END_TC>
14379
14380 :exmp.
14381
14382 .*---------------------------------------------------------------------*
14383 :h4.Allowed matching mechanisms - inline-template length-restriction (enumerated in function)
14384 .*---------------------------------------------------------------------*
14385 :xmp tab=0.
14386
14387 <TC - Allowed matching mechanisms - inline-template length-restriction (enumerated in function)>
14388
14389 <COMPILE>
14390 <VERDICT_LEAF PASS>
14391 <MODULE TTCN x x.ttcn>
14392 module x {
14393
14394 type enumerated enumT { ONE(1), TWO(2), THREE(3) };
14395
14396 type port portT message {
14397 in enumT
14398 } with {extension "internal"}
14399
14400 type component c {
14401 port portT myPort;
14402 }
14403
14404 function myFunct() runs on c {
14405
14406 alt{
14407 [] myPort.receive( ? length(1) )
14408 {}
14409 }
14410 }
14411
14412 }
14413 <END_MODULE>
14414 <RESULT IF_PASS COUNT 1>
14415 (?im)error.+?Length.+?restriction.+?cannot.+?used
14416 <END_RESULT>
14417 <RESULT IF_PASS COUNT 1>
14418 (?is)\berror:
14419 <END_RESULT>
14420 <END_TC>
14421
14422 :exmp.
14423
14424 .*---------------------------------------------------------------------*
14425 :h4.Allowed matching mechanisms - inline-template length-restriction (union in function)
14426 .*---------------------------------------------------------------------*
14427 :xmp tab=0.
14428
14429 <TC - Allowed matching mechanisms - inline-template length-restriction (union in function)>
14430
14431 <COMPILE>
14432 <VERDICT_LEAF PASS>
14433 <MODULE TTCN x x.ttcn>
14434 module x {
14435
14436 type union uniT{
14437 integer f1,
14438 float f2,
14439 charstring f3
14440 }
14441
14442 type port portT message {
14443 in uniT
14444 } with {extension "internal"}
14445
14446 type component c {
14447 port portT myPort;
14448 }
14449
14450 function myFunct() runs on c {
14451
14452 alt{
14453 [] myPort.receive( ? length(1) )
14454 {}
14455 }
14456 }
14457
14458 }
14459 <END_MODULE>
14460 <RESULT IF_PASS COUNT 1>
14461 (?im)error.+?Length.+?restriction.+?cannot.+?used
14462 <END_RESULT>
14463 <RESULT IF_PASS COUNT 1>
14464 (?is)\berror:
14465 <END_RESULT>
14466 <END_TC>
14467
14468 :exmp.
14469
14470 .*---------------------------------------------------------------------*
14471 :h4.Allowed matching mechanisms - inline-template length-restriction (array in function)
14472 .*---------------------------------------------------------------------*
14473 :xmp tab=0.
14474
14475 <TC - Allowed matching mechanisms - inline-template length-restriction (array in function)>
14476
14477 <COMPILE>
14478 <VERDICT_LEAF PASS>
14479 <MODULE TTCN x x.ttcn>
14480 module x {
14481
14482 type integer arrint[1];
14483
14484 const arrint c1:= { 1 };
14485 const arrint c2:= { 5 };
14486
14487 type port portT message {
14488 in arrint
14489 } with {extension "internal"}
14490
14491 type component c {
14492 port portT myPort;
14493 }
14494
14495 function myFunct() runs on c {
14496
14497 alt{
14498 [] myPort.receive( ? length(10) )
14499 {}
14500 }
14501 }
14502
14503 }
14504 <END_MODULE>
14505 <RESULT IF_PASS COUNT 1>
14506 (?im)error.+?number.+?elements.+?allowed.+?length.+?restriction.+?contradicts.+?array.+?size
14507 <END_RESULT>
14508 <RESULT IF_PASS COUNT 1>
14509 (?is)\berror:
14510 <END_RESULT>
14511 <END_TC>
14512
14513 :exmp.
14514
14515 .*---------------------------------------------------------------------*
14516 :h4.Allowed matching mechanisms - inline-template ifpresent (boolean in function)
14517 .*---------------------------------------------------------------------*
14518 :xmp tab=0.
14519
14520 <TC - Allowed matching mechanisms - inline-template ifpresent (boolean in function)>
14521
14522 <COMPILE>
14523 <VERDICT_LEAF PASS>
14524 <MODULE TTCN x x.ttcn>
14525 module x {
14526
14527 type port portT message {
14528 in boolean
14529 } with {extension "internal"}
14530
14531 type component c {
14532 port portT myPort;
14533 }
14534
14535 function myFunct() runs on c {
14536
14537 alt{
14538 [] myPort.receive( ? ifpresent )
14539 {}
14540 }
14541 }
14542
14543 }
14544 <END_MODULE>
14545 <RESULT IF_PASS NEGATIVE>
14546 (?is)\berror:
14547 <END_RESULT>
14548 <END_TC>
14549
14550 :exmp.
14551
14552 .*---------------------------------------------------------------------*
14553 :h4.Allowed matching mechanisms - inline-template ifpresent (integer in function)
14554 .*---------------------------------------------------------------------*
14555 :xmp tab=0.
14556
14557 <TC - Allowed matching mechanisms - inline-template ifpresent (integer in function)>
14558
14559 <COMPILE>
14560 <VERDICT_LEAF PASS>
14561 <MODULE TTCN x x.ttcn>
14562 module x {
14563
14564 type port portT message {
14565 in integer
14566 } with {extension "internal"}
14567
14568 type component c {
14569 port portT myPort;
14570 }
14571
14572 function myFunct() runs on c {
14573
14574 alt{
14575 [] myPort.receive( ? ifpresent )
14576 {}
14577 }
14578 }
14579
14580 }
14581 <END_MODULE>
14582 <RESULT IF_PASS NEGATIVE>
14583 (?is)\berror:
14584 <END_RESULT>
14585 <END_TC>
14586
14587 :exmp.
14588
14589 .*---------------------------------------------------------------------*
14590 :h4.Allowed matching mechanisms - inline-template ifpresent (float in function)
14591 .*---------------------------------------------------------------------*
14592 :xmp tab=0.
14593
14594 <TC - Allowed matching mechanisms - inline-template ifpresent (float in function)>
14595
14596 <COMPILE>
14597 <VERDICT_LEAF PASS>
14598 <MODULE TTCN x x.ttcn>
14599 module x {
14600
14601 type port portT message {
14602 in float
14603 } with {extension "internal"}
14604
14605 type component c {
14606 port portT myPort;
14607 }
14608
14609 function myFunct() runs on c {
14610
14611 alt{
14612 [] myPort.receive( ? ifpresent )
14613 {}
14614 }
14615 }
14616
14617 }
14618 <END_MODULE>
14619 <RESULT IF_PASS NEGATIVE>
14620 (?is)\berror:
14621 <END_RESULT>
14622 <END_TC>
14623
14624 :exmp.
14625
14626 .*---------------------------------------------------------------------*
14627 :h4.Allowed matching mechanisms - inline-template ifpresent (bitstring in function)
14628 .*---------------------------------------------------------------------*
14629 :xmp tab=0.
14630
14631 <TC - Allowed matching mechanisms - inline-template ifpresent (bitstring in function)>
14632
14633 <COMPILE>
14634 <VERDICT_LEAF PASS>
14635 <MODULE TTCN x x.ttcn>
14636 module x {
14637
14638 type port portT message {
14639 in bitstring
14640 } with {extension "internal"}
14641
14642 type component c {
14643 port portT myPort;
14644 }
14645
14646 function myFunct() runs on c {
14647
14648 alt{
14649 [] myPort.receive( ? ifpresent )
14650 {}
14651 }
14652 }
14653
14654 }
14655 <END_MODULE>
14656 <RESULT IF_PASS NEGATIVE>
14657 (?is)\berror:
14658 <END_RESULT>
14659 <END_TC>
14660
14661 :exmp.
14662
14663 .*---------------------------------------------------------------------*
14664 :h4.Allowed matching mechanisms - inline-template ifpresent (octetstring in function)
14665 .*---------------------------------------------------------------------*
14666 :xmp tab=0.
14667
14668 <TC - Allowed matching mechanisms - inline-template ifpresent (octetstring in function)>
14669
14670 <COMPILE>
14671 <VERDICT_LEAF PASS>
14672 <MODULE TTCN x x.ttcn>
14673 module x {
14674
14675 type port portT message {
14676 in octetstring
14677 } with {extension "internal"}
14678
14679 type component c {
14680 port portT myPort;
14681 }
14682
14683 function myFunct() runs on c {
14684
14685 alt{
14686 [] myPort.receive( ? ifpresent )
14687 {}
14688 }
14689 }
14690
14691 }
14692 <END_MODULE>
14693 <RESULT IF_PASS NEGATIVE>
14694 (?is)\berror:
14695 <END_RESULT>
14696 <END_TC>
14697
14698 :exmp.
14699
14700 .*---------------------------------------------------------------------*
14701 :h4.Allowed matching mechanisms - inline-template ifpresent (hexstring in function)
14702 .*---------------------------------------------------------------------*
14703 :xmp tab=0.
14704
14705 <TC - Allowed matching mechanisms - inline-template ifpresent (hexstring in function)>
14706
14707 <COMPILE>
14708 <VERDICT_LEAF PASS>
14709 <MODULE TTCN x x.ttcn>
14710 module x {
14711
14712 type port portT message {
14713 in hexstring
14714 } with {extension "internal"}
14715
14716 type component c {
14717 port portT myPort;
14718 }
14719
14720 function myFunct() runs on c {
14721
14722 alt{
14723 [] myPort.receive( ? ifpresent )
14724 {}
14725 }
14726 }
14727
14728 }
14729 <END_MODULE>
14730 <RESULT IF_PASS NEGATIVE>
14731 (?is)\berror:
14732 <END_RESULT>
14733 <END_TC>
14734
14735 :exmp.
14736
14737 .*---------------------------------------------------------------------*
14738 :h4.Allowed matching mechanisms - inline-template ifpresent (charstring in function)
14739 .*---------------------------------------------------------------------*
14740 :xmp tab=0.
14741
14742 <TC - Allowed matching mechanisms - inline-template ifpresent (charstring in function)>
14743
14744 <COMPILE>
14745 <VERDICT_LEAF PASS>
14746 <MODULE TTCN x x.ttcn>
14747 module x {
14748
14749 type port portT message {
14750 in charstring
14751 } with {extension "internal"}
14752
14753 type component c {
14754 port portT myPort;
14755 }
14756
14757 function myFunct() runs on c {
14758
14759 alt{
14760 [] myPort.receive( ? ifpresent )
14761 {}
14762 }
14763 }
14764
14765 }
14766 <END_MODULE>
14767 <RESULT IF_PASS NEGATIVE>
14768 (?is)\berror:
14769 <END_RESULT>
14770 <END_TC>
14771
14772 :exmp.
14773
14774 .*---------------------------------------------------------------------*
14775 :h4.Allowed matching mechanisms - inline-template ifpresent (record of in function)
14776 .*---------------------------------------------------------------------*
14777 :xmp tab=0.
14778
14779 <TC - Allowed matching mechanisms - inline-template ifpresent (record of in function)>
14780
14781 <COMPILE>
14782 <VERDICT_LEAF PASS>
14783 <MODULE TTCN x x.ttcn>
14784 module x {
14785
14786 type record of integer myT;
14787
14788 type port portT message {
14789 in myT
14790 } with {extension "internal"}
14791
14792 type component c {
14793 port portT myPort;
14794 }
14795
14796 function myFunct() runs on c {
14797
14798 alt{
14799 [] myPort.receive( ? ifpresent )
14800 {}
14801 }
14802 }
14803
14804 }
14805 <END_MODULE>
14806 <RESULT IF_PASS NEGATIVE>
14807 (?is)\berror:
14808 <END_RESULT>
14809 <END_TC>
14810
14811 :exmp.
14812
14813 .*---------------------------------------------------------------------*
14814 :h4.Allowed matching mechanisms - inline-template ifpresent (set of in function)
14815 .*---------------------------------------------------------------------*
14816 :xmp tab=0.
14817
14818 <TC - Allowed matching mechanisms - inline-template ifpresent (set of in function)>
14819
14820 <COMPILE>
14821 <VERDICT_LEAF PASS>
14822 <MODULE TTCN x x.ttcn>
14823 module x {
14824
14825 type set of integer myT;
14826
14827 type port portT message {
14828 in myT
14829 } with {extension "internal"}
14830
14831 type component c {
14832 port portT myPort;
14833 }
14834
14835 function myFunct() runs on c {
14836
14837 alt{
14838 [] myPort.receive( ? ifpresent )
14839 {}
14840 }
14841 }
14842
14843 }
14844 <END_MODULE>
14845 <RESULT IF_PASS NEGATIVE>
14846 (?is)\berror:
14847 <END_RESULT>
14848 <END_TC>
14849
14850 :exmp.
14851
14852 .*---------------------------------------------------------------------*
14853 :h4.Allowed matching mechanisms - inline-template ifpresent (enumerated in function)
14854 .*---------------------------------------------------------------------*
14855 :xmp tab=0.
14856
14857 <TC - Allowed matching mechanisms - inline-template ifpresent (enumerated in function)>
14858
14859 <COMPILE>
14860 <VERDICT_LEAF PASS>
14861 <MODULE TTCN x x.ttcn>
14862 module x {
14863
14864 type enumerated enumT { ONE(1), TWO(2), THREE(3) };
14865
14866 type port portT message {
14867 in enumT
14868 } with {extension "internal"}
14869
14870 type component c {
14871 port portT myPort;
14872 }
14873
14874 function myFunct() runs on c {
14875
14876 alt{
14877 [] myPort.receive( ? ifpresent )
14878 {}
14879 }
14880 }
14881
14882 }
14883 <END_MODULE>
14884 <RESULT IF_PASS NEGATIVE>
14885 (?is)\berror:
14886 <END_RESULT>
14887 <END_TC>
14888
14889 :exmp.
14890
14891 .*---------------------------------------------------------------------*
14892 :h4.Allowed matching mechanisms - inline-template ifpresent (union in function)
14893 .*---------------------------------------------------------------------*
14894 :xmp tab=0.
14895
14896 <TC - Allowed matching mechanisms - inline-template ifpresent (union in function)>
14897
14898 <COMPILE>
14899 <VERDICT_LEAF PASS>
14900 <MODULE TTCN x x.ttcn>
14901 module x {
14902
14903 type union uniT{
14904 integer f1,
14905 float f2,
14906 charstring f3
14907 }
14908
14909 type port portT message {
14910 in uniT
14911 } with {extension "internal"}
14912
14913 type component c {
14914 port portT myPort;
14915 }
14916
14917 function myFunct() runs on c {
14918
14919 alt{
14920 [] myPort.receive( ? ifpresent )
14921 {}
14922 }
14923 }
14924
14925 }
14926 <END_MODULE>
14927 <RESULT IF_PASS NEGATIVE>
14928 (?is)\berror:
14929 <END_RESULT>
14930 <END_TC>
14931
14932 :exmp.
14933
14934 .*---------------------------------------------------------------------*
14935 :h4.Allowed matching mechanisms - inline-template ifpresent (array in function)
14936 .*---------------------------------------------------------------------*
14937 :xmp tab=0.
14938
14939 <TC - Allowed matching mechanisms - inline-template ifpresent (array in function)>
14940
14941 <COMPILE>
14942 <VERDICT_LEAF PASS>
14943 <MODULE TTCN x x.ttcn>
14944 module x {
14945
14946 type integer arrint[1];
14947
14948 const arrint c1:= { 1 };
14949 const arrint c2:= { 5 };
14950
14951 type port portT message {
14952 in arrint
14953 } with {extension "internal"}
14954
14955 type component c {
14956 port portT myPort;
14957 }
14958
14959 function myFunct() runs on c {
14960
14961 alt{
14962 [] myPort.receive( ? ifpresent)
14963 {}
14964 }
14965 }
14966
14967 }
14968 <END_MODULE>
14969 <RESULT IF_PASS NEGATIVE>
14970 (?is)\berror:
14971 <END_RESULT>
14972 <END_TC>
14973
14974 :exmp.
14975
14976 .*---------------------------------------------------------------------*
14977 :h2.Infinite recursive loops
14978 .*---------------------------------------------------------------------*
14979
14980 NOTE: In case of non-constant ele
14981 For example:
14982 template mytype t := { f := t } s
14983 but
14984 var mytype v := { f := v } is not
14985
14986 .*---------------------------------------------------------------------*
14987 :h3.Infinite recursive loops in templates/values
14988 .*---------------------------------------------------------------------*
14989
14990 This test case group covers the requirement SA-6/21.
14991
14992 Strategy: SA shall detect the infinite recursive loops in templates/values.
14993 Two types of infinite loops are existing:
14994
14995 x:= x.field;
14996 and
14997 x:= { f1:= x... };
14998
14999 All occurances shall be tested, where such a notation can be used.
15000
15001 Tested:
15002 :list.
15003 :li D='-'.1, 2 and 3 steps long circles in definition part
15004 :li D='-'.2, 3 and 4 steps long cross circles in definition part
15005 :li D='-'.3 steps long double cross circles in definition part
15006 :elist.
15007
15008 .*---------------------------------------------------------------------*
15009 :h4.Infinite recursive loops in templates/values - one step long (in def.part)
15010 .*---------------------------------------------------------------------*
15011 :xmp tab=0.
15012
15013 <TC - Infinite recursive loops in templates/values - one step long (in def.part)>
15014
15015 <COMPILE>
15016 <VERDICT_LEAF PASS>
15017 <MODULE TTCN x x.ttcn>
15018 module x {
15019
15020 type record recT {
15021 integer f1,
15022 float f2,
15023 charstring f3,
15024 integer f4
15025 }
15026
15027 template recT temp1:= { f1:= temp1.f1, f2:= 1.1, f3:= "ERIXON", f4:= 1 };
15028
15029 }
15030 <END_MODULE>
15031 <RESULT IF_PASS COUNT 1>
15032 (?im)error.+?Circular.+?reference
15033 <END_RESULT>
15034 <RESULT IF_PASS COUNT 1>
15035 (?is)\berror:
15036 <END_RESULT>
15037 <END_TC>
15038
15039 :exmp.
15040
15041 .*---------------------------------------------------------------------*
15042 :h4.Infinite recursive loops in templates/values - one steps long (in def.part)
15043 .*---------------------------------------------------------------------*
15044 :xmp tab=0.
15045
15046 <TC - Infinite recursive loops in templates/values - one steps long (in def.part)>
15047
15048 <COMPILE>
15049 <VERDICT_LEAF FAIL>
15050 <MODULE TTCN x x.ttcn>
15051 module x {
15052
15053 type integer myint[2];
15054
15055 template myint t := {0,t[1]};
15056
15057
15058 }
15059 <END_MODULE>
15060 <RESULT IF_PASS COUNT 1>
15061 (?im)error.+?Circular.+?reference
15062 <END_RESULT>
15063 <RESULT IF_PASS COUNT 1>
15064 (?is)\berror:
15065 <END_RESULT>
15066 <RESULT IF_FAIL POSITIVE>
15067 (?im)error.+?Circular.+?reference
15068 <END_RESULT>
15069 <END_TC>
15070
15071 :exmp.
15072
15073 .*---------------------------------------------------------------------*
15074 :h4.Infinite recursive loops in templates/values - two steps long (in def.part)
15075 .*---------------------------------------------------------------------*
15076 :xmp tab=0.
15077
15078 <TC - Infinite recursive loops in templates/values - two steps long (in def.part)>
15079
15080 <COMPILE>
15081 <VERDICT_LEAF FAIL>
15082 <MODULE TTCN x x.ttcn>
15083 module x {
15084
15085 type record recT {
15086 integer f1,
15087 float f2,
15088 charstring f3,
15089 integer f4
15090 }
15091
15092 // TR 696
15093 template recT temp1:= { f1:= temp1.f4, f2:= 1.1, f3:= "ERIXON", f4:= temp1.f1 };
15094
15095 }
15096 <END_MODULE>
15097 <RESULT IF_PASS COUNT 1>
15098 (?im)error.+?Circular.+?reference
15099 <END_RESULT>
15100 <RESULT IF_PASS COUNT 1>
15101 (?is)\berror:
15102 <END_RESULT>
15103 <RESULT IF_FAIL POSITIVE>
15104 (?im)error.+?Circular.+?reference
15105 <END_RESULT>
15106 <END_TC>
15107
15108 :exmp.
15109
15110 .*---------------------------------------------------------------------*
15111 :h4.Infinite recursive loops in templates/values - three steps long (in def.part)
15112 .*---------------------------------------------------------------------*
15113 :xmp tab=0.
15114
15115 <TC - Infinite recursive loops in templates/values - three steps long (in def.part)>
15116
15117 <COMPILE>
15118 <VERDICT_LEAF FAIL>
15119 <MODULE TTCN x x.ttcn>
15120 module x {
15121
15122 type record recT {
15123 integer f1,
15124 float f2,
15125 charstring f3,
15126 integer f4,
15127 integer f5
15128 }
15129
15130 // TR 696
15131 template recT temp1:= { f1:= temp1.f4, f2:= 1.1, f3:= "ERIXON", f4:= temp1.f5, f5:= temp1.f1 };
15132
15133 }
15134 <END_MODULE>
15135 <RESULT IF_PASS COUNT 1>
15136 (?im)error.+?Circular.+?reference
15137 <END_RESULT>
15138 <RESULT IF_PASS COUNT 1>
15139 (?is)\berror:
15140 <END_RESULT>
15141 <RESULT IF_FAIL POSITIVE>
15142 (?im)error.+?Circular.+?reference
15143 <END_RESULT>
15144 <END_TC>
15145
15146 :exmp.
15147
15148 .*---------------------------------------------------------------------*
15149 :h4.Infinite recursive loops in templates/values - cross two steps long (in def.part)
15150 .*---------------------------------------------------------------------*
15151 :xmp tab=0.
15152
15153 <TC - Infinite recursive loops in templates/values - cross two steps long (in def.part)>
15154
15155 <COMPILE>
15156 <VERDICT_LEAF PASS>
15157 <MODULE TTCN x x.ttcn>
15158 module x {
15159
15160 type record recT {
15161 integer f1,
15162 float f2,
15163 charstring f3,
15164 integer f4,
15165 integer f5
15166 }
15167
15168 template recT temp1:= { f1:= temp2.f1, f2:= 1.1, f3:= "ERIXON", f4:= 1, f5:= 2 };
15169 template recT temp2:= { f1:= temp1.f1, f2:= 1.1, f3:= "ERIXON", f4:= 1, f5:= 2 };
15170
15171 }
15172 <END_MODULE>
15173 <RESULT IF_PASS COUNT 1>
15174 (?im)error.+?Circular.+?reference
15175 <END_RESULT>
15176 <RESULT IF_PASS COUNT 1>
15177 (?is)\berror:
15178 <END_RESULT>
15179 <END_TC>
15180
15181 :exmp.
15182
15183 .*---------------------------------------------------------------------*
15184 :h4.Infinite recursive loops in templates/values - cross three steps long (in def.part)
15185 .*---------------------------------------------------------------------*
15186 :xmp tab=0.
15187
15188 <TC - Infinite recursive loops in templates/values - cross three steps long (in def.part)>
15189
15190 <COMPILE>
15191 <VERDICT_LEAF FAIL>
15192 <MODULE TTCN x x.ttcn>
15193 module x {
15194
15195 type record recT {
15196 integer f1,
15197 float f2,
15198 charstring f3,
15199 integer f4,
15200 integer f5
15201 }
15202
15203 // TR 696
15204 template recT temp1:= { f1:= temp2.f1, f2:= 1.1, f3:= "ERIXON", f4:= 1, f5:= 2 };
15205 template recT temp2:= { f1:= temp2.f4, f2:= 1.1, f3:= "ERIXON", f4:= temp1.f1, f5:= 2 };
15206
15207 }
15208 <END_MODULE>
15209 <RESULT IF_PASS COUNT 1>
15210 (?im)error.+?Circular.+?reference
15211 <END_RESULT>
15212 <RESULT IF_PASS COUNT 1>
15213 (?is)\berror:
15214 <END_RESULT>
15215 <RESULT IF_FAIL POSITIVE>
15216 (?im)error.+?Circular.+?reference
15217 <END_RESULT>
15218 <END_TC>
15219
15220 :exmp.
15221
15222 .*---------------------------------------------------------------------*
15223 :h4.Infinite recursive loops in templates/values - cross four steps long (in def.part)
15224 .*---------------------------------------------------------------------*
15225 :xmp tab=0.
15226
15227 <TC - Infinite recursive loops in templates/values - cross four steps long (in def.part)>
15228
15229 <COMPILE>
15230 <VERDICT_LEAF FAIL>
15231 <MODULE TTCN x x.ttcn>
15232 module x {
15233
15234 type record recT {
15235 integer f1,
15236 float f2,
15237 charstring f3,
15238 integer f4,
15239 integer f5
15240 }
15241
15242 // TR 697
15243 template recT temp1:= { f1:= temp2.f1, f2:= 1.1, f3:= "ERIXON", f4:= 1, f5:= temp1.f1 };
15244 template recT temp2:= { f1:= temp2.f4, f2:= 1.1, f3:= "ERIXON", f4:= temp1.f5, f5:= 2 };
15245
15246 }
15247 <END_MODULE>
15248 <RESULT IF_PASS COUNT 1>
15249 (?im)error.+?Circular.+?reference
15250 <END_RESULT>
15251 <RESULT IF_PASS COUNT 1>
15252 (?is)\berror:
15253 <END_RESULT>
15254 <RESULT IF_FAIL POSITIVE>
15255 (?im)error
15256 <END_RESULT>
15257 <END_TC>
15258
15259 :exmp.
15260
15261 .*---------------------------------------------------------------------*
15262 :h4.Infinite recursive loops in templates/values - double cross four steps long (in def.part)
15263 .*---------------------------------------------------------------------*
15264 :xmp tab=0.
15265
15266 <TC - Infinite recursive loops in templates/values - double cross four steps long (in def.part)>
15267
15268 <COMPILE>
15269 <VERDICT_LEAF PASS>
15270 <MODULE TTCN x x.ttcn>
15271 module x {
15272
15273 type record recT {
15274 integer f1,
15275 float f2,
15276 charstring f3,
15277 integer f4,
15278 integer f5
15279 }
15280
15281 template recT temp1:= { f1:= temp2.f1, f2:= 1.1, f3:= "ERIXON", f4:= 1, f5:= 7 };
15282 template recT temp2:= { f1:= temp3.f4, f2:= 1.1, f3:= "ERIXON", f4:= 2, f5:= 2 };
15283 template recT temp3:= { f1:= 1, f2:= 1.1, f3:= "ERIXON", f4:= temp1.f1, f5:= 2 };
15284
15285 }
15286 <END_MODULE>
15287 <RESULT IF_PASS COUNT 1>
15288 (?im)error.+?Circular.+?reference
15289 <END_RESULT>
15290 <RESULT IF_PASS COUNT 1>
15291 (?is)\berror:
15292 <END_RESULT>
15293 <END_TC>
15294
15295 :exmp.
15296
15297 .*---------------------------------------------------------------------*
15298 :h3.Recursive loops in modified template chains
15299 .*---------------------------------------------------------------------*
15300
15301 This test case group covers the requirement SA-6/22.
15302
15303 Strategy: a modified template shall not refer to itself, either directly or indirectly, that is recursive derivation is not allowed.
15304 All occurances shall be tested, where such a notation can be used.
15305
15306 Tested: - 1, 2 and 3 steps long modified templates in definition part
15307
15308 .*---------------------------------------------------------------------*
15309 :h4.Recursive loops in modified template chains - one step long (in def.part)
15310 .*---------------------------------------------------------------------*
15311 :xmp tab=0.
15312
15313 <TC - Recursive loops in modified template chains - one step long (in def.part)>
15314
15315 <COMPILE>
15316 <VERDICT_LEAF PASS>
15317 <MODULE TTCN x x.ttcn>
15318 module x {
15319
15320 type record recT {
15321 integer f1,
15322 float f2,
15323 charstring f3,
15324 integer f4,
15325 integer f5
15326 }
15327
15328 template recT temp1:= { f1:= 1, f2:= 1.1, f3:= "ERIXON", f4:= 1, f5:= 7 };
15329
15330 template recT temp2 modifies temp1:= { f1:= temp2.f1, f4:= 6};
15331
15332 }
15333 <END_MODULE>
15334 <RESULT IF_PASS COUNT 1>
15335 (?im)error.+?Circular.+?reference
15336 <END_RESULT>
15337 <RESULT IF_PASS COUNT 1>
15338 (?is)\berror:
15339 <END_RESULT>
15340 <END_TC>
15341
15342 :exmp.
15343
15344 .*---------------------------------------------------------------------*
15345 :h4.Recursive loops in modified template chains - two steps long (in def.part)
15346 .*---------------------------------------------------------------------*
15347 :xmp tab=0.
15348
15349 <TC - Recursive loops in modified template chains - two steps long (in def.part)>
15350
15351 <COMPILE>
15352 <VERDICT_LEAF FAIL>
15353 <MODULE TTCN x x.ttcn>
15354 module x {
15355
15356 type record recT {
15357 integer f1,
15358 float f2,
15359 charstring f3,
15360 integer f4,
15361 integer f5
15362 }
15363
15364 template recT temp1:= { f1:= 1, f2:= 1.1, f3:= "ERIXON", f4:= 1, f5:= 7 };
15365
15366 // TR 696
15367 template recT temp2 modifies temp1:= { f1:= temp2.f4, f4:= temp2.f1};
15368
15369 }
15370 <END_MODULE>
15371 <RESULT IF_PASS COUNT 1>
15372 (?im)error.+?Circular.+?reference
15373 <END_RESULT>
15374 <RESULT IF_PASS COUNT 1>
15375 (?is)\berror:
15376 <END_RESULT>
15377 <RESULT IF_FAIL POSITIVE>
15378 (?im)error.+?Circular.+?reference
15379 <END_RESULT>
15380 <END_TC>
15381
15382 :exmp.
15383
15384 .*---------------------------------------------------------------------*
15385 :h4.Recursive loops in modified template chains - three steps long (in def.part)
15386 .*---------------------------------------------------------------------*
15387 :xmp tab=0.
15388
15389 <TC - Recursive loops in modified template chains - three steps long (in def.part)>
15390
15391 <COMPILE>
15392 <VERDICT_LEAF FAIL>
15393 <MODULE TTCN x x.ttcn>
15394 module x {
15395
15396 type record recT {
15397 integer f1,
15398 float f2,
15399 charstring f3,
15400 integer f4,
15401 integer f5
15402 }
15403
15404 // TR 696
15405 template recT temp1:= { f1:= 1, f2:= 1.1, f3:= "ERIXON", f4:= 1, f5:= 7 };
15406 template recT temp2 modifies temp1:= { f1:= temp2.f4, f4:= temp2.f5, f5:= temp2.f1};
15407
15408 }
15409 <END_MODULE>
15410 <RESULT IF_PASS COUNT 1>
15411 (?im)error.+?Circular.+?reference
15412 <END_RESULT>
15413 <RESULT IF_PASS COUNT 1>
15414 (?is)\berror:
15415 <END_RESULT>
15416 <RESULT IF_FAIL POSITIVE>
15417 (?im)error.+?Circular.+?reference
15418 <END_RESULT>
15419 <END_TC>
15420
15421 :exmp.
15422
15423 .*---------------------------------------------------------------------*
15424 :h3.Value Overflows shall be detected if possible in compile time
15425 .*---------------------------------------------------------------------*
15426
15427 This test case group covers the requirement SA-6/23.
15428
15429 Strategy: SA shall detect any value overflow caused by implementation (for example integer value overflow, assigned number of an enumerated
15430 identifier is greater than the MAX_INT)
15431 All occurances shall be tested, where such a notation can be used.
15432
15433 Tested:
15434 :list.
15435 :li D='-'.simple integer constant and float constant overflows in definition part, control part and function
15436 :li D='-'.simple integer variables and float variables overflows in control part and function
15437 :li D='-'.integer overflowing in definition of an enumerated type
15438 :li D='-'.float overflowing when redefines a timer at start (in control part and function)
15439 :elist.
15440
15441 .*---------------------------------------------------------------------*
15442 :h4.Value Overflows shall be detected if possible in compile time - integer Overflow (enumerated in def.part)
15443 .*---------------------------------------------------------------------*
15444 :xmp tab=0.
15445
15446 <TC - Value Overflows shall be detected if possible in compile time - integer Overflow (enumerated in def.part)>
15447
15448 <COMPILE>
15449 <VERDICT_LEAF PASS>
15450 <MODULE TTCN x x.ttcn>
15451 module x {
15452
15453 type enumerated enumT { ONE(1), TWO(2), HUGE(99999999999999999999999999999)};
15454
15455 }
15456 <END_MODULE>
15457 <RESULT COUNT 1>
15458 (?is)\berror: The numeric value of enumeration `HUGE' \(99999999999999999999999999999\) is too large for being represented in memory
15459 <END_RESULT>
15460 <END_TC>
15461
15462 :exmp.
15463
15464 .*---------------------------------------------------------------------*
15465 :h4.Value Overflows shall be detected if possible in compile time - simple float Overflow (const in def.part)
15466 .*---------------------------------------------------------------------*
15467 :xmp tab=0.
15468
15469 <TC - Value Overflows shall be detected if possible in compile time - simple float Overflow (const in def.part)>
15470
15471 <COMPILE>
15472 <VERDICT_LEAF PASS>
15473 <MODULE TTCN x x.ttcn>
15474 module x {
15475
15476 // TR 673: fatal error on value overflows
15477 const float f:= 9.1E+999;
15478
15479 }
15480 <END_MODULE>
15481 <RESULT IF_PASS COUNT 1>
15482 (?im)error.+?Overflow
15483 <END_RESULT>
15484 <RESULT IF_PASS COUNT 1>
15485 (?is)\berror:
15486 <END_RESULT>
15487 <END_TC>
15488
15489 :exmp.
15490
15491 .*---------------------------------------------------------------------*
15492 :h4.Value Overflows shall be detected if possible in compile time - simple float Overflow (const in control part)
15493 TR 673: fatal error on value overflows
15494 .*---------------------------------------------------------------------*
15495 :xmp tab=0.
15496
15497 <TC - Value Overflows shall be detected if possible in compile time - simple float Overflow (const in control part)>
15498
15499 <COMPILE>
15500 <VERDICT_LEAF PASS>
15501 <MODULE TTCN x x.ttcn>
15502 module x {
15503
15504 control{
15505 const float f:= 9.1E+999;
15506 }
15507 }
15508 <END_MODULE>
15509 <RESULT IF_PASS COUNT 1>
15510 (?im)error.+?Overflow
15511 <END_RESULT>
15512 <RESULT IF_PASS COUNT 1>
15513 (?is)\berror:
15514 <END_RESULT>
15515 <END_TC>
15516
15517 :exmp.
15518
15519 .*---------------------------------------------------------------------*
15520 :h4.Value Overflows shall be detected if possible in compile time - simple float Overflow (const in function)
15521 TR 673: fatal error on value overflows
15522 .*---------------------------------------------------------------------*
15523 :xmp tab=0.
15524
15525 <TC - Value Overflows shall be detected if possible in compile time - simple float Overflow (const in function)>
15526
15527 <COMPILE>
15528 <VERDICT_LEAF PASS>
15529 <MODULE TTCN x x.ttcn>
15530 module x {
15531
15532 function myFunct(){
15533 const float f:= 9.1E+999;
15534 }
15535 }
15536 <END_MODULE>
15537 <RESULT IF_PASS COUNT 1>
15538 (?im)error.+?Overflow
15539 <END_RESULT>
15540 <RESULT IF_PASS COUNT 1>
15541 (?is)\berror:
15542 <END_RESULT>
15543 <END_TC>
15544
15545 :exmp.
15546
15547 .*---------------------------------------------------------------------*
15548 :h4.Value Overflows shall be detected if possible in compile time - simple float Overflow (variable in control part)
15549 TR 673: fatal error on value overflows
15550 .*---------------------------------------------------------------------*
15551 :xmp tab=0.
15552
15553 <TC - Value Overflows shall be detected if possible in compile time - simple float Overflow (variable in control part)>
15554
15555 <COMPILE>
15556 <VERDICT_LEAF PASS>
15557 <MODULE TTCN x x.ttcn>
15558 module x {
15559
15560 control{
15561 var float f:= 9.1E+999;
15562 }
15563 }
15564 <END_MODULE>
15565 <RESULT IF_PASS COUNT 1>
15566 (?im)error.+?Overflow
15567 <END_RESULT>
15568 <RESULT IF_PASS COUNT 1>
15569 (?is)\berror:
15570 <END_RESULT>
15571 <END_TC>
15572
15573 :exmp.
15574
15575 .*---------------------------------------------------------------------*
15576 :h4.Value Overflows shall be detected if possible in compile time - simple float Overflow (variable in function)
15577 TR 673: fatal error on value overflows
15578 .*---------------------------------------------------------------------*
15579 :xmp tab=0.
15580
15581 <TC - Value Overflows shall be detected if possible in compile time - simple float Overflow (variable in function)>
15582
15583 <COMPILE>
15584 <VERDICT_LEAF PASS>
15585 <MODULE TTCN x x.ttcn>
15586 module x {
15587
15588 function myFunct(){
15589 var float f:= 9.1E+999;
15590 }
15591 }
15592 <END_MODULE>
15593 <RESULT IF_PASS COUNT 1>
15594 (?im)error.+?Overflow
15595 <END_RESULT>
15596 <RESULT IF_PASS COUNT 1>
15597 (?is)\berror:
15598 <END_RESULT>
15599 <END_TC>
15600
15601 :exmp.
15602
15603 .*---------------------------------------------------------------------*
15604 :h4.Value Overflows shall be detected if possible in compile time - float Overflow (timer start in control part)
15605 TR 673: fatal error on value overflows
15606 .*---------------------------------------------------------------------*
15607 :xmp tab=0.
15608
15609 <TC - Value Overflows shall be detected if possible in compile time - float Overflow (timer start in control part)>
15610
15611 <COMPILE>
15612 <VERDICT_LEAF PASS>
15613 <MODULE TTCN x x.ttcn>
15614 module x {
15615
15616 control{
15617 timer T1:= 500.0;
15618 T1.start( 9.1E+999);
15619 }
15620 }
15621 <END_MODULE>
15622 <RESULT IF_PASS COUNT 1>
15623 (?im)error.+?Overflow
15624 <END_RESULT>
15625 <RESULT IF_PASS COUNT 1>
15626 (?is)\berror:
15627 <END_RESULT>
15628 <END_TC>
15629
15630 :exmp.
15631
15632 .*---------------------------------------------------------------------*
15633 :h4.Value Overflows shall be detected if possible in compile time - float Overflow (timer start in function)
15634 TR 673: fatal error on value overflows
15635 .*---------------------------------------------------------------------*
15636 :xmp tab=0.
15637
15638 <TC - Value Overflows shall be detected if possible in compile time - float Overflow (timer start in function)>
15639
15640 <COMPILE>
15641 <VERDICT_LEAF PASS>
15642 <MODULE TTCN x x.ttcn>
15643 module x {
15644
15645 function myFunct(){
15646 timer T1:= 500.0;
15647 T1.start( 9.1E+999);
15648 }
15649 }
15650 <END_MODULE>
15651 <RESULT IF_PASS COUNT 1>
15652 (?im)error.+?Overflow
15653 <END_RESULT>
15654 <RESULT IF_PASS COUNT 1>
15655 (?is)\berror:
15656 <END_RESULT>
15657 <END_TC>
15658
15659 :exmp.
15660
15661 .*---------------------------------------------------------------------*
15662 :h4.Constant folding - indexed arrays
15663 .*---------------------------------------------------------------------*
15664 :xmp tab=0.
15665
15666 <TC - Constant folding - indexed arrays>
15667
15668 <COMPILE>
15669 <VERDICT_LEAF PASS>
15670 <MODULE TTCN x x.ttcn>
15671 module x {
15672 control {
15673 const integer c_array1[4] := { 1,2,3,4};
15674 const integer c_array2[4] := { 1,2,3,4};
15675 const integer c_array3[4] := { 4,3,2,1};
15676 const integer c_array4_ind[4] := { [0] := 1, [1] := 2, [2] := 3, [3] := 4};
15677 const integer c_array5_ind[4] := { [3] := 4, [1] := 2, [2] := 3, [0] := 1};
15678
15679
15680 var integer vl_array5[4] := { 1,2,3,4};
15681 var boolean b := false;
15682
15683 if(c_array1 == c_array1) {b:= true;}
15684 else {b := false;}
15685
15686 if({1,2,3,4} == c_array1) {b:= true;}
15687 else {b := false;}
15688 if(c_array1 == {1,2,3,4}) {b:= true;}
15689 else {b := false;}
15690
15691 if(c_array1 == c_array2) {b:= true;}
15692 else {b := false;}
15693
15694 if(c_array4_ind == c_array4_ind) {b:= true;}
15695 else {b := false;}
15696
15697 if(c_array1 == c_array4_ind) {b:= true;}
15698 else {b := false;}
15699 if(c_array4_ind == c_array1) {b:= true;}
15700 else {b := false;}
15701
15702 if({ [0] := 1, [1] := 2, [2] := 3, [3] := 4} == c_array4_ind) {b:= true;}
15703 else {b := false;}
15704 if(c_array4_ind == { [0] := 1, [1] := 2, [2] := 3, [3] := 4}) {b:= true;}
15705 else {b := false;}
15706
15707 if(c_array4_ind == c_array5_ind) {b:= true;}
15708 else {b := false;}
15709
15710 if(vl_array5 == c_array1) {b:= true;}
15711 else {b := false;}
15712 }
15713
15714 }
15715 <END_MODULE>
15716 <RESULT IF_PASS COUNT 10>
15717 (?im)warning: Control never reaches this code because of previous effective condition\(s\)
15718 <END_RESULT>
15719 <END_TC>
15720
15721 :exmp.
15722
15723 .*---------------------------------------------------------------------*
15724 :h4.Constant folding - indexed record of
15725 .*---------------------------------------------------------------------*
15726 :xmp tab=0.
15727
15728 <TC - Constant folding - indexed record of>
15729
15730 <COMPILE>
15731 <VERDICT_LEAF PASS>
15732 <MODULE TTCN x x.ttcn>
15733 module x {
15734 type record of integer recof;
15735 control {
15736
15737 const recof c_r1 := { 1,2,3,4};
15738 const recof c_r2 := { 1,2,3,4};
15739 const recof c_r3 := { 4,3,2,1};
15740 const recof c_r4_ind := { [0] := 1, [1] := 2, [2] := 3, [3] := 4};
15741 const recof c_r5_ind := { [3] := 1, [1] := 2, [2] := 3, [0] := 4};
15742 const recof c_r6_ind := { [3] := 4, [1] := 2, [2] := 3, [0] := 1};
15743 const recof c_r8_ind := { [0] := 1, [1] := 2, [2] := 3, [3] := 4};
15744
15745
15746 var recof vl_r7_ind := { [3] := 4, [1] := 2};
15747
15748 var recof vl_r10 := { 1,2,3,4};
15749 var recof vl_r11 := { 1,2,3,4};
15750
15751 var boolean b := false;
15752
15753 if(c_r1 == c_r1) {b:= true;}
15754 else {b:= false;}
15755
15756 if(c_r1 == c_r2) {b:= true;}
15757 else {b:= false;}
15758
15759 if(c_r4_ind == c_r4_ind) {b:= true;}
15760 else {b:= false;}
15761
15762 if(c_r1 == c_r4_ind) {b:= true;}
15763 else {b:= false;}
15764 if(c_r4_ind == c_r1) {b:= true;}
15765 else {b:= false;}
15766
15767 if(c_r1 == c_r6_ind) {b:= true;}
15768 else {b:= false;}
15769
15770 if(c_r1 != vl_r7_ind) {b:= true;}
15771 else { b:= false;}
15772
15773 if(c_r4_ind == c_r8_ind) {b:= true;}
15774 else {b:= false;}
15775
15776 if(vl_r10 == vl_r11) {b:= true;}
15777 else {b:= false;}
15778 }
15779
15780 }
15781 <END_MODULE>
15782 <RESULT IF_PASS COUNT 7>
15783 (?im)warning: Control never reaches this code because of previous effective condition\(s\)
15784 <END_RESULT>
15785 <END_TC>
15786
15787 :exmp.
15788
15789 .*---------------------------------------------------------------------*
15790 :h4.Constant folding - indexed set of
15791 .*---------------------------------------------------------------------*
15792 :xmp tab=0.
15793
15794 <TC - Constant folding - indexed set of>
15795 <COMPILE>
15796 <VERDICT_LEAF PASS>
15797 <MODULE TTCN x x.ttcn>
15798 module x {
15799 type set of integer mysetof;
15800 control {
15801
15802 const mysetof c_s1 := {1,2,3,4};
15803 const mysetof c_s2 := {4,3,2,1};
15804 const mysetof c_s3 := {1,3,2,4};
15805 const mysetof c_s4 := {1,2,3,4,5};
15806 const mysetof c_s5 := {0,1,2,3,4};
15807 const mysetof c_s6 := {0,1,2,3,4,5}
15808
15809 const mysetof c_s1_ind := {[0] := 1,[1] := 2,[2] := 3, [3] := 4};
15810 const mysetof c_s2_ind := {[0] := 1,[3] := 4,[2] := 3, [1] := 2};
15811 const mysetof c_s3_ind := {[0] := 2,[3] := 1,[2] := 3, [1] := 4};
15812
15813 var mysetof vl_s1 := {1,2,3,4};
15814
15815 var boolean b := false;
15816
15817 if(c_s1 == c_s1) {b:= true;}
15818 else {b:= false;}
15819
15820 if(c_s1 == {1,2,3,4}) {b:= true;}
15821 else {b:= false;}
15822 if({1,2,3,4} == c_s1) {b:= true;}
15823 else {b:= false;}
15824
15825 if(c_s1 == {[0] := 1,[1] := 2,[2] := 3, [3] := 4}) {b:= true;}
15826 else {b:= false;}
15827 if({[0] := 1,[1] := 2,[2] := 3, [3] := 4} == c_s1) {b:= true;}
15828 else {b:= false;}
15829
15830 if(c_s1 == c_s1_ind) {b:= true;}
15831 else {b:= false;}
15832 if(c_s1_ind == c_s1) {b:= true;}
15833 else {b:= false;}
15834
15835 if(c_s1_ind == c_s2_ind) {b:= true;}
15836 else {b:= false;}
15837
15838 if(c_s1_ind == c_s3_ind) {b:= true;}
15839 else {b:= false;}
15840
15841 if(c_s1 == c_s3_ind) {b:= true;}
15842 else {b:= false;}
15843
15844 if(c_s2_ind == c_s3_ind) {b:= true;}
15845 else {b:= false;}
15846
15847 if(c_s1 == vl_s1) {b:= true;}
15848 else {b:= false;}
15849 if(vl_s1 == c_s1) {b:= true;}
15850 else {b:= false;}
15851
15852 if(c_s1 == c_s2) {b:= true;}
15853 else {b:= false;}
15854
15855 if(c_s1 == c_s3) {b:= true;}
15856 else {b:= false;}
15857
15858 if(c_s1 != c_s4) {b:= true;}
15859 else {b:= false;}
15860
15861 if(c_s1 != c_s5) {b:= true;}
15862 else {b:= false;}
15863
15864 if(c_s1 != c_s6) {b:= true;}
15865 else {b:= false;}
15866
15867 if(c_s5 != c_s6) {b:= true;}
15868 else {b:= false;}
15869 }
15870
15871 }
15872 <END_MODULE>
15873 <RESULT IF_PASS COUNT 17>
15874 (?im)warning: Control never reaches this code because of previous effective condition\(s\)
15875 <END_RESULT>
15876 <END_TC>
15877
15878 :exmp.
15879
15880 .*---------------------------------------------------------------------*
15881 :h4.Invalid access to not-selected union field shall cause dyanimc testcase error - access to non-actual union element 1
15882 TR HN30230: Value of union is set to unbount if other union possibilities are tried to be accessed.
15883 .*---------------------------------------------------------------------*
15884 :xmp tab=0.
15885
15886 <TC - Invalid access to not-selected union field shall cause dyanimc testcase error - access to non-actual union element 1>
15887 <EXECUTE>
15888 <VERDICT_LEAF PASS>
15889 <MODULE TTCN Temp Temp.ttcn>
15890 module Temp {
15891 type union UnionType1{
15892 UnionType2 girl,
15893 integer numero
15894 }
15895 type union UnionType2{
15896 Emma emma,
15897 Eszter eszter
15898 }
15899
15900 type record Emma { charstring name}
15901 type record Eszter { charstring name}
15902
15903 type component dummy_CT {}
15904 testcase tc_UnboundUnion () runs on dummy_CT{
15905 var UnionType1 vl_e := {girl := {emma := {name := "Emma"}}};
15906 log(log2str("numero: ",vl_e.numero));
15907 }
15908
15909 control
15910 {
15911 execute(tc_UnboundUnion());
15912 }
15913 }
15914 <END_MODULE>
15915 <MODULE CFG Temp Temp.cfg>
15916 [MODULE_PARAMETERS]
15917 [LOGGING]
15918 LogSourceInfo := Yes
15919 Logfile := "Temp%i.log"
15920 LogFileSize := 10
15921 LogFileNumber := 10
15922 DiskFullAction := error
15923 FileMask := LOG_ALL
15924 ConsoleMask := WARNING | ERROR | TESTCASE | STATISTICS
15925 [EXECUTE]
15926 Temp
15927 <END_MODULE>
15928 <RESULT IF_PASS COUNT 1>
15929 (?im)Dynamic test case error: Using non-selected field numero in a value of union type @Temp.UnionType1.
15930 <END_RESULT>
15931
15932 <END_TC>
15933 :exmp.
15934
15935 .*---------------------------------------------------------------------*
15936 :h4.Invalid access to not-selected union field shall cause dyanimc testcase error - access to non-actual union element 2
15937 TR HN30230: Value of union is set to unbount if other union possibilities are tried to be accessed.
15938 .*---------------------------------------------------------------------*
15939 :xmp tab=0.
15940
15941 <TC - Invalid access to not-selected union field shall cause dyanimc testcase error - access to non-actual union element 2>
15942 <EXECUTE>
15943 <VERDICT_LEAF PASS>
15944 <MODULE TTCN Temp Temp.ttcn>
15945 module Temp {
15946 type union UnionType1{
15947 UnionType2 girl,
15948 integer numero
15949 }
15950 type union UnionType2{
15951 Emma emma,
15952 Eszter eszter
15953 }
15954
15955 type record Emma { charstring name}
15956 type record Eszter { charstring name}
15957
15958 type component dummy_CT {}
15959 testcase tc_UnboundUnion () runs on dummy_CT{
15960 var UnionType1 vl_e := {girl := {emma := {name := "Emma"}}};
15961 var integer temp := vl_e.numero;
15962 }
15963
15964 control
15965 {
15966 execute(tc_UnboundUnion());
15967 }
15968 }
15969 <END_MODULE>
15970 <MODULE CFG Temp Temp.cfg>
15971 [MODULE_PARAMETERS]
15972 [LOGGING]
15973 LogSourceInfo := Yes
15974 Logfile := "Temp%i.log"
15975 LogFileSize := 10
15976 LogFileNumber := 10
15977 DiskFullAction := error
15978 FileMask := LOG_ALL
15979 ConsoleMask := WARNING | ERROR | TESTCASE | STATISTICS
15980 [EXECUTE]
15981 Temp
15982 <END_MODULE>
15983 <RESULT IF_PASS COUNT 1>
15984 (?im)Dynamic test case error: Using non-selected field numero in a value of union type @Temp.UnionType1.
15985 <END_RESULT>
15986
15987 <END_TC>
15988 :exmp.
15989
15990 .*---------------------------------------------------------------------*
15991 :h4.Invalid access to not-selected union field shall cause dyanimc testcase error - access to non-actual union element 3
15992 TR HN30230: Value of union is set to unbount if other union possibilities are tried to be accessed.
15993 .*---------------------------------------------------------------------*
15994 :xmp tab=0.
15995
15996 <TC - Invalid access to not-selected union field shall cause dyanimc testcase error - access to non-actual union element 3>
15997 <EXECUTE>
15998 <VERDICT_LEAF PASS>
15999 <MODULE TTCN Temp Temp.ttcn>
16000 module Temp {
16001 type union UnionType1{
16002 UnionType2 girl,
16003 integer numero
16004 }
16005 type union UnionType2{
16006 Emma emma,
16007 Eszter eszter
16008 }
16009
16010 type record Emma { charstring name}
16011 type record Eszter { charstring name}
16012
16013 type component dummy_CT {}
16014 testcase tc_UnboundUnion () runs on dummy_CT{
16015 var UnionType1 vl_e := {girl := {emma := {name := "Emma"}}};
16016 var integer temp;
16017 temp := vl_e.numero;
16018 }
16019
16020 control
16021 {
16022 execute(tc_UnboundUnion());
16023 }
16024 }
16025 <END_MODULE>
16026 <MODULE CFG Temp Temp.cfg>
16027 [MODULE_PARAMETERS]
16028 [LOGGING]
16029 LogSourceInfo := Yes
16030 Logfile := "Temp%i.log"
16031 LogFileSize := 10
16032 LogFileNumber := 10
16033 DiskFullAction := error
16034 FileMask := LOG_ALL
16035 ConsoleMask := WARNING | ERROR | TESTCASE | STATISTICS
16036 [EXECUTE]
16037 Temp
16038 <END_MODULE>
16039 <RESULT IF_PASS COUNT 1>
16040 (?im)Dynamic test case error: Using non-selected field numero in a value of union type @Temp.UnionType1.
16041 <END_RESULT>
16042
16043 <END_TC>
16044 :exmp.
16045
16046 .*---------------------------------------------------------------------*
16047 :h4.Invalid access to not-selected union field shall cause dyanimc testcase error - access to non-actual union element 4
16048 TR HN30230: Value of union is set to unbount if other union possibilities are tried to be accessed.
16049 .*---------------------------------------------------------------------*
16050 :xmp tab=0.
16051
16052 <TC - Invalid access to not-selected union field shall cause dyanimc testcase error - access to non-actual union element 4>
16053 <EXECUTE>
16054 <VERDICT_LEAF PASS>
16055 <MODULE TTCN Temp Temp.ttcn>
16056 module Temp {
16057 type union UnionType1{
16058 UnionType2 girl,
16059 integer numero
16060 }
16061 type union UnionType2{
16062 Emma emma,
16063 Eszter eszter
16064 }
16065
16066 type record Emma { charstring name}
16067 type record Eszter { charstring name}
16068
16069 function dummy(integer par) {
16070 }
16071
16072 type component dummy_CT {}
16073 testcase tc_UnboundUnion () runs on dummy_CT{
16074 var UnionType1 vl_e := {girl := {emma := {name := "Emma"}}};
16075 dummy(vl_e.numero);
16076 }
16077
16078 control
16079 {
16080 execute(tc_UnboundUnion());
16081 }
16082 }
16083 <END_MODULE>
16084 <MODULE CFG Temp Temp.cfg>
16085 [MODULE_PARAMETERS]
16086 [LOGGING]
16087 LogSourceInfo := Yes
16088 Logfile := "Temp%i.log"
16089 LogFileSize := 10
16090 LogFileNumber := 10
16091 DiskFullAction := error
16092 FileMask := LOG_ALL
16093 ConsoleMask := WARNING | ERROR | TESTCASE | STATISTICS
16094 [EXECUTE]
16095 Temp
16096 <END_MODULE>
16097 <RESULT IF_PASS COUNT 1>
16098 (?im)Dynamic test case error: Using non-selected field numero in a value of union type @Temp.UnionType1.
16099 <END_RESULT>
16100
16101 <END_TC>
16102 :exmp.
16103
16104 .*---------------------------------------------------------------------*
16105 :h4.Invalid access to not-selected union field shall cause dyanimc testcase error - access to non-actual union element 5
16106 TR HN30230: Value of union is set to unbount if other union possibilities are tried to be accessed.
16107 .*---------------------------------------------------------------------*
16108 :xmp tab=0.
16109
16110 <TC - Invalid access to not-selected union field shall cause dyanimc testcase error - access to non-actual union element 5>
16111 <EXECUTE>
16112 <VERDICT_LEAF PASS>
16113 <MODULE TTCN Temp Temp.ttcn>
16114 module Temp {
16115 type union UnionType1{
16116 UnionType2 girl,
16117 integer numero
16118 }
16119 type union UnionType2{
16120 Emma emma,
16121 Eszter eszter
16122 }
16123
16124 type record Emma { charstring name}
16125 type record Eszter { charstring name}
16126
16127 type component dummy_CT {}
16128 testcase tc_UnboundUnion () runs on dummy_CT{
16129 var UnionType1 vl_e := {girl := {emma := {name := "Emma"}}};
16130 var integer v[5];
16131 v[vl_e.numero] := 1;
16132 }
16133
16134 control
16135 {
16136 execute(tc_UnboundUnion());
16137 }
16138 }
16139 <END_MODULE>
16140 <MODULE CFG Temp Temp.cfg>
16141 [MODULE_PARAMETERS]
16142 [LOGGING]
16143 LogSourceInfo := Yes
16144 Logfile := "Temp%i.log"
16145 LogFileSize := 10
16146 LogFileNumber := 10
16147 DiskFullAction := error
16148 FileMask := LOG_ALL
16149 ConsoleMask := WARNING | ERROR | TESTCASE | STATISTICS
16150 [EXECUTE]
16151 Temp
16152 <END_MODULE>
16153 <RESULT IF_PASS COUNT 1>
16154 (?im)Dynamic test case error: Using non-selected field numero in a value of union type @Temp.UnionType1.
16155 <END_RESULT>
16156
16157 <END_TC>
16158 :exmp.
16159
16160 .*---------------------------------------------------------------------*
16161 :h3.TTCN-3::Referencing a unbound field
16162 .*---------------------------------------------------------------------*
16163 :xmp tab=0.
16164 <TC - TTCN-3::Referencing a unbound field>
16165
16166 <COMPILE>
16167 <VERDICT_LEAF PASS>
16168 <MODULE TTCN ModuleA ModuleA.ttcn>
16169 module ModuleA {
16170 type record recordInner {integer f1, integer f2};
16171 type record recordOuter {recordInner f1, integer f2};
16172
16173 function problem() {
16174 template recordOuter vt_temp := {f2 := 5};
16175 template integer t_temp := vt_temp.f1.f1;
16176 }
16177 }
16178 <END_MODULE>
16179 <RESULT IF_PASS COUNT 1>
16180 (?im)\berror\b.+?Reference.+?unbound.*?field.+?f1
16181 <END_RESULT>
16182 <END_TC>
16183 :exmp.
16184
16185 .*---------------------------------------------------------------------*
16186 :h3.TTCN-3::Referencing a unbound component variable (TR no. HO24162, HO23581)
16187 .*---------------------------------------------------------------------*
16188 :xmp tab=0.
16189 <TC - TTCN-3::Referencing a unbound component variable (TR no. HO24162, HO23581)>
16190
16191 <COMPILEGCC>
16192 <VERDICT_LEAF PASS>
16193 <MODULE TTCN ModuleA ModuleA.ttcn>
16194 module ModuleA {
16195 type record of integer IList;
16196
16197 type component C {
16198 var integer i;
16199 var IList ilist;
16200 }
16201
16202 function problem() runs on C {
16203 action(isbound(i), " i: ", i);
16204 }
16205 }
16206 <END_MODULE>
16207 <MODULE TTCN ModuleB ModuleB.ttcn>
16208 module ModuleB {
16209 import from ModuleA all;
16210
16211 function problem() runs on C {
16212 action(isbound(i), " i: ", i);
16213 action(isbound(ilist[i]), " ilist[i]: ", ilist[i]);
16214 }
16215 }
16216 <END_MODULE>
16217 <RESULT IF_PASS NEGATIVE>
16218 (?is)\berror:
16219 <END_RESULT>
16220 <END_TC>
16221 :exmp.
16222
16223 .*---------------------------------------------------------------------*
16224 :h3.TTCN-3::Referencing a unbound field (TR no. HN91136)
16225 .*---------------------------------------------------------------------*
16226 :xmp tab=0.
16227 <TC - TTCN-3::Referencing a unbound field (TR no. HN91136)>
16228
16229 <EXECUTE>
16230 <VERDICT_LEAF PASS>
16231 <MODULE TTCN ModuleA ModuleA.ttcn>
16232 module ModuleA {
16233 type union bubu {
16234 integer a,
16235 integer b
16236 }
16237
16238 type record of integer intrec;
16239
16240 control {
16241 var bubu i := { a:= 2};
16242 action(isbound(i.b));
16243 var intrec vl_rec := {};
16244 action(isbound(vl_rec[2]));
16245 }
16246 }
16247 <END_MODULE>
16248 <MODULE CFG Temp Temp.cfg>
16249 [MODULE_PARAMETERS]
16250 [LOGGING]
16251 LogSourceInfo := Yes
16252 Logfile := "Temp%i.log"
16253 LogFileSize := 10
16254 LogFileNumber := 10
16255 DiskFullAction := error
16256 FileMask := LOG_ALL
16257 ConsoleMask := WARNING | ERROR | TESTCASE | STATISTICS
16258 [EXECUTE]
16259 ModuleA
16260 <END_MODULE>
16261 <RESULT IF_PASS POSITIVE>
16262 (?im)Test execution summary: 0 test case was executed. Overall verdict: none
16263 <END_RESULT>
16264 <END_TC>
16265 :exmp.
16266
16267 .*---------------------------------------------------------------------*
16268 :h3.TTCN-3::Referencing a unbound bitstring bit
16269 .*---------------------------------------------------------------------*
16270 :xmp tab=0.
16271 <TC - TTCN-3::Referencing a unbound bitstring bit>
16272
16273 <EXECUTE>
16274 <VERDICT_LEAF PASS>
16275 <MODULE TTCN ModuleA ModuleA.ttcn>
16276 module ModuleA {
16277 type component dummy_CT {}
16278 testcase tc_temp () runs on dummy_CT{
16279 var bitstring bstr;
16280 log(isvalue(bstr[0]));
16281 }
16282 control {
16283 execute(tc_temp());
16284 }
16285 }
16286 <END_MODULE>
16287 <MODULE CFG Temp Temp.cfg>
16288 [MODULE_PARAMETERS]
16289 [LOGGING]
16290 LogSourceInfo := Yes
16291 Logfile := "Temp%i.log"
16292 LogFileSize := 10
16293 LogFileNumber := 10
16294 DiskFullAction := error
16295 FileMask := LOG_ALL
16296 ConsoleMask := WARNING | ERROR | TESTCASE | STATISTICS
16297 [EXECUTE]
16298 ModuleA
16299 <END_MODULE>
16300 <RESULT IF_FAIL POSITIVE>
16301 (?im)Dynamic test case error: Accessing an element of an unbound bitstring value.
16302 <END_RESULT>
16303 <END_TC>
16304 :exmp.
16305
16306 .*---------------------------------------------------------------------*
16307 :h3.TTCN-3::Referencing a unbound charstring bit
16308 .*---------------------------------------------------------------------*
16309 :xmp tab=0.
16310 <TC - TTCN-3::Referencing a unbound charstring bit>
16311
16312 <EXECUTE>
16313 <VERDICT_LEAF PASS>
16314 <MODULE TTCN ModuleA ModuleA.ttcn>
16315 module ModuleA {
16316 type component dummy_CT {}
16317 testcase tc_temp () runs on dummy_CT{
16318 var charstring cstr;
16319 log(isvalue(cstr[0]));
16320 }
16321 control {
16322 execute(tc_temp());
16323 }
16324 }
16325 <END_MODULE>
16326 <MODULE CFG Temp Temp.cfg>
16327 [MODULE_PARAMETERS]
16328 [LOGGING]
16329 LogSourceInfo := Yes
16330 Logfile := "Temp%i.log"
16331 LogFileSize := 10
16332 LogFileNumber := 10
16333 DiskFullAction := error
16334 FileMask := LOG_ALL
16335 ConsoleMask := WARNING | ERROR | TESTCASE | STATISTICS
16336 [EXECUTE]
16337 ModuleA
16338 <END_MODULE>
16339 <RESULT IF_FAIL POSITIVE>
16340 (?im)Dynamic test case error: Accessing an element of an unbound charstring value.
16341 <END_RESULT>
16342 <END_TC>
16343 :exmp.
16344
16345 .*---------------------------------------------------------------------*
16346 :h3.TTCN-3::Referencing a unbound hexstring octet
16347 .*---------------------------------------------------------------------*
16348 :xmp tab=0.
16349 <TC - TTCN-3::Referencing a unbound hexstring octet>
16350
16351 <EXECUTE>
16352 <VERDICT_LEAF PASS>
16353 <MODULE TTCN ModuleA ModuleA.ttcn>
16354 module ModuleA {
16355 type component dummy_CT {}
16356 testcase tc_temp () runs on dummy_CT{
16357 var hexstring hstr;
16358 log(isvalue(hstr[0]));
16359 }
16360 control {
16361 execute(tc_temp());
16362 }
16363 }
16364 <END_MODULE>
16365 <MODULE CFG Temp Temp.cfg>
16366 [MODULE_PARAMETERS]
16367 [LOGGING]
16368 LogSourceInfo := Yes
16369 Logfile := "Temp%i.log"
16370 LogFileSize := 10
16371 LogFileNumber := 10
16372 DiskFullAction := error
16373 FileMask := LOG_ALL
16374 ConsoleMask := WARNING | ERROR | TESTCASE | STATISTICS
16375 [EXECUTE]
16376 ModuleA
16377 <END_MODULE>
16378 <RESULT IF_FAIL POSITIVE>
16379 (?im)Dynamic test case error: Accessing an element of an unbound hexstring value.
16380 <END_RESULT>
16381 <END_TC>
16382 :exmp.
16383
16384 .*---------------------------------------------------------------------*
16385 :h3.TTCN-3::Referencing a unbound octetstring octet
16386 .*---------------------------------------------------------------------*
16387 :xmp tab=0.
16388 <TC - TTCN-3::Referencing a unbound octetstring octet>
16389
16390 <EXECUTE>
16391 <VERDICT_LEAF PASS>
16392 <MODULE TTCN ModuleA ModuleA.ttcn>
16393 module ModuleA {
16394 type component dummy_CT {}
16395 testcase tc_temp () runs on dummy_CT{
16396 var octetstring ostr;
16397 log(isvalue(ostr[0]));
16398 }
16399 control {
16400 execute(tc_temp());
16401 }
16402 }
16403 <END_MODULE>
16404 <MODULE CFG Temp Temp.cfg>
16405 [MODULE_PARAMETERS]
16406 [LOGGING]
16407 LogSourceInfo := Yes
16408 Logfile := "Temp%i.log"
16409 LogFileSize := 10
16410 LogFileNumber := 10
16411 DiskFullAction := error
16412 FileMask := LOG_ALL
16413 ConsoleMask := WARNING | ERROR | TESTCASE | STATISTICS
16414 [EXECUTE]
16415 ModuleA
16416 <END_MODULE>
16417 <RESULT IF_FAIL POSITIVE>
16418 (?im)Dynamic test case error: Accessing an element of an unbound octetstring value.
16419 <END_RESULT>
16420 <END_TC>
16421 :exmp.
16422
16423 .*---------------------------------------------------------------------*
16424 :h3.TTCN-3::Referencing a unbound universal charstring bit
16425 .*---------------------------------------------------------------------*
16426 :xmp tab=0.
16427 <TC - TTCN-3::Referencing a unbound universal charstring bit>
16428
16429 <EXECUTE>
16430 <VERDICT_LEAF PASS>
16431 <MODULE TTCN ModuleA ModuleA.ttcn>
16432 module ModuleA {
16433 type component dummy_CT {}
16434 testcase tc_temp () runs on dummy_CT{
16435 var universal charstring cstr;
16436 log(isvalue(cstr[0]));
16437 }
16438 control {
16439 execute(tc_temp());
16440 }
16441 }
16442 <END_MODULE>
16443 <MODULE CFG Temp Temp.cfg>
16444 [MODULE_PARAMETERS]
16445 [LOGGING]
16446 LogSourceInfo := Yes
16447 Logfile := "Temp%i.log"
16448 LogFileSize := 10
16449 LogFileNumber := 10
16450 DiskFullAction := error
16451 FileMask := LOG_ALL
16452 ConsoleMask := WARNING | ERROR | TESTCASE | STATISTICS
16453 [EXECUTE]
16454 ModuleA
16455 <END_MODULE>
16456 <RESULT IF_PASS COUNT 1>
16457 (?im)Dynamic test case error: Accessing an element of an unbound universal charstring value.
16458 <END_RESULT>
16459 <END_TC>
16460 :exmp.
16461
16462 .*---------------------------------------------------------------------*
16463 :h3.TTCN-3::Referencing a unbound union field
16464 .*---------------------------------------------------------------------*
16465 :xmp tab=0.
16466 <TC - TTCN-3::Referencing a unbound union field>
16467
16468 <EXECUTE>
16469 <VERDICT_LEAF PASS>
16470 <MODULE TTCN ModuleA ModuleA.ttcn>
16471 module ModuleA {
16472 type union tunion {
16473 integer x1,
16474 integer x2
16475 }
16476 type component dummy_CT {}
16477 testcase tc_temp () runs on dummy_CT{
16478 var tunion temp := {x1 := 1};
16479 log(isvalue(temp.x2));
16480 }
16481 control {
16482 execute(tc_temp());
16483 }
16484 }
16485 <END_MODULE>
16486 <MODULE CFG Temp Temp.cfg>
16487 [MODULE_PARAMETERS]
16488 [LOGGING]
16489 LogSourceInfo := Yes
16490 Logfile := "Temp%i.log"
16491 LogFileSize := 10
16492 LogFileNumber := 10
16493 DiskFullAction := error
16494 FileMask := LOG_ALL
16495 ConsoleMask := WARNING | ERROR | TESTCASE | STATISTICS
16496 [EXECUTE]
16497 ModuleA
16498 <END_MODULE>
16499 <RESULT IF_PASS COUNT 1>
16500 (?im)Dynamic test case error: Using non-selected field x2 in a value of union type @ModuleA.tunion.
16501 <END_RESULT>
16502 <END_TC>
16503 :exmp.
16504
16505 .*---------------------------------------------------------------------*
16506 :h3.TTCN-3::Referencing a unbound record of element
16507 .*---------------------------------------------------------------------*
16508 :xmp tab=0.
16509 <TC - TTCN-3::Referencing a unbound record of element>
16510
16511 <EXECUTE>
16512 <VERDICT_LEAF PASS>
16513 <MODULE TTCN ModuleA ModuleA.ttcn>
16514 module ModuleA {
16515 type record of integer t_recof;
16516 type component dummy_CT {}
16517 testcase tc_temp () runs on dummy_CT{
16518 var t_recof temp;
16519 log(isvalue(temp[0]));
16520 }
16521 control {
16522 execute(tc_temp());
16523 }
16524 }
16525 <END_MODULE>
16526 <MODULE CFG Temp Temp.cfg>
16527 [MODULE_PARAMETERS]
16528 [LOGGING]
16529 LogSourceInfo := Yes
16530 Logfile := "Temp%i.log"
16531 LogFileSize := 10
16532 LogFileNumber := 10
16533 DiskFullAction := error
16534 FileMask := LOG_ALL
16535 ConsoleMask := WARNING | ERROR | TESTCASE | STATISTICS
16536 [EXECUTE]
16537 ModuleA
16538 <END_MODULE>
16539 <RESULT IF_PASS COUNT 1>
16540 (?im)Dynamic test case error: Accessing an element in an unbound value of type @PreGenRecordOf.PREGEN_RECORD_OF_INTEGER.
16541 <END_RESULT>
16542 <END_TC>
16543 :exmp.
16544
16545 .*---------------------------------------------------------------------*
16546 :h3.TTCN-3::Referencing a unbound record of element (overflow)
16547 .*---------------------------------------------------------------------*
16548 :xmp tab=0.
16549 <TC - TTCN-3::Referencing a unbound record of element (overflow)>
16550
16551 <EXECUTE>
16552 <VERDICT_LEAF PASS>
16553 <MODULE TTCN ModuleA ModuleA.ttcn>
16554 module ModuleA {
16555 type record of integer t_recof;
16556 type component dummy_CT {}
16557 testcase tc_temp () runs on dummy_CT{
16558 var t_recof temp := {[1] := 1};
16559 log(isvalue(temp[10]));
16560 }
16561 control {
16562 execute(tc_temp());
16563 }
16564 }
16565 <END_MODULE>
16566 <MODULE CFG Temp Temp.cfg>
16567 [MODULE_PARAMETERS]
16568 [LOGGING]
16569 LogSourceInfo := Yes
16570 Logfile := "Temp%i.log"
16571 LogFileSize := 10
16572 LogFileNumber := 10
16573 DiskFullAction := error
16574 FileMask := LOG_ALL
16575 ConsoleMask := WARNING | ERROR | TESTCASE | STATISTICS
16576 [EXECUTE]
16577 ModuleA
16578 <END_MODULE>
16579 <RESULT IF_PASS COUNT 1>
16580 (?im)Dynamic test case error: Index overflow in a value of type @PreGenRecordOf.PREGEN_RECORD_OF_INTEGER: The index is 10, but the value has only 2 elements.
16581 <END_RESULT>
16582 <END_TC>
16583 :exmp.
16584
16585 .*---------------------------------------------------------------------*
16586 :h3.TTCN-3::Referencing a unbound set of element
16587 .*---------------------------------------------------------------------*
16588 :xmp tab=0.
16589 <TC - TTCN-3::Referencing a unbound set of element>
16590
16591 <EXECUTE>
16592 <VERDICT_LEAF PASS>
16593 <MODULE TTCN ModuleA ModuleA.ttcn>
16594 module ModuleA {
16595 type set of integer t_setof;
16596 type component dummy_CT {}
16597 testcase tc_temp () runs on dummy_CT{
16598 var t_setof temp;
16599 log(isvalue(temp[0]));
16600 }
16601 control {
16602 execute(tc_temp());
16603 }
16604 }
16605 <END_MODULE>
16606 <MODULE CFG Temp Temp.cfg>
16607 [MODULE_PARAMETERS]
16608 [LOGGING]
16609 LogSourceInfo := Yes
16610 Logfile := "Temp%i.log"
16611 LogFileSize := 10
16612 LogFileNumber := 10
16613 DiskFullAction := error
16614 FileMask := LOG_ALL
16615 ConsoleMask := WARNING | ERROR | TESTCASE | STATISTICS
16616 [EXECUTE]
16617 ModuleA
16618 <END_MODULE>
16619 <RESULT IF_PASS COUNT 1>
16620 (?im)Dynamic test case error: Accessing an element in an unbound value of type @PreGenRecordOf.PREGEN_SET_OF_INTEGER.
16621 <END_RESULT>
16622 <END_TC>
16623 :exmp.
16624
16625 .*---------------------------------------------------------------------*
16626 :h3.TTCN-3::Referencing a unbound set of element (overflow)
16627 .*---------------------------------------------------------------------*
16628 :xmp tab=0.
16629 <TC - TTCN-3::Referencing a unbound set of element (overflow)>
16630
16631 <EXECUTE>
16632 <VERDICT_LEAF PASS>
16633 <MODULE TTCN ModuleA ModuleA.ttcn>
16634 module ModuleA {
16635 type set of integer t_setof;
16636 type component dummy_CT {}
16637 testcase tc_temp () runs on dummy_CT{
16638 var t_setof temp := {[1] := 1};
16639 log(isvalue(temp[10]));
16640 }
16641 control {
16642 execute(tc_temp());
16643 }
16644 }
16645 <END_MODULE>
16646 <MODULE CFG Temp Temp.cfg>
16647 [MODULE_PARAMETERS]
16648 [LOGGING]
16649 LogSourceInfo := Yes
16650 Logfile := "Temp%i.log"
16651 LogFileSize := 10
16652 LogFileNumber := 10
16653 DiskFullAction := error
16654 FileMask := LOG_ALL
16655 ConsoleMask := WARNING | ERROR | TESTCASE | STATISTICS
16656 [EXECUTE]
16657 ModuleA
16658 <END_MODULE>
16659 <RESULT IF_PASS COUNT 1>
16660 (?im)Dynamic test case error: Index overflow in a value of type @PreGenRecordOf.PREGEN_SET_OF_INTEGER: The index is 10, but the value has only 2 elements.
16661 <END_RESULT>
16662 <END_TC>
16663 :exmp.
16664
16665 .*---------------------------------------------------------------------*
16666 :h3.Adhoc:: ispresent() isbound() DTEs
16667 .*---------------------------------------------------------------------*
16668 :xmp tab=0.
16669 <TC - ispresent() isbound() DTEs>
16670 <EXECUTE>
16671 <VERDICT_LEAF PASS>
16672 <MODULE TTCN Temp Temp.ttcn>
16673 module Temp {
16674 type component MyComp {}
16675
16676 type record of charstring ROC;
16677 type record of integer ROI;
16678 type record MyRecord1 {
16679 integer i optional,
16680 float x optional,
16681 charstring c
16682 }
16683
16684 type union MyUnion1 {
16685 ROC roc,
16686 integer i,
16687 ROI roi,
16688 MyRecord1 r
16689 }
16690
16691 const MyUnion1 c_myunion2:= { i:= 5 }
16692
16693 testcase tc_runtimeDivisionByZero_ispresent() runs on MyComp {
16694 var MyUnion1 vl_u:= c_myunion2;
16695 if(ispresent(vl_u)) {setverdict(pass)} else {setverdict(fail)}
16696 if(ispresent(vl_u.i)){setverdict(pass)}else {setverdict(fail)}
16697 if(ispresent(vl_u.i/2)){setverdict(pass)}else {setverdict(fail)}
16698 if(ispresent(vl_u.i*0)){setverdict(pass)}else {setverdict(fail)}
16699 if(ispresent(vl_u.i/(vl_u.i-5))){setverdict(fail)}else {setverdict(pass)} //DTE - OK
16700 }
16701
16702 testcase tc_runtimeDivisionByZero() runs on MyComp {
16703 var MyUnion1 vl_u:= c_myunion2;
16704 if(isbound(vl_u)) {setverdict(pass)} else {setverdict(fail)}
16705 if(isbound(vl_u.i)){setverdict(pass)}else {setverdict(fail)}
16706 if(isbound(vl_u.i/2)){setverdict(pass)}else {setverdict(fail)}
16707 if(isbound(vl_u.i*0)){setverdict(pass)}else {setverdict(fail)}
16708 if(isbound(vl_u.i/(vl_u.i-5))){setverdict(fail)}else {setverdict(pass)} //DTE - OK
16709 }
16710
16711 control
16712 {
16713 execute(tc_runtimeDivisionByZero());
16714 execute(tc_runtimeDivisionByZero_ispresent());
16715 }
16716 }
16717 <END_MODULE>
16718 <MODULE CFG Temp Temp.cfg>
16719 [LOGGING]
16720 LogSourceInfo := Yes
16721 Logfile := "Temp%i.log"
16722 FileMask := LOG_ALL
16723 ConsoleMask := LOG_ALL
16724 [EXECUTE]
16725 Temp
16726 <END_MODULE>
16727 <RESULT IF_PASS COUNT 2>
16728 (?im)Dynamic test case error: Integer division by zero.
16729 <END_RESULT>
16730 <END_TC>
16731 :exmp.
16732
16733 .*---------------------------------------------------------------------*
16734 :h1.Abbreviations
16735 .*---------------------------------------------------------------------*
16736 :list.
16737 :li D='ASN.1'.Abstract Syntax Notation 1
16738 :li D='EDML'.Ericsson Document Markup Language
16739 :li D='SA'.Semantic Analyser
16740 :li D='TTCN-3'.Test and Test Control Notation version 3
16741 :elist.
16742
16743 .*---------------------------------------------------------------------*
16744 :h1.References
16745 .*---------------------------------------------------------------------*
16746 :list.
16747 :li D='[1]'.3/ETH/RUS-2003:0087 Uen
16748 :nl.Requirement Specification for TITAN's TTCN-3 Semantic Analyser
16749 :li D='[2]'.1/174 02-FCPCA 101 22 Uen
16750 :nl.Statement of Compliance for TITAN project
16751 :li D='[3]'.ETSI ES 201 873-1, v3.0.0 Mockup v1 (2004-03):
16752 :nl.Testing and Test Control Notation version 3.,
16753 :nl.Part 1: TTCN-3 Core Language
16754 :elist.
16755
16756 .*---------------------------------------------------------------------*
16757 :h1.Terminology
16758 .*---------------------------------------------------------------------*
16759 :list.
16760 :li D='TITAN'.Ericsson's TTCN-3 Test Environment
16761 :elist.
16762
16763 :etext.
This page took 0.412628 seconds and 5 git commands to generate.