1 .******************************************************************************
2 .* Copyright (c) 2000-2016 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
15 .* Szabo, Janos Zoltan – initial implementation
18 .******************************************************************************/
22 .* EDML webpage: http://cpi.ericsson.se/dwaxe/
23 .* EDML2PDF converter: http://dwaxe.ericsson.se/x2pdf
24 .* EDML user guide: http://www.lmc.ericsson.se/~lmcmarg/isit/edml_ug.html
26 .* Document header information
27 :docname.Test Description
28 :docno.18/152 91-CRL 113 200/5 Uen
32 :prep.ETH/XZR Krisztian Pandi
33 :appr.ETH/XZ (Gyula Koos)
36 :title.Test description of the TTCN-3 Semantic Analyzer: Location of Language Elements
38 .*---------------------------------------------------------------------*
40 .*---------------------------------------------------------------------*
41 .*---------------------------------------------------------------------*
43 .*---------------------------------------------------------------------*
45 REV DATE PREPARED CHANGE
46 __________________________________________________
47 PA1 2005-02-17 ESNDPAL New document for TITAN R6
48 A 2005-03-18 ESNDPAL Approved after review
49 B 2006-07-31 EKRISZA Updates for TITAN R6E
50 C 2007-03-06 EJNOSZA Updates for TITAN R7A (expected error messages)
51 D 2009-06-11 EKRISZA Name correction
52 A 2011-12-12 EKRISZA Updated for release
53 A 2012-06-27 EFERKOV Updated for release
54 A 2013-01-17 EKRIPND Updated for release
56 .*---------------------------------------------------------------------*
58 .*---------------------------------------------------------------------*
59 The purpose of this Test Description is to define and describe the function
60 test activity for the Semantic Analyser functionality of the TTCN-3 compiler:
61 :nl.SA-7/x: Location of Language Elements
62 :p.The specification of the test cases can be found in this document.
63 .*---------------------------------------------------------------------*
65 .*---------------------------------------------------------------------*
66 .*---------------------------------------------------------------------*
68 .*---------------------------------------------------------------------*
69 No specific hardware requirement.
70 .*---------------------------------------------------------------------*
72 .*---------------------------------------------------------------------*
73 Tests shall be carried out on the following platforms:
75 :li D='1.'.Solaris 8 (Sun OS 5.8) (gcc 3.0.4)
76 :li D='2.'.SUSE Linux Enterprise server 8 (2.4.19-4GB) (gcc 3.2)
77 :li D='3.'.CYGWIN_NT-5.0 (Cygwin DLL: 1.5.12) on Windows 2000 (gcc 3.3.3)
79 .*---------------------------------------------------------------------*
81 .*---------------------------------------------------------------------*
82 The test environment had been setup in CVS. The tester program is stored in:
83 :nl.TTCNv3/function_test/Tools/SAtester.pl
84 :nl.Test cases are stored with extension .script in the directory:
85 :nl.TTCNv3/function_test/Semantic_Analyser/
86 .*---------------------------------------------------------------------*
88 .*---------------------------------------------------------------------*
89 Install proper TITAN binaries on the used platforms and make sure that
90 your environment settings are correct:
92 :li D='1.'.TTCN3_DIR is set
93 :li D='2.'.$TTCN3_DIR/bin is added to the PATH variable
94 :li D='3.'.$TTCN3_DIR/lib is added to the LD_LIBRARY_PATH variable
95 :li D='4.'.Perl 5.6.0 or higher is available on the platform
96 :li D='5.'.Create a symlink to your Perl binary into the directory where the
97 test cases are stored:
98 :nl.ln -s <your Perl> perl
100 .*---------------------------------------------------------------------*
102 .*---------------------------------------------------------------------*
103 A tester program had been written in Perl especially for the Semantic Analyser
104 tests. For the list of command line parameters, type 'SAtester.pl -help', for the
105 complete documentation, type 'SAtester.pl -doc'.
106 :p.Test cases are specified in the Test Description documents in EDML format.
107 The tester program parses these files and generates the TTCN-3/ASN.1 modules, then
108 calls the compiler to compile them. The result printout is then matched against
109 different patterns to be able to set the verdict. Test cases contain not only
110 the source modules, but the patterns as well.
111 :p.The tester program allows one-by-one execution of test cases and batched
113 :p.NOTE: the tester program requires Perl 5.6.0 or higher.
114 .*---------------------------------------------------------------------*
116 .*---------------------------------------------------------------------*
117 Ref [1]: SA-7/x: Values, Location of Language Elements
118 .*---------------------------------------------------------------------*
119 :h2.Location of language elements
120 .*---------------------------------------------------------------------*
121 .*---------------------------------------------------------------------*
122 :h3.A declaration/statement/operation is used where it is not supposed to be used
123 .*---------------------------------------------------------------------*
125 This test case group covers the requirement SA-7/1.
127 Strategy: See table 'Overview of TTCN-3 statements and operations' (table 11 on page 84).
128 We also test the "port" and "component" keywords.
129 Return can be used only in functions.
133 :li D='-'.the "repeat" cannot be tested, because other errors hide its error
134 :li D='-'.the "interleave" structure is not supported in the TITAN
135 :li D='-'."deactivate" cannot be tested, because the error of the "activate" covers its error
136 :li D='-'."mtc" and "system" are integers in TITAN, so we won't negative test it
139 .*---------------------------------------------------------------------*
140 :h4.A declaration/statement/operation is used where it is not supposed to be used - alt (receive)
141 .*---------------------------------------------------------------------*
144 <TC - A declaration/statement/operation is used where it is not supposed to be used - alt (receive)>
148 <MODULE TTCN x x.ttcn>
151 type port portT message {
153 } with {extension "internal"}
155 type component comp {
168 [] myPort.receive(?){
176 <RESULT IF_PASS COUNT 1>
177 (?im)error.+?Port.+?operation.+?not.+?allowed.+?in.+?control.+?part
179 <RESULT IF_PASS COUNT 1>
180 (?im)error.+?no.+?imported.+?definition
182 <RESULT IF_PASS COUNT 2>
189 .*---------------------------------------------------------------------*
190 :h4.A declaration/statement/operation is used where it is not supposed to be used - return (in control part)
191 .*---------------------------------------------------------------------*
194 <TC - A declaration/statement/operation is used where it is not supposed to be used - return (in control part) >
198 <MODULE TTCN x x.ttcn>
211 <RESULT IF_PASS COUNT 1>
212 (?im)error.+?Return.+?statement.+?not.+?used.+?in.+?control.+?part
214 <RESULT IF_PASS COUNT 1>
221 .*---------------------------------------------------------------------*
222 :h4.A declaration/statement/operation is used where it is not supposed to be used - return (in altstep)
223 .*---------------------------------------------------------------------*
226 <TC - A declaration/statement/operation is used where it is not supposed to be used - return (in altstep) >
230 <MODULE TTCN x x.ttcn>
233 type port portT message {
235 } with {extension "internal"}
237 type component myComp {
241 altstep myAltStep ( timer T1) runs on myComp{
244 // TR 643: return statement in altsteps
250 <RESULT IF_PASS COUNT 0>
251 (?im)error.+?Return.+?statement.+?not.+?used.+?in.+?altstep
253 <RESULT IF_PASS COUNT 0>
260 .*---------------------------------------------------------------------*
261 :h4.A declaration/statement/operation is used where it is not supposed to be used - return (in testcase)
262 .*---------------------------------------------------------------------*
265 <TC - A declaration/statement/operation is used where it is not supposed to be used - return (in testcase) >
269 <MODULE TTCN x x.ttcn>
272 type port portT message {
274 } with {extension "internal"}
276 type component myComp {
280 testcase myTestCase() runs on myComp{
290 <RESULT IF_PASS COUNT 1>
291 (?im)error.+?Return.+?statement.+?not.+?used.+?in.+?testcase
293 <RESULT IF_PASS COUNT 1>
300 .*---------------------------------------------------------------------*
301 :h4.A declaration/statement/operation is used where it is not supposed to be used - activate
302 .*---------------------------------------------------------------------*
305 <TC - A declaration/statement/operation is used where it is not supposed to be used - activate >
309 <MODULE TTCN x x.ttcn>
312 type port portT message {
314 } with {extension "internal"}
316 type component myComp {
321 altstep myAltStep ( ) runs on myComp{
322 [] myPort.receive(?){
336 var default myDefVar := activate(myAltStep( ));
347 <RESULT IF_PASS COUNT 1>
348 (?im)error.+?definition.+?without.+?runs.+?on.+?clause.+?cannot.+?activate.+?altstep
350 <RESULT IF_PASS COUNT 1>
357 .*---------------------------------------------------------------------*
358 :h4.A declaration/statement/operation is used where it is not supposed to be used - create
359 .*---------------------------------------------------------------------*
362 <TC - A declaration/statement/operation is used where it is not supposed to be used - create >
366 <MODULE TTCN x x.ttcn>
369 type port portT message {
371 } with {extension "internal"}
373 type component myComp {
380 myPTC := myComp.create;
386 <RESULT IF_PASS COUNT 1>
387 (?im)error.+?Operation.+?create.+?not.+?allowed.+?in.+?control.+?part
389 <RESULT IF_PASS COUNT 1>
396 .*---------------------------------------------------------------------*
397 :h4.A declaration/statement/operation is used where it is not supposed to be used - connect
398 .*---------------------------------------------------------------------*
401 <TC - A declaration/statement/operation is used where it is not supposed to be used - connect >
405 <MODULE TTCN x x.ttcn>
408 type port portT message {
410 } with {extension "internal"}
412 type component myComp {
420 connect( myPTC:Port1, mtc:Port2);
426 <RESULT IF_FAIL COUNT 1>
427 (?im)\berror\b.+?syntax.+?error.+?unexpected.+?connect
429 <RESULT IF_FAIL COUNT 1>
436 .*---------------------------------------------------------------------*
437 :h4.A declaration/statement/operation is used where it is not supposed to be used - disconnect
438 .*---------------------------------------------------------------------*
441 <TC - A declaration/statement/operation is used where it is not supposed to be used - disconnect >
445 <MODULE TTCN x x.ttcn>
448 type port portT message {
450 } with {extension "internal"}
452 type component myComp {
460 disconnect( myPTC:Port1, mtc:Port2);
466 <RESULT IF_FAIL COUNT 1>
467 (?im)\berror\b.+?syntax.+?error.+?unexpected.+?disconnect
469 <RESULT IF_FAIL COUNT 1>
476 .*---------------------------------------------------------------------*
477 :h4.A declaration/statement/operation is used where it is not supposed to be used - map
478 .*---------------------------------------------------------------------*
481 <TC - A declaration/statement/operation is used where it is not supposed to be used - map >
485 <MODULE TTCN x x.ttcn>
488 type port portT message {
490 } with {extension "internal"}
492 type component myComp {
500 map( myPTC:Port1, system:Port2);
506 <RESULT IF_FAIL COUNT 1>
507 (?im)\berror\b.+?syntax.+?error.+?unexpected.+?map
509 <RESULT IF_FAIL COUNT 1>
516 .*---------------------------------------------------------------------*
517 :h4.A declaration/statement/operation is used where it is not supposed to be used - unmap
518 .*---------------------------------------------------------------------*
521 <TC - A declaration/statement/operation is used where it is not supposed to be used - unmap >
525 <MODULE TTCN x x.ttcn>
528 type port portT message {
530 } with {extension "internal"}
532 type component myComp {
540 unmap( myPTC:Port1, system:Port2);
546 <RESULT IF_FAIL COUNT 1>
547 (?im)\berror\b.+?syntax.+?error.+?unexpected.+?unmap
549 <RESULT IF_FAIL COUNT 1>
556 .*---------------------------------------------------------------------*
557 :h4.A declaration/statement/operation is used where it is not supposed to be used - self
558 .*---------------------------------------------------------------------*
561 <TC - A declaration/statement/operation is used where it is not supposed to be used - self >
565 <MODULE TTCN x x.ttcn>
568 type port portT message {
570 } with {extension "internal"}
572 type component myComp {
584 <RESULT IF_PASS COUNT 1>
585 (?im)error.+?Operation.+?self.+?not.+?allowed.+?in.+?control.+?part
587 <RESULT IF_PASS COUNT 1>
594 .*---------------------------------------------------------------------*
595 :h4.A declaration/statement/operation is used where it is not supposed to be used - component start
596 .*---------------------------------------------------------------------*
599 <TC - A declaration/statement/operation is used where it is not supposed to be used - component start >
603 <MODULE TTCN x x.ttcn>
606 function myFunct() runs on myComp{
611 type port portT message {
613 } with {extension "internal"}
615 type component myComp {
623 myPTC.start( myFunct());
629 <RESULT IF_PASS COUNT 1>
630 (?im)\berror\b.+?component.+?operation.+?not.+?allowed.+?control.+?part
632 <RESULT IF_PASS COUNT 1>
639 .*---------------------------------------------------------------------*
640 :h4.A declaration/statement/operation is used where it is not supposed to be used - component stop
641 .*---------------------------------------------------------------------*
644 <TC - A declaration/statement/operation is used where it is not supposed to be used - component stop >
648 <MODULE TTCN x x.ttcn>
651 type port portT message {
653 } with {extension "internal"}
655 type component myComp {
668 <RESULT IF_PASS COUNT 1>
669 (?im)error.+?Component.+?operation.+?not.+?allowed.+?in.+?control.+?part
671 <RESULT IF_PASS COUNT 1>
678 .*---------------------------------------------------------------------*
679 :h4.A declaration/statement/operation is used where it is not supposed to be used - running
680 .*---------------------------------------------------------------------*
683 <TC - A declaration/statement/operation is used where it is not supposed to be used - running >
687 <MODULE TTCN x x.ttcn>
690 type port portT message {
692 } with {extension "internal"}
694 type component myComp {
709 <RESULT IF_PASS COUNT 1>
710 (?im)error.+?Operation.+?component.+?running.+?not.+?allowed.+?in.+?control.+?part
712 <RESULT IF_PASS COUNT 1>
719 .*---------------------------------------------------------------------*
720 :h4.A declaration/statement/operation is used where it is not supposed to be used - done
721 .*---------------------------------------------------------------------*
724 <TC - A declaration/statement/operation is used where it is not supposed to be used - done >
728 <MODULE TTCN x x.ttcn>
731 type port portT message {
733 } with {extension "internal"}
735 type component myComp {
748 <RESULT IF_FAIL COUNT 1>
749 (?im)\berror\b.+?syntax.+?error.+?unexpected.+?done
751 <RESULT IF_FAIL COUNT 1>
758 .*---------------------------------------------------------------------*
759 :h4.A declaration/statement/operation is used where it is not supposed to be used - send
760 .*---------------------------------------------------------------------*
763 <TC - A declaration/statement/operation is used where it is not supposed to be used - send >
767 <MODULE TTCN x x.ttcn>
770 type port portT message {
772 } with {extension "internal"}
774 type component myComp {
785 <RESULT IF_FAIL COUNT 1>
786 (?im)\berror\b.+?syntax.+?error.+?unexpected.+?send
788 <RESULT IF_FAIL COUNT 1>
795 .*---------------------------------------------------------------------*
796 :h4.A declaration/statement/operation is used where it is not supposed to be used - receive
797 .*---------------------------------------------------------------------*
800 <TC - A declaration/statement/operation is used where it is not supposed to be used - receive >
804 <MODULE TTCN x x.ttcn>
807 type port portT message {
809 } with {extension "internal"}
811 type component myComp {
822 <RESULT IF_FAIL COUNT 1>
823 (?im)\berror\b.+?syntax.+?error.+?unexpected.+?receive
825 <RESULT IF_FAIL COUNT 1>
832 .*---------------------------------------------------------------------*
833 :h4.A declaration/statement/operation is used where it is not supposed to be used - trigger
834 .*---------------------------------------------------------------------*
837 <TC - A declaration/statement/operation is used where it is not supposed to be used - trigger >
841 <MODULE TTCN x x.ttcn>
844 type port portT message {
846 } with {extension "internal"}
848 type component myComp {
859 <RESULT IF_FAIL COUNT 1>
860 (?im)\berror\b.+?syntax.+?error.+?unexpected.+?trigger
862 <RESULT IF_FAIL COUNT 1>
869 .*---------------------------------------------------------------------*
870 :h4.A declaration/statement/operation is used where it is not supposed to be used - call
871 .*---------------------------------------------------------------------*
874 <TC - A declaration/statement/operation is used where it is not supposed to be used - call >
878 <MODULE TTCN x x.ttcn>
881 signature myP1( inout integer my1);
883 type port portT procedure {
885 } with {extension "internal"}
887 type component myComp {
893 myPort.call( myP1: 12);
898 <RESULT IF_FAIL COUNT 1>
899 (?im)\berror\b.+?syntax.+?error.+?unexpected.+?call
901 <RESULT IF_FAIL COUNT 1>
908 .*---------------------------------------------------------------------*
909 :h4.A declaration/statement/operation is used where it is not supposed to be used - getcall
910 .*---------------------------------------------------------------------*
913 <TC - A declaration/statement/operation is used where it is not supposed to be used - getcall >
917 <MODULE TTCN x x.ttcn>
920 signature myP1( inout integer my1);
922 type port portT procedure {
924 } with {extension "internal"}
926 type component myComp {
932 myPort.getcall( myP1: ?);
937 <RESULT IF_FAIL COUNT 1>
938 (?im)\berror\b.+?syntax.+?error.+?unexpected.+?getcall
940 <RESULT IF_FAIL COUNT 1>
947 .*---------------------------------------------------------------------*
948 :h4.A declaration/statement/operation is used where it is not supposed to be used - reply
949 .*---------------------------------------------------------------------*
952 <TC - A declaration/statement/operation is used where it is not supposed to be used - reply >
956 <MODULE TTCN x x.ttcn>
959 signature myP1( inout integer my1);
961 type port portT procedure {
963 } with {extension "internal"}
965 type component myComp {
971 myPort.reply( myP1: 5);
976 <RESULT IF_FAIL COUNT 1>
977 (?im)\berror\b.+?syntax.+?error.+?unexpected.+?reply
979 <RESULT IF_FAIL COUNT 1>
986 .*---------------------------------------------------------------------*
987 :h4.A declaration/statement/operation is used where it is not supposed to be used - getreply
988 .*---------------------------------------------------------------------*
991 <TC - A declaration/statement/operation is used where it is not supposed to be used - getreply >
995 <MODULE TTCN x x.ttcn>
998 signature myP1( inout integer my1);
1000 type port portT procedure {
1002 } with {extension "internal"}
1004 type component myComp {
1010 myPort.getreply( myP1: 5);
1015 <RESULT IF_FAIL COUNT 1>
1016 (?im)\berror\b.+?syntax.+?error.+?unexpected.+?getreply
1018 <RESULT IF_FAIL COUNT 1>
1025 .*---------------------------------------------------------------------*
1026 :h4.A declaration/statement/operation is used where it is not supposed to be used - raise
1027 .*---------------------------------------------------------------------*
1030 <TC - A declaration/statement/operation is used where it is not supposed to be used - raise >
1034 <MODULE TTCN x x.ttcn>
1037 signature myP1( inout integer my1);
1039 type port portT procedure {
1041 } with {extension "internal"}
1043 type component myComp {
1049 myPort.raise( myP1, integer:5);
1054 <RESULT IF_FAIL COUNT 1>
1055 (?im)\berror\b.+?syntax.+?error.+?unexpected.+?raise
1057 <RESULT IF_FAIL COUNT 1>
1064 .*---------------------------------------------------------------------*
1065 :h4.A declaration/statement/operation is used where it is not supposed to be used - catch
1066 .*---------------------------------------------------------------------*
1069 <TC - A declaration/statement/operation is used where it is not supposed to be used - catch >
1073 <MODULE TTCN x x.ttcn>
1076 signature myP1( inout integer my1) exception( boolean);
1078 type port portT procedure {
1080 } with {extension "internal"}
1082 type component myComp {
1088 myPort.catch( myP1, 5>3);
1093 <RESULT IF_FAIL COUNT 1>
1094 (?im)\berror\b.+?syntax.+?error.+?unexpected.+?catch
1096 <RESULT IF_FAIL COUNT 1>
1103 .*---------------------------------------------------------------------*
1104 :h4.A declaration/statement/operation is used where it is not supposed to be used - check
1105 .*---------------------------------------------------------------------*
1108 <TC - A declaration/statement/operation is used where it is not supposed to be used - check >
1112 <MODULE TTCN x x.ttcn>
1115 signature myP1( inout integer my1);
1117 type port portT procedure {
1119 } with {extension "internal"}
1121 type component myComp {
1127 myPort.check( catch( myP1, 5>3));
1132 <RESULT IF_FAIL COUNT 1>
1133 (?im)\berror\b.+?syntax.+?error.+?unexpected.+?check
1135 <RESULT IF_FAIL COUNT 1>
1142 .*---------------------------------------------------------------------*
1143 :h4.A declaration/statement/operation is used where it is not supposed to be used - clear
1144 .*---------------------------------------------------------------------*
1147 <TC - A declaration/statement/operation is used where it is not supposed to be used - clear >
1151 <MODULE TTCN x x.ttcn>
1154 type port portT message {
1156 } with {extension "internal"}
1158 type component myComp {
1169 <RESULT IF_FAIL COUNT 1>
1170 (?im)\berror\b.+?syntax.+?error.+?unexpected.+?clear
1172 <RESULT IF_FAIL COUNT 1>
1179 .*---------------------------------------------------------------------*
1180 :h4.A declaration/statement/operation is used where it is not supposed to be used - port start
1181 .*---------------------------------------------------------------------*
1184 <TC - A declaration/statement/operation is used where it is not supposed to be used - port start >
1188 <MODULE TTCN x x.ttcn>
1191 type port portT message {
1193 } with {extension "internal"}
1195 type component myComp {
1207 <RESULT IF_PASS COUNT 1>
1208 (?im)error.+?no.+?local.+?or.+?imported.+?definition
1210 <RESULT IF_PASS COUNT 1>
1217 .*---------------------------------------------------------------------*
1218 :h4.A declaration/statement/operation is used where it is not supposed to be used - port stop
1219 .*---------------------------------------------------------------------*
1222 <TC - A declaration/statement/operation is used where it is not supposed to be used - port stop >
1226 <MODULE TTCN x x.ttcn>
1229 type port portT message {
1231 } with {extension "internal"}
1233 type component myComp {
1245 <RESULT IF_PASS COUNT 1>
1246 (?im)error.+?no.+?local.+?or.+?imported.+?definition
1248 <RESULT IF_PASS COUNT 1>
1255 .*---------------------------------------------------------------------*
1256 :h4.A declaration/statement/operation is used where it is not supposed to be used - setverdict
1257 .*---------------------------------------------------------------------*
1260 <TC - A declaration/statement/operation is used where it is not supposed to be used - setverdict >
1264 <MODULE TTCN x x.ttcn>
1274 <RESULT IF_FAIL COUNT 1>
1275 (?im)\berror\b.+?syntax.+?error.+?unexpected.+?setverdict
1277 <RESULT IF_FAIL COUNT 1>
1284 .*---------------------------------------------------------------------*
1285 :h4.A declaration/statement/operation is used where it is not supposed to be used - getverdict
1286 .*---------------------------------------------------------------------*
1289 <TC - A declaration/statement/operation is used where it is not supposed to be used - getverdict >
1293 <MODULE TTCN x x.ttcn>
1298 // TR 685: getverdict in control part
1299 var verdicttype veri:= getverdict;
1304 <RESULT IF_PASS COUNT 1>
1305 (?im)error.+?Operation.+?getverdict().+?not.+?allowed.+?in.+?control.+?part
1307 <RESULT IF_PASS COUNT 1>
1314 .*---------------------------------------------------------------------*
1315 :h4.A declaration/statement/operation is used where it is not supposed to be used - port
1316 .*---------------------------------------------------------------------*
1319 <TC - A declaration/statement/operation is used where it is not supposed to be used - port >
1323 <MODULE TTCN x x.ttcn>
1326 type port portT message {
1328 } with {extension "internal"}
1330 type component comp {
1343 [] any port.receive{
1351 <RESULT IF_PASS COUNT 1>
1352 (?im)error.+?Port.+?operation.+?not.+?allowed.+?in.+?control.+?part
1354 <RESULT IF_PASS COUNT 1>
1361 .*---------------------------------------------------------------------*
1362 :h4.A declaration/statement/operation is used where it is not supposed to be used - component
1363 .*---------------------------------------------------------------------*
1366 <TC - A declaration/statement/operation is used where it is not supposed to be used - component >
1370 <MODULE TTCN x x.ttcn>
1373 type port portT message {
1375 } with {extension "internal"}
1377 type component comp {
1390 [] all component.done{
1398 <RESULT IF_PASS COUNT 1>
1399 (?im)error.+?Component.+?operation.+?not.+?allowed.+?in.+?control.+?part
1401 <RESULT IF_PASS COUNT 1>
1408 .*---------------------------------------------------------------------*
1409 :h3.Forward references
1410 .*---------------------------------------------------------------------*
1412 This test case group covers the requirement SA-7/2.
1414 Strategy: Declaration in the module definition part may be made in any order. Howerver inside the module control part, test
1415 case definitions, functions and alt steps, all required declarations must be given beforehand. This means in particulat, local
1416 variables, local timers, and local constants shall never be used before they are declared. The only exception to this rule
1418 Forward references for local definitions, except variables are allowed within component type.
1420 .*---------------------------------------------------------------------*
1421 :h4.Forward references - constant (in component type)
1422 .*---------------------------------------------------------------------*
1425 <TC - Forward references - constant (in component type)>
1429 <MODULE TTCN x x.ttcn>
1432 type component myComp {
1435 const integer c1:= c2;
1436 const integer c2:= 5;
1441 <RESULT IF_PASS NEGATIVE>
1448 .*---------------------------------------------------------------------*
1449 :h4.Forward references - variable (in component type)
1450 .*---------------------------------------------------------------------*
1453 <TC - Forward references - variable (in component type)>
1457 <MODULE TTCN x x.ttcn>
1460 type component myComp {
1463 var integer c1:= c2;
1469 <RESULT IF_PASS COUNT 1>
1470 (?im)error.+?Reference.+?to.+?static.+?value.+?expected
1472 <RESULT IF_PASS COUNT 1>
1479 .*---------------------------------------------------------------------*
1480 :h4.Forward references - variable (in control part)
1481 .*---------------------------------------------------------------------*
1484 <TC - Forward references - variable (in control part)>
1488 <MODULE TTCN x x.ttcn>
1499 <RESULT IF_PASS COUNT 1>
1500 (?im)error.+?There.+?is.+?no.+?local.+?or.+?imported.+?definition
1502 <RESULT IF_PASS COUNT 1>
1509 .*---------------------------------------------------------------------*
1510 :h4.Forward references - constant (in control part)
1511 .*---------------------------------------------------------------------*
1514 <TC - Forward references - constant (in control part)>
1518 <MODULE TTCN x x.ttcn>
1523 const integer i:= c;
1524 const integer c:= 5;
1529 <RESULT IF_PASS COUNT 1>
1530 (?im)error.+?There.+?is.+?no.+?local.+?or.+?imported.+?definition
1532 <RESULT IF_PASS COUNT 1>
1539 .*---------------------------------------------------------------------*
1540 :h4.Forward references - timer (in control part)
1541 .*---------------------------------------------------------------------*
1544 <TC - Forward references - timer (in control part)>
1548 <MODULE TTCN x x.ttcn>
1562 <RESULT IF_PASS COUNT 1>
1563 (?im)error.+?There.+?is.+?no.+?local.+?or.+?imported.+?definition.+?T2
1565 <RESULT IF_PASS COUNT 1>
1572 .*---------------------------------------------------------------------*
1573 :h4.Forward references - variable (in testcase)
1574 .*---------------------------------------------------------------------*
1577 <TC - Forward references - variable (in testcase)>
1581 <MODULE TTCN x x.ttcn>
1584 type component myComp {}
1586 testcase myTestCase() runs on myComp{
1594 <RESULT IF_PASS COUNT 1>
1595 (?im)error.+?There.+?is.+?no.+?local.+?or.+?imported.+?definition
1597 <RESULT IF_PASS COUNT 1>
1604 .*---------------------------------------------------------------------*
1605 :h4.Forward references - constant (in testcase)
1606 .*---------------------------------------------------------------------*
1609 <TC - Forward references - constant (in testcase)>
1613 <MODULE TTCN x x.ttcn>
1616 type component myComp {}
1618 testcase myTestCase() runs on myComp{
1620 const integer i:= c;
1621 const integer c:= 5;
1626 <RESULT IF_PASS COUNT 1>
1627 (?im)error.+?There.+?is.+?no.+?local.+?or.+?imported.+?definition
1629 <RESULT IF_PASS COUNT 1>
1636 .*---------------------------------------------------------------------*
1637 :h4.Forward references - timer (in testcase)
1638 .*---------------------------------------------------------------------*
1641 <TC - Forward references - timer (in testcase)>
1645 <MODULE TTCN x x.ttcn>
1648 type component myComp {}
1650 testcase myTestCase() runs on myComp{
1661 <RESULT IF_PASS COUNT 1>
1662 (?im)error.+?There.+?is.+?no.+?local.+?or.+?imported.+?definition
1664 <RESULT IF_PASS COUNT 1>
1671 .*---------------------------------------------------------------------*
1672 :h4.Forward references - variable (in function)
1673 .*---------------------------------------------------------------------*
1676 <TC - Forward references - variable (in function)>
1680 <MODULE TTCN x x.ttcn>
1691 <RESULT IF_PASS COUNT 1>
1692 (?im)error.+?There.+?is.+?no.+?local.+?or.+?imported.+?definition
1694 <RESULT IF_PASS COUNT 1>
1701 .*---------------------------------------------------------------------*
1702 :h4.Forward references - constant (in function)
1703 .*---------------------------------------------------------------------*
1706 <TC - Forward references - constant (in function)>
1710 <MODULE TTCN x x.ttcn>
1715 const integer i:= c;
1716 const integer c:= 5;
1721 <RESULT IF_PASS COUNT 1>
1722 (?im)error.+?There.+?is.+?no.+?local.+?or.+?imported.+?definition
1724 <RESULT IF_PASS COUNT 1>
1731 .*---------------------------------------------------------------------*
1732 :h4.Forward references - timer (in function)
1733 .*---------------------------------------------------------------------*
1736 <TC - Forward references - timer (in function)>
1740 <MODULE TTCN x x.ttcn>
1754 <RESULT IF_PASS COUNT 1>
1755 (?im)error.+?There.+?is.+?no.+?local.+?or.+?imported.+?definition
1757 <RESULT IF_PASS COUNT 1>
1764 .*---------------------------------------------------------------------*
1765 :h4.Forward references - variable (in altstep)
1766 .*---------------------------------------------------------------------*
1769 <TC - Forward references - variable (in altstep)>
1773 <MODULE TTCN x x.ttcn>
1776 type port portT message {
1778 } with {extension "internal"}
1780 type component myComp {
1784 altstep myAltStep() runs on myComp{
1786 [] myPort.receive(?){
1795 <RESULT IF_PASS COUNT 1>
1796 (?im)error.+?There.+?is.+?no.+?local.+?or.+?imported.+?definition
1798 <RESULT IF_PASS COUNT 1>
1805 .*---------------------------------------------------------------------*
1806 :h4.Forward references - constant (in altstep)
1807 .*---------------------------------------------------------------------*
1810 <TC - Forward references - constant (in altstep)>
1814 <MODULE TTCN x x.ttcn>
1817 type port portT message {
1819 } with {extension "internal"}
1821 type component myComp {
1825 altstep myAltStep() runs on myComp{
1827 [] myPort.receive(?){
1829 const integer i:= c;
1830 const integer c:= 5;
1836 <RESULT IF_PASS COUNT 1>
1837 (?im)error.+?There.+?is.+?no.+?local.+?or.+?imported.+?definition
1839 <RESULT IF_PASS COUNT 1>
1846 .*---------------------------------------------------------------------*
1847 :h4.Forward references - timer (in altstep)
1848 .*---------------------------------------------------------------------*
1851 <TC - Forward references - timer (in altstep)>
1855 <MODULE TTCN x x.ttcn>
1858 type port portT message {
1860 } with {extension "internal"}
1862 type component myComp {
1866 altstep myAltStep() runs on myComp{
1868 [] myPort.receive(?){
1880 <RESULT IF_PASS COUNT 1>
1881 (?im)error.+?There.+?is.+?no.+?local.+?or.+?imported.+?definition
1883 <RESULT IF_PASS COUNT 1>
1891 .*---------------------------------------------------------------------*
1892 :h3. A group is used where it is not supposed to be used - record
1893 .*---------------------------------------------------------------------*
1895 <TC - A group is used where it is not supposed to be used - record>
1898 <MODULE TTCN ModuleA ModuleA.ttcn>
1909 <RESULT IF_FAIL COUNT 1>
1910 (?im)\berror\b.+syntax error, unexpected GroupKeyword
1915 .*---------------------------------------------------------------------*
1916 :h3. A group is used where it is not supposed to be used - component
1917 .*---------------------------------------------------------------------*
1919 <TC - A group is used where it is not supposed to be used - component>
1922 <MODULE TTCN ModuleA ModuleA.ttcn>
1924 type component comp {
1932 <RESULT IF_FAIL COUNT 1>
1933 (?im)\berror\b.+syntax error, unexpected GroupKeyword
1938 .*---------------------------------------------------------------------*
1939 :h3. A group is used where it is not supposed to be used - port
1940 .*---------------------------------------------------------------------*
1942 <TC - A group is used where it is not supposed to be used - port>
1945 <MODULE TTCN ModuleA ModuleA.ttcn>
1947 type port portT message {
1952 } with {extension "internal"}
1955 <RESULT IF_FAIL COUNT 1>
1956 (?im)\berror\b.+syntax error, unexpected GroupKeyword
1961 .*---------------------------------------------------------------------*
1962 :h3. A group is used where it is not supposed to be used - function
1963 .*---------------------------------------------------------------------*
1965 <TC - A group is used where it is not supposed to be used - function>
1968 <MODULE TTCN ModuleA ModuleA.ttcn>
1979 <RESULT IF_FAIL COUNT 1>
1980 (?im)\berror\b.+syntax error, unexpected GroupKeyword
1985 .*---------------------------------------------------------------------*
1986 :h3. A group is used where it is not supposed to be used - control part
1987 .*---------------------------------------------------------------------*
1989 <TC - A group is used where it is not supposed to be used - control part>
1992 <MODULE TTCN ModuleA ModuleA.ttcn>
2003 <RESULT IF_FAIL COUNT 1>
2004 (?im)\berror\b.+syntax error, unexpected GroupKeyword
2009 .*---------------------------------------------------------------------*
2010 :h3. A group is used where it is not supposed to be used - template
2011 .*---------------------------------------------------------------------*
2013 <TC - A group is used where it is not supposed to be used - template>
2016 <MODULE TTCN ModuleA ModuleA.ttcn>
2023 template myrec tmpl :=
2033 <RESULT IF_FAIL COUNT 1>
2034 (?im)\berror\b.+syntax error, unexpected GroupKeyword
2039 .*---------------------------------------------------------------------*
2040 :h4.Function reference - derefers used where it is not supposed to be used - function
2041 .*---------------------------------------------------------------------*
2043 <TC - Function reference - derefers used where it is not supposed to be used - function>
2046 <MODULE TTCN x x.ttcn>
2052 var ft vf := refers(f);
2057 <RESULT IF_FAIL COUNT 1>
2060 <RESULT IF_FAIL POSITIVE>
2061 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2066 .*---------------------------------------------------------------------*
2067 :h4.Function reference - derefers used where it is not supposed to be used - testcase
2068 .*---------------------------------------------------------------------*
2070 <TC - Function reference - derefers used where it is not supposed to be used - testcase>
2073 <MODULE TTCN x x.ttcn>
2077 type component ct { }
2078 testcase tc() runs on ct
2080 var ft vf := refers(f);
2085 <RESULT IF_FAIL COUNT 1>
2088 <RESULT IF_FAIL POSITIVE>
2089 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2094 .*---------------------------------------------------------------------*
2095 :h4.Function reference - refers().apply()
2096 .*---------------------------------------------------------------------*
2098 <TC - Function reference - refers().apply()>
2101 <MODULE TTCN x x.ttcn>
2105 type component ct { }
2106 testcase tc() runs on ct
2112 <RESULT IF_FAIL COUNT 1>
2115 <RESULT IF_FAIL POSITIVE>
2116 (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b
2121 .*---------------------------------------------------------------------*
2122 :h4.non-Mandatory parameters - function call used where it is not supposed to be used - function non-mandatory paramter
2123 .*---------------------------------------------------------------------*
2125 <TC - non-Mandatory parameters - function call used where it is not supposed to be used - function non-mandatory paramter>
2128 <MODULE TTCN x x.ttcn>
2130 function f1(in integer i := f1()) { }
2131 function f2(inout integer i := f1()) {}
2134 <RESULT IF_PASS COUNT 2>
2135 (?im)\berror\b.+?Reference.+?value.+?expected.+?instead.+?function
2137 <RESULT IF_PASS COUNT 2>
2143 .*---------------------------------------------------------------------*
2144 :h4.non-Mandatory parameters - function call used where it is not supposed to be used - testcase non-mandatory paramter
2145 .*---------------------------------------------------------------------*
2147 <TC - non-Mandatory parameters - function call used where it is not supposed to be used - testcase non-mandatory paramter>
2150 <MODULE TTCN x x.ttcn>
2152 type component ct { }
2154 testcase f1(in integer i := f()) runs on ct{ }
2155 testcase f2(inout integer i := f()) runs on ct{}
2158 <RESULT IF_PASS COUNT 2>
2159 (?im)\berror\b.+?Reference.+?value.+?expected.+?instead.+?function
2161 <RESULT IF_PASS COUNT 2>
2167 .*---------------------------------------------------------------------*
2168 :h3.Misplaced local variable, constant, timer declaration in statement block
2169 .*---------------------------------------------------------------------*
2171 This test case group covers the requirement SA-7/3.
2173 Strategy: All local variable, constant or timer declaration must stay in the beginning of the statement block.
2175 NOTE: In TITAN this opportunity is a feature, so we won't negative test it.
2177 .*---------------------------------------------------------------------*
2179 .*---------------------------------------------------------------------*
2181 :li D='ASN.1'.Abstract Syntax Notation 1
2182 :li D='EDML'.Ericsson Document Markup Language
2183 :li D='SA'.Semantic Analyser
2184 :li D='TTCN-3'.Test and Test Control Notation version 3
2187 .*---------------------------------------------------------------------*
2189 .*---------------------------------------------------------------------*
2191 :li D='[1]'.3/ETH/RUS-2003:0087 Uen
2192 :nl.Requirement Specification for TITAN's TTCN-3 Semantic Analyser
2193 :li D='[2]'.1/174 02-FCPCA 101 22 Uen
2194 :nl.Statement of Compliance for TITAN project
2195 :li D='[3]'.ETSI ES 201 873-1, v3.0.0 Mockup v1 (2004-03):
2196 :nl.Testing and Test Control Notation version 3.,
2197 :nl.Part 1: TTCN-3 Core Language
2200 .*---------------------------------------------------------------------*
2202 .*---------------------------------------------------------------------*
2204 :li D='TITAN'.Ericsson's TTCN-3 Test Environment