Sync with 5.4.0
[deliverable/titan.core.git] / function_test / Semantic_Analyser / TTCN3_SA_5_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.16/152 91-CRL 113 200/5 Uen
18 :rev.A
19 :date.2015-04-27
20
21 :prep.ETH/XZ Jeno Balasko
22 :appr.ETH/XZ (Gyula Koos)
23 :checked.ETHGRY
24
25 :title.Test description of the TTCN-3 Semantic Analyzer: Type compatibility
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-15 EGBOTAT New document for TITAN R6
37 A 2005-03-18 EGBOTAT Approved after review
38 B 2005-12-16 EKRISZA Updates for TITAN R6D
39 C 2006-07-31 EKRISZA Updates for TITAN R6E
40 D 2007-03-06 EJNOSZA Updates for TITAN R7A (expected error messages)
41 E 2009-06-11 EKRISZA Name correction
42 F 2010-01-19 EKRISZA Updated version number for TITAN R8C
43 A 2011-12-12 EKRISZA Updated for release
44 A 2012-06-27 EFERKOV Updated for release
45 A 2013-01-17 EKRIPND Updated for release
46 :exmp.
47 .*---------------------------------------------------------------------*
48 :h2.Purpose
49 .*---------------------------------------------------------------------*
50 The purpose of this Test Description is to define and describe the function
51 test activity for the Semantic Analyser functionality of the TTCN-3 compiler:
52 :nl.SA-5/x: Type compatibility.
53 :p.The specification of the test cases can be found in this document.
54 .*---------------------------------------------------------------------*
55 :h1.Test environment
56 .*---------------------------------------------------------------------*
57 .*---------------------------------------------------------------------*
58 :h2.Hardware
59 .*---------------------------------------------------------------------*
60 No specific hardware requirement.
61 .*---------------------------------------------------------------------*
62 :h2.Software
63 .*---------------------------------------------------------------------*
64 Tests shall be carried out on the following platforms:
65 :list.
66 :li D='1.'.Solaris 8 (Sun OS 5.8) (gcc 3.0.4)
67 :li D='2.'.SUSE Linux Enterprise server 8 (2.4.19-4GB) (gcc 3.2)
68 :li D='3.'.CYGWIN_NT-5.0 (Cygwin DLL: 1.5.12) on Windows 2000 (gcc 3.3.3)
69 :elist.
70 .*---------------------------------------------------------------------*
71 :h2.Configuration
72 .*---------------------------------------------------------------------*
73 The test environment had been setup in CVS. The tester program is stored in:
74 :nl.TTCNv3/function_test/Tools/SAtester.pl
75 :nl.Test cases are stored with extension .script in the directory:
76 :nl.TTCNv3/function_test/Semantic_Analyser/
77 .*---------------------------------------------------------------------*
78 :h2.Installation
79 .*---------------------------------------------------------------------*
80 Install proper TITAN binaries on the used platforms and make sure that
81 your environment settings are correct:
82 :list.
83 :li D='1.'.TTCN3_DIR is set
84 :li D='2.'.$TTCN3_DIR/bin is added to the PATH variable
85 :li D='3.'.$TTCN3_DIR/lib is added to the LD_LIBRARY_PATH variable
86 :li D='4.'.Perl 5.6.0 or higher is available on the platform
87 :li D='5.'.Create a symlink to your Perl binary into the directory where the
88 test cases are stored:
89 :nl.ln -s <your Perl> perl
90 :elist.
91 .*---------------------------------------------------------------------*
92 :h2.Test Tools
93 .*---------------------------------------------------------------------*
94 A tester program had been written in Perl especially for the Semantic Analyser
95 tests. For the list of command line parameters, type 'SAtester.pl -help', for the
96 complete documentation, type 'SAtester.pl -doc'.
97 :p.Test cases are specified in the Test Description documents in EDML format.
98 The tester program parses these files and generates the TTCN-3/ASN.1 modules, then
99 calls the compiler to compile them. The result printout is then matched against
100 different patterns to be able to set the verdict. Test cases contain not only
101 the source modules, but the patterns as well.
102 :p.The tester program allows one-by-one execution of test cases and batched
103 execution as well.
104 :p.NOTE: the tester program requires Perl 5.6.0 or higher.
105 .*---------------------------------------------------------------------*
106 :h1.Test cases
107 .*---------------------------------------------------------------------*
108 Ref [1]: SA-5/x: Type compatibility
109
110 .*---------------------------------------------------------------------*
111 :h2.Type id. is omitted when the value unambigously identifies the type
112 .*---------------------------------------------------------------------*
113 This test case group covers the requirement SA-5/1.
114
115 The first few testcases below test each possible port operation with an
116 ambiguous type. Then several other possible ambiguous types are tested
117 with one seleced port operation. The last few testcases test other
118 possibilities of omitted type identifiers.
119
120 Type is unambiguous with the port operations call, getcall, reply and
121 getreply because the signature should be present if an inline template
122 is used. If the signature is not present in these cases and the testport
123 has more than one signature in the corresponding type list then the
124 compiler will always print errors when omitting the signature with
125 inline templates.
126
127 Omitting the signature in port operations raise and catch will cause
128 parser errors. Ambiguous types can be tested with these port operations
129 regarding the types listed in the exception list of a specific signature.
130
131 .*---------------------------------------------------------------------*
132 :h3.Omitted type id - send port operation
133 .*---------------------------------------------------------------------*
134 :xmp tab=0.
135
136 <TC - Omitted type id - send port operation>
137
138 <COMPILE>
139 <VERDICT_LEAF PASS>
140 <MODULE TTCN Temp Temp.ttcn>
141 module Temp {
142
143 type port MyPort message {
144 inout charstring, universal charstring
145 }
146
147 type component MyComponent {
148 port MyPort myPort;
149 }
150
151 testcase TC() runs on MyComponent {
152 myPort.send("ABC");
153 }
154
155 }
156 <END_MODULE>
157 <RESULT COUNT 1>
158 (?im)type.+?is.+?ambiguous
159 <END_RESULT>
160 <RESULT COUNT 1>
161 (?is)\berror:
162 <END_RESULT>
163 <RESULT>
164 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
165 <END_RESULT>
166 <END_TC>
167
168 :exmp.
169
170 .*---------------------------------------------------------------------*
171 :h3.Omitted type id - receive port operation
172 .*---------------------------------------------------------------------*
173 :xmp tab=0.
174
175 <TC - Omitted type id - receive port operation>
176
177 <COMPILE>
178 <VERDICT_LEAF PASS>
179 <MODULE TTCN Temp Temp.ttcn>
180 module Temp {
181
182 type port MyPort message {
183 inout charstring, universal charstring
184 }
185
186 type component MyComponent {
187 port MyPort myPort;
188 }
189
190 testcase TC() runs on MyComponent {
191 myPort.receive("ABC");
192 alt {
193 []myPort.receive("ABC") { }
194 }
195 }
196
197 }
198 <END_MODULE>
199 <RESULT COUNT 2>
200 (?im)type.+?is.+?ambiguous
201 <END_RESULT>
202 <RESULT COUNT 2>
203 (?is)\berror:
204 <END_RESULT>
205 <RESULT>
206 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
207 <END_RESULT>
208 <END_TC>
209
210 :exmp.
211
212 .*---------------------------------------------------------------------*
213 :h3.Omitted type id - raise port operation
214 .*---------------------------------------------------------------------*
215 :xmp tab=0.
216
217 <TC - Omitted type id - raise port operation>
218
219 <COMPILE>
220 <VERDICT_LEAF PASS>
221 <MODULE TTCN Temp Temp.ttcn>
222 module Temp {
223
224 signature Sig() exception (charstring, universal charstring);
225
226 type port MyPort procedure {
227 inout Sig
228 }
229
230 type component MyComponent {
231 port MyPort myPort;
232 }
233
234 testcase TC() runs on MyComponent {
235 myPort.raise(Sig, "abc");
236 }
237
238 }
239 <END_MODULE>
240 <RESULT COUNT 1>
241 (?im)type.+?is.+?ambiguous
242 <END_RESULT>
243 <RESULT COUNT 1>
244 (?is)\berror:
245 <END_RESULT>
246 <RESULT>
247 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
248 <END_RESULT>
249 <END_TC>
250
251 :exmp.
252
253 .*---------------------------------------------------------------------*
254 :h3.Omitted type id - catch port operation
255 .*---------------------------------------------------------------------*
256 :xmp tab=0.
257
258 <TC - Omitted type id - catch port operation>
259
260 <COMPILE>
261 <VERDICT_LEAF PASS>
262 <MODULE TTCN Temp Temp.ttcn>
263 module Temp {
264
265 signature Sig() exception (charstring, universal charstring);
266
267 type port MyPort procedure {
268 inout Sig
269 }
270
271 type component MyComponent {
272 port MyPort myPort;
273 }
274
275 testcase TC() runs on MyComponent {
276 alt {
277 []myPort.catch(Sig, "abc") { }
278 }
279 }
280
281 }
282 <END_MODULE>
283 <RESULT COUNT 1>
284 (?im)type.+?is.+?ambiguous
285 <END_RESULT>
286 <RESULT COUNT 1>
287 (?is)\berror:
288 <END_RESULT>
289 <RESULT>
290 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
291 <END_RESULT>
292 <END_TC>
293
294 :exmp.
295
296 .*---------------------------------------------------------------------*
297 :h3.Omitted type id - identical structured types
298 .*---------------------------------------------------------------------*
299 :xmp tab=0.
300
301 <TC - Omitted type id - identical structured types>
302
303 <COMPILE>
304 <VERDICT_LEAF PASS>
305 <MODULE TTCN Temp Temp.ttcn>
306 module Temp {
307
308 type record MyRecord1 {
309 charstring f_cs,
310 integer f_i
311 }
312
313 type record MyRecord2 {
314 charstring f_cs,
315 integer f_i
316 }
317
318 type port MyPort message {
319 inout MyRecord1, MyRecord2
320 }
321
322 type component MyComponent {
323 port MyPort myPort;
324 }
325
326 testcase TC() runs on MyComponent {
327 myPort.send({ "abc", 1 });
328 // myPort.receive({ "def", 2 });
329 }
330
331 }
332 <END_MODULE>
333 <RESULT COUNT 1>
334 (?im)cannot.+?determine.+?type
335 <END_RESULT>
336 <RESULT COUNT 1>
337 (?is)\berror:
338 <END_RESULT>
339 <RESULT>
340 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
341 <END_RESULT>
342 <END_TC>
343
344 :exmp.
345
346 .*---------------------------------------------------------------------*
347 :h3.Omitted type id - ambiguous structured types
348 .*---------------------------------------------------------------------*
349 :xmp tab=0.
350
351 <TC - Omitted type id - ambiguous structured types>
352
353 <COMPILE>
354 <VERDICT_LEAF PASS>
355 <MODULE TTCN Temp Temp.ttcn>
356 module Temp {
357
358 type record MyRecord1 {
359 charstring f_cs,
360 integer f_i
361 }
362
363 type record MyRecord2 {
364 universal charstring f_ucs,
365 integer f_i
366 }
367
368 type port MyPort message {
369 inout MyRecord1, MyRecord2
370 }
371
372 type component MyComponent {
373 port MyPort myPort;
374 }
375
376 testcase TC() runs on MyComponent {
377 myPort.send({ "abc", 1 });
378 // myPort.receive({ "def", 2 });
379 }
380
381 }
382 <END_MODULE>
383 <RESULT COUNT 1>
384 (?im)cannot.+?determine.+?type
385 <END_RESULT>
386 <RESULT COUNT 1>
387 (?is)\berror:
388 <END_RESULT>
389 <RESULT>
390 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
391 <END_RESULT>
392 <END_TC>
393
394 :exmp.
395
396 .*---------------------------------------------------------------------*
397 :h3.Omitted type id - set type
398 .*---------------------------------------------------------------------*
399 :xmp tab=0.
400
401 <TC - Omitted type id - set type>
402
403 <COMPILE>
404 <VERDICT_LEAF PASS>
405 <MODULE TTCN Temp Temp.ttcn>
406 module Temp {
407
408 type set MySet1 {
409 charstring f_cs,
410 integer f_i
411 }
412
413 type set MySet2 {
414 integer f_i,
415 universal charstring f_ucs
416 }
417
418 type port MyPort message {
419 inout MySet1, MySet2
420 }
421
422 type component MyComponent {
423 port MyPort myPort;
424 }
425
426 testcase TC() runs on MyComponent {
427 myPort.send({ "abc", 1 });
428 // myPort.receive({ "def", 2 });
429 }
430
431 }
432 <END_MODULE>
433 <RESULT COUNT 1>
434 (?im)cannot.+?determine.+?type
435 <END_RESULT>
436 <RESULT COUNT 1>
437 (?is)\berror:
438 <END_RESULT>
439 <RESULT>
440 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
441 <END_RESULT>
442 <END_TC>
443
444 :exmp.
445
446 .*---------------------------------------------------------------------*
447 :h3.Omitted type id - enumerated type
448 .*---------------------------------------------------------------------*
449 :xmp tab=0.
450
451 <TC - Omitted type id - enumerated type>
452
453 <COMPILE>
454 <VERDICT_LEAF PASS>
455 <MODULE TTCN Temp Temp.ttcn>
456 module Temp {
457
458 type enumerated MyEnum1 { ONE(1), TWO(2), THREE(3) }
459 type enumerated MyEnum2 { ONE(1), THREE(3), FIVE(5) }
460
461 type port MyPort message {
462 inout MyEnum1, MyEnum2
463 }
464
465 type component MyComponent {
466 port MyPort myPort;
467 }
468
469 testcase TC() runs on MyComponent {
470 myPort.send(ONE);
471 // myPort.receive(THREE);
472 }
473
474 }
475 <END_MODULE>
476 <RESULT COUNT 1>
477 (?im)\bno\b.+?definition.+?ONE
478 <END_RESULT>
479 <RESULT COUNT 1>
480 (?is)\berror:
481 <END_RESULT>
482 <RESULT>
483 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
484 <END_RESULT>
485 <END_TC>
486
487 :exmp.
488
489 .*---------------------------------------------------------------------*
490 :h3.Omitted type id - record of
491 .*---------------------------------------------------------------------*
492 :xmp tab=0.
493
494 <TC - Omitted type id - record of>
495
496 <COMPILE>
497 <VERDICT_LEAF PASS>
498 <MODULE TTCN Temp Temp.ttcn>
499 module Temp {
500
501 type record length(3) of integer RI3;
502 type record length(2..4) of integer RI2_4;
503
504 type port MyPort message {
505 inout RI3, RI2_4;
506 }
507
508 type component MyComponent {
509 port MyPort myPort;
510 }
511
512 testcase TC() runs on MyComponent {
513 myPort.send({1,2,3});
514 // myPort.receive({1,2,3});
515 }
516
517 }
518 <END_MODULE>
519 <RESULT COUNT 1>
520 (?im)cannot.+?determine.+?type
521 <END_RESULT>
522 <RESULT COUNT 1>
523 (?is)\berror:
524 <END_RESULT>
525 <RESULT>
526 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
527 <END_RESULT>
528 <END_TC>
529
530 :exmp.
531
532 .*---------------------------------------------------------------------*
533 :h3.Omitted type id - empty record of
534 .*---------------------------------------------------------------------*
535 :xmp tab=0.
536
537 <TC - Omitted type id - empty record of>
538
539 <COMPILE>
540 <VERDICT_LEAF PASS>
541 <MODULE TTCN Temp Temp.ttcn>
542 module Temp {
543
544 type record of integer RI;
545 type record of float RF;
546
547 type port MyPort message {
548 inout RI, RF;
549 }
550
551 type component MyComponent {
552 port MyPort myPort;
553 }
554
555 testcase TC() runs on MyComponent {
556 myPort.send({});
557 // myPort.receive({});
558 }
559
560 }
561 <END_MODULE>
562 <RESULT COUNT 1>
563 (?im)cannot.+?determine.+?type
564 <END_RESULT>
565 <RESULT COUNT 1>
566 (?is)\berror:
567 <END_RESULT>
568 <RESULT>
569 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
570 <END_RESULT>
571 <END_TC>
572
573 :exmp.
574
575 .*---------------------------------------------------------------------*
576 :h3.Omitted type id - record of and set of
577 .*---------------------------------------------------------------------*
578 :xmp tab=0.
579
580 <TC - Omitted type id - record of and set of>
581
582 <COMPILE>
583 <VERDICT_LEAF PASS>
584 <MODULE TTCN Temp Temp.ttcn>
585 module Temp {
586
587 type record of integer RI;
588 type set of integer SI;
589
590 type port MyPort message {
591 inout RI, SI;
592 }
593
594 type component MyComponent {
595 port MyPort myPort;
596 }
597
598 testcase TC() runs on MyComponent {
599 myPort.send({1,2,3});
600 // myPort.receive({1,2,3});
601 }
602
603 }
604 <END_MODULE>
605 <RESULT COUNT 1>
606 (?im)cannot.+?determine.+?type
607 <END_RESULT>
608 <RESULT COUNT 1>
609 (?is)\berror:
610 <END_RESULT>
611 <RESULT>
612 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
613 <END_RESULT>
614 <END_TC>
615
616 :exmp.
617
618 .*---------------------------------------------------------------------*
619 :h3.Omitted type id - subtyping
620 .*---------------------------------------------------------------------*
621 :xmp tab=0.
622
623 <TC - Omitted type id - subtyping>
624
625 <COMPILE>
626 <VERDICT_LEAF PASS>
627 <MODULE TTCN Temp Temp.ttcn>
628 module Temp {
629
630 type integer UInt4 (0..15);
631 type integer UInt8 (0..255);
632
633 type record MyRecord1 {
634 UInt4 field1,
635 UInt4 field2
636 }
637
638 type record MyRecord2 {
639 UInt8 field1,
640 UInt8 field2
641 }
642
643 type port MyPort message {
644 inout MyRecord1, MyRecord2;
645 }
646
647 type component MyComponent {
648 port MyPort myPort;
649 }
650
651 testcase TC() runs on MyComponent {
652 myPort.send({4,4});
653 // myPort.receive({8,8});
654 }
655
656 }
657 <END_MODULE>
658 <RESULT COUNT 1>
659 (?im)cannot.+?determine.+?type
660 <END_RESULT>
661 <RESULT COUNT 1>
662 (?is)\berror:
663 <END_RESULT>
664 <RESULT>
665 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
666 <END_RESULT>
667 <END_TC>
668
669 :exmp.
670
671 .*---------------------------------------------------------------------*
672 :h3.Omitted type id - matching identical structured types
673 .*---------------------------------------------------------------------*
674 :xmp tab=0.
675
676 <TC - Omitted type id - matching identical structured types>
677
678 <COMPILE>
679 <VERDICT_LEAF PASS>
680 <MODULE TTCN Temp Temp.ttcn>
681 module Temp {
682
683 type record MyRecord1 {
684 charstring f_cs,
685 integer f_i
686 }
687
688 type record MyRecord2 {
689 charstring f_cs,
690 integer f_i
691 }
692
693 function F() {
694 if(match({"foobar", 1}, {*, ?})) { }
695 }
696
697 }
698 <END_MODULE>
699 <RESULT COUNT 1>
700 (?im)cannot.+?determine.+?type
701 <END_RESULT>
702 <RESULT COUNT 1>
703 (?is)\berror:
704 <END_RESULT>
705 <RESULT>
706 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
707 <END_RESULT>
708 <END_TC>
709
710 :exmp.
711
712 .*---------------------------------------------------------------------*
713 :h3.Omitted type id - comparing enumerations in if statement
714 .*---------------------------------------------------------------------*
715 :xmp tab=0.
716
717 <TC - Omitted type id - comparing enumerations>
718
719 <COMPILE>
720 <VERDICT_LEAF PASS>
721 <MODULE TTCN Temp Temp.ttcn>
722 module Temp {
723
724 type enumerated MyEnum1 { ONE(1), TWO(2) }
725 type enumerated MyEnum2 { ONE(1), THREE(3) }
726
727 function F() {
728 if(ONE == ONE) { }
729 }
730
731 }
732 <END_MODULE>
733 <RESULT COUNT 1>
734 (?im)cannot.+?determine.+?type
735 <END_RESULT>
736 <RESULT COUNT 1>
737 (?is)\berror:
738 <END_RESULT>
739 <RESULT>
740 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
741 <END_RESULT>
742 <END_TC>
743
744 :exmp.
745
746 .*---------------------------------------------------------------------*
747 :h3.Omitted type id - comparing enumerations in while loop
748 .*---------------------------------------------------------------------*
749 :xmp tab=0.
750
751 <TC - Omitted type id - comparing enumerations in while loop>
752
753 <COMPILE>
754 <VERDICT_LEAF PASS>
755 <MODULE TTCN Temp Temp.ttcn>
756 module Temp {
757
758 type enumerated MyEnum1 { ONE(1), TWO(2), THREE(3) }
759 type enumerated MyEnum2 { ONE(1), THREE(3), FIVE(5) }
760
761 function F() {
762 while(ONE != THREE) { }
763 }
764
765 }
766 <END_MODULE>
767 <RESULT COUNT 1>
768 (?im)cannot.+?determine.+?type
769 <END_RESULT>
770 <RESULT COUNT 1>
771 (?is)\berror:
772 <END_RESULT>
773 <RESULT>
774 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
775 <END_RESULT>
776 <END_TC>
777
778 :exmp.
779
780 .*---------------------------------------------------------------------*
781 :h3.Omitted type id - comparing enumerations in for loop
782 .*---------------------------------------------------------------------*
783 :xmp tab=0.
784
785 <TC - Omitted type id - comparing enumerations in for loop>
786
787 <COMPILE>
788 <VERDICT_LEAF PASS>
789 <MODULE TTCN Temp Temp.ttcn>
790 module Temp {
791
792 type enumerated MyEnum1 { ONE(1), TWO(2), THREE(3) }
793 type enumerated MyEnum2 { ONE(1), THREE(3), FIVE(5) }
794
795 function F() {
796 for(var integer dummy:=0; ONE < THREE; dummy:=dummy+1) { }
797 }
798
799 }
800 <END_MODULE>
801 <RESULT COUNT 1>
802 (?im)cannot.+?determine.+?type
803 <END_RESULT>
804 <RESULT COUNT 2>
805 (?im)operand.+?should.+?\bbe\b.+?integer.+?float.+?\bor\b.+?enumerated.+?value
806 <END_RESULT>
807 <RESULT COUNT 3>
808 (?is)\berror:
809 <END_RESULT>
810 <RESULT>
811 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
812 <END_RESULT>
813 <END_TC>
814
815 :exmp.
816
817 .*---------------------------------------------------------------------*
818 :h3.Omitted type id - comparing enumerations in do-while loop
819 .*---------------------------------------------------------------------*
820 :xmp tab=0.
821
822 <TC - Omitted type id - comparing enumerations in do-while loop>
823
824 <COMPILE>
825 <VERDICT_LEAF PASS>
826 <MODULE TTCN Temp Temp.ttcn>
827 module Temp {
828
829 type enumerated MyEnum1 { ONE(1), TWO(2), THREE(3) }
830 type enumerated MyEnum2 { ONE(1), THREE(3), FIVE(5) }
831
832 function F() {
833 do { } while(THREE >= ONE);
834 }
835
836 }
837 <END_MODULE>
838 <RESULT COUNT 1>
839 (?im)cannot.+?determine.+?type
840 <END_RESULT>
841 <RESULT COUNT 2>
842 (?im)operand.+?should.+?\bbe\b.+?integer.+?float.+?\bor\b.+?enumerated.+?value
843 <END_RESULT>
844 <RESULT COUNT 3>
845 (?is)\berror:
846 <END_RESULT>
847 <RESULT>
848 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
849 <END_RESULT>
850 <END_TC>
851
852 :exmp.
853
854
855 .*---------------------------------------------------------------------*
856 :h2.Type compatibility with evaluated expressions
857 .*---------------------------------------------------------------------*
858 This test case group covers the requirement SA-5/2.
859 All evaluated expressions shall be compatible with the type that is
860 expected in the place of the expression.
861
862 Not all of the type/expression combinations were tested, but the
863 testcases try to involve possible TTCN-3 types and expressions.
864
865 .*---------------------------------------------------------------------*
866 :h3.Evaluated expression - addition
867 .*---------------------------------------------------------------------*
868 :xmp tab=0.
869
870 <TC - Evaluated expression - addition>
871
872 <COMPILE>
873 <VERDICT_LEAF PASS>
874 <MODULE TTCN Temp Temp.ttcn>
875 module Temp {
876
877 function F() {
878 var integer FaultyInt := 3.0 + 4.0;
879 var float FaultyFloat := 3 + 4;
880 timer FaultyTimer;
881 FaultyTimer.start(1+1);
882 }
883
884 }
885 <END_MODULE>
886 <RESULT COUNT 1>
887 (?im)integer.+?value.+?expected
888 <END_RESULT>
889 <RESULT COUNT 1>
890 (?im)float.+?value.+?expected
891 <END_RESULT>
892 <RESULT COUNT 1>
893 (?im)value.+?float.+?expected
894 <END_RESULT>
895 <RESULT COUNT 3>
896 (?is)\berror:
897 <END_RESULT>
898 <RESULT>
899 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
900 <END_RESULT>
901 <END_TC>
902
903 :exmp.
904
905 .*---------------------------------------------------------------------*
906 :h3.Evaluated expression - subtraction
907 .*---------------------------------------------------------------------*
908 :xmp tab=0.
909
910 <TC - Evaluated expression - subtraction>
911
912 <COMPILE>
913 <VERDICT_LEAF PASS>
914 <MODULE TTCN Temp Temp.ttcn>
915 module Temp {
916
917 function F() {
918 var integer FaultyInt := 3.0 - 4.0;
919 var objid FaultyObjid := 3 - 4;
920 if(2-3) { }
921 }
922
923 }
924 <END_MODULE>
925 <RESULT COUNT 1>
926 (?im)integer.+?value.+?expected
927 <END_RESULT>
928 <RESULT COUNT 1>
929 (?im)objid.+?value.+?expected
930 <END_RESULT>
931 <RESULT COUNT 1>
932 (?im)boolean.+?expected
933 <END_RESULT>
934 <RESULT COUNT 3>
935 (?is)\berror:
936 <END_RESULT>
937 <RESULT>
938 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
939 <END_RESULT>
940 <END_TC>
941
942 :exmp.
943
944 .*---------------------------------------------------------------------*
945 :h3.Evaluated expression - multiplication
946 .*---------------------------------------------------------------------*
947 :xmp tab=0.
948
949 <TC - Evaluated expression - multiplication>
950
951 <COMPILE>
952 <VERDICT_LEAF PASS>
953 <MODULE TTCN Temp Temp.ttcn>
954 module Temp {
955
956 function F() {
957 var integer FaultyInt := 3.14 * 2.2;
958 var float FaultyFloat := 2 * 2;
959 timer T:=2.0;
960 T.start;
961 alt {
962 [9.0*1.1]T.timeout { }
963 }
964 }
965
966 }
967 <END_MODULE>
968 <RESULT COUNT 1>
969 (?im)integer.+?value.+?expected
970 <END_RESULT>
971 <RESULT COUNT 1>
972 (?im)float.+?value.+?expected
973 <END_RESULT>
974 <RESULT COUNT 1>
975 (?im)boolean.+?expected
976 <END_RESULT>
977 <RESULT COUNT 3>
978 (?is)\berror:
979 <END_RESULT>
980 <RESULT>
981 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
982 <END_RESULT>
983 <END_TC>
984
985 :exmp.
986
987 .*---------------------------------------------------------------------*
988 :h3.Evaluated expression - division
989 .*---------------------------------------------------------------------*
990 :xmp tab=0.
991
992 <TC - Evaluated expression - division>
993
994 <COMPILE>
995 <VERDICT_LEAF PASS>
996 <MODULE TTCN Temp Temp.ttcn>
997 module Temp {
998
999 function F() {
1000 var integer FaultyInt := 4.0 / 4.0;
1001 var float FaultyFloat := 4 / 2;
1002 setverdict(1/2);
1003 }
1004
1005 }
1006 <END_MODULE>
1007 <RESULT COUNT 1>
1008 (?im)integer.+?value.+?expected
1009 <END_RESULT>
1010 <RESULT COUNT 1>
1011 (?im)float.+?value.+?expected
1012 <END_RESULT>
1013 <RESULT COUNT 1>
1014 (?im)verdict.+?expected
1015 <END_RESULT>
1016 <RESULT COUNT 3>
1017 (?is)\berror:
1018 <END_RESULT>
1019 <RESULT>
1020 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1021 <END_RESULT>
1022 <END_TC>
1023
1024 :exmp.
1025
1026 .*---------------------------------------------------------------------*
1027 :h3.Evaluated expression - modulo
1028 .*---------------------------------------------------------------------*
1029 :xmp tab=0.
1030
1031 <TC - Evaluated expression - modulo>
1032
1033 <COMPILE>
1034 <VERDICT_LEAF PASS>
1035 <MODULE TTCN Temp Temp.ttcn>
1036 module Temp {
1037
1038 function F() {
1039 var float FaultyFloat := 4 mod 3;
1040 if(1 mod 2) { }
1041 }
1042
1043 }
1044 <END_MODULE>
1045 <RESULT COUNT 1>
1046 (?im)float.+?value.+?expected
1047 <END_RESULT>
1048 <RESULT COUNT 1>
1049 (?im)boolean.+?expected
1050 <END_RESULT>
1051 <RESULT COUNT 2>
1052 (?is)\berror:
1053 <END_RESULT>
1054 <RESULT>
1055 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1056 <END_RESULT>
1057 <END_TC>
1058
1059 :exmp.
1060
1061 .*---------------------------------------------------------------------*
1062 :h3.Evaluated expression - remainder
1063 .*---------------------------------------------------------------------*
1064 :xmp tab=0.
1065
1066 <TC - Evaluated expression - remainder>
1067
1068 <COMPILE>
1069 <VERDICT_LEAF PASS>
1070 <MODULE TTCN Temp Temp.ttcn>
1071 module Temp {
1072
1073 function F() {
1074 var float FaultyFloat := 4 rem 3;
1075 if(-1 rem 9) { }
1076 }
1077
1078 }
1079 <END_MODULE>
1080 <RESULT COUNT 1>
1081 (?im)float.+?value.+?expected
1082 <END_RESULT>
1083 <RESULT COUNT 1>
1084 (?im)boolean.+?expected
1085 <END_RESULT>
1086 <RESULT COUNT 2>
1087 (?is)\berror:
1088 <END_RESULT>
1089 <RESULT>
1090 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1091 <END_RESULT>
1092 <END_TC>
1093
1094 :exmp.
1095
1096 .*---------------------------------------------------------------------*
1097 :h3.Evaluated expression - string concatenation
1098 .*---------------------------------------------------------------------*
1099 :xmp tab=0.
1100
1101 <TC - Evaluated expression - string concatenation>
1102
1103 <COMPILE>
1104 <VERDICT_LEAF PASS>
1105 <MODULE TTCN Temp Temp.ttcn>
1106 module Temp {
1107
1108 function F() {
1109 var charstring FaultyCS := '0011'B & '1100'B;
1110 var universal charstring FaultyUCS := 'A5'H & 'C3A'H;
1111 var bitstring FaultyBS := "abc" & "def";
1112 var hexstring FaultyHS := 'ABCD'O & 'CDEF'O;
1113 var octetstring FaultyOS := "abc" & "def";
1114 if('1'B & '1'B) { }
1115 }
1116
1117 }
1118 <END_MODULE>
1119 <RESULT COUNT 2>
1120 (?im)character string.+?value.+?expected
1121 <END_RESULT>
1122 <RESULT COUNT 1>
1123 (?im)bitstring.+?value.+?expected
1124 <END_RESULT>
1125 <RESULT COUNT 1>
1126 (?im)hexstring.+?value.+?expected
1127 <END_RESULT>
1128 <RESULT COUNT 1>
1129 (?im)octetstring.+?value.+?expected
1130 <END_RESULT>
1131 <RESULT COUNT 1>
1132 (?im)boolean.+?expected
1133 <END_RESULT>
1134 <RESULT COUNT 6>
1135 (?is)\berror:
1136 <END_RESULT>
1137 <RESULT>
1138 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1139 <END_RESULT>
1140 <END_TC>
1141
1142 :exmp.
1143
1144 .*---------------------------------------------------------------------*
1145 :h3.Evaluated expression - less then operator
1146 .*---------------------------------------------------------------------*
1147 :xmp tab=0.
1148
1149 <TC - Evaluated expression - less then operator>
1150
1151 <COMPILE>
1152 <VERDICT_LEAF PASS>
1153 <MODULE TTCN Temp Temp.ttcn>
1154 module Temp {
1155
1156 function F() {
1157 var integer FaultyInt := 3 < 3;
1158 var float FaultyFloat := 3.14 < 4.0;
1159 }
1160
1161 }
1162 <END_MODULE>
1163 <RESULT COUNT 1>
1164 (?im)integer.+?value.+?expected
1165 <END_RESULT>
1166 <RESULT COUNT 1>
1167 (?im)float.+?value.+?expected
1168 <END_RESULT>
1169 <RESULT COUNT 2>
1170 (?is)\berror:
1171 <END_RESULT>
1172 <RESULT>
1173 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1174 <END_RESULT>
1175 <END_TC>
1176
1177 :exmp.
1178
1179 .*---------------------------------------------------------------------*
1180 :h3.Evaluated expression - greater then operator
1181 .*---------------------------------------------------------------------*
1182 :xmp tab=0.
1183
1184 <TC - Evaluated expression - greater then operator>
1185
1186 <COMPILE>
1187 <VERDICT_LEAF PASS>
1188 <MODULE TTCN Temp Temp.ttcn>
1189 module Temp {
1190
1191 function F() {
1192 var integer FaultyInt := 3 > 3;
1193 var float FaultyFloat := 2.2 > 1.7;
1194 }
1195
1196 }
1197 <END_MODULE>
1198 <RESULT COUNT 1>
1199 (?im)integer.+?value.+?expected
1200 <END_RESULT>
1201 <RESULT COUNT 1>
1202 (?im)float.+?value.+?expected
1203 <END_RESULT>
1204 <RESULT COUNT 2>
1205 (?is)\berror:
1206 <END_RESULT>
1207 <RESULT>
1208 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1209 <END_RESULT>
1210 <END_TC>
1211
1212 :exmp.
1213
1214 .*---------------------------------------------------------------------*
1215 :h3.Evaluated expression - not equal operator
1216 .*---------------------------------------------------------------------*
1217 :xmp tab=0.
1218
1219 <TC - Evaluated expression - not equal operator>
1220
1221 <COMPILE>
1222 <VERDICT_LEAF PASS>
1223 <MODULE TTCN Temp Temp.ttcn>
1224 module Temp {
1225
1226 function F() {
1227 var integer FaultyInt := 3.3 != 3.3;
1228 var float FaultyFloat := 2e2 != 200.0;
1229 }
1230
1231 }
1232 <END_MODULE>
1233 <RESULT COUNT 1>
1234 (?im)integer.+?value.+?expected
1235 <END_RESULT>
1236 <RESULT COUNT 1>
1237 (?im)float.+?value.+?expected
1238 <END_RESULT>
1239 <RESULT COUNT 2>
1240 (?is)\berror:
1241 <END_RESULT>
1242 <RESULT>
1243 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1244 <END_RESULT>
1245 <END_TC>
1246
1247 :exmp.
1248
1249 .*---------------------------------------------------------------------*
1250 :h3.Evaluated expression - less then or equal operator
1251 .*---------------------------------------------------------------------*
1252 :xmp tab=0.
1253
1254 <TC - Evaluated expression - less then or equal operator>
1255
1256 <COMPILE>
1257 <VERDICT_LEAF PASS>
1258 <MODULE TTCN Temp Temp.ttcn>
1259 module Temp {
1260
1261 function F() {
1262 var integer FaultyInt := 3.3 <= 3.3;
1263 var float FaultyFloat := 3.33 <= 3.333;
1264 }
1265
1266 }
1267 <END_MODULE>
1268 <RESULT COUNT 1>
1269 (?im)integer.+?value.+?expected
1270 <END_RESULT>
1271 <RESULT COUNT 1>
1272 (?im)float.+?value.+?expected
1273 <END_RESULT>
1274 <RESULT COUNT 2>
1275 (?is)\berror:
1276 <END_RESULT>
1277 <RESULT>
1278 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1279 <END_RESULT>
1280 <END_TC>
1281
1282 :exmp.
1283
1284 .*---------------------------------------------------------------------*
1285 :h3.Evaluated expression - greater then or equal operator
1286 .*---------------------------------------------------------------------*
1287 :xmp tab=0.
1288
1289 <TC - Evaluated expression - greater then or equal operator>
1290
1291 <COMPILE>
1292 <VERDICT_LEAF PASS>
1293 <MODULE TTCN Temp Temp.ttcn>
1294 module Temp {
1295
1296 function F() {
1297 var integer FaultyInt := 3.3 >= 3.3;
1298 var float FaultyFloat := 3.333 >= 3.33;
1299 }
1300
1301 }
1302 <END_MODULE>
1303 <RESULT COUNT 1>
1304 (?im)integer.+?value.+?expected
1305 <END_RESULT>
1306 <RESULT COUNT 1>
1307 (?im)float.+?value.+?expected
1308 <END_RESULT>
1309 <RESULT COUNT 2>
1310 (?is)\berror:
1311 <END_RESULT>
1312 <RESULT>
1313 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1314 <END_RESULT>
1315 <END_TC>
1316
1317 :exmp.
1318
1319 .*---------------------------------------------------------------------*
1320 :h3.Evaluated expression - logical not operator
1321 .*---------------------------------------------------------------------*
1322 :xmp tab=0.
1323
1324 <TC - Evaluated expression - logical not operator>
1325
1326 <COMPILE>
1327 <VERDICT_LEAF PASS>
1328 <MODULE TTCN Temp Temp.ttcn>
1329 module Temp {
1330
1331 function F() {
1332 var boolean Bool := false;
1333 var integer FaultyInt := not true;
1334 var bitstring FaultyBS := not Bool;
1335 }
1336
1337 }
1338 <END_MODULE>
1339 <RESULT COUNT 1>
1340 (?im)integer.+?value.+?expected
1341 <END_RESULT>
1342 <RESULT COUNT 1>
1343 (?im)bitstring.+?value.+?expected
1344 <END_RESULT>
1345 <RESULT COUNT 2>
1346 (?is)\berror:
1347 <END_RESULT>
1348 <RESULT>
1349 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1350 <END_RESULT>
1351 <END_TC>
1352
1353 :exmp.
1354
1355 .*---------------------------------------------------------------------*
1356 :h3.Evaluated expression - logical and operator
1357 .*---------------------------------------------------------------------*
1358 :xmp tab=0.
1359
1360 <TC - Evaluated expression - logical and operator>
1361
1362 <COMPILE>
1363 <VERDICT_LEAF PASS>
1364 <MODULE TTCN Temp Temp.ttcn>
1365 module Temp {
1366
1367 type record MyRecord { integer field1 }
1368
1369 function F() {
1370 var boolean Bool := false;
1371 var integer FaultyInt := Bool and true;
1372 var MyRecord myRec := true and true;
1373 }
1374
1375 }
1376 <END_MODULE>
1377 <RESULT COUNT 1>
1378 (?im)value.+?integer.+?expected.+?instead.+?boolean
1379 <END_RESULT>
1380 <RESULT COUNT 1>
1381 (?im)record.+?value.+?expected
1382 <END_RESULT>
1383 <RESULT COUNT 2>
1384 (?is)\berror:
1385 <END_RESULT>
1386 <RESULT>
1387 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1388 <END_RESULT>
1389 <END_TC>
1390
1391 :exmp.
1392
1393 .*---------------------------------------------------------------------*
1394 :h3.Evaluated expression - logical or operator
1395 .*---------------------------------------------------------------------*
1396 :xmp tab=0.
1397
1398 <TC - Evaluated expression - logical or operator>
1399
1400 <COMPILE>
1401 <VERDICT_LEAF PASS>
1402 <MODULE TTCN Temp Temp.ttcn>
1403 module Temp {
1404
1405 type record of boolean RecOfBool;
1406
1407 function F() {
1408 var boolean Bool := true;
1409 var integer FaultyInt := true or false;
1410 var RecOfBool FaultyRB := Bool or Bool;
1411 }
1412
1413 }
1414 <END_MODULE>
1415 <RESULT COUNT 1>
1416 (?im)integer.+?value.+?expected
1417 <END_RESULT>
1418 <RESULT COUNT 1>
1419 (?im)RecOfBool.+?value.+?expected
1420 <END_RESULT>
1421 <RESULT COUNT 2>
1422 (?is)\berror:
1423 <END_RESULT>
1424 <RESULT>
1425 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1426 <END_RESULT>
1427 <END_TC>
1428
1429 :exmp.
1430
1431 .*---------------------------------------------------------------------*
1432 :h3.Evaluated expression - logical xor operator
1433 .*---------------------------------------------------------------------*
1434 :xmp tab=0.
1435
1436 <TC - Evaluated expression - logical xor operator>
1437
1438 <COMPILE>
1439 <VERDICT_LEAF PASS>
1440 <MODULE TTCN Temp Temp.ttcn>
1441 module Temp {
1442
1443 function F() {
1444 var boolean Bool := false;
1445 var integer FaultyInt := true xor true;
1446 timer FaultyTimer := Bool xor true;
1447 }
1448
1449 }
1450 <END_MODULE>
1451 <RESULT COUNT 1>
1452 (?im)integer.+?value.+?expected
1453 <END_RESULT>
1454 <RESULT COUNT 1>
1455 (?im)float.+?expected
1456 <END_RESULT>
1457 <RESULT COUNT 2>
1458 (?is)\berror:
1459 <END_RESULT>
1460 <RESULT>
1461 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1462 <END_RESULT>
1463 <END_TC>
1464
1465 :exmp.
1466
1467 .*---------------------------------------------------------------------*
1468 :h3.Evaluated expression - bitwise not operator
1469 .*---------------------------------------------------------------------*
1470 :xmp tab=0.
1471
1472 <TC - Evaluated expression - bitwise not operator>
1473
1474 <COMPILE>
1475 <VERDICT_LEAF PASS>
1476 <MODULE TTCN Temp Temp.ttcn>
1477 module Temp {
1478
1479 function parF (in charstring Par) { }
1480
1481 function F() {
1482 var octetstring FaultyOS := not4b 'AA5'H;
1483 var integer FaultyInt := not4b '1100'B;
1484 parF(not4b '1'B);
1485 }
1486
1487 }
1488 <END_MODULE>
1489 <RESULT COUNT 1>
1490 (?im)octetstring.+?value.+?expected
1491 <END_RESULT>
1492 <RESULT COUNT 1>
1493 (?im)integer.+?value.+?expected
1494 <END_RESULT>
1495 <RESULT COUNT 1>
1496 (?im)character string.+?value.+?expected
1497 <END_RESULT>
1498 <RESULT COUNT 3>
1499 (?is)\berror:
1500 <END_RESULT>
1501 <RESULT>
1502 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1503 <END_RESULT>
1504 <END_TC>
1505
1506 :exmp.
1507
1508 .*---------------------------------------------------------------------*
1509 :h3.Evaluated expression - bitwise and operator
1510 .*---------------------------------------------------------------------*
1511 :xmp tab=0.
1512
1513 <TC - Evaluated expression - bitwise and operator>
1514
1515 <COMPILE>
1516 <VERDICT_LEAF PASS>
1517 <MODULE TTCN Temp Temp.ttcn>
1518 module Temp {
1519
1520 const integer cInt[3] := { 1, 2, 3 }
1521
1522 function F() {
1523 var integer FaultyInt1 := '5A2C'O and4b '73BC'O;
1524 timer FaultyTimer := '999'H and4b '111'H;
1525 var integer FaultyInt2 := cInt['10'B and4b '01'B];
1526 }
1527
1528 }
1529 <END_MODULE>
1530 <RESULT COUNT 2>
1531 (?im)integer.+?value.+?expected
1532 <END_RESULT>
1533 <RESULT COUNT 1>
1534 (?im)float.+?expected
1535 <END_RESULT>
1536 <RESULT COUNT 1>
1537 (?im)integer.+?value.+?expected.+?index
1538 <END_RESULT>
1539 <RESULT COUNT 3>
1540 (?is)\berror:
1541 <END_RESULT>
1542 <RESULT>
1543 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1544 <END_RESULT>
1545 <END_TC>
1546
1547 :exmp.
1548
1549 .*---------------------------------------------------------------------*
1550 :h3.Evaluated expression - bitwise or operator
1551 .*---------------------------------------------------------------------*
1552 :xmp tab=0.
1553
1554 <TC - Evaluated expression - bitwise or operator>
1555
1556 <COMPILE>
1557 <VERDICT_LEAF PASS>
1558 <MODULE TTCN Temp Temp.ttcn>
1559 module Temp {
1560
1561 function F() {
1562 var integer FaultyInt := '1111'B or4b '0101'B;
1563 var hexstring FaultyHS := '1234'O or4b '5678'O;
1564 setverdict('99'O or4b 'A5'O);
1565 }
1566
1567 }
1568 <END_MODULE>
1569 <RESULT COUNT 1>
1570 (?im)integer.+?value.+?expected
1571 <END_RESULT>
1572 <RESULT COUNT 1>
1573 (?im)hexstring.+?value.+?expected
1574 <END_RESULT>
1575 <RESULT COUNT 1>
1576 (?im)verdict.+?expected
1577 <END_RESULT>
1578 <RESULT COUNT 3>
1579 (?is)\berror:
1580 <END_RESULT>
1581 <RESULT>
1582 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1583 <END_RESULT>
1584 <END_TC>
1585
1586 :exmp.
1587
1588 .*---------------------------------------------------------------------*
1589 :h3.Evaluated expression - bitwise xor operator
1590 .*---------------------------------------------------------------------*
1591 :xmp tab=0.
1592
1593 <TC - Evaluated expression - bitwise xor operator>
1594
1595 <COMPILE>
1596 <VERDICT_LEAF PASS>
1597 <MODULE TTCN Temp Temp.ttcn>
1598 module Temp {
1599
1600 function F() {
1601 var integer FaultyInt := '0000'B xor4b '1000'B;
1602 var bitstring FaultyBS := '234'H xor4b '555'H;
1603 while('7'H xor4b '5'H) { }
1604 }
1605
1606 }
1607 <END_MODULE>
1608 <RESULT COUNT 1>
1609 (?im)integer.+?value.+?expected
1610 <END_RESULT>
1611 <RESULT COUNT 1>
1612 (?im)bitstring.+?value.+?expected
1613 <END_RESULT>
1614 <RESULT COUNT 1>
1615 (?im)boolean.+?expected
1616 <END_RESULT>
1617 <RESULT COUNT 3>
1618 (?is)\berror:
1619 <END_RESULT>
1620 <RESULT>
1621 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1622 <END_RESULT>
1623 <END_TC>
1624
1625 :exmp.
1626
1627 .*---------------------------------------------------------------------*
1628 :h3.Evaluated expression - shift operator
1629 .*---------------------------------------------------------------------*
1630 :xmp tab=0.
1631
1632 <TC - Evaluated expression - shift operator>
1633
1634 <COMPILE>
1635 <VERDICT_LEAF PASS>
1636 <MODULE TTCN Temp Temp.ttcn>
1637 module Temp {
1638
1639 function F() {
1640 var integer FaultyInt := '1010'B << 1;
1641 var bitstring FaultyBS := '234'H >> 2;
1642 for(var integer C:=0; '1100'B << 2; C:=C+1) { }
1643 }
1644
1645 }
1646 <END_MODULE>
1647 <RESULT COUNT 1>
1648 (?im)integer.+?value.+?expected
1649 <END_RESULT>
1650 <RESULT COUNT 1>
1651 (?im)bitstring.+?value.+?expected
1652 <END_RESULT>
1653 <RESULT COUNT 1>
1654 (?im)boolean.+?expected
1655 <END_RESULT>
1656 <RESULT COUNT 3>
1657 (?is)\berror:
1658 <END_RESULT>
1659 <RESULT>
1660 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1661 <END_RESULT>
1662 <END_TC>
1663
1664 :exmp.
1665
1666 .*---------------------------------------------------------------------*
1667 :h3.Evaluated expression - rotate operator
1668 .*---------------------------------------------------------------------*
1669 :xmp tab=0.
1670
1671 <TC - Evaluated expression - rotate operator>
1672
1673 <COMPILE>
1674 <VERDICT_LEAF PASS>
1675 <MODULE TTCN Temp Temp.ttcn>
1676 module Temp {
1677
1678 function F() {
1679 var integer FaultyInt := '1010'B <@ 1;
1680 var bitstring FaultyBS := '234'H @> 2;
1681 timer FaultyTimer := "abc" <@ 3;
1682 do { } while("xyz" @> 1);
1683 }
1684
1685 }
1686 <END_MODULE>
1687 <RESULT COUNT 1>
1688 (?im)integer.+?value.+?expected
1689 <END_RESULT>
1690 <RESULT COUNT 1>
1691 (?im)bitstring.+?value.+?expected
1692 <END_RESULT>
1693 <RESULT COUNT 1>
1694 (?im)float.+?expected
1695 <END_RESULT>
1696 <RESULT COUNT 1>
1697 (?im)boolean.+?expected
1698 <END_RESULT>
1699 <RESULT COUNT 4>
1700 (?is)\berror:
1701 <END_RESULT>
1702 <RESULT>
1703 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1704 <END_RESULT>
1705 <END_TC>
1706
1707 :exmp.
1708
1709
1710 .*---------------------------------------------------------------------*
1711 :h3.Assignment of arrays with different indices
1712 .*---------------------------------------------------------------------*
1713
1714 .*---------------------------------------------------------------------*
1715 :h4. Assignment of arrays with different indices - array range 2
1716 .*---------------------------------------------------------------------*
1717 :xmp tab=0.
1718
1719 <TC - Assignment of arrays with different indices - array range 2>
1720
1721 <COMPILE>
1722 <VERDICT_LEAF PASS>
1723 <MODULE TTCN Temp Temp.ttcn>
1724 module Temp {
1725
1726 const integer i1[0 .. 2] := {1, 2, 3};
1727 const integer i2[3] := i1;
1728 const integer i3[0..2]:=i1;
1729
1730 const integer i4[9..11] := {1,2,3};
1731 const integer i5[9..11] := i4;
1732 }
1733 <END_MODULE>
1734 <RESULT IF_PASS NEGATIVE>
1735 (?is)\berror:
1736 <END_RESULT>
1737 <END_TC>
1738
1739 :exmp.
1740
1741 .*---------------------------------------------------------------------*
1742 :h4. Assignment of arrays with different indices - array of array range 2
1743 .*---------------------------------------------------------------------*
1744 :xmp tab=0.
1745
1746 <TC - Assignment of arrays with different indices - array of array range 2>
1747
1748 <COMPILE>
1749 <VERDICT_LEAF PASS>
1750 <MODULE TTCN Temp Temp.ttcn>
1751 module Temp {
1752
1753 const integer i1[2][0 .. 2] := {{1, 2, 3},{4,5,6}};
1754 const integer i2[2][3] := i1;
1755 const integer i3[2][0..2]:=i1;
1756
1757 const integer i4[3][9..11] := {{1,2,3},{4,5,6},{7,8,9}};
1758 const integer i5[3][9..11] := i4;
1759 }
1760 <END_MODULE>
1761 <RESULT IF_PASS NEGATIVE>
1762 (?is)\berror:
1763 <END_RESULT>
1764 <END_TC>
1765
1766 :exmp.
1767
1768 .*---------------------------------------------------------------------*
1769 :h3.Type compatibility of non-structured types
1770 .*---------------------------------------------------------------------*
1771
1772 .*---------------------------------------------------------------------*
1773 :h4. Type compatibility of non-structured types - integer
1774 .*---------------------------------------------------------------------*
1775 :xmp tab=0.
1776
1777 <TC - Type compatibility of non-structured types - integer>
1778
1779 <COMPILE>
1780 <MODULE TTCN Temp Temp.ttcn>
1781 module Temp {
1782
1783
1784 type integer itype1 (0 .. infinity)
1785 type integer itype2 (-infinity .. 0)
1786 type integer itype3 (1,2,4,5, 8 .. 10)
1787 type integer itype4 (6 .. 7)
1788
1789 const integer i1 := -5;
1790 const itype1 i2 := i1;
1791
1792 const integer i3 := 5;
1793 const itype2 i4 := i3;
1794
1795 const integer i5 := 6;
1796 const itype3 i6 := i5;
1797
1798 const itype3 i7 := 5;
1799 const itype4 i8 := i7;
1800
1801 }
1802 <END_MODULE>
1803 <RESULT COUNT 3>
1804 (?im)not.+?valid.+?value.+?for.+?subtype
1805 <END_RESULT>
1806 <RESULT COUNT 1>
1807 (?is)\berror: Subtype mismatch: subtype \(6..7\) has no common value with subtype \(1..2,4..5,8..10\)
1808 <END_RESULT>
1809 <RESULT COUNT 4>
1810 (?is)\berror:
1811 <END_RESULT>
1812 <RESULT>
1813 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1814 <END_RESULT>
1815 <END_TC>
1816
1817 :exmp.
1818
1819 .*---------------------------------------------------------------------*
1820 :h4. Type compatibility of non-structured types - float
1821 .*---------------------------------------------------------------------*
1822 :xmp tab=0.
1823
1824 <TC - Type compatibility of non-structured types - float>
1825
1826 <COMPILE>
1827 <MODULE TTCN Temp Temp.ttcn>
1828 module Temp {
1829
1830
1831 type float ftype1 (0.0 .. infinity)
1832 type float ftype2 (-infinity .. 0.0)
1833 type float ftype3 (1.0, 2E0, 4.1E-1, 8.0 .. 10.0)
1834 type float ftype4 (6.0 .. 7.0)
1835
1836 const float f1 := -5.0;
1837 const ftype1 f2 := f1;
1838
1839 const float f3 := 5.0;
1840 const ftype2 f4 := f3;
1841
1842 const float f5 := 6.0;
1843 const ftype3 f6 := f5;
1844
1845 const ftype3 f7 := 4.1E-1;
1846 const ftype4 f8 := f7;
1847
1848 }
1849 <END_MODULE>
1850 <RESULT COUNT 3>
1851 (?im)not.+?valid.+?value.+?for.+?subtype
1852 <END_RESULT>
1853 <RESULT COUNT 1>
1854 (?is)\berror: Subtype mismatch: subtype \(6(\.0)?e0\.\.7(\.0)?e0\) has no common value with subtype \(4\.1e-1,1(\.0)?e0,2(\.0)?e0,8.0e0\.\.1(\.0)?e1\)
1855 <END_RESULT>
1856 <RESULT COUNT 4>
1857 (?is)\berror:
1858 <END_RESULT>
1859 <RESULT>
1860 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1861 <END_RESULT>
1862 <END_TC>
1863
1864 :exmp.
1865
1866 .*---------------------------------------------------------------------*
1867 :h4. Type compatibility of non-structured types - char
1868 .*---------------------------------------------------------------------*
1869 :xmp tab=0.
1870
1871 <TC - Type compatibility of non-structured types - char>
1872
1873 <COMPILE>
1874 <MODULE TTCN Temp Temp.ttcn>
1875 module Temp {
1876
1877
1878 type char ctype1 ("b", "d", "f", "h")
1879 type char ctype2 ("B", "D", "F", "H")
1880
1881 const char c1 := "a";
1882 const ctype1 c2 := c1;
1883
1884 const char c3 := "A";
1885 const ctype1 c4 := c3;
1886
1887 }
1888 <END_MODULE>
1889 <RESULT COUNT 2>
1890 (?im)not.+?valid.+?value.+?for.+?subtype
1891 <END_RESULT>
1892 <RESULT COUNT 2>
1893 (?is)\berror:
1894 <END_RESULT>
1895 <RESULT>
1896 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1897 <END_RESULT>
1898 <END_TC>
1899
1900 :exmp.
1901
1902 .*---------------------------------------------------------------------*
1903 :h4. Type compatibility of non-structured types - charstring
1904 .*---------------------------------------------------------------------*
1905 :xmp tab=0.
1906
1907 <TC - Type compatibility of non-structured types - charstring>
1908
1909 <COMPILE>
1910 <MODULE TTCN Temp Temp.ttcn>
1911 module Temp {
1912
1913
1914 type charstring ctype1 ("b", "d", "f")
1915 type charstring ctype2 ("B", "D", "F")
1916
1917 const charstring c1 := "a";
1918 const ctype1 c2 := c1;
1919
1920 const charstring c3 := "A";
1921 const ctype2 c4 := c3;
1922
1923 const ctype1 c5 := "f"
1924 const ctype2 c6 := c5;
1925
1926 }
1927 <END_MODULE>
1928 <RESULT COUNT 3>
1929 (?im)not.+?valid.+?value.+?for.+?subtype
1930 <END_RESULT>
1931 <RESULT COUNT 3>
1932 (?is)\berror:
1933 <END_RESULT>
1934 <RESULT>
1935 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1936 <END_RESULT>
1937 <END_TC>
1938
1939 :exmp.
1940
1941 .*---------------------------------------------------------------------*
1942 :h4. Type compatibility of non-structured types - boolean
1943 .*---------------------------------------------------------------------*
1944 :xmp tab=0.
1945
1946 <TC - Type compatibility of non-structured types - boolean>
1947
1948 <COMPILE>
1949 <MODULE TTCN Temp Temp.ttcn>
1950 module Temp {
1951
1952
1953 type boolean btype1 (true)
1954 type boolean btype2 (false)
1955
1956 const boolean b1 := false;
1957 const btype1 b2 := b1;
1958
1959 const boolean b3 := true;
1960 const btype2 b4 := b3;
1961
1962 const btype1 b5 := true;
1963 const btype2 b6 := b5;
1964
1965 }
1966 <END_MODULE>
1967 <RESULT COUNT 2>
1968 (?im)not.+?valid.+?value.+?for.+?subtype
1969 <END_RESULT>
1970 <RESULT COUNT 1>
1971 (?is)\berror: Subtype mismatch: subtype \(false\) has no common value with subtype \(true\)
1972 <END_RESULT>
1973 <RESULT COUNT 3>
1974 (?is)\berror:
1975 <END_RESULT>
1976 <RESULT>
1977 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
1978 <END_RESULT>
1979 <END_TC>
1980
1981 :exmp.
1982
1983 .*---------------------------------------------------------------------*
1984 :h4. Type compatibility of non-structured types - bitstring
1985 .*---------------------------------------------------------------------*
1986 :xmp tab=0.
1987
1988 <TC - Type compatibility of non-structured types - bitstring>
1989
1990 <COMPILE>
1991 <MODULE TTCN Temp Temp.ttcn>
1992 module Temp {
1993
1994
1995 type bitstring btype1 ('00'B,'01'B,'10'B)
1996 type bitstring btype2 length(3)
1997 type bitstring btype3 ('000111'B)
1998 type bitstring btype4 length(3 ..5)
1999
2000 const bitstring b1 := '11'B
2001 const btype1 b2 := b1
2002
2003 const bitstring b3 := '1101'B
2004 const btype2 b4 := b3
2005
2006 const btype1 b5 := '01'B
2007 const btype2 b6 := b5
2008
2009 const btype3 b7 := '000111'B
2010 const btype1 b8 := b7
2011 const btype2 b9 := b7
2012 const btype4 b10 := b7
2013
2014
2015 }
2016 <END_MODULE>
2017 <RESULT COUNT 1>
2018 (?is)\berror: '11'B is not a valid value for type `bitstring' which has subtype length\(2\) except \('11'B\)
2019 <END_RESULT>
2020 <RESULT COUNT 1>
2021 (?is)\berror: '1101'B is not a valid value for type `bitstring' which has subtype length\(3\)
2022 <END_RESULT>
2023 <RESULT COUNT 1>
2024 (?is)\berror: Subtype mismatch: subtype length\(3\) has no common value with subtype length\(2\) except \('11'B\)
2025 <END_RESULT>
2026 <RESULT COUNT 3>
2027 (?im)error:.+?has no common value with subtype \('000111'B\)
2028 <END_RESULT>
2029 <RESULT COUNT 6>
2030 (?is)\berror:
2031 <END_RESULT>
2032 <RESULT>
2033 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2034 <END_RESULT>
2035 <END_TC>
2036
2037 :exmp.
2038
2039 .*---------------------------------------------------------------------*
2040 :h4. Type compatibility of non-structured types - hexstring
2041 .*---------------------------------------------------------------------*
2042 :xmp tab=0.
2043
2044 <TC - Type compatibility of non-structured types - hexstring>
2045
2046 <COMPILE>
2047 <MODULE TTCN Temp Temp.ttcn>
2048 module Temp {
2049
2050
2051 type hexstring htype1 ('00'H,'01'H,'10'H)
2052 type hexstring htype2 length(3)
2053 type hexstring htype3 ('000111'H)
2054 type hexstring htype4 length(3 ..5)
2055
2056 const hexstring h1 := '11'H
2057 const htype1 h2 := h1
2058
2059 const hexstring h3 := '1101'H
2060 const htype2 h4 := h3
2061
2062 const htype1 h5 := '01'H
2063 const htype2 h6 := h5
2064
2065 const htype3 h7 := '000111'H
2066 const htype1 h8 := h7
2067 const htype2 h9 := h7
2068 const htype4 h10 := h7
2069
2070
2071 }
2072 <END_MODULE>
2073 <RESULT COUNT 1>
2074 (?is)\berror: '11'H is not a valid value for type `hexstring' which has subtype \('00'H,'01'H,'10'H\)
2075 <END_RESULT>
2076 <RESULT COUNT 1>
2077 (?is)\berror: '1101'H is not a valid value for type `hexstring' which has subtype length\(3\)
2078 <END_RESULT>
2079 <RESULT COUNT 1>
2080 (?is)\berror: Subtype mismatch: subtype length\(3\) has no common value with subtype \('00'H,'01'H,'10'H\)
2081 <END_RESULT>
2082 <RESULT COUNT 3>
2083 (?im)error:.+?has no common value with subtype \('000111'H\)
2084 <END_RESULT>
2085 <RESULT COUNT 6>
2086 (?is)\berror:
2087 <END_RESULT>
2088 <RESULT>
2089 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2090 <END_RESULT>
2091 <END_TC>
2092
2093 :exmp.
2094
2095 .*---------------------------------------------------------------------*
2096 :h4. Type compatibility of non-structured types - octetstring
2097 .*---------------------------------------------------------------------*
2098 :xmp tab=0.
2099
2100 <TC - Type compatibility of non-structured types - octetstring>
2101
2102 <COMPILE>
2103 <MODULE TTCN Temp Temp.ttcn>
2104 module Temp {
2105
2106
2107 type octetstring otype1 ('00'O,'01'O,'10'O)
2108 type octetstring otype2 length(3)
2109 type octetstring otype3 ('000000111111'O)
2110 type octetstring otype4 length(3 ..5)
2111
2112 const octetstring o1 := '11'O
2113 const otype1 o2 := o1
2114
2115 const octetstring o3 := '1101'O
2116 const otype2 o4 := o3
2117
2118 const otype1 o5 := '01'O
2119 const otype2 o6 := o5
2120
2121 const otype3 o7 := '000000111111'O
2122 const otype1 o8 := o7
2123 const otype2 o9 := o7
2124 const otype4 o10 := o7
2125
2126
2127 }
2128 <END_MODULE>
2129 <RESULT COUNT 1>
2130 (?is)\berror: '11'O is not a valid value for type `octetstring' which has subtype \('00'O,'01'O,'10'O\)
2131 <END_RESULT>
2132 <RESULT COUNT 1>
2133 (?is)\berror: '1101'O is not a valid value for type `octetstring' which has subtype length\(3\)
2134 <END_RESULT>
2135 <RESULT COUNT 1>
2136 (?is)\berror: Subtype mismatch: subtype length\(3\) has no common value with subtype \('00'O,'01'O,'10'O\)
2137 <END_RESULT>
2138 <RESULT COUNT 3>
2139 (?im)error:.+?has no common value with subtype \('000000111111'O\)
2140 <END_RESULT>
2141 <RESULT COUNT 6>
2142 (?is)\berror:
2143 <END_RESULT>
2144 <RESULT>
2145 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2146 <END_RESULT>
2147 <END_TC>
2148
2149 :exmp.
2150 .*---------------------------------------------------------------------*
2151 :h3. Non-float initialiser
2152 .*---------------------------------------------------------------------*
2153 .*---------------------------------------------------------------------*
2154 :h3. Template type mismatch in modified template
2155 .*---------------------------------------------------------------------*
2156
2157 .*---------------------------------------------------------------------*
2158 :h4. Template type mismatch in modified template - set of, enum
2159 .*---------------------------------------------------------------------*
2160 :xmp tab=0.
2161
2162 <TC - Template type mismatch in modified template - set of, enum>
2163
2164 <COMPILE>
2165 <MODULE TTCN Temp Temp.ttcn>
2166 module Temp {
2167
2168
2169 type set of charstring stype;
2170 type enumerated etype {a, b, c}
2171
2172 template stype t := {"a","b"};
2173 template etype t1 modifies t := a;
2174
2175
2176 }
2177 <END_MODULE>
2178 <RESULT COUNT 1>
2179 (?im)modified.+?template.+?has.+?different.+?type.+?than.+?base.+?template
2180 <END_RESULT>
2181 <RESULT COUNT 1>
2182 (?is)\berror:
2183 <END_RESULT>
2184 <RESULT>
2185 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2186 <END_RESULT>
2187 <END_TC>
2188
2189 :exmp.
2190
2191 .*---------------------------------------------------------------------*
2192 :h4. Template type mismatch in modified template - enum, integer
2193 .*---------------------------------------------------------------------*
2194 :xmp tab=0.
2195
2196 <TC - Template type mismatch in modified template - enum, integer>
2197
2198 <COMPILE>
2199 <MODULE TTCN Temp Temp.ttcn>
2200 module Temp {
2201
2202
2203 type enumerated etype {a, b, c}
2204
2205 template etype t := a;
2206 template integer t1 modifies t := 2;
2207
2208
2209 }
2210 <END_MODULE>
2211 <RESULT COUNT 1>
2212 (?im)modified.+?template.+?has.+?different.+?type.+?than.+?base.+?template
2213 <END_RESULT>
2214 <RESULT COUNT 1>
2215 (?is)\berror:
2216 <END_RESULT>
2217 <RESULT>
2218 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2219 <END_RESULT>
2220 <END_TC>
2221
2222 :exmp.
2223
2224 .*---------------------------------------------------------------------*
2225 :h4. Template type mismatch in modified template - float, integer
2226 .*---------------------------------------------------------------------*
2227 :xmp tab=0.
2228
2229 <TC - Template type mismatch in modified template - float, integer>
2230
2231 <COMPILE>
2232 <MODULE TTCN Temp Temp.ttcn>
2233 module Temp {
2234
2235
2236 template integer t := 4;
2237 template float t1 modifies t := 4.0;
2238
2239
2240 }
2241 <END_MODULE>
2242 <RESULT COUNT 1>
2243 (?im)modified.+?template.+?has.+?different.+?type.+?than.+?base.+?template
2244 <END_RESULT>
2245 <RESULT COUNT 1>
2246 (?is)\berror:
2247 <END_RESULT>
2248 <RESULT>
2249 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2250 <END_RESULT>
2251 <END_TC>
2252
2253 :exmp.
2254
2255 .*---------------------------------------------------------------------*
2256 :h4. Template type mismatch in modified template - octetstring, hexstring
2257 .*---------------------------------------------------------------------*
2258 :xmp tab=0.
2259
2260 <TC - Template type mismatch in modified template - octetstring, hexstring>
2261
2262 <COMPILE>
2263 <MODULE TTCN Temp Temp.ttcn>
2264 module Temp {
2265
2266
2267 template octetstring t := '1A'O;
2268 template hexstring t1 modifies t := '1A'H;
2269
2270
2271 }
2272 <END_MODULE>
2273 <RESULT COUNT 1>
2274 (?im)modified.+?template.+?has.+?different.+?type.+?than.+?base.+?template
2275 <END_RESULT>
2276 <RESULT COUNT 1>
2277 (?is)\berror:
2278 <END_RESULT>
2279 <RESULT>
2280 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2281 <END_RESULT>
2282 <END_TC>
2283
2284 :exmp.
2285
2286 .*---------------------------------------------------------------------*
2287 :h4. Template type mismatch in modified template - bitstring, boolean
2288 .*---------------------------------------------------------------------*
2289 :xmp tab=0.
2290
2291 <TC - Template type mismatch in modified template - bitstring, boolean>
2292
2293 <COMPILE>
2294 <MODULE TTCN Temp Temp.ttcn>
2295 module Temp {
2296
2297
2298 template bitstring t := '1'B;
2299 template boolean t1 modifies t := false;
2300
2301
2302 }
2303 <END_MODULE>
2304 <RESULT COUNT 1>
2305 (?im)modified.+?template.+?has.+?different.+?type.+?than.+?base.+?template
2306 <END_RESULT>
2307 <RESULT COUNT 1>
2308 (?is)\berror:
2309 <END_RESULT>
2310 <RESULT>
2311 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2312 <END_RESULT>
2313 <END_TC>
2314
2315 :exmp.
2316 .*---------------------------------------------------------------------*
2317 :h3. Incompatible types in 'match'
2318 .*---------------------------------------------------------------------*
2319
2320 .*---------------------------------------------------------------------*
2321 :h3. Inapplicable operator
2322 .*---------------------------------------------------------------------*
2323
2324 .*---------------------------------------------------------------------*
2325 :h4. Inapplicable operator - concatenation on integer constant
2326 .*---------------------------------------------------------------------*
2327 :xmp tab=0.
2328
2329 <TC - Inapplicable operator - concatenation on integer constant>
2330
2331 <COMPILE>
2332 <MODULE TTCN Temp Temp.ttcn>
2333 module Temp {
2334
2335
2336 const integer i1 := 1 & 2
2337
2338 }
2339 <END_MODULE>
2340 <RESULT COUNT 2>
2341 (?im)operand.+?should.+?be.+?string.+?value
2342 <END_RESULT>
2343 <RESULT COUNT 2>
2344 (?is)\berror:
2345 <END_RESULT>
2346 <RESULT>
2347 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2348 <END_RESULT>
2349 <END_TC>
2350
2351 :exmp.
2352
2353 .*---------------------------------------------------------------------*
2354 :h4. Inapplicable operator - logical operators on integer constant
2355 .*---------------------------------------------------------------------*
2356 :xmp tab=0.
2357
2358 <TC - Inapplicable operator - logical operators on integer constant>
2359
2360 <COMPILE>
2361 <MODULE TTCN Temp Temp.ttcn>
2362 module Temp {
2363
2364
2365 const integer i1 := not 1
2366 const integer i2 := 1 and 2
2367 const integer i3 := 1 or 2
2368 const integer i4 := 1 xor 2
2369
2370 }
2371 <END_MODULE>
2372 <RESULT COUNT 7>
2373 (?im)operand.+?should.+?be.+?boolean.+?value
2374 <END_RESULT>
2375 <RESULT COUNT 7>
2376 (?is)\berror:
2377 <END_RESULT>
2378 <RESULT>
2379 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2380 <END_RESULT>
2381 <END_TC>
2382
2383 :exmp.
2384
2385 .*---------------------------------------------------------------------*
2386 :h4. Inapplicable operator - bitwise operators on integer constant
2387 .*---------------------------------------------------------------------*
2388 :xmp tab=0.
2389
2390 <TC - Inapplicable operator - bitwise operators on integer constant>
2391
2392 <COMPILE>
2393 <MODULE TTCN Temp Temp.ttcn>
2394 module Temp {
2395
2396
2397 const integer i1 := not4b 1
2398 const integer i2 := 1 and4b 2
2399 const integer i3 := 1 or4b 2
2400 const integer i4 := 1 xor4b 2
2401
2402
2403 }
2404 <END_MODULE>
2405 <RESULT COUNT 7>
2406 (?im)operand.+?should.+?be.+?binary.+?string.+?value
2407 <END_RESULT>
2408 <RESULT COUNT 7>
2409 (?is)\berror:
2410 <END_RESULT>
2411 <RESULT>
2412 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2413 <END_RESULT>
2414 <END_RESULT>
2415 <END_TC>
2416
2417 :exmp.
2418
2419 .*---------------------------------------------------------------------*
2420 :h4. Inapplicable operator - shift operators on integer constant
2421 .*---------------------------------------------------------------------*
2422 :xmp tab=0.
2423
2424 <TC - Inapplicable operator - shift operators on integer constant>
2425
2426 <COMPILE>
2427 <MODULE TTCN Temp Temp.ttcn>
2428 module Temp {
2429
2430
2431 const integer i1 := 1 << 1
2432 const integer i2 := 1 >> 1
2433 const integer i3 := 1 << -1
2434 const integer i4 := 1 >> -1
2435
2436
2437 }
2438 <END_MODULE>
2439 <RESULT COUNT 4>
2440 (?im)operand.+?should.+?be.+?binary.+?string.+?value
2441 <END_RESULT>
2442 <RESULT COUNT 4>
2443 (?is)\berror:
2444 <END_RESULT>
2445 <RESULT>
2446 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2447 <END_RESULT>
2448 <END_TC>
2449
2450 :exmp.
2451
2452 .*---------------------------------------------------------------------*
2453 :h4. Inapplicable operator - rotate operators on integer constant
2454 .*---------------------------------------------------------------------*
2455 :xmp tab=0.
2456
2457 <TC - Inapplicable operator - rotate operators on integer constant>
2458
2459 <COMPILE>
2460 <MODULE TTCN Temp Temp.ttcn>
2461 module Temp {
2462
2463
2464 const integer i1 := 1 <@ 1
2465 const integer i2 := 1 @> 1
2466 const integer i3 := 1 <@ -1
2467 const integer i4 := 1 @> -1
2468
2469
2470 }
2471 <END_MODULE>
2472 <RESULT COUNT 4>
2473 (?im)operand.+?should.+?be.+?string.+?value
2474 <END_RESULT>
2475 <RESULT COUNT 4>
2476 (?is)\berror:
2477 <END_RESULT>
2478 <RESULT>
2479 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2480 <END_RESULT>
2481 <END_TC>
2482
2483 :exmp.
2484
2485 .*---------------------------------------------------------------------*
2486 :h4. Inapplicable operator - concatenation on float constant
2487 .*---------------------------------------------------------------------*
2488 :xmp tab=0.
2489
2490 <TC - Inapplicable operator - concatenation on float constant>
2491
2492 <COMPILE>
2493 <MODULE TTCN Temp Temp.ttcn>
2494 module Temp {
2495
2496
2497 const float f1 := 1.0 & 2E-1
2498
2499 }
2500 <END_MODULE>
2501 <RESULT COUNT 2>
2502 (?im)operand.+?should.+?be.+?string.+?value
2503 <END_RESULT>
2504 <RESULT COUNT 2>
2505 (?is)\berror:
2506 <END_RESULT>
2507 <RESULT>
2508 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2509 <END_RESULT>
2510 <END_TC>
2511
2512 :exmp.
2513
2514 .*---------------------------------------------------------------------*
2515 :h4. Inapplicable operator - logical operators on float constant
2516 .*---------------------------------------------------------------------*
2517 :xmp tab=0.
2518
2519 <TC - Inapplicable operator - logical operators on float constant>
2520
2521 <COMPILE>
2522 <MODULE TTCN Temp Temp.ttcn>
2523 module Temp {
2524
2525
2526 const float f1 := not 1.0
2527 const float f2 := 1.0 and 2E-1
2528 const float f3 := 1.0 or 2E-1
2529 const float f4 := 1.0 xor 2E-1
2530
2531 }
2532 <END_MODULE>
2533 <RESULT COUNT 7>
2534 (?im)operand.+?should.+?be.+?boolean.+?value
2535 <END_RESULT>
2536 <RESULT COUNT 7>
2537 (?is)\berror:
2538 <END_RESULT>
2539 <RESULT>
2540 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2541 <END_RESULT>
2542 <END_TC>
2543
2544 :exmp.
2545
2546 .*---------------------------------------------------------------------*
2547 :h4. Inapplicable operator - bitwise operators on float constant
2548 .*---------------------------------------------------------------------*
2549 :xmp tab=0.
2550
2551 <TC - Inapplicable operator - bitwise operators on float constant>
2552
2553 <COMPILE>
2554 <MODULE TTCN Temp Temp.ttcn>
2555 module Temp {
2556
2557
2558 const float f1 := not4b 1.0
2559 const float f2 := 1.0 and4b 2E-1
2560 const float f3 := 1.0 or4b 2E-1
2561 const float f4 := 1.0 xor4b 2E-1
2562
2563
2564 }
2565 <END_MODULE>
2566 <RESULT COUNT 7>
2567 (?im)operand.+?should.+?be.+?binary.+?string.+?value
2568 <END_RESULT>
2569 <RESULT COUNT 7>
2570 (?is)\berror:
2571 <END_RESULT>
2572 <RESULT>
2573 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2574 <END_RESULT>
2575 <END_TC>
2576
2577 :exmp.
2578
2579 .*---------------------------------------------------------------------*
2580 :h4. Inapplicable operator - shift operators on float constant
2581 .*---------------------------------------------------------------------*
2582 :xmp tab=0.
2583
2584 <TC - Inapplicable operator - shift operators on float constant>
2585
2586 <COMPILE>
2587 <MODULE TTCN Temp Temp.ttcn>
2588 module Temp {
2589
2590
2591 const float f1 := 1.0 << 1
2592 const float f2 := 1.0 >> 1
2593 const float f3 := 1 << 1.0
2594 const float f4 := 1 >> 1.0
2595
2596
2597 }
2598 <END_MODULE>
2599 <RESULT COUNT 4>
2600 (?im)Left.+?operand.+?should.+?be.+?binary.+?string.+?value
2601 <END_RESULT>
2602 <RESULT COUNT 2>
2603 (?im)Right.+?operand.+?should.+?be.+?integer.+?value
2604 <END_RESULT>
2605 <RESULT COUNT 6>
2606 (?is)\berror:
2607 <END_RESULT>
2608 <RESULT>
2609 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2610 <END_RESULT>
2611 <END_TC>
2612
2613 :exmp.
2614
2615 .*---------------------------------------------------------------------*
2616 :h4. Inapplicable operator - rotate operators on float constant
2617 .*---------------------------------------------------------------------*
2618 :xmp tab=0.
2619
2620 <TC - Inapplicable operator - rotate operators on float constant>
2621
2622 <COMPILE>
2623 <MODULE TTCN Temp Temp.ttcn>
2624 module Temp {
2625
2626
2627 const float f1 := 1.0 <@ 1
2628 const float f2 := 1.0 @> 1
2629 const float f3 := 1 <@ 1.0
2630 const float f4 := 1 @> 1.0
2631
2632
2633 }
2634 <END_MODULE>
2635 <RESULT COUNT 4>
2636 (?im)Left.+?operand.+?should.+?be.+?string.+?value
2637 <END_RESULT>
2638 <RESULT COUNT 2>
2639 (?im)Right.+?operand.+?should.+?be.+?integer.+?value
2640 <END_RESULT>
2641 <RESULT COUNT 6>
2642 (?is)\berror:
2643 <END_RESULT>
2644 <RESULT>
2645 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2646 <END_RESULT>
2647 <END_TC>
2648
2649 :exmp.
2650
2651 .*---------------------------------------------------------------------*
2652 :h4. Inapplicable operator - arithmetic operators on boolean constant
2653 .*---------------------------------------------------------------------*
2654 :xmp tab=0.
2655
2656 <TC - Inapplicable operator - arithmetic operators on boolean constant>
2657
2658 <COMPILE>
2659 <MODULE TTCN Temp Temp.ttcn>
2660 module Temp {
2661
2662
2663 const boolean b1 := true
2664 const boolean b2 := false
2665
2666 const boolean b3 := b1 + b2
2667 const boolean b4 := b1 - b2
2668 const boolean b5 := b1 * b2
2669 const boolean b6 := b1 / b2
2670 const boolean b7 := b1 mod b2
2671 const boolean b8 := b1 rem b2
2672
2673 }
2674 <END_MODULE>
2675 <RESULT COUNT 8>
2676 (?im)operand.+?should.+?be.+?integer.+?or.+?float.+?value
2677 <END_RESULT>
2678 <RESULT COUNT 4>
2679 (?im)operand.+?should.+?be.+?integer value
2680 <END_RESULT>
2681 <RESULT COUNT 12>
2682 (?is)\berror:
2683 <END_RESULT>
2684 <RESULT>
2685 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2686 <END_RESULT>
2687 <END_TC>
2688
2689 :exmp.
2690
2691 .*---------------------------------------------------------------------*
2692 :h4. Inapplicable operator - concatenation on boolean constant
2693 .*---------------------------------------------------------------------*
2694 :xmp tab=0.
2695
2696 <TC - Inapplicable operator - concatenation on boolean constant>
2697
2698 <COMPILE>
2699 <MODULE TTCN Temp Temp.ttcn>
2700 module Temp {
2701
2702
2703 const boolean b1 := true & false
2704
2705 }
2706 <END_MODULE>
2707 <RESULT COUNT 2>
2708 (?im)operand.+?should.+?be.+?string.+?value
2709 <END_RESULT>
2710 <RESULT COUNT 2>
2711 (?is)\berror:
2712 <END_RESULT>
2713 <RESULT>
2714 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2715 <END_RESULT>
2716 <END_TC>
2717
2718 :exmp.
2719
2720 .*---------------------------------------------------------------------*
2721 :h4. Inapplicable operator - bitwise operators on boolean constant
2722 .*---------------------------------------------------------------------*
2723 :xmp tab=0.
2724
2725 <TC - Inapplicable operator - bitwise operators on boolean constant>
2726
2727 <COMPILE>
2728 <MODULE TTCN Temp Temp.ttcn>
2729 module Temp {
2730
2731
2732 const boolean b1 := true
2733 const boolean b2 := false
2734
2735
2736 const boolean b3 := not4b b1
2737 const boolean b4 := b1 and4b b2
2738 const boolean b5 := b1 or4b b2
2739 const boolean b6 := b1 xor4b b2
2740
2741 }
2742 <END_MODULE>
2743 <RESULT COUNT 7>
2744 (?im)operand.+?should.+?be.+?binary.+?string.+?value
2745 <END_RESULT>
2746 <RESULT COUNT 7>
2747 (?is)\berror:
2748 <END_RESULT>
2749 <RESULT>
2750 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2751 <END_RESULT>
2752 <END_TC>
2753
2754 :exmp.
2755
2756 .*---------------------------------------------------------------------*
2757 :h4. Inapplicable operator - shift operators on boolean constant
2758 .*---------------------------------------------------------------------*
2759 :xmp tab=0.
2760
2761 <TC - Inapplicable operator - shift operators on boolean constant>
2762
2763 <COMPILE>
2764 <MODULE TTCN Temp Temp.ttcn>
2765 module Temp {
2766
2767
2768 const boolean b1 := true
2769
2770 const boolean b2 := b1 << 1
2771 const boolean b3 := b1 >> 1
2772
2773 }
2774 <END_MODULE>
2775 <RESULT COUNT 2>
2776 (?im)operand.+?should.+?be.+?binary.+?string.+?value
2777 <END_RESULT>
2778 <RESULT COUNT 2>
2779 (?is)\berror:
2780 <END_RESULT>
2781 <RESULT>
2782 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2783 <END_RESULT>
2784 <END_TC>
2785
2786 :exmp.
2787
2788 .*---------------------------------------------------------------------*
2789 :h4. Inapplicable operator - rotate operators on boolean constant
2790 .*---------------------------------------------------------------------*
2791 :xmp tab=0.
2792
2793 <TC - Inapplicable operator - rotate operators on boolean constant>
2794
2795 <COMPILE>
2796 <MODULE TTCN Temp Temp.ttcn>
2797 module Temp {
2798
2799
2800 const boolean b1 := true
2801
2802 const boolean b2 := b1 <@ 1
2803 const boolean b3 := b1 @> 1
2804
2805 }
2806 <END_MODULE>
2807 <RESULT COUNT 2>
2808 (?im)operand.+?should.+?be.+?string.+?value
2809 <END_RESULT>
2810 <RESULT COUNT 2>
2811 (?is)\berror:
2812 <END_RESULT>
2813 <RESULT>
2814 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2815 <END_RESULT>
2816 <END_TC>
2817
2818 :exmp.
2819
2820 .*---------------------------------------------------------------------*
2821 :h4. Inapplicable operator - arithmetic operators on char constant
2822 .*---------------------------------------------------------------------*
2823 :xmp tab=0.
2824
2825 <TC - Inapplicable operator - arithmetic operators on char constant>
2826
2827 <COMPILE>
2828 <MODULE TTCN Temp Temp.ttcn>
2829 module Temp {
2830
2831
2832 const char c1 := "a"
2833 const char c2 := ""
2834
2835 const char c3 := c1 + c2
2836 const char c4 := c1 - c2
2837 const char c5 := c1 * c2
2838 const char c6 := c1 / c2
2839 const char c7 := c1 mod c2
2840 const char c8 := c1 rem c2
2841
2842 }
2843 <END_MODULE>
2844 <RESULT COUNT 1>
2845 (?im)did.+?you.+?mean.+?concat.+?operation.+?instead.+?of.+?addition
2846 <END_RESULT>
2847 <RESULT COUNT 6>
2848 (?im)operand.+?should.+?be.+?integer.+?or.+?float.+?value
2849 <END_RESULT>
2850 <RESULT COUNT 4>
2851 (?im)operand.+?should.+?be.+?integer value
2852 <END_RESULT>
2853 <RESULT COUNT 11>
2854 (?is)\berror:
2855 <END_RESULT>
2856 <RESULT>
2857 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2858 <END_RESULT>
2859 <END_TC>
2860
2861 :exmp.
2862
2863 .*---------------------------------------------------------------------*
2864 :h4. Inapplicable operator - logical operators on char constant
2865 .*---------------------------------------------------------------------*
2866 :xmp tab=0.
2867
2868 <TC - Inapplicable operator - logical operators on char constant>
2869
2870 <COMPILE>
2871 <MODULE TTCN Temp Temp.ttcn>
2872 module Temp {
2873
2874
2875 const char c1 := "a"
2876 const char c2 := ""
2877
2878
2879 const char c3 := not c2
2880 const char c4 := c1 and c2
2881 const char c5 := c1 or c2
2882 const char c6 := c1 xor c2
2883
2884 }
2885 <END_MODULE>
2886 <RESULT COUNT 7>
2887 (?im)operand.+?should.+?be.+?boolean.+?value
2888 <END_RESULT>
2889 <RESULT COUNT 7>
2890 (?is)\berror:
2891 <END_RESULT>
2892 <RESULT>
2893 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2894 <END_RESULT>
2895 <END_TC>
2896
2897 :exmp.
2898
2899 .*---------------------------------------------------------------------*
2900 :h4. Inapplicable operator - bitwise operators on char constant
2901 .*---------------------------------------------------------------------*
2902 :xmp tab=0.
2903
2904 <TC - Inapplicable operator - bitwise operators on char constant>
2905
2906 <COMPILE>
2907 <MODULE TTCN Temp Temp.ttcn>
2908 module Temp {
2909
2910
2911 const char c1 := "a"
2912 const char c2 := ""
2913
2914
2915 const char c3 := not4b c2
2916 const char c4 := c1 and4b c2
2917 const char c5 := c1 or4b c2
2918 const char c6 := c1 xor4b c2
2919
2920 }
2921 <END_MODULE>
2922 <RESULT COUNT 7>
2923 (?im)operand.+?should.+?be.+?binary.+?string.+?value
2924 <END_RESULT>
2925 <RESULT COUNT 7>
2926 (?is)\berror:
2927 <END_RESULT>
2928 <RESULT>
2929 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2930 <END_RESULT>
2931 <END_TC>
2932
2933 :exmp.
2934
2935 .*---------------------------------------------------------------------*
2936 :h4. Inapplicable operator - shift operators on char constant
2937 .*---------------------------------------------------------------------*
2938 :xmp tab=0.
2939
2940 <TC - Inapplicable operator - shift operators on char constant>
2941
2942 <COMPILE>
2943 <MODULE TTCN Temp Temp.ttcn>
2944 module Temp {
2945
2946
2947 const char b2 := "a" << 1
2948 const char b3 := "" >> 1
2949
2950 }
2951 <END_MODULE>
2952 <RESULT COUNT 2>
2953 (?im)Left.+?operand.+?should.+?be.+?binary.+?string.+?value
2954 <END_RESULT>
2955 <RESULT COUNT 2>
2956 (?is)\berror:
2957 <END_RESULT>
2958 <RESULT>
2959 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2960 <END_RESULT>
2961 <END_TC>
2962
2963 :exmp.
2964
2965 .*---------------------------------------------------------------------*
2966 :h4. Inapplicable operator - arithmetic operators on bitstring constant
2967 .*---------------------------------------------------------------------*
2968 :xmp tab=0.
2969
2970 <TC - Inapplicable operator - arithmetic operators on bitstring constant>
2971
2972 <COMPILE>
2973 <MODULE TTCN Temp Temp.ttcn>
2974 module Temp {
2975
2976
2977 const bitstring b1 := '00001111'B
2978 const bitstring b2 := ''B
2979
2980 const bitstring b3 := b1 + b2
2981 const bitstring b4 := b1 - b2
2982 const bitstring b5 := b1 * b2
2983 const bitstring b6 := b1 / b2
2984 const bitstring b7 := b1 mod b2
2985 const bitstring b8 := b1 rem b2
2986
2987 }
2988 <END_MODULE>
2989 <RESULT COUNT 1>
2990 (?im)did.+?you.+?mean.+?concat.+?operation.+?instead.+?of.+?addition
2991 <END_RESULT>
2992 <RESULT COUNT 6>
2993 (?im)operand.+?should.+?be.+?integer.+?or.+?float.+?value
2994 <END_RESULT>
2995 <RESULT COUNT 4>
2996 (?im)operand.+?should.+?be.+?integer value
2997 <END_RESULT>
2998 <RESULT COUNT 11>
2999 (?is)\berror:
3000 <END_RESULT>
3001 <RESULT>
3002 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3003 <END_RESULT>
3004 <END_TC>
3005
3006 :exmp.
3007
3008 .*---------------------------------------------------------------------*
3009 :h4. Inapplicable operator - logical operators on bitstring constant
3010 .*---------------------------------------------------------------------*
3011 :xmp tab=0.
3012
3013 <TC - Inapplicable operator - logical operators on bitstring constant>
3014
3015 <COMPILE>
3016 <MODULE TTCN Temp Temp.ttcn>
3017 module Temp {
3018
3019
3020 const bitstring b1 := '00001111'B
3021 const bitstring b2 := ''B
3022
3023
3024 const bitstring b3 := not b2
3025 const bitstring b4 := b1 and b2
3026 const bitstring b5 := b1 or b2
3027 const bitstring b6 := b1 xor b2
3028
3029 }
3030 <END_MODULE>
3031 <RESULT COUNT 7>
3032 (?im)operand.+?should.+?be.+?boolean.+?value
3033 <END_RESULT>
3034 <RESULT COUNT 7>
3035 (?is)\berror:
3036 <END_RESULT>
3037 <RESULT>
3038 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3039 <END_RESULT>
3040 <END_TC>
3041
3042 :exmp.
3043
3044 .*---------------------------------------------------------------------*
3045 :h4. Inapplicable operator - arithmetic operators on hexstring constant
3046 .*---------------------------------------------------------------------*
3047 :xmp tab=0.
3048
3049 <TC - Inapplicable operator - arithmetic operators on hexstring constant>
3050
3051 <COMPILE>
3052 <MODULE TTCN Temp Temp.ttcn>
3053 module Temp {
3054
3055
3056 const hexstring h1 := '00001111'H
3057 const hexstring h2 := ''H
3058
3059 const hexstring h3 := h1 + h2
3060 const hexstring h4 := h1 - h2
3061 const hexstring h5 := h1 * h2
3062 const hexstring h6 := h1 / h2
3063 const hexstring h7 := h1 mod h2
3064 const hexstring h8 := h1 rem h2
3065
3066 }
3067 <END_MODULE>
3068 <RESULT COUNT 1>
3069 (?im)did.+?you.+?mean.+?concat.+?operation.+?instead.+?of.+?addition
3070 <END_RESULT>
3071 <RESULT COUNT 6>
3072 (?im)operand.+?should.+?be.+?integer.+?or.+?float.+?value
3073 <END_RESULT>
3074 <RESULT COUNT 4>
3075 (?im)operand.+?should.+?be.+?integer value
3076 <END_RESULT>
3077 <RESULT COUNT 11>
3078 (?is)\berror:
3079 <END_RESULT>
3080 <RESULT>
3081 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3082 <END_RESULT>
3083 <END_TC>
3084
3085 :exmp.
3086
3087 .*---------------------------------------------------------------------*
3088 :h4. Inapplicable operator - logical operators on hexstring constant
3089 .*---------------------------------------------------------------------*
3090 :xmp tab=0.
3091
3092 <TC - Inapplicable operator - logical operators on hexstring constant>
3093
3094 <COMPILE>
3095 <MODULE TTCN Temp Temp.ttcn>
3096 module Temp {
3097
3098
3099 const hexstring h1 := '00001111'H
3100 const hexstring h2 := ''H
3101
3102
3103 const hexstring h3 := not h2
3104 const hexstring h4 := h1 and h2
3105 const hexstring h5 := h1 or h2
3106 const hexstring h6 := h1 xor h2
3107
3108 }
3109 <END_MODULE>
3110 <RESULT COUNT 7>
3111 (?im)operand.+?should.+?be.+?boolean.+?value
3112 <END_RESULT>
3113 <RESULT COUNT 7>
3114 (?is)\berror:
3115 <END_RESULT>
3116 <RESULT>
3117 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3118 <END_RESULT>
3119 <END_TC>
3120
3121 :exmp.
3122
3123 .*---------------------------------------------------------------------*
3124 :h4. Inapplicable operator - arithmetic operators on octetstring constant
3125 .*---------------------------------------------------------------------*
3126 :xmp tab=0.
3127
3128 <TC - Inapplicable operator - arithmetic operators on octetstring constant>
3129
3130 <COMPILE>
3131 <MODULE TTCN Temp Temp.ttcn>
3132 module Temp {
3133
3134
3135 const octetstring o1 := '00001111'O
3136 const octetstring o2 := ''O
3137
3138 const octetstring o3 := o1 + o2
3139 const octetstring o4 := o1 - o2
3140 const octetstring o5 := o1 * o2
3141 const octetstring o6 := o1 / o2
3142 const octetstring o7 := o1 mod o2
3143 const octetstring o8 := o1 rem o2
3144
3145 }
3146 <END_MODULE>
3147 <RESULT COUNT 1>
3148 (?im)did.+?you.+?mean.+?concat.+?operation.+?instead.+?of.+?addition
3149 <END_RESULT>
3150 <RESULT COUNT 6>
3151 (?im)operand.+?should.+?be.+?integer.+?or.+?float.+?value
3152 <END_RESULT>
3153 <RESULT COUNT 4>
3154 (?im)operand.+?should.+?be.+?integer value
3155 <END_RESULT>
3156 <RESULT COUNT 11>
3157 (?is)\berror:
3158 <END_RESULT>
3159 <RESULT>
3160 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3161 <END_RESULT>
3162 <END_TC>
3163
3164 :exmp.
3165
3166 .*---------------------------------------------------------------------*
3167 :h4. Inapplicable operator - logical operators on octetstring constant
3168 .*---------------------------------------------------------------------*
3169 :xmp tab=0.
3170
3171 <TC - Inapplicable operator - logical operators on octetstring constant>
3172
3173 <COMPILE>
3174 <MODULE TTCN Temp Temp.ttcn>
3175 module Temp {
3176
3177
3178 const octetstring o1 := '00001111'O
3179 const octetstring o2 := ''O
3180
3181
3182 const octetstring o3 := not o2
3183 const octetstring o4 := o1 and o2
3184 const octetstring o5 := o1 or o2
3185 const octetstring o6 := o1 xor o2
3186
3187 }
3188 <END_MODULE>
3189 <RESULT COUNT 7>
3190 (?im)operand.+?should.+?be.+?boolean.+?value
3191 <END_RESULT>
3192 <RESULT COUNT 7>
3193 (?is)\berror:
3194 <END_RESULT>
3195 <RESULT>
3196 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3197 <END_RESULT>
3198 <END_TC>
3199
3200 :exmp.
3201
3202 .*---------------------------------------------------------------------*
3203 :h4. Inapplicable operator - arithmetic operators on charstring constant
3204 .*---------------------------------------------------------------------*
3205 :xmp tab=0.
3206
3207 <TC - Inapplicable operator - arithmetic operators on charstring constant>
3208
3209 <COMPILE>
3210 <MODULE TTCN Temp Temp.ttcn>
3211 module Temp {
3212
3213
3214 const charstring c1 := "ABCDEF"
3215 const charstring c2 := ""
3216
3217 const charstring c3 := c1 + c2
3218 const charstring c4 := c1 - c2
3219 const charstring c5 := c1 * c2
3220 const charstring c6 := c1 / c2
3221 const charstring c7 := c1 mod c2
3222 const charstring c8 := c1 rem c2
3223
3224 }
3225 <END_MODULE>
3226 <RESULT COUNT 1>
3227 (?im)did.+?you.+?mean.+?concat.+?operation.+?instead.+?of.+?addition
3228 <END_RESULT>
3229 <RESULT COUNT 6>
3230 (?im)operand.+?should.+?be.+?integer.+?or.+?float.+?value
3231 <END_RESULT>
3232 <RESULT COUNT 4>
3233 (?im)operand.+?should.+?be.+?integer value
3234 <END_RESULT>
3235 <RESULT COUNT 11>
3236 (?is)\berror:
3237 <END_RESULT>
3238 <RESULT>
3239 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3240 <END_RESULT>
3241 <END_TC>
3242
3243 :exmp.
3244
3245 .*---------------------------------------------------------------------*
3246 :h4. Inapplicable operator - logical operators on charstring constant
3247 .*---------------------------------------------------------------------*
3248 :xmp tab=0.
3249
3250 <TC - Inapplicable operator - logical operators on charstring constant>
3251
3252 <COMPILE>
3253 <MODULE TTCN Temp Temp.ttcn>
3254 module Temp {
3255
3256
3257 const charstring c1 := "ABCDEF"
3258 const charstring c2 := ""
3259
3260
3261 const charstring c3 := not c2
3262 const charstring c4 := c1 and c2
3263 const charstring c5 := c1 or c2
3264 const charstring c6 := c1 xor c2
3265
3266 }
3267 <END_MODULE>
3268 <RESULT COUNT 7>
3269 (?im)operand.+?should.+?be.+?boolean.+?value
3270 <END_RESULT>
3271 <RESULT COUNT 7>
3272 (?is)\berror:
3273 <END_RESULT>
3274 <RESULT>
3275 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3276 <END_RESULT>
3277 <END_TC>
3278
3279 :exmp.
3280
3281 .*---------------------------------------------------------------------*
3282 :h4. Inapplicable operator - bitwise operators on charstring constant
3283 .*---------------------------------------------------------------------*
3284 :xmp tab=0.
3285
3286 <TC - Inapplicable operator - bitwise operators on charstring constant>
3287
3288 <COMPILE>
3289 <MODULE TTCN Temp Temp.ttcn>
3290 module Temp {
3291
3292
3293 const charstring c1 := "ABCDEF"
3294 const charstring c2 := ""
3295
3296
3297 const charstring c3 := not4b c2
3298 const charstring c4 := c1 and4b c2
3299 const charstring c5 := c1 or4b c2
3300 const charstring c6 := c1 xor4b c2
3301
3302 }
3303 <END_MODULE>
3304 <RESULT COUNT 7>
3305 (?im)operand.+?should.+?be.+?binary.+?string.+?value
3306 <END_RESULT>
3307 <RESULT COUNT 7>
3308 (?is)\berror:
3309 <END_RESULT>
3310 <RESULT>
3311 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3312 <END_RESULT>
3313 <END_TC>
3314
3315 :exmp.
3316
3317 .*---------------------------------------------------------------------*
3318 :h4. Inapplicable operator - shift operators on charstring constant
3319 .*---------------------------------------------------------------------*
3320 :xmp tab=0.
3321
3322 <TC - Inapplicable operator - shift operators on charstring constant>
3323
3324 <COMPILE>
3325 <MODULE TTCN Temp Temp.ttcn>
3326 module Temp {
3327
3328
3329 const charstring b2 := "ABCDEF" << 1
3330 const charstring b3 := "ABCDEF" >> 1
3331
3332 }
3333 <END_MODULE>
3334 <RESULT COUNT 2>
3335 (?im)operand.+?should.+?be.+?binary.+?string.+?value
3336 <END_RESULT>
3337 <RESULT COUNT 2>
3338 (?is)\berror:
3339 <END_RESULT>
3340 <RESULT>
3341 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3342 <END_RESULT>
3343 <END_TC>
3344
3345 :exmp.
3346
3347 .*---------------------------------------------------------------------*
3348 :h4. Inapplicable operator - arithmetic operators on record constant
3349 .*---------------------------------------------------------------------*
3350 :xmp tab=0.
3351
3352 <TC - Inapplicable operator - arithmetic operators on record constant>
3353
3354 <COMPILE>
3355 <MODULE TTCN Temp Temp.ttcn>
3356 module Temp {
3357
3358 type record rtype {integer i}
3359
3360
3361 const rtype r1 := {1}
3362 const rtype r2 := {2}
3363
3364 const rtype r3 := r1 + r2
3365 const rtype r4 := r1 - r2
3366 const rtype r5 := r1 * r2
3367 const rtype r6 := r1 / r2
3368 const rtype r7 := r1 mod r2
3369 const rtype r8 := r1 rem r2
3370
3371 }
3372 <END_MODULE>
3373 <RESULT COUNT 8>
3374 (?im)operand.+?should.+?be.+?integer.+?or.+?float.+?value
3375 <END_RESULT>
3376 <RESULT COUNT 4>
3377 (?im)operand.+?should.+?be.+?integer value
3378 <END_RESULT>
3379 <RESULT COUNT 12>
3380 (?is)\berror:
3381 <END_RESULT>
3382 <RESULT>
3383 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3384 <END_RESULT>
3385 <END_TC>
3386
3387 :exmp.
3388
3389 .*---------------------------------------------------------------------*
3390 :h4. Inapplicable operator - concatenation on set constant
3391 .*---------------------------------------------------------------------*
3392 :xmp tab=0.
3393
3394 <TC - Inapplicable operator - concatenation on set constant>
3395
3396 <COMPILE>
3397 <MODULE TTCN Temp Temp.ttcn>
3398 module Temp {
3399
3400
3401 type set rtype {integer i}
3402
3403 const rtype r1 := {i := 1}
3404 const rtype r2 := {i := 2}
3405
3406 const rtype r3 := r1 & r2
3407
3408 }
3409 <END_MODULE>
3410 <RESULT COUNT 2>
3411 (?im)operand.+?should.+?be.+?string.+?value
3412 <END_RESULT>
3413 <RESULT COUNT 2>
3414 (?is)\berror:
3415 <END_RESULT>
3416 <RESULT>
3417 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3418 <END_RESULT>
3419 <END_TC>
3420
3421 :exmp.
3422
3423 .*---------------------------------------------------------------------*
3424 :h4. Inapplicable operator - logical operators on record of constant
3425 .*---------------------------------------------------------------------*
3426 :xmp tab=0.
3427
3428 <TC - Inapplicable operator - logical operators on record of constant>
3429
3430 <COMPILE>
3431 <MODULE TTCN Temp Temp.ttcn>
3432 module Temp {
3433
3434
3435 type record of integer rtype
3436
3437 const rtype r1 := {1}
3438 const rtype r2 := {2}
3439
3440
3441 const rtype r3 := not r2
3442 const rtype r4 := r1 and r2
3443 const rtype r5 := r1 or r2
3444 const rtype r6 := r1 xor r2
3445
3446 }
3447 <END_MODULE>
3448 <RESULT COUNT 7>
3449 (?im)operand.+?should.+?be.+?boolean.+?value
3450 <END_RESULT>
3451 <RESULT COUNT 7>
3452 (?is)\berror:
3453 <END_RESULT>
3454 <RESULT>
3455 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3456 <END_RESULT>
3457 <END_TC>
3458
3459 :exmp.
3460
3461 .*---------------------------------------------------------------------*
3462 :h4. Inapplicable operator - bitwise operators on set of constant
3463 .*---------------------------------------------------------------------*
3464 :xmp tab=0.
3465
3466 <TC - Inapplicable operator - bitwise operators on set of constant>
3467
3468 <COMPILE>
3469 <MODULE TTCN Temp Temp.ttcn>
3470 module Temp {
3471
3472
3473 type set of integer rtype
3474
3475 const rtype r1 := {1}
3476 const rtype r2 := {2}
3477
3478
3479 const rtype r3 := not4b r2
3480 const rtype r4 := r1 and4b r2
3481 const rtype r5 := r1 or4b r2
3482 const rtype r6 := r1 xor4b r2
3483
3484 }
3485 <END_MODULE>
3486 <RESULT COUNT 7>
3487 (?im)operand.+?should.+?be.+?binary.+?string.+?value
3488 <END_RESULT>
3489 <RESULT COUNT 7>
3490 (?is)\berror:
3491 <END_RESULT>
3492 <RESULT>
3493 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3494 <END_RESULT>
3495 <END_TC>
3496
3497 :exmp.
3498
3499 .*---------------------------------------------------------------------*
3500 :h4. Inapplicable operator - shift operators on array constant
3501 .*---------------------------------------------------------------------*
3502 :xmp tab=0.
3503
3504 <TC - Inapplicable operator - shift operators on array constant>
3505
3506 <COMPILE>
3507 <MODULE TTCN Temp Temp.ttcn>
3508 module Temp {
3509
3510
3511 const bitstring b[3] := {''B,'1'B,'0'B}
3512
3513
3514 const bitstring b1 := b << 1
3515 const bitstring b2 := b >> 1
3516
3517
3518 }
3519 <END_MODULE>
3520 <RESULT COUNT 2>
3521 (?im)operand.+?should.+?be.+?binary.+?string.+?value
3522 <END_RESULT>
3523 <RESULT COUNT 2>
3524 (?is)\berror:
3525 <END_RESULT>
3526 <RESULT>
3527 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3528 <END_RESULT>
3529 <END_TC>
3530
3531 :exmp.
3532
3533 .*---------------------------------------------------------------------*
3534 :h4. Inapplicable operator - rotate operators on union constant
3535 .*---------------------------------------------------------------------*
3536 :xmp tab=0.
3537
3538 <TC - Inapplicable operator - rotate operators on union constant>
3539
3540 <COMPILE>
3541 <MODULE TTCN Temp Temp.ttcn>
3542 module Temp {
3543
3544
3545 type union utype {bitstring b, hexstring h}
3546
3547 const utype u1 := {b := '000111'B}
3548
3549 const utype u2 := u1 <@ 1
3550 const utype u3 := u1 @> 1
3551
3552
3553 }
3554 <END_MODULE>
3555 <RESULT COUNT 2>
3556 (?im)operand.+?should.+?be.+?string.+?value
3557 <END_RESULT>
3558 <RESULT COUNT 2>
3559 (?is)\berror:
3560 <END_RESULT>
3561 <RESULT>
3562 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3563 <END_RESULT>
3564 <END_TC>
3565
3566 :exmp.
3567
3568 .*---------------------------------------------------------------------*
3569 :h4. Inapplicable operator - concatenation on integer template
3570 .*---------------------------------------------------------------------*
3571 :xmp tab=0.
3572
3573 <TC - Inapplicable operator - concatenation on integer template>
3574
3575 <COMPILE>
3576 <MODULE TTCN Temp Temp.ttcn>
3577 module Temp {
3578
3579
3580 template integer i1 := 1 & 2
3581
3582 }
3583 <END_MODULE>
3584 <RESULT COUNT 2>
3585 (?im)operand.+?should.+?be.+?string.+?value
3586 <END_RESULT>
3587 <RESULT COUNT 2>
3588 (?is)\berror:
3589 <END_RESULT>
3590 <RESULT>
3591 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3592 <END_RESULT>
3593 <END_TC>
3594
3595 :exmp.
3596
3597 .*---------------------------------------------------------------------*
3598 :h4. Inapplicable operator - logical operators on integer template
3599 .*---------------------------------------------------------------------*
3600 :xmp tab=0.
3601
3602 <TC - Inapplicable operator - logical operators on integer template>
3603
3604 <COMPILE>
3605 <MODULE TTCN Temp Temp.ttcn>
3606 module Temp {
3607
3608
3609 template integer i1 := not 1
3610 template integer i2 := 1 and 2
3611 template integer i3 := 1 or 2
3612 template integer i4 := 1 xor 2
3613
3614 }
3615 <END_MODULE>
3616 <RESULT COUNT 7>
3617 (?im)operand.+?should.+?be.+?boolean.+?value
3618 <END_RESULT>
3619 <RESULT COUNT 7>
3620 (?is)\berror:
3621 <END_RESULT>
3622 <RESULT>
3623 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3624 <END_RESULT>
3625 <END_TC>
3626
3627 :exmp.
3628
3629 .*---------------------------------------------------------------------*
3630 :h4. Inapplicable operator - bitwise operators on integer template
3631 .*---------------------------------------------------------------------*
3632 :xmp tab=0.
3633
3634 <TC - Inapplicable operator - bitwise operators on integer template>
3635
3636 <COMPILE>
3637 <MODULE TTCN Temp Temp.ttcn>
3638 module Temp {
3639
3640
3641 template integer i1 := not4b 1
3642 template integer i2 := 1 and4b 2
3643 template integer i3 := 1 or4b 2
3644 template integer i4 := 1 xor4b 2
3645
3646
3647 }
3648 <END_MODULE>
3649 <RESULT COUNT 7>
3650 (?im)operand.+?should.+?be.+?binary.+?string.+?value
3651 <END_RESULT>
3652 <RESULT COUNT 7>
3653 (?is)\berror:
3654 <END_RESULT>
3655 <RESULT>
3656 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3657 <END_RESULT>
3658 <END_TC>
3659
3660 :exmp.
3661
3662 .*---------------------------------------------------------------------*
3663 :h4. Inapplicable operator - shift operators on integer template
3664 .*---------------------------------------------------------------------*
3665 :xmp tab=0.
3666
3667 <TC - Inapplicable operator - shift operators on integer template>
3668
3669 <COMPILE>
3670 <MODULE TTCN Temp Temp.ttcn>
3671 module Temp {
3672
3673
3674 template integer i1 := 1 << 1
3675 template integer i2 := 1 >> 1
3676 template integer i3 := 1 << -1
3677 template integer i4 := 1 >> -1
3678
3679
3680 }
3681 <END_MODULE>
3682 <RESULT COUNT 4>
3683 (?im)operand.+?should.+?be.+?binary.+?string.+?value
3684 <END_RESULT>
3685 <RESULT COUNT 4>
3686 (?is)\berror:
3687 <END_RESULT>
3688 <RESULT>
3689 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3690 <END_RESULT>
3691 <END_TC>
3692
3693 :exmp.
3694
3695 .*---------------------------------------------------------------------*
3696 :h4. Inapplicable operator - rotate operators on integer template
3697 .*---------------------------------------------------------------------*
3698 :xmp tab=0.
3699
3700 <TC - Inapplicable operator - rotate operators on integer template>
3701
3702 <COMPILE>
3703 <MODULE TTCN Temp Temp.ttcn>
3704 module Temp {
3705
3706
3707 template integer i1 := 1 <@ 1
3708 template integer i2 := 1 @> 1
3709 template integer i3 := 1 <@ -1
3710 template integer i4 := 1 @> -1
3711
3712
3713 }
3714 <END_MODULE>
3715 <RESULT COUNT 4>
3716 (?im)operand.+?should.+?be.+?string.+?value
3717 <END_RESULT>
3718 <RESULT COUNT 4>
3719 (?is)\berror:
3720 <END_RESULT>
3721 <RESULT>
3722 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3723 <END_RESULT>
3724 <END_TC>
3725
3726 :exmp.
3727
3728 .*---------------------------------------------------------------------*
3729 :h4. Inapplicable operator - concatenation on float template
3730 .*---------------------------------------------------------------------*
3731 :xmp tab=0.
3732
3733 <TC - Inapplicable operator - concatenation on float template>
3734
3735 <COMPILE>
3736 <MODULE TTCN Temp Temp.ttcn>
3737 module Temp {
3738
3739
3740 template float f1 := 1.0 & 2E-1
3741
3742 }
3743 <END_MODULE>
3744 <RESULT COUNT 2>
3745 (?im)operand.+?should.+?be.+?string.+?value
3746 <END_RESULT>
3747 <RESULT COUNT 2>
3748 (?is)\berror:
3749 <END_RESULT>
3750 <RESULT>
3751 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3752 <END_RESULT>
3753 <END_TC>
3754
3755 :exmp.
3756
3757 .*---------------------------------------------------------------------*
3758 :h4. Inapplicable operator - logical operators on float template
3759 .*---------------------------------------------------------------------*
3760 :xmp tab=0.
3761
3762 <TC - Inapplicable operator - logical operators on float template>
3763
3764 <COMPILE>
3765 <MODULE TTCN Temp Temp.ttcn>
3766 module Temp {
3767
3768
3769 template float f1 := not 1.0
3770 template float f2 := 1.0 and 2E-1
3771 template float f3 := 1.0 or 2E-1
3772 template float f4 := 1.0 xor 2E-1
3773
3774 }
3775 <END_MODULE>
3776 <RESULT COUNT 7>
3777 (?im)operand.+?should.+?be.+?boolean.+?value
3778 <END_RESULT>
3779 <RESULT COUNT 7>
3780 (?is)\berror:
3781 <END_RESULT>
3782 <RESULT>
3783 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3784 <END_RESULT>
3785 <END_TC>
3786
3787 :exmp.
3788
3789 .*---------------------------------------------------------------------*
3790 :h4. Inapplicable operator - bitwise operators on float template
3791 .*---------------------------------------------------------------------*
3792 :xmp tab=0.
3793
3794 <TC - Inapplicable operator - bitwise operators on float template>
3795
3796 <COMPILE>
3797 <MODULE TTCN Temp Temp.ttcn>
3798 module Temp {
3799
3800
3801 template float f1 := not4b 1.0
3802 template float f2 := 1.0 and4b 2E-1
3803 template float f3 := 1.0 or4b 2E-1
3804 template float f4 := 1.0 xor4b 2E-1
3805
3806
3807 }
3808 <END_MODULE>
3809 <RESULT COUNT 7>
3810 (?im)operand.+?should.+?be.+?binary.+?string.+?value
3811 <END_RESULT>
3812 <RESULT COUNT 7>
3813 (?is)\berror:
3814 <END_RESULT>
3815 <RESULT>
3816 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3817 <END_RESULT>
3818 <END_TC>
3819
3820 :exmp.
3821
3822 .*---------------------------------------------------------------------*
3823 :h4. Inapplicable operator - shift operators on float template
3824 .*---------------------------------------------------------------------*
3825 :xmp tab=0.
3826
3827 <TC - Inapplicable operator - shift operators on float template>
3828
3829 <COMPILE>
3830 <MODULE TTCN Temp Temp.ttcn>
3831 module Temp {
3832
3833
3834 template float f1 := 1.0 << 1
3835 template float f2 := 1.0 >> 1
3836 template float f3 := 1 << 1.0
3837 template float f4 := 1 >> 1.0
3838
3839
3840 }
3841 <END_MODULE>
3842 <RESULT COUNT 4>
3843 (?im)Left.+?operand.+?should.+?be.+?binary.+?string.+?value
3844 <END_RESULT>
3845 <RESULT COUNT 2>
3846 (?im)Right.+?operand.+?should.+?be.+?integer.+?value
3847 <END_RESULT>
3848 <RESULT COUNT 6>
3849 (?is)\berror:
3850 <END_RESULT>
3851 <RESULT>
3852 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3853 <END_RESULT>
3854 <END_TC>
3855
3856 :exmp.
3857
3858 .*---------------------------------------------------------------------*
3859 :h4. Inapplicable operator - rotate operators on float template
3860 .*---------------------------------------------------------------------*
3861 :xmp tab=0.
3862
3863 <TC - Inapplicable operator - rotate operators on float template>
3864
3865 <COMPILE>
3866 <MODULE TTCN Temp Temp.ttcn>
3867 module Temp {
3868
3869
3870 template float f1 := 1.0 <@ 1
3871 template float f2 := 1.0 @> 1
3872 template float f3 := 1 <@ 1.0
3873 template float f4 := 1 @> 1.0
3874
3875
3876 }
3877 <END_MODULE>
3878 <RESULT COUNT 4>
3879 (?im)Left.+?operand.+?should.+?be.+?string.+?value
3880 <END_RESULT>
3881 <RESULT COUNT 2>
3882 (?im)Right.+?operand.+?should.+?be.+?integer.+?value
3883 <END_RESULT>
3884 <RESULT COUNT 6>
3885 (?is)\berror:
3886 <END_RESULT>
3887 <RESULT>
3888 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3889 <END_RESULT>
3890 <END_TC>
3891
3892 :exmp.
3893
3894 .*---------------------------------------------------------------------*
3895 :h4. Inapplicable operator - arithmetic operators on boolean template
3896 .*---------------------------------------------------------------------*
3897 :xmp tab=0.
3898
3899 <TC - Inapplicable operator - arithmetic operators on boolean template>
3900
3901 <COMPILE>
3902 <MODULE TTCN Temp Temp.ttcn>
3903 module Temp {
3904
3905
3906 template boolean b1 := true
3907 template boolean b2 := false
3908
3909 template boolean b3 := b1 + b2
3910 template boolean b4 := b1 - b2
3911 template boolean b5 := b1 * b2
3912 template boolean b6 := b1 / b2
3913 template boolean b7 := b1 mod b2
3914 template boolean b8 := b1 rem b2
3915
3916 }
3917 <END_MODULE>
3918 <RESULT COUNT 8>
3919 (?im)operand.+?should.+?be.+?integer.+?or.+?float.+?value
3920 <END_RESULT>
3921 <RESULT COUNT 12>
3922 (?im)reference.+?to.+?value.+?expected.+?instead.+?of.+?template
3923 <END_RESULT>
3924 <RESULT COUNT 4>
3925 (?im)operand.+?should.+?be.+?integer value
3926 <END_RESULT>
3927 <RESULT COUNT 24>
3928 (?is)\berror:
3929 <END_RESULT>
3930 <RESULT>
3931 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3932 <END_RESULT>
3933 <END_TC>
3934
3935 :exmp.
3936
3937 .*---------------------------------------------------------------------*
3938 :h4. Inapplicable operator - concatenation on boolean template
3939 .*---------------------------------------------------------------------*
3940 :xmp tab=0.
3941
3942 <TC - Inapplicable operator - concatenation on boolean template>
3943
3944 <COMPILE>
3945 <MODULE TTCN Temp Temp.ttcn>
3946 module Temp {
3947
3948
3949 template boolean b1 := true & false
3950
3951 }
3952 <END_MODULE>
3953 <RESULT COUNT 2>
3954 (?im)operand.+?should.+?be.+?string.+?value
3955 <END_RESULT>
3956 <RESULT COUNT 2>
3957 (?is)\berror:
3958 <END_RESULT>
3959 <RESULT>
3960 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
3961 <END_RESULT>
3962 <END_TC>
3963
3964 :exmp.
3965
3966 .*---------------------------------------------------------------------*
3967 :h4. Inapplicable operator - bitwise operators on boolean template
3968 .*---------------------------------------------------------------------*
3969 :xmp tab=0.
3970
3971 <TC - Inapplicable operator - bitwise operators on boolean template>
3972
3973 <COMPILE>
3974 <MODULE TTCN Temp Temp.ttcn>
3975 module Temp {
3976
3977
3978 template boolean b1 := true
3979 template boolean b2 := false
3980
3981
3982 template boolean b3 := not4b b1
3983 template boolean b4 := b1 and4b b2
3984 template boolean b5 := b1 or4b b2
3985 template boolean b6 := b1 xor4b b2
3986
3987 }
3988 <END_MODULE>
3989 <RESULT COUNT 7>
3990 (?im)operand.+?should.+?be.+?binary.+?string.+?value
3991 <END_RESULT>
3992 <RESULT COUNT 7>
3993 (?im)reference.+?to.+?value.+?expected.+?instead.+?of.+?template
3994 <END_RESULT>
3995 <RESULT COUNT 14>
3996 (?is)\berror:
3997 <END_RESULT>
3998 <RESULT>
3999 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4000 <END_RESULT>
4001 <END_TC>
4002
4003 :exmp.
4004
4005 .*---------------------------------------------------------------------*
4006 :h4. Inapplicable operator - shift operators on boolean template
4007 .*---------------------------------------------------------------------*
4008 :xmp tab=0.
4009
4010 <TC - Inapplicable operator - shift operators on boolean template>
4011
4012 <COMPILE>
4013 <MODULE TTCN Temp Temp.ttcn>
4014 module Temp {
4015
4016
4017 template boolean b1 := true
4018
4019 template boolean b2 := b1 << 1
4020 template boolean b3 := b1 >> 1
4021
4022 }
4023 <END_MODULE>
4024 <RESULT COUNT 2>
4025 (?im)operand.+?should.+?be.+?binary.+?string.+?value
4026 <END_RESULT>
4027 <RESULT COUNT 2>
4028 (?im)reference.+?to.+?value.+?expected.+?instead.+?of.+?template
4029 <END_RESULT>
4030 <RESULT COUNT 4>
4031 (?is)\berror:
4032 <END_RESULT>
4033 <RESULT>
4034 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4035 <END_RESULT>
4036 <END_TC>
4037
4038 :exmp.
4039
4040 .*---------------------------------------------------------------------*
4041 :h4. Inapplicable operator - rotate operators on boolean template
4042 .*---------------------------------------------------------------------*
4043 :xmp tab=0.
4044
4045 <TC - Inapplicable operator - rotate operators on boolean template>
4046
4047 <COMPILE>
4048 <MODULE TTCN Temp Temp.ttcn>
4049 module Temp {
4050
4051
4052 template boolean b1 := true
4053
4054 template boolean b2 := b1 <@ 1
4055 template boolean b3 := b1 @> 1
4056
4057 }
4058 <END_MODULE>
4059 <RESULT COUNT 2>
4060 (?im)operand.+?should.+?be.+?string.+?value
4061 <END_RESULT>
4062 <RESULT COUNT 2>
4063 (?im)reference.+?to.+?value.+?expected.+?instead.+?of.+?template
4064 <END_RESULT>
4065 <RESULT COUNT 4>
4066 (?is)\berror:
4067 <END_RESULT>
4068 <RESULT>
4069 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4070 <END_RESULT>
4071 <END_TC>
4072
4073 :exmp.
4074
4075 .*---------------------------------------------------------------------*
4076 :h4. Inapplicable operator - arithmetic operators on char template
4077 .*---------------------------------------------------------------------*
4078 :xmp tab=0.
4079
4080 <TC - Inapplicable operator - arithmetic operators on char template>
4081
4082 <COMPILE>
4083 <MODULE TTCN Temp Temp.ttcn>
4084 module Temp {
4085
4086
4087 template char c1 := "a"
4088 template char c2 := ""
4089
4090 template char c3 := c1 + c2
4091 template char c4 := c1 - c2
4092 template char c5 := c1 * c2
4093 template char c6 := c1 / c2
4094 template char c7 := c1 mod c2
4095 template char c8 := c1 rem c2
4096
4097 }
4098 <END_MODULE>
4099 <RESULT COUNT 1>
4100 (?im)did.+?you.+?mean.+?concat.+?operation.+?instead.+?of.+?addition
4101 <END_RESULT>
4102 <RESULT COUNT 6>
4103 (?im)operand.+?should.+?be.+?integer.+?or.+?float.+?value
4104 <END_RESULT>
4105 <RESULT COUNT 4>
4106 (?im)operand.+?should.+?be.+?integer value
4107 <END_RESULT>
4108 <RESULT COUNT 12>
4109 (?im)reference.+?to.+?value.+?expected.+?instead.+?of.+?template
4110 <END_RESULT>
4111 <RESULT COUNT 23>
4112 (?is)\berror:
4113 <END_RESULT>
4114 <RESULT>
4115 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4116 <END_RESULT>
4117 <END_TC>
4118
4119 :exmp.
4120
4121 .*---------------------------------------------------------------------*
4122 :h4. Inapplicable operator - logical operators on char template
4123 .*---------------------------------------------------------------------*
4124 :xmp tab=0.
4125
4126 <TC - Inapplicable operator - logical operators on char template>
4127
4128 <COMPILE>
4129 <MODULE TTCN Temp Temp.ttcn>
4130 module Temp {
4131
4132
4133 template char c1 := "a"
4134 template char c2 := ""
4135
4136
4137 template char c3 := not c2
4138 template char c4 := c1 and c2
4139 template char c5 := c1 or c2
4140 template char c6 := c1 xor c2
4141
4142 }
4143 <END_MODULE>
4144 <RESULT COUNT 7>
4145 (?im)operand.+?should.+?be.+?boolean.+?value
4146 <END_RESULT>
4147 <RESULT COUNT 7>
4148 (?im)reference.+?to.+?value.+?expected.+?instead.+?of.+?template
4149 <END_RESULT>
4150 <RESULT COUNT 14>
4151 (?is)\berror:
4152 <END_RESULT>
4153 <RESULT>
4154 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4155 <END_RESULT>
4156 <END_TC>
4157
4158 :exmp.
4159
4160 .*---------------------------------------------------------------------*
4161 :h4. Inapplicable operator - bitwise operators on char template
4162 .*---------------------------------------------------------------------*
4163 :xmp tab=0.
4164
4165 <TC - Inapplicable operator - bitwise operators on char template>
4166
4167 <COMPILE>
4168 <MODULE TTCN Temp Temp.ttcn>
4169 module Temp {
4170
4171
4172 template char c1 := "a"
4173 template char c2 := ""
4174
4175
4176 template char c3 := not4b c2
4177 template char c4 := c1 and4b c2
4178 template char c5 := c1 or4b c2
4179 template char c6 := c1 xor4b c2
4180
4181 }
4182 <END_MODULE>
4183 <RESULT COUNT 7>
4184 (?im)operand.+?should.+?be.+?binary.+?string.+?value
4185 <END_RESULT>
4186 <RESULT COUNT 7>
4187 (?im)reference.+?to.+?value.+?expected.+?instead.+?of.+?template
4188 <END_RESULT>
4189 <RESULT COUNT 14>
4190 (?is)\berror:
4191 <END_RESULT>
4192 <RESULT>
4193 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4194 <END_RESULT>
4195 <END_TC>
4196
4197 :exmp.
4198
4199 .*---------------------------------------------------------------------*
4200 :h4. Inapplicable operator - shift operators on char template
4201 .*---------------------------------------------------------------------*
4202 :xmp tab=0.
4203
4204 <TC - Inapplicable operator - shift operators on char template>
4205
4206 <COMPILE>
4207 <MODULE TTCN Temp Temp.ttcn>
4208 module Temp {
4209
4210
4211 template char b2 := "a" << 1
4212 template char b3 := "" >> 1
4213
4214 }
4215 <END_MODULE>
4216 <RESULT COUNT 2>
4217 (?im)operand.+?should.+?be.+?binary.+?string.+?value
4218 <END_RESULT>
4219 <RESULT COUNT 2>
4220 (?is)\berror:
4221 <END_RESULT>
4222 <RESULT>
4223 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4224 <END_RESULT>
4225 <END_TC>
4226
4227 :exmp.
4228
4229 .*---------------------------------------------------------------------*
4230 :h4. Inapplicable operator - arithmetic operators on bitstring template
4231 .*---------------------------------------------------------------------*
4232 :xmp tab=0.
4233
4234 <TC - Inapplicable operator - arithmetic operators on bitstring template>
4235
4236 <COMPILE>
4237 <MODULE TTCN Temp Temp.ttcn>
4238 module Temp {
4239
4240
4241 template bitstring b1 := '00001111'B
4242 template bitstring b2 := ''B
4243
4244 template bitstring b3 := b1 + b2
4245 template bitstring b4 := b1 - b2
4246 template bitstring b5 := b1 * b2
4247 template bitstring b6 := b1 / b2
4248 template bitstring b7 := b1 mod b2
4249 template bitstring b8 := b1 rem b2
4250
4251 }
4252 <END_MODULE>
4253 <RESULT COUNT 1>
4254 (?im)did.+?you.+?mean.+?concat.+?operation.+?instead.+?of.+?addition
4255 <END_RESULT>
4256 <RESULT COUNT 6>
4257 (?im)operand.+?should.+?be.+?integer.+?or.+?float.+?value
4258 <END_RESULT>
4259 <RESULT COUNT 4>
4260 (?im)operand.+?should.+?be.+?integer value
4261 <END_RESULT>
4262 <RESULT COUNT 12>
4263 (?im)reference.+?to.+?value.+?expected.+?instead.+?of.+?template
4264 <END_RESULT>
4265 <RESULT COUNT 23>
4266 (?is)\berror:
4267 <END_RESULT>
4268 <RESULT>
4269 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4270 <END_RESULT>
4271 <END_TC>
4272
4273 :exmp.
4274
4275 .*---------------------------------------------------------------------*
4276 :h4. Inapplicable operator - logical operators on bitstring template
4277 .*---------------------------------------------------------------------*
4278 :xmp tab=0.
4279
4280 <TC - Inapplicable operator - logical operators on bitstring template>
4281
4282 <COMPILE>
4283 <MODULE TTCN Temp Temp.ttcn>
4284 module Temp {
4285
4286
4287 template bitstring b1 := '00001111'B
4288 template bitstring b2 := ''B
4289
4290
4291 template bitstring b3 := not b2
4292 template bitstring b4 := b1 and b2
4293 template bitstring b5 := b1 or b2
4294 template bitstring b6 := b1 xor b2
4295
4296 }
4297 <END_MODULE>
4298 <RESULT COUNT 7>
4299 (?im)operand.+?should.+?be.+?boolean.+?value
4300 <END_RESULT>
4301 <RESULT COUNT 7>
4302 (?im)reference.+?to.+?value.+?expected.+?instead.+?of.+?template
4303 <END_RESULT>
4304 <RESULT COUNT 14>
4305 (?is)\berror:
4306 <END_RESULT>
4307 <RESULT>
4308 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4309 <END_RESULT>
4310 <END_RESULT>
4311 <END_TC>
4312
4313 :exmp.
4314
4315 .*---------------------------------------------------------------------*
4316 :h4. Inapplicable operator - arithmetic operators on hexstring template
4317 .*---------------------------------------------------------------------*
4318 :xmp tab=0.
4319
4320 <TC - Inapplicable operator - arithmetic operators on hexstring template>
4321
4322 <COMPILE>
4323 <MODULE TTCN Temp Temp.ttcn>
4324 module Temp {
4325
4326
4327 template hexstring h1 := '00001111'H
4328 template hexstring h2 := ''H
4329
4330 template hexstring h3 := h1 + h2
4331 template hexstring h4 := h1 - h2
4332 template hexstring h5 := h1 * h2
4333 template hexstring h6 := h1 / h2
4334 template hexstring h7 := h1 mod h2
4335 template hexstring h8 := h1 rem h2
4336
4337 }
4338 <END_MODULE>
4339 <RESULT COUNT 1>
4340 (?im)did.+?you.+?mean.+?concat.+?operation.+?instead.+?of.+?addition
4341 <END_RESULT>
4342 <RESULT COUNT 6>
4343 (?im)operand.+?should.+?be.+?integer.+?or.+?float.+?value
4344 <END_RESULT>
4345 <RESULT COUNT 4>
4346 (?im)operand.+?should.+?be.+?integer value
4347 <END_RESULT>
4348 <RESULT COUNT 12>
4349 (?im)reference.+?to.+?value.+?expected.+?instead.+?of.+?template
4350 <END_RESULT>
4351 <RESULT COUNT 23>
4352 (?is)\berror:
4353 <END_RESULT>
4354 <RESULT>
4355 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4356 <END_RESULT>
4357 <END_TC>
4358
4359 :exmp.
4360
4361 .*---------------------------------------------------------------------*
4362 :h4. Inapplicable operator - logical operators on hexstring template
4363 .*---------------------------------------------------------------------*
4364 :xmp tab=0.
4365
4366 <TC - Inapplicable operator - logical operators on hexstring template>
4367
4368 <COMPILE>
4369 <MODULE TTCN Temp Temp.ttcn>
4370 module Temp {
4371
4372
4373 template hexstring h1 := '00001111'H
4374 template hexstring h2 := ''H
4375
4376
4377 template hexstring h3 := not h2
4378 template hexstring h4 := h1 and h2
4379 template hexstring h5 := h1 or h2
4380 template hexstring h6 := h1 xor h2
4381
4382 }
4383 <END_MODULE>
4384 <RESULT COUNT 7>
4385 (?im)operand.+?should.+?be.+?boolean.+?value
4386 <END_RESULT>
4387 <RESULT COUNT 7>
4388 (?im)reference.+?to.+?value.+?expected.+?instead.+?of.+?template
4389 <END_RESULT>
4390 <RESULT COUNT 14>
4391 (?is)\berror:
4392 <END_RESULT>
4393 <RESULT>
4394 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4395 <END_RESULT>
4396 <END_TC>
4397
4398 :exmp.
4399
4400 .*---------------------------------------------------------------------*
4401 :h4. Inapplicable operator - arithmetic operators on octetstring template
4402 .*---------------------------------------------------------------------*
4403 :xmp tab=0.
4404
4405 <TC - Inapplicable operator - arithmetic operators on octetstring template>
4406
4407 <COMPILE>
4408 <MODULE TTCN Temp Temp.ttcn>
4409 module Temp {
4410
4411
4412 template octetstring o1 := '00001111'O
4413 template octetstring o2 := ''O
4414
4415 template octetstring o3 := o1 + o2
4416 template octetstring o4 := o1 - o2
4417 template octetstring o5 := o1 * o2
4418 template octetstring o6 := o1 / o2
4419 template octetstring o7 := o1 mod o2
4420 template octetstring o8 := o1 rem o2
4421
4422 }
4423 <END_MODULE>
4424 <RESULT COUNT 1>
4425 (?im)did.+?you.+?mean.+?concat.+?operation.+?instead.+?of.+?addition
4426 <END_RESULT>
4427 <RESULT COUNT 6>
4428 (?im)operand.+?should.+?be.+?integer.+?or.+?float.+?value
4429 <END_RESULT>
4430 <RESULT COUNT 4>
4431 (?im)operand.+?should.+?be.+?integer value
4432 <END_RESULT>
4433 <RESULT COUNT 12>
4434 (?im)reference.+?to.+?value.+?expected.+?instead.+?of.+?template
4435 <END_RESULT>
4436 <RESULT COUNT 23>
4437 (?is)\berror:
4438 <END_RESULT>
4439 <RESULT>
4440 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4441 <END_RESULT>
4442 <END_TC>
4443
4444 :exmp.
4445
4446 .*---------------------------------------------------------------------*
4447 :h4. Inapplicable operator - logical operators on octetstring template
4448 .*---------------------------------------------------------------------*
4449 :xmp tab=0.
4450
4451 <TC - Inapplicable operator - logical operators on octetstring template>
4452
4453 <COMPILE>
4454 <MODULE TTCN Temp Temp.ttcn>
4455 module Temp {
4456
4457
4458 template octetstring o1 := '00001111'O
4459 template octetstring o2 := ''O
4460
4461
4462 template octetstring o3 := not o2
4463 template octetstring o4 := o1 and o2
4464 template octetstring o5 := o1 or o2
4465 template octetstring o6 := o1 xor o2
4466
4467 }
4468 <END_MODULE>
4469 <RESULT COUNT 7>
4470 (?im)operand.+?should.+?be.+?boolean.+?value
4471 <END_RESULT>
4472 <RESULT COUNT 7>
4473 (?im)reference.+?to.+?value.+?expected.+?instead.+?of.+?template
4474 <END_RESULT>
4475 <RESULT COUNT 14>
4476 (?is)\berror:
4477 <END_RESULT>
4478 <RESULT>
4479 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4480 <END_RESULT>
4481 <END_TC>
4482
4483 :exmp.
4484
4485 .*---------------------------------------------------------------------*
4486 :h4. Inapplicable operator - arithmetic operators on charstring template
4487 .*---------------------------------------------------------------------*
4488 :xmp tab=0.
4489
4490 <TC - Inapplicable operator - arithmetic operators on charstring template>
4491
4492 <COMPILE>
4493 <MODULE TTCN Temp Temp.ttcn>
4494 module Temp {
4495
4496
4497 template charstring c1 := "ABCDEF"
4498 template charstring c2 := ""
4499
4500 template charstring c3 := c1 + c2
4501 template charstring c4 := c1 - c2
4502 template charstring c5 := c1 * c2
4503 template charstring c6 := c1 / c2
4504 template charstring c7 := c1 mod c2
4505 template charstring c8 := c1 rem c2
4506
4507 }
4508 <END_MODULE>
4509 <RESULT COUNT 1>
4510 (?im)did.+?you.+?mean.+?concat.+?operation.+?instead.+?of.+?addition
4511 <END_RESULT>
4512 <RESULT COUNT 6>
4513 (?im)operand.+?should.+?be.+?integer.+?or.+?float.+?value
4514 <END_RESULT>
4515 <RESULT COUNT 4>
4516 (?im)operand.+?should.+?be.+?integer value
4517 <END_RESULT>
4518 <RESULT COUNT 12>
4519 (?im)reference.+?to.+?value.+?expected.+?instead.+?of.+?template
4520 <END_RESULT>
4521 <RESULT COUNT 23>
4522 (?is)\berror:
4523 <END_RESULT>
4524 <RESULT>
4525 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4526 <END_RESULT>
4527 <END_TC>
4528
4529 :exmp.
4530
4531 .*---------------------------------------------------------------------*
4532 :h4. Inapplicable operator - logical operators on charstring template
4533 .*---------------------------------------------------------------------*
4534 :xmp tab=0.
4535
4536 <TC - Inapplicable operator - logical operators on charstring template>
4537
4538 <COMPILE>
4539 <MODULE TTCN Temp Temp.ttcn>
4540 module Temp {
4541
4542
4543 template charstring c1 := "ABCDEF"
4544 template charstring c2 := ""
4545
4546
4547 template charstring c3 := not c2
4548 template charstring c4 := c1 and c2
4549 template charstring c5 := c1 or c2
4550 template charstring c6 := c1 xor c2
4551
4552 }
4553 <END_MODULE>
4554 <RESULT COUNT 7>
4555 (?im)operand.+?should.+?be.+?boolean.+?value
4556 <END_RESULT>
4557 <RESULT COUNT 7>
4558 (?im)reference.+?to.+?value.+?expected.+?instead.+?of.+?template
4559 <END_RESULT>
4560 <RESULT COUNT 14>
4561 (?is)\berror:
4562 <END_RESULT>
4563 <RESULT>
4564 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4565 <END_RESULT>
4566 <END_TC>
4567
4568 :exmp.
4569
4570 .*---------------------------------------------------------------------*
4571 :h4. Inapplicable operator - bitwise operators on charstring template
4572 .*---------------------------------------------------------------------*
4573 :xmp tab=0.
4574
4575 <TC - Inapplicable operator - bitwise operators on charstring template>
4576
4577 <COMPILE>
4578 <MODULE TTCN Temp Temp.ttcn>
4579 module Temp {
4580
4581
4582 template charstring c1 := "ABCDEF"
4583 template charstring c2 := ""
4584
4585
4586 template charstring c3 := not4b c2
4587 template charstring c4 := c1 and4b c2
4588 template charstring c5 := c1 or4b c2
4589 template charstring c6 := c1 xor4b c2
4590
4591 }
4592 <END_MODULE>
4593 <RESULT COUNT 7>
4594 (?im)operand.+?should.+?be.+?binary.+?string.+?value
4595 <END_RESULT>
4596 <RESULT COUNT 7>
4597 (?im)reference.+?to.+?value.+?expected.+?instead.+?of.+?template
4598 <END_RESULT>
4599 <RESULT COUNT 14>
4600 (?is)\berror:
4601 <END_RESULT>
4602 <RESULT>
4603 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4604 <END_RESULT>
4605 <END_TC>
4606
4607 :exmp.
4608
4609 .*---------------------------------------------------------------------*
4610 :h4. Inapplicable operator - shift operators on charstring template
4611 .*---------------------------------------------------------------------*
4612 :xmp tab=0.
4613
4614 <TC - Inapplicable operator - shift operators on charstring template>
4615
4616 <COMPILE>
4617 <MODULE TTCN Temp Temp.ttcn>
4618 module Temp {
4619
4620
4621 template charstring b2 := "ABCDEF" << 1
4622 template charstring b3 := "ABCDEF" >> 1
4623
4624 }
4625 <END_MODULE>
4626 <RESULT COUNT 2>
4627 (?im)operand.+?should.+?be.+?binary.+?string.+?value
4628 <END_RESULT>
4629 <RESULT COUNT 2>
4630 (?is)\berror:
4631 <END_RESULT>
4632 <RESULT>
4633 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4634 <END_RESULT>
4635 <END_TC>
4636
4637 :exmp.
4638
4639 .*---------------------------------------------------------------------*
4640 :h4. Inapplicable operator - arithmetic operators on record template
4641 .*---------------------------------------------------------------------*
4642 :xmp tab=0.
4643
4644 <TC - Inapplicable operator - arithmetic operators on record template>
4645
4646 <COMPILE>
4647 <MODULE TTCN Temp Temp.ttcn>
4648 module Temp {
4649
4650 type record rtype {integer i}
4651
4652
4653 template rtype r1 := {1}
4654 template rtype r2 := {2}
4655
4656 template rtype r3 := r1 + r2
4657 template rtype r4 := r1 - r2
4658 template rtype r5 := r1 * r2
4659 template rtype r6 := r1 / r2
4660 template rtype r7 := r1 mod r2
4661 template rtype r8 := r1 rem r2
4662
4663 }
4664 <END_MODULE>
4665 <RESULT COUNT 8>
4666 (?im)operand.+?should.+?be.+?integer.+?or.+?float.+?value
4667 <END_RESULT>
4668 <RESULT COUNT 4>
4669 (?im)operand.+?should.+?be.+?integer value
4670 <END_RESULT>
4671 <RESULT COUNT 12>
4672 (?im)reference.+?to.+?value.+?expected.+?instead.+?of.+?template
4673 <END_RESULT>
4674 <RESULT COUNT 24>
4675 (?is)\berror:
4676 <END_RESULT>
4677 <RESULT>
4678 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4679 <END_RESULT>
4680 <END_TC>
4681
4682 :exmp.
4683
4684 .*---------------------------------------------------------------------*
4685 :h4. Inapplicable operator - concatenation on set template
4686 .*---------------------------------------------------------------------*
4687 :xmp tab=0.
4688
4689 <TC - Inapplicable operator - concatenation on set template>
4690
4691 <COMPILE>
4692 <MODULE TTCN Temp Temp.ttcn>
4693 module Temp {
4694
4695
4696 type set rtype {integer i}
4697
4698 template rtype r1 := {i := 1}
4699 template rtype r2 := {i := 2}
4700
4701 template rtype r3 := r1 & r2
4702
4703 }
4704 <END_MODULE>
4705 <RESULT COUNT 2>
4706 (?im)operand.+?should.+?be.+?string.+?value
4707 <END_RESULT>
4708 <RESULT COUNT 2>
4709 (?im)reference.+?to.+?value.+?expected.+?instead.+?of.+?template
4710 <END_RESULT>
4711 <RESULT COUNT 4>
4712 (?is)\berror:
4713 <END_RESULT>
4714 <RESULT>
4715 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4716 <END_RESULT>
4717 <END_TC>
4718
4719 :exmp.
4720
4721 .*---------------------------------------------------------------------*
4722 :h4. Inapplicable operator - logical operators on record of template
4723 .*---------------------------------------------------------------------*
4724 :xmp tab=0.
4725
4726 <TC - Inapplicable operator - logical operators on record of template>
4727
4728 <COMPILE>
4729 <MODULE TTCN Temp Temp.ttcn>
4730 module Temp {
4731
4732
4733 type record of integer rtype
4734
4735 template rtype r1 := {1}
4736 template rtype r2 := {2}
4737
4738
4739 template rtype r3 := not r2
4740 template rtype r4 := r1 and r2
4741 template rtype r5 := r1 or r2
4742 template rtype r6 := r1 xor r2
4743
4744 }
4745 <END_MODULE>
4746 <RESULT COUNT 7>
4747 (?im)operand.+?should.+?be.+?boolean.+?value
4748 <END_RESULT>
4749 <RESULT COUNT 7>
4750 (?im)reference.+?to.+?value.+?expected.+?instead.+?of.+?template
4751 <END_RESULT>
4752 <RESULT COUNT 14>
4753 (?is)\berror:
4754 <END_RESULT>
4755 <RESULT>
4756 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4757 <END_RESULT>
4758 <END_TC>
4759
4760 :exmp.
4761
4762 .*---------------------------------------------------------------------*
4763 :h4. Inapplicable operator - bitwise operators on set of template
4764 .*---------------------------------------------------------------------*
4765 :xmp tab=0.
4766
4767 <TC - Inapplicable operator - bitwise operators on set of template>
4768
4769 <COMPILE>
4770 <MODULE TTCN Temp Temp.ttcn>
4771 module Temp {
4772
4773
4774 type set of integer rtype
4775
4776 template rtype r1 := {1}
4777 template rtype r2 := {2}
4778
4779
4780 template rtype r3 := not4b r2
4781 template rtype r4 := r1 and4b r2
4782 template rtype r5 := r1 or4b r2
4783 template rtype r6 := r1 xor4b r2
4784
4785 }
4786 <END_MODULE>
4787 <RESULT COUNT 7>
4788 (?im)operand.+?should.+?be.+?binary.+?string.+?value
4789 <END_RESULT>
4790 <RESULT COUNT 7>
4791 (?im)reference.+?to.+?value.+?expected.+?instead.+?of.+?template
4792 <END_RESULT>
4793 <RESULT COUNT 14>
4794 (?is)\berror:
4795 <END_RESULT>
4796 <RESULT>
4797 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4798 <END_RESULT>
4799 <END_TC>
4800
4801 :exmp.
4802
4803 .*---------------------------------------------------------------------*
4804 :h4. Inapplicable operator - rotate operators on union template
4805 .*---------------------------------------------------------------------*
4806 :xmp tab=0.
4807
4808 <TC - Inapplicable operator - rotate operators on union template>
4809
4810 <COMPILE>
4811 <MODULE TTCN Temp Temp.ttcn>
4812 module Temp {
4813
4814
4815 type union utype {bitstring b, hexstring h}
4816
4817 template utype u1 := {b := '000111'B}
4818
4819 template utype u2 := u1 <@ 1
4820 template utype u3 := u1 @> 1
4821
4822
4823 }
4824 <END_MODULE>
4825 <RESULT COUNT 2>
4826 (?im)operand.+?should.+?be.+?string.+?value
4827 <END_RESULT>
4828 <RESULT COUNT 2>
4829 (?im)reference.+?to.+?value.+?expected.+?instead.+?of.+?template
4830 <END_RESULT>
4831 <RESULT COUNT 4>
4832 (?is)\berror:
4833 <END_RESULT>
4834 <RESULT>
4835 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4836 <END_RESULT>
4837 <END_TC>
4838
4839 :exmp.
4840
4841 .*---------------------------------------------------------------------*
4842 :h3.Type compatibility between the formal and the actual parameter list
4843 .*---------------------------------------------------------------------*
4844 :p. Explanation:
4845 :nl. Shall be the same as the order of elements and shall be compatible
4846 with the types of elements in the actual and the corresponding formal
4847 parameter list.
4848
4849 :p. Test strategy:
4850 :nl. - The type compatibility checking covers the order checking, therefore
4851 the order checking is not necessary.
4852 :nl. - We made a test for each types of values that are allowed to appear in
4853 the formal/actual parameter lists of all language elements (template,
4854 function, altstep, testcase, signature).
4855
4856 .*---------------------------------------------------------------------*
4857 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Template: basic type
4858 .*---------------------------------------------------------------------*
4859 :xmp tab=0.
4860 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Template: basic type>
4861
4862 <COMPILE>
4863 <VERDICT_LEAF PASS>
4864 <MODULE TTCN ModuleA ModuleA.ttcn>
4865 module ModuleA {
4866 type record MyRec {
4867 integer field1,
4868 charstring field2,
4869 boolean field3
4870 }
4871 template MyRec MyTemp( charstring par_1, boolean par_2, integer par_3 ) := {
4872 field1 := par_3,
4873 field2 := par_1,
4874 field3 := par_2
4875 }
4876 function MyFunc( template MyRec mytemp ) {}
4877 control {
4878 MyFunc(MyTemp("r",true,6)); // good
4879 MyFunc(MyTemp("r",true,6.2)); // error
4880 }
4881 }
4882 <END_MODULE>
4883 <RESULT IF_PASS COUNT 1>
4884 (?im)\berror\b.+?integer.+?expected
4885 <END_RESULT>
4886 <RESULT IF_PASS COUNT 1>
4887 (?is)\berror:
4888 <END_RESULT>
4889 <RESULT IF_PASS POSITIVE>
4890 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4891 <END_RESULT>
4892
4893 <END_TC>
4894 :exmp.
4895
4896 .*---------------------------------------------------------------------*
4897 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Template: user-defined type
4898 .*---------------------------------------------------------------------*
4899 :xmp tab=0.
4900 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Template: user-defined type>
4901
4902 <COMPILE>
4903 <VERDICT_LEAF PASS>
4904 <MODULE TTCN ModuleA ModuleA.ttcn>
4905 module ModuleA {
4906 type record MyRec {
4907 integer field1,
4908 charstring field2,
4909 boolean field3
4910 }
4911 template MyRec MyTemp( MyRec Par ) := {
4912 field1 := Par.field1,
4913 field2 := Par.field2,
4914 field3 := Par.field3
4915 }
4916 function MyFunc( template MyRec mytemp ) {}
4917 control {
4918 MyFunc(MyTemp({6,"r",false})); // good
4919 MyFunc(MyTemp({"r",false,6.7})); // error
4920 MyFunc(MyTemp(false)); // error
4921 }
4922 }
4923 <END_MODULE>
4924 <RESULT IF_PASS COUNT 1>
4925 (?im)\berror\b.+?integer.+?expected
4926 <END_RESULT>
4927 <RESULT IF_PASS COUNT 1>
4928 (?im)\berror\b.+?character string.+?expected
4929 <END_RESULT>
4930 <RESULT IF_PASS COUNT 1>
4931 (?im)\berror\b.+?boolean.+?expected
4932 <END_RESULT>
4933 <RESULT IF_PASS COUNT 1>
4934 (?im)\berror\b.+?Record.+?expected
4935 <END_RESULT>
4936 <RESULT IF_PASS COUNT 4>
4937 (?is)\berror:
4938 <END_RESULT>
4939 <RESULT IF_PASS POSITIVE>
4940 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4941 <END_RESULT>
4942
4943 <END_TC>
4944 :exmp.
4945
4946 .*---------------------------------------------------------------------*
4947 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Template: address type
4948 .*---------------------------------------------------------------------*
4949 :xmp tab=0.
4950 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Template: address type>
4951
4952 <COMPILE>
4953 <VERDICT_LEAF PASS>
4954 <MODULE TTCN ModuleA ModuleA.ttcn>
4955 module ModuleA {
4956 type record address { charstring field }
4957 type record MyRec {
4958 integer field1,
4959 address field2,
4960 boolean field3
4961 }
4962 template MyRec MyTemp( address par_1, boolean par_2, integer par_3 ) := {
4963 field1 := par_3,
4964 field2 := par_1,
4965 field3 := par_2
4966 }
4967 function MyFunc( template MyRec mytemp ) {}
4968 control {
4969 MyFunc(MyTemp({"k"},true,6)); // good
4970 MyFunc(MyTemp(6,{"k"},true)); // error
4971 }
4972 }
4973 <END_MODULE>
4974 <RESULT IF_PASS COUNT 1>
4975 (?im)\berror\b.+?Record.+?expected
4976 <END_RESULT>
4977 <RESULT IF_PASS COUNT 1>
4978 (?im)\berror\b.+?boolean.+?expected
4979 <END_RESULT>
4980 <RESULT IF_PASS COUNT 1>
4981 (?im)\berror\b.+?integer.+?expected
4982 <END_RESULT>
4983 <RESULT IF_PASS COUNT 3>
4984 (?is)\berror:
4985 <END_RESULT>
4986 <RESULT IF_PASS POSITIVE>
4987 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
4988 <END_RESULT>
4989
4990 <END_TC>
4991 :exmp.
4992
4993 .*---------------------------------------------------------------------*
4994 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Template: template
4995 .*---------------------------------------------------------------------*
4996 :xmp tab=0.
4997 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Template: template>
4998
4999 <COMPILE>
5000 <VERDICT_LEAF PASS>
5001 <MODULE TTCN ModuleA ModuleA.ttcn>
5002 module ModuleA {
5003 type record MyRec {
5004 float field1,
5005 charstring field2,
5006 boolean field3
5007 }
5008 template MyRec MyTemp( charstring par_1, boolean par_2, template float par_3 ) := {
5009 field1 := par_3,
5010 field2 := par_1,
5011 field3 := par_2
5012 }
5013 function MyFunc( template MyRec mytemp ) {}
5014 control {
5015 MyFunc(MyTemp("r",true,6.4)); // good
5016 MyFunc(MyTemp(6,"r",true)); // error
5017 }
5018 }
5019 <END_MODULE>
5020 <RESULT IF_PASS COUNT 1>
5021 (?im)\berror\b.+?character string.+?expected
5022 <END_RESULT>
5023 <RESULT IF_PASS COUNT 1>
5024 (?im)\berror\b.+?boolean.+?expected
5025 <END_RESULT>
5026 <RESULT IF_PASS COUNT 1>
5027 (?im)\berror\b.+?float.+?expected
5028 <END_RESULT>
5029 <RESULT IF_PASS COUNT 3>
5030 (?is)\berror:
5031 <END_RESULT>
5032 <RESULT IF_PASS POSITIVE>
5033 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5034 <END_RESULT>
5035
5036 <END_TC>
5037 :exmp.
5038
5039 .*---------------------------------------------------------------------*
5040 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Template: component type
5041 .*---------------------------------------------------------------------*
5042 :xmp tab=0.
5043 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Template: component type>
5044
5045 <COMPILE>
5046 <VERDICT_LEAF PASS>
5047 <MODULE TTCN ModuleA ModuleA.ttcn>
5048 module ModuleA {
5049 type component MyCT {}
5050 type record MyRec {
5051 float field1,
5052 charstring field2,
5053 MyCT field3
5054 }
5055 template MyRec MyTemp( charstring par_1, MyCT par_2, float par_3 ) := {
5056 field1 := par_3,
5057 field2 := par_1,
5058 field3 := par_2
5059 }
5060 function MyFunc( template MyRec mytemp ) {}
5061 control {
5062 var MyCT myct_1;
5063 var integer myct_2;
5064 MyFunc(MyTemp("r",myct_1,6.2)); // good
5065 MyFunc(MyTemp(6.2,myct_1,"r")); // error
5066 MyFunc(MyTemp("r",myct_2,6.2)); // error
5067 }
5068 }
5069 <END_MODULE>
5070 <RESULT IF_PASS COUNT 1>
5071 (?im)\berror\b.+?character string.+?expected
5072 <END_RESULT>
5073 <RESULT IF_PASS COUNT 1>
5074 (?im)\berror\b.+?float.+?expected
5075 <END_RESULT>
5076 <RESULT IF_PASS COUNT 1>
5077 (?im)\berror\b.+?Type.+?mismatch.+?MyCT.+?expected
5078 <END_RESULT>
5079 <RESULT IF_PASS COUNT 3>
5080 (?is)\berror:
5081 <END_RESULT>
5082 <RESULT IF_PASS POSITIVE>
5083 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5084 <END_RESULT>
5085
5086 <END_TC>
5087 :exmp.
5088
5089 .*---------------------------------------------------------------------*
5090 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Template: default
5091 .*---------------------------------------------------------------------*
5092 :xmp tab=0.
5093 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Template: default>
5094
5095 <COMPILE>
5096 <VERDICT_LEAF PASS>
5097 <MODULE TTCN ModuleA ModuleA.ttcn>
5098 module ModuleA {
5099 type component MyCT {}
5100 type record MyRec {
5101 float field1,
5102 charstring field2,
5103 default field3
5104 }
5105 template MyRec MyTemp( charstring par_1, default par_2, float par_3 ) := {
5106 field1 := par_3,
5107 field2 := par_1,
5108 field3 := par_2
5109 }
5110 function MyFunc( template MyRec mytemp ) {}
5111 control {
5112 var default mydef_1;
5113 var octetstring mydef_2;
5114 MyFunc(MyTemp("r",mydef_1,6.2)); // good
5115 MyFunc(MyTemp(6.2,mydef_1,"r")); // error
5116 MyFunc(MyTemp("r",mydef_2,6.2)); // error
5117 }
5118 }
5119 <END_MODULE>
5120 <RESULT IF_PASS COUNT 1>
5121 (?im)\berror\b.+?character string.+?expected
5122 <END_RESULT>
5123 <RESULT IF_PASS COUNT 1>
5124 (?im)\berror\b.+?float.+?expected
5125 <END_RESULT>
5126 <RESULT IF_PASS COUNT 1>
5127 (?im)\berror\b.+?Type.+?mismatch.+?default.+?expected
5128 <END_RESULT>
5129 <RESULT IF_PASS COUNT 3>
5130 (?is)\berror:
5131 <END_RESULT>
5132 <RESULT IF_PASS POSITIVE>
5133 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5134 <END_RESULT>
5135
5136 <END_TC>
5137 :exmp.
5138
5139 .*---------------------------------------------------------------------*
5140 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Template: basic type as non-mandatory parameter
5141 .*---------------------------------------------------------------------*
5142 :xmp tab=0.
5143 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Template: basic type as non-mandatory parameter>
5144
5145 <COMPILE>
5146 <VERDICT_LEAF PASS>
5147 <MODULE TTCN ModuleA ModuleA.ttcn>
5148 module ModuleA {
5149 type record MyRec {
5150 integer field1,
5151 charstring field2,
5152 boolean field3
5153 }
5154 template MyRec MyTemp( charstring par_1 := 1, boolean par_2 := 1, integer par_3 := "r") := {
5155 field1 := par_3,
5156 field2 := par_1,
5157 field3 := par_2
5158 }
5159 }
5160 <END_MODULE>
5161 <RESULT IF_PASS COUNT 1>
5162 (?im)\berror\b.+?character.+?expected
5163 <END_RESULT>
5164 <RESULT IF_PASS COUNT 1>
5165 (?im)\berror\b.+?boolean.+?expected
5166 <END_RESULT>
5167 <RESULT IF_PASS COUNT 1>
5168 (?im)\berror\b.+?integer.+?expected
5169 <END_RESULT>
5170 <RESULT IF_PASS COUNT 3>
5171 (?is)\berror:
5172 <END_RESULT>
5173 <RESULT IF_PASS POSITIVE>
5174 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5175 <END_RESULT>
5176
5177 <END_TC>
5178 :exmp.
5179
5180 .*---------------------------------------------------------------------*
5181 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Function: basic type
5182 .*---------------------------------------------------------------------*
5183 :xmp tab=0.
5184 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Function: basic type>
5185
5186 <COMPILE>
5187 <VERDICT_LEAF PASS>
5188 <MODULE TTCN ModuleA ModuleA.ttcn>
5189 module ModuleA {
5190 function MyFunc( charstring par_1, boolean par_2, integer par_3 ) {}
5191 control {
5192 MyFunc( "r",true,2 ); // good
5193 MyFunc( "r",true,6.2 ); // error
5194 }
5195 }
5196 <END_MODULE>
5197 <RESULT IF_PASS COUNT 1>
5198 (?im)\berror\b.+?integer.+?expected
5199 <END_RESULT>
5200 <RESULT IF_PASS COUNT 1>
5201 (?is)\berror:
5202 <END_RESULT>
5203 <RESULT IF_PASS POSITIVE>
5204 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5205 <END_RESULT>
5206
5207 <END_TC>
5208 :exmp.
5209
5210 .*---------------------------------------------------------------------*
5211 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Function: user-defined type
5212 .*---------------------------------------------------------------------*
5213 :xmp tab=0.
5214 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Function: user-defined type>
5215
5216 <COMPILE>
5217 <VERDICT_LEAF PASS>
5218 <MODULE TTCN ModuleA ModuleA.ttcn>
5219 module ModuleA {
5220 type record MyRec {
5221 integer field1,
5222 charstring field2,
5223 boolean field3
5224 }
5225 function MyFunc( MyRec par ) {}
5226 control {
5227 MyFunc( {6,"r",true} ); // good
5228 MyFunc( {"r",true,6.2} ); // error
5229 MyFunc( 5 ); // error
5230 }
5231 }
5232 <END_MODULE>
5233 <RESULT IF_PASS COUNT 1>
5234 (?im)\berror\b.+?integer.+?expected
5235 <END_RESULT>
5236 <RESULT IF_PASS COUNT 1>
5237 (?im)\berror\b.+?character string.+?expected
5238 <END_RESULT>
5239 <RESULT IF_PASS COUNT 1>
5240 (?im)\berror\b.+?boolean.+?expected
5241 <END_RESULT>
5242 <RESULT IF_PASS COUNT 1>
5243 (?im)\berror\b.+?Record.+?expected
5244 <END_RESULT>
5245 <RESULT IF_PASS COUNT 4>
5246 (?is)\berror:
5247 <END_RESULT>
5248 <RESULT IF_PASS POSITIVE>
5249 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5250 <END_RESULT>
5251
5252 <END_TC>
5253 :exmp.
5254
5255 .*---------------------------------------------------------------------*
5256 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Function: address type
5257 .*---------------------------------------------------------------------*
5258 :xmp tab=0.
5259 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Function: address type>
5260
5261 <COMPILE>
5262 <VERDICT_LEAF PASS>
5263 <MODULE TTCN ModuleA ModuleA.ttcn>
5264 module ModuleA {
5265 type record address { charstring field }
5266 function MyFunc( address par_1, octetstring par_2 ) {}
5267 control {
5268 MyFunc( {"k"}, 'A5'O ); // good
5269 MyFunc( 'A5'O, "k" ); // error
5270 }
5271 }
5272 <END_MODULE>
5273 <RESULT IF_PASS COUNT 1>
5274 (?im)\berror\b.+?Record.+?expected
5275 <END_RESULT>
5276 <RESULT IF_PASS COUNT 1>
5277 (?im)\berror\b.+?octetstring.+?expected
5278 <END_RESULT>
5279 <RESULT IF_PASS COUNT 2>
5280 (?is)\berror:
5281 <END_RESULT>
5282 <RESULT IF_PASS POSITIVE>
5283 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5284 <END_RESULT>
5285
5286 <END_TC>
5287 :exmp.
5288
5289 .*---------------------------------------------------------------------*
5290 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Function: template
5291 .*---------------------------------------------------------------------*
5292 :xmp tab=0.
5293 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Function: template>
5294
5295 <COMPILE>
5296 <VERDICT_LEAF PASS>
5297 <MODULE TTCN ModuleA ModuleA.ttcn>
5298 module ModuleA {
5299 template float MyTemp_1( float par ) := par;
5300 template integer MyTemp_2( integer par ) := par;
5301 function MyFunc( template float par_1, template integer par_2 ) {}
5302 control {
5303 MyFunc( MyTemp_1(6.3), MyTemp_2(6) ); // good
5304 MyFunc( 6.3, 6 ); // good
5305 MyFunc( MyTemp_1(6), 6.9 ); // error
5306 }
5307 }
5308 <END_MODULE>
5309 <RESULT IF_PASS COUNT 1>
5310 (?im)\berror\b.+?float.+?expected
5311 <END_RESULT>
5312 <RESULT IF_PASS COUNT 1>
5313 (?im)\berror\b.+?integer.+?expected
5314 <END_RESULT>
5315 <RESULT IF_PASS COUNT 2>
5316 (?is)\berror:
5317 <END_RESULT>
5318 <RESULT IF_PASS POSITIVE>
5319 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5320 <END_RESULT>
5321
5322 <END_TC>
5323 :exmp.
5324
5325 .*---------------------------------------------------------------------*
5326 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Function: component type
5327 .*---------------------------------------------------------------------*
5328 :xmp tab=0.
5329 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Function: component type>
5330
5331 <COMPILE>
5332 <VERDICT_LEAF PASS>
5333 <MODULE TTCN ModuleA ModuleA.ttcn>
5334 module ModuleA {
5335 type component MyCT {}
5336 function MyFunc( bitstring par_1, MyCT par_2, float par_3 ) {}
5337 control {
5338 var MyCT myct_1;
5339 var integer myct_2;
5340 MyFunc( '01001'B, myct_1, 6.2 ); // good
5341 MyFunc( 7.6, myct_1, '01001'B ); // error
5342 MyFunc( '01001'B, myct_2, 6.2 ); // error
5343 }
5344 }
5345 <END_MODULE>
5346 <RESULT IF_PASS COUNT 1>
5347 (?im)\berror\b.+?bitstring.+?expected
5348 <END_RESULT>
5349 <RESULT IF_PASS COUNT 1>
5350 (?im)\berror\b.+?float.+?expected
5351 <END_RESULT>
5352 <RESULT IF_PASS COUNT 1>
5353 (?im)\berror\b.+?Type.+?mismatch.+?MyCT.+?expected
5354 <END_RESULT>
5355 <RESULT IF_PASS COUNT 3>
5356 (?is)\berror:
5357 <END_RESULT>
5358 <RESULT IF_PASS POSITIVE>
5359 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5360 <END_RESULT>
5361
5362 <END_TC>
5363 :exmp.
5364
5365 .*---------------------------------------------------------------------*
5366 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Function: port type
5367 .*---------------------------------------------------------------------*
5368 :xmp tab=0.
5369 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Function: port type>
5370
5371 <COMPILE>
5372 <VERDICT_LEAF PASS>
5373 <MODULE TTCN ModuleA ModuleA.ttcn>
5374 module ModuleA {
5375 type port MyPortType message { inout integer }
5376 type component MyCT {
5377 port MyPortType port_1;
5378 var integer port_2;
5379 }
5380 function MyCompFunc() runs on MyCT {
5381 MyFunc( '01001'B, port_1, 6.2 ); // good
5382 MyFunc( 7.6, port_1, '01001'B ); // error
5383 MyFunc( '01001'B, port_2, 6.2 ); // error
5384 }
5385 function MyFunc( bitstring par_1, MyPortType par_2, float par_3 ) {}
5386 }
5387 <END_MODULE>
5388 <RESULT IF_PASS COUNT 1>
5389 (?im)\berror\b.+?bitstring.+?expected
5390 <END_RESULT>
5391 <RESULT IF_PASS COUNT 1>
5392 (?im)\berror\b.+?float.+?expected
5393 <END_RESULT>
5394 <RESULT IF_PASS COUNT 1>
5395 (?im)\berror\b.+?Reference.+?port.+?expected
5396 <END_RESULT>
5397 <RESULT IF_PASS COUNT 3>
5398 (?is)\berror:
5399 <END_RESULT>
5400 <RESULT IF_PASS POSITIVE>
5401 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5402 <END_RESULT>
5403
5404 <END_TC>
5405 :exmp.
5406
5407 .*---------------------------------------------------------------------*
5408 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Function: default
5409 .*---------------------------------------------------------------------*
5410 :xmp tab=0.
5411 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Function: default>
5412
5413 <COMPILE>
5414 <VERDICT_LEAF PASS>
5415 <MODULE TTCN ModuleA ModuleA.ttcn>
5416 module ModuleA {
5417 function MyFunc( hexstring par_1, default par_2, float par_3 ) {}
5418 control {
5419 var default mydef_1;
5420 var charstring mydef_2;
5421 MyFunc( '7AA'H, mydef_1, 6.2 ); // good
5422 MyFunc( 6.2, mydef_1, '7AA'H ); // error
5423 MyFunc( '7AA'H, mydef_2, 6.2 ); // error
5424 }
5425 }
5426 <END_MODULE>
5427 <RESULT IF_PASS COUNT 1>
5428 (?im)\berror\b.+?hexstring.+?expected
5429 <END_RESULT>
5430 <RESULT IF_PASS COUNT 1>
5431 (?im)\berror\b.+?float.+?expected
5432 <END_RESULT>
5433 <RESULT IF_PASS COUNT 1>
5434 (?im)\berror\b.+?Type.+?mismatch.+?default.+?expected
5435 <END_RESULT>
5436 <RESULT IF_PASS COUNT 3>
5437 (?is)\berror:
5438 <END_RESULT>
5439 <RESULT IF_PASS POSITIVE>
5440 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5441 <END_RESULT>
5442
5443 <END_TC>
5444 :exmp.
5445
5446 .*---------------------------------------------------------------------*
5447 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Function: timer
5448 .*---------------------------------------------------------------------*
5449 :xmp tab=0.
5450 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Function: timer>
5451
5452 <COMPILE>
5453 <VERDICT_LEAF PASS>
5454 <MODULE TTCN ModuleA ModuleA.ttcn>
5455 module ModuleA {
5456 function MyFunc( hexstring par_1, timer par_2, float par_3 ) {}
5457 control {
5458 timer T_1;
5459 var bitstring T_2;
5460 MyFunc( '7AA'H, T_1, 6.2 ); // good
5461 MyFunc( 6.2, T_1, '7AA'H ); // error
5462 MyFunc( '7AA'H, T_2, 6.2 ); // error
5463 }
5464 }
5465 <END_MODULE>
5466 <RESULT IF_PASS COUNT 1>
5467 (?im)\berror\b.+?hexstring.+?expected
5468 <END_RESULT>
5469 <RESULT IF_PASS COUNT 1>
5470 (?im)\berror\b.+?float.+?expected
5471 <END_RESULT>
5472 <RESULT IF_PASS COUNT 1>
5473 (?im)\berror\b.+?Reference.+?timer.+?expected
5474 <END_RESULT>
5475 <RESULT IF_PASS COUNT 3>
5476 (?is)\berror:
5477 <END_RESULT>
5478 <RESULT IF_PASS POSITIVE>
5479 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5480 <END_RESULT>
5481
5482 <END_TC>
5483 :exmp.
5484
5485 .*---------------------------------------------------------------------*
5486 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Function: basic type as non-mandatory parameter
5487 .*---------------------------------------------------------------------*
5488 :xmp tab=0.
5489 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Function: basic type as non-mandatory parameter>
5490
5491 <COMPILE>
5492 <VERDICT_LEAF PASS>
5493 <MODULE TTCN ModuleA ModuleA.ttcn>
5494 module ModuleA {
5495 function MyFunc( charstring par_1 := 1, boolean par_2 := 1, integer par_3 := "r") {}
5496 }
5497 <END_MODULE>
5498 <RESULT IF_PASS COUNT 1>
5499 (?im)\berror\b.+?character.+?expected
5500 <END_RESULT>
5501 <RESULT IF_PASS COUNT 1>
5502 (?im)\berror\b.+?boolean.+?expected
5503 <END_RESULT>
5504 <RESULT IF_PASS COUNT 1>
5505 (?im)\berror\b.+?integer.+?expected
5506 <END_RESULT>
5507 <RESULT IF_PASS COUNT 3>
5508 (?is)\berror:
5509 <END_RESULT>
5510 <RESULT IF_PASS POSITIVE>
5511 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5512 <END_RESULT>
5513
5514 <END_TC>
5515 :exmp.
5516
5517 .*---------------------------------------------------------------------*
5518 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Function_runs_on: basic type
5519 .*---------------------------------------------------------------------*
5520 :xmp tab=0.
5521 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Function_runs_on: basic type>
5522
5523 <COMPILE>
5524 <VERDICT_LEAF PASS>
5525 <MODULE TTCN ModuleA ModuleA.ttcn>
5526 module ModuleA {
5527 type component MyCT {}
5528 function MyCompFunc( charstring par_1, boolean par_2, integer par_3 ) runs on MyCT {}
5529 function MyCompFunc1() runs on MyCT {
5530 MyCompFunc( "r",true,2 ); // good
5531 MyCompFunc( "r",true,6.2 ); // error
5532 }
5533 }
5534 <END_MODULE>
5535 <RESULT IF_PASS COUNT 1>
5536 (?im)\berror\b.+?integer.+?expected
5537 <END_RESULT>
5538 <RESULT IF_PASS COUNT 1>
5539 (?is)\berror:
5540 <END_RESULT>
5541 <RESULT IF_PASS POSITIVE>
5542 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5543 <END_RESULT>
5544
5545 <END_TC>
5546 :exmp.
5547
5548 .*---------------------------------------------------------------------*
5549 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Function_runs_on: user-defined type
5550 .*---------------------------------------------------------------------*
5551 :xmp tab=0.
5552 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Function_runs_on: user-defined type>
5553
5554 <COMPILE>
5555 <VERDICT_LEAF PASS>
5556 <MODULE TTCN ModuleA ModuleA.ttcn>
5557 module ModuleA {
5558 type component MyCT {}
5559 type record MyRec {
5560 integer field1,
5561 charstring field2,
5562 boolean field3
5563 }
5564 function MyCompFunc( MyRec par ) runs on MyCT {}
5565 function MyCompFunc1() runs on MyCT {
5566 MyCompFunc( {6,"r",true} ); // good
5567 MyCompFunc( {"r",true,6.2} ); // error
5568 MyCompFunc( 5 ); // error
5569 }
5570 }
5571 <END_MODULE>
5572 <RESULT IF_PASS COUNT 1>
5573 (?im)\berror\b.+?integer.+?expected
5574 <END_RESULT>
5575 <RESULT IF_PASS COUNT 1>
5576 (?im)\berror\b.+?character string.+?expected
5577 <END_RESULT>
5578 <RESULT IF_PASS COUNT 1>
5579 (?im)\berror\b.+?boolean.+?expected
5580 <END_RESULT>
5581 <RESULT IF_PASS COUNT 1>
5582 (?im)\berror\b.+?Record.+?expected
5583 <END_RESULT>
5584 <RESULT IF_PASS COUNT 4>
5585 (?is)\berror:
5586 <END_RESULT>
5587 <RESULT IF_PASS POSITIVE>
5588 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5589 <END_RESULT>
5590
5591 <END_TC>
5592 :exmp.
5593
5594 .*---------------------------------------------------------------------*
5595 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Function_runs_on: address type
5596 .*---------------------------------------------------------------------*
5597 :xmp tab=0.
5598 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Function_runs_on: address type>
5599
5600 <COMPILE>
5601 <VERDICT_LEAF PASS>
5602 <MODULE TTCN ModuleA ModuleA.ttcn>
5603 module ModuleA {
5604 type component MyCT {}
5605 type record address { charstring field }
5606 function MyCompFunc( address par_1, octetstring par_2 ) runs on MyCT {}
5607 function MyCompFunc1() runs on MyCT {
5608 MyCompFunc( {"k"}, 'A5'O ); // good
5609 MyCompFunc( 'A5'O, "k" ); // error
5610 }
5611 }
5612 <END_MODULE>
5613 <RESULT IF_PASS COUNT 1>
5614 (?im)\berror\b.+?Record.+?expected
5615 <END_RESULT>
5616 <RESULT IF_PASS COUNT 1>
5617 (?im)\berror\b.+?octetstring.+?expected
5618 <END_RESULT>
5619 <RESULT IF_PASS COUNT 2>
5620 (?is)\berror:
5621 <END_RESULT>
5622 <RESULT IF_PASS POSITIVE>
5623 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5624 <END_RESULT>
5625
5626 <END_TC>
5627 :exmp.
5628
5629 .*---------------------------------------------------------------------*
5630 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Function_runs_on: template
5631 .*---------------------------------------------------------------------*
5632 :xmp tab=0.
5633 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Function_runs_on: template>
5634
5635 <COMPILE>
5636 <VERDICT_LEAF PASS>
5637 <MODULE TTCN ModuleA ModuleA.ttcn>
5638 module ModuleA {
5639 type component MyCT {}
5640 template float MyTemp_1( float par ) := par;
5641 template integer MyTemp_2( integer par ) := par;
5642 function MyCompFunc( template float par_1, template integer par_2 ) runs on MyCT {}
5643 function MyCompFunc1() runs on MyCT {
5644 MyCompFunc( MyTemp_1(6.3), MyTemp_2(6) ); // good
5645 MyCompFunc( 6.3, 6 ); // good
5646 MyCompFunc( MyTemp_1(6), 6.9 ); // error
5647 }
5648 }
5649 <END_MODULE>
5650 <RESULT IF_PASS COUNT 1>
5651 (?im)\berror\b.+?float.+?expected
5652 <END_RESULT>
5653 <RESULT IF_PASS COUNT 1>
5654 (?im)\berror\b.+?integer.+?expected
5655 <END_RESULT>
5656 <RESULT IF_PASS COUNT 2>
5657 (?is)\berror:
5658 <END_RESULT>
5659 <RESULT IF_PASS POSITIVE>
5660 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5661 <END_RESULT>
5662
5663 <END_TC>
5664 :exmp.
5665
5666 .*---------------------------------------------------------------------*
5667 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Function_runs_on: component type
5668 .*---------------------------------------------------------------------*
5669 :xmp tab=0.
5670 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Function_runs_on: component type>
5671
5672 <COMPILE>
5673 <VERDICT_LEAF PASS>
5674 <MODULE TTCN ModuleA ModuleA.ttcn>
5675 module ModuleA {
5676 type component MyCT {}
5677 function MyCompFunc( bitstring par_1, MyCT par_2, float par_3 ) runs on MyCT {}
5678 function MyCompFunc1() runs on MyCT {
5679 var MyCT myct_1;
5680 var integer myct_2;
5681 MyCompFunc( '01001'B, myct_1, 6.2 ); // good
5682 MyCompFunc( 7.6, myct_1, '01001'B ); // error
5683 MyCompFunc( '01001'B, myct_2, 6.2 ); // error
5684 }
5685 }
5686 <END_MODULE>
5687 <RESULT IF_PASS COUNT 1>
5688 (?im)\berror\b.+?bitstring.+?expected
5689 <END_RESULT>
5690 <RESULT IF_PASS COUNT 1>
5691 (?im)\berror\b.+?float.+?expected
5692 <END_RESULT>
5693 <RESULT IF_PASS COUNT 1>
5694 (?im)\berror\b.+?Type.+?mismatch.+?MyCT.+?expected
5695 <END_RESULT>
5696 <RESULT IF_PASS COUNT 3>
5697 (?is)\berror:
5698 <END_RESULT>
5699 <RESULT IF_PASS POSITIVE>
5700 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5701 <END_RESULT>
5702
5703 <END_TC>
5704 :exmp.
5705
5706 .*---------------------------------------------------------------------*
5707 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Function_runs_on: port type
5708 .*---------------------------------------------------------------------*
5709 :xmp tab=0.
5710 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Function_runs_on: port type>
5711
5712 <COMPILE>
5713 <VERDICT_LEAF PASS>
5714 <MODULE TTCN ModuleA ModuleA.ttcn>
5715 module ModuleA {
5716 type port MyPortType message { inout integer }
5717 type component MyCT {
5718 port MyPortType port_1;
5719 var integer port_2;
5720 }
5721 function MyCompFunc( bitstring par_1, MyPortType par_2, float par_3 ) runs on MyCT {}
5722 function MyCompFunc1() runs on MyCT {
5723 MyCompFunc( '01001'B, port_1, 6.2 ); // good
5724 MyCompFunc( 7.6, port_1, '01001'B ); // error
5725 MyCompFunc( '01001'B, port_2, 6.2 ); // error
5726 }
5727 }
5728 <END_MODULE>
5729 <RESULT IF_PASS COUNT 1>
5730 (?im)\berror\b.+?bitstring.+?expected
5731 <END_RESULT>
5732 <RESULT IF_PASS COUNT 1>
5733 (?im)\berror\b.+?float.+?expected
5734 <END_RESULT>
5735 <RESULT IF_PASS COUNT 1>
5736 (?im)\berror\b.+?Reference.+?port.+?expected
5737 <END_RESULT>
5738 <RESULT IF_PASS COUNT 3>
5739 (?is)\berror:
5740 <END_RESULT>
5741 <RESULT IF_PASS POSITIVE>
5742 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5743 <END_RESULT>
5744
5745 <END_TC>
5746 :exmp.
5747
5748 .*---------------------------------------------------------------------*
5749 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Function_runs_on: default
5750 .*---------------------------------------------------------------------*
5751 :xmp tab=0.
5752 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Function_runs_on: default>
5753
5754 <COMPILE>
5755 <VERDICT_LEAF PASS>
5756 <MODULE TTCN ModuleA ModuleA.ttcn>
5757 module ModuleA {
5758 type component MyCT {}
5759 function MyCompFunc( hexstring par_1, default par_2, float par_3 ) runs on MyCT {}
5760 function MyCompFunc1() runs on MyCT {
5761 var default mydef_1;
5762 var charstring mydef_2;
5763 MyCompFunc( '7AA'H, mydef_1, 6.2 ); // good
5764 MyCompFunc( 6.2, mydef_1, '7AA'H ); // error
5765 MyCompFunc( '7AA'H, mydef_2, 6.2 ); // error
5766 }
5767 }
5768 <END_MODULE>
5769 <RESULT IF_PASS COUNT 1>
5770 (?im)\berror\b.+?hexstring.+?expected
5771 <END_RESULT>
5772 <RESULT IF_PASS COUNT 1>
5773 (?im)\berror\b.+?float.+?expected
5774 <END_RESULT>
5775 <RESULT IF_PASS COUNT 1>
5776 (?im)\berror\b.+?Type.+?mismatch.+?default.+?expected
5777 <END_RESULT>
5778 <RESULT IF_PASS COUNT 3>
5779 (?is)\berror:
5780 <END_RESULT>
5781 <RESULT IF_PASS POSITIVE>
5782 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5783 <END_RESULT>
5784
5785 <END_TC>
5786 :exmp.
5787
5788 .*---------------------------------------------------------------------*
5789 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Function_runs_on: timer
5790 .*---------------------------------------------------------------------*
5791 :xmp tab=0.
5792 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Function_runs_on: timer>
5793
5794 <COMPILE>
5795 <VERDICT_LEAF PASS>
5796 <MODULE TTCN ModuleA ModuleA.ttcn>
5797 module ModuleA {
5798 type component MyCT {}
5799 function MyCompFunc( hexstring par_1, timer par_2, float par_3 ) runs on MyCT {}
5800 function MyCompFunc1() runs on MyCT {
5801 timer T_1;
5802 var bitstring T_2;
5803 MyCompFunc( '7AA'H, T_1, 6.2 ); // good
5804 MyCompFunc( 6.2, T_1, '7AA'H ); // error
5805 MyCompFunc( '7AA'H, T_2, 6.2 ); // error
5806 }
5807 }
5808 <END_MODULE>
5809 <RESULT IF_PASS COUNT 1>
5810 (?im)\berror\b.+?hexstring.+?expected
5811 <END_RESULT>
5812 <RESULT IF_PASS COUNT 1>
5813 (?im)\berror\b.+?float.+?expected
5814 <END_RESULT>
5815 <RESULT IF_PASS COUNT 1>
5816 (?im)\berror\b.+?Reference.+?timer.+?expected
5817 <END_RESULT>
5818 <RESULT IF_PASS COUNT 3>
5819 (?is)\berror:
5820 <END_RESULT>
5821 <RESULT IF_PASS POSITIVE>
5822 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5823 <END_RESULT>
5824
5825 <END_TC>
5826 :exmp.
5827
5828 .*---------------------------------------------------------------------*
5829 :h4.TTCN-3::TypeMismatchActualFormalParameterList->External Function: basic type
5830 .*---------------------------------------------------------------------*
5831 :xmp tab=0.
5832 <TC - TTCN-3::TypeMismatchActualFormalParameterList->External Function: basic type>
5833
5834 <COMPILE>
5835 <VERDICT_LEAF PASS>
5836 <MODULE TTCN ModuleA ModuleA.ttcn>
5837 module ModuleA {
5838 external function MyExtFunc( charstring par_1, boolean par_2, integer par_3 );
5839 control {
5840 MyExtFunc( "r",true,2 ); // good
5841 MyExtFunc( "r",true,6.2 ); // error
5842 }
5843 }
5844 <END_MODULE>
5845 <RESULT IF_PASS COUNT 1>
5846 (?im)\berror\b.+?integer.+?expected
5847 <END_RESULT>
5848 <RESULT IF_PASS COUNT 1>
5849 (?is)\berror:
5850 <END_RESULT>
5851 <RESULT IF_PASS POSITIVE>
5852 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5853 <END_RESULT>
5854
5855 <END_TC>
5856 :exmp.
5857
5858 .*---------------------------------------------------------------------*
5859 :h4.TTCN-3::TypeMismatchActualFormalParameterList->External Function: user-defined type
5860 .*---------------------------------------------------------------------*
5861 :xmp tab=0.
5862 <TC - TTCN-3::TypeMismatchActualFormalParameterList->External Function: user-defined type>
5863
5864 <COMPILE>
5865 <VERDICT_LEAF PASS>
5866 <MODULE TTCN ModuleA ModuleA.ttcn>
5867 module ModuleA {
5868 type record MyRec {
5869 integer field1,
5870 charstring field2,
5871 boolean field3
5872 }
5873 external function MyExtFunc( MyRec par );
5874 control {
5875 MyExtFunc( {6,"r",true} ); // good
5876 MyExtFunc( {"r",true,6.2} ); // error
5877 MyExtFunc( 5 ); // error
5878 }
5879 }
5880 <END_MODULE>
5881 <RESULT IF_PASS COUNT 1>
5882 (?im)\berror\b.+?integer.+?expected
5883 <END_RESULT>
5884 <RESULT IF_PASS COUNT 1>
5885 (?im)\berror\b.+?character string.+?expected
5886 <END_RESULT>
5887 <RESULT IF_PASS COUNT 1>
5888 (?im)\berror\b.+?boolean.+?expected
5889 <END_RESULT>
5890 <RESULT IF_PASS COUNT 1>
5891 (?im)\berror\b.+?Record.+?expected
5892 <END_RESULT>
5893 <RESULT IF_PASS COUNT 4>
5894 (?is)\berror:
5895 <END_RESULT>
5896 <RESULT IF_PASS POSITIVE>
5897 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5898 <END_RESULT>
5899
5900 <END_TC>
5901 :exmp.
5902
5903 .*---------------------------------------------------------------------*
5904 :h4.TTCN-3::TypeMismatchActualFormalParameterList->External Function: address type
5905 .*---------------------------------------------------------------------*
5906 :xmp tab=0.
5907 <TC - TTCN-3::TypeMismatchActualFormalParameterList->External Function: address type>
5908
5909 <COMPILE>
5910 <VERDICT_LEAF PASS>
5911 <MODULE TTCN ModuleA ModuleA.ttcn>
5912 module ModuleA {
5913 type record address { charstring field }
5914 external function MyExtFunc( address par_1, octetstring par_2 );
5915 control {
5916 MyExtFunc( {"k"}, 'A5'O ); // good
5917 MyExtFunc( 'A5'O, "k" ); // error
5918 }
5919 }
5920 <END_MODULE>
5921 <RESULT IF_PASS COUNT 1>
5922 (?im)\berror\b.+?Record.+?expected
5923 <END_RESULT>
5924 <RESULT IF_PASS COUNT 1>
5925 (?im)\berror\b.+?octetstring.+?expected
5926 <END_RESULT>
5927 <RESULT IF_PASS COUNT 2>
5928 (?is)\berror:
5929 <END_RESULT>
5930 <RESULT IF_PASS POSITIVE>
5931 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5932 <END_RESULT>
5933
5934 <END_TC>
5935 :exmp.
5936
5937 .*---------------------------------------------------------------------*
5938 :h4.TTCN-3::TypeMismatchActualFormalParameterList->External Function: template
5939 .*---------------------------------------------------------------------*
5940 :xmp tab=0.
5941 <TC - TTCN-3::TypeMismatchActualFormalParameterList->External Function: template>
5942
5943 <COMPILE>
5944 <VERDICT_LEAF PASS>
5945 <MODULE TTCN ModuleA ModuleA.ttcn>
5946 module ModuleA {
5947 template float MyTemp_1( float par ) := par;
5948 template integer MyTemp_2( integer par ) := par;
5949 external function MyExtFunc( template float par_1, template integer par_2 );
5950 control {
5951 MyExtFunc( MyTemp_1(6.3), MyTemp_2(6) ); // good
5952 MyExtFunc( 6.3, 6 ); // good
5953 MyExtFunc( MyTemp_1(6), 6.9 ); // error
5954 }
5955 }
5956 <END_MODULE>
5957 <RESULT IF_PASS COUNT 1>
5958 (?im)\berror\b.+?float.+?expected
5959 <END_RESULT>
5960 <RESULT IF_PASS COUNT 1>
5961 (?im)\berror\b.+?integer.+?expected
5962 <END_RESULT>
5963 <RESULT IF_PASS COUNT 2>
5964 (?is)\berror:
5965 <END_RESULT>
5966 <RESULT IF_PASS POSITIVE>
5967 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
5968 <END_RESULT>
5969
5970 <END_TC>
5971 :exmp.
5972
5973 .*---------------------------------------------------------------------*
5974 :h4.TTCN-3::TypeMismatchActualFormalParameterList->External Function: component type
5975 .*---------------------------------------------------------------------*
5976 :xmp tab=0.
5977 <TC - TTCN-3::TypeMismatchActualFormalParameterList->External Function: component type>
5978
5979 <COMPILE>
5980 <VERDICT_LEAF PASS>
5981 <MODULE TTCN ModuleA ModuleA.ttcn>
5982 module ModuleA {
5983 type component MyCT {}
5984 external function MyExtFunc( bitstring par_1, MyCT par_2, float par_3 );
5985 control {
5986 var MyCT myct_1;
5987 var integer myct_2;
5988 MyExtFunc( '01001'B, myct_1, 6.2 ); // good
5989 MyExtFunc( 7.6, myct_1, '01001'B ); // error
5990 MyExtFunc( '01001'B, myct_2, 6.2 ); // error
5991 }
5992 }
5993 <END_MODULE>
5994 <RESULT IF_PASS COUNT 1>
5995 (?im)\berror\b.+?bitstring.+?expected
5996 <END_RESULT>
5997 <RESULT IF_PASS COUNT 1>
5998 (?im)\berror\b.+?float.+?expected
5999 <END_RESULT>
6000 <RESULT IF_PASS COUNT 1>
6001 (?im)\berror\b.+?Type.+?mismatch.+?MyCT.+?expected
6002 <END_RESULT>
6003 <RESULT IF_PASS COUNT 3>
6004 (?is)\berror:
6005 <END_RESULT>
6006 <RESULT IF_PASS POSITIVE>
6007 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6008 <END_RESULT>
6009
6010 <END_TC>
6011 :exmp.
6012
6013 .*---------------------------------------------------------------------*
6014 :h4.TTCN-3::TypeMismatchActualFormalParameterList->External Function: port type
6015 .*---------------------------------------------------------------------*
6016 :xmp tab=0.
6017 <TC - TTCN-3::TypeMismatchActualFormalParameterList->External Function: port type>
6018
6019 <COMPILE>
6020 <VERDICT_LEAF PASS>
6021 <MODULE TTCN ModuleA ModuleA.ttcn>
6022 module ModuleA {
6023 type port MyPortType message { inout integer }
6024 type component MyCT {
6025 port MyPortType port_1;
6026 var integer port_2;
6027 }
6028 function MyCompFunc() runs on MyCT {
6029 MyExtFunc( '01001'B, port_1, 6.2 ); // good
6030 MyExtFunc( 7.6, port_1, '01001'B ); // error
6031 MyExtFunc( '01001'B, port_2, 6.2 ); // error
6032 }
6033 external function MyExtFunc( bitstring par_1, MyPortType par_2, float par_3 );
6034 }
6035 <END_MODULE>
6036 <RESULT IF_PASS COUNT 1>
6037 (?im)\berror\b.+?bitstring.+?expected
6038 <END_RESULT>
6039 <RESULT IF_PASS COUNT 1>
6040 (?im)\berror\b.+?float.+?expected
6041 <END_RESULT>
6042 <RESULT IF_PASS COUNT 1>
6043 (?im)\berror\b.+?Reference.+?port.+?expected
6044 <END_RESULT>
6045 <RESULT IF_PASS COUNT 3>
6046 (?is)\berror:
6047 <END_RESULT>
6048 <RESULT IF_PASS POSITIVE>
6049 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6050 <END_RESULT>
6051
6052 <END_TC>
6053 :exmp.
6054
6055 .*---------------------------------------------------------------------*
6056 :h4.TTCN-3::TypeMismatchActualFormalParameterList->External Function: default
6057 .*---------------------------------------------------------------------*
6058 :xmp tab=0.
6059 <TC - TTCN-3::TypeMismatchActualFormalParameterList->External Function: default>
6060
6061 <COMPILE>
6062 <VERDICT_LEAF PASS>
6063 <MODULE TTCN ModuleA ModuleA.ttcn>
6064 module ModuleA {
6065 external function MyExtFunc( hexstring par_1, default par_2, float par_3 );
6066 control {
6067 var default mydef_1;
6068 var charstring mydef_2;
6069 MyExtFunc( '7AA'H, mydef_1, 6.2 ); // good
6070 MyExtFunc( 6.2, mydef_1, '7AA'H ); // error
6071 MyExtFunc( '7AA'H, mydef_2, 6.2 ); // error
6072 }
6073 }
6074 <END_MODULE>
6075 <RESULT IF_PASS COUNT 1>
6076 (?im)\berror\b.+?hexstring.+?expected
6077 <END_RESULT>
6078 <RESULT IF_PASS COUNT 1>
6079 (?im)\berror\b.+?float.+?expected
6080 <END_RESULT>
6081 <RESULT IF_PASS COUNT 1>
6082 (?im)\berror\b.+?Type.+?mismatch.+?default.+?expected
6083 <END_RESULT>
6084 <RESULT IF_PASS COUNT 3>
6085 (?is)\berror:
6086 <END_RESULT>
6087 <RESULT IF_PASS POSITIVE>
6088 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6089 <END_RESULT>
6090
6091 <END_TC>
6092 :exmp.
6093
6094 .*---------------------------------------------------------------------*
6095 :h4.TTCN-3::TypeMismatchActualFormalParameterList->External Function: timer
6096 .*---------------------------------------------------------------------*
6097 :xmp tab=0.
6098 <TC - TTCN-3::TypeMismatchActualFormalParameterList->External Function: timer>
6099
6100 <COMPILE>
6101 <VERDICT_LEAF PASS>
6102 <MODULE TTCN ModuleA ModuleA.ttcn>
6103 module ModuleA {
6104 external function MyExtFunc( hexstring par_1, timer par_2, float par_3 );
6105 control {
6106 timer T_1;
6107 var bitstring T_2;
6108 MyExtFunc( '7AA'H, T_1, 6.2 ); // good
6109 MyExtFunc( 6.2, T_1, '7AA'H ); // error
6110 MyExtFunc( '7AA'H, T_2, 6.2 ); // error
6111 }
6112 }
6113 <END_MODULE>
6114 <RESULT IF_PASS COUNT 1>
6115 (?im)\berror\b.+?hexstring.+?expected
6116 <END_RESULT>
6117 <RESULT IF_PASS COUNT 1>
6118 (?im)\berror\b.+?float.+?expected
6119 <END_RESULT>
6120 <RESULT IF_PASS COUNT 1>
6121 (?im)\berror\b.+?Reference.+?timer.+?expected
6122 <END_RESULT>
6123 <RESULT IF_PASS COUNT 3>
6124 (?is)\berror:
6125 <END_RESULT>
6126 <RESULT IF_PASS POSITIVE>
6127 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6128 <END_RESULT>
6129
6130 <END_TC>
6131 :exmp.
6132
6133 .*---------------------------------------------------------------------*
6134 :h4.TTCN-3::TypeMismatchActualFormalParameterList->External Function: basic type as non-mandatory parameter
6135 .*---------------------------------------------------------------------*
6136 :xmp tab=0.
6137 <TC - TTCN-3::TypeMismatchActualFormalParameterList->External Function: basic type as non-mandatory parameter>
6138
6139 <COMPILE>
6140 <VERDICT_LEAF PASS>
6141 <MODULE TTCN ModuleA ModuleA.ttcn>
6142 module ModuleA {
6143 external function MyExtFunc( charstring par_1 := 1, boolean par_2 := 1, integer par_3 := "r")
6144 }
6145 <END_MODULE>
6146 <RESULT IF_PASS COUNT 1>
6147 (?im)\berror\b.+?character.+?expected
6148 <END_RESULT>
6149 <RESULT IF_PASS COUNT 1>
6150 (?im)\berror\b.+?boolean.+?expected
6151 <END_RESULT>
6152 <RESULT IF_PASS COUNT 1>
6153 (?im)\berror\b.+?integer.+?expected
6154 <END_RESULT>
6155 <RESULT IF_PASS COUNT 3>
6156 (?is)\berror:
6157 <END_RESULT>
6158 <RESULT IF_PASS POSITIVE>
6159 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6160 <END_RESULT>
6161
6162 <END_TC>
6163 :exmp.
6164
6165 .*---------------------------------------------------------------------*
6166 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Altstep: basic type
6167 .*---------------------------------------------------------------------*
6168 :xmp tab=0.
6169 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Altstep: basic type>
6170
6171 <COMPILE>
6172 <VERDICT_LEAF PASS>
6173 <MODULE TTCN ModuleA ModuleA.ttcn>
6174 module ModuleA {
6175 altstep MyAltstep( charstring par_1, boolean par_2, integer par_3 ) {
6176 [else] {}
6177 }
6178 control {
6179 MyAltstep( "r",true,2 ); // good
6180 MyAltstep( "r",true,6.2 ); // error
6181 }
6182 }
6183 <END_MODULE>
6184 <RESULT IF_PASS COUNT 1>
6185 (?im)\berror\b.+?integer.+?expected
6186 <END_RESULT>
6187 <RESULT IF_PASS COUNT 1>
6188 (?is)\berror:
6189 <END_RESULT>
6190 <RESULT IF_PASS POSITIVE>
6191 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6192 <END_RESULT>
6193
6194 <END_TC>
6195 :exmp.
6196
6197 .*---------------------------------------------------------------------*
6198 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Altstep: user-defined type
6199 .*---------------------------------------------------------------------*
6200 :xmp tab=0.
6201 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Altstep: user-defined type>
6202
6203 <COMPILE>
6204 <VERDICT_LEAF PASS>
6205 <MODULE TTCN ModuleA ModuleA.ttcn>
6206 module ModuleA {
6207 type record MyRec {
6208 integer field1,
6209 charstring field2,
6210 boolean field3
6211 }
6212 altstep MyAltstep( MyRec par ) {
6213 [else] {}
6214 }
6215 control {
6216 MyAltstep( {6,"r",true} ); // good
6217 MyAltstep( {"r",true,6.2} ); // error
6218 MyAltstep( 5 ); // error
6219 }
6220 }
6221 <END_MODULE>
6222 <RESULT IF_PASS COUNT 1>
6223 (?im)\berror\b.+?integer.+?expected
6224 <END_RESULT>
6225 <RESULT IF_PASS COUNT 1>
6226 (?im)\berror\b.+?character string.+?expected
6227 <END_RESULT>
6228 <RESULT IF_PASS COUNT 1>
6229 (?im)\berror\b.+?boolean.+?expected
6230 <END_RESULT>
6231 <RESULT IF_PASS COUNT 1>
6232 (?im)\berror\b.+?Record.+?expected
6233 <END_RESULT>
6234 <RESULT IF_PASS COUNT 4>
6235 (?is)\berror:
6236 <END_RESULT>
6237 <RESULT IF_PASS POSITIVE>
6238 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6239 <END_RESULT>
6240
6241 <END_TC>
6242 :exmp.
6243
6244 .*---------------------------------------------------------------------*
6245 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Altstep: address type
6246 .*---------------------------------------------------------------------*
6247 :xmp tab=0.
6248 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Altstep: address type>
6249
6250 <COMPILE>
6251 <VERDICT_LEAF PASS>
6252 <MODULE TTCN ModuleA ModuleA.ttcn>
6253 module ModuleA {
6254 type record address { charstring field }
6255 altstep MyAltstep( address par_1, octetstring par_2 ) {
6256 [else] {}
6257 }
6258 control {
6259 MyAltstep( {"k"}, 'A5'O ); // good
6260 MyAltstep( 'A5'O, "k" ); // error
6261 }
6262 }
6263 <END_MODULE>
6264 <RESULT IF_PASS COUNT 1>
6265 (?im)\berror\b.+?Record.+?expected
6266 <END_RESULT>
6267 <RESULT IF_PASS COUNT 1>
6268 (?im)\berror\b.+?octetstring.+?expected
6269 <END_RESULT>
6270 <RESULT IF_PASS COUNT 2>
6271 (?is)\berror:
6272 <END_RESULT>
6273 <RESULT IF_PASS POSITIVE>
6274 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6275 <END_RESULT>
6276
6277 <END_TC>
6278 :exmp.
6279
6280 .*---------------------------------------------------------------------*
6281 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Altstep: template
6282 .*---------------------------------------------------------------------*
6283 :xmp tab=0.
6284 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Altstep: template>
6285
6286 <COMPILE>
6287 <VERDICT_LEAF PASS>
6288 <MODULE TTCN ModuleA ModuleA.ttcn>
6289 module ModuleA {
6290 template float MyTemp_1( float par ) := par;
6291 template integer MyTemp_2( integer par ) := par;
6292 altstep MyAltstep( template float par_1, template integer par_2 ) {
6293 [else] {}
6294 }
6295 control {
6296 MyAltstep( MyTemp_1(6.3), MyTemp_2(6) ); // good
6297 MyAltstep( 6.3, 6 ); // good
6298 MyAltstep( MyTemp_1(6), 6.9 ); // error
6299 }
6300 }
6301 <END_MODULE>
6302 <RESULT IF_PASS COUNT 1>
6303 (?im)\berror\b.+?float.+?expected
6304 <END_RESULT>
6305 <RESULT IF_PASS COUNT 1>
6306 (?im)\berror\b.+?integer.+?expected
6307 <END_RESULT>
6308 <RESULT IF_PASS COUNT 2>
6309 (?is)\berror:
6310 <END_RESULT>
6311 <RESULT IF_PASS POSITIVE>
6312 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6313 <END_RESULT>
6314
6315 <END_TC>
6316 :exmp.
6317
6318 .*---------------------------------------------------------------------*
6319 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Altstep: component type
6320 .*---------------------------------------------------------------------*
6321 :xmp tab=0.
6322 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Altstep: component type>
6323
6324 <COMPILE>
6325 <VERDICT_LEAF PASS>
6326 <MODULE TTCN ModuleA ModuleA.ttcn>
6327 module ModuleA {
6328 type component MyCT {}
6329 altstep MyAltstep( bitstring par_1, MyCT par_2, float par_3 ) {
6330 [else] {}
6331 }
6332 control {
6333 var MyCT myct_1;
6334 var integer myct_2;
6335 MyAltstep( '01001'B, myct_1, 6.2 ); // good
6336 MyAltstep( 7.6, myct_1, '01001'B ); // error
6337 MyAltstep( '01001'B, myct_2, 6.2 ); // error
6338 }
6339 }
6340 <END_MODULE>
6341 <RESULT IF_PASS COUNT 1>
6342 (?im)\berror\b.+?bitstring.+?expected
6343 <END_RESULT>
6344 <RESULT IF_PASS COUNT 1>
6345 (?im)\berror\b.+?float.+?expected
6346 <END_RESULT>
6347 <RESULT IF_PASS COUNT 1>
6348 (?im)\berror\b.+?Type.+?mismatch.+?MyCT.+?expected
6349 <END_RESULT>
6350 <RESULT IF_PASS COUNT 3>
6351 (?is)\berror:
6352 <END_RESULT>
6353 <RESULT IF_PASS POSITIVE>
6354 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6355 <END_RESULT>
6356
6357 <END_TC>
6358 :exmp.
6359
6360 .*---------------------------------------------------------------------*
6361 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Altstep: port type
6362 .*---------------------------------------------------------------------*
6363 :xmp tab=0.
6364 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Altstep: port type>
6365
6366 <COMPILE>
6367 <VERDICT_LEAF PASS>
6368 <MODULE TTCN ModuleA ModuleA.ttcn>
6369 module ModuleA {
6370 type port MyPortType message { inout integer }
6371 type component MyCT {
6372 port MyPortType port_1;
6373 var integer port_2;
6374 }
6375 function MyCompFunc() runs on MyCT {
6376 MyAltstep( '01001'B, port_1, 6.2 ); // good
6377 MyAltstep( 7.6, port_1, '01001'B ); // error
6378 MyAltstep( '01001'B, port_2, 6.2 ); // error
6379 }
6380 altstep MyAltstep( bitstring par_1, MyPortType par_2, float par_3 ) {
6381 [else] {}
6382 }
6383 }
6384 <END_MODULE>
6385 <RESULT IF_PASS COUNT 1>
6386 (?im)\berror\b.+?bitstring.+?expected
6387 <END_RESULT>
6388 <RESULT IF_PASS COUNT 1>
6389 (?im)\berror\b.+?float.+?expected
6390 <END_RESULT>
6391 <RESULT IF_PASS COUNT 1>
6392 (?im)\berror\b.+?Reference.+?port.+?expected
6393 <END_RESULT>
6394 <RESULT IF_PASS COUNT 3>
6395 (?is)\berror:
6396 <END_RESULT>
6397 <RESULT IF_PASS POSITIVE>
6398 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6399 <END_RESULT>
6400
6401 <END_TC>
6402 :exmp.
6403
6404 .*---------------------------------------------------------------------*
6405 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Altstep: default
6406 .*---------------------------------------------------------------------*
6407 :xmp tab=0.
6408 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Altstep: default>
6409
6410 <COMPILE>
6411 <VERDICT_LEAF PASS>
6412 <MODULE TTCN ModuleA ModuleA.ttcn>
6413 module ModuleA {
6414 altstep MyAltstep( hexstring par_1, default par_2, float par_3 ) {
6415 [else] {}
6416 }
6417 control {
6418 var default mydef_1;
6419 var charstring mydef_2;
6420 MyAltstep( '7AA'H, mydef_1, 6.2 ); // good
6421 MyAltstep( 6.2, mydef_1, '7AA'H ); // error
6422 MyAltstep( '7AA'H, mydef_2, 6.2 ); // error
6423 }
6424 }
6425 <END_MODULE>
6426 <RESULT IF_PASS COUNT 1>
6427 (?im)\berror\b.+?hexstring.+?expected
6428 <END_RESULT>
6429 <RESULT IF_PASS COUNT 1>
6430 (?im)\berror\b.+?float.+?expected
6431 <END_RESULT>
6432 <RESULT IF_PASS COUNT 1>
6433 (?im)\berror\b.+?Type.+?mismatch.+?default.+?expected
6434 <END_RESULT>
6435 <RESULT IF_PASS COUNT 3>
6436 (?is)\berror:
6437 <END_RESULT>
6438 <RESULT IF_PASS POSITIVE>
6439 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6440 <END_RESULT>
6441
6442 <END_TC>
6443 :exmp.
6444
6445 .*---------------------------------------------------------------------*
6446 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Altstep: timer
6447 .*---------------------------------------------------------------------*
6448 :xmp tab=0.
6449 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Altstep: timer>
6450
6451 <COMPILE>
6452 <VERDICT_LEAF PASS>
6453 <MODULE TTCN ModuleA ModuleA.ttcn>
6454 module ModuleA {
6455 altstep MyAltstep( hexstring par_1, timer par_2, float par_3 ) {
6456 [else] {}
6457 }
6458 control {
6459 timer T_1;
6460 var bitstring T_2;
6461 MyAltstep( '7AA'H, T_1, 6.2 ); // good
6462 MyAltstep( 6.2, T_1, '7AA'H ); // error
6463 MyAltstep( '7AA'H, T_2, 6.2 ); // error
6464 }
6465 }
6466 <END_MODULE>
6467 <RESULT IF_PASS COUNT 1>
6468 (?im)\berror\b.+?hexstring.+?expected
6469 <END_RESULT>
6470 <RESULT IF_PASS COUNT 1>
6471 (?im)\berror\b.+?float.+?expected
6472 <END_RESULT>
6473 <RESULT IF_PASS COUNT 1>
6474 (?im)\berror\b.+?Reference.+?timer.+?expected
6475 <END_RESULT>
6476 <RESULT IF_PASS COUNT 3>
6477 (?is)\berror:
6478 <END_RESULT>
6479 <RESULT IF_PASS POSITIVE>
6480 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6481 <END_RESULT>
6482
6483 <END_TC>
6484 :exmp.
6485
6486 .*---------------------------------------------------------------------*
6487 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Altstep: basic type as non-mandatory parameter
6488 .*---------------------------------------------------------------------*
6489 :xmp tab=0.
6490 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Altstep: basic type as non-mandatory parameter>
6491
6492 <COMPILE>
6493 <VERDICT_LEAF PASS>
6494 <MODULE TTCN ModuleA ModuleA.ttcn>
6495 module ModuleA {
6496 altstep MyAltstep( charstring par_1 := 1, boolean par_2 := 1, integer par_3 := "r"){
6497 [else] {}
6498 }
6499 }
6500 <END_MODULE>
6501 <RESULT IF_PASS COUNT 1>
6502 (?im)\berror\b.+?character.+?expected
6503 <END_RESULT>
6504 <RESULT IF_PASS COUNT 1>
6505 (?im)\berror\b.+?boolean.+?expected
6506 <END_RESULT>
6507 <RESULT IF_PASS COUNT 1>
6508 (?im)\berror\b.+?integer.+?expected
6509 <END_RESULT>
6510 <RESULT IF_PASS COUNT 3>
6511 (?is)\berror:
6512 <END_RESULT>
6513 <RESULT IF_PASS POSITIVE>
6514 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6515 <END_RESULT>
6516
6517 <END_TC>
6518 :exmp.
6519
6520 .*---------------------------------------------------------------------*
6521 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Altstep_runs_on: basic type
6522 .*---------------------------------------------------------------------*
6523 :xmp tab=0.
6524 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Altstep_runs_on: basic type>
6525
6526 <COMPILE>
6527 <VERDICT_LEAF PASS>
6528 <MODULE TTCN ModuleA ModuleA.ttcn>
6529 module ModuleA {
6530 type component MyCT {}
6531 altstep MyCompAltstep( charstring par_1, boolean par_2, integer par_3 ) runs on MyCT {
6532 [else] {}
6533 }
6534 function MyCompFunc() runs on MyCT {
6535 MyCompAltstep( "r",true,2 ); // good
6536 MyCompAltstep( "r",true,6.2 ); // error
6537 }
6538 }
6539 <END_MODULE>
6540 <RESULT IF_PASS COUNT 1>
6541 (?im)\berror\b.+?integer.+?expected
6542 <END_RESULT>
6543 <RESULT IF_PASS COUNT 1>
6544 (?is)\berror:
6545 <END_RESULT>
6546 <RESULT IF_PASS POSITIVE>
6547 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6548 <END_RESULT>
6549
6550 <END_TC>
6551 :exmp.
6552
6553 .*---------------------------------------------------------------------*
6554 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Altstep_runs_on: user-defined type
6555 .*---------------------------------------------------------------------*
6556 :xmp tab=0.
6557 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Altstep_runs_on: user-defined type>
6558
6559 <COMPILE>
6560 <VERDICT_LEAF PASS>
6561 <MODULE TTCN ModuleA ModuleA.ttcn>
6562 module ModuleA {
6563 type component MyCT {}
6564 type record MyRec {
6565 integer field1,
6566 charstring field2,
6567 boolean field3
6568 }
6569 altstep MyCompAltstep( MyRec par ) runs on MyCT {
6570 [else] {}
6571 }
6572 function MyCompFunc() runs on MyCT {
6573 MyCompAltstep( {6,"r",true} ); // good
6574 MyCompAltstep( {"r",true,6.2} ); // error
6575 MyCompAltstep( 5 ); // error
6576 }
6577 }
6578 <END_MODULE>
6579 <RESULT IF_PASS COUNT 1>
6580 (?im)\berror\b.+?integer.+?expected
6581 <END_RESULT>
6582 <RESULT IF_PASS COUNT 1>
6583 (?im)\berror\b.+?character string.+?expected
6584 <END_RESULT>
6585 <RESULT IF_PASS COUNT 1>
6586 (?im)\berror\b.+?boolean.+?expected
6587 <END_RESULT>
6588 <RESULT IF_PASS COUNT 1>
6589 (?im)\berror\b.+?Record.+?expected
6590 <END_RESULT>
6591 <RESULT IF_PASS COUNT 4>
6592 (?is)\berror:
6593 <END_RESULT>
6594 <RESULT IF_PASS POSITIVE>
6595 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6596 <END_RESULT>
6597
6598 <END_TC>
6599 :exmp.
6600
6601 .*---------------------------------------------------------------------*
6602 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Altstep_runs_on: address type
6603 .*---------------------------------------------------------------------*
6604 :xmp tab=0.
6605 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Altstep_runs_on: address type>
6606
6607 <COMPILE>
6608 <VERDICT_LEAF PASS>
6609 <MODULE TTCN ModuleA ModuleA.ttcn>
6610 module ModuleA {
6611 type component MyCT {}
6612 type record address { charstring field }
6613 altstep MyCompAltstep( address par_1, octetstring par_2 ) runs on MyCT {
6614 [else] {}
6615 }
6616 function MyCompFunc() runs on MyCT {
6617 MyCompAltstep( {"k"}, 'A5'O ); // good
6618 MyCompAltstep( 'A5'O, "k" ); // error
6619 }
6620 }
6621 <END_MODULE>
6622 <RESULT IF_PASS COUNT 1>
6623 (?im)\berror\b.+?Record.+?expected
6624 <END_RESULT>
6625 <RESULT IF_PASS COUNT 1>
6626 (?im)\berror\b.+?octetstring.+?expected
6627 <END_RESULT>
6628 <RESULT IF_PASS COUNT 2>
6629 (?is)\berror:
6630 <END_RESULT>
6631 <RESULT IF_PASS POSITIVE>
6632 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6633 <END_RESULT>
6634
6635 <END_TC>
6636 :exmp.
6637
6638 .*---------------------------------------------------------------------*
6639 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Altstep_runs_on: template
6640 .*---------------------------------------------------------------------*
6641 :xmp tab=0.
6642 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Altstep_runs_on: template>
6643
6644 <COMPILE>
6645 <VERDICT_LEAF PASS>
6646 <MODULE TTCN ModuleA ModuleA.ttcn>
6647 module ModuleA {
6648 type component MyCT {}
6649 template float MyTemp_1( float par ) := par;
6650 template integer MyTemp_2( integer par ) := par;
6651 altstep MyCompAltstep( template float par_1, template integer par_2 ) runs on MyCT {
6652 [else] {}
6653 }
6654 function MyCompFunc() runs on MyCT {
6655 MyCompAltstep( MyTemp_1(6.3), MyTemp_2(6) ); // good
6656 MyCompAltstep( 6.3, 6 ); // good
6657 MyCompAltstep( MyTemp_1(6), 6.9 ); // error
6658 }
6659 }
6660 <END_MODULE>
6661 <RESULT IF_PASS COUNT 1>
6662 (?im)\berror\b.+?float.+?expected
6663 <END_RESULT>
6664 <RESULT IF_PASS COUNT 1>
6665 (?im)\berror\b.+?integer.+?expected
6666 <END_RESULT>
6667 <RESULT IF_PASS COUNT 2>
6668 (?is)\berror:
6669 <END_RESULT>
6670 <RESULT IF_PASS POSITIVE>
6671 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6672 <END_RESULT>
6673
6674 <END_TC>
6675 :exmp.
6676
6677 .*---------------------------------------------------------------------*
6678 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Altstep_runs_on: component type
6679 .*---------------------------------------------------------------------*
6680 :xmp tab=0.
6681 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Altstep_runs_on: component type>
6682
6683 <COMPILE>
6684 <VERDICT_LEAF PASS>
6685 <MODULE TTCN ModuleA ModuleA.ttcn>
6686 module ModuleA {
6687 type component MyCT {}
6688 altstep MyCompAltstep( bitstring par_1, MyCT par_2, float par_3 ) runs on MyCT {
6689 [else] {}
6690 }
6691 function MyCompFunc() runs on MyCT {
6692 var MyCT myct_1;
6693 var integer myct_2;
6694 MyCompAltstep( '01001'B, myct_1, 6.2 ); // good
6695 MyCompAltstep( 7.6, myct_1, '01001'B ); // error
6696 MyCompAltstep( '01001'B, myct_2, 6.2 ); // error
6697 }
6698 }
6699 <END_MODULE>
6700 <RESULT IF_PASS COUNT 1>
6701 (?im)\berror\b.+?bitstring.+?expected
6702 <END_RESULT>
6703 <RESULT IF_PASS COUNT 1>
6704 (?im)\berror\b.+?float.+?expected
6705 <END_RESULT>
6706 <RESULT IF_PASS COUNT 1>
6707 (?im)\berror\b.+?Type.+?mismatch.+?MyCT.+?expected
6708 <END_RESULT>
6709 <RESULT IF_PASS COUNT 3>
6710 (?is)\berror:
6711 <END_RESULT>
6712 <RESULT IF_PASS POSITIVE>
6713 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6714 <END_RESULT>
6715
6716 <END_TC>
6717 :exmp.
6718
6719 .*---------------------------------------------------------------------*
6720 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Altstep_runs_on: port type
6721 .*---------------------------------------------------------------------*
6722 :xmp tab=0.
6723 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Altstep_runs_on: port type>
6724
6725 <COMPILE>
6726 <VERDICT_LEAF PASS>
6727 <MODULE TTCN ModuleA ModuleA.ttcn>
6728 module ModuleA {
6729 type port MyPortType message { inout integer }
6730 type component MyCT {
6731 port MyPortType port_1;
6732 var integer port_2;
6733 }
6734 altstep MyCompAltstep( bitstring par_1, MyPortType par_2, float par_3 ) runs on MyCT {
6735 [else] {}
6736 }
6737 function MyCompFunc() runs on MyCT {
6738 MyCompAltstep( '01001'B, port_1, 6.2 ); // good
6739 MyCompAltstep( 7.6, port_1, '01001'B ); // error
6740 MyCompAltstep( '01001'B, port_2, 6.2 ); // error
6741 }
6742 }
6743 <END_MODULE>
6744 <RESULT IF_PASS COUNT 1>
6745 (?im)\berror\b.+?bitstring.+?expected
6746 <END_RESULT>
6747 <RESULT IF_PASS COUNT 1>
6748 (?im)\berror\b.+?float.+?expected
6749 <END_RESULT>
6750 <RESULT IF_PASS COUNT 1>
6751 (?im)\berror\b.+?Reference.+?port.+?expected
6752 <END_RESULT>
6753 <RESULT IF_PASS COUNT 3>
6754 (?is)\berror:
6755 <END_RESULT>
6756 <RESULT IF_PASS POSITIVE>
6757 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6758 <END_RESULT>
6759
6760 <END_TC>
6761 :exmp.
6762
6763 .*---------------------------------------------------------------------*
6764 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Altstep_runs_on: default
6765 .*---------------------------------------------------------------------*
6766 :xmp tab=0.
6767 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Altstep_runs_on: default>
6768
6769 <COMPILE>
6770 <VERDICT_LEAF PASS>
6771 <MODULE TTCN ModuleA ModuleA.ttcn>
6772 module ModuleA {
6773 type component MyCT {}
6774 altstep MyCompAltstep( hexstring par_1, default par_2, float par_3 ) runs on MyCT {
6775 [else] {}
6776 }
6777 function MyCompFunc() runs on MyCT {
6778 var default mydef_1;
6779 var charstring mydef_2;
6780 MyCompAltstep( '7AA'H, mydef_1, 6.2 ); // good
6781 MyCompAltstep( 6.2, mydef_1, '7AA'H ); // error
6782 MyCompAltstep( '7AA'H, mydef_2, 6.2 ); // error
6783 }
6784 }
6785 <END_MODULE>
6786 <RESULT IF_PASS COUNT 1>
6787 (?im)\berror\b.+?hexstring.+?expected
6788 <END_RESULT>
6789 <RESULT IF_PASS COUNT 1>
6790 (?im)\berror\b.+?float.+?expected
6791 <END_RESULT>
6792 <RESULT IF_PASS COUNT 1>
6793 (?im)\berror\b.+?Type.+?mismatch.+?default.+?expected
6794 <END_RESULT>
6795 <RESULT IF_PASS COUNT 3>
6796 (?is)\berror:
6797 <END_RESULT>
6798 <RESULT IF_PASS POSITIVE>
6799 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6800 <END_RESULT>
6801
6802 <END_TC>
6803 :exmp.
6804
6805 .*---------------------------------------------------------------------*
6806 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Altstep_runs_on: timer
6807 .*---------------------------------------------------------------------*
6808 :xmp tab=0.
6809 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Altstep_runs_on: timer>
6810
6811 <COMPILE>
6812 <VERDICT_LEAF PASS>
6813 <MODULE TTCN ModuleA ModuleA.ttcn>
6814 module ModuleA {
6815 type component MyCT {}
6816 altstep MyCompAltstep( hexstring par_1, timer par_2, float par_3 ) runs on MyCT {
6817 [else] {}
6818 }
6819 function MyCompFunc() runs on MyCT {
6820 timer T_1;
6821 var bitstring T_2;
6822 MyCompAltstep( '7AA'H, T_1, 6.2 ); // good
6823 MyCompAltstep( 6.2, T_1, '7AA'H ); // error
6824 MyCompAltstep( '7AA'H, T_2, 6.2 ); // error
6825 }
6826 }
6827 <END_MODULE>
6828 <RESULT IF_PASS COUNT 1>
6829 (?im)\berror\b.+?hexstring.+?expected
6830 <END_RESULT>
6831 <RESULT IF_PASS COUNT 1>
6832 (?im)\berror\b.+?float.+?expected
6833 <END_RESULT>
6834 <RESULT IF_PASS COUNT 1>
6835 (?im)\berror\b.+?Reference.+?timer.+?expected
6836 <END_RESULT>
6837 <RESULT IF_PASS COUNT 3>
6838 (?is)\berror:
6839 <END_RESULT>
6840 <RESULT IF_PASS POSITIVE>
6841 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6842 <END_RESULT>
6843
6844 <END_TC>
6845 :exmp.
6846
6847 .*---------------------------------------------------------------------*
6848 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Testcase: basic type
6849 .*---------------------------------------------------------------------*
6850 :xmp tab=0.
6851 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Testcase: basic type>
6852
6853 <COMPILE>
6854 <VERDICT_LEAF PASS>
6855 <MODULE TTCN ModuleA ModuleA.ttcn>
6856 module ModuleA {
6857 type component MyCT {}
6858 testcase MyTestcase( charstring par_1, boolean par_2, integer par_3 ) runs on MyCT {}
6859 control {
6860 execute ( MyTestcase( "r",true,2 ) ); // good
6861 execute ( MyTestcase( "r",true,6.2 ) ); // error
6862 }
6863 }
6864 <END_MODULE>
6865 <RESULT IF_PASS COUNT 1>
6866 (?im)\berror\b.+?integer.+?expected
6867 <END_RESULT>
6868 <RESULT IF_PASS COUNT 1>
6869 (?is)\berror:
6870 <END_RESULT>
6871 <RESULT IF_PASS POSITIVE>
6872 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6873 <END_RESULT>
6874
6875 <END_TC>
6876 :exmp.
6877
6878 .*---------------------------------------------------------------------*
6879 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Testcase: user-defined type
6880 .*---------------------------------------------------------------------*
6881 :xmp tab=0.
6882 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Testcase: user-defined type>
6883
6884 <COMPILE>
6885 <VERDICT_LEAF PASS>
6886 <MODULE TTCN ModuleA ModuleA.ttcn>
6887 module ModuleA {
6888 type component MyCT {}
6889 type record MyRec {
6890 integer field1,
6891 charstring field2,
6892 boolean field3
6893 }
6894 testcase MyTestcase( MyRec par ) runs on MyCT {}
6895 control {
6896 execute ( MyTestcase( {6,"r",true} ) ); // good
6897 execute ( MyTestcase( {"r",true,6.2} ) ); // error
6898 execute ( MyTestcase( 5 ) ); // error
6899 }
6900 }
6901 <END_MODULE>
6902 <RESULT IF_PASS COUNT 1>
6903 (?im)\berror\b.+?integer.+?expected
6904 <END_RESULT>
6905 <RESULT IF_PASS COUNT 1>
6906 (?im)\berror\b.+?character string.+?expected
6907 <END_RESULT>
6908 <RESULT IF_PASS COUNT 1>
6909 (?im)\berror\b.+?boolean.+?expected
6910 <END_RESULT>
6911 <RESULT IF_PASS COUNT 1>
6912 (?im)\berror\b.+?Record.+?expected
6913 <END_RESULT>
6914 <RESULT IF_PASS COUNT 4>
6915 (?is)\berror:
6916 <END_RESULT>
6917 <RESULT IF_PASS POSITIVE>
6918 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6919 <END_RESULT>
6920
6921 <END_TC>
6922 :exmp.
6923
6924 .*---------------------------------------------------------------------*
6925 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Testcase: address type
6926 .*---------------------------------------------------------------------*
6927 :xmp tab=0.
6928 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Testcase: address type>
6929
6930 <COMPILE>
6931 <VERDICT_LEAF PASS>
6932 <MODULE TTCN ModuleA ModuleA.ttcn>
6933 module ModuleA {
6934 type component MyCT {}
6935 type record address { charstring field }
6936 testcase MyTestcase( address par_1, octetstring par_2 ) runs on MyCT {}
6937 control {
6938 execute ( MyTestcase( {"k"}, 'A5'O ) ); // good
6939 execute ( MyTestcase( 'A5'O, "k" ) ); // error
6940 }
6941 }
6942 <END_MODULE>
6943 <RESULT IF_PASS COUNT 1>
6944 (?im)\berror\b.+?Record.+?expected
6945 <END_RESULT>
6946 <RESULT IF_PASS COUNT 1>
6947 (?im)\berror\b.+?octetstring.+?expected
6948 <END_RESULT>
6949 <RESULT IF_PASS COUNT 2>
6950 (?is)\berror:
6951 <END_RESULT>
6952 <RESULT IF_PASS POSITIVE>
6953 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6954 <END_RESULT>
6955
6956 <END_TC>
6957 :exmp.
6958
6959 .*---------------------------------------------------------------------*
6960 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Testcase: template
6961 .*---------------------------------------------------------------------*
6962 :xmp tab=0.
6963 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Testcase: template>
6964
6965 <COMPILE>
6966 <VERDICT_LEAF PASS>
6967 <MODULE TTCN ModuleA ModuleA.ttcn>
6968 module ModuleA {
6969 type component MyCT {}
6970 template float MyTemp_1( float par ) := par;
6971 template integer MyTemp_2( integer par ) := par;
6972 testcase MyTestcase( template float par_1, template integer par_2 ) runs on MyCT {}
6973 control {
6974 execute ( MyTestcase( MyTemp_1(6.3), MyTemp_2(6) ) ); // good
6975 execute ( MyTestcase( 6.3, 6 ) ); // good
6976 execute ( MyTestcase( MyTemp_1(6), 6.9 ) ); // error
6977 }
6978 }
6979 <END_MODULE>
6980 <RESULT IF_PASS COUNT 1>
6981 (?im)\berror\b.+?float.+?expected
6982 <END_RESULT>
6983 <RESULT IF_PASS COUNT 1>
6984 (?im)\berror\b.+?integer.+?expected
6985 <END_RESULT>
6986 <RESULT IF_PASS COUNT 2>
6987 (?is)\berror:
6988 <END_RESULT>
6989 <RESULT IF_PASS POSITIVE>
6990 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
6991 <END_RESULT>
6992
6993 <END_TC>
6994 :exmp.
6995
6996 .*---------------------------------------------------------------------*
6997 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Testcase: component type
6998 .*---------------------------------------------------------------------*
6999 :xmp tab=0.
7000 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Testcase: component type>
7001
7002 <COMPILE>
7003 <VERDICT_LEAF PASS>
7004 <MODULE TTCN ModuleA ModuleA.ttcn>
7005 module ModuleA {
7006 type component MyCT {}
7007 testcase MyTestcase( bitstring par_1, MyCT par_2, float par_3 ) runs on MyCT {}
7008 control {
7009 var MyCT myct_1;
7010 var integer myct_2;
7011 execute ( MyTestcase( '01001'B, myct_1, 6.2 ) ); // good
7012 execute ( MyTestcase( 7.6, myct_1, '01001'B ) ); // error
7013 execute ( MyTestcase( '01001'B, myct_2, 6.2 ) ); // error
7014 }
7015 }
7016 <END_MODULE>
7017 <RESULT IF_PASS COUNT 1>
7018 (?im)\berror\b.+?bitstring.+?expected
7019 <END_RESULT>
7020 <RESULT IF_PASS COUNT 1>
7021 (?im)\berror\b.+?float.+?expected
7022 <END_RESULT>
7023 <RESULT IF_PASS COUNT 1>
7024 (?im)\berror\b.+?Type.+?mismatch.+?MyCT.+?expected
7025 <END_RESULT>
7026 <RESULT IF_PASS COUNT 3>
7027 (?is)\berror:
7028 <END_RESULT>
7029 <RESULT IF_PASS POSITIVE>
7030 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7031 <END_RESULT>
7032
7033 <END_TC>
7034 :exmp.
7035
7036 .*---------------------------------------------------------------------*
7037 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Testcase: default
7038 .*---------------------------------------------------------------------*
7039 :xmp tab=0.
7040 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Testcase: default>
7041
7042 <COMPILE>
7043 <VERDICT_LEAF PASS>
7044 <MODULE TTCN ModuleA ModuleA.ttcn>
7045 module ModuleA {
7046 type component MyCT {}
7047 testcase MyTestcase( hexstring par_1, default par_2, float par_3 ) runs on MyCT {}
7048 control {
7049 var default mydef_1;
7050 var charstring mydef_2;
7051 execute ( MyTestcase( '7AA'H, mydef_1, 6.2 ) ); // good
7052 execute ( MyTestcase( 6.2, mydef_1, '7AA'H ) ); // error
7053 execute ( MyTestcase( '7AA'H, mydef_2, 6.2 ) ); // error
7054 }
7055 }
7056 <END_MODULE>
7057 <RESULT IF_PASS COUNT 1>
7058 (?im)\berror\b.+?hexstring.+?expected
7059 <END_RESULT>
7060 <RESULT IF_PASS COUNT 1>
7061 (?im)\berror\b.+?float.+?expected
7062 <END_RESULT>
7063 <RESULT IF_PASS COUNT 1>
7064 (?im)\berror\b.+?Type.+?mismatch.+?default.+?expected
7065 <END_RESULT>
7066 <RESULT IF_PASS COUNT 3>
7067 (?is)\berror:
7068 <END_RESULT>
7069 <RESULT IF_PASS POSITIVE>
7070 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7071 <END_RESULT>
7072
7073 <END_TC>
7074 :exmp.
7075
7076 .*---------------------------------------------------------------------*
7077 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Testcase: basic type as non-mandatory parameter
7078 .*---------------------------------------------------------------------*
7079 :xmp tab=0.
7080 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Testcase: basic type as non-mandatory parameter>
7081
7082 <COMPILE>
7083 <VERDICT_LEAF PASS>
7084 <MODULE TTCN ModuleA ModuleA.ttcn>
7085 module ModuleA {
7086 type component MyCT {}
7087 testcase MyTestcase( charstring par_1 := 1, boolean par_2 := 1, integer par_3 := "r") runs on MyCT {}
7088 }
7089 <END_MODULE>
7090 <RESULT IF_PASS COUNT 1>
7091 (?im)\berror\b.+?character.+?expected
7092 <END_RESULT>
7093 <RESULT IF_PASS COUNT 1>
7094 (?im)\berror\b.+?boolean.+?expected
7095 <END_RESULT>
7096 <RESULT IF_PASS COUNT 1>
7097 (?im)\berror\b.+?integer.+?expected
7098 <END_RESULT>
7099 <RESULT IF_PASS COUNT 3>
7100 (?is)\berror:
7101 <END_RESULT>
7102 <RESULT IF_PASS POSITIVE>
7103 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7104 <END_RESULT>
7105
7106 <END_TC>
7107 :exmp.
7108
7109 .*---------------------------------------------------------------------*
7110 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Signature: basic type
7111 .*---------------------------------------------------------------------*
7112 :xmp tab=0.
7113 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Signature: basic type>
7114
7115 <COMPILE>
7116 <VERDICT_LEAF PASS>
7117 <MODULE TTCN ModuleA ModuleA.ttcn>
7118 module ModuleA {
7119 signature MySig( charstring par_1, boolean par_2, integer par_3 );
7120 type port MyPortType procedure { inout MySig }
7121 type component MyComp {
7122 port MyPortType MyPort;
7123 }
7124 function MyFunc() runs on MyComp {
7125 MyPort.call(MySig:{ "r",true,2 }, 20E-3 + 20E-3) { //good
7126 [] MyPort.getreply {}
7127 }
7128 MyPort.call(MySig:{ "r",true,2.6 }, 20E-3 + 20E-3) { // error
7129 [] MyPort.getreply {}
7130 }
7131 }
7132 }
7133 <END_MODULE>
7134 <RESULT IF_PASS COUNT 1>
7135 (?im)\berror\b.+?integer.+?expected
7136 <END_RESULT>
7137 <RESULT IF_PASS COUNT 1>
7138 (?is)\berror:
7139 <END_RESULT>
7140 <RESULT IF_PASS POSITIVE>
7141 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7142 <END_RESULT>
7143
7144 <END_TC>
7145 :exmp.
7146
7147 .*---------------------------------------------------------------------*
7148 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Signature: user-defined type
7149 .*---------------------------------------------------------------------*
7150 :xmp tab=0.
7151 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Signature: user-defined type>
7152
7153 <COMPILE>
7154 <VERDICT_LEAF PASS>
7155 <MODULE TTCN ModuleA ModuleA.ttcn>
7156 module ModuleA {
7157 type record MyRec {
7158 integer field1,
7159 charstring field2,
7160 boolean field3
7161 }
7162 signature MySig( MyRec par );
7163 type port MyPortType procedure { inout MySig }
7164 type component MyComp {
7165 port MyPortType MyPort;
7166 }
7167 function MyFunc() runs on MyComp {
7168 MyPort.call(MySig:{ {6,"r",true} }, 20E-3 + 20E-3) { // good
7169 [] MyPort.getreply {}
7170 }
7171 MyPort.call(MySig:{ {"r",true,6.2} }, 20E-3 + 20E-3) { // error
7172 [] MyPort.getreply {}
7173 }
7174 MyPort.call(MySig:{ 6 }, 20E-3 + 20E-3) { // error
7175 [] MyPort.getreply {}
7176 }
7177 }
7178 }
7179 <END_MODULE>
7180 <RESULT IF_PASS COUNT 1>
7181 (?im)\berror\b.+?integer.+?expected
7182 <END_RESULT>
7183 <RESULT IF_PASS COUNT 1>
7184 (?im)\berror\b.+?character string.+?expected
7185 <END_RESULT>
7186 <RESULT IF_PASS COUNT 1>
7187 (?im)\berror\b.+?boolean.+?expected
7188 <END_RESULT>
7189 <RESULT IF_PASS COUNT 1>
7190 (?im)\berror\b.+?Record.+?expected
7191 <END_RESULT>
7192 <RESULT IF_PASS COUNT 4>
7193 (?is)\berror:
7194 <END_RESULT>
7195 <RESULT IF_PASS POSITIVE>
7196 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7197 <END_RESULT>
7198
7199 <END_TC>
7200 :exmp.
7201
7202 .*---------------------------------------------------------------------*
7203 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Signature: address type
7204 .*---------------------------------------------------------------------*
7205 :xmp tab=0.
7206 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Signature: address type>
7207
7208 <COMPILE>
7209 <VERDICT_LEAF PASS>
7210 <MODULE TTCN ModuleA ModuleA.ttcn>
7211 module ModuleA {
7212 type record address { charstring field }
7213 signature MySig( address par_1, octetstring par_2 );
7214 type port MyPortType procedure { inout MySig }
7215 type component MyComp {
7216 port MyPortType MyPort;
7217 }
7218 function MyFunc() runs on MyComp {
7219 MyPort.call(MySig:{ {"k"}, 'A5'O }, 20E-3 + 20E-3) { // good
7220 [] MyPort.getreply {}
7221 }
7222 MyPort.call(MySig:{ 'A5'O, "k" }, 20E-3 + 20E-3) { // error
7223 [] MyPort.getreply {}
7224 }
7225 }
7226 }
7227 <END_MODULE>
7228 <RESULT IF_PASS COUNT 1>
7229 (?im)\berror\b.+?Record.+?expected
7230 <END_RESULT>
7231 <RESULT IF_PASS COUNT 1>
7232 (?im)\berror\b.+?octetstring.+?expected
7233 <END_RESULT>
7234 <RESULT IF_PASS COUNT 2>
7235 (?is)\berror:
7236 <END_RESULT>
7237 <RESULT IF_PASS POSITIVE>
7238 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7239 <END_RESULT>
7240
7241 <END_TC>
7242 :exmp.
7243
7244 .*---------------------------------------------------------------------*
7245 :h4.TTCN-3::TypeMismatchActualFormalParameterList->Signature: component type
7246 .*---------------------------------------------------------------------*
7247 :xmp tab=0.
7248 <TC - TTCN-3::TypeMismatchActualFormalParameterList->Signature: component type>
7249
7250 <COMPILE>
7251 <VERDICT_LEAF PASS>
7252 <MODULE TTCN ModuleA ModuleA.ttcn>
7253 module ModuleA {
7254 type component MyCT {}
7255 signature MySig( bitstring par_1, MyCT par_2, float par_3 );
7256 type port MyPortType procedure { inout MySig }
7257 type component MyComp {
7258 port MyPortType MyPort;
7259 }
7260 function MyFunc() runs on MyComp {
7261 var MyCT myct_1;
7262 var integer myct_2;
7263 MyPort.call(MySig:{ '01001'B, myct_1, 6.2 }, 20E-3 + 20E-3) { // good
7264 [] MyPort.getreply {}
7265 }
7266 MyPort.call(MySig:{ 7.6, myct_1, '01001'B }, 20E-3 + 20E-3) { // error
7267 [] MyPort.getreply {}
7268 }
7269 MyPort.call(MySig:{ '01001'B, myct_2, 6.2 }, 20E-3 + 20E-3) { // error
7270 [] MyPort.getreply {}
7271 }
7272 }
7273 }
7274 <END_MODULE>
7275 <RESULT IF_PASS COUNT 1>
7276 (?im)\berror\b.+?bitstring.+?expected
7277 <END_RESULT>
7278 <RESULT IF_PASS COUNT 1>
7279 (?im)\berror\b.+?float.+?expected
7280 <END_RESULT>
7281 <RESULT IF_PASS COUNT 1>
7282 (?im)\berror\b.+?Type.+?mismatch.+?MyCT.+?expected
7283 <END_RESULT>
7284 <RESULT IF_PASS COUNT 3>
7285 (?is)\berror:
7286 <END_RESULT>
7287 <RESULT IF_PASS POSITIVE>
7288 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7289 <END_RESULT>
7290
7291 <END_TC>
7292 :exmp.
7293
7294
7295 .*---------------------------------------------------------------------*
7296 :h2.All types shall be compatible with the type that is expected in the place where a type is expected
7297 .*---------------------------------------------------------------------*
7298 This test case group covers the requirement SA-5/3.
7299
7300
7301 .*---------------------------------------------------------------------*
7302 :h2.Void return type in an expression
7303 .*---------------------------------------------------------------------*
7304 This test case group covers the requirement SA-5/4.
7305
7306 The first few testcase below test functions with void return type in
7307 expressions in each possible dynamic part. Then several other possible
7308 expressions are tested with a function, testcase or altstep.
7309
7310 Expressions where functions cannot be used were not tested (e.g. halt,
7311 getverdict, etc.).
7312
7313 .*---------------------------------------------------------------------*
7314 :h3.Void return type - experession in control part
7315 .*---------------------------------------------------------------------*
7316 :xmp tab=0.
7317
7318 <TC - Void return type - experession in control part>
7319
7320 <COMPILE>
7321 <VERDICT_LEAF PASS>
7322 <MODULE TTCN Temp Temp.ttcn>
7323 module Temp {
7324
7325 function VoidRetType() { }
7326
7327 control {
7328 var integer FaultyInt4 := VoidRetType() + 4;
7329 }
7330
7331 }
7332 <END_MODULE>
7333 <RESULT COUNT 1>
7334 (?im)value.+?expected.+?instead.+?\bof\b.+?function
7335 <END_RESULT>
7336 <RESULT COUNT 1>
7337 (?is)\berror:
7338 <END_RESULT>
7339 <RESULT>
7340 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7341 <END_RESULT>
7342 <END_TC>
7343
7344 :exmp.
7345
7346 .*---------------------------------------------------------------------*
7347 :h3.Void return type - experession in function
7348 .*---------------------------------------------------------------------*
7349 :xmp tab=0.
7350
7351 <TC - Void return type - experession in function>
7352
7353 <COMPILE>
7354 <VERDICT_LEAF PASS>
7355 <MODULE TTCN Temp Temp.ttcn>
7356 module Temp {
7357
7358 function VoidRetType() { }
7359
7360 function Func()
7361 {
7362 var integer FaultyInt1 := VoidRetType() + 1;
7363 }
7364
7365 }
7366 <END_MODULE>
7367 <RESULT COUNT 1>
7368 (?im)value.+?expected.+?instead.+?\bof\b.+?function
7369 <END_RESULT>
7370 <RESULT COUNT 1>
7371 (?is)\berror:
7372 <END_RESULT>
7373 <RESULT>
7374 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7375 <END_RESULT>
7376 <END_TC>
7377
7378 :exmp.
7379
7380 .*---------------------------------------------------------------------*
7381 :h3.Void return type - experession in testcase
7382 .*---------------------------------------------------------------------*
7383 :xmp tab=0.
7384
7385 <TC - Void return type - experession in testcase>
7386
7387 <COMPILE>
7388 <VERDICT_LEAF PASS>
7389 <MODULE TTCN Temp Temp.ttcn>
7390 module Temp {
7391
7392 type component my_CT {
7393 timer T:=2.0;
7394 }
7395
7396 function VoidRetType() { }
7397
7398 testcase TC() runs on my_CT
7399 {
7400 var integer FaultyInt3 := VoidRetType() + 3;
7401 }
7402
7403 }
7404 <END_MODULE>
7405 <RESULT COUNT 1>
7406 (?im)value.+?expected.+?instead.+?\bof\b.+?function
7407 <END_RESULT>
7408 <RESULT COUNT 1>
7409 (?is)\berror:
7410 <END_RESULT>
7411 <RESULT>
7412 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7413 <END_RESULT>
7414 <END_TC>
7415
7416 :exmp.
7417
7418 .*---------------------------------------------------------------------*
7419 :h3.Void return type - experession in altstep
7420 .*---------------------------------------------------------------------*
7421 :xmp tab=0.
7422
7423 <TC - Void return type - experession in altstep>
7424
7425 <COMPILE>
7426 <VERDICT_LEAF PASS>
7427 <MODULE TTCN Temp Temp.ttcn>
7428 module Temp {
7429
7430 type component my_CT {
7431 timer T:=2.0;
7432 }
7433
7434 function VoidRetType() { }
7435
7436 altstep AS() runs on my_CT
7437 {
7438 var integer FaultyInt2 := VoidRetType() + 2;
7439 []T.timeout { }
7440 }
7441
7442 }
7443 <END_MODULE>
7444 <RESULT COUNT 1>
7445 (?im)value.+?expected.+?instead.+?\bof\b.+?function
7446 <END_RESULT>
7447 <RESULT COUNT 1>
7448 (?is)\berror:
7449 <END_RESULT>
7450 <RESULT>
7451 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7452 <END_RESULT>
7453 <END_TC>
7454
7455 :exmp.
7456
7457 .*---------------------------------------------------------------------*
7458 :h3.Void return type - message based port operations
7459 .*---------------------------------------------------------------------*
7460 :xmp tab=0.
7461
7462 <TC - Void return type - message based port operations>
7463
7464 <COMPILE>
7465 <VERDICT_LEAF PASS>
7466 <MODULE TTCN Temp Temp.ttcn>
7467 module Temp {
7468
7469 type port MPort message {
7470 inout integer
7471 }
7472
7473 type component MyComponent {
7474 port MPort mPort;
7475 }
7476
7477 function VoidRetType() { }
7478
7479 testcase TC() runs on MyComponent {
7480 mPort.send(VoidRetType());
7481 mPort.receive(VoidRetType());
7482 mPort.trigger(VoidRetType());
7483 mPort.check(receive(VoidRetType()));
7484 }
7485
7486 }
7487 <END_MODULE>
7488 <RESULT COUNT 4>
7489 (?im)value.+?expected.+?instead.+?\bof\b.+?function
7490 <END_RESULT>
7491 <RESULT COUNT 4>
7492 (?is)\berror:
7493 <END_RESULT>
7494 <RESULT>
7495 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7496 <END_RESULT>
7497 <END_TC>
7498
7499 :exmp.
7500
7501 .*---------------------------------------------------------------------*
7502 :h3.Void return type - procedure based port operations
7503 .*---------------------------------------------------------------------*
7504 :xmp tab=0.
7505
7506 <TC - Void return type - procedure based port operations>
7507
7508 <COMPILE>
7509 <VERDICT_LEAF PASS>
7510 <MODULE TTCN Temp Temp.ttcn>
7511 module Temp {
7512
7513 signature Sig() exception(integer);
7514 template Sig tSig := { }
7515
7516 type port PPort procedure {
7517 inout Sig
7518 }
7519
7520 type component MyComponent {
7521 port PPort pPort;
7522 }
7523
7524 function VoidRetType() { }
7525
7526 testcase TC() runs on MyComponent {
7527 pPort.call(VoidRetType(), nowait);
7528 pPort.call(tSig, VoidRetType()) {
7529 []pPort.catch(timeout) { }
7530 }
7531 pPort.getreply(VoidRetType());
7532 pPort.getcall(VoidRetType());
7533 pPort.reply(VoidRetType());
7534 pPort.raise(Sig, VoidRetType());
7535 pPort.catch(Sig, VoidRetType());
7536 pPort.check(getreply(VoidRetType()));
7537 }
7538
7539 }
7540 <END_MODULE>
7541 <RESULT COUNT 8>
7542 (?im)value.+?expected.+?instead.+?\bof\b.+?function
7543 <END_RESULT>
7544 <RESULT COUNT 8>
7545 (?is)\berror:
7546 <END_RESULT>
7547 <RESULT>
7548 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7549 <END_RESULT>
7550 <END_TC>
7551
7552 :exmp.
7553
7554 .*---------------------------------------------------------------------*
7555 :h3.Void return type - addition
7556 .*---------------------------------------------------------------------*
7557 :xmp tab=0.
7558
7559 <TC - Void return type - addition>
7560
7561 <COMPILE>
7562 <VERDICT_LEAF PASS>
7563 <MODULE TTCN Temp Temp.ttcn>
7564 module Temp {
7565
7566 function VoidRetType() { }
7567
7568 function Func()
7569 {
7570 var integer FaultyInt1 := VoidRetType() + 10;
7571 var integer FaultyInt2 := 9 + VoidRetType();
7572 var float FaultyFloat1 := 3.14 + VoidRetType();
7573 var float FaultyFloat2 := VoidRetType() + 2.0;
7574 }
7575
7576 }
7577 <END_MODULE>
7578 <RESULT COUNT 4>
7579 (?im)value.+?expected.+?instead.+?\bof\b.+?function
7580 <END_RESULT>
7581 <RESULT COUNT 4>
7582 (?is)\berror:
7583 <END_RESULT>
7584 <RESULT>
7585 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7586 <END_RESULT>
7587 <END_TC>
7588
7589 :exmp.
7590
7591 .*---------------------------------------------------------------------*
7592 :h3.Void return type - subtraction
7593 .*---------------------------------------------------------------------*
7594 :xmp tab=0.
7595
7596 <TC - Void return type - subtraction>
7597
7598 <COMPILE>
7599 <VERDICT_LEAF PASS>
7600 <MODULE TTCN Temp Temp.ttcn>
7601 module Temp {
7602
7603 function VoidRetType() { }
7604
7605 function Func()
7606 {
7607 var integer FaultyInt1 := VoidRetType() - 10;
7608 var integer FaultyInt2 := 9 - VoidRetType();
7609 var float FaultyFloat1 := 3.14 - VoidRetType();
7610 var float FaultyFloat2 := VoidRetType() - 2.0;
7611 }
7612
7613 }
7614 <END_MODULE>
7615 <RESULT COUNT 4>
7616 (?im)value.+?expected.+?instead.+?\bof\b.+?function
7617 <END_RESULT>
7618 <RESULT COUNT 4>
7619 (?is)\berror:
7620 <END_RESULT>
7621 <RESULT>
7622 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7623 <END_RESULT>
7624 <END_TC>
7625
7626 :exmp.
7627
7628 .*---------------------------------------------------------------------*
7629 :h3.Void return type - multiplication
7630 .*---------------------------------------------------------------------*
7631 :xmp tab=0.
7632
7633 <TC - Void return type - multiplication>
7634
7635 <COMPILE>
7636 <VERDICT_LEAF PASS>
7637 <MODULE TTCN Temp Temp.ttcn>
7638 module Temp {
7639
7640 function VoidRetType() { }
7641
7642 function Func()
7643 {
7644 var integer FaultyInt1 := VoidRetType() * 10;
7645 var integer FaultyInt2 := 9 * VoidRetType();
7646 var float FaultyFloat1 := 3.14 * VoidRetType();
7647 var float FaultyFloat2 := VoidRetType() * 2.0;
7648 }
7649
7650 }
7651 <END_MODULE>
7652 <RESULT COUNT 4>
7653 (?im)value.+?expected.+?instead.+?\bof\b.+?function
7654 <END_RESULT>
7655 <RESULT COUNT 4>
7656 (?is)\berror:
7657 <END_RESULT>
7658 <RESULT>
7659 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7660 <END_RESULT>
7661 <END_TC>
7662
7663 :exmp.
7664
7665 .*---------------------------------------------------------------------*
7666 :h3.Void return type - division
7667 .*---------------------------------------------------------------------*
7668 :xmp tab=0.
7669
7670 <TC - Void return type - division>
7671
7672 <COMPILE>
7673 <VERDICT_LEAF PASS>
7674 <MODULE TTCN Temp Temp.ttcn>
7675 module Temp {
7676
7677 function VoidRetType() { }
7678
7679 function Func()
7680 {
7681 var integer FaultyInt1 := VoidRetType() / 10;
7682 var integer FaultyInt2 := 9 / VoidRetType();
7683 var float FaultyFloat1 := 3.14 / VoidRetType();
7684 var float FaultyFloat2 := VoidRetType() / 2.0;
7685 }
7686
7687 }
7688 <END_MODULE>
7689 <RESULT COUNT 4>
7690 (?im)value.+?expected.+?instead.+?\bof\b.+?function
7691 <END_RESULT>
7692 <RESULT COUNT 4>
7693 (?is)\berror:
7694 <END_RESULT>
7695 <RESULT>
7696 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7697 <END_RESULT>
7698 <END_TC>
7699
7700 :exmp.
7701
7702 .*---------------------------------------------------------------------*
7703 :h3.Void return type - modulo
7704 .*---------------------------------------------------------------------*
7705 :xmp tab=0.
7706
7707 <TC - Void return type - modulo>
7708
7709 <COMPILE>
7710 <VERDICT_LEAF PASS>
7711 <MODULE TTCN Temp Temp.ttcn>
7712 module Temp {
7713
7714 function VoidRetType() { }
7715
7716 function Func()
7717 {
7718 var integer FaultyInt1 := VoidRetType() mod 10;
7719 var integer FaultyInt2 := 9 mod VoidRetType();
7720 }
7721
7722 }
7723 <END_MODULE>
7724 <RESULT COUNT 2>
7725 (?im)value.+?expected.+?instead.+?\bof\b.+?function
7726 <END_RESULT>
7727 <RESULT COUNT 2>
7728 (?is)\berror:
7729 <END_RESULT>
7730 <RESULT>
7731 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7732 <END_RESULT>
7733 <END_TC>
7734
7735 :exmp.
7736
7737 .*---------------------------------------------------------------------*
7738 :h3.Void return type - remainder
7739 .*---------------------------------------------------------------------*
7740 :xmp tab=0.
7741
7742 <TC - Void return type - remainder>
7743
7744 <COMPILE>
7745 <VERDICT_LEAF PASS>
7746 <MODULE TTCN Temp Temp.ttcn>
7747 module Temp {
7748
7749 function VoidRetType() { }
7750
7751 function Func()
7752 {
7753 var integer FaultyInt1 := VoidRetType() rem 10;
7754 var integer FaultyInt2 := 9 rem VoidRetType();
7755 }
7756
7757 }
7758 <END_MODULE>
7759 <RESULT COUNT 2>
7760 (?im)value.+?expected.+?instead.+?\bof\b.+?function
7761 <END_RESULT>
7762 <RESULT COUNT 2>
7763 (?is)\berror:
7764 <END_RESULT>
7765 <RESULT>
7766 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7767 <END_RESULT>
7768 <END_TC>
7769
7770 :exmp.
7771
7772 .*---------------------------------------------------------------------*
7773 :h3.Void return type - string concatenation
7774 .*---------------------------------------------------------------------*
7775 :xmp tab=0.
7776
7777 <TC - Void return type - string concatenation>
7778
7779 <COMPILE>
7780 <VERDICT_LEAF PASS>
7781 <MODULE TTCN Temp Temp.ttcn>
7782 module Temp {
7783
7784 function VoidRetType() { }
7785
7786 function Func()
7787 {
7788 var charstring FaultyCS := "ABC" & VoidRetType() & "def";
7789 var bitstring FaultyBS := VoidRetType() & '0101'B;
7790 var hexstring FaultyHS := '123ABCD'H & VoidRetType();
7791 var octetstring FaultyOS := VoidRetType() & 'A5A5'O;
7792 var universal charstring FaultyUCS := "abc" & VoidRetType();
7793 }
7794
7795 }
7796 <END_MODULE>
7797 <RESULT COUNT 5>
7798 (?im)value.+?expected.+?instead.+?\bof\b.+?function
7799 <END_RESULT>
7800 <RESULT COUNT 5>
7801 (?is)\berror:
7802 <END_RESULT>
7803 <RESULT>
7804 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7805 <END_RESULT>
7806 <END_TC>
7807
7808 :exmp.
7809
7810 .*---------------------------------------------------------------------*
7811 :h3.Void return type - equal operator
7812 .*---------------------------------------------------------------------*
7813 :xmp tab=0.
7814
7815 <TC - Void return type - equal operator>
7816
7817 <COMPILE>
7818 <VERDICT_LEAF PASS>
7819 <MODULE TTCN Temp Temp.ttcn>
7820 module Temp {
7821
7822 function VoidRetType() { }
7823
7824 function Func()
7825 {
7826 var boolean FaultyBool := objid { 1 2 3 } == VoidRetType();
7827 }
7828
7829 }
7830 <END_MODULE>
7831 <RESULT COUNT 1>
7832 (?im)value.+?expected.+?instead.+?\bof\b.+?function
7833 <END_RESULT>
7834 <RESULT COUNT 1>
7835 (?is)\berror:
7836 <END_RESULT>
7837 <RESULT>
7838 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7839 <END_RESULT>
7840 <END_TC>
7841
7842 :exmp.
7843
7844 .*---------------------------------------------------------------------*
7845 :h3.Void return type - less then operator
7846 .*---------------------------------------------------------------------*
7847 :xmp tab=0.
7848
7849 <TC - Void return type - less then operator>
7850
7851 <COMPILE>
7852 <VERDICT_LEAF PASS>
7853 <MODULE TTCN Temp Temp.ttcn>
7854 module Temp {
7855
7856 function VoidRetType() { }
7857
7858 function Func()
7859 {
7860 var boolean FaultyBool := 0.0 < VoidRetType();
7861 }
7862
7863 }
7864 <END_MODULE>
7865 <RESULT COUNT 1>
7866 (?im)value.+?expected.+?instead.+?\bof\b.+?function
7867 <END_RESULT>
7868 <RESULT COUNT 1>
7869 (?is)\berror:
7870 <END_RESULT>
7871 <RESULT>
7872 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7873 <END_RESULT>
7874 <END_TC>
7875
7876 :exmp.
7877
7878 .*---------------------------------------------------------------------*
7879 :h3.Void return type - greater then operator
7880 .*---------------------------------------------------------------------*
7881 :xmp tab=0.
7882
7883 <TC - Void return type - greater then operator>
7884
7885 <COMPILE>
7886 <VERDICT_LEAF PASS>
7887 <MODULE TTCN Temp Temp.ttcn>
7888 module Temp {
7889
7890 function VoidRetType() { }
7891
7892 function Func()
7893 {
7894 var boolean FaultyBool := -32 > VoidRetType();
7895 }
7896
7897 }
7898 <END_MODULE>
7899 <RESULT COUNT 1>
7900 (?im)value.+?expected.+?instead.+?\bof\b.+?function
7901 <END_RESULT>
7902 <RESULT COUNT 1>
7903 (?is)\berror:
7904 <END_RESULT>
7905 <RESULT>
7906 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7907 <END_RESULT>
7908 <END_TC>
7909
7910 :exmp.
7911
7912 .*---------------------------------------------------------------------*
7913 :h3.Void return type - not equal operator
7914 .*---------------------------------------------------------------------*
7915 :xmp tab=0.
7916
7917 <TC - Void return type - not equal operator>
7918
7919 <COMPILE>
7920 <VERDICT_LEAF PASS>
7921 <MODULE TTCN Temp Temp.ttcn>
7922 module Temp {
7923
7924 function VoidRetType() { }
7925
7926 function Func()
7927 {
7928 var boolean FaultyBool := "ABC" != VoidRetType();
7929 }
7930
7931 }
7932 <END_MODULE>
7933 <RESULT COUNT 1>
7934 (?im)value.+?expected.+?instead.+?\bof\b.+?function
7935 <END_RESULT>
7936 <RESULT COUNT 1>
7937 (?is)\berror:
7938 <END_RESULT>
7939 <RESULT>
7940 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7941 <END_RESULT>
7942 <END_TC>
7943
7944 :exmp.
7945
7946 .*---------------------------------------------------------------------*
7947 :h3.Void return type - greater then or equal operator
7948 .*---------------------------------------------------------------------*
7949 :xmp tab=0.
7950
7951 <TC - Void return type - greater then or equal operator>
7952
7953 <COMPILE>
7954 <VERDICT_LEAF PASS>
7955 <MODULE TTCN Temp Temp.ttcn>
7956 module Temp {
7957
7958 function VoidRetType() { }
7959
7960 function Func()
7961 {
7962 var boolean FaultyBool := 32.01 >= VoidRetType();
7963 }
7964
7965 }
7966 <END_MODULE>
7967 <RESULT COUNT 1>
7968 (?im)value.+?expected.+?instead.+?\bof\b.+?function
7969 <END_RESULT>
7970 <RESULT COUNT 1>
7971 (?is)\berror:
7972 <END_RESULT>
7973 <RESULT>
7974 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
7975 <END_RESULT>
7976 <END_TC>
7977
7978 :exmp.
7979
7980 .*---------------------------------------------------------------------*
7981 :h3.Void return type - less then or equal operator
7982 .*---------------------------------------------------------------------*
7983 :xmp tab=0.
7984
7985 <TC - Void return type - less then or equal operator>
7986
7987 <COMPILE>
7988 <VERDICT_LEAF PASS>
7989 <MODULE TTCN Temp Temp.ttcn>
7990 module Temp {
7991
7992 function VoidRetType() { }
7993
7994 function Func()
7995 {
7996 var boolean FaultyBool := VoidRetType() <= 99;
7997 }
7998
7999 }
8000 <END_MODULE>
8001 <RESULT COUNT 1>
8002 (?im)value.+?expected.+?instead.+?\bof\b.+?function
8003 <END_RESULT>
8004 <RESULT COUNT 1>
8005 (?is)\berror:
8006 <END_RESULT>
8007 <RESULT>
8008 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
8009 <END_RESULT>
8010 <END_TC>
8011
8012 :exmp.
8013
8014 .*---------------------------------------------------------------------*
8015 :h3.Void return type - logical not operator
8016 .*---------------------------------------------------------------------*
8017 :xmp tab=0.
8018
8019 <TC - Void return type - logical not operator>
8020
8021 <COMPILE>
8022 <VERDICT_LEAF PASS>
8023 <MODULE TTCN Temp Temp.ttcn>
8024 module Temp {
8025
8026 function VoidRetType() { }
8027
8028 function Func()
8029 {
8030 var boolean FaultyBool := not VoidRetType();
8031 }
8032
8033 }
8034 <END_MODULE>
8035 <RESULT COUNT 1>
8036 (?im)value.+?expected.+?instead.+?\bof\b.+?function
8037 <END_RESULT>
8038 <RESULT COUNT 1>
8039 (?is)\berror:
8040 <END_RESULT>
8041 <RESULT>
8042 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
8043 <END_RESULT>
8044 <END_TC>
8045
8046 :exmp.
8047
8048 .*---------------------------------------------------------------------*
8049 :h3.Void return type - logical and operator
8050 .*---------------------------------------------------------------------*
8051 :xmp tab=0.
8052
8053 <TC - Void return type - logical and operator>
8054
8055 <COMPILE>
8056 <VERDICT_LEAF PASS>
8057 <MODULE TTCN Temp Temp.ttcn>
8058 module Temp {
8059
8060 function VoidRetType() { }
8061
8062 function Func()
8063 {
8064 var boolean FaultyBool := VoidRetType() and true;
8065 }
8066
8067 }
8068 <END_MODULE>
8069 <RESULT COUNT 1>
8070 (?im)value.+?expected.+?instead.+?\bof\b.+?function
8071 <END_RESULT>
8072 <RESULT COUNT 1>
8073 (?is)\berror:
8074 <END_RESULT>
8075 <RESULT>
8076 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
8077 <END_RESULT>
8078 <END_TC>
8079
8080 :exmp.
8081
8082 .*---------------------------------------------------------------------*
8083 :h3.Void return type - logical or operator
8084 .*---------------------------------------------------------------------*
8085 :xmp tab=0.
8086
8087 <TC - Void return type - logical or operator>
8088
8089 <COMPILE>
8090 <VERDICT_LEAF PASS>
8091 <MODULE TTCN Temp Temp.ttcn>
8092 module Temp {
8093
8094 function VoidRetType() { }
8095
8096 function Func()
8097 {
8098 var boolean FaultyBool := false or VoidRetType();
8099 }
8100
8101 }
8102 <END_MODULE>
8103 <RESULT COUNT 1>
8104 (?im)value.+?expected.+?instead.+?\bof\b.+?function
8105 <END_RESULT>
8106 <RESULT COUNT 1>
8107 (?is)\berror:
8108 <END_RESULT>
8109 <RESULT>
8110 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
8111 <END_RESULT>
8112 <END_TC>
8113
8114 :exmp.
8115
8116 .*---------------------------------------------------------------------*
8117 :h3.Void return type - logical xor operator
8118 .*---------------------------------------------------------------------*
8119 :xmp tab=0.
8120
8121 <TC - Void return type - logical xor operator>
8122
8123 <COMPILE>
8124 <VERDICT_LEAF PASS>
8125 <MODULE TTCN Temp Temp.ttcn>
8126 module Temp {
8127
8128 function VoidRetType()
8129 { }
8130
8131 function Func()
8132 {
8133 var boolean FaultyBool := VoidRetType() xor true;
8134 }
8135
8136 }
8137 <END_MODULE>
8138 <RESULT COUNT 1>
8139 (?im)value.+?expected.+?instead.+?\bof\b.+?function
8140 <END_RESULT>
8141 <RESULT COUNT 1>
8142 (?is)\berror:
8143 <END_RESULT>
8144 <RESULT>
8145 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
8146 <END_RESULT>
8147 <END_TC>
8148
8149 :exmp.
8150
8151 .*---------------------------------------------------------------------*
8152 :h3.Void return type - bitwise not operator
8153 .*---------------------------------------------------------------------*
8154 :xmp tab=0.
8155
8156 <TC - Void return type - bitwise not operator>
8157
8158 <COMPILE>
8159 <VERDICT_LEAF PASS>
8160 <MODULE TTCN Temp Temp.ttcn>
8161 module Temp {
8162
8163 function VoidRetType() { }
8164
8165 function Func()
8166 {
8167 var integer FaultyInt := not4b VoidRetType();
8168 }
8169
8170 }
8171 <END_MODULE>
8172 <RESULT COUNT 1>
8173 (?im)value.+?expected.+?instead.+?\bof\b.+?function
8174 <END_RESULT>
8175 <RESULT COUNT 1>
8176 (?is)\berror:
8177 <END_RESULT>
8178 <RESULT>
8179 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
8180 <END_RESULT>
8181 <END_TC>
8182
8183 :exmp.
8184
8185 .*---------------------------------------------------------------------*
8186 :h3.Void return type - bitwise and operator
8187 .*---------------------------------------------------------------------*
8188 :xmp tab=0.
8189
8190 <TC - Void return type - bitwise and operator>
8191
8192 <COMPILE>
8193 <VERDICT_LEAF PASS>
8194 <MODULE TTCN Temp Temp.ttcn>
8195 module Temp {
8196
8197 function VoidRetType() { }
8198
8199 function Func()
8200 {
8201 var bitstring FaultyBS := VoidRetType() and4b '0101'B;
8202 }
8203
8204 }
8205 <END_MODULE>
8206 <RESULT COUNT 1>
8207 (?im)value.+?expected.+?instead.+?\bof\b.+?function
8208 <END_RESULT>
8209 <RESULT COUNT 1>
8210 (?is)\berror:
8211 <END_RESULT>
8212 <RESULT>
8213 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
8214 <END_RESULT>
8215 <END_TC>
8216
8217 :exmp.
8218
8219 .*---------------------------------------------------------------------*
8220 :h3.Void return type - bitwise or operator
8221 .*---------------------------------------------------------------------*
8222 :xmp tab=0.
8223
8224 <TC - Void return type - bitwise or operator>
8225
8226 <COMPILE>
8227 <VERDICT_LEAF PASS>
8228 <MODULE TTCN Temp Temp.ttcn>
8229 module Temp {
8230
8231 function VoidRetType()
8232 { }
8233
8234 function Func()
8235 {
8236 var octetstring FaultyOS := 'AA55'O or4b VoidRetType();
8237 }
8238
8239 }
8240 <END_MODULE>
8241 <RESULT COUNT 1>
8242 (?im)value.+?expected.+?instead.+?\bof\b.+?function
8243 <END_RESULT>
8244 <RESULT COUNT 1>
8245 (?is)\berror:
8246 <END_RESULT>
8247 <RESULT>
8248 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
8249 <END_RESULT>
8250 <END_TC>
8251
8252 :exmp.
8253
8254 .*---------------------------------------------------------------------*
8255 :h3.Void return type - bitwise xor operator
8256 .*---------------------------------------------------------------------*
8257 :xmp tab=0.
8258
8259 <TC - Void return type - bitwise xor operator>
8260
8261 <COMPILE>
8262 <VERDICT_LEAF PASS>
8263 <MODULE TTCN Temp Temp.ttcn>
8264 module Temp {
8265
8266 function VoidRetType() { }
8267
8268 function Func()
8269 {
8270 var hexstring FaultyHS := VoidRetType() xor4b '123'H;
8271 }
8272
8273 }
8274 <END_MODULE>
8275 <RESULT COUNT 1>
8276 (?im)value.+?expected.+?instead.+?\bof\b.+?function
8277 <END_RESULT>
8278 <RESULT COUNT 1>
8279 (?is)\berror:
8280 <END_RESULT>
8281 <RESULT>
8282 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
8283 <END_RESULT>
8284 <END_TC>
8285
8286 :exmp.
8287
8288 .*---------------------------------------------------------------------*
8289 :h3.Void return type - shift operators
8290 .*---------------------------------------------------------------------*
8291 :xmp tab=0.
8292
8293 <TC - Void return type - shift operators>
8294
8295 <COMPILE>
8296 <VERDICT_LEAF PASS>
8297 <MODULE TTCN Temp Temp.ttcn>
8298 module Temp {
8299
8300 function VoidRetType() { }
8301
8302 function Func()
8303 {
8304 var bitstring FaultyBS1 := '0011'B << VoidRetType();
8305 var bitstring FaultyBS2 := VoidRetType() >> 12;
8306 var hexstring FaultyHS := '123'H << VoidRetType();
8307 var octetstring FaultyOS := '1234'O << VoidRetType();
8308 }
8309
8310 }
8311 <END_MODULE>
8312 <RESULT COUNT 4>
8313 (?im)value.+?expected.+?instead.+?\bof\b.+?function
8314 <END_RESULT>
8315 <RESULT COUNT 4>
8316 (?is)\berror:
8317 <END_RESULT>
8318 <RESULT>
8319 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
8320 <END_RESULT>
8321 <END_TC>
8322
8323 :exmp.
8324
8325 .*---------------------------------------------------------------------*
8326 :h3.Void return type - rotate operators
8327 .*---------------------------------------------------------------------*
8328 :xmp tab=0.
8329
8330 <TC - Void return type - rotate operators>
8331
8332 <COMPILE>
8333 <VERDICT_LEAF PASS>
8334 <MODULE TTCN Temp Temp.ttcn>
8335 module Temp {
8336
8337 function VoidRetType() { }
8338
8339 function Func()
8340 {
8341 var bitstring FaultyBS1 := '0011'B <@ VoidRetType();
8342 var bitstring FaultyBS2 := VoidRetType() @> 12;
8343 var hexstring FaultyHS := '123'H <@ VoidRetType();
8344 var octetstring FaultyOS := '1234'O <@ VoidRetType();
8345 var charstring FaultyCS := "ABCDEF" <@ VoidRetType();
8346 }
8347
8348 }
8349 <END_MODULE>
8350 <RESULT COUNT 5>
8351 (?im)value.+?expected.+?instead.+?\bof\b.+?function
8352 <END_RESULT>
8353 <RESULT COUNT 5>
8354 (?is)\berror:
8355 <END_RESULT>
8356 <RESULT>
8357 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
8358 <END_RESULT>
8359 <END_TC>
8360
8361 :exmp.
8362
8363 .*---------------------------------------------------------------------*
8364 :h3.Void return type - assignment
8365 .*---------------------------------------------------------------------*
8366 :xmp tab=0.
8367
8368 <TC - Void return type - assignment>
8369
8370 <COMPILE>
8371 <VERDICT_LEAF PASS>
8372 <MODULE TTCN Temp Temp.ttcn>
8373 module Temp {
8374
8375 function VoidRetType() { }
8376
8377 function Func()
8378 {
8379 var integer FaultyInt := VoidRetType();
8380 }
8381
8382 }
8383 <END_MODULE>
8384 <RESULT COUNT 1>
8385 (?im)value.+?expected.+?instead.+?\bof\b.+?function
8386 <END_RESULT>
8387 <RESULT COUNT 1>
8388 (?is)\berror:
8389 <END_RESULT>
8390 <RESULT>
8391 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
8392 <END_RESULT>
8393 <END_TC>
8394
8395 :exmp.
8396
8397 .*---------------------------------------------------------------------*
8398 :h3.Void return type - logging
8399 .*---------------------------------------------------------------------*
8400 :xmp tab=0.
8401
8402 <TC - Void return type - logging>
8403
8404 <COMPILE>
8405 <VERDICT_LEAF PASS>
8406 <MODULE TTCN Temp Temp.ttcn>
8407 module Temp {
8408
8409 function VoidRetType() { }
8410
8411 function Func()
8412 {
8413 log("VoidRetType() returned: ", VoidRetType());
8414 }
8415
8416 }
8417 <END_MODULE>
8418 <RESULT COUNT 1>
8419 (?im)value.+?expected.+?instead.+?\bof\b.+?function
8420 <END_RESULT>
8421 <RESULT COUNT 1>
8422 (?is)\berror:
8423 <END_RESULT>
8424 <RESULT>
8425 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
8426 <END_RESULT>
8427 <END_TC>
8428
8429 :exmp.
8430
8431 .*---------------------------------------------------------------------*
8432 :h3.Void return type - if/else statement
8433 .*---------------------------------------------------------------------*
8434 :xmp tab=0.
8435
8436 <TC - Void return type - if/else statement>
8437
8438 <COMPILE>
8439 <VERDICT_LEAF PASS>
8440 <MODULE TTCN Temp Temp.ttcn>
8441 module Temp {
8442
8443 function VoidRetType() { }
8444
8445 function Func()
8446 {
8447 if(VoidRetType()) { }
8448 }
8449
8450 }
8451 <END_MODULE>
8452 <RESULT COUNT 1>
8453 (?im)value.+?expected.+?instead.+?\bof\b.+?function
8454 <END_RESULT>
8455 <RESULT COUNT 1>
8456 (?is)\berror:
8457 <END_RESULT>
8458 <RESULT>
8459 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
8460 <END_RESULT>
8461 <END_TC>
8462
8463 :exmp.
8464
8465 .*---------------------------------------------------------------------*
8466 :h3.Void return type - for loop
8467 .*---------------------------------------------------------------------*
8468 :xmp tab=0.
8469
8470 <TC - Void return type - for loop>
8471
8472 <COMPILE>
8473 <VERDICT_LEAF PASS>
8474 <MODULE TTCN Temp Temp.ttcn>
8475 module Temp {
8476
8477 function VoidRetType() { }
8478
8479 function Func()
8480 {
8481 for(var integer Counter:=0; VoidRetType(); Counter:=Counter+1) { }
8482 }
8483
8484 }
8485 <END_MODULE>
8486 <RESULT COUNT 1>
8487 (?im)value.+?expected.+?instead.+?\bof\b.+?function
8488 <END_RESULT>
8489 <RESULT COUNT 1>
8490 (?is)\berror:
8491 <END_RESULT>
8492 <RESULT>
8493 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
8494 <END_RESULT>
8495 <END_TC>
8496
8497 :exmp.
8498
8499 .*---------------------------------------------------------------------*
8500 :h3.Void return type - while loop
8501 .*---------------------------------------------------------------------*
8502 :xmp tab=0.
8503
8504 <TC - Void return type - while loop>
8505
8506 <COMPILE>
8507 <VERDICT_LEAF PASS>
8508 <MODULE TTCN Temp Temp.ttcn>
8509 module Temp {
8510
8511 function VoidRetType() { }
8512
8513 function Func()
8514 {
8515 while(VoidRetType()) { }
8516 }
8517
8518 }
8519 <END_MODULE>
8520 <RESULT COUNT 1>
8521 (?im)value.+?expected.+?instead.+?\bof\b.+?function
8522 <END_RESULT>
8523 <RESULT COUNT 1>
8524 (?is)\berror:
8525 <END_RESULT>
8526 <RESULT>
8527 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
8528 <END_RESULT>
8529 <END_TC>
8530
8531 :exmp.
8532
8533 .*---------------------------------------------------------------------*
8534 :h3.Void return type - do while loop
8535 .*---------------------------------------------------------------------*
8536 :xmp tab=0.
8537
8538 <TC - Void return type - do while loop>
8539
8540 <COMPILE>
8541 <VERDICT_LEAF PASS>
8542 <MODULE TTCN Temp Temp.ttcn>
8543 module Temp {
8544
8545 function VoidRetType() { }
8546
8547 function Func()
8548 {
8549 do { } while(VoidRetType());
8550 }
8551
8552 }
8553 <END_MODULE>
8554 <RESULT COUNT 1>
8555 (?im)value.+?expected.+?instead.+?\bof\b.+?function
8556 <END_RESULT>
8557 <RESULT COUNT 1>
8558 (?is)\berror:
8559 <END_RESULT>
8560 <RESULT>
8561 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
8562 <END_RESULT>
8563 <END_TC>
8564
8565 :exmp.
8566
8567 .*---------------------------------------------------------------------*
8568 :h3.Void return type - array notation
8569 .*---------------------------------------------------------------------*
8570 :xmp tab=0.
8571
8572 <TC - Void return type - array notation>
8573
8574 <COMPILE>
8575 <VERDICT_LEAF PASS>
8576 <MODULE TTCN Temp Temp.ttcn>
8577 module Temp {
8578
8579 function VoidRetType() { }
8580
8581 function Func()
8582 {
8583 var integer Int[3] := { 1, 2, 3 };
8584 var integer FaultyInt := Int[VoidRetType()];
8585 }
8586
8587 }
8588 <END_MODULE>
8589 <RESULT COUNT 1>
8590 (?im)value.+?expected.+?instead.+?\bof\b.+?function
8591 <END_RESULT>
8592 <RESULT COUNT 1>
8593 (?is)\berror:
8594 <END_RESULT>
8595 <RESULT>
8596 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
8597 <END_RESULT>
8598 <END_TC>
8599
8600 :exmp.
8601
8602 .*---------------------------------------------------------------------*
8603 :h3.Void return type - start timer operation
8604 .*---------------------------------------------------------------------*
8605 :xmp tab=0.
8606
8607 <TC - Void return type - start timer operation>
8608
8609 <COMPILE>
8610 <VERDICT_LEAF PASS>
8611 <MODULE TTCN Temp Temp.ttcn>
8612 module Temp {
8613
8614 function VoidRetType() { }
8615
8616 function Func()
8617 {
8618 timer T;
8619 T.start(VoidRetType());
8620 }
8621
8622 }
8623 <END_MODULE>
8624 <RESULT COUNT 1>
8625 (?im)value.+?expected.+?instead.+?\bof\b.+?function
8626 <END_RESULT>
8627 <RESULT COUNT 1>
8628 (?is)\berror:
8629 <END_RESULT>
8630 <RESULT>
8631 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
8632 <END_RESULT>
8633 <END_TC>
8634
8635 :exmp.
8636
8637 .*---------------------------------------------------------------------*
8638 :h3.Void return type - actual parameter
8639 .*---------------------------------------------------------------------*
8640 :xmp tab=0.
8641
8642 <TC - Void return type - actual parameter>
8643
8644 <COMPILE>
8645 <VERDICT_LEAF PASS>
8646 <MODULE TTCN Temp Temp.ttcn>
8647 module Temp {
8648
8649 function VoidRetType() { }
8650
8651 function FuncWithParam(in integer Par) { }
8652
8653 function Func()
8654 {
8655 FuncWithParam(VoidRetType());
8656 }
8657
8658 }
8659 <END_MODULE>
8660 <RESULT COUNT 1>
8661 (?im)value.+?expected.+?instead.+?\bof\b.+?function
8662 <END_RESULT>
8663 <RESULT COUNT 1>
8664 (?is)\berror:
8665 <END_RESULT>
8666 <RESULT>
8667 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
8668 <END_RESULT>
8669 <END_TC>
8670
8671 :exmp.
8672
8673 .*---------------------------------------------------------------------*
8674 :h3.Void return type - alt guard
8675 .*---------------------------------------------------------------------*
8676 :xmp tab=0.
8677
8678 <TC - Void return type - alt guard>
8679
8680 <COMPILE>
8681 <VERDICT_LEAF PASS>
8682 <MODULE TTCN Temp Temp.ttcn>
8683 module Temp {
8684
8685 function VoidRetType() { }
8686
8687 function Func()
8688 {
8689 timer T;
8690 T.start(1.0);
8691 alt {
8692 [VoidRetType()]T.timeout { }
8693 }
8694 }
8695
8696 }
8697 <END_MODULE>
8698 <RESULT COUNT 1>
8699 (?im)value.+?expected.+?instead.+?\bof\b.+?function
8700 <END_RESULT>
8701 <RESULT COUNT 1>
8702 (?is)\berror:
8703 <END_RESULT>
8704 <RESULT>
8705 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
8706 <END_RESULT>
8707 <END_TC>
8708
8709 :exmp.
8710
8711 .*---------------------------------------------------------------------*
8712 :h3.Void return type - setverdict
8713 .*---------------------------------------------------------------------*
8714 :xmp tab=0.
8715
8716 <TC - Void return type - setverdict>
8717
8718 <COMPILE>
8719 <VERDICT_LEAF PASS>
8720 <MODULE TTCN Temp Temp.ttcn>
8721 module Temp {
8722
8723 function VoidRetType() { }
8724
8725 function Func()
8726 {
8727 setverdict(VoidRetType());
8728 }
8729
8730 }
8731 <END_MODULE>
8732 <RESULT COUNT 1>
8733 (?im)value.+?expected.+?instead.+?\bof\b.+?function
8734 <END_RESULT>
8735 <RESULT COUNT 1>
8736 (?is)\berror:
8737 <END_RESULT>
8738 <RESULT>
8739 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
8740 <END_RESULT>
8741 <END_TC>
8742
8743 :exmp.
8744
8745
8746 .*---------------------------------------------------------------------*
8747 :h2.Functions and altsteps with different component type
8748 .*---------------------------------------------------------------------*
8749 This test case group covers the requirement SA-5/5.
8750
8751 Functions, altsteps and testcases can have runs on clause. The testcases
8752 below test the possible usage of these language elements: function
8753 calling, starting a test component with a function, using altsteps
8754 standalone or in alt statements and activating altsteps as default.
8755
8756 .*---------------------------------------------------------------------*
8757 :h3.Different component type - function calling function
8758 .*---------------------------------------------------------------------*
8759 :xmp tab=0.
8760
8761 <TC - Different component type - function calling function>
8762
8763 <COMPILE>
8764 <VERDICT_LEAF PASS>
8765 <MODULE TTCN Temp Temp.ttcn>
8766 module Temp {
8767
8768 type component A_CT { timer Ta:=2.0; }
8769
8770 type component B_CT { var integer I:=3; }
8771
8772 function Fa() runs on A_CT {
8773 Ta.start;
8774 }
8775
8776 function Fb() runs on B_CT {
8777 Fa();
8778 }
8779
8780 }
8781 <END_MODULE>
8782 <RESULT COUNT 1>
8783 (?im)runs.+?on.+?clause.+?mismatch
8784 <END_RESULT>
8785 <RESULT COUNT 1>
8786 (?is)\berror:
8787 <END_RESULT>
8788 <RESULT>
8789 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
8790 <END_RESULT>
8791 <END_TC>
8792
8793 :exmp.
8794
8795 .*---------------------------------------------------------------------*
8796 :h3.Different component type - testcase calling function
8797 .*---------------------------------------------------------------------*
8798 :xmp tab=0.
8799
8800 <TC - Different component type - testcase calling function>
8801
8802 <COMPILE>
8803 <VERDICT_LEAF PASS>
8804 <MODULE TTCN Temp Temp.ttcn>
8805 module Temp {
8806
8807 type component A_CT { timer Ta:=2.0; }
8808
8809 type component B_CT { var integer I:=3; }
8810
8811 function Fa() runs on A_CT {
8812 Ta.start;
8813 }
8814
8815 testcase TCb() runs on B_CT {
8816 Fa();
8817 }
8818
8819 }
8820 <END_MODULE>
8821 <RESULT COUNT 1>
8822 (?im)runs.+?on.+?clause.+?mismatch
8823 <END_RESULT>
8824 <RESULT COUNT 1>
8825 (?is)\berror:
8826 <END_RESULT>
8827 <RESULT>
8828 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
8829 <END_RESULT>
8830 <END_TC>
8831
8832 :exmp.
8833
8834 .*---------------------------------------------------------------------*
8835 :h3.Different component type - altstep calling function
8836 .*---------------------------------------------------------------------*
8837 :xmp tab=0.
8838
8839 <TC - Different component type - altstep calling function>
8840
8841 <COMPILE>
8842 <VERDICT_LEAF PASS>
8843 <MODULE TTCN Temp Temp.ttcn>
8844 module Temp {
8845
8846 type component A_CT { timer Ta:=2.0; }
8847
8848 type component B_CT { timer Tb:=3.0; }
8849
8850 function Fa() runs on A_CT {
8851 Ta.start;
8852 }
8853
8854 altstep TCb() runs on B_CT {
8855 []Tb.timeout { Fa(); }
8856 }
8857
8858 }
8859 <END_MODULE>
8860 <RESULT COUNT 1>
8861 (?im)runs.+?on.+?clause.+?mismatch
8862 <END_RESULT>
8863 <RESULT COUNT 1>
8864 (?is)\berror:
8865 <END_RESULT>
8866 <RESULT>
8867 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
8868 <END_RESULT>
8869 <END_TC>
8870
8871 :exmp.
8872
8873 .*---------------------------------------------------------------------*
8874 :h3.Different component type - starting a component
8875 .*---------------------------------------------------------------------*
8876 :xmp tab=0.
8877
8878 <TC - Different component type - starting a component>
8879
8880 <COMPILE>
8881 <VERDICT_LEAF PASS>
8882 <MODULE TTCN Temp Temp.ttcn>
8883 module Temp {
8884
8885 type component A_CT { timer Ta:=2.0; }
8886
8887 type component B_CT { var integer I:=3; }
8888
8889 function Fa() runs on A_CT {
8890 Ta.start;
8891 }
8892
8893 testcase TCb() runs on B_CT {
8894 var B_CT b_comp;
8895 b_comp.start(Fa());
8896 }
8897
8898 }
8899 <END_MODULE>
8900 <RESULT COUNT 1>
8901 (?im)component.+?type.+?mismatch
8902 <END_RESULT>
8903 <RESULT COUNT 1>
8904 (?is)\berror:
8905 <END_RESULT>
8906 <RESULT>
8907 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
8908 <END_RESULT>
8909 <END_TC>
8910
8911 :exmp.
8912
8913 .*---------------------------------------------------------------------*
8914 :h3.Different component type - altstep in testcase
8915 .*---------------------------------------------------------------------*
8916 :xmp tab=0.
8917
8918 <TC - Different component type - altstep in testcase>
8919
8920 <COMPILE>
8921 <VERDICT_LEAF PASS>
8922 <MODULE TTCN Temp Temp.ttcn>
8923 module Temp {
8924
8925 type component A_CT { timer Ta:=2.0; }
8926
8927 type component B_CT { var integer I:=3; }
8928
8929 altstep ASa() runs on A_CT {
8930 []Ta.timeout { }
8931 }
8932
8933 testcase TCb() runs on B_CT {
8934 ASa();
8935
8936 alt {
8937 []ASa();
8938 }
8939 }
8940
8941 }
8942 <END_MODULE>
8943 <RESULT COUNT 2>
8944 (?im)runs on.+?clause.+?mismatch
8945 <END_RESULT>
8946 <RESULT COUNT 2>
8947 (?is)\berror:
8948 <END_RESULT>
8949 <RESULT>
8950 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
8951 <END_RESULT>
8952 <END_TC>
8953
8954 :exmp.
8955
8956 .*---------------------------------------------------------------------*
8957 :h3.Different component type - activating an altstep in testcase
8958 .*---------------------------------------------------------------------*
8959 :xmp tab=0.
8960
8961 <TC - Different component type - activating an altstep in testcase>
8962
8963 <COMPILE>
8964 <VERDICT_LEAF PASS>
8965 <MODULE TTCN Temp Temp.ttcn>
8966 module Temp {
8967
8968 type component A_CT { timer Ta:=2.0; }
8969
8970 type component B_CT { var default v_default; }
8971
8972 altstep ASa() runs on A_CT {
8973 []Ta.timeout { }
8974 }
8975
8976 testcase TCb() runs on B_CT {
8977 v_default := activate(ASa());
8978 }
8979
8980 }
8981 <END_MODULE>
8982 <RESULT COUNT 1>
8983 (?im)runs on.+?clause.+?mismatch
8984 <END_RESULT>
8985 <RESULT COUNT 1>
8986 (?is)\berror:
8987 <END_RESULT>
8988 <RESULT>
8989 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
8990 <END_RESULT>
8991 <END_TC>
8992
8993 :exmp.
8994
8995 .*---------------------------------------------------------------------*
8996 :h3.Different component type - altstep in function
8997 .*---------------------------------------------------------------------*
8998 :xmp tab=0.
8999
9000 <TC - Different component type - altstep in function>
9001
9002 <COMPILE>
9003 <VERDICT_LEAF PASS>
9004 <MODULE TTCN Temp Temp.ttcn>
9005 module Temp {
9006
9007 type component A_CT { timer Ta:=2.0; }
9008
9009 type component B_CT { var integer I:=3; }
9010
9011 altstep ASa() runs on A_CT {
9012 []Ta.timeout { }
9013 }
9014
9015 function Fb() runs on B_CT {
9016 ASa();
9017
9018 alt {
9019 []ASa();
9020 }
9021 }
9022
9023 }
9024 <END_MODULE>
9025 <RESULT COUNT 2>
9026 (?im)runs on.+?clause.+?mismatch
9027 <END_RESULT>
9028 <RESULT COUNT 2>
9029 (?is)\berror:
9030 <END_RESULT>
9031 <RESULT>
9032 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
9033 <END_RESULT>
9034 <END_TC>
9035
9036 :exmp.
9037
9038 .*---------------------------------------------------------------------*
9039 :h3.Different component type - activating an altstep in function
9040 .*---------------------------------------------------------------------*
9041 :xmp tab=0.
9042
9043 <TC - Different component type - activating an altstep in function>
9044
9045 <COMPILE>
9046 <VERDICT_LEAF PASS>
9047 <MODULE TTCN Temp Temp.ttcn>
9048 module Temp {
9049
9050 type component A_CT { timer Ta:=2.0; }
9051
9052 type component B_CT { var default v_default; }
9053
9054 altstep ASa() runs on A_CT {
9055 []Ta.timeout { }
9056 }
9057
9058 function TCb() runs on B_CT {
9059 v_default := activate(ASa());
9060 }
9061
9062 }
9063 <END_MODULE>
9064 <RESULT COUNT 1>
9065 (?im)runs on.+?clause.+?mismatch
9066 <END_RESULT>
9067 <RESULT COUNT 1>
9068 (?is)\berror:
9069 <END_RESULT>
9070 <RESULT>
9071 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
9072 <END_RESULT>
9073 <END_TC>
9074
9075 :exmp.
9076
9077 .*---------------------------------------------------------------------*
9078 :h3.Different component type - altstep in altstep
9079 .*---------------------------------------------------------------------*
9080 :xmp tab=0.
9081
9082 <TC - Different component type - altstep in altstep>
9083
9084 <COMPILE>
9085 <VERDICT_LEAF PASS>
9086 <MODULE TTCN Temp Temp.ttcn>
9087 module Temp {
9088
9089 type component A_CT { timer Ta:=2.0; }
9090
9091 type component B_CT { var integer I:=3; }
9092
9093 altstep ASa() runs on A_CT {
9094 []Ta.timeout { }
9095 }
9096
9097 altstep ASb() runs on B_CT {
9098 []ASa();
9099 }
9100
9101 }
9102 <END_MODULE>
9103 <RESULT COUNT 1>
9104 (?im)runs on.+?clause.+?mismatch
9105 <END_RESULT>
9106 <RESULT COUNT 1>
9107 (?is)\berror:
9108 <END_RESULT>
9109 <RESULT>
9110 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
9111 <END_RESULT>
9112 <END_TC>
9113
9114 :exmp.
9115
9116 .*---------------------------------------------------------------------*
9117 :h2.Type list of a port
9118 .*---------------------------------------------------------------------*
9119 This test case group covers the requirement SA-5/6.
9120 Types used in port operations shall be listed in the type list of the
9121 port definition.
9122
9123 .*---------------------------------------------------------------------*
9124 :h3.Type list of a port - send basic types
9125 .*---------------------------------------------------------------------*
9126 :xmp tab=0.
9127
9128 <TC - Type list of a port - send basic types>
9129
9130 <COMPILE>
9131 <VERDICT_LEAF PASS>
9132 <MODULE TTCN ModuleA ModuleA.ttcn>
9133 module ModuleA {
9134 type enumerated MyEnum { halflife1(1), halflife2(2) }
9135 // allow integer only and try to pass everything else
9136 type port MyPortType1 message { inout integer }
9137 type port MyPortType2 message { in float; out integer }
9138 type component MyComp {
9139 port MyPortType1 MyPort1;
9140 port MyPortType2 MyPort2;
9141 }
9142 function MyFunc_send() runs on MyComp {
9143 timer loc_timer;
9144 loc_timer.start(0.0027);
9145 MyPort1.send(666.0 + 1.9 + loc_timer.read); // float
9146 MyPort1.send(loc_timer.running or false); // boolean
9147 MyPort1.send(objid {0 4 0}); // objid
9148 MyPort1.send(pass); // verdicttype
9149 //TR-674: Multiple error messages for send operation
9150 MyPort1.send(MyEnum:halflife2); // enumerated
9151 // not on the 'out' list
9152 MyPort2.send(666.0);
9153 }
9154 }
9155 <END_MODULE>
9156 <RESULT IF_PASS COUNT 5>
9157 (?im)integer.+?value.+?expected
9158 <END_RESULT>
9159 <RESULT IF_PASS COUNT 1>
9160 (?im)integer.+?expected.+?instead.+?\bof\b.+?MyEnum
9161 <END_RESULT>
9162 <RESULT COUNT 6>
9163 (?is)\berror:
9164 <END_RESULT>
9165 <RESULT IF_PASS POSITIVE>
9166 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
9167 <END_RESULT>
9168 <END_TC>
9169
9170 :exmp.
9171
9172 .*---------------------------------------------------------------------*
9173 :h3.Type list of a port - send string types
9174 .*---------------------------------------------------------------------*
9175 :xmp tab=0.
9176
9177 <TC - Type list of a port - send string types>
9178
9179 <COMPILE>
9180 <VERDICT_LEAF PASS>
9181 <MODULE TTCN ModuleA ModuleA.ttcn>
9182 module ModuleA {
9183 type enumerated MyEnum { halflife1(1), halflife2(2) }
9184 // allow integer only and try to pass everything else
9185 type port MyPortType1 message { inout integer }
9186 type component MyComp {
9187 port MyPortType1 MyPort1;
9188 }
9189 function MyFunc_send() runs on MyComp {
9190 MyPort1.send('0011'B & '1100'B & '1'B); // bitstring
9191 MyPort1.send('AF07'H & 'FF'H); // hexstring
9192 MyPort1.send('0123'O & 'FFE7'O); // octetstring
9193 MyPort1.send("McHalls " & "was " & "here"); // charstring
9194 MyPort1.send("Damn!" & char(0,0,1,113)); // unicharstring
9195 }
9196 }
9197 <END_MODULE>
9198 <RESULT IF_PASS COUNT 5>
9199 (?im)integer.+?value.+?expected
9200 <END_RESULT>
9201 <RESULT COUNT 5>
9202 (?is)\berror:
9203 <END_RESULT>
9204 <RESULT IF_PASS POSITIVE>
9205 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
9206 <END_RESULT>
9207 <END_TC>
9208
9209 :exmp.
9210
9211 .*---------------------------------------------------------------------*
9212 :h3.Type list of a port - send other types
9213 .*---------------------------------------------------------------------*
9214 :xmp tab=0.
9215
9216 <TC - Type list of a port - send other types>
9217
9218 <COMPILE>
9219 <VERDICT_LEAF PASS>
9220 <MODULE TTCN ModuleA ModuleA.ttcn>
9221 module ModuleA {
9222 type record MyRecord { integer field1 }
9223 type port MyPortType1 message { inout integer }
9224 type component MyComp {
9225 port MyPortType1 MyPort1;
9226 }
9227 altstep MyAltstep() runs on MyComp {
9228 [] MyPort1.trigger {}
9229 }
9230 function MyFunc_send() runs on MyComp {
9231 var default MyWar := activate(MyAltstep());
9232 var MyRecord myRec := {1};
9233 MyPort1.send(self); // component ref
9234 MyPort1.send(MyWar); // default
9235 MyPort1.send(myRec); // structured type
9236 }
9237 }
9238 <END_MODULE>
9239 <RESULT IF_PASS COUNT 3>
9240 (?im)integer.+?expected
9241 <END_RESULT>
9242 <RESULT COUNT 3>
9243 (?is)\berror:
9244 <END_RESULT>
9245 <RESULT IF_PASS POSITIVE>
9246 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
9247 <END_RESULT>
9248 <END_TC>
9249
9250 :exmp.
9251
9252 .*---------------------------------------------------------------------*
9253 :h3.Type list of a port - receive basic types
9254 .*---------------------------------------------------------------------*
9255 :xmp tab=0.
9256
9257 <TC - Type list of a port - receive basic types>
9258
9259 <COMPILE>
9260 <VERDICT_LEAF PASS>
9261 <MODULE TTCN ModuleA ModuleA.ttcn>
9262 module ModuleA {
9263 type enumerated MyEnum { halflife1(1), halflife2(2) }
9264 // allow integer only and try to pass everything else
9265 type port MyPortType1 message { inout integer }
9266 type port MyPortType2 message { in float; out integer }
9267 type component MyComp {
9268 port MyPortType1 MyPort1;
9269 port MyPortType2 MyPort2;
9270 }
9271 altstep MyAltstep_receive() runs on MyComp {
9272 [] MyPort1.receive(666.0 + 1.9) {}; // float
9273 [] MyPort1.receive(true or false) {}; // boolean
9274 [] MyPort1.receive(objid {0 4 0}) {}; // objid
9275 [] MyPort1.receive(pass) {}; // verdicttype
9276 [] MyPort1.receive(halflife2) {}; // enumerated
9277 [] MyPort2.receive(666) {};
9278 }
9279 }
9280 <END_MODULE>
9281 <RESULT IF_PASS COUNT 4>
9282 (?im)integer.+?value.+?expected
9283 <END_RESULT>
9284 <RESULT IF_PASS COUNT 1>
9285 (?im)float.+?value.+?expected
9286 <END_RESULT>
9287 <RESULT IF_PASS COUNT 1>
9288 (?im)\bno\b.+?definition.+?halflife2
9289 <END_RESULT>
9290 <RESULT COUNT 6>
9291 (?is)\berror:
9292 <END_RESULT>
9293 <RESULT IF_PASS POSITIVE>
9294 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
9295 <END_RESULT>
9296 <END_TC>
9297
9298 :exmp.
9299
9300 .*---------------------------------------------------------------------*
9301 :h3.Type list of a port - receive string types
9302 .*---------------------------------------------------------------------*
9303
9304 <TC - Type list of a port - receive string types>
9305
9306 <COMPILE>
9307 <VERDICT_LEAF PASS>
9308 <MODULE TTCN ModuleA ModuleA.ttcn>
9309 module ModuleA {
9310 type port MyPortType1 message { inout integer }
9311 type component MyComp {
9312 port MyPortType1 MyPort1;
9313 }
9314 altstep MyAltstep_receive() runs on MyComp {
9315 [] MyPort1.receive('0011'B & '1100'B & '1'B) {}; // bitstring
9316 [] MyPort1.receive('AF07'H & 'FF'H) {}; // hexstring
9317 [] MyPort1.receive('0123'O & 'FFE7'O) {}; // octetstring
9318 [] MyPort1.receive("McHalls " & "was " & "here") {}; // charstring
9319 [] MyPort1.receive("Damn!" & char(0,0,1,113)) {}; // unicharstring
9320 }
9321 }
9322 <END_MODULE>
9323 <RESULT IF_PASS COUNT 5>
9324 (?im)integer.+?value.+?expected
9325 <END_RESULT>
9326 <RESULT COUNT 5>
9327 (?is)\berror:
9328 <END_RESULT>
9329 <RESULT IF_PASS POSITIVE>
9330 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
9331 <END_RESULT>
9332 <END_TC>
9333
9334 :exmp.
9335
9336 .*---------------------------------------------------------------------*
9337 :h3.Type list of a port - receive other types
9338 .*---------------------------------------------------------------------*
9339 :xmp tab=0.
9340
9341 <TC - Type list of a port - receive other types>
9342
9343 <COMPILE>
9344 <VERDICT_LEAF PASS>
9345 <MODULE TTCN ModuleA ModuleA.ttcn>
9346 module ModuleA {
9347 type record MyRecord { integer field1 }
9348 type port MyPortType1 message { inout integer }
9349 type component MyComp {
9350 port MyPortType1 MyPort1;
9351 }
9352 altstep MyAltstep_receive() runs on MyComp {
9353 [] MyPort1.receive(MyRecord:{ field1 := 0 }) {}; // nested type
9354 [] MyPort1.receive(self) {}; // component ref
9355 }
9356 }
9357 <END_MODULE>
9358 <RESULT IF_PASS COUNT 2>
9359 (?im)integer.+?expected
9360 <END_RESULT>
9361 <RESULT COUNT 2>
9362 (?is)\berror:
9363 <END_RESULT>
9364 <RESULT IF_PASS POSITIVE>
9365 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
9366 <END_RESULT>
9367 <END_TC>
9368
9369 :exmp.
9370
9371 .*---------------------------------------------------------------------*
9372 :h3.Type list of a port - trigger basic types
9373 .*---------------------------------------------------------------------*
9374 :xmp tab=0.
9375
9376 <TC - Type list of a port - trigger basic types>
9377
9378 <COMPILE>
9379 <VERDICT_LEAF PASS>
9380 <MODULE TTCN ModuleA ModuleA.ttcn>
9381 module ModuleA {
9382 type enumerated MyEnum { halflife1(1), halflife2(2) }
9383 // allow integer only and try to pass everything else
9384 type port MyPortType1 message { inout integer }
9385 type component MyComp {
9386 port MyPortType1 MyPort1;
9387 }
9388 altstep MyAltstep_trigger() runs on MyComp {
9389 [] MyPort1.trigger(float:?) {};
9390 [] MyPort1.trigger(boolean:?) {};
9391 [] MyPort1.trigger(objid:?) {};
9392 [] MyPort1.trigger(verdicttype:?) {};
9393 [] MyPort1.trigger(MyEnum:?) {};
9394 }
9395 }
9396 <END_MODULE>
9397 <RESULT IF_PASS COUNT 5>
9398 (?im)integer.+?expected
9399 <END_RESULT>
9400 <RESULT COUNT 5>
9401 (?is)\berror:
9402 <END_RESULT>
9403 <RESULT IF_PASS POSITIVE>
9404 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
9405 <END_RESULT>
9406 <END_TC>
9407
9408 :exmp.
9409
9410 .*---------------------------------------------------------------------*
9411 :h3.Type list of a port - trigger string types
9412 .*---------------------------------------------------------------------*
9413 :xmp tab=0.
9414
9415 <TC - Type list of a port - trigger string types>
9416
9417 <COMPILE>
9418 <VERDICT_LEAF PASS>
9419 <MODULE TTCN ModuleA ModuleA.ttcn>
9420 module ModuleA {
9421 type port MyPortType1 message { inout integer }
9422 type component MyComp {
9423 port MyPortType1 MyPort1;
9424 }
9425 altstep MyAltstep_trigger() runs on MyComp {
9426 [] MyPort1.trigger(bitstring:?) {};
9427 [] MyPort1.trigger(hexstring:?) {};
9428 [] MyPort1.trigger(octetstring:?) {};
9429 [] MyPort1.trigger(charstring:?) {};
9430 [] MyPort1.trigger(universal charstring:?) {};
9431 }
9432 }
9433 <END_MODULE>
9434 <RESULT IF_PASS COUNT 5>
9435 (?im)integer.+?expected
9436 <END_RESULT>
9437 <RESULT COUNT 5>
9438 (?is)\berror:
9439 <END_RESULT>
9440 <RESULT IF_PASS POSITIVE>
9441 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
9442 <END_RESULT>
9443 <END_TC>
9444
9445 :exmp.
9446
9447 .*---------------------------------------------------------------------*
9448 :h3.Type list of a port - trigger other types
9449 .*---------------------------------------------------------------------*
9450 :xmp tab=0.
9451
9452 <TC - Type list of a port - trigger other types>
9453
9454 <COMPILE>
9455 <VERDICT_LEAF PASS>
9456 <MODULE TTCN ModuleA ModuleA.ttcn>
9457 module ModuleA {
9458 type record MyRecord { integer field1 }
9459 type port MyPortType1 message { inout integer }
9460 type component MyComp {
9461 port MyPortType1 MyPort1;
9462 }
9463 altstep MyAltstep_trigger() runs on MyComp {
9464 [] MyPort1.trigger(MyRecord:?) {};
9465 [] MyPort1.trigger(MyComp:?) {};
9466 }
9467 }
9468 <END_MODULE>
9469 <RESULT IF_PASS COUNT 2>
9470 (?im)integer.+?expected
9471 <END_RESULT>
9472 <RESULT COUNT 2>
9473 (?is)\berror:
9474 <END_RESULT>
9475 <RESULT IF_PASS POSITIVE>
9476 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
9477 <END_RESULT>
9478 <END_TC>
9479
9480 :exmp.
9481
9482 .*---------------------------------------------------------------------*
9483 :h3.Type list of a port - check-receive basic types
9484 .*---------------------------------------------------------------------*
9485 :xmp tab=0.
9486
9487 <TC - Type list of a port - check-receive basic types>
9488
9489 <COMPILE>
9490 <VERDICT_LEAF PASS>
9491 <MODULE TTCN ModuleA ModuleA.ttcn>
9492 module ModuleA {
9493 type enumerated MyEnum { halflife1(1), halflife2(2) }
9494 // allow integer only and try to pass everything else
9495 type port MyPortType1 message { inout integer }
9496 type port MyPortType2 message { in float; out integer }
9497 type component MyComp {
9498 port MyPortType1 MyPort1;
9499 port MyPortType2 MyPort2;
9500 }
9501 altstep MyAltstep_receive() runs on MyComp {
9502 [] MyPort1.check(receive(666.0 + 1.9)) {}; // float
9503 [] MyPort1.check(receive(true or false)) {}; // boolean
9504 [] MyPort1.check(receive(objid {0 4 0})) {}; // objid
9505 [] MyPort1.check(receive(pass)) {}; // verdicttype
9506 [] MyPort1.check(receive(halflife2)) {}; // enumerated
9507 [] MyPort2.check(receive(666)) {};
9508 }
9509 }
9510 <END_MODULE>
9511 <RESULT IF_PASS COUNT 4>
9512 (?im)integer.+?value.+?expected
9513 <END_RESULT>
9514 <RESULT IF_PASS COUNT 1>
9515 (?im)float.+?value.+?expected
9516 <END_RESULT>
9517 <RESULT IF_PASS COUNT 1>
9518 (?im)\bno\b.+?definition.+?halflife2
9519 <END_RESULT>
9520 <RESULT COUNT 6>
9521 (?is)\berror:
9522 <END_RESULT>
9523 <RESULT IF_PASS POSITIVE>
9524 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
9525 <END_RESULT>
9526 <END_TC>
9527
9528 :exmp.
9529
9530 .*---------------------------------------------------------------------*
9531 :h3.Type list of a port - check-receive string types
9532 .*---------------------------------------------------------------------*
9533 :xmp tab=0.
9534
9535 <TC - Type list of a port - check-receive string types>
9536
9537 <COMPILE>
9538 <VERDICT_LEAF PASS>
9539 <MODULE TTCN ModuleA ModuleA.ttcn>
9540 module ModuleA {
9541 type port MyPortType1 message { inout integer }
9542 type component MyComp {
9543 port MyPortType1 MyPort1;
9544 }
9545 altstep MyAltstep_receive() runs on MyComp {
9546 [] MyPort1.check(receive('0011'B & '1100'B & '1'B)) {}; // bitstring
9547 [] MyPort1.check(receive('AF07'H & 'FF'H)) {}; // hexstring
9548 [] MyPort1.check(receive('0123'O & 'FFE7'O)) {}; // octetstring
9549 [] MyPort1.check(receive("McHalls " & "was " & "here")) {}; // charstring
9550 [] MyPort1.check(receive("Damn!" & char(0,0,1,113))) {}; // unicharstring
9551 }
9552 }
9553 <END_MODULE>
9554 <RESULT IF_PASS COUNT 5>
9555 (?im)integer.+?value.+?expected
9556 <END_RESULT>
9557 <RESULT COUNT 5>
9558 (?is)\berror:
9559 <END_RESULT>
9560 <RESULT IF_PASS POSITIVE>
9561 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
9562 <END_RESULT>
9563 <END_TC>
9564
9565 :exmp.
9566
9567 .*---------------------------------------------------------------------*
9568 :h3.Type list of a port - check-receive other types
9569 .*---------------------------------------------------------------------*
9570 :xmp tab=0.
9571
9572 <TC - Type list of a port - check-receive other types>
9573
9574 <COMPILE>
9575 <VERDICT_LEAF PASS>
9576 <MODULE TTCN ModuleA ModuleA.ttcn>
9577 module ModuleA {
9578 type record MyRecord { integer field1 }
9579 type port MyPortType1 message { inout integer }
9580 type component MyComp {
9581 port MyPortType1 MyPort1;
9582 }
9583 altstep MyAltstep_receive() runs on MyComp {
9584 [] MyPort1.check(receive(MyRecord:{ field1 := 0 })) {}; // nested type
9585 [] MyPort1.check(receive(self)) {}; // component ref
9586 }
9587 }
9588 <END_MODULE>
9589 <RESULT IF_PASS COUNT 2>
9590 (?im)integer.+?expected
9591 <END_RESULT>
9592 <RESULT COUNT 2>
9593 (?is)\berror:
9594 <END_RESULT>
9595 <RESULT IF_PASS POSITIVE>
9596 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
9597 <END_RESULT>
9598 <END_TC>
9599
9600 :exmp.
9601
9602 .*---------------------------------------------------------------------*
9603 :h2.Signature list of a port
9604 .*---------------------------------------------------------------------*
9605 This test case group covers the requirement SA-5/7.
9606 Signatures used in port operations shall be listed in the signature list
9607 of the port definition.
9608
9609 .*---------------------------------------------------------------------*
9610 :h3.Signature list of a port - call operation
9611 .*---------------------------------------------------------------------*
9612 :xmp tab=0.
9613
9614 <TC - Signature list of a port - call operation>
9615
9616 <COMPILE>
9617 <VERDICT_LEAF PASS>
9618 <MODULE TTCN ModuleA ModuleA.ttcn>
9619 module ModuleA {
9620 signature Sig1() exception(integer);
9621 signature Sig2() noblock exception(integer);
9622 type port MyPortType1 procedure { inout Sig2 }
9623 type port MyPortType2 procedure { in Sig2; out Sig1 }
9624 type component MyComp {
9625 port MyPortType1 MyPort1;
9626 port MyPortType2 MyPort2;
9627 }
9628 // not listed signature for procedure based ops
9629 function MyFunc_ProcedureBased() runs on MyComp {
9630 MyPort1.call(Sig1:{});
9631 // not on the 'out' list
9632 MyPort2.call(Sig2:{},1.0) {
9633 []MyPort2.catch(timeout) { }
9634 }
9635 }
9636 }
9637 <END_MODULE>
9638 <RESULT IF_PASS COUNT 2>
9639 (?im)incompatible.+?explicit.+?type.+?specification
9640 <END_RESULT>
9641 <RESULT COUNT 2>
9642 (?is)\berror:
9643 <END_RESULT>
9644 <RESULT IF_PASS POSITIVE>
9645 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
9646 <END_RESULT>
9647 <END_TC>
9648
9649 :exmp.
9650
9651 .*---------------------------------------------------------------------*
9652 :h3.Signature list of a port - getcall operation
9653 .*---------------------------------------------------------------------*
9654 :xmp tab=0.
9655
9656 <TC - Signature list of a port - getcall operation>
9657
9658 <COMPILE>
9659 <VERDICT_LEAF PASS>
9660 <MODULE TTCN ModuleA ModuleA.ttcn>
9661 module ModuleA {
9662 signature Sig1() exception(integer);
9663 signature Sig2() noblock exception(integer);
9664 type port MyPortType1 procedure { inout Sig2 }
9665 type port MyPortType2 procedure { in Sig2; out Sig1 }
9666 type component MyComp {
9667 port MyPortType1 MyPort1;
9668 port MyPortType2 MyPort2;
9669 }
9670 // not listed signature for procedure based ops
9671 function MyFunc_ProcedureBased() runs on MyComp {
9672 alt {
9673 [] MyPort1.getcall(Sig1:{}) { }
9674 [] MyPort2.getcall(Sig1:{}) { }
9675 }
9676 }
9677 }
9678 <END_MODULE>
9679 <RESULT IF_PASS COUNT 2>
9680 (?im)incompatible.+?explicit.+?type.+?specification
9681 <END_RESULT>
9682 <RESULT IF_PASS COUNT 2>
9683 (?is)\berror:
9684 <END_RESULT>
9685 <RESULT IF_PASS POSITIVE>
9686 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
9687 <END_RESULT>
9688 <END_TC>
9689
9690 :exmp.
9691
9692 .*---------------------------------------------------------------------*
9693 :h3.Signature list of a port - reply operation
9694 .*---------------------------------------------------------------------*
9695 :xmp tab=0.
9696
9697 <TC - Signature list of a port - reply operation>
9698
9699 <COMPILE>
9700 <VERDICT_LEAF PASS>
9701 <MODULE TTCN ModuleA ModuleA.ttcn>
9702 module ModuleA {
9703 signature Sig1() exception(integer);
9704 signature Sig2() exception(integer);
9705 type port MyPortType1 procedure { inout Sig2 }
9706 type port MyPortType2 procedure { in Sig2; out Sig1 }
9707 type component MyComp {
9708 port MyPortType1 MyPort1;
9709 port MyPortType2 MyPort2;
9710 }
9711 // not listed signature for procedure based ops
9712 function MyFunc_ProcedureBased() runs on MyComp {
9713 MyPort1.reply(Sig1:{});
9714 MyPort2.reply(Sig1:{});
9715 }
9716 }
9717 <END_MODULE>
9718 <RESULT IF_PASS COUNT 2>
9719 (?im)incompatible.+?explicit.+?type.+?specification
9720 <END_RESULT>
9721 <RESULT IF_PASS COUNT 2>
9722 (?is)\berror:
9723 <END_RESULT>
9724 <RESULT IF_PASS POSITIVE>
9725 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
9726 <END_RESULT>
9727 <END_TC>
9728
9729 :exmp.
9730
9731 .*---------------------------------------------------------------------*
9732 :h3.Signature list of a port - getreply operation
9733 .*---------------------------------------------------------------------*
9734 :xmp tab=0.
9735
9736 <TC - Signature list of a port - getreply operation>
9737
9738 <COMPILE>
9739 <VERDICT_LEAF PASS>
9740 <MODULE TTCN ModuleA ModuleA.ttcn>
9741 module ModuleA {
9742 signature Sig1() exception(integer);
9743 signature Sig2() exception(integer);
9744 type port MyPortType1 procedure { inout Sig2 }
9745 type port MyPortType2 procedure { in Sig2; out Sig1 }
9746 type component MyComp {
9747 port MyPortType1 MyPort1;
9748 port MyPortType2 MyPort2;
9749 }
9750 // not listed signature for procedure based ops
9751 function MyFunc_ProcedureBased() runs on MyComp {
9752 alt {
9753 [] MyPort1.getreply(Sig1:{}) {}
9754 [] MyPort2.getreply(Sig2:{}) {}
9755 }
9756 }
9757 }
9758 <END_MODULE>
9759 <RESULT IF_PASS COUNT 2>
9760 (?im)incompatible.+?explicit.+?type.+?specification
9761 <END_RESULT>
9762 <RESULT IF_PASS COUNT 2>
9763 (?is)\berror:
9764 <END_RESULT>
9765 <RESULT IF_PASS POSITIVE>
9766 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
9767 <END_RESULT>
9768 <END_TC>
9769
9770 :exmp.
9771
9772 .*---------------------------------------------------------------------*
9773 :h3.Signature list of a port - raise operation
9774 .*---------------------------------------------------------------------*
9775 :xmp tab=0.
9776
9777 <TC - Signature list of a port - raise operation>
9778
9779 <COMPILE>
9780 <VERDICT_LEAF PASS>
9781 <MODULE TTCN ModuleA ModuleA.ttcn>
9782 module ModuleA {
9783 signature Sig1() exception(integer);
9784 signature Sig2() noblock exception(integer);
9785 type port MyPortType1 procedure { inout Sig2 }
9786 type port MyPortType2 procedure { in Sig2; out Sig1 }
9787 type component MyComp {
9788 port MyPortType1 MyPort1;
9789 port MyPortType2 MyPort2;
9790 }
9791 // not listed signature for procedure based ops
9792 function MyFunc_ProcedureBased() runs on MyComp {
9793 MyPort1.raise(Sig1, 3);
9794 MyPort2.raise(Sig1, 4);
9795 // not listed exception:
9796 MyPort1.raise(Sig2, 3.14);
9797 }
9798 }
9799 <END_MODULE>
9800 <RESULT IF_PASS COUNT 2>
9801 (?im)signature.+?not.+?\bon\b.+?incoming.+?list
9802 <END_RESULT>
9803 <RESULT COUNT 1>
9804 (?im)integer.+?value.+?expected
9805 <END_RESULT>
9806 <RESULT IF_PASS COUNT 3>
9807 (?is)\berror:
9808 <END_RESULT>
9809 <RESULT IF_PASS POSITIVE>
9810 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
9811 <END_RESULT>
9812 <END_TC>
9813
9814 :exmp.
9815
9816 .*---------------------------------------------------------------------*
9817 :h3.Signature list of a port - catch operation
9818 .*---------------------------------------------------------------------*
9819 :xmp tab=0.
9820
9821 <TC - Signature list of a port - catch operation>
9822
9823 <COMPILE>
9824 <VERDICT_LEAF PASS>
9825 <MODULE TTCN ModuleA ModuleA.ttcn>
9826 module ModuleA {
9827 signature Sig1() exception(integer);
9828 signature Sig2() noblock exception(integer);
9829 type port MyPortType1 procedure { inout Sig2 }
9830 type port MyPortType2 procedure { in Sig2; out Sig1 }
9831 type component MyComp {
9832 port MyPortType1 MyPort1;
9833 port MyPortType2 MyPort2;
9834 }
9835 // not listed signature for procedure based ops
9836 function MyFunc_ProcedureBased() runs on MyComp {
9837 alt {
9838 []MyPort1.catch(Sig1, 9) { }
9839 []MyPort2.catch(Sig2, 10) { }
9840 // not listed exception:
9841 []MyPort1.catch(Sig2, 9.99) { }
9842 }
9843 }
9844 }
9845 <END_MODULE>
9846 <RESULT IF_PASS COUNT 2>
9847 (?im)signature.+?not.+?\bon\b.+?outgoing.+?list
9848 <END_RESULT>
9849 <RESULT COUNT 1>
9850 (?im)integer.+?value.+?expected
9851 <END_RESULT>
9852 <RESULT IF_PASS COUNT 3>
9853 (?is)\berror:
9854 <END_RESULT>
9855 <RESULT IF_PASS POSITIVE>
9856 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
9857 <END_RESULT>
9858 <END_TC>
9859
9860 :exmp.
9861
9862 .*---------------------------------------------------------------------*
9863 :h3.Signature list of a port - check-getcall operation
9864 .*---------------------------------------------------------------------*
9865 :xmp tab=0.
9866
9867 <TC - Signature list of a port - check-getcall operation>
9868
9869 <COMPILE>
9870 <VERDICT_LEAF PASS>
9871 <MODULE TTCN ModuleA ModuleA.ttcn>
9872 module ModuleA {
9873 signature Sig1() exception(integer);
9874 signature Sig2() noblock exception(integer);
9875 type port MyPortType1 procedure { inout Sig2 }
9876 type port MyPortType2 procedure { in Sig2; out Sig1 }
9877 type component MyComp {
9878 port MyPortType1 MyPort1;
9879 port MyPortType2 MyPort2;
9880 }
9881 // not listed signature for procedure based ops
9882 function MyFunc_ProcedureBased() runs on MyComp {
9883 alt {
9884 [] MyPort1.check(getcall(Sig1:{})) { }
9885 [] MyPort2.check(getcall(Sig1:{})) { }
9886 }
9887 }
9888 }
9889 <END_MODULE>
9890 <RESULT IF_PASS COUNT 2>
9891 (?im)incompatible.+?explicit.+?type.+?specification
9892 <END_RESULT>
9893 <RESULT IF_PASS COUNT 2>
9894 (?is)\berror:
9895 <END_RESULT>
9896 <RESULT IF_PASS POSITIVE>
9897 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
9898 <END_RESULT>
9899 <END_TC>
9900
9901 :exmp.
9902
9903 .*---------------------------------------------------------------------*
9904 :h3.Signature list of a port - check-getreply operation
9905 .*---------------------------------------------------------------------*
9906 :xmp tab=0.
9907
9908 <TC - Signature list of a port - check-getreply operation>
9909
9910 <COMPILE>
9911 <VERDICT_LEAF PASS>
9912 <MODULE TTCN ModuleA ModuleA.ttcn>
9913 module ModuleA {
9914 signature Sig1() exception(integer);
9915 signature Sig2() exception(integer);
9916 type port MyPortType1 procedure { inout Sig2 }
9917 type port MyPortType2 procedure { in Sig2; out Sig1 }
9918 type component MyComp {
9919 port MyPortType1 MyPort1;
9920 port MyPortType2 MyPort2;
9921 }
9922 // not listed signature for procedure based ops
9923 function MyFunc_ProcedureBased() runs on MyComp {
9924 alt {
9925 [] MyPort1.check(getreply(Sig1:{})) {}
9926 [] MyPort2.check(getreply(Sig2:{})) {}
9927 }
9928 }
9929 }
9930 <END_MODULE>
9931 <RESULT IF_PASS COUNT 2>
9932 (?im)incompatible.+?explicit.+?type.+?specification
9933 <END_RESULT>
9934 <RESULT IF_PASS COUNT 2>
9935 (?is)\berror:
9936 <END_RESULT>
9937 <RESULT IF_PASS POSITIVE>
9938 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
9939 <END_RESULT>
9940 <END_TC>
9941
9942 :exmp.
9943
9944 .*---------------------------------------------------------------------*
9945 :h3.Signature list of a port - check-catch operation
9946 .*---------------------------------------------------------------------*
9947 :xmp tab=0.
9948
9949 <TC - Signature list of a port - check-catch operation>
9950
9951 <COMPILE>
9952 <VERDICT_LEAF PASS>
9953 <MODULE TTCN ModuleA ModuleA.ttcn>
9954 module ModuleA {
9955 signature Sig1() exception(integer);
9956 signature Sig2() noblock exception(integer);
9957 type port MyPortType1 procedure { inout Sig2 }
9958 type port MyPortType2 procedure { in Sig2; out Sig1 }
9959 type component MyComp {
9960 port MyPortType1 MyPort1;
9961 port MyPortType2 MyPort2;
9962 }
9963 // not listed signature for procedure based ops
9964 function MyFunc_ProcedureBased() runs on MyComp {
9965 alt {
9966 []MyPort1.check(catch(Sig1, 9)) { }
9967 []MyPort2.check(catch(Sig2, 10)) { }
9968 // not listed exception:
9969 []MyPort1.check(catch(Sig2, 9.99)) { }
9970 }
9971 }
9972 }
9973 <END_MODULE>
9974 <RESULT IF_PASS COUNT 2>
9975 (?im)signature.+?not.+?\bon\b.+?outgoing.+?list
9976 <END_RESULT>
9977 <RESULT COUNT 1>
9978 (?im)integer.+?value.+?expected
9979 <END_RESULT>
9980 <RESULT IF_PASS COUNT 3>
9981 (?is)\berror:
9982 <END_RESULT>
9983 <RESULT IF_PASS POSITIVE>
9984 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
9985 <END_RESULT>
9986 <END_TC>
9987
9988 :exmp.
9989
9990 .*---------------------------------------------------------------------*
9991 :h3.Bitstring concatenation - type restriction on result but not on parameters
9992 .*---------------------------------------------------------------------*
9993 Note: this is a positive test.
9994
9995 :xmp tab=0.
9996
9997 <TC - Bitstring concatenation - type restriction on result but not on parameters>
9998
9999 <COMPILE>
10000 <VERDICT_LEAF PASS>
10001 <MODULE TTCN Temp Temp.ttcn>
10002 module Temp {
10003
10004 type bitstring B32_Type length(32);
10005 type bitstring B128_Type length(128);
10006 type bitstring B256_Type length(256);
10007
10008 const B32_Type tsc_UndefinedB32 := oct2bit ('FFFFFFFF'O);
10009 const B128_Type tsc_UndefinedB128 := tsc_UndefinedB32 & tsc_UndefinedB32 & tsc_UndefinedB32 & tsc_UndefinedB32;
10010 const B256_Type tsc_UndefinedB256 := tsc_UndefinedB128 & tsc_UndefinedB128;
10011
10012 }
10013 <END_MODULE>
10014 <RESULT>
10015 (?im)\bnotify\b.+?\bfiles\b.+?\bupdated\b
10016 <END_RESULT>
10017 <END_TC>
10018
10019 :exmp.
10020
10021 .*---------------------------------------------------------------------*
10022 :h1.Abbreviations
10023 .*---------------------------------------------------------------------*
10024 :list.
10025 :li D='ASN.1'.Abstract Syntax Notation 1
10026 :li D='EDML'.Ericsson Document Markup Language
10027 :li D='SA'.Semantic Analyser
10028 :li D='TTCN-3'.Test and Test Control Notation version 3
10029 :elist.
10030
10031 .*---------------------------------------------------------------------*
10032 :h1.References
10033 .*---------------------------------------------------------------------*
10034 :list.
10035 :li D='[1]'.3/ETH/RUS-2003:0087 Uen
10036 :nl.Requirement Specification for TITAN's TTCN-3 Semantic Analyser
10037 :li D='[2]'.1/174 02-FCPCA 101 22 Uen
10038 :nl.Statement of Compliance for TITAN project
10039 :li D='[3]'.ETSI ES 201 873-1, v3.0.0 Mockup v1 (2004-03):
10040 :nl.Testing and Test Control Notation version 3.,
10041 :nl.Part 1: TTCN-3 Core Language
10042 :elist.
10043
10044 .*---------------------------------------------------------------------*
10045 :h1.Terminology
10046 .*---------------------------------------------------------------------*
10047 :list.
10048 :li D='TITAN'.Ericsson's TTCN-3 Test Environment
10049 :elist.
10050
10051 :etext.
10052
This page took 0.431543 seconds and 6 git commands to generate.