1 .******************************************************************************
2 .* Copyright (c) 2000-2014 Ericsson Telecom AB
3 .* All rights reserved. This program and the accompanying materials
4 .* are made available under the terms of the Eclipse Public License v1.0
5 .* which accompanies this distribution, and is available at
6 .* http://www.eclipse.org/legal/epl-v10.html
7 .******************************************************************************/
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
15 .* Document header information
16 :docname.Test Description
17 :docno.18/152 91-CRL 113 200/3 Uen
21 :prep.ETH/XZR Krisztian Pandi
22 :appr.ETH/XZ (Gyula Koos)
25 :title.Test description of the TTCN-3 Semantic Analyzer: Location of Language Elements
27 .*---------------------------------------------------------------------*
29 .*---------------------------------------------------------------------*
30 .*---------------------------------------------------------------------*
32 .*---------------------------------------------------------------------*
34 REV DATE PREPARED CHANGE
35 __________________________________________________
36 PA1 2005-02-17 ESNDPAL New document for TITAN R6
37 A 2005-03-18 ESNDPAL Approved after review
38 B 2006-07-31 EKRISZA Updates for TITAN R6E
39 C 2007-03-06 EJNOSZA Updates for TITAN R7A (expected error messages)
40 D 2009-06-11 EKRISZA Name correction
41 A 2011-12-12 EKRISZA Updated for release
42 A 2012-06-27 EFERKOV Updated for release
43 A 2013-01-17 EKRIPND Updated for release
45 .*---------------------------------------------------------------------*
47 .*---------------------------------------------------------------------*
48 The purpose of this Test Description is to define and describe the function
49 test activity for the Semantic Analyser functionality of the TTCN-3 compiler:
50 :nl.SA-7/x: Location of Language Elements
51 :p.The specification of the test cases can be found in this document.
52 .*---------------------------------------------------------------------*
54 .*---------------------------------------------------------------------*
55 .*---------------------------------------------------------------------*
57 .*---------------------------------------------------------------------*
58 No specific hardware requirement.
59 .*---------------------------------------------------------------------*
61 .*---------------------------------------------------------------------*
62 Tests shall be carried out on the following platforms:
64 :li D='1.'.Solaris 8 (Sun OS 5.8) (gcc 3.0.4)
65 :li D='2.'.SUSE Linux Enterprise server 8 (2.4.19-4GB) (gcc 3.2)
66 :li D='3.'.CYGWIN_NT-5.0 (Cygwin DLL: 1.5.12) on Windows 2000 (gcc 3.3.3)
68 .*---------------------------------------------------------------------*
70 .*---------------------------------------------------------------------*
71 The test environment had been setup in CVS. The tester program is stored in:
72 :nl.TTCNv3/function_test/Tools/SAtester.pl
73 :nl.Test cases are stored with extension .script in the directory:
74 :nl.TTCNv3/function_test/Semantic_Analyser/
75 .*---------------------------------------------------------------------*
77 .*---------------------------------------------------------------------*
78 Install proper TITAN binaries on the used platforms and make sure that
79 your environment settings are correct:
81 :li D='1.'.TTCN3_DIR is set
82 :li D='2.'.$TTCN3_DIR/bin is added to the PATH variable
83 :li D='3.'.$TTCN3_DIR/lib is added to the LD_LIBRARY_PATH variable
84 :li D='4.'.Perl 5.6.0 or higher is available on the platform
85 :li D='5.'.Create a symlink to your Perl binary into the directory where the
86 test cases are stored:
87 :nl.ln -s <your Perl> perl
89 .*---------------------------------------------------------------------*
91 .*---------------------------------------------------------------------*
92 A tester program had been written in Perl especially for the Semantic Analyser
93 tests. For the list of command line parameters, type 'SAtester.pl -help', for the
94 complete documentation, type 'SAtester.pl -doc'.
95 :p.Test cases are specified in the Test Description documents in EDML format.
96 The tester program parses these files and generates the TTCN-3/ASN.1 modules, then
97 calls the compiler to compile them. The result printout is then matched against
98 different patterns to be able to set the verdict. Test cases contain not only
99 the source modules, but the patterns as well.
100 :p.The tester program allows one-by-one execution of test cases and batched
102 :p.NOTE: the tester program requires Perl 5.6.0 or higher.
103 .*---------------------------------------------------------------------*
105 .*---------------------------------------------------------------------*
106 Ref [1]: SA-7/x: Values, Location of Language Elements
107 .*---------------------------------------------------------------------*
108 :h2.Location of language elements
109 .*---------------------------------------------------------------------*
110 .*---------------------------------------------------------------------*
111 :h3.A declaration/statement/operation is used where it is not supposed to be used
112 .*---------------------------------------------------------------------*
114 This test case group covers the requirement SA-7/1.
116 Strategy: See table 'Overview of TTCN-3 statements and operations' (table 11 on page 84).
117 We also test the "port" and "component" keywords.
118 Return can be used only in functions.
122 :li D='-'.the "repeat" cannot be tested, because other errors hide its error
123 :li D='-'.the "interleave" structure is not supported in the TITAN
124 :li D='-'."deactivate" cannot be tested, because the error of the "activate" covers its error
125 :li D='-'."mtc" and "system" are integers in TITAN, so we won't negative test it
128 .*---------------------------------------------------------------------*
129 :h4.A declaration/statement/operation is used where it is not supposed to be used - alt (receive)
130 .*---------------------------------------------------------------------*
133 <TC - A declaration/statement/operation is used where it is not supposed to be used - alt (receive)>
137 <MODULE TTCN x x.ttcn>
140 type port portT message {
142 } with {extension "internal"}
144 type component comp {
157 [] myPort.receive(?){
165 <RESULT IF_PASS COUNT 1>
166 (?im)error.+?Port.+?operation.+?not.+?allowed.+?in.+?control.+?part
168 <RESULT IF_PASS COUNT 1>
169 (?im)error.+?no.+?imported.+?definition
171 <RESULT IF_PASS COUNT 2>
178 .*---------------------------------------------------------------------*
179 :h4.A declaration/statement/operation is used where it is not supposed to be used - return (in control part)
180 .*---------------------------------------------------------------------*
183 <TC - A declaration/statement/operation is used where it is not supposed to be used - return (in control part) >
187 <MODULE TTCN x x.ttcn>
200 <RESULT IF_PASS COUNT 1>
201 (?im)error.+?Return.+?statement.+?not.+?used.+?in.+?control.+?part
203 <RESULT IF_PASS COUNT 1>
210 .*---------------------------------------------------------------------*
211 :h4.A declaration/statement/operation is used where it is not supposed to be used - return (in altstep)
212 .*---------------------------------------------------------------------*
215 <TC - A declaration/statement/operation is used where it is not supposed to be used - return (in altstep) >
219 <MODULE TTCN x x.ttcn>
222 type port portT message {
224 } with {extension "internal"}
226 type component myComp {
230 altstep myAltStep ( timer T1) runs on myComp{
233 // TR 643: return statement in altsteps
239 <RESULT IF_PASS COUNT 0>
240 (?im)error.+?Return.+?statement.+?not.+?used.+?in.+?altstep
242 <RESULT IF_PASS COUNT 0>
249 .*---------------------------------------------------------------------*
250 :h4.A declaration/statement/operation is used where it is not supposed to be used - return (in testcase)
251 .*---------------------------------------------------------------------*
254 <TC - A declaration/statement/operation is used where it is not supposed to be used - return (in testcase) >
258 <MODULE TTCN x x.ttcn>
261 type port portT message {
263 } with {extension "internal"}
265 type component myComp {
269 testcase myTestCase() runs on myComp{
279 <RESULT IF_PASS COUNT 1>
280 (?im)error.+?Return.+?statement.+?not.+?used.+?in.+?testcase
282 <RESULT IF_PASS COUNT 1>
289 .*---------------------------------------------------------------------*
290 :h4.A declaration/statement/operation is used where it is not supposed to be used - activate
291 .*---------------------------------------------------------------------*
294 <TC - A declaration/statement/operation is used where it is not supposed to be used - activate >
298 <MODULE TTCN x x.ttcn>
301 type port portT message {
303 } with {extension "internal"}
305 type component myComp {
310 altstep myAltStep ( ) runs on myComp{
311 [] myPort.receive(?){
325 var default myDefVar := activate(myAltStep( ));
336 <RESULT IF_PASS COUNT 1>
337 (?im)error.+?definition.+?without.+?runs.+?on.+?clause.+?cannot.+?activate.+?altstep
339 <RESULT IF_PASS COUNT 1>
346 .*---------------------------------------------------------------------*
347 :h4.A declaration/statement/operation is used where it is not supposed to be used - create
348 .*---------------------------------------------------------------------*
351 <TC - A declaration/statement/operation is used where it is not supposed to be used - create >
355 <MODULE TTCN x x.ttcn>
358 type port portT message {
360 } with {extension "internal"}
362 type component myComp {
369 myPTC := myComp.create;
375 <RESULT IF_PASS COUNT 1>
376 (?im)error.+?Operation.+?create.+?not.+?allowed.+?in.+?control.+?part
378 <RESULT IF_PASS COUNT 1>
385 .*---------------------------------------------------------------------*
386 :h4.A declaration/statement/operation is used where it is not supposed to be used - connect
387 .*---------------------------------------------------------------------*
390 <TC - A declaration/statement/operation is used where it is not supposed to be used - connect >
394 <MODULE TTCN x x.ttcn>
397 type port portT message {
399 } with {extension "internal"}
401 type component myComp {
409 connect( myPTC:Port1, mtc:Port2);
415 <RESULT IF_FAIL COUNT 1>
416 (?im)\berror\b.+?syntax.+?error.+?unexpected.+?connect
418 <RESULT IF_FAIL COUNT 1>
425 .*---------------------------------------------------------------------*
426 :h4.A declaration/statement/operation is used where it is not supposed to be used - disconnect
427 .*---------------------------------------------------------------------*
430 <TC - A declaration/statement/operation is used where it is not supposed to be used - disconnect >
434 <MODULE TTCN x x.ttcn>
437 type port portT message {
439 } with {extension "internal"}
441 type component myComp {
449 disconnect( myPTC:Port1, mtc:Port2);
455 <RESULT IF_FAIL COUNT 1>
456 (?im)\berror\b.+?syntax.+?error.+?unexpected.+?disconnect
458 <RESULT IF_FAIL COUNT 1>
465 .*---------------------------------------------------------------------*
466 :h4.A declaration/statement/operation is used where it is not supposed to be used - map
467 .*---------------------------------------------------------------------*
470 <TC - A declaration/statement/operation is used where it is not supposed to be used - map >
474 <MODULE TTCN x x.ttcn>
477 type port portT message {
479 } with {extension "internal"}
481 type component myComp {
489 map( myPTC:Port1, system:Port2);
495 <RESULT IF_FAIL COUNT 1>
496 (?im)\berror\b.+?syntax.+?error.+?unexpected.+?map
498 <RESULT IF_FAIL COUNT 1>
505 .*---------------------------------------------------------------------*
506 :h4.A declaration/statement/operation is used where it is not supposed to be used - unmap
507 .*---------------------------------------------------------------------*
510 <TC - A declaration/statement/operation is used where it is not supposed to be used - unmap >
514 <MODULE TTCN x x.ttcn>
517 type port portT message {
519 } with {extension "internal"}
521 type component myComp {
529 unmap( myPTC:Port1, system:Port2);
535 <RESULT IF_FAIL COUNT 1>
536 (?im)\berror\b.+?syntax.+?error.+?unexpected.+?unmap
538 <RESULT IF_FAIL COUNT 1>
545 .*---------------------------------------------------------------------*
546 :h4.A declaration/statement/operation is used where it is not supposed to be used - self
547 .*---------------------------------------------------------------------*
550 <TC - A declaration/statement/operation is used where it is not supposed to be used - self >
554 <MODULE TTCN x x.ttcn>
557 type port portT message {
559 } with {extension "internal"}
561 type component myComp {
573 <RESULT IF_PASS COUNT 1>
574 (?im)error.+?Operation.+?self.+?not.+?allowed.+?in.+?control.+?part
576 <RESULT IF_PASS COUNT 1>
583 .*---------------------------------------------------------------------*
584 :h4.A declaration/statement/operation is used where it is not supposed to be used - component start
585 .*---------------------------------------------------------------------*
588 <TC - A declaration/statement/operation is used where it is not supposed to be used - component start >
592 <MODULE TTCN x x.ttcn>
595 function myFunct() runs on myComp{
600 type port portT message {
602 } with {extension "internal"}
604 type component myComp {
612 myPTC.start( myFunct());
618 <RESULT IF_PASS COUNT 1>
619 (?im)\berror\b.+?component.+?operation.+?not.+?allowed.+?control.+?part
621 <RESULT IF_PASS COUNT 1>
628 .*---------------------------------------------------------------------*
629 :h4.A declaration/statement/operation is used where it is not supposed to be used - component stop
630 .*---------------------------------------------------------------------*
633 <TC - A declaration/statement/operation is used where it is not supposed to be used - component stop >
637 <MODULE TTCN x x.ttcn>
640 type port portT message {
642 } with {extension "internal"}
644 type component myComp {
657 <RESULT IF_PASS COUNT 1>
658 (?im)error.+?Component.+?operation.+?not.+?allowed.+?in.+?control.+?part
660 <RESULT IF_PASS COUNT 1>
667 .*---------------------------------------------------------------------*
668 :h4.A declaration/statement/operation is used where it is not supposed to be used - running
669 .*---------------------------------------------------------------------*
672 <TC - A declaration/statement/operation is used where it is not supposed to be used - running >
676 <MODULE TTCN x x.ttcn>
679 type port portT message {
681 } with {extension "internal"}
683 type component myComp {
698 <RESULT IF_PASS COUNT 1>
699 (?im)error.+?Operation.+?component.+?running.+?not.+?allowed.+?in.+?control.+?part
701 <RESULT IF_PASS COUNT 1>
708 .*---------------------------------------------------------------------*
709 :h4.A declaration/statement/operation is used where it is not supposed to be used - done
710 .*---------------------------------------------------------------------*
713 <TC - A declaration/statement/operation is used where it is not supposed to be used - done >
717 <MODULE TTCN x x.ttcn>
720 type port portT message {
722 } with {extension "internal"}
724 type component myComp {
737 <RESULT IF_FAIL COUNT 1>
738 (?im)\berror\b.+?syntax.+?error.+?unexpected.+?done
740 <RESULT IF_FAIL COUNT 1>
747 .*---------------------------------------------------------------------*
748 :h4.A declaration/statement/operation is used where it is not supposed to be used - send
749 .*---------------------------------------------------------------------*
752 <TC - A declaration/statement/operation is used where it is not supposed to be used - send >
756 <MODULE TTCN x x.ttcn>
759 type port portT message {
761 } with {extension "internal"}
763 type component myComp {
774 <RESULT IF_FAIL COUNT 1>
775 (?im)\berror\b.+?syntax.+?error.+?unexpected.+?send
777 <RESULT IF_FAIL COUNT 1>
784 .*---------------------------------------------------------------------*
785 :h4.A declaration/statement/operation is used where it is not supposed to be used - receive
786 .*---------------------------------------------------------------------*
789 <TC - A declaration/statement/operation is used where it is not supposed to be used - receive >
793 <MODULE TTCN x x.ttcn>
796 type port portT message {
798 } with {extension "internal"}
800 type component myComp {
811 <RESULT IF_FAIL COUNT 1>
812 (?im)\berror\b.+?syntax.+?error.+?unexpected.+?receive
814 <RESULT IF_FAIL COUNT 1>
821 .*---------------------------------------------------------------------*
822 :h4.A declaration/statement/operation is used where it is not supposed to be used - trigger
823 .*---------------------------------------------------------------------*
826 <TC - A declaration/statement/operation is used where it is not supposed to be used - trigger >
830 <MODULE TTCN x x.ttcn>
833 type port portT message {
835 } with {extension "internal"}
837 type component myComp {
848 <RESULT IF_FAIL COUNT 1>
849 (?im)\berror\b.+?syntax.+?error.+?unexpected.+?trigger
851 <RESULT IF_FAIL COUNT 1>
858 .*---------------------------------------------------------------------*
859 :h4.A declaration/statement/operation is used where it is not supposed to be used - call
860 .*---------------------------------------------------------------------*
863 <TC - A declaration/statement/operation is used where it is not supposed to be used - call >
867 <MODULE TTCN x x.ttcn>
870 signature myP1( inout integer my1);
872 type port portT procedure {
874 } with {extension "internal"}
876 type component myComp {
882 myPort.call( myP1: 12);
887 <RESULT IF_FAIL COUNT 1>
888 (?im)\berror\b.+?syntax.+?error.+?unexpected.+?call
890 <RESULT IF_FAIL COUNT 1>
897 .*---------------------------------------------------------------------*
898 :h4.A declaration/statement/operation is used where it is not supposed to be used - getcall
899 .*---------------------------------------------------------------------*
902 <TC - A declaration/statement/operation is used where it is not supposed to be used - getcall >
906 <MODULE TTCN x x.ttcn>
909 signature myP1( inout integer my1);
911 type port portT procedure {
913 } with {extension "internal"}
915 type component myComp {
921 myPort.getcall( myP1: ?);
926 <RESULT IF_FAIL COUNT 1>
927 (?im)\berror\b.+?syntax.+?error.+?unexpected.+?getcall
929 <RESULT IF_FAIL COUNT 1>
936 .*---------------------------------------------------------------------*
937 :h4.A declaration/statement/operation is used where it is not supposed to be used - reply
938 .*---------------------------------------------------------------------*
941 <TC - A declaration/statement/operation is used where it is not supposed to be used - reply >
945 <MODULE TTCN x x.ttcn>
948 signature myP1( inout integer my1);
950 type port portT procedure {
952 } with {extension "internal"}
954 type component myComp {
960 myPort.reply( myP1: 5);
965 <RESULT IF_FAIL COUNT 1>
966 (?im)\berror\b.+?syntax.+?error.+?unexpected.+?reply
968 <RESULT IF_FAIL COUNT 1>
975 .*---------------------------------------------------------------------*
976 :h4.A declaration/statement/operation is used where it is not supposed to be used - getreply
977 .*---------------------------------------------------------------------*
980 <TC - A declaration/statement/operation is used where it is not supposed to be used - getreply >
984 <MODULE TTCN x x.ttcn>
987 signature myP1( inout integer my1);
989 type port portT procedure {
991 } with {extension "internal"}
993 type component myComp {
999 myPort.getreply( myP1: 5);
1004 <RESULT IF_FAIL COUNT 1>
1005 (?im)\berror\b.+?syntax.+?error.+?unexpected.+?getreply
1007 <RESULT IF_FAIL COUNT 1>
1014 .*---------------------------------------------------------------------*
1015 :h4.A declaration/statement/operation is used where it is not supposed to be used - raise
1016 .*---------------------------------------------------------------------*
1019 <TC - A declaration/statement/operation is used where it is not supposed to be used - raise >
1023 <MODULE TTCN x x.ttcn>
1026 signature myP1( inout integer my1);
1028 type port portT procedure {
1030 } with {extension "internal"}
1032 type component myComp {
1038 myPort.raise( myP1, integer:5);
1043 <RESULT IF_FAIL COUNT 1>
1044 (?im)\berror\b.+?syntax.+?error.+?unexpected.+?raise
1046 <RESULT IF_FAIL COUNT 1>
1053 .*---------------------------------------------------------------------*
1054 :h4.A declaration/statement/operation is used where it is not supposed to be used - catch
1055 .*---------------------------------------------------------------------*
1058 <TC - A declaration/statement/operation is used where it is not supposed to be used - catch >
1062 <MODULE TTCN x x.ttcn>
1065 signature myP1( inout integer my1) exception( boolean);
1067 type port portT procedure {
1069 } with {extension "internal"}
1071 type component myComp {
1077 myPort.catch( myP1, 5>3);
1082 <RESULT IF_FAIL COUNT 1>
1083 (?im)\berror\b.+?syntax.+?error.+?unexpected.+?catch
1085 <RESULT IF_FAIL COUNT 1>
1092 .*---------------------------------------------------------------------*
1093 :h4.A declaration/statement/operation is used where it is not supposed to be used - check
1094 .*---------------------------------------------------------------------*
1097 <TC - A declaration/statement/operation is used where it is not supposed to be used - check >
1101 <MODULE TTCN x x.ttcn>
1104 signature myP1( inout integer my1);
1106 type port portT procedure {
1108 } with {extension "internal"}
1110 type component myComp {
1116 myPort.check( catch( myP1, 5>3));
1121 <RESULT IF_FAIL COUNT 1>
1122 (?im)\berror\b.+?syntax.+?error.+?unexpected.+?check
1124 <RESULT IF_FAIL COUNT 1>
1131 .*---------------------------------------------------------------------*
1132 :h4.A declaration/statement/operation is used where it is not supposed to be used - clear
1133 .*---------------------------------------------------------------------*
1136 <TC - A declaration/statement/operation is used where it is not supposed to be used - clear >
1140 <MODULE TTCN x x.ttcn>
1143 type port portT message {
1145 } with {extension "internal"}
1147 type component myComp {
1158 <RESULT IF_FAIL COUNT 1>
1159 (?im)\berror\b.+?syntax.+?error.+?unexpected.+?clear
1161 <RESULT IF_FAIL COUNT 1>
1168 .*---------------------------------------------------------------------*
1169 :h4.A declaration/statement/operation is used where it is not supposed to be used - port start
1170 .*---------------------------------------------------------------------*
1173 <TC - A declaration/statement/operation is used where it is not supposed to be used - port start >
1177 <MODULE TTCN x x.ttcn>
1180 type port portT message {
1182 } with {extension "internal"}
1184 type component myComp {
1196 <RESULT IF_PASS COUNT 1>
1197 (?im)error.+?no.+?local.+?or.+?imported.+?definition
1199 <RESULT IF_PASS COUNT 1>
1206 .*---------------------------------------------------------------------*
1207 :h4.A declaration/statement/operation is used where it is not supposed to be used - port stop
1208 .*---------------------------------------------------------------------*
1211 <TC - A declaration/statement/operation is used where it is not supposed to be used - port stop >
1215 <MODULE TTCN x x.ttcn>
1218 type port portT message {
1220 } with {extension "internal"}
1222 type component myComp {
1234 <RESULT IF_PASS COUNT 1>
1235 (?im)error.+?no.+?local.+?or.+?imported.+?definition
1237 <RESULT IF_PASS COUNT 1>
1244 .*---------------------------------------------------------------------*
1245 :h4.A declaration/statement/operation is used where it is not supposed to be used - setverdict
1246 .*---------------------------------------------------------------------*
1249 <TC - A declaration/statement/operation is used where it is not supposed to be used - setverdict >
1253 <MODULE TTCN x x.ttcn>
1263 <RESULT IF_FAIL COUNT 1>
1264 (?im)\berror\b.+?syntax.+?error.+?unexpected.+?setverdict
1266 <RESULT IF_FAIL COUNT 1>
1273 .*---------------------------------------------------------------------*
1274 :h4.A declaration/statement/operation is used where it is not supposed to be used - getverdict
1275 .*---------------------------------------------------------------------*
1278 <TC - A declaration/statement/operation is used where it is not supposed to be used - getverdict >
1282 <MODULE TTCN x x.ttcn>
1287 // TR 685: getverdict in control part
1288 var verdicttype veri:= getverdict;
1293 <RESULT IF_PASS COUNT 1>
1294 (?im)error.+?Operation.+?getverdict().+?not.+?allowed.+?in.+?control.+?part
1296 <RESULT IF_PASS COUNT 1>
1303 .*---------------------------------------------------------------------*
1304 :h4.A declaration/statement/operation is used where it is not supposed to be used - port
1305 .*---------------------------------------------------------------------*
1308 <TC - A declaration/statement/operation is used where it is not supposed to be used - port >
1312 <MODULE TTCN x x.ttcn>
1315 type port portT message {
1317 } with {extension "internal"}
1319 type component comp {
1332 [] any port.receive{
1340 <RESULT IF_PASS COUNT 1>
1341 (?im)error.+?Port.+?operation.+?not.+?allowed.+?in.+?control.+?part
1343 <RESULT IF_PASS COUNT 1>
1350 .*---------------------------------------------------------------------*
1351 :h4.A declaration/statement/operation is used where it is not supposed to be used - component
1352 .*---------------------------------------------------------------------*
1355 <TC - A declaration/statement/operation is used where it is not supposed to be used - component >
1359 <MODULE TTCN x x.ttcn>
1362 type port portT message {
1364 } with {extension "internal"}
1366 type component comp {
1379 [] all component.done{
1387 <RESULT IF_PASS COUNT 1>
1388 (?im)error.+?Component.+?operation.+?not.+?allowed.+?in.+?control.+?part
1390 <RESULT IF_PASS COUNT 1>
1397 .*---------------------------------------------------------------------*
1398 :h3.Forward references
1399 .*---------------------------------------------------------------------*
1401 This test case group covers the requirement SA-7/2.
1403 Strategy: Declaration in the module definition part may be made in any order. Howerver inside the module control part, test
1404 case definitions, functions and alt steps, all required declarations must be given beforehand. This means in particulat, local
1405 variables, local timers, and local constants shall never be used before they are declared. The only exception to this rule
1407 Forward references for local definitions, except variables are allowed within component type.
1409 .*---------------------------------------------------------------------*
1410 :h4.Forward references - constant (in component type)
1411 .*---------------------------------------------------------------------*
1414 <TC - Forward references - constant (in component type)>
1418 <MODULE TTCN x x.ttcn>
1421 type component myComp {
1424 const integer c1:= c2;
1425 const integer c2:= 5;
1430 <RESULT IF_PASS NEGATIVE>
1437 .*---------------------------------------------------------------------*
1438 :h4.Forward references - variable (in component type)
1439 .*---------------------------------------------------------------------*
1442 <TC - Forward references - variable (in component type)>
1446 <MODULE TTCN x x.ttcn>
1449 type component myComp {
1452 var integer c1:= c2;
1458 <RESULT IF_PASS COUNT 1>
1459 (?im)error.+?Reference.+?to.+?static.+?value.+?expected
1461 <RESULT IF_PASS COUNT 1>
1468 .*---------------------------------------------------------------------*
1469 :h4.Forward references - variable (in control part)
1470 .*---------------------------------------------------------------------*
1473 <TC - Forward references - variable (in control part)>
1477 <MODULE TTCN x x.ttcn>
1488 <RESULT IF_PASS COUNT 1>
1489 (?im)error.+?There.+?is.+?no.+?local.+?or.+?imported.+?definition
1491 <RESULT IF_PASS COUNT 1>
1498 .*---------------------------------------------------------------------*
1499 :h4.Forward references - constant (in control part)
1500 .*---------------------------------------------------------------------*
1503 <TC - Forward references - constant (in control part)>
1507 <MODULE TTCN x x.ttcn>
1512 const integer i:= c;
1513 const integer c:= 5;
1518 <RESULT IF_PASS COUNT 1>
1519 (?im)error.+?There.+?is.+?no.+?local.+?or.+?imported.+?definition
1521 <RESULT IF_PASS COUNT 1>
1528 .*---------------------------------------------------------------------*
1529 :h4.Forward references - timer (in control part)
1530 .*---------------------------------------------------------------------*
1533 <TC - Forward references - timer (in control part)>
1537 <MODULE TTCN x x.ttcn>
1551 <RESULT IF_PASS COUNT 1>
1552 (?im)error.+?There.+?is.+?no.+?local.+?or.+?imported.+?definition.+?T2
1554 <RESULT IF_PASS COUNT 1>
1561 .*---------------------------------------------------------------------*
1562 :h4.Forward references - variable (in testcase)
1563 .*---------------------------------------------------------------------*
1566 <TC - Forward references - variable (in testcase)>
1570 <MODULE TTCN x x.ttcn>
1573 type component myComp {}
1575 testcase myTestCase() runs on myComp{
1583 <RESULT IF_PASS COUNT 1>
1584 (?im)error.+?There.+?is.+?no.+?local.+?or.+?imported.+?definition
1586 <RESULT IF_PASS COUNT 1>
1593 .*---------------------------------------------------------------------*
1594 :h4.Forward references - constant (in testcase)
1595 .*---------------------------------------------------------------------*
1598 <TC - Forward references - constant (in testcase)>
1602 <MODULE TTCN x x.ttcn>
1605 type component myComp {}
1607 testcase myTestCase() runs on myComp{
1609 const integer i:= c;
1610 const integer c:= 5;
1615 <RESULT IF_PASS COUNT 1>
1616 (?im)error.+?There.+?is.+?no.+?local.+?or.+?imported.+?definition
1618 <RESULT IF_PASS COUNT 1>
1625 .*---------------------------------------------------------------------*
1626 :h4.Forward references - timer (in testcase)
1627 .*---------------------------------------------------------------------*
1630 <TC - Forward references - timer (in testcase)>
1634 <MODULE TTCN x x.ttcn>
1637 type component myComp {}
1639 testcase myTestCase() runs on myComp{
1650 <RESULT IF_PASS COUNT 1>
1651 (?im)error.+?There.+?is.+?no.+?local.+?or.+?imported.+?definition
1653 <RESULT IF_PASS COUNT 1>
1660 .*---------------------------------------------------------------------*
1661 :h4.Forward references - variable (in function)
1662 .*---------------------------------------------------------------------*
1665 <TC - Forward references - variable (in function)>
1669 <MODULE TTCN x x.ttcn>
1680 <RESULT IF_PASS COUNT 1>
1681 (?im)error.+?There.+?is.+?no.+?local.+?or.+?imported.+?definition
1683 <RESULT IF_PASS COUNT 1>
1690 .*---------------------------------------------------------------------*
1691 :h4.Forward references - constant (in function)
1692 .*---------------------------------------------------------------------*
1695 <TC - Forward references - constant (in function)>
1699 <MODULE TTCN x x.ttcn>
1704 const integer i:= c;
1705 const integer c:= 5;
1710 <RESULT IF_PASS COUNT 1>
1711 (?im)error.+?There.+?is.+?no.+?local.+?or.+?imported.+?definition
1713 <RESULT IF_PASS COUNT 1>
1720 .*---------------------------------------------------------------------*
1721 :h4.Forward references - timer (in function)
1722 .*---------------------------------------------------------------------*
1725 <TC - Forward references - timer (in function)>
1729 <MODULE TTCN x x.ttcn>
1743 <RESULT IF_PASS COUNT 1>
1744 (?im)error.+?There.+?is.+?no.+?local.+?or.+?imported.+?definition
1746 <RESULT IF_PASS COUNT 1>
1753 .*---------------------------------------------------------------------*
1754 :h4.Forward references - variable (in altstep)
1755 .*---------------------------------------------------------------------*
1758 <TC - Forward references - variable (in altstep)>
1762 <MODULE TTCN x x.ttcn>
1765 type port portT message {
1767 } with {extension "internal"}
1769 type component myComp {
1773 altstep myAltStep() runs on myComp{
1775 [] myPort.receive(?){
1784 <RESULT IF_PASS COUNT 1>
1785 (?im)error.+?There.+?is.+?no.+?local.+?or.+?imported.+?definition
1787 <RESULT IF_PASS COUNT 1>
1794 .*---------------------------------------------------------------------*
1795 :h4.Forward references - constant (in altstep)
1796 .*---------------------------------------------------------------------*
1799 <TC - Forward references - constant (in altstep)>
1803 <MODULE TTCN x x.ttcn>
1806 type port portT message {
1808 } with {extension "internal"}
1810 type component myComp {
1814 altstep myAltStep() runs on myComp{
1816 [] myPort.receive(?){
1818 const integer i:= c;
1819 const integer c:= 5;
1825 <RESULT IF_PASS COUNT 1>
1826 (?im)error.+?There.+?is.+?no.+?local.+?or.+?imported.+?definition
1828 <RESULT IF_PASS COUNT 1>
1835 .*---------------------------------------------------------------------*
1836 :h4.Forward references - timer (in altstep)
1837 .*---------------------------------------------------------------------*
1840 <TC - Forward references - timer (in altstep)>
1844 <MODULE TTCN x x.ttcn>
1847 type port portT message {
1849 } with {extension "internal"}
1851 type component myComp {
1855 altstep myAltStep() runs on myComp{
1857 [] myPort.receive(?){
1869 <RESULT IF_PASS COUNT 1>
1870 (?im)error.+?There.+?is.+?no.+?local.+?or.+?imported.+?definition
1872 <RESULT IF_PASS COUNT 1>
1880 .*---------------------------------------------------------------------*
1881 :h3. A group is used where it is not supposed to be used - record
1882 .*---------------------------------------------------------------------*
1884 <TC - A group is used where it is not supposed to be used - record>
1887 <MODULE TTCN ModuleA ModuleA.ttcn>
1898 <RESULT IF_FAIL COUNT 1>
1899 (?im)\berror\b.+syntax error, unexpected GroupKeyword
1904 .*---------------------------------------------------------------------*
1905 :h3. A group is used where it is not supposed to be used - component
1906 .*---------------------------------------------------------------------*
1908 <TC - A group is used where it is not supposed to be used - component>
1911 <MODULE TTCN ModuleA ModuleA.ttcn>
1913 type component comp {
1921 <RESULT IF_FAIL COUNT 1>
1922 (?im)\berror\b.+syntax error, unexpected GroupKeyword
1927 .*---------------------------------------------------------------------*
1928 :h3. A group is used where it is not supposed to be used - port
1929 .*---------------------------------------------------------------------*
1931 <TC - A group is used where it is not supposed to be used - port>
1934 <MODULE TTCN ModuleA ModuleA.ttcn>
1936 type port portT message {
1941 } with {extension "internal"}
1944 <RESULT IF_FAIL COUNT 1>
1945 (?im)\berror\b.+syntax error, unexpected GroupKeyword
1950 .*---------------------------------------------------------------------*
1951 :h3. A group is used where it is not supposed to be used - function
1952 .*---------------------------------------------------------------------*
1954 <TC - A group is used where it is not supposed to be used - function>
1957 <MODULE TTCN ModuleA ModuleA.ttcn>
1968 <RESULT IF_FAIL COUNT 1>
1969 (?im)\berror\b.+syntax error, unexpected GroupKeyword
1974 .*---------------------------------------------------------------------*
1975 :h3. A group is used where it is not supposed to be used - control part
1976 .*---------------------------------------------------------------------*
1978 <TC - A group is used where it is not supposed to be used - control part>
1981 <MODULE TTCN ModuleA ModuleA.ttcn>
1992 <RESULT IF_FAIL COUNT 1>
1993 (?im)\berror\b.+syntax error, unexpected GroupKeyword
1998 .*---------------------------------------------------------------------*
1999 :h3. A group is used where it is not supposed to be used - template
2000 .*---------------------------------------------------------------------*
2002 <TC - A group is used where it is not supposed to be used - template>
2005 <MODULE TTCN ModuleA ModuleA.ttcn>
2012 template myrec tmpl :=
2022 <RESULT IF_FAIL COUNT 1>
2023 (?im)\berror\b.+syntax error, unexpected GroupKeyword
2028 .*---------------------------------------------------------------------*
2029 :h4.Function reference - derefers used where it is not supposed to be used - function
2030 .*---------------------------------------------------------------------*
2032 <TC - Function reference - derefers used where it is not supposed to be used - function>
2035 <MODULE TTCN x x.ttcn>
2041 var ft vf := refers(f);
2046 <RESULT IF_FAIL COUNT 1>
2049 <RESULT IF_FAIL POSITIVE>
2050 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2055 .*---------------------------------------------------------------------*
2056 :h4.Function reference - derefers used where it is not supposed to be used - testcase
2057 .*---------------------------------------------------------------------*
2059 <TC - Function reference - derefers used where it is not supposed to be used - testcase>
2062 <MODULE TTCN x x.ttcn>
2066 type component ct { }
2067 testcase tc() runs on ct
2069 var ft vf := refers(f);
2074 <RESULT IF_FAIL COUNT 1>
2077 <RESULT IF_FAIL POSITIVE>
2078 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2083 .*---------------------------------------------------------------------*
2084 :h4.Function reference - refers().apply()
2085 .*---------------------------------------------------------------------*
2087 <TC - Function reference - refers().apply()>
2090 <MODULE TTCN x x.ttcn>
2094 type component ct { }
2095 testcase tc() runs on ct
2101 <RESULT IF_FAIL COUNT 1>
2104 <RESULT IF_FAIL POSITIVE>
2105 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2110 .*---------------------------------------------------------------------*
2111 :h4.non-Mandatory parameters - function call used where it is not supposed to be used - function non-mandatory paramter
2112 .*---------------------------------------------------------------------*
2114 <TC - non-Mandatory parameters - function call used where it is not supposed to be used - function non-mandatory paramter>
2117 <MODULE TTCN x x.ttcn>
2119 function f1(in integer i := f1()) { }
2120 function f2(inout integer i := f1()) {}
2123 <RESULT IF_PASS COUNT 2>
2124 (?im)\berror\b.+?Reference.+?value.+?expected.+?instead.+?function
2126 <RESULT IF_PASS COUNT 2>
2132 .*---------------------------------------------------------------------*
2133 :h4.non-Mandatory parameters - function call used where it is not supposed to be used - testcase non-mandatory paramter
2134 .*---------------------------------------------------------------------*
2136 <TC - non-Mandatory parameters - function call used where it is not supposed to be used - testcase non-mandatory paramter>
2139 <MODULE TTCN x x.ttcn>
2141 type component ct { }
2143 testcase f1(in integer i := f()) runs on ct{ }
2144 testcase f2(inout integer i := f()) runs on ct{}
2147 <RESULT IF_PASS COUNT 2>
2148 (?im)\berror\b.+?Reference.+?value.+?expected.+?instead.+?function
2150 <RESULT IF_PASS COUNT 2>
2156 .*---------------------------------------------------------------------*
2157 :h3.Misplaced local variable, constant, timer declaration in statement block
2158 .*---------------------------------------------------------------------*
2160 This test case group covers the requirement SA-7/3.
2162 Strategy: All local variable, constant or timer declaration must stay in the beginning of the statement block.
2164 NOTE: In TITAN this opportunity is a feature, so we won't negative test it.
2166 .*---------------------------------------------------------------------*
2168 .*---------------------------------------------------------------------*
2170 :li D='ASN.1'.Abstract Syntax Notation 1
2171 :li D='EDML'.Ericsson Document Markup Language
2172 :li D='SA'.Semantic Analyser
2173 :li D='TTCN-3'.Test and Test Control Notation version 3
2176 .*---------------------------------------------------------------------*
2178 .*---------------------------------------------------------------------*
2180 :li D='[1]'.3/ETH/RUS-2003:0087 Uen
2181 :nl.Requirement Specification for TITAN's TTCN-3 Semantic Analyser
2182 :li D='[2]'.1/174 02-FCPCA 101 22 Uen
2183 :nl.Statement of Compliance for TITAN project
2184 :li D='[3]'.ETSI ES 201 873-1, v3.0.0 Mockup v1 (2004-03):
2185 :nl.Testing and Test Control Notation version 3.,
2186 :nl.Part 1: TTCN-3 Core Language
2189 .*---------------------------------------------------------------------*
2191 .*---------------------------------------------------------------------*
2193 :li D='TITAN'.Ericsson's TTCN-3 Test Environment