| 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 |
| 7 | .* |
| 8 | .* Contributors: |
| 9 | .* Balasko, Jeno |
| 10 | .* Baranyi, Botond |
| 11 | .* Bartha, Norbert |
| 12 | .* Beres, Szabolcs |
| 13 | .* Delic, Adam |
| 14 | .* Forstner, Matyas |
| 15 | .* Harai, Tibor |
| 16 | .* Kovacs, Ferenc |
| 17 | .* Palugyai, Sandor |
| 18 | .* Pandi, Krisztian |
| 19 | .* Szabados, Kristof |
| 20 | .* Szabo, Janos Zoltan – initial implementation |
| 21 | .* Szalai, Endre |
| 22 | .* |
| 23 | .******************************************************************************/ |
| 24 | :text. |
| 25 | :lang eng. |
| 26 | |
| 27 | .* EDML webpage: http://cpi.ericsson.se/dwaxe/ |
| 28 | .* EDML2PDF converter: http://dwaxe.ericsson.se/x2pdf |
| 29 | .* EDML user guide: http://www.lmc.ericsson.se/~lmcmarg/isit/edml_ug.html |
| 30 | |
| 31 | .* Document header information |
| 32 | :docname.Test Description |
| 33 | :docno.17/152 91-CRL 113 200/3 Uen |
| 34 | :rev.A |
| 35 | :date.2015-04-27 |
| 36 | |
| 37 | :prep.ETH/XZ Jeno Balasko |
| 38 | :appr.ETH/XZ (Gyula Koos) |
| 39 | :checked.EKRISZA |
| 40 | |
| 41 | :title.Test description of the TTCN-3 Semantic Analyzer: Values, Value Lists, Ranges, Length, Dimensions, Durations and Subtyping |
| 42 | :contents level=2. |
| 43 | .*---------------------------------------------------------------------* |
| 44 | :h1.Introduction |
| 45 | .*---------------------------------------------------------------------* |
| 46 | .*---------------------------------------------------------------------* |
| 47 | :h2.Revision history |
| 48 | .*---------------------------------------------------------------------* |
| 49 | :xmp tab=2. |
| 50 | REV DATE PREPARED CHANGE |
| 51 | __________________________________________________ |
| 52 | PA1 2005-02-17 ESNDPAL New document for TITAN R6 |
| 53 | A 2005-03-18 ESNDPAL Approved after review |
| 54 | B 2005-12-16 EKRISZA Updates for TITAN R6D |
| 55 | C 2006-07-31 EDMDELI Updates for TITAN R6E |
| 56 | D 2007-03-06 EJNOSZA Updates for TITAN R7A |
| 57 | PE1 2008-01-22 EFERKOV Changes for TITAN R7C |
| 58 | PE2 2008-01-25 ETHNBA Updates for TITAN R7C |
| 59 | F 2009-06-11 EKRISZA Name correction |
| 60 | G 2009-09-10 EKRISZA New tests for modified templates. |
| 61 | H 2010-01-25 EKRISZA Refreshed version number |
| 62 | I 2010-07-02 EKRISZA version update |
| 63 | J 2010-07-02 EKRISZA version update |
| 64 | K 2010-12-14 EKRISZA version update |
| 65 | PL1 2011-02-23 ESZABRE Constant folding for indexes |
| 66 | L 2011-02-23 EKRISZA removed line ending whitespaces |
| 67 | M 2011-10-10 EKRISZA version update |
| 68 | A 2011-12-12 EKRISZA Updated for release |
| 69 | A 2012-06-27 EFERKOV Updated for release |
| 70 | A 2013-01-17 EKRIPND Updated for release |
| 71 | :exmp. |
| 72 | .*---------------------------------------------------------------------* |
| 73 | :h2.Purpose |
| 74 | .*---------------------------------------------------------------------* |
| 75 | The purpose of this Test Description is to define and describe the function |
| 76 | test activity for the Semantic Analyser functionality of the TTCN-3 compiler: |
| 77 | :nl.SA-6/x: Values, Value Lists, Ranges, Length, Dimensions, Durations and Subtyping. |
| 78 | :p.The specification of the test cases can be found in this document. |
| 79 | .*---------------------------------------------------------------------* |
| 80 | :h1.Test environment |
| 81 | .*---------------------------------------------------------------------* |
| 82 | .*---------------------------------------------------------------------* |
| 83 | :h2.Hardware |
| 84 | .*---------------------------------------------------------------------* |
| 85 | No specific hardware requirement. |
| 86 | .*---------------------------------------------------------------------* |
| 87 | :h2.Software |
| 88 | .*---------------------------------------------------------------------* |
| 89 | Tests shall be carried out on the following platforms: |
| 90 | :list. |
| 91 | :li D='1.'.Solaris 8 (Sun OS 5.8) (gcc 3.0.4) |
| 92 | :li D='2.'.SUSE Linux Enterprise server 8 (2.4.19-4GB) (gcc 3.2) |
| 93 | :li D='3.'.CYGWIN_NT-5.0 (Cygwin DLL: 1.5.12) on Windows 2000 (gcc 3.3.3) |
| 94 | :elist. |
| 95 | .*---------------------------------------------------------------------* |
| 96 | :h2.Configuration |
| 97 | .*---------------------------------------------------------------------* |
| 98 | The test environment had been setup in CVS. The tester program is stored in: |
| 99 | :nl.TTCNv3/function_test/Tools/SAtester.pl |
| 100 | :nl.Test cases are stored with extension .script in the directory: |
| 101 | :nl.TTCNv3/function_test/Semantic_Analyser/ |
| 102 | .*---------------------------------------------------------------------* |
| 103 | :h2.Installation |
| 104 | .*---------------------------------------------------------------------* |
| 105 | Install proper TITAN binaries on the used platforms and make sure that |
| 106 | your environment settings are correct: |
| 107 | :list. |
| 108 | :li D='1.'.TTCN3_DIR is set |
| 109 | :li D='2.'.$TTCN3_DIR/bin is added to the PATH variable |
| 110 | :li D='3.'.$TTCN3_DIR/lib is added to the LD_LIBRARY_PATH variable |
| 111 | :li D='4.'.Perl 5.6.0 or higher is available on the platform |
| 112 | :li D='5.'.Create a symlink to your Perl binary into the directory where the |
| 113 | test cases are stored: |
| 114 | :nl.ln -s <your Perl> perl |
| 115 | :elist. |
| 116 | .*---------------------------------------------------------------------* |
| 117 | :h2.Test Tools |
| 118 | .*---------------------------------------------------------------------* |
| 119 | A tester program had been written in Perl especially for the Semantic Analyser |
| 120 | tests. For the list of command line parameters, type 'SAtester.pl -help', for the |
| 121 | complete documentation, type 'SAtester.pl -doc'. |
| 122 | :p.Test cases are specified in the Test Description documents in EDML format. |
| 123 | The tester program parses these files and generates the TTCN-3/ASN.1 modules, then |
| 124 | calls the compiler to compile them. The result printout is then matched against |
| 125 | different patterns to be able to set the verdict. Test cases contain not only |
| 126 | the source modules, but the patterns as well. |
| 127 | :p.The tester program allows one-by-one execution of test cases and batched |
| 128 | execution as well. |
| 129 | :p.NOTE: the tester program requires Perl 5.6.0 or higher. |
| 130 | .*---------------------------------------------------------------------* |
| 131 | :h1.Test cases |
| 132 | .*---------------------------------------------------------------------* |
| 133 | Ref [1]: SA-6/x: Values, Value Lists, Ranges, Length, Dimensions, Durations and Subtyping |
| 134 | .*---------------------------------------------------------------------* |
| 135 | :h2.Subtyping |
| 136 | .*---------------------------------------------------------------------* |
| 137 | .*---------------------------------------------------------------------* |
| 138 | :h3.Allowed subtyping |
| 139 | .*---------------------------------------------------------------------* |
| 140 | |
| 141 | This test case group covers the requirement SA-6/1. |
| 142 | |
| 143 | Strategy: TTCN-3 Core Language side:26, Table 3. |
| 144 | :nl.All not allowed subtyping shall be tested based in the table. |
| 145 | For all types in the table, there shall be one case when the subtyping is |
| 146 | used directly with the type name and one for a named type that has a root |
| 147 | type of the tested type, for example: |
| 148 | :xmp tab=2. |
| 149 | type integer i1 length(10); |
| 150 | type i1 i2 length(10); |
| 151 | :exmp. |
| 152 | Both types are defined in one module. |
| 153 | |
| 154 | TODO: port, component and default tests are missing. |
| 155 | |
| 156 | NOTE: the address type is a user defined type so we won't test it. |
| 157 | |
| 158 | .*---------------------------------------------------------------------* |
| 159 | :h4. Allowed subtyping - integer length |
| 160 | .*---------------------------------------------------------------------* |
| 161 | :xmp tab=0. |
| 162 | |
| 163 | <TC - Allowed subtyping - integer length> |
| 164 | |
| 165 | <COMPILE> |
| 166 | <VERDICT_LEAF PASS> |
| 167 | <MODULE TTCN Temp Temp.ttcn> |
| 168 | module Temp { |
| 169 | |
| 170 | type integer FaultyInt1 length(10); |
| 171 | type integer Int; |
| 172 | type Int FaultyInt2 length(4); |
| 173 | |
| 174 | } |
| 175 | <END_MODULE> |
| 176 | <RESULT IF_PASS COUNT 2> |
| 177 | (?im)Length.+?subtyping.+?not.+?allowed |
| 178 | <END_RESULT> |
| 179 | <RESULT IF_PASS> |
| 180 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 181 | <END_RESULT> |
| 182 | <RESULT IF_PASS COUNT 2> |
| 183 | (?is)\berror: |
| 184 | <END_RESULT> |
| 185 | <END_TC> |
| 186 | |
| 187 | :exmp. |
| 188 | |
| 189 | .*---------------------------------------------------------------------* |
| 190 | :h4. Allowed subtyping - float length |
| 191 | .*---------------------------------------------------------------------* |
| 192 | :xmp tab=0. |
| 193 | |
| 194 | <TC - Allowed subtyping - float length> |
| 195 | |
| 196 | <COMPILE> |
| 197 | <VERDICT_LEAF PASS> |
| 198 | <MODULE TTCN Temp Temp.ttcn> |
| 199 | module Temp { |
| 200 | |
| 201 | type float FaultyFloat1 length(10); |
| 202 | type float Float; |
| 203 | type Float FaultyFloat2 length(4); |
| 204 | |
| 205 | } |
| 206 | <END_MODULE> |
| 207 | <RESULT IF_PASS COUNT 2> |
| 208 | (?im)Length.+?subtyping.+?not.+?allowed |
| 209 | <END_RESULT> |
| 210 | <RESULT> |
| 211 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 212 | <END_RESULT> |
| 213 | <RESULT IF_PASS COUNT 2> |
| 214 | (?is)\berror: |
| 215 | <END_RESULT> |
| 216 | <END_TC> |
| 217 | |
| 218 | :exmp. |
| 219 | |
| 220 | .*---------------------------------------------------------------------* |
| 221 | :h4. Allowed subtyping - boolean range |
| 222 | .*---------------------------------------------------------------------* |
| 223 | :xmp tab=0. |
| 224 | |
| 225 | <TC - Allowed subtyping - boolean range> |
| 226 | |
| 227 | <COMPILE> |
| 228 | <VERDICT_LEAF PASS> |
| 229 | <MODULE TTCN Temp Temp.ttcn> |
| 230 | module Temp { |
| 231 | |
| 232 | type boolean FaultyBool1 (false..true); |
| 233 | type boolean Bool; |
| 234 | type Bool FaultyBool2 (false..true); |
| 235 | type boolean FaultyBool3 (true..true); |
| 236 | type boolean FaultyBool4 (true..false); |
| 237 | |
| 238 | } |
| 239 | <END_MODULE> |
| 240 | <RESULT IF_PASS COUNT 4> |
| 241 | (?im)Range.+?subtyping.+?not.+?allowed |
| 242 | <END_RESULT> |
| 243 | <RESULT> |
| 244 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 245 | <END_RESULT> |
| 246 | <RESULT IF_PASS COUNT 4> |
| 247 | (?is)\berror: |
| 248 | <END_RESULT> |
| 249 | <END_TC> |
| 250 | |
| 251 | :exmp. |
| 252 | |
| 253 | .*---------------------------------------------------------------------* |
| 254 | :h4. Allowed subtyping - boolean length |
| 255 | .*---------------------------------------------------------------------* |
| 256 | :xmp tab=0. |
| 257 | |
| 258 | <TC - Allowed subtyping - boolean length> |
| 259 | |
| 260 | <COMPILE> |
| 261 | <VERDICT_LEAF PASS> |
| 262 | <MODULE TTCN Temp Temp.ttcn> |
| 263 | module Temp { |
| 264 | |
| 265 | type boolean FaultyBool1 length(1); |
| 266 | type boolean Bool; |
| 267 | type Bool FaultyBool2 length(2); |
| 268 | |
| 269 | } |
| 270 | <END_MODULE> |
| 271 | <RESULT IF_PASS COUNT 2> |
| 272 | (?im)Length.+?subtyping.+?not.+?allowed |
| 273 | <END_RESULT> |
| 274 | <RESULT> |
| 275 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 276 | <END_RESULT> |
| 277 | <RESULT IF_PASS COUNT 2> |
| 278 | (?is)\berror: |
| 279 | <END_RESULT> |
| 280 | <END_TC> |
| 281 | |
| 282 | :exmp. |
| 283 | |
| 284 | .*---------------------------------------------------------------------* |
| 285 | :h4. Allowed subtyping - objid range |
| 286 | .*---------------------------------------------------------------------* |
| 287 | :xmp tab=0. |
| 288 | |
| 289 | <TC - Allowed subtyping - objid range> |
| 290 | |
| 291 | <COMPILE> |
| 292 | <VERDICT_LEAF PASS> |
| 293 | <MODULE TTCN Temp Temp.ttcn> |
| 294 | module Temp { |
| 295 | |
| 296 | type objid FaultyObjid1 (objid{0 1 2} .. objid{0 1 4}); |
| 297 | type objid Objid; |
| 298 | type Objid FaultyObjid2 (objid{0 1 2} .. objid{0 1 4}); |
| 299 | type objid FaultyObjid3 (objid{0 2 4} .. objid{0 1 2}); |
| 300 | |
| 301 | } |
| 302 | <END_MODULE> |
| 303 | <RESULT IF_PASS COUNT 3> |
| 304 | (?im)subtyping.+?not.+?allowed |
| 305 | <END_RESULT> |
| 306 | <RESULT> |
| 307 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 308 | <END_RESULT> |
| 309 | <RESULT IF_PASS COUNT 3> |
| 310 | (?is)\berror: |
| 311 | <END_RESULT> |
| 312 | <END_TC> |
| 313 | |
| 314 | :exmp. |
| 315 | |
| 316 | .*---------------------------------------------------------------------* |
| 317 | :h4. Allowed subtyping - objid length |
| 318 | .*---------------------------------------------------------------------* |
| 319 | :xmp tab=0. |
| 320 | |
| 321 | <TC - Allowed subtyping - objid length> |
| 322 | |
| 323 | <COMPILE> |
| 324 | <VERDICT_LEAF PASS> |
| 325 | <MODULE TTCN Temp Temp.ttcn> |
| 326 | module Temp { |
| 327 | |
| 328 | type objid FaultyObjid1 length(3); |
| 329 | type objid Objid; |
| 330 | type Objid FaultyObjid2 length(4) |
| 331 | |
| 332 | } |
| 333 | <END_MODULE> |
| 334 | <RESULT IF_PASS COUNT 2> |
| 335 | (?im)subtyping.+?not.+?allowed |
| 336 | <END_RESULT> |
| 337 | <RESULT> |
| 338 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 339 | <END_RESULT> |
| 340 | <RESULT IF_PASS COUNT 2> |
| 341 | (?is)\berror: |
| 342 | <END_RESULT> |
| 343 | <END_TC> |
| 344 | |
| 345 | :exmp. |
| 346 | |
| 347 | .*---------------------------------------------------------------------* |
| 348 | :h4. Allowed subtyping - verdicttype range |
| 349 | .*---------------------------------------------------------------------* |
| 350 | :xmp tab=0. |
| 351 | |
| 352 | <TC - Allowed subtyping - verdicttype range> |
| 353 | |
| 354 | <COMPILE> |
| 355 | <VERDICT_LEAF PASS> |
| 356 | <MODULE TTCN Temp Temp.ttcn> |
| 357 | module Temp { |
| 358 | |
| 359 | type verdicttype FaultyVerdict1 (pass..error); |
| 360 | type verdicttype Verdict; |
| 361 | type verdicttype FaultyVerdict2 (pass..fail); |
| 362 | |
| 363 | } |
| 364 | <END_MODULE> |
| 365 | <RESULT IF_PASS COUNT 2> |
| 366 | (?im)subtyping.+?not.+?allowed |
| 367 | <END_RESULT> |
| 368 | <RESULT> |
| 369 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 370 | <END_RESULT> |
| 371 | <RESULT IF_PASS COUNT 2> |
| 372 | (?is)\berror: |
| 373 | <END_RESULT> |
| 374 | <END_TC> |
| 375 | |
| 376 | :exmp. |
| 377 | |
| 378 | .*---------------------------------------------------------------------* |
| 379 | :h4. Allowed subtyping - verdicttype length |
| 380 | .*---------------------------------------------------------------------* |
| 381 | :xmp tab=0. |
| 382 | |
| 383 | <TC - Allowed subtyping - verdicttype length> |
| 384 | |
| 385 | <COMPILE> |
| 386 | <VERDICT_LEAF PASS> |
| 387 | <MODULE TTCN Temp Temp.ttcn> |
| 388 | module Temp { |
| 389 | |
| 390 | type verdicttype FaultyVerdict1 length(1); |
| 391 | type verdicttype Verdict; |
| 392 | type Verdict FaultyVerdict2 length(2); |
| 393 | |
| 394 | } |
| 395 | <END_MODULE> |
| 396 | <RESULT IF_PASS COUNT 2> |
| 397 | (?im)subtyping.+?not.+?allowed |
| 398 | <END_RESULT> |
| 399 | <RESULT> |
| 400 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 401 | <END_RESULT> |
| 402 | <RESULT IF_PASS COUNT 2> |
| 403 | (?is)\berror: |
| 404 | <END_RESULT> |
| 405 | <END_TC> |
| 406 | |
| 407 | :exmp. |
| 408 | |
| 409 | .*---------------------------------------------------------------------* |
| 410 | :h4. Allowed subtyping - bitstring range |
| 411 | .*---------------------------------------------------------------------* |
| 412 | :xmp tab=0. |
| 413 | |
| 414 | <TC - Allowed subtyping - bitstring range> |
| 415 | |
| 416 | <COMPILE> |
| 417 | <VERDICT_LEAF PASS> |
| 418 | <MODULE TTCN Temp Temp.ttcn> |
| 419 | module Temp { |
| 420 | |
| 421 | type bitstring FaultyBS1 ('0000'B .. '0111'B); |
| 422 | type bitstring BS; |
| 423 | type BS FaultyBS2 ('1000'B .. '1111'B); |
| 424 | |
| 425 | } |
| 426 | <END_MODULE> |
| 427 | <RESULT IF_PASS COUNT 2> |
| 428 | (?im)subtyping.+?not.+?allowed |
| 429 | <END_RESULT> |
| 430 | <RESULT> |
| 431 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 432 | <END_RESULT> |
| 433 | <RESULT IF_PASS COUNT 2> |
| 434 | (?is)\berror: |
| 435 | <END_RESULT> |
| 436 | <END_TC> |
| 437 | |
| 438 | :exmp. |
| 439 | |
| 440 | .*---------------------------------------------------------------------* |
| 441 | :h4. Allowed subtyping - hexstring range |
| 442 | .*---------------------------------------------------------------------* |
| 443 | :xmp tab=0. |
| 444 | |
| 445 | <TC - Allowed subtyping - hexstring range> |
| 446 | |
| 447 | <COMPILE> |
| 448 | <VERDICT_LEAF PASS> |
| 449 | <MODULE TTCN Temp Temp.ttcn> |
| 450 | module Temp { |
| 451 | |
| 452 | type hexstring FaultyHS1 ('000'H .. 'A53'H); |
| 453 | type hexstring HS; |
| 454 | type HS FaultyHS2 ('100'H .. 'FFF'H); |
| 455 | |
| 456 | } |
| 457 | <END_MODULE> |
| 458 | <RESULT IF_PASS COUNT 2> |
| 459 | (?im)subtyping.+?not.+?allowed |
| 460 | <END_RESULT> |
| 461 | <RESULT> |
| 462 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 463 | <END_RESULT> |
| 464 | <RESULT IF_PASS COUNT 2> |
| 465 | (?is)\berror: |
| 466 | <END_RESULT> |
| 467 | <END_TC> |
| 468 | |
| 469 | :exmp. |
| 470 | |
| 471 | .*---------------------------------------------------------------------* |
| 472 | :h4. Allowed subtyping - octetstring range |
| 473 | .*---------------------------------------------------------------------* |
| 474 | :xmp tab=0. |
| 475 | |
| 476 | <TC - Allowed subtyping - octetstring range> |
| 477 | |
| 478 | <COMPILE> |
| 479 | <VERDICT_LEAF PASS> |
| 480 | <MODULE TTCN Temp Temp.ttcn> |
| 481 | module Temp { |
| 482 | |
| 483 | type octetstring FaultyOS1 ('0000'O .. 'AB53'O); |
| 484 | type octetstring OS; |
| 485 | type OS FaultyOS2 ('00'O .. '7F'O); |
| 486 | |
| 487 | } |
| 488 | <END_MODULE> |
| 489 | <RESULT IF_PASS COUNT 2> |
| 490 | (?im)subtyping.+?not.+?allowed |
| 491 | <END_RESULT> |
| 492 | <RESULT> |
| 493 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 494 | <END_RESULT> |
| 495 | <RESULT IF_PASS COUNT 2> |
| 496 | (?is)\berror: |
| 497 | <END_RESULT> |
| 498 | <END_TC> |
| 499 | |
| 500 | :exmp. |
| 501 | |
| 502 | .*---------------------------------------------------------------------* |
| 503 | :h4. Allowed subtyping - record range |
| 504 | .*---------------------------------------------------------------------* |
| 505 | :xmp tab=0. |
| 506 | |
| 507 | <TC - Allowed subtyping - record range> |
| 508 | |
| 509 | <COMPILE> |
| 510 | <VERDICT_LEAF PASS> |
| 511 | <MODULE TTCN Temp Temp.ttcn> |
| 512 | module Temp { |
| 513 | |
| 514 | type record Record { |
| 515 | integer intField, |
| 516 | float floatField |
| 517 | } |
| 518 | |
| 519 | const Record c_lower := {0, 0.0}; |
| 520 | const Record c_upper := {10, 10.0}; |
| 521 | |
| 522 | type Record FaultyRecord1 (0 .. 10); |
| 523 | type Record FaultyRecord2 (c_lower .. c_upper); |
| 524 | |
| 525 | } |
| 526 | <END_MODULE> |
| 527 | <RESULT IF_PASS COUNT 2> |
| 528 | (?im)subtyping.+?not.+?allowed |
| 529 | <END_RESULT> |
| 530 | <RESULT IF_PASS COUNT 1> |
| 531 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 532 | <END_RESULT> |
| 533 | <RESULT IF_PASS COUNT 2> |
| 534 | (?is)\berror: |
| 535 | <END_RESULT> |
| 536 | <END_TC> |
| 537 | |
| 538 | :exmp. |
| 539 | |
| 540 | .*---------------------------------------------------------------------* |
| 541 | :h4. Allowed subtyping - record length |
| 542 | .*---------------------------------------------------------------------* |
| 543 | :xmp tab=0. |
| 544 | |
| 545 | <TC - Allowed subtyping - record length> |
| 546 | |
| 547 | <COMPILE> |
| 548 | <VERDICT_LEAF PASS> |
| 549 | <MODULE TTCN Temp Temp.ttcn> |
| 550 | module Temp { |
| 551 | |
| 552 | type record Record { |
| 553 | integer intField, |
| 554 | float floatField |
| 555 | } |
| 556 | type Record FaultyRecord length(12); |
| 557 | |
| 558 | } |
| 559 | <END_MODULE> |
| 560 | <RESULT IF_PASS COUNT 1> |
| 561 | (?im)subtyping.+?not.+?allowed |
| 562 | <END_RESULT> |
| 563 | <RESULT IF_PASS COUNT 1> |
| 564 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 565 | <END_RESULT> |
| 566 | <RESULT IF_PASS COUNT 1> |
| 567 | (?is)\berror: |
| 568 | <END_RESULT> |
| 569 | <END_TC> |
| 570 | |
| 571 | :exmp. |
| 572 | |
| 573 | .*---------------------------------------------------------------------* |
| 574 | :h4. Allowed subtyping - record of range |
| 575 | .*---------------------------------------------------------------------* |
| 576 | :xmp tab=0. |
| 577 | |
| 578 | <TC - Allowed subtyping - record of range> |
| 579 | |
| 580 | <COMPILE> |
| 581 | <VERDICT_LEAF PASS> |
| 582 | <MODULE TTCN Temp Temp.ttcn> |
| 583 | module Temp { |
| 584 | |
| 585 | type record of integer RecordOfInt; |
| 586 | |
| 587 | const RecordOfInt c_lower := {0, 0}; |
| 588 | const RecordOfInt c_upper := {10, 10}; |
| 589 | |
| 590 | type RecordOfInt FaultyRecordOfInt1 (0 .. 10); |
| 591 | type RecordOfInt FaultyRecordOfInt2 (c_lower .. c_upper); |
| 592 | |
| 593 | } |
| 594 | <END_MODULE> |
| 595 | <RESULT IF_PASS COUNT 2> |
| 596 | (?im)subtyping.+?not.+?allowed |
| 597 | <END_RESULT> |
| 598 | <RESULT IF_PASS COUNT 1> |
| 599 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 600 | <END_RESULT> |
| 601 | <RESULT IF_PASS COUNT 2> |
| 602 | (?is)\berror: |
| 603 | <END_RESULT> |
| 604 | <END_TC> |
| 605 | |
| 606 | :exmp. |
| 607 | |
| 608 | .*---------------------------------------------------------------------* |
| 609 | :h4. Allowed subtyping - set range |
| 610 | .*---------------------------------------------------------------------* |
| 611 | :xmp tab=0. |
| 612 | |
| 613 | <TC - Allowed subtyping - set range> |
| 614 | |
| 615 | <COMPILE> |
| 616 | <VERDICT_LEAF PASS> |
| 617 | <MODULE TTCN Temp Temp.ttcn> |
| 618 | module Temp { |
| 619 | |
| 620 | type set Set { |
| 621 | integer intField, |
| 622 | float floatField |
| 623 | } |
| 624 | |
| 625 | const Set c_lower := {0, 0.0}; |
| 626 | const Set c_upper := {10, 10.0}; |
| 627 | |
| 628 | type Set FaultySet1 (0 .. 10); |
| 629 | type Set FaultySet2 (c_lower .. c_upper); |
| 630 | |
| 631 | } |
| 632 | <END_MODULE> |
| 633 | <RESULT IF_PASS COUNT 2> |
| 634 | (?im)Value.+?list.+?notation.+?cannot.+?used |
| 635 | <END_RESULT> |
| 636 | <RESULT IF_PASS COUNT 2> |
| 637 | (?im)subtyping.+?not.+?allowed |
| 638 | <END_RESULT> |
| 639 | <RESULT IF_PASS COUNT 1> |
| 640 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 641 | <END_RESULT> |
| 642 | <RESULT IF_PASS COUNT 4> |
| 643 | (?is)\berror: |
| 644 | <END_RESULT> |
| 645 | <END_TC> |
| 646 | |
| 647 | :exmp. |
| 648 | |
| 649 | .*---------------------------------------------------------------------* |
| 650 | :h4. Allowed subtyping - set length |
| 651 | .*---------------------------------------------------------------------* |
| 652 | :xmp tab=0. |
| 653 | |
| 654 | <TC - Allowed subtyping - set length> |
| 655 | |
| 656 | <COMPILE> |
| 657 | <VERDICT_LEAF PASS> |
| 658 | <MODULE TTCN Temp Temp.ttcn> |
| 659 | module Temp { |
| 660 | |
| 661 | type set Set { |
| 662 | integer intField, |
| 663 | float floatField |
| 664 | } |
| 665 | type Set FaultySet length(12); |
| 666 | |
| 667 | } |
| 668 | <END_MODULE> |
| 669 | <RESULT IF_PASS COUNT 1> |
| 670 | (?im)subtyping.+?not.+?allowed |
| 671 | <END_RESULT> |
| 672 | <RESULT IF_PASS COUNT 1> |
| 673 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 674 | <END_RESULT> |
| 675 | <RESULT IF_PASS COUNT 1> |
| 676 | (?is)\berror: |
| 677 | <END_RESULT> |
| 678 | <END_TC> |
| 679 | |
| 680 | :exmp. |
| 681 | |
| 682 | .*---------------------------------------------------------------------* |
| 683 | :h4. Allowed subtyping - set of range |
| 684 | .*---------------------------------------------------------------------* |
| 685 | :xmp tab=0. |
| 686 | |
| 687 | <TC - Allowed subtyping - set of range> |
| 688 | |
| 689 | <COMPILE> |
| 690 | <VERDICT_LEAF PASS> |
| 691 | <MODULE TTCN Temp Temp.ttcn> |
| 692 | module Temp { |
| 693 | |
| 694 | type set of integer SetOfInt; |
| 695 | |
| 696 | const SetOfInt c_lower := {0, 0}; |
| 697 | const SetOfInt c_upper := {10, 10}; |
| 698 | |
| 699 | type SetOfInt FaultySetOfInt1 (0 .. 10); |
| 700 | type SetOfInt FaultySetOfInt2 (c_lower .. c_upper); |
| 701 | |
| 702 | } |
| 703 | <END_MODULE> |
| 704 | <RESULT IF_PASS COUNT 2> |
| 705 | (?im)subtyping.+?not.+?allowed |
| 706 | <END_RESULT> |
| 707 | <RESULT IF_PASS COUNT 1> |
| 708 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 709 | <END_RESULT> |
| 710 | <RESULT IF_PASS COUNT 2> |
| 711 | (?is)\berror: |
| 712 | <END_RESULT> |
| 713 | <END_TC> |
| 714 | |
| 715 | :exmp. |
| 716 | |
| 717 | .*---------------------------------------------------------------------* |
| 718 | :h4. Allowed subtyping - enumerated range |
| 719 | .*---------------------------------------------------------------------* |
| 720 | :xmp tab=0. |
| 721 | |
| 722 | <TC - Allowed subtyping - enumerated range> |
| 723 | |
| 724 | <COMPILE> |
| 725 | <VERDICT_LEAF PASS> |
| 726 | <MODULE TTCN Temp Temp.ttcn> |
| 727 | module Temp { |
| 728 | |
| 729 | type enumerated Enum { EnumValue0(0), EnumValue1(1), EnumValue2(2), EnumValue3(3) }; |
| 730 | type Enum FaultyEnum1 (0..2); |
| 731 | type Enum FaultyEnum2 (EnumValue0..EnumValue2); |
| 732 | |
| 733 | } |
| 734 | <END_MODULE> |
| 735 | <RESULT IF_PASS COUNT 2> |
| 736 | (?im)subtyping.+?not.+?allowed |
| 737 | <END_RESULT> |
| 738 | <RESULT IF_PASS COUNT 1> |
| 739 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 740 | <END_RESULT> |
| 741 | <RESULT IF_PASS COUNT 2> |
| 742 | (?is)\berror: |
| 743 | <END_RESULT> |
| 744 | <END_TC> |
| 745 | |
| 746 | :exmp. |
| 747 | |
| 748 | .*---------------------------------------------------------------------* |
| 749 | :h4. Allowed subtyping - enumerated length |
| 750 | .*---------------------------------------------------------------------* |
| 751 | :xmp tab=0. |
| 752 | |
| 753 | <TC - Allowed subtyping - enumerated length> |
| 754 | |
| 755 | <COMPILE> |
| 756 | <VERDICT_LEAF PASS> |
| 757 | <MODULE TTCN Temp Temp.ttcn> |
| 758 | module Temp { |
| 759 | |
| 760 | type enumerated Enum { EnumValue0(0), EnumValue1(1), EnumValue2(2), EnumValue3(3) }; |
| 761 | type Enum FaultyEnum length(4); |
| 762 | |
| 763 | } |
| 764 | <END_MODULE> |
| 765 | <RESULT IF_PASS COUNT 1> |
| 766 | (?im)subtyping.+?not.+?allowed |
| 767 | <END_RESULT> |
| 768 | <RESULT IF_PASS COUNT 1> |
| 769 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 770 | <END_RESULT> |
| 771 | <RESULT IF_PASS COUNT 1> |
| 772 | (?is)\berror: |
| 773 | <END_RESULT> |
| 774 | <END_TC> |
| 775 | |
| 776 | :exmp. |
| 777 | |
| 778 | .*---------------------------------------------------------------------* |
| 779 | :h4. Allowed subtyping - union range |
| 780 | .*---------------------------------------------------------------------* |
| 781 | :xmp tab=0. |
| 782 | |
| 783 | <TC - Allowed subtyping - union range> |
| 784 | |
| 785 | <COMPILE> |
| 786 | <VERDICT_LEAF PASS> |
| 787 | <MODULE TTCN Temp Temp.ttcn> |
| 788 | module Temp { |
| 789 | |
| 790 | type union Union { |
| 791 | integer intField, |
| 792 | float floatField |
| 793 | } |
| 794 | |
| 795 | const Union c_lower := {intField := 0}; |
| 796 | const Union c_upper := {intField := 10}; |
| 797 | |
| 798 | type Union FaultyUnion1 (0 .. 10); |
| 799 | type Union FaultyUnion2 (c_record_lower .. c_record_upper); |
| 800 | |
| 801 | } |
| 802 | <END_MODULE> |
| 803 | <RESULT IF_PASS COUNT 2> |
| 804 | (?im)subtyping.+?not.+?allowed |
| 805 | <END_RESULT> |
| 806 | <RESULT IF_PASS COUNT 1> |
| 807 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 808 | <END_RESULT> |
| 809 | <RESULT IF_PASS COUNT 2> |
| 810 | (?is)\berror: |
| 811 | <END_RESULT> |
| 812 | <END_TC> |
| 813 | |
| 814 | :exmp. |
| 815 | |
| 816 | .*---------------------------------------------------------------------* |
| 817 | :h4. Allowed subtyping - union length |
| 818 | .*---------------------------------------------------------------------* |
| 819 | :xmp tab=0. |
| 820 | |
| 821 | <TC - Allowed subtyping - union length> |
| 822 | |
| 823 | <COMPILE> |
| 824 | <VERDICT_LEAF PASS> |
| 825 | <MODULE TTCN Temp Temp.ttcn> |
| 826 | module Temp { |
| 827 | |
| 828 | type union Union { |
| 829 | integer intField, |
| 830 | float floatField |
| 831 | } |
| 832 | type Union FaultyUnion length(8); |
| 833 | |
| 834 | } |
| 835 | <END_MODULE> |
| 836 | <RESULT IF_PASS COUNT 1> |
| 837 | (?im)subtyping.+?not.+?allowed |
| 838 | <END_RESULT> |
| 839 | <RESULT IF_PASS COUNT 1> |
| 840 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 841 | <END_RESULT> |
| 842 | <RESULT IF_PASS COUNT 1> |
| 843 | (?is)\berror: |
| 844 | <END_RESULT> |
| 845 | <END_TC> |
| 846 | |
| 847 | :exmp. |
| 848 | |
| 849 | .*---------------------------------------------------------------------* |
| 850 | :h4. TTCN-3::FunctionReference->Subtyping: length |
| 851 | .*---------------------------------------------------------------------* |
| 852 | :xmp tab=0. |
| 853 | <TC - TTCN-3::FunctionReference->Subtyping: length> |
| 854 | <COMPILE> |
| 855 | <VERDICT_LEAF FAIL> |
| 856 | <MODULE TTCN Temp Temp.ttcn> |
| 857 | module Temp { |
| 858 | type function fntype() length(10); |
| 859 | } |
| 860 | <END_MODULE> |
| 861 | <RESULT IF_FAIL COUNT 1> |
| 862 | (?im)\berror\b.+?syntax.+?error |
| 863 | <END_RESULT> |
| 864 | <RESULT IF_FAIL POSITIVE> |
| 865 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 866 | <END_RESULT> |
| 867 | <END_TC> |
| 868 | :exmp. |
| 869 | |
| 870 | .*---------------------------------------------------------------------* |
| 871 | :h4. TTCN-3::FunctionReference->Subtyping: range |
| 872 | .*---------------------------------------------------------------------* |
| 873 | :xmp tab=0. |
| 874 | <TC - TTCN-3::FunctionReference->Subtyping: range> |
| 875 | <COMPILE> |
| 876 | <VERDICT_LEAF FAIL> |
| 877 | <MODULE TTCN Temp Temp.ttcn> |
| 878 | module Temp { |
| 879 | function fn1() { } |
| 880 | function fn2() { } |
| 881 | function fn3() { } |
| 882 | type function fntype() (fn1..fn3); |
| 883 | } |
| 884 | <END_MODULE> |
| 885 | <RESULT IF_FAIL COUNT 1> |
| 886 | (?im)\berror\b.+?syntax.+?error |
| 887 | <END_RESULT> |
| 888 | <RESULT IF_FAIL POSITIVE> |
| 889 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 890 | <END_RESULT> |
| 891 | <END_TC> |
| 892 | :exmp. |
| 893 | |
| 894 | .*---------------------------------------------------------------------* |
| 895 | :h3.True subset |
| 896 | .*---------------------------------------------------------------------* |
| 897 | |
| 898 | This test case group covers the requirement SA-6/2. |
| 899 | |
| 900 | Strategy: the values in the list shall be a true subset of the values defined by the root type |
| 901 | All occurances shall be tested, where such a notation can be used. |
| 902 | |
| 903 | .*---------------------------------------------------------------------* |
| 904 | :h3.Mixing different subset notations |
| 905 | .*---------------------------------------------------------------------* |
| 906 | |
| 907 | This test case group covers the requirement SA-6/3. |
| 908 | |
| 909 | Strategy: Mixing different subset notations is not allowed for the specific type |
| 910 | All occurances shall be tested, where such a notation can be used. |
| 911 | |
| 912 | .*---------------------------------------------------------------------* |
| 913 | :h3.Invalid subset notation |
| 914 | .*---------------------------------------------------------------------* |
| 915 | |
| 916 | This test case group covers the requirement SA-6/4. |
| 917 | |
| 918 | Strategy: the value notation used for subtyping is invalid due to: |
| 919 | :list. |
| 920 | :li D='-'.duplicated element in a list of values |
| 921 | :li D='-'.ranges/lists have intersection (common elements) |
| 922 | :li D='-'.lower boundary is greater than upper boundary |
| 923 | :li D='-'.the boundaries shall evaluate to valid character positions according to the coded character set table(s) of the type (for example the given position shall not be empty) |
| 924 | :elist. |
| 925 | All occurances shall be tested, where such a notation can be used. |
| 926 | |
| 927 | .*---------------------------------------------------------------------* |
| 928 | :h2.Value notations |
| 929 | .*---------------------------------------------------------------------* |
| 930 | .*---------------------------------------------------------------------* |
| 931 | :h3.Mixing value notations |
| 932 | .*---------------------------------------------------------------------* |
| 933 | |
| 934 | This test case group covers the requirement SA-6/5. |
| 935 | |
| 936 | Strategy: check that mixing assignment and value notations are detected |
| 937 | for all types that allow the usage of at least one of the notations |
| 938 | (that is value, assignment). All occurances shall be tested, where |
| 939 | such a notation can be used. |
| 940 | |
| 941 | Tested: - record and set in function |
| 942 | |
| 943 | TODO: only a couple of TCs are written, this shall be implemented ones the SA performs the checking and not the parser. |
| 944 | |
| 945 | .*---------------------------------------------------------------------* |
| 946 | :h4.Mixing value notations - assignment notation in value list (record const in function) |
| 947 | .*---------------------------------------------------------------------* |
| 948 | :xmp tab=0. |
| 949 | <TC - Mixing value notations - assignment notation in value list (record const in function)> |
| 950 | <COMPILE> |
| 951 | <VERDICT_LEAF FAIL> |
| 952 | <MODULE TTCN x x.ttcn> |
| 953 | module x { |
| 954 | |
| 955 | type record Record { |
| 956 | integer I, |
| 957 | float F, |
| 958 | charstring CS |
| 959 | } |
| 960 | function MyFunc() { |
| 961 | // NOTE: catched by the parser |
| 962 | // TR 709: Not allowed value notation reporting |
| 963 | var Record FaultyRecord := { 10, F:= 0.0, "error" }; |
| 964 | } |
| 965 | |
| 966 | } |
| 967 | <END_MODULE> |
| 968 | <RESULT IF_FAIL COUNT 1> |
| 969 | (?im)\berror\b.+?syntax.+?error.+?unexpected.+?:= |
| 970 | <END_RESULT> |
| 971 | <END_TC> |
| 972 | :exmp. |
| 973 | |
| 974 | .*---------------------------------------------------------------------* |
| 975 | :h4.Mixing value notations - assignment notation in value list (set const in function) |
| 976 | .*---------------------------------------------------------------------* |
| 977 | :xmp tab=0. |
| 978 | <TC - Mixing value notations - assignment notation in value list (set const in function)> |
| 979 | <COMPILE> |
| 980 | <VERDICT_LEAF FAIL> |
| 981 | <MODULE TTCN x x.ttcn> |
| 982 | module x { |
| 983 | |
| 984 | type set setType { |
| 985 | integer I, |
| 986 | float F, |
| 987 | charstring CS |
| 988 | } |
| 989 | function MyFunc() { |
| 990 | // NOTE: catched by the parser |
| 991 | // TR 709: Not allowed value notation reporting |
| 992 | const setType s := { 10, F:= 0.0, "error" }; |
| 993 | } |
| 994 | |
| 995 | } |
| 996 | |
| 997 | <END_MODULE> |
| 998 | <RESULT IF_FAIL COUNT 1> |
| 999 | (?im)\berror\b.+?syntax.+?error.+?unexpected.+?:= |
| 1000 | <END_RESULT> |
| 1001 | <END_TC> |
| 1002 | :exmp. |
| 1003 | |
| 1004 | .*---------------------------------------------------------------------* |
| 1005 | :h3.Allowed value notations |
| 1006 | .*---------------------------------------------------------------------* |
| 1007 | |
| 1008 | This test case group covers the requirement SA-6/6. |
| 1009 | |
| 1010 | Startegy: |
| 1011 | All occurances shall be tested, where such a notation can be used: |
| 1012 | :list. |
| 1013 | :li D='-'.in constants and variables |
| 1014 | :li D='-'.in templates (static, modified, dynamic) |
| 1015 | :elist. |
| 1016 | All elements in the tables below are tested in 2 situations (whenever it is allowed): |
| 1017 | in module definition part and within a function. |
| 1018 | |
| 1019 | :xmp tab=0. |
| 1020 | :nl.for constants and variables: |
| 1021 | :nl.================================================================================= |
| 1022 | :nl. type assignment | value list | array | value assignment notation |
| 1023 | :nl.================================================================================= |
| 1024 | :nl.basic types T T O T |
| 1025 | :nl.--------------------------------------------------------------------------------- |
| 1026 | :nl.string types T T - T |
| 1027 | :nl.--------------------------------------------------------------------------------- |
| 1028 | :nl.record - - O O |
| 1029 | :nl.--------------------------------------------------------------------------------- |
| 1030 | :nl.set - O O O |
| 1031 | :nl.--------------------------------------------------------------------------------- |
| 1032 | :nl.union - T O O |
| 1033 | :nl.--------------------------------------------------------------------------------- |
| 1034 | :nl.record of T - - O |
| 1035 | :nl.--------------------------------------------------------------------------------- |
| 1036 | :nl.set of T - - O |
| 1037 | :nl.--------------------------------------------------------------------------------- |
| 1038 | :nl.enumerated T T O T |
| 1039 | :nl.--------------------------------------------------------------------------------- |
| 1040 | :nl. |
| 1041 | :nl.for templates and dynamic templates: |
| 1042 | :nl.================================================================================= |
| 1043 | :nl. type assignment | value list | array | value assignment notation |
| 1044 | :nl.================================================================================= |
| 1045 | :nl.basic types T T O T |
| 1046 | :nl.--------------------------------------------------------------------------------- |
| 1047 | :nl.string types T T - T |
| 1048 | :nl.--------------------------------------------------------------------------------- |
| 1049 | :nl.record - - O O |
| 1050 | :nl.--------------------------------------------------------------------------------- |
| 1051 | :nl.set - O O O |
| 1052 | :nl.--------------------------------------------------------------------------------- |
| 1053 | :nl.union - T O O |
| 1054 | :nl.--------------------------------------------------------------------------------- |
| 1055 | :nl.record of T - - O |
| 1056 | :nl.--------------------------------------------------------------------------------- |
| 1057 | :nl.set of T - - O |
| 1058 | :nl.--------------------------------------------------------------------------------- |
| 1059 | :nl.enumerated T T O T |
| 1060 | :nl.--------------------------------------------------------------------------------- |
| 1061 | :nl. |
| 1062 | :nl.for modified templates: |
| 1063 | :nl.================================================================================= |
| 1064 | :nl. type assignment | value list | value assignment notation |
| 1065 | :nl.================================================================================= |
| 1066 | :nl.basic types T T T |
| 1067 | :nl.--------------------------------------------------------------------------------- |
| 1068 | :nl.string types T T T |
| 1069 | :nl.--------------------------------------------------------------------------------- |
| 1070 | :nl.record - - O |
| 1071 | :nl.--------------------------------------------------------------------------------- |
| 1072 | :nl.set - O O |
| 1073 | :nl.--------------------------------------------------------------------------------- |
| 1074 | :nl.union - T O |
| 1075 | :nl.--------------------------------------------------------------------------------- |
| 1076 | :nl.record of T - - |
| 1077 | :nl.--------------------------------------------------------------------------------- |
| 1078 | :nl.set of T - O |
| 1079 | :nl.--------------------------------------------------------------------------------- |
| 1080 | :nl.enumerated T T T |
| 1081 | :nl.--------------------------------------------------------------------------------- |
| 1082 | :nl.(array notation is not used for modified templates) |
| 1083 | :nl. |
| 1084 | :exmp. |
| 1085 | |
| 1086 | basic types: integer, float, boolean, objid, verdicttype, anytype, address, port, component, default |
| 1087 | string types: bitstring, hexstring, charstring, octetstring, universal charstring |
| 1088 | |
| 1089 | T: type compatibility error, shall not be tested here |
| 1090 | :nl.O: semantic error, shall be tested here |
| 1091 | :nl.-: allowed, so cannot be negative-tested |
| 1092 | |
| 1093 | Tested: The upper tables for: |
| 1094 | :list. |
| 1095 | :li D='-'.constants in definition part and function |
| 1096 | :li D='-'.templates in definition part |
| 1097 | :elist. |
| 1098 | |
| 1099 | TODO: - Dinamic template tests are not ready. |
| 1100 | |
| 1101 | NOTE: |
| 1102 | :nl.- type "anytype" haven't implemented yet. Can't use array notation for type "port". |
| 1103 | :nl.- the type "address" in the TITAN implementation is a user defined type, so we won't test it. |
| 1104 | |
| 1105 | .*---------------------------------------------------------------------* |
| 1106 | :h4.Allowed value notations - array notation (const integer in def. part) |
| 1107 | .*---------------------------------------------------------------------* |
| 1108 | :xmp tab=0. |
| 1109 | <TC - Allowed value notations - array notation (const integer in def. part)> |
| 1110 | <COMPILE> |
| 1111 | <VERDICT_LEAF PASS> |
| 1112 | <MODULE TTCN x x.ttcn> |
| 1113 | module x{ |
| 1114 | |
| 1115 | const integer r:= 233; |
| 1116 | |
| 1117 | const integer f:= r[0]; |
| 1118 | |
| 1119 | } |
| 1120 | <END_MODULE> |
| 1121 | <RESULT IF_PASS COUNT 1> |
| 1122 | (?im)Type.+?cannot.+?be.+?indexed |
| 1123 | <END_RESULT> |
| 1124 | <RESULT IF_PASS COUNT 1> |
| 1125 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 1126 | <END_RESULT> |
| 1127 | <RESULT IF_PASS COUNT 1> |
| 1128 | (?is)\berror: |
| 1129 | <END_RESULT> |
| 1130 | <END_TC> |
| 1131 | :exmp. |
| 1132 | |
| 1133 | .*---------------------------------------------------------------------* |
| 1134 | :h4.Allowed value notations - array notation (const integer in function) |
| 1135 | .*---------------------------------------------------------------------* |
| 1136 | :xmp tab=0. |
| 1137 | <TC - Allowed value notations - array notation (const integer in function)> |
| 1138 | <COMPILE> |
| 1139 | <VERDICT_LEAF PASS> |
| 1140 | <MODULE TTCN x x.ttcn> |
| 1141 | module x{ |
| 1142 | |
| 1143 | function myFunct(){ |
| 1144 | const integer r:= 233; |
| 1145 | const integer f:= r[0]; |
| 1146 | } |
| 1147 | } |
| 1148 | <END_MODULE> |
| 1149 | <RESULT IF_PASS COUNT 1> |
| 1150 | (?im)Type.+?cannot.+?be.+?indexed |
| 1151 | <END_RESULT> |
| 1152 | <RESULT IF_PASS COUNT 1> |
| 1153 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 1154 | <END_RESULT> |
| 1155 | <RESULT IF_PASS COUNT 1> |
| 1156 | (?is)\berror: |
| 1157 | <END_RESULT> |
| 1158 | <END_TC> |
| 1159 | :exmp. |
| 1160 | |
| 1161 | .*---------------------------------------------------------------------* |
| 1162 | :h4.Allowed value notations - array notation (template integer in def. part) |
| 1163 | .*---------------------------------------------------------------------* |
| 1164 | :xmp tab=0. |
| 1165 | <TC - Allowed value notations - array notation (template integer in def. part)> |
| 1166 | <COMPILE> |
| 1167 | <VERDICT_LEAF PASS> |
| 1168 | <MODULE TTCN x x.ttcn> |
| 1169 | module x{ |
| 1170 | |
| 1171 | template integer r:= 233; |
| 1172 | template integer f:= r[0]; |
| 1173 | |
| 1174 | } |
| 1175 | <END_MODULE> |
| 1176 | <RESULT IF_PASS COUNT 1> |
| 1177 | (?im)Type.+?cannot.+?be.+?indexed |
| 1178 | <END_RESULT> |
| 1179 | <RESULT IF_PASS COUNT 1> |
| 1180 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 1181 | <END_RESULT> |
| 1182 | <RESULT IF_PASS COUNT 1> |
| 1183 | (?is)\berror: |
| 1184 | <END_RESULT> |
| 1185 | <END_TC> |
| 1186 | :exmp. |
| 1187 | |
| 1188 | .*---------------------------------------------------------------------* |
| 1189 | :h4.Allowed value notations - array notation (const float in def. part) |
| 1190 | .*---------------------------------------------------------------------* |
| 1191 | :xmp tab=0. |
| 1192 | <TC - Allowed value notations - array notation (const float in def. part)> |
| 1193 | <COMPILE> |
| 1194 | <VERDICT_LEAF PASS> |
| 1195 | <MODULE TTCN x x.ttcn> |
| 1196 | module x{ |
| 1197 | |
| 1198 | const float r:= 23.3; |
| 1199 | |
| 1200 | const float f:= r[0]; |
| 1201 | |
| 1202 | } |
| 1203 | |
| 1204 | <END_MODULE> |
| 1205 | <RESULT IF_PASS COUNT 1> |
| 1206 | (?im)Type.+?cannot.+?be.+?indexed |
| 1207 | <END_RESULT> |
| 1208 | <RESULT IF_PASS COUNT 1> |
| 1209 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 1210 | <END_RESULT> |
| 1211 | <RESULT IF_PASS COUNT 1> |
| 1212 | (?is)\berror: |
| 1213 | <END_RESULT> |
| 1214 | <END_TC> |
| 1215 | :exmp. |
| 1216 | |
| 1217 | .*---------------------------------------------------------------------* |
| 1218 | :h4.Allowed value notations - array notation (const float in function) |
| 1219 | .*---------------------------------------------------------------------* |
| 1220 | :xmp tab=0. |
| 1221 | <TC - Allowed value notations - array notation (const float in function)> |
| 1222 | <COMPILE> |
| 1223 | <VERDICT_LEAF PASS> |
| 1224 | <MODULE TTCN x x.ttcn> |
| 1225 | module x{ |
| 1226 | |
| 1227 | function myFunct(){ |
| 1228 | const float r:= 23.3; |
| 1229 | const float f:= r[0]; |
| 1230 | } |
| 1231 | } |
| 1232 | |
| 1233 | <END_MODULE> |
| 1234 | <RESULT IF_PASS COUNT 1> |
| 1235 | (?im)Type.+?cannot.+?be.+?indexed |
| 1236 | <END_RESULT> |
| 1237 | <RESULT IF_PASS COUNT 1> |
| 1238 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 1239 | <END_RESULT> |
| 1240 | <RESULT IF_PASS COUNT 1> |
| 1241 | (?is)\berror: |
| 1242 | <END_RESULT> |
| 1243 | <END_TC> |
| 1244 | :exmp. |
| 1245 | |
| 1246 | .*---------------------------------------------------------------------* |
| 1247 | :h4.Allowed value notations - array notation (template float in def. part) |
| 1248 | .*---------------------------------------------------------------------* |
| 1249 | :xmp tab=0. |
| 1250 | <TC - Allowed value notations - array notation (template float in def. part)> |
| 1251 | <COMPILE> |
| 1252 | <VERDICT_LEAF PASS> |
| 1253 | <MODULE TTCN x x.ttcn> |
| 1254 | module x{ |
| 1255 | |
| 1256 | template float r:= 23.3; |
| 1257 | |
| 1258 | template float f:= r[0]; |
| 1259 | |
| 1260 | } |
| 1261 | |
| 1262 | <END_MODULE> |
| 1263 | <RESULT IF_PASS COUNT 1> |
| 1264 | (?im)Type.+?cannot.+?be.+?indexed |
| 1265 | <END_RESULT> |
| 1266 | <RESULT IF_PASS COUNT 1> |
| 1267 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 1268 | <END_RESULT> |
| 1269 | <RESULT IF_PASS COUNT 1> |
| 1270 | (?is)\berror: |
| 1271 | <END_RESULT> |
| 1272 | <END_TC> |
| 1273 | :exmp. |
| 1274 | |
| 1275 | .*---------------------------------------------------------------------* |
| 1276 | :h4.Allowed value notations - array notation (const boolean in def. part) |
| 1277 | .*---------------------------------------------------------------------* |
| 1278 | :xmp tab=0. |
| 1279 | <TC - Allowed value notations - array notation (const boolean in def. part)> |
| 1280 | <COMPILE> |
| 1281 | <VERDICT_LEAF PASS> |
| 1282 | <MODULE TTCN x x.ttcn> |
| 1283 | module x{ |
| 1284 | |
| 1285 | const boolean r:= true; |
| 1286 | |
| 1287 | const boolean f:= r[0]; |
| 1288 | |
| 1289 | } |
| 1290 | |
| 1291 | <END_MODULE> |
| 1292 | <RESULT IF_PASS COUNT 1> |
| 1293 | (?im)Type.+?cannot.+?be.+?indexed |
| 1294 | <END_RESULT> |
| 1295 | <RESULT IF_PASS COUNT 1> |
| 1296 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 1297 | <END_RESULT> |
| 1298 | <RESULT IF_PASS COUNT 1> |
| 1299 | (?is)\berror: |
| 1300 | <END_RESULT> |
| 1301 | <END_TC> |
| 1302 | :exmp. |
| 1303 | |
| 1304 | .*---------------------------------------------------------------------* |
| 1305 | :h4.Allowed value notations - array notation (const boolean in function) |
| 1306 | .*---------------------------------------------------------------------* |
| 1307 | :xmp tab=0. |
| 1308 | <TC - Allowed value notations - array notation (const boolean in function)> |
| 1309 | <COMPILE> |
| 1310 | <VERDICT_LEAF PASS> |
| 1311 | <MODULE TTCN x x.ttcn> |
| 1312 | module x{ |
| 1313 | |
| 1314 | function myFunct(){ |
| 1315 | const boolean r:= true; |
| 1316 | const boolean f:= r[0]; |
| 1317 | } |
| 1318 | } |
| 1319 | |
| 1320 | <END_MODULE> |
| 1321 | <RESULT IF_PASS COUNT 1> |
| 1322 | (?im)Type.+?cannot.+?be.+?indexed |
| 1323 | <END_RESULT> |
| 1324 | <RESULT IF_PASS COUNT 1> |
| 1325 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 1326 | <END_RESULT> |
| 1327 | <RESULT IF_PASS COUNT 1> |
| 1328 | (?is)\berror: |
| 1329 | <END_RESULT> |
| 1330 | <END_TC> |
| 1331 | :exmp. |
| 1332 | |
| 1333 | .*---------------------------------------------------------------------* |
| 1334 | :h4.Allowed value notations - array notation (template boolean in def. part) |
| 1335 | .*---------------------------------------------------------------------* |
| 1336 | :xmp tab=0. |
| 1337 | <TC - Allowed value notations - array notation (template boolean in def. part)> |
| 1338 | <COMPILE> |
| 1339 | <VERDICT_LEAF PASS> |
| 1340 | <MODULE TTCN x x.ttcn> |
| 1341 | module x{ |
| 1342 | |
| 1343 | template boolean r:= true; |
| 1344 | |
| 1345 | template boolean f:= r[0]; |
| 1346 | |
| 1347 | } |
| 1348 | |
| 1349 | <END_MODULE> |
| 1350 | <RESULT IF_PASS COUNT 1> |
| 1351 | (?im)Type.+?cannot.+?be.+?indexed |
| 1352 | <END_RESULT> |
| 1353 | <RESULT IF_PASS COUNT 1> |
| 1354 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 1355 | <END_RESULT> |
| 1356 | <RESULT IF_PASS COUNT 1> |
| 1357 | (?is)\berror: |
| 1358 | <END_RESULT> |
| 1359 | <END_TC> |
| 1360 | :exmp. |
| 1361 | |
| 1362 | .*---------------------------------------------------------------------* |
| 1363 | :h4.Allowed value notations - array notation (const objid in def. part) |
| 1364 | .*---------------------------------------------------------------------* |
| 1365 | :xmp tab=0. |
| 1366 | <TC - Allowed value notations - array notation (const objid in def. part)> |
| 1367 | <COMPILE> |
| 1368 | <VERDICT_LEAF PASS> |
| 1369 | <MODULE TTCN x x.ttcn> |
| 1370 | module x{ |
| 1371 | |
| 1372 | const objid r:= objid{ 0 4 }; |
| 1373 | |
| 1374 | const objid f:= r[0]; |
| 1375 | |
| 1376 | } |
| 1377 | |
| 1378 | <END_MODULE> |
| 1379 | <RESULT IF_PASS COUNT 1> |
| 1380 | (?im)Type.+?cannot.+?be.+?indexed |
| 1381 | <END_RESULT> |
| 1382 | <RESULT IF_PASS COUNT 1> |
| 1383 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 1384 | <END_RESULT> |
| 1385 | <RESULT IF_PASS COUNT 1> |
| 1386 | (?is)\berror: |
| 1387 | <END_RESULT> |
| 1388 | <END_TC> |
| 1389 | :exmp. |
| 1390 | |
| 1391 | .*---------------------------------------------------------------------* |
| 1392 | :h4.Allowed value notations - array notation (const objid in function) |
| 1393 | .*---------------------------------------------------------------------* |
| 1394 | :xmp tab=0. |
| 1395 | <TC - Allowed value notations - array notation (const objid in function)> |
| 1396 | <COMPILE> |
| 1397 | <VERDICT_LEAF PASS> |
| 1398 | <MODULE TTCN x x.ttcn> |
| 1399 | module x{ |
| 1400 | |
| 1401 | function myFunct(){ |
| 1402 | const objid r:= objid{ 0 4 }; |
| 1403 | const objid f:= r[0]; |
| 1404 | } |
| 1405 | } |
| 1406 | |
| 1407 | <END_MODULE> |
| 1408 | <RESULT IF_PASS COUNT 1> |
| 1409 | (?im)Type.+?cannot.+?be.+?indexed |
| 1410 | <END_RESULT> |
| 1411 | <RESULT IF_PASS COUNT 1> |
| 1412 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 1413 | <END_RESULT> |
| 1414 | <RESULT IF_PASS COUNT 1> |
| 1415 | (?is)\berror: |
| 1416 | <END_RESULT> |
| 1417 | <END_TC> |
| 1418 | :exmp. |
| 1419 | |
| 1420 | .*---------------------------------------------------------------------* |
| 1421 | :h4.Allowed value notations - array notation (template objid in def. part) |
| 1422 | .*---------------------------------------------------------------------* |
| 1423 | :xmp tab=0. |
| 1424 | <TC - Allowed value notations - array notation (template objid in def. part)> |
| 1425 | <COMPILE> |
| 1426 | <VERDICT_LEAF PASS> |
| 1427 | <MODULE TTCN x x.ttcn> |
| 1428 | module x{ |
| 1429 | |
| 1430 | template objid r:= objid{ 0 4 }; |
| 1431 | |
| 1432 | template objid f:= r[0]; |
| 1433 | |
| 1434 | } |
| 1435 | |
| 1436 | <END_MODULE> |
| 1437 | <RESULT IF_PASS COUNT 1> |
| 1438 | (?im)Type.+?cannot.+?be.+?indexed |
| 1439 | <END_RESULT> |
| 1440 | <RESULT IF_PASS COUNT 1> |
| 1441 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 1442 | <END_RESULT> |
| 1443 | <RESULT IF_PASS COUNT 1> |
| 1444 | (?is)\berror: |
| 1445 | <END_RESULT> |
| 1446 | <END_TC> |
| 1447 | :exmp. |
| 1448 | |
| 1449 | .*---------------------------------------------------------------------* |
| 1450 | :h4.Allowed value notations - array notation (const verdicttype in def. part) |
| 1451 | .*---------------------------------------------------------------------* |
| 1452 | :xmp tab=0. |
| 1453 | <TC - Allowed value notations - array notation (const verdicttype in def. part)> |
| 1454 | <COMPILE> |
| 1455 | <VERDICT_LEAF PASS> |
| 1456 | <MODULE TTCN x x.ttcn> |
| 1457 | module x{ |
| 1458 | |
| 1459 | const verdicttype r:= pass; |
| 1460 | |
| 1461 | const verdicttype f:= r[0]; |
| 1462 | |
| 1463 | } |
| 1464 | |
| 1465 | <END_MODULE> |
| 1466 | <RESULT IF_PASS COUNT 1> |
| 1467 | (?im)Type.+?cannot.+?be.+?indexed |
| 1468 | <END_RESULT> |
| 1469 | <RESULT IF_PASS COUNT 1> |
| 1470 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 1471 | <END_RESULT> |
| 1472 | <RESULT IF_PASS COUNT 1> |
| 1473 | (?is)\berror: |
| 1474 | <END_RESULT> |
| 1475 | <END_TC> |
| 1476 | :exmp. |
| 1477 | |
| 1478 | .*---------------------------------------------------------------------* |
| 1479 | :h4.Allowed value notations - array notation (const verdicttype in function) |
| 1480 | .*---------------------------------------------------------------------* |
| 1481 | :xmp tab=0. |
| 1482 | <TC - Allowed value notations - array notation (const verdicttype in function)> |
| 1483 | <COMPILE> |
| 1484 | <VERDICT_LEAF PASS> |
| 1485 | <MODULE TTCN x x.ttcn> |
| 1486 | module x{ |
| 1487 | |
| 1488 | function myFunct(){ |
| 1489 | const verdicttype r:= pass; |
| 1490 | const verdicttype f:= r[0]; |
| 1491 | } |
| 1492 | } |
| 1493 | |
| 1494 | <END_MODULE> |
| 1495 | <RESULT IF_PASS COUNT 1> |
| 1496 | (?im)Type.+?cannot.+?be.+?indexed |
| 1497 | <END_RESULT> |
| 1498 | <RESULT IF_PASS COUNT 1> |
| 1499 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 1500 | <END_RESULT> |
| 1501 | <RESULT IF_PASS COUNT 1> |
| 1502 | (?is)\berror: |
| 1503 | <END_RESULT> |
| 1504 | <END_TC> |
| 1505 | :exmp. |
| 1506 | |
| 1507 | .*---------------------------------------------------------------------* |
| 1508 | :h4.Allowed value notations - array notation (template verdicttype in def. part) |
| 1509 | .*---------------------------------------------------------------------* |
| 1510 | :xmp tab=0. |
| 1511 | <TC - Allowed value notations - array notation (template verdicttype in def. part)> |
| 1512 | <COMPILE> |
| 1513 | <VERDICT_LEAF PASS> |
| 1514 | <MODULE TTCN x x.ttcn> |
| 1515 | module x{ |
| 1516 | |
| 1517 | template verdicttype r:= pass; |
| 1518 | |
| 1519 | template verdicttype f:= r[0]; |
| 1520 | |
| 1521 | } |
| 1522 | |
| 1523 | <END_MODULE> |
| 1524 | <RESULT IF_PASS COUNT 1> |
| 1525 | (?im)Type.+?cannot.+?be.+?indexed |
| 1526 | <END_RESULT> |
| 1527 | <RESULT IF_PASS COUNT 1> |
| 1528 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 1529 | <END_RESULT> |
| 1530 | <RESULT IF_PASS COUNT 1> |
| 1531 | (?is)\berror: |
| 1532 | <END_RESULT> |
| 1533 | <END_TC> |
| 1534 | :exmp. |
| 1535 | |
| 1536 | .*---------------------------------------------------------------------* |
| 1537 | :h4.Allowed value notations - array notation (const component in def. part) |
| 1538 | .*---------------------------------------------------------------------* |
| 1539 | :xmp tab=0. |
| 1540 | <TC - Allowed value notations - array notation (const component in def. part)> |
| 1541 | <COMPILE> |
| 1542 | <VERDICT_LEAF PASS> |
| 1543 | <MODULE TTCN x x.ttcn> |
| 1544 | module x{ |
| 1545 | |
| 1546 | type component c{ }; |
| 1547 | const c r:= null; |
| 1548 | |
| 1549 | const c f:= r[0]; |
| 1550 | } |
| 1551 | |
| 1552 | <END_MODULE> |
| 1553 | <RESULT IF_PASS COUNT 1> |
| 1554 | (?im)Type.+?cannot.+?be.+?indexed |
| 1555 | <END_RESULT> |
| 1556 | <RESULT IF_PASS COUNT 1> |
| 1557 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 1558 | <END_RESULT> |
| 1559 | <RESULT IF_PASS COUNT 1> |
| 1560 | (?is)\berror: |
| 1561 | <END_RESULT> |
| 1562 | <END_TC> |
| 1563 | :exmp. |
| 1564 | |
| 1565 | .*---------------------------------------------------------------------* |
| 1566 | :h4.Allowed value notations - array notation (const component in function) |
| 1567 | .*---------------------------------------------------------------------* |
| 1568 | :xmp tab=0. |
| 1569 | <TC - Allowed value notations - array notation (const component in function)> |
| 1570 | <COMPILE> |
| 1571 | <VERDICT_LEAF PASS> |
| 1572 | <MODULE TTCN x x.ttcn> |
| 1573 | module x{ |
| 1574 | |
| 1575 | type component c{ }; |
| 1576 | |
| 1577 | function myFunct(){ |
| 1578 | const c r:= null; |
| 1579 | const c f:= r[0]; |
| 1580 | } |
| 1581 | } |
| 1582 | <END_MODULE> |
| 1583 | <RESULT IF_PASS COUNT 1> |
| 1584 | (?im)Type.+?cannot.+?be.+?indexed |
| 1585 | <END_RESULT> |
| 1586 | <RESULT IF_PASS COUNT 1> |
| 1587 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 1588 | <END_RESULT> |
| 1589 | <RESULT IF_PASS COUNT 1> |
| 1590 | (?is)\berror: |
| 1591 | <END_RESULT> |
| 1592 | <END_TC> |
| 1593 | :exmp. |
| 1594 | |
| 1595 | .*---------------------------------------------------------------------* |
| 1596 | :h4.Allowed value notations - array notation (template component in def. part) |
| 1597 | .*---------------------------------------------------------------------* |
| 1598 | :xmp tab=0. |
| 1599 | <TC - Allowed value notations - array notation (template component in def. part)> |
| 1600 | <COMPILE> |
| 1601 | <VERDICT_LEAF PASS> |
| 1602 | <MODULE TTCN x x.ttcn> |
| 1603 | module x{ |
| 1604 | |
| 1605 | type component c{ }; |
| 1606 | template c r:= null; |
| 1607 | |
| 1608 | template c f:= r[0]; |
| 1609 | } |
| 1610 | |
| 1611 | <END_MODULE> |
| 1612 | <RESULT IF_PASS COUNT 1> |
| 1613 | (?im)Type.+?cannot.+?be.+?indexed |
| 1614 | <END_RESULT> |
| 1615 | <RESULT IF_PASS COUNT 1> |
| 1616 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 1617 | <END_RESULT> |
| 1618 | <RESULT IF_PASS COUNT 1> |
| 1619 | (?is)\berror: |
| 1620 | <END_RESULT> |
| 1621 | <END_TC> |
| 1622 | :exmp. |
| 1623 | |
| 1624 | .*---------------------------------------------------------------------* |
| 1625 | :h4.Allowed value notations - array notation (const default in def. part) |
| 1626 | .*---------------------------------------------------------------------* |
| 1627 | :xmp tab=0. |
| 1628 | <TC - Allowed value notations - array notation (const default in def. part)> |
| 1629 | <COMPILE> |
| 1630 | <VERDICT_LEAF PASS> |
| 1631 | <MODULE TTCN x x.ttcn> |
| 1632 | module x{ |
| 1633 | |
| 1634 | const default r:= null; |
| 1635 | |
| 1636 | const default f:= r[0]; |
| 1637 | } |
| 1638 | |
| 1639 | <END_MODULE> |
| 1640 | <RESULT IF_PASS COUNT 1> |
| 1641 | (?im)Type.+?cannot.+?be.+?indexed |
| 1642 | <END_RESULT> |
| 1643 | <RESULT IF_PASS COUNT 1> |
| 1644 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 1645 | <END_RESULT> |
| 1646 | <RESULT IF_PASS COUNT 1> |
| 1647 | (?is)\berror: |
| 1648 | <END_RESULT> |
| 1649 | <END_TC> |
| 1650 | :exmp. |
| 1651 | |
| 1652 | .*---------------------------------------------------------------------* |
| 1653 | :h4.Allowed value notations - array notation (const default in function) |
| 1654 | .*---------------------------------------------------------------------* |
| 1655 | :xmp tab=0. |
| 1656 | <TC - Allowed value notations - array notation (const default in function)> |
| 1657 | <COMPILE> |
| 1658 | <VERDICT_LEAF PASS> |
| 1659 | <MODULE TTCN x x.ttcn> |
| 1660 | module x{ |
| 1661 | |
| 1662 | function myFunct(){ |
| 1663 | const default r:= null; |
| 1664 | const default f:= r[0]; |
| 1665 | } |
| 1666 | } |
| 1667 | <END_MODULE> |
| 1668 | <RESULT IF_PASS COUNT 1> |
| 1669 | (?im)Type.+?cannot.+?be.+?indexed |
| 1670 | <END_RESULT> |
| 1671 | <RESULT IF_PASS COUNT 1> |
| 1672 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 1673 | <END_RESULT> |
| 1674 | <RESULT IF_PASS COUNT 1> |
| 1675 | (?is)\berror: |
| 1676 | <END_RESULT> |
| 1677 | <END_TC> |
| 1678 | :exmp. |
| 1679 | |
| 1680 | .*---------------------------------------------------------------------* |
| 1681 | :h4.Allowed value notations - array notation (template default in def. part) |
| 1682 | .*---------------------------------------------------------------------* |
| 1683 | :xmp tab=0. |
| 1684 | <TC - Allowed value notations - array notation (template default in def. part)> |
| 1685 | <COMPILE> |
| 1686 | <VERDICT_LEAF PASS> |
| 1687 | <MODULE TTCN x x.ttcn> |
| 1688 | module x{ |
| 1689 | |
| 1690 | template default r:= null; |
| 1691 | |
| 1692 | template default f:= r[0]; |
| 1693 | } |
| 1694 | |
| 1695 | <END_MODULE> |
| 1696 | <RESULT IF_PASS COUNT 1> |
| 1697 | (?im)Type.+?cannot.+?be.+?indexed |
| 1698 | <END_RESULT> |
| 1699 | <RESULT IF_PASS COUNT 1> |
| 1700 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 1701 | <END_RESULT> |
| 1702 | <RESULT IF_PASS COUNT 1> |
| 1703 | (?is)\berror: |
| 1704 | <END_RESULT> |
| 1705 | <END_TC> |
| 1706 | :exmp. |
| 1707 | |
| 1708 | .*---------------------------------------------------------------------* |
| 1709 | :h4.Allowed value notations - array notation (template bitstring in def. part) |
| 1710 | .*---------------------------------------------------------------------* |
| 1711 | :xmp tab=0. |
| 1712 | <TC - Allowed value notations - array notation (template bitstring in def. part)> |
| 1713 | <COMPILE> |
| 1714 | <VERDICT_LEAF PASS> |
| 1715 | <MODULE TTCN x x.ttcn> |
| 1716 | module x{ |
| 1717 | |
| 1718 | template bitstring r:= '01011'B; |
| 1719 | template bitstring f:= r[0]; |
| 1720 | |
| 1721 | } |
| 1722 | |
| 1723 | <END_MODULE> |
| 1724 | <RESULT IF_PASS COUNT 1> |
| 1725 | (?im)type.+?cannot.+?be.+?indexed |
| 1726 | <END_RESULT> |
| 1727 | <RESULT IF_PASS COUNT 1> |
| 1728 | (?im)\bNotify\b.+?\bCode\b.+?\bnot\b.+?\bgenerated\b |
| 1729 | <END_RESULT> |
| 1730 | <RESULT IF_PASS COUNT 1> |
| 1731 | (?is)\berror: |
| 1732 | <END_RESULT> |
| 1733 | <END_TC> |
| 1734 | :exmp. |
| 1735 | |
| 1736 | .*---------------------------------------------------------------------* |
| 1737 | :h4.Allowed value notations - array notation (template hexstring in def. part) |
| 1738 | .*---------------------------------------------------------------------* |
| 1739 | :xmp tab=0. |
| 1740 | <TC - Allowed value notations - array notation (template hexstring in def. part)> |
| 1741 | <COMPILE> |
| 1742 | <VERDICT_LEAF PASS> |
| 1743 | <MODULE TTCN x x.ttcn> |
| 1744 | module x{ |
| 1745 | |
| 1746 | template hexstring r:= 'AB01D'H; |
| 1747 | template hexstring f:= r[0]; |
| 1748 | |
| 1749 | } |
| 1750 | |
| 1751 | <END_MODULE> |
| 1752 | <RESULT IF_PASS COUNT 1> |
| 1753 | (?im)type.+?cannot.+?be.+?indexed |
| 1754 | <END_RESULT> |
| 1755 | <RESULT IF_PASS COUNT 1> |
| 1756 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 1757 | <END_RESULT> |
| 1758 | <RESULT IF_PASS COUNT 1> |
| 1759 | (?is)\berror: |
| 1760 | <END_RESULT> |
| 1761 | <END_TC> |
| 1762 | :exmp. |
| 1763 | |
| 1764 | .*---------------------------------------------------------------------* |
| 1765 | :h4.Allowed value notations - array notation (template octetstring in def. part) |
| 1766 | .*---------------------------------------------------------------------* |
| 1767 | :xmp tab=0. |
| 1768 | <TC - Allowed value notations - array notation (template octetstring in def. part)> |
| 1769 | <COMPILE> |
| 1770 | <VERDICT_LEAF PASS> |
| 1771 | <MODULE TTCN x x.ttcn> |
| 1772 | module x{ |
| 1773 | |
| 1774 | template octetstring r:= '000000'O; |
| 1775 | template octetstring f:= r[0]; |
| 1776 | |
| 1777 | } |
| 1778 | |
| 1779 | <END_MODULE> |
| 1780 | <RESULT IF_PASS COUNT 1> |
| 1781 | (?im)type.+?cannot.+?be.+?indexed |
| 1782 | <END_RESULT> |
| 1783 | <RESULT IF_PASS COUNT 1> |
| 1784 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 1785 | <END_RESULT> |
| 1786 | <RESULT IF_PASS COUNT 1> |
| 1787 | (?is)\berror: |
| 1788 | <END_RESULT> |
| 1789 | <END_TC> |
| 1790 | :exmp. |
| 1791 | |
| 1792 | .*---------------------------------------------------------------------* |
| 1793 | :h4.Allowed value notations - array notation (template charstring in def. part) |
| 1794 | .*---------------------------------------------------------------------* |
| 1795 | :xmp tab=0. |
| 1796 | <TC - Allowed value notations - array notation (template charstring in def. part)> |
| 1797 | <COMPILE> |
| 1798 | <VERDICT_LEAF PASS> |
| 1799 | <MODULE TTCN x x.ttcn> |
| 1800 | module x{ |
| 1801 | |
| 1802 | template charstring r:= "aiyyo"; |
| 1803 | template charstring f:= r[0]; |
| 1804 | |
| 1805 | } |
| 1806 | |
| 1807 | <END_MODULE> |
| 1808 | <RESULT IF_PASS COUNT 1> |
| 1809 | (?im)type.+?cannot.+?be.+?indexed |
| 1810 | <END_RESULT> |
| 1811 | <RESULT IF_PASS COUNT 1> |
| 1812 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 1813 | <END_RESULT> |
| 1814 | <RESULT IF_PASS COUNT 1> |
| 1815 | (?is)\berror: |
| 1816 | <END_RESULT> |
| 1817 | <END_TC> |
| 1818 | :exmp. |
| 1819 | |
| 1820 | .*---------------------------------------------------------------------* |
| 1821 | :h4.Allowed value notations - array notation (template universal charstring in def. part) |
| 1822 | .*---------------------------------------------------------------------* |
| 1823 | :xmp tab=0. |
| 1824 | <TC - Allowed value notations - array notation (template universal charstring in def. part)> |
| 1825 | <COMPILE> |
| 1826 | <VERDICT_LEAF PASS> |
| 1827 | <MODULE TTCN x x.ttcn> |
| 1828 | module x{ |
| 1829 | |
| 1830 | template universal charstring r:= "aiyyo" & char( 0, 0, 1, 113) & "yo"; |
| 1831 | template universal charstring f:= r[0]; |
| 1832 | |
| 1833 | } |
| 1834 | |
| 1835 | <END_MODULE> |
| 1836 | <RESULT IF_PASS COUNT 1> |
| 1837 | (?im)type.+?cannot.+?be.+?indexed |
| 1838 | <END_RESULT> |
| 1839 | <RESULT IF_PASS COUNT 1> |
| 1840 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 1841 | <END_RESULT> |
| 1842 | <RESULT IF_PASS COUNT 1> |
| 1843 | (?is)\berror: |
| 1844 | <END_RESULT> |
| 1845 | <END_TC> |
| 1846 | :exmp. |
| 1847 | |
| 1848 | .*---------------------------------------------------------------------* |
| 1849 | :h4.Allowed value notations - array notation (const record in def. part) |
| 1850 | .*---------------------------------------------------------------------* |
| 1851 | :xmp tab=0. |
| 1852 | <TC - Allowed value notations - array notation (const record in def. part)> |
| 1853 | <COMPILE> |
| 1854 | <VERDICT_LEAF PASS> |
| 1855 | <MODULE TTCN x x.ttcn> |
| 1856 | module x { |
| 1857 | |
| 1858 | type record Record { |
| 1859 | integer I, |
| 1860 | float F optional, |
| 1861 | charstring CS |
| 1862 | } |
| 1863 | |
| 1864 | const Record r := { 1, 0.0, "error" }; |
| 1865 | const integer f := r[0]; |
| 1866 | |
| 1867 | } |
| 1868 | <END_MODULE> |
| 1869 | <RESULT IF_PASS COUNT 1> |
| 1870 | (?im)Type.+?cannot.+?be.+?indexed |
| 1871 | <END_RESULT> |
| 1872 | <RESULT IF_PASS COUNT 1> |
| 1873 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 1874 | <END_RESULT> |
| 1875 | <RESULT IF_PASS COUNT 1> |
| 1876 | (?is)\berror: |
| 1877 | <END_RESULT> |
| 1878 | <END_TC> |
| 1879 | :exmp. |
| 1880 | |
| 1881 | .*---------------------------------------------------------------------* |
| 1882 | :h4.Allowed value notations - array notation (const record in function) |
| 1883 | .*---------------------------------------------------------------------* |
| 1884 | :xmp tab=0. |
| 1885 | <TC - Allowed value notations - array notation (const record in function)> |
| 1886 | <COMPILE> |
| 1887 | <VERDICT_LEAF PASS> |
| 1888 | <MODULE TTCN x x.ttcn> |
| 1889 | module x { |
| 1890 | |
| 1891 | type record Record { |
| 1892 | integer I, |
| 1893 | float F optional, |
| 1894 | charstring CS |
| 1895 | } |
| 1896 | |
| 1897 | function MyFunc() { |
| 1898 | |
| 1899 | const Record r := { 1, 0.0, "aiyyo" }; |
| 1900 | const integer f := r[0]; |
| 1901 | } |
| 1902 | } |
| 1903 | <END_MODULE> |
| 1904 | <RESULT IF_PASS COUNT 1> |
| 1905 | (?im)Type.+?cannot.+?be.+?indexed |
| 1906 | <END_RESULT> |
| 1907 | <RESULT IF_PASS COUNT 1> |
| 1908 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 1909 | <END_RESULT> |
| 1910 | <RESULT IF_PASS COUNT 1> |
| 1911 | (?is)\berror: |
| 1912 | <END_RESULT> |
| 1913 | <END_TC> |
| 1914 | :exmp. |
| 1915 | |
| 1916 | .*---------------------------------------------------------------------* |
| 1917 | :h4.Allowed value notations - array notation (template record in def. part) |
| 1918 | .*---------------------------------------------------------------------* |
| 1919 | :xmp tab=0. |
| 1920 | <TC - Allowed value notations - array notation (template record in def. part)> |
| 1921 | <COMPILE> |
| 1922 | <VERDICT_LEAF PASS> |
| 1923 | <MODULE TTCN x x.ttcn> |
| 1924 | module x { |
| 1925 | |
| 1926 | type record recT { |
| 1927 | integer I, |
| 1928 | float F, |
| 1929 | charstring CS |
| 1930 | } |
| 1931 | |
| 1932 | template recT r := { I:= 1, F:= 0.0, CS:= "aiyyo" }; |
| 1933 | template recT f := r[0]; |
| 1934 | |
| 1935 | } |
| 1936 | <END_MODULE> |
| 1937 | <RESULT IF_PASS COUNT 1> |
| 1938 | (?im)Type.+?cannot.+?be.+?indexed |
| 1939 | <END_RESULT> |
| 1940 | <RESULT IF_PASS COUNT 1> |
| 1941 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 1942 | <END_RESULT> |
| 1943 | <RESULT IF_PASS COUNT 1> |
| 1944 | (?is)\berror: |
| 1945 | <END_RESULT> |
| 1946 | <END_TC> |
| 1947 | :exmp. |
| 1948 | |
| 1949 | .*---------------------------------------------------------------------* |
| 1950 | :h4.Allowed value notations - value assignment notation (const record in def. part) |
| 1951 | .*---------------------------------------------------------------------* |
| 1952 | :xmp tab=0. |
| 1953 | <TC - Allowed value notations - value assignment notation (const record in def. part)> |
| 1954 | <COMPILE> |
| 1955 | <VERDICT_LEAF FAIL> |
| 1956 | <MODULE TTCN x x.ttcn> |
| 1957 | module x{ |
| 1958 | |
| 1959 | type record recT{ |
| 1960 | integer f1, |
| 1961 | float f2, |
| 1962 | charstring f3 |
| 1963 | } |
| 1964 | |
| 1965 | const recT f:={ |
| 1966 | [1]:= 1, |
| 1967 | [2]:= 0.9, |
| 1968 | [3]:= "aiyyo" |
| 1969 | } |
| 1970 | |
| 1971 | } |
| 1972 | <END_MODULE> |
| 1973 | <RESULT IF_FAIL POSITIVE> |
| 1974 | (?is)\berror: Indexed assignment notation cannot be used for record type `@x.recT' |
| 1975 | <END_RESULT> |
| 1976 | <END_TC> |
| 1977 | :exmp. |
| 1978 | |
| 1979 | .*---------------------------------------------------------------------* |
| 1980 | :h4.Allowed value notations - value assignment notation (const record in function) |
| 1981 | .*---------------------------------------------------------------------* |
| 1982 | :xmp tab=0. |
| 1983 | <TC - Allowed value notations - value assignment notation (const record in function)> |
| 1984 | <COMPILE> |
| 1985 | <VERDICT_LEAF FAIL> |
| 1986 | <MODULE TTCN x x.ttcn> |
| 1987 | module x{ |
| 1988 | |
| 1989 | type record recT{ |
| 1990 | integer f1, |
| 1991 | float f2, |
| 1992 | charstring f3 |
| 1993 | } |
| 1994 | |
| 1995 | function MyFunc() { |
| 1996 | const recT f:={ |
| 1997 | [1]:= 1, |
| 1998 | [2]:= 0.9, |
| 1999 | [3]:= "pass" |
| 2000 | } |
| 2001 | } |
| 2002 | } |
| 2003 | <END_MODULE> |
| 2004 | <RESULT IF_FAIL POSITIVE> |
| 2005 | (?is)\berror: Indexed assignment notation cannot be used for record type `@x.recT' |
| 2006 | <END_RESULT> |
| 2007 | <END_TC> |
| 2008 | :exmp. |
| 2009 | |
| 2010 | .*---------------------------------------------------------------------* |
| 2011 | :h4.Allowed value notations - value assignment notation (template record in def. part) |
| 2012 | .*---------------------------------------------------------------------* |
| 2013 | :xmp tab=0. |
| 2014 | <TC - Allowed value notations - value assignment notation (template record in def. part)> |
| 2015 | <COMPILE> |
| 2016 | <VERDICT_LEAF FAIL> |
| 2017 | <MODULE TTCN x x.ttcn> |
| 2018 | module x{ |
| 2019 | |
| 2020 | type record recT{ |
| 2021 | integer f1, |
| 2022 | float f2, |
| 2023 | charstring f3 |
| 2024 | } |
| 2025 | |
| 2026 | template recT f:={ |
| 2027 | [1]:= 1, |
| 2028 | [2]:= 0.9, |
| 2029 | [3]:= "aiyyo" |
| 2030 | } |
| 2031 | |
| 2032 | } |
| 2033 | <END_MODULE> |
| 2034 | <RESULT IF_FAIL COUNT 1> |
| 2035 | (?im)\berror\b.+?assignment.+?notation.+?with.+?array.+?indices.+?cannot.+?be.+?used.+?for.+?record.+?type |
| 2036 | <END_RESULT> |
| 2037 | <RESULT IF_FAIL COUNT 1> |
| 2038 | (?is)\berror: |
| 2039 | <END_RESULT> |
| 2040 | <END_TC> |
| 2041 | :exmp. |
| 2042 | |
| 2043 | .*---------------------------------------------------------------------* |
| 2044 | :h4.Allowed value notations - value assignment notation (timer-array in function) |
| 2045 | .*---------------------------------------------------------------------* |
| 2046 | :xmp tab=0. |
| 2047 | <TC - Allowed value notations - value assignment notation (timer-array in function)> |
| 2048 | <COMPILE> |
| 2049 | <VERDICT_LEAF FAIL> |
| 2050 | <MODULE TTCN x x.ttcn> |
| 2051 | module x{ |
| 2052 | |
| 2053 | function MyFunc() { |
| 2054 | timer timerarray[3] := {[0] := 1, [1] := 2, [2] := 3}; |
| 2055 | } |
| 2056 | } |
| 2057 | <END_MODULE> |
| 2058 | <RESULT IF_FAIL COUNT 3> |
| 2059 | (?is)\bA value or expression of type float was expected |
| 2060 | <END_RESULT> |
| 2061 | <RESULT IF_FAIL COUNT 3> |
| 2062 | (?is)\berror: |
| 2063 | <END_RESULT> |
| 2064 | <END_TC> |
| 2065 | :exmp. |
| 2066 | |
| 2067 | .*---------------------------------------------------------------------* |
| 2068 | :h4.Allowed value notations - value assignment notation (port-array in function) |
| 2069 | .*---------------------------------------------------------------------* |
| 2070 | :xmp tab=0. |
| 2071 | <TC - Allowed value notations - value assignment notation (port-array in function)> |
| 2072 | <COMPILE> |
| 2073 | <VERDICT_LEAF FAIL> |
| 2074 | <MODULE TTCN x x.ttcn> |
| 2075 | module x{ |
| 2076 | |
| 2077 | type port myport message{inout charstring}; |
| 2078 | |
| 2079 | type component self_comp{ |
| 2080 | port myport ports[3]; |
| 2081 | } |
| 2082 | |
| 2083 | function MyFunc() runs on self_comp{ |
| 2084 | ports := {[0] := 1.0, [1] := 2.0, [2] := 3.0}; |
| 2085 | } |
| 2086 | } |
| 2087 | <END_MODULE> |
| 2088 | <RESULT IF_FAIL COUNT 1> |
| 2089 | (?im)\berror\b.+?Reference.+?to.+?a.+?variable.+?or.+?template.+?variable.+?was.+?expected |
| 2090 | <END_RESULT> |
| 2091 | <RESULT IF_FAIL COUNT 1> |
| 2092 | (?is)\berror: |
| 2093 | <END_RESULT> |
| 2094 | <END_TC> |
| 2095 | :exmp. |
| 2096 | |
| 2097 | .*---------------------------------------------------------------------* |
| 2098 | :h4.Allowed value notations - value assignment notation (modified template record in def. part) |
| 2099 | .*---------------------------------------------------------------------* |
| 2100 | :xmp tab=0. |
| 2101 | <TC - Allowed value notations - value assignment notation (modified template record in def. part)> |
| 2102 | <COMPILE> |
| 2103 | <VERDICT_LEAF FAIL> |
| 2104 | <MODULE TTCN x x.ttcn> |
| 2105 | module x{ |
| 2106 | |
| 2107 | type record recT{ |
| 2108 | integer f1, |
| 2109 | float f2, |
| 2110 | charstring f3 |
| 2111 | } |
| 2112 | |
| 2113 | template recT r:={ |
| 2114 | f1:= 1, |
| 2115 | f2:= 0.9, |
| 2116 | f3:= "aiyyo" |
| 2117 | } |
| 2118 | |
| 2119 | template recT f modifies r:= { [0]:= 1, [2]:= 0.9 }; |
| 2120 | |
| 2121 | } |
| 2122 | <END_MODULE> |
| 2123 | <RESULT IF_FAIL COUNT 1> |
| 2124 | (?im)\berror\b.+?assignment.+?notation.+?with.+?array.+?indices.+?cannot.+?be.+?used.+?for.+?record.+?type |
| 2125 | <END_RESULT> |
| 2126 | <RESULT IF_FAIL COUNT 1> |
| 2127 | (?is)\berror: |
| 2128 | <END_RESULT> |
| 2129 | <END_TC> |
| 2130 | :exmp. |
| 2131 | |
| 2132 | .*---------------------------------------------------------------------* |
| 2133 | :h4.Allowed value notations - value list notation (modified template record in def. part) |
| 2134 | .*---------------------------------------------------------------------* |
| 2135 | :xmp tab=0. |
| 2136 | <TC - Allowed value notations - value list notation (modified template record in def. part)> |
| 2137 | <COMPILE> |
| 2138 | <VERDICT_LEAF FAIL> |
| 2139 | <MODULE TTCN x x.ttcn> |
| 2140 | module x{ |
| 2141 | |
| 2142 | type record recT{ |
| 2143 | integer f1, |
| 2144 | float f2, |
| 2145 | charstring f3 |
| 2146 | } |
| 2147 | |
| 2148 | template recT r:={ |
| 2149 | f1:= 1, |
| 2150 | f2:= 0.9, |
| 2151 | f3:= "aiyyo" |
| 2152 | } |
| 2153 | |
| 2154 | template recT f modifies r:= ({ f1:= 1, f2:= 0.9 }, { f1 := 1, f2 := 0.9, f3 := "pppp" }); |
| 2155 | |
| 2156 | } |
| 2157 | <END_MODULE> |
| 2158 | <RESULT IF_FAIL COUNT 1> |
| 2159 | (?im)\berror\b.+?field.+?f3.+?is.+?missing.+?from.+?template.+?for.+?record.+?type |
| 2160 | <END_RESULT> |
| 2161 | <RESULT IF_FAIL COUNT 1> |
| 2162 | (?is)\berror: |
| 2163 | <END_RESULT> |
| 2164 | <END_TC> |
| 2165 | :exmp. |
| 2166 | |
| 2167 | .*---------------------------------------------------------------------* |
| 2168 | :h4.Allowed value notations - complement value list notation (modified template record in def. part) |
| 2169 | .*---------------------------------------------------------------------* |
| 2170 | :xmp tab=0. |
| 2171 | <TC - Allowed value notations - complement value list notation (modified template record in def. part)> |
| 2172 | <COMPILE> |
| 2173 | <VERDICT_LEAF FAIL> |
| 2174 | <MODULE TTCN x x.ttcn> |
| 2175 | module x{ |
| 2176 | |
| 2177 | type record recT{ |
| 2178 | integer f1, |
| 2179 | float f2, |
| 2180 | charstring f3 |
| 2181 | } |
| 2182 | |
| 2183 | template recT r:={ |
| 2184 | f1:= 1, |
| 2185 | f2:= 0.9, |
| 2186 | f3:= "aiyyo" |
| 2187 | } |
| 2188 | |
| 2189 | template recT f modifies r:= complement({ f1:= 1, f2:= 0.9 }, { f1:= 1, f2:= 0.9, f3 := "pppp" }); |
| 2190 | |
| 2191 | } |
| 2192 | <END_MODULE> |
| 2193 | <RESULT IF_FAIL COUNT 1> |
| 2194 | (?im)\berror\b.+?field.+?f3.+?is.+?missing.+?from.+?template.+?for.+?record.+?type |
| 2195 | <END_RESULT> |
| 2196 | <RESULT IF_FAIL COUNT 1> |
| 2197 | (?is)\berror: |
| 2198 | <END_RESULT> |
| 2199 | <END_TC> |
| 2200 | :exmp. |
| 2201 | |
| 2202 | .*---------------------------------------------------------------------* |
| 2203 | :h4.Allowed value notations - value list (const set in def. part) |
| 2204 | .*---------------------------------------------------------------------* |
| 2205 | :xmp tab=0. |
| 2206 | <TC - Allowed value notations - value list (const set in def. part)> |
| 2207 | <COMPILE> |
| 2208 | <VERDICT_LEAF PASS> |
| 2209 | <MODULE TTCN x x.ttcn> |
| 2210 | module x { |
| 2211 | |
| 2212 | type set Set { |
| 2213 | integer I, |
| 2214 | float F, |
| 2215 | charstring CS |
| 2216 | } |
| 2217 | |
| 2218 | const Set s := { 3.14, "error", 9 }; |
| 2219 | |
| 2220 | } |
| 2221 | <END_MODULE> |
| 2222 | <RESULT IF_PASS COUNT 1> |
| 2223 | (?im)value.+?list.+?notation.+?cannot.+?be.+?used |
| 2224 | <END_RESULT> |
| 2225 | <RESULT IF_PASS COUNT 1> |
| 2226 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 2227 | <END_RESULT> |
| 2228 | <RESULT IF_PASS COUNT 1> |
| 2229 | (?is)\berror: |
| 2230 | <END_RESULT> |
| 2231 | <END_TC> |
| 2232 | :exmp. |
| 2233 | |
| 2234 | .*---------------------------------------------------------------------* |
| 2235 | :h4.Allowed value notations - value list (const set in function) |
| 2236 | .*---------------------------------------------------------------------* |
| 2237 | :xmp tab=0. |
| 2238 | <TC - Allowed value notations - value list (const set in function)> |
| 2239 | <COMPILE> |
| 2240 | <VERDICT_LEAF PASS> |
| 2241 | <MODULE TTCN x x.ttcn> |
| 2242 | module x { |
| 2243 | |
| 2244 | type set Set { |
| 2245 | integer I, |
| 2246 | float F, |
| 2247 | charstring CS |
| 2248 | } |
| 2249 | |
| 2250 | function MyFunc() { |
| 2251 | |
| 2252 | const Set s := { 3.14, "error", 9 }; |
| 2253 | } |
| 2254 | } |
| 2255 | <END_MODULE> |
| 2256 | <RESULT IF_PASS COUNT 1> |
| 2257 | (?im)value.+?list.+?notation.+?cannot.+?be.+?used |
| 2258 | <END_RESULT> |
| 2259 | <RESULT IF_PASS COUNT 1> |
| 2260 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 2261 | <END_RESULT> |
| 2262 | <RESULT IF_PASS COUNT 1> |
| 2263 | (?is)\berror: |
| 2264 | <END_RESULT> |
| 2265 | <END_TC> |
| 2266 | :exmp. |
| 2267 | |
| 2268 | .*---------------------------------------------------------------------* |
| 2269 | :h4.Allowed value notations - value list (template set in def. part) |
| 2270 | .*---------------------------------------------------------------------* |
| 2271 | :xmp tab=0. |
| 2272 | <TC - Allowed value notations - value list (template set in def. part)> |
| 2273 | <COMPILE> |
| 2274 | <VERDICT_LEAF PASS> |
| 2275 | <MODULE TTCN x x.ttcn> |
| 2276 | module x { |
| 2277 | |
| 2278 | type set Set { |
| 2279 | integer I, |
| 2280 | float F, |
| 2281 | charstring CS |
| 2282 | } |
| 2283 | |
| 2284 | template Set s := { 3.14, "error", 9 }; |
| 2285 | |
| 2286 | } |
| 2287 | <END_MODULE> |
| 2288 | <RESULT IF_PASS COUNT 1> |
| 2289 | (?im)Value.+?list.+?notation.+?not.+?allowed |
| 2290 | <END_RESULT> |
| 2291 | <RESULT IF_PASS COUNT 1> |
| 2292 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 2293 | <END_RESULT> |
| 2294 | <RESULT IF_PASS COUNT 1> |
| 2295 | (?is)\berror: |
| 2296 | <END_RESULT> |
| 2297 | <END_TC> |
| 2298 | :exmp. |
| 2299 | |
| 2300 | .*---------------------------------------------------------------------* |
| 2301 | :h4.Allowed value notations - value list (modified template set in def. part) |
| 2302 | .*---------------------------------------------------------------------* |
| 2303 | :xmp tab=0. |
| 2304 | <TC - Allowed value notations - value list (modified template set in def. part)> |
| 2305 | <COMPILE> |
| 2306 | <VERDICT_LEAF PASS> |
| 2307 | <MODULE TTCN x x.ttcn> |
| 2308 | module x { |
| 2309 | |
| 2310 | type set setT { |
| 2311 | integer I, |
| 2312 | float F, |
| 2313 | charstring CS |
| 2314 | } |
| 2315 | |
| 2316 | template setT s:= { F:= 3.14, CS:= "aiyyo", I:= 9 }; |
| 2317 | |
| 2318 | template setT f modifies s:= { 0, 8.8, "gerappa" }; |
| 2319 | |
| 2320 | } |
| 2321 | <END_MODULE> |
| 2322 | <RESULT IF_PASS COUNT 1> |
| 2323 | (?im)Value.+?list.+?notation.+?not.+?allowed |
| 2324 | <END_RESULT> |
| 2325 | <RESULT IF_PASS COUNT 1> |
| 2326 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 2327 | <END_RESULT> |
| 2328 | <RESULT IF_PASS COUNT 1> |
| 2329 | (?is)\berror: |
| 2330 | <END_RESULT> |
| 2331 | <END_TC> |
| 2332 | :exmp. |
| 2333 | |
| 2334 | .*---------------------------------------------------------------------* |
| 2335 | :h4.Allowed value notations - array notation (const set in def. part) |
| 2336 | .*---------------------------------------------------------------------* |
| 2337 | :xmp tab=0. |
| 2338 | <TC - Allowed value notations - array notation (const set in def. part)> |
| 2339 | <COMPILE> |
| 2340 | <VERDICT_LEAF PASS> |
| 2341 | <MODULE TTCN x x.ttcn> |
| 2342 | module x { |
| 2343 | |
| 2344 | type set Set { |
| 2345 | integer I, |
| 2346 | float F optional, |
| 2347 | charstring CS |
| 2348 | } |
| 2349 | |
| 2350 | const Set cSet := { |
| 2351 | I:= 1, |
| 2352 | F:= 0.0, |
| 2353 | CS:= "error" |
| 2354 | }; |
| 2355 | |
| 2356 | const integer FaultyField := cSet[0]; |
| 2357 | |
| 2358 | } |
| 2359 | <END_MODULE> |
| 2360 | <RESULT IF_PASS COUNT 1> |
| 2361 | (?im)Type.+?cannot.+?be.+?indexed |
| 2362 | <END_RESULT> |
| 2363 | <RESULT IF_PASS COUNT 1> |
| 2364 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 2365 | <END_RESULT> |
| 2366 | <RESULT IF_PASS COUNT 1> |
| 2367 | (?is)\berror: |
| 2368 | <END_RESULT> |
| 2369 | <END_TC> |
| 2370 | :exmp. |
| 2371 | |
| 2372 | .*---------------------------------------------------------------------* |
| 2373 | :h4.Allowed value notations - array notation (const set in function) |
| 2374 | .*---------------------------------------------------------------------* |
| 2375 | :xmp tab=0. |
| 2376 | <TC - Allowed value notations - array notation (const set in function)> |
| 2377 | <COMPILE> |
| 2378 | <VERDICT_LEAF PASS> |
| 2379 | <MODULE TTCN x x.ttcn> |
| 2380 | module x { |
| 2381 | |
| 2382 | type set Set { |
| 2383 | integer I, |
| 2384 | float F optional, |
| 2385 | charstring CS |
| 2386 | } |
| 2387 | |
| 2388 | function MyFunc() { |
| 2389 | |
| 2390 | const Set cSet := { |
| 2391 | I:= 1, |
| 2392 | F:= 0.0, |
| 2393 | CS:= "error" |
| 2394 | }; |
| 2395 | |
| 2396 | const integer FaultyField := cSet[0]; |
| 2397 | } |
| 2398 | } |
| 2399 | <END_MODULE> |
| 2400 | <RESULT IF_PASS COUNT 1> |
| 2401 | (?im)Type.+?cannot.+?be.+?indexed |
| 2402 | <END_RESULT> |
| 2403 | <RESULT IF_PASS COUNT 1> |
| 2404 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 2405 | <END_RESULT> |
| 2406 | <RESULT IF_PASS COUNT 1> |
| 2407 | (?is)\berror: |
| 2408 | <END_RESULT> |
| 2409 | <END_TC> |
| 2410 | :exmp. |
| 2411 | |
| 2412 | .*---------------------------------------------------------------------* |
| 2413 | :h4.Allowed value notations - array notation (template set in def. part) |
| 2414 | .*---------------------------------------------------------------------* |
| 2415 | :xmp tab=0. |
| 2416 | <TC - Allowed value notations - array notation (template set in def. part)> |
| 2417 | <COMPILE> |
| 2418 | <VERDICT_LEAF PASS> |
| 2419 | <MODULE TTCN x x.ttcn> |
| 2420 | module x { |
| 2421 | |
| 2422 | type set Set { |
| 2423 | integer I, |
| 2424 | float F optional, |
| 2425 | charstring CS |
| 2426 | } |
| 2427 | |
| 2428 | template Set cSet := { |
| 2429 | I:= 1, |
| 2430 | F:= 0.0, |
| 2431 | CS:= "error" |
| 2432 | }; |
| 2433 | |
| 2434 | template integer FaultyField := cSet[0]; |
| 2435 | |
| 2436 | } |
| 2437 | <END_MODULE> |
| 2438 | <RESULT IF_PASS COUNT 1> |
| 2439 | (?im)Type.+?cannot.+?be.+?indexed |
| 2440 | <END_RESULT> |
| 2441 | <RESULT IF_PASS COUNT 1> |
| 2442 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 2443 | <END_RESULT> |
| 2444 | <RESULT IF_PASS COUNT 1> |
| 2445 | (?is)\berror: |
| 2446 | <END_RESULT> |
| 2447 | <END_TC> |
| 2448 | :exmp. |
| 2449 | |
| 2450 | .*---------------------------------------------------------------------* |
| 2451 | :h4.Allowed value notations - value assignment notation (const set in def. part) |
| 2452 | .*---------------------------------------------------------------------* |
| 2453 | :xmp tab=0. |
| 2454 | <TC - Allowed value notations - value assignment notation (const set in def. part)> |
| 2455 | <COMPILE> |
| 2456 | <VERDICT_LEAF FAIL> |
| 2457 | <MODULE TTCN x x.ttcn> |
| 2458 | module x{ |
| 2459 | |
| 2460 | type set setT{ |
| 2461 | integer f1, |
| 2462 | float f2, |
| 2463 | charstring f3 |
| 2464 | } |
| 2465 | |
| 2466 | const setT f:={ |
| 2467 | [1]:= 1, |
| 2468 | [2]:= 0.9, |
| 2469 | [3]:= "pass" |
| 2470 | } |
| 2471 | |
| 2472 | } |
| 2473 | <END_MODULE> |
| 2474 | <RESULT IF_FAIL POSITIVE> |
| 2475 | (?is)\berror: |
| 2476 | <END_RESULT> |
| 2477 | <END_TC> |
| 2478 | :exmp. |
| 2479 | |
| 2480 | .*---------------------------------------------------------------------* |
| 2481 | :h4.Allowed value notations - value assignment notation (template set in def. part) |
| 2482 | .*---------------------------------------------------------------------* |
| 2483 | :xmp tab=0. |
| 2484 | <TC - Allowed value notations - value assignment notation (template set in def. part)> |
| 2485 | <COMPILE> |
| 2486 | <VERDICT_LEAF FAIL> |
| 2487 | <MODULE TTCN x x.ttcn> |
| 2488 | module x{ |
| 2489 | |
| 2490 | type set setT{ |
| 2491 | integer f1, |
| 2492 | float f2, |
| 2493 | charstring f3 |
| 2494 | } |
| 2495 | |
| 2496 | template setT f:={ |
| 2497 | [1]:= 1, |
| 2498 | [2]:= 0.9, |
| 2499 | [3]:= "pass" |
| 2500 | } |
| 2501 | |
| 2502 | } |
| 2503 | <END_MODULE> |
| 2504 | <RESULT IF_FAIL COUNT 1> |
| 2505 | (?im)\berror\b.+?assignment.+?notation.+?with.+?array.+?indices.+?cannot.+?be.+?used.+?for.+?set.+?type |
| 2506 | <END_RESULT> |
| 2507 | <RESULT IF_FAIL COUNT 1> |
| 2508 | (?is)\berror: |
| 2509 | <END_RESULT> |
| 2510 | <END_TC> |
| 2511 | :exmp. |
| 2512 | |
| 2513 | .*---------------------------------------------------------------------* |
| 2514 | :h4.Allowed value notations - value assignment notation (modified template set in def. part) |
| 2515 | .*---------------------------------------------------------------------* |
| 2516 | :xmp tab=0. |
| 2517 | <TC - Allowed value notations - value assignment notation (modified template set in def. part)> |
| 2518 | <COMPILE> |
| 2519 | <VERDICT_LEAF FAIL> |
| 2520 | <MODULE TTCN x x.ttcn> |
| 2521 | module x{ |
| 2522 | |
| 2523 | type set setT{ |
| 2524 | integer f1, |
| 2525 | float f2, |
| 2526 | charstring f3 |
| 2527 | } |
| 2528 | |
| 2529 | template setT r:={ |
| 2530 | f1:= 1, |
| 2531 | f2:= 0.9, |
| 2532 | f3:= "aiyyo" |
| 2533 | } |
| 2534 | |
| 2535 | // TR 711: A nonexistent reference is reported only once |
| 2536 | template setT f modifies r:= { [0]:= 1, [2]:= 0.9 }; |
| 2537 | |
| 2538 | } |
| 2539 | <END_MODULE> |
| 2540 | <RESULT IF_FAIL COUNT 1> |
| 2541 | (?im)\berror\b.+?assignment.+?notation.+?with.+?array.+?indices.+?cannot.+?be.+?used.+?for.+?set.+?type |
| 2542 | <END_RESULT> |
| 2543 | <RESULT IF_FAIL COUNT 1> |
| 2544 | (?is)\berror: |
| 2545 | <END_RESULT> |
| 2546 | <END_TC> |
| 2547 | :exmp. |
| 2548 | |
| 2549 | .*---------------------------------------------------------------------* |
| 2550 | :h4.Allowed value notations - array notation (const union in def. part) |
| 2551 | .*---------------------------------------------------------------------* |
| 2552 | :xmp tab=0. |
| 2553 | <TC - Allowed value notations - array notation (const union in def. part)> |
| 2554 | <COMPILE> |
| 2555 | <VERDICT_LEAF PASS> |
| 2556 | <MODULE TTCN x x.ttcn> |
| 2557 | module x { |
| 2558 | |
| 2559 | type union u { |
| 2560 | integer f_int, |
| 2561 | float f_float |
| 2562 | } |
| 2563 | |
| 2564 | const u r := { f_int:=1 }; |
| 2565 | |
| 2566 | const u f:= r[0]; |
| 2567 | } |
| 2568 | <END_MODULE> |
| 2569 | <RESULT IF_PASS COUNT 1> |
| 2570 | (?im)Type.+?cannot.+?be.+?indexed |
| 2571 | <END_RESULT> |
| 2572 | <RESULT IF_PASS COUNT 1> |
| 2573 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 2574 | <END_RESULT> |
| 2575 | <RESULT IF_PASS COUNT 1> |
| 2576 | (?is)\berror: |
| 2577 | <END_RESULT> |
| 2578 | <END_TC> |
| 2579 | :exmp. |
| 2580 | |
| 2581 | .*---------------------------------------------------------------------* |
| 2582 | :h4.Allowed value notations - array notation (const union in function) |
| 2583 | .*---------------------------------------------------------------------* |
| 2584 | :xmp tab=0. |
| 2585 | <TC - Allowed value notations - array notation (const union in function)> |
| 2586 | <COMPILE> |
| 2587 | <VERDICT_LEAF PASS> |
| 2588 | <MODULE TTCN x x.ttcn> |
| 2589 | module x { |
| 2590 | |
| 2591 | type union u { |
| 2592 | integer f_int, |
| 2593 | float f_float |
| 2594 | } |
| 2595 | |
| 2596 | function myFunct(){ |
| 2597 | const u r := { f_int:=1 }; |
| 2598 | const u f:= r[0]; |
| 2599 | } |
| 2600 | } |
| 2601 | <END_MODULE> |
| 2602 | <RESULT IF_PASS COUNT 1> |
| 2603 | (?im)Type.+?cannot.+?be.+?indexed |
| 2604 | <END_RESULT> |
| 2605 | <RESULT IF_PASS COUNT 1> |
| 2606 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 2607 | <END_RESULT> |
| 2608 | <RESULT IF_PASS COUNT 1> |
| 2609 | (?is)\berror: |
| 2610 | <END_RESULT> |
| 2611 | <END_TC> |
| 2612 | :exmp. |
| 2613 | |
| 2614 | .*---------------------------------------------------------------------* |
| 2615 | :h4.Allowed value notations - array notation (template union in def. part) |
| 2616 | .*---------------------------------------------------------------------* |
| 2617 | :xmp tab=0. |
| 2618 | <TC - Allowed value notations - array notation (template union in def. part)> |
| 2619 | <COMPILE> |
| 2620 | <VERDICT_LEAF PASS> |
| 2621 | <MODULE TTCN x x.ttcn> |
| 2622 | module x { |
| 2623 | |
| 2624 | type union u { |
| 2625 | integer f_int, |
| 2626 | float f_float |
| 2627 | } |
| 2628 | |
| 2629 | template u r := { f_int:=1 }; |
| 2630 | |
| 2631 | template u f:= r[0]; |
| 2632 | } |
| 2633 | <END_MODULE> |
| 2634 | <RESULT IF_PASS COUNT 1> |
| 2635 | (?im)Type.+?cannot.+?be.+?indexed |
| 2636 | <END_RESULT> |
| 2637 | <RESULT IF_PASS COUNT 1> |
| 2638 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 2639 | <END_RESULT> |
| 2640 | <RESULT IF_PASS COUNT 1> |
| 2641 | (?is)\berror: |
| 2642 | <END_RESULT> |
| 2643 | <END_TC> |
| 2644 | :exmp. |
| 2645 | |
| 2646 | .*---------------------------------------------------------------------* |
| 2647 | :h4.Allowed value notations - value assignment notation (const union in def. part) |
| 2648 | .*---------------------------------------------------------------------* |
| 2649 | :xmp tab=0. |
| 2650 | <TC - Allowed value notations - value assignment notation (const union in def. part)> |
| 2651 | <COMPILE> |
| 2652 | <VERDICT_LEAF FAIL> |
| 2653 | <MODULE TTCN x x.ttcn> |
| 2654 | module x{ |
| 2655 | |
| 2656 | type union uniT{ |
| 2657 | integer f1, |
| 2658 | float f2, |
| 2659 | charstring f3 |
| 2660 | } |
| 2661 | |
| 2662 | const uniT f:={ |
| 2663 | [1]:= 1 |
| 2664 | } |
| 2665 | |
| 2666 | } |
| 2667 | <END_MODULE> |
| 2668 | <RESULT IF_FAIL POSITIVE> |
| 2669 | (?is)\berror: union value was expected for type `@x.uniT' |
| 2670 | <END_RESULT> |
| 2671 | <RESULT IF_FAIL COUNT 1> |
| 2672 | (?is)\berror: |
| 2673 | <END_RESULT> |
| 2674 | <END_TC> |
| 2675 | :exmp. |
| 2676 | |
| 2677 | .*---------------------------------------------------------------------* |
| 2678 | :h4.Allowed value notations - value assignment notation (const union in function) |
| 2679 | .*---------------------------------------------------------------------* |
| 2680 | :xmp tab=0. |
| 2681 | <TC - Allowed value notations - value assignment notation (const union in function)> |
| 2682 | <COMPILE> |
| 2683 | <VERDICT_LEAF FAIL> |
| 2684 | <MODULE TTCN x x.ttcn> |
| 2685 | module x{ |
| 2686 | |
| 2687 | type union uniT{ |
| 2688 | integer f1, |
| 2689 | float f2, |
| 2690 | charstring f3 |
| 2691 | } |
| 2692 | |
| 2693 | function myFunct(){ |
| 2694 | const uniT f:={ |
| 2695 | [1]:= 1 |
| 2696 | } |
| 2697 | } |
| 2698 | } |
| 2699 | <END_MODULE> |
| 2700 | <RESULT IF_FAIL POSITIVE> |
| 2701 | (?is)\berror: union value was expected for type `@x.uniT' |
| 2702 | <END_RESULT> |
| 2703 | <RESULT IF_FAIL COUNT 1> |
| 2704 | (?is)\berror: |
| 2705 | <END_RESULT> |
| 2706 | <END_TC> |
| 2707 | :exmp. |
| 2708 | |
| 2709 | .*---------------------------------------------------------------------* |
| 2710 | :h4.Allowed value notations - value assignment notation (template union in def. part) |
| 2711 | .*---------------------------------------------------------------------* |
| 2712 | :xmp tab=0. |
| 2713 | <TC - Allowed value notations - value assignment notation (template union in def. part)> |
| 2714 | <COMPILE> |
| 2715 | <VERDICT_LEAF FAIL> |
| 2716 | <MODULE TTCN x x.ttcn> |
| 2717 | module x{ |
| 2718 | |
| 2719 | type union uniT{ |
| 2720 | integer f1, |
| 2721 | float f2, |
| 2722 | charstring f3 |
| 2723 | } |
| 2724 | |
| 2725 | // TR 710: Incorrect error message |
| 2726 | template uniT f:={ |
| 2727 | [1]:= 1 |
| 2728 | } |
| 2729 | |
| 2730 | } |
| 2731 | <END_MODULE> |
| 2732 | <RESULT IF_FAIL COUNT 1> |
| 2733 | (?im)\berror\b.+?assignment.+?notation.+?with.+?array.+?indices.+?cannot.+?be.+?used.+?for.+?union.+?type |
| 2734 | <END_RESULT> |
| 2735 | <RESULT IF_FAIL COUNT 1> |
| 2736 | (?is)\berror: |
| 2737 | <END_RESULT> |
| 2738 | <END_TC> |
| 2739 | :exmp. |
| 2740 | |
| 2741 | .*---------------------------------------------------------------------* |
| 2742 | :h4.Allowed value notations - value assignment notation (modified template union in def. part) |
| 2743 | .*---------------------------------------------------------------------* |
| 2744 | :xmp tab=0. |
| 2745 | <TC - Allowed value notations - value assignment notation (modified template union in def. part)> |
| 2746 | <COMPILE> |
| 2747 | <VERDICT_LEAF FAIL> |
| 2748 | <MODULE TTCN x x.ttcn> |
| 2749 | module x { |
| 2750 | |
| 2751 | type union u { |
| 2752 | integer f_int, |
| 2753 | float f_float |
| 2754 | } |
| 2755 | |
| 2756 | template u r := { f_int:=1 }; |
| 2757 | |
| 2758 | // TR 710: Incorrect error message |
| 2759 | template u f modifies r:= { [0]:= 2 }; |
| 2760 | |
| 2761 | } |
| 2762 | <END_MODULE> |
| 2763 | <RESULT IF_FAIL COUNT 1> |
| 2764 | (?im)\berror\b.+?assignment.+?notation.+?with.+?array.+?indices.+?cannot.+?be.+?used.+?for.+?union.+?type |
| 2765 | <END_RESULT> |
| 2766 | <RESULT IF_FAIL COUNT 1> |
| 2767 | (?is)\berror: |
| 2768 | <END_RESULT> |
| 2769 | <END_TC> |
| 2770 | :exmp. |
| 2771 | |
| 2772 | .*---------------------------------------------------------------------* |
| 2773 | :h4.Allowed value notations - array notation (const enumerated in def. part) |
| 2774 | .*---------------------------------------------------------------------* |
| 2775 | :xmp tab=0. |
| 2776 | <TC - Allowed value notations - array notation (const enumerated in def. part)> |
| 2777 | <COMPILE> |
| 2778 | <VERDICT_LEAF PASS> |
| 2779 | <MODULE TTCN x x.ttcn> |
| 2780 | module x { |
| 2781 | |
| 2782 | type enumerated enum { ONE(1), TWO(2), THREE(3) }; |
| 2783 | |
| 2784 | const enum r:= ONE; |
| 2785 | |
| 2786 | const enum f:= r[0]; |
| 2787 | } |
| 2788 | |
| 2789 | <END_MODULE> |
| 2790 | <RESULT IF_PASS COUNT 1> |
| 2791 | (?im)Type.+?cannot.+?be.+?indexed |
| 2792 | <END_RESULT> |
| 2793 | <RESULT IF_PASS COUNT 1> |
| 2794 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 2795 | <END_RESULT> |
| 2796 | <RESULT IF_PASS COUNT 1> |
| 2797 | (?is)\berror: |
| 2798 | <END_RESULT> |
| 2799 | <END_TC> |
| 2800 | :exmp. |
| 2801 | |
| 2802 | .*---------------------------------------------------------------------* |
| 2803 | :h4.Allowed value notations - array notation (const enumerated in function) |
| 2804 | .*---------------------------------------------------------------------* |
| 2805 | :xmp tab=0. |
| 2806 | <TC - Allowed value notations - array notation (const enumerated in function)> |
| 2807 | <COMPILE> |
| 2808 | <VERDICT_LEAF PASS> |
| 2809 | <MODULE TTCN x x.ttcn> |
| 2810 | module x { |
| 2811 | |
| 2812 | type enumerated enum { ONE(1), TWO(2), THREE(3) }; |
| 2813 | |
| 2814 | function myFunct(){ |
| 2815 | const enum r:= ONE; |
| 2816 | const enum f:= r[0]; |
| 2817 | } |
| 2818 | } |
| 2819 | <END_MODULE> |
| 2820 | <RESULT IF_PASS COUNT 1> |
| 2821 | (?im)Type.+?cannot.+?be.+?indexed |
| 2822 | <END_RESULT> |
| 2823 | <RESULT IF_PASS COUNT 1> |
| 2824 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 2825 | <END_RESULT> |
| 2826 | <RESULT IF_PASS COUNT 1> |
| 2827 | (?is)\berror: |
| 2828 | <END_RESULT> |
| 2829 | <END_TC> |
| 2830 | :exmp. |
| 2831 | |
| 2832 | .*---------------------------------------------------------------------* |
| 2833 | :h4.Allowed value notations - array notation (template enumerated in def. part) |
| 2834 | .*---------------------------------------------------------------------* |
| 2835 | :xmp tab=0. |
| 2836 | <TC - Allowed value notations - array notation (template enumerated in def. part)> |
| 2837 | <COMPILE> |
| 2838 | <VERDICT_LEAF PASS> |
| 2839 | <MODULE TTCN x x.ttcn> |
| 2840 | module x { |
| 2841 | |
| 2842 | type enumerated enum { ONE(1), TWO(2), THREE(3) }; |
| 2843 | |
| 2844 | template enum r:= ONE; |
| 2845 | |
| 2846 | template enum f:= r[0]; |
| 2847 | } |
| 2848 | |
| 2849 | <END_MODULE> |
| 2850 | <RESULT IF_PASS COUNT 1> |
| 2851 | (?im)Type.+?cannot.+?be.+?indexed |
| 2852 | <END_RESULT> |
| 2853 | <RESULT IF_PASS COUNT 1> |
| 2854 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 2855 | <END_RESULT> |
| 2856 | <RESULT IF_PASS COUNT 1> |
| 2857 | (?is)\berror: |
| 2858 | <END_RESULT> |
| 2859 | <END_TC> |
| 2860 | :exmp. |
| 2861 | |
| 2862 | .*---------------------------------------------------------------------* |
| 2863 | :h4.Value notations - value assignment notation (timer-array in function) |
| 2864 | .*---------------------------------------------------------------------* |
| 2865 | :xmp tab=0. |
| 2866 | <TC - Value notations - value assignment notation (timer-array in function)> |
| 2867 | <COMPILE> |
| 2868 | <VERDICT_LEAF FAIL> |
| 2869 | <MODULE TTCN x x.ttcn> |
| 2870 | module x{ |
| 2871 | |
| 2872 | function MyFunc() { |
| 2873 | timer timerarray[3] := {[0] := 1.0, [1] := 2.0, [2] := 3.0, [3] := 4.0}; |
| 2874 | timer timerarray2[3] := {[0.0] := 1.0, [1] := 2.0, [2] := 3.0}; |
| 2875 | timer timerarray3[3] := {[0] := 1.0, [1] := 2.0}; |
| 2876 | timer timerarray4[3] := {[-1] := 1.0, [0] := 2.0, [1] := 3.0}; |
| 2877 | timer timerarray5[3] := {[0] := 1.0, [0] := 2.0, [1] := 3.0}; |
| 2878 | } |
| 2879 | } |
| 2880 | <END_MODULE> |
| 2881 | <RESULT IF_FAIL COUNT 1> |
| 2882 | (?im)\berror: Array index overflow: the index value must be at most `2' instead of `3' |
| 2883 | <END_RESULT> |
| 2884 | <RESULT IF_FAIL COUNT 1> |
| 2885 | (?im)\berror: A value or expression of type integer was expected |
| 2886 | <END_RESULT> |
| 2887 | <RESULT IF_FAIL COUNT 1> |
| 2888 | (?im)\berror: Array index underflow: the index value must be at least `0' instead of `-1' |
| 2889 | <END_RESULT> |
| 2890 | <RESULT IF_FAIL COUNT 1> |
| 2891 | (?im)\berror: Duplicate index value `0' for timer array elements `2' and `1' |
| 2892 | <END_RESULT> |
| 2893 | <RESULT IF_FAIL COUNT 4> |
| 2894 | (?is)\berror: |
| 2895 | <END_RESULT> |
| 2896 | <END_TC> |
| 2897 | :exmp. |
| 2898 | |
| 2899 | .*---------------------------------------------------------------------* |
| 2900 | :h4.Value notations - value assignment notation (index out of bound) |
| 2901 | .*---------------------------------------------------------------------* |
| 2902 | :xmp tab=0. |
| 2903 | <TC - Value notations - value assignment notation (index out of bound)> |
| 2904 | <COMPILE> |
| 2905 | <VERDICT_LEAF PASS> |
| 2906 | <MODULE TTCN x x.ttcn> |
| 2907 | module x{ |
| 2908 | |
| 2909 | type integer myIntType[3]; |
| 2910 | |
| 2911 | function MyFunc() { |
| 2912 | var myIntType myintarray := {[0] := 0, [1] := 1, [2]:= 2}; |
| 2913 | var myIntType myintarray2 := {[0] := 0, [1] := 1}; |
| 2914 | var myIntType myintarray3 := {[0] := 0, [1] := 1, [2]:= 2, [2] := 3}; |
| 2915 | |
| 2916 | var integer i := 2; |
| 2917 | var myIntType myintarray4 := {[i] := 0, [i] := 1, [i]:= 2}; |
| 2918 | |
| 2919 | } |
| 2920 | } |
| 2921 | <END_MODULE> |
| 2922 | <RESULT IF_PASS COUNT 1> |
| 2923 | (?im)\berror: Duplicate index value `2' for components `4' and `3' |
| 2924 | <END_RESULT> |
| 2925 | <RESULT IF_PASS COUNT 1> |
| 2926 | (?is)\berror: |
| 2927 | <END_RESULT> |
| 2928 | <RESULT IF_PASS POSITIVE> |
| 2929 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 2930 | <END_RESULT> |
| 2931 | <END_TC> |
| 2932 | :exmp. |
| 2933 | |
| 2934 | .*---------------------------------------------------------------------* |
| 2935 | :h4.Value notations - value assignment notation (negative index is used) |
| 2936 | .*---------------------------------------------------------------------* |
| 2937 | :xmp tab=0. |
| 2938 | <TC - Value notations - value assignment notation (negative index is used)> |
| 2939 | <COMPILE> |
| 2940 | <VERDICT_LEAF PASS> |
| 2941 | <MODULE TTCN x x.ttcn> |
| 2942 | module x{ |
| 2943 | |
| 2944 | type integer myIntType[3]; |
| 2945 | |
| 2946 | function MyFunc() { |
| 2947 | var myIntType myintarray := {[0] := 0, [-1] := 1, [2]:= 2}; |
| 2948 | var myIntType myintarray2 := {[0.0] := 0, [1.0] := 1, [2.3]:= 2}; |
| 2949 | |
| 2950 | var integer i := -56; |
| 2951 | var myIntType myintarray3 := {[i] := 0, [i] := 1, [i]:= 2}; |
| 2952 | |
| 2953 | } |
| 2954 | } |
| 2955 | <END_MODULE> |
| 2956 | <RESULT IF_PASS COUNT 1> |
| 2957 | (?im)\berror: Array index underflow: the index value must be at least `0' instead of `-1' |
| 2958 | <END_RESULT> |
| 2959 | <RESULT IF_PASS COUNT 3> |
| 2960 | (?im)\berror: A value or expression of type integer was expected |
| 2961 | <END_RESULT> |
| 2962 | <RESULT IF_PASS POSITIVE> |
| 2963 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 2964 | <END_RESULT> |
| 2965 | <RESULT IF_PASS COUNT 4> |
| 2966 | (?is)\berror: |
| 2967 | <END_RESULT> |
| 2968 | <END_TC> |
| 2969 | :exmp. |
| 2970 | |
| 2971 | .*---------------------------------------------------------------------* |
| 2972 | :h4.Value notations - value assignment notation (structured types) |
| 2973 | .*---------------------------------------------------------------------* |
| 2974 | :xmp tab=0. |
| 2975 | <TC - Value notations - value assignment notation (structured types)> |
| 2976 | <COMPILE> |
| 2977 | <VERDICT_LEAF PASS> |
| 2978 | <MODULE TTCN x x.ttcn> |
| 2979 | module x{ |
| 2980 | |
| 2981 | type integer myIntType[3]; |
| 2982 | type record myTestRec |
| 2983 | { |
| 2984 | myIntType intlist, |
| 2985 | integer myint |
| 2986 | } |
| 2987 | |
| 2988 | type record of myTestRec myTestRecList; |
| 2989 | |
| 2990 | type record of integer myIntegerList; |
| 2991 | |
| 2992 | type record myTestRec2 |
| 2993 | { |
| 2994 | myIntegerList myintegerlist, |
| 2995 | integer myint |
| 2996 | } |
| 2997 | |
| 2998 | |
| 2999 | function MyFunc() { |
| 3000 | |
| 3001 | var myTestRecList mytestreclist := {[0] := {intlist := {[0]:=0, [1]:= 1, [2]:=2}, myint:= 1}}; |
| 3002 | var myTestRecList mytestreclist2 := {[0] := {intlist := {[0]:=0, [1]:= 1, [-2]:=2}, myint:= 1}}; |
| 3003 | var myTestRecList mytestreclist3 := {[0] := {intlist := {[0]:=0, [1]:= 1, [2.0]:=2}, myint:= 1}}; |
| 3004 | var myTestRecList mytestreclist4 := {[0] := {intlist := {[0]:=0, [1]:= 1}, myint:= 1}}; |
| 3005 | var myTestRecList mytestreclist5 := {[0] := {intlist := {[0]:=0, [1]:= 1, [2]:=2, [3] := 3}, myint:= 1}}; |
| 3006 | var myTestRecList mytestreclist6 := {[0] := {intlist := {[0]:=0, [1]:= 1, [1]:=2}, myint:= 1}}; |
| 3007 | |
| 3008 | var myTestRec2 mytestrec := {myintegerlist := {[0]:= 0, [1] := 1, [2] := 2}, myint := 1}; |
| 3009 | var myTestRec2 mytestrec2 := {myintegerlist := {[0.0]:= 0, [1] := 1, [2] := 2}, myint := 1}; |
| 3010 | var myTestRec2 mytestrec3 := {myintegerlist := {[0]:= 0, [-1] := 1, [2] := 2}, myint := 1}; |
| 3011 | var myTestRec2 mytestrec4 := {myintegerlist := {[0]:= 0, [1] := 1, [1] := 2}, myint := 1}; |
| 3012 | |
| 3013 | } |
| 3014 | } |
| 3015 | <END_MODULE> |
| 3016 | <RESULT IF_PASS COUNT 1> |
| 3017 | (?im)\berror: Array index underflow: the index value must be at least `0' instead of `-2' |
| 3018 | <END_RESULT> |
| 3019 | <RESULT IF_PASS COUNT 2> |
| 3020 | (?im)\berror: A value or expression of type integer was expected |
| 3021 | <END_RESULT> |
| 3022 | <RESULT IF_PASS COUNT 1> |
| 3023 | (?im)\berror: Array index overflow: the index value must be at most `2' instead of `3' |
| 3024 | <END_RESULT> |
| 3025 | <RESULT IF_PASS COUNT 2> |
| 3026 | (?im)\berror: Duplicate index value `1' for components `3' and `2' |
| 3027 | <END_RESULT> |
| 3028 | <RESULT IF_PASS COUNT 1> |
| 3029 | (?im)\berror: A non-negative integer value was expected for indexing type `@x.myIntegerList' instead of `-1' |
| 3030 | <END_RESULT> |
| 3031 | <RESULT IF_PASS POSITIVE> |
| 3032 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 3033 | <END_RESULT> |
| 3034 | <RESULT IF_PASS COUNT 7> |
| 3035 | (?is)\berror: |
| 3036 | <END_RESULT> |
| 3037 | <END_TC> |
| 3038 | :exmp. |
| 3039 | |
| 3040 | .*---------------------------------------------------------------------* |
| 3041 | :h4.Value notations - value assignment notation (modify template) |
| 3042 | .*---------------------------------------------------------------------* |
| 3043 | :xmp tab=0. |
| 3044 | <TC - Value notations - value assignment notation (modify template)> |
| 3045 | <COMPILE> |
| 3046 | <VERDICT_LEAF PASS> |
| 3047 | <MODULE TTCN x x.ttcn> |
| 3048 | module x{ |
| 3049 | |
| 3050 | type record of integer MyIntType; |
| 3051 | template MyIntType T1 := {0, 1, 2}; |
| 3052 | template MyIntType T2 modifies T1:= {[0] := 1, [0]:= 5}; |
| 3053 | template MyIntType T3 modifies T1:= {[0] := 1, [-5]:= 5}; |
| 3054 | |
| 3055 | } |
| 3056 | <END_MODULE> |
| 3057 | <RESULT IF_PASS COUNT 1> |
| 3058 | (?im)\berror: Duplicate index value `0' for components `2' and `1' |
| 3059 | <END_RESULT> |
| 3060 | <RESULT IF_PASS COUNT 1> |
| 3061 | (?im)\berror: A non-negative integer value was expected for indexing type `@x.MyIntType' instead of `-5' |
| 3062 | <END_RESULT> |
| 3063 | <RESULT IF_PASS POSITIVE> |
| 3064 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 3065 | <END_RESULT> |
| 3066 | <RESULT IF_PASS COUNT 2> |
| 3067 | (?is)\berror: |
| 3068 | <END_RESULT> |
| 3069 | <END_TC> |
| 3070 | :exmp. |
| 3071 | |
| 3072 | .*---------------------------------------------------------------------* |
| 3073 | :h4.Value notations - value assignment notation (modify template2) |
| 3074 | .*---------------------------------------------------------------------* |
| 3075 | :xmp tab=0. |
| 3076 | <TC - Value notations - value assignment notation (modify template2)> |
| 3077 | <COMPILE> |
| 3078 | <VERDICT_LEAF PASS> |
| 3079 | <MODULE TTCN x x.ttcn> |
| 3080 | module x{ |
| 3081 | |
| 3082 | type integer IntType[3]; |
| 3083 | |
| 3084 | type record of integer MyIntType; |
| 3085 | template MyIntType T1 := {0, 1, 2}; |
| 3086 | template MyIntType T2 modifies T1:= {[0.1] := 1, [1]:= 5}; |
| 3087 | template MyIntType T3 modifies T1:= {[0] := 1, [1.0]:= 5}; |
| 3088 | |
| 3089 | function MyFunc() { |
| 3090 | |
| 3091 | var IntType myintarray := {['00'O] := 0, [1.5] := 1, [2]:= 2}; |
| 3092 | } |
| 3093 | |
| 3094 | |
| 3095 | } |
| 3096 | <END_MODULE> |
| 3097 | <RESULT IF_PASS COUNT 4> |
| 3098 | (?im)\bA value or expression of type integer was expected |
| 3099 | <END_RESULT> |
| 3100 | <RESULT IF_PASS POSITIVE> |
| 3101 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 3102 | <END_RESULT> |
| 3103 | <RESULT IF_PASS COUNT 4> |
| 3104 | (?is)\berror: |
| 3105 | <END_RESULT> |
| 3106 | <END_TC> |
| 3107 | :exmp. |
| 3108 | |
| 3109 | .*---------------------------------------------------------------------* |
| 3110 | :h3. Value notations - Value notations shall assign a value to a specific element only once |
| 3111 | .*---------------------------------------------------------------------* |
| 3112 | This test case group covers the requirement SA-6/7. |
| 3113 | |
| 3114 | Startegy: In one value notation an element can get value only once. |
| 3115 | All occurances shall be tested, where such a notation can be used. |
| 3116 | |
| 3117 | Tested: |
| 3118 | :list. |
| 3119 | :li D='-'.record and set constants in definition part and function |
| 3120 | :li D='-'.record modified template in definition part |
| 3121 | :li D='-'.enumerated type in definition part |
| 3122 | :elist. |
| 3123 | |
| 3124 | .*---------------------------------------------------------------------* |
| 3125 | :h4.Value notations - A value notation shall assign a value to a specific element only once - duplicated element assignment in record (const in def. part) |
| 3126 | .*---------------------------------------------------------------------* |
| 3127 | :xmp tab=0. |
| 3128 | <TC - A value notation shall assign a value to a specific element only once - duplicated element assignment in record (const in def. part)> |
| 3129 | <COMPILE> |
| 3130 | <VERDICT_LEAF PASS> |
| 3131 | <MODULE TTCN x x.ttcn> |
| 3132 | module x { |
| 3133 | |
| 3134 | type record Record { |
| 3135 | integer I, |
| 3136 | float F, |
| 3137 | charstring CS |
| 3138 | } |
| 3139 | |
| 3140 | const Record wrongRecord := { |
| 3141 | I:= 1, |
| 3142 | F:= 0.0, |
| 3143 | CS:= "error", |
| 3144 | F:= 2.0 |
| 3145 | }; |
| 3146 | |
| 3147 | } |
| 3148 | <END_MODULE> |
| 3149 | <RESULT IF_PASS COUNT 1> |
| 3150 | (?im)Duplicate.+?record.+?field |
| 3151 | <END_RESULT> |
| 3152 | <RESULT IF_PASS COUNT 1> |
| 3153 | (?im)Field.+?already.+?given |
| 3154 | <END_RESULT> |
| 3155 | <RESULT IF_PASS COUNT 1> |
| 3156 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 3157 | <END_RESULT> |
| 3158 | <RESULT IF_PASS COUNT 1> |
| 3159 | (?is)\berror: |
| 3160 | <END_RESULT> |
| 3161 | <END_TC> |
| 3162 | :exmp. |
| 3163 | |
| 3164 | .*---------------------------------------------------------------------* |
| 3165 | :h4.Value notations - A value notation shall assign a value to a specific element only once - duplicated element assignment in record (const in function) |
| 3166 | .*---------------------------------------------------------------------* |
| 3167 | :xmp tab=0. |
| 3168 | <TC - A value notation shall assign a value to a specific element only once - duplicated element assignment in record (const in function)> |
| 3169 | <COMPILE> |
| 3170 | <VERDICT_LEAF PASS> |
| 3171 | <MODULE TTCN x x.ttcn> |
| 3172 | module x { |
| 3173 | |
| 3174 | type record Record { |
| 3175 | integer I, |
| 3176 | float F, |
| 3177 | charstring CS |
| 3178 | } |
| 3179 | |
| 3180 | function MyFunc() { |
| 3181 | |
| 3182 | const Record wrongRecord := { |
| 3183 | I:= 1, |
| 3184 | F:= 0.0, |
| 3185 | CS:= "error", |
| 3186 | F:= 2.0 |
| 3187 | }; |
| 3188 | } |
| 3189 | } |
| 3190 | <END_MODULE> |
| 3191 | <RESULT IF_PASS COUNT 1> |
| 3192 | (?im)Duplicate.+?record.+?field |
| 3193 | <END_RESULT> |
| 3194 | <RESULT IF_PASS COUNT 1> |
| 3195 | (?im)Field.+?already.+?given |
| 3196 | <END_RESULT> |
| 3197 | <RESULT IF_PASS COUNT 1> |
| 3198 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 3199 | <END_RESULT> |
| 3200 | <RESULT IF_PASS COUNT 1> |
| 3201 | (?is)\berror: |
| 3202 | <END_RESULT> |
| 3203 | <END_TC> |
| 3204 | :exmp. |
| 3205 | |
| 3206 | .*---------------------------------------------------------------------* |
| 3207 | :h4.Value notations - A value notation shall assign a value to a specific element only once - duplicated element assignment in set (const in def. part) |
| 3208 | .*---------------------------------------------------------------------* |
| 3209 | :xmp tab=0. |
| 3210 | <TC - A value notation shall assign a value to a specific element only once - duplicated element assignment in set (const in def. part)> |
| 3211 | <COMPILE> |
| 3212 | <VERDICT_LEAF PASS> |
| 3213 | <MODULE TTCN x x.ttcn> |
| 3214 | module x { |
| 3215 | |
| 3216 | type set Set { |
| 3217 | integer I, |
| 3218 | float F, |
| 3219 | charstring CS |
| 3220 | } |
| 3221 | |
| 3222 | const Set s := { |
| 3223 | F:= 0.0, |
| 3224 | I:= 3, |
| 3225 | CS:= "error", |
| 3226 | F:= 9.0 |
| 3227 | }; |
| 3228 | |
| 3229 | } |
| 3230 | <END_MODULE> |
| 3231 | <RESULT IF_PASS COUNT 1> |
| 3232 | (?im)Duplicate.+?set.+?field |
| 3233 | <END_RESULT> |
| 3234 | <RESULT IF_PASS COUNT 1> |
| 3235 | (?im)Field.+?already.+?given |
| 3236 | <END_RESULT> |
| 3237 | <RESULT IF_PASS COUNT 1> |
| 3238 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 3239 | <END_RESULT> |
| 3240 | <RESULT IF_PASS COUNT 1> |
| 3241 | (?is)\berror: |
| 3242 | <END_RESULT> |
| 3243 | <END_TC> |
| 3244 | :exmp. |
| 3245 | |
| 3246 | .*---------------------------------------------------------------------* |
| 3247 | :h4.Value notations - A value notation shall assign a value to a specific element only once - duplicated element assignment in record of (modified template in def. part) |
| 3248 | .*---------------------------------------------------------------------* |
| 3249 | :xmp tab=0. |
| 3250 | <TC - A value notation shall assign a value to a specific element only once - duplicated element assignment in record of (modified template in def. part)> |
| 3251 | <COMPILE> |
| 3252 | <VERDICT_LEAF FAIL> |
| 3253 | <MODULE TTCN x x.ttcn> |
| 3254 | module x { |
| 3255 | |
| 3256 | type record of integer rofT; |
| 3257 | |
| 3258 | template rofT temp:= { 1, 2, 3, 4, 5}; |
| 3259 | |
| 3260 | template rofT modTemp modifies temp:= { [2]:= 7, [3]:= 10, [2]:= 14 }; |
| 3261 | |
| 3262 | } |
| 3263 | <END_MODULE> |
| 3264 | <RESULT IF_FAIL COUNT 1> |
| 3265 | (?im)\berror\b.+?Duplicate.+?index.+?value |
| 3266 | <END_RESULT> |
| 3267 | <RESULT IF_FAIL COUNT 1> |
| 3268 | (?is)\berror: |
| 3269 | <END_RESULT> |
| 3270 | <END_TC> |
| 3271 | :exmp. |
| 3272 | |
| 3273 | .*---------------------------------------------------------------------* |
| 3274 | :h4.Value notations - A value notation shall assign a value to a specific element only once - duplicated element assignment in set (const in function) |
| 3275 | .*---------------------------------------------------------------------* |
| 3276 | :xmp tab=0. |
| 3277 | <TC - A value notation shall assign a value to a specific element only once - duplicated element assignment in set (const in function)> |
| 3278 | <COMPILE> |
| 3279 | <VERDICT_LEAF PASS> |
| 3280 | <MODULE TTCN x x.ttcn> |
| 3281 | module x { |
| 3282 | |
| 3283 | type set Set { |
| 3284 | integer I, |
| 3285 | float F, |
| 3286 | charstring CS |
| 3287 | } |
| 3288 | |
| 3289 | function MyFunc() { |
| 3290 | |
| 3291 | const Set s := { |
| 3292 | F:= 0.0, |
| 3293 | I:= 3, |
| 3294 | CS:= "error", |
| 3295 | F:= 9.0 |
| 3296 | }; |
| 3297 | } |
| 3298 | } |
| 3299 | <END_MODULE> |
| 3300 | <RESULT IF_PASS COUNT 1> |
| 3301 | (?im)Duplicate.+?set.+?field |
| 3302 | <END_RESULT> |
| 3303 | <RESULT IF_PASS COUNT 1> |
| 3304 | (?im)Field.+?already.+?given |
| 3305 | <END_RESULT> |
| 3306 | <RESULT IF_PASS COUNT 1> |
| 3307 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 3308 | <END_RESULT> |
| 3309 | <RESULT IF_PASS COUNT 1> |
| 3310 | (?is)\berror: |
| 3311 | <END_RESULT> |
| 3312 | <END_TC> |
| 3313 | :exmp. |
| 3314 | |
| 3315 | .*---------------------------------------------------------------------* |
| 3316 | :h4.Value notations - A value notation shall assign a value to a specific element only once - duplicated element assignment in enumerated type (in def. part) |
| 3317 | .*---------------------------------------------------------------------* |
| 3318 | :xmp tab=0. |
| 3319 | <TC - A value notation shall assign a value to a specific element only once - duplicated element assignment in enumerated type (in def. part)> |
| 3320 | <COMPILE> |
| 3321 | <VERDICT_LEAF PASS> |
| 3322 | <MODULE TTCN x x.ttcn> |
| 3323 | module x { |
| 3324 | |
| 3325 | type enumerated Enum { ONE(1), TWO(2), THREE(1) }; |
| 3326 | |
| 3327 | } |
| 3328 | <END_MODULE> |
| 3329 | <RESULT IF_PASS COUNT 1> |
| 3330 | (?im)Duplicate.+?value.+?enumeration |
| 3331 | <END_RESULT> |
| 3332 | <RESULT IF_PASS COUNT 1> |
| 3333 | (?im)already.+?assigned |
| 3334 | <END_RESULT> |
| 3335 | <RESULT IF_PASS COUNT 1> |
| 3336 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 3337 | <END_RESULT> |
| 3338 | <RESULT IF_PASS COUNT 1> |
| 3339 | (?is)\berror: |
| 3340 | <END_RESULT> |
| 3341 | <END_TC> |
| 3342 | :exmp. |
| 3343 | |
| 3344 | .*---------------------------------------------------------------------* |
| 3345 | :h2.Allowed values (each evaluated expression shall conform to the context-specific rules) |
| 3346 | .*---------------------------------------------------------------------* |
| 3347 | .*---------------------------------------------------------------------* |
| 3348 | :h3.Allowed values of an object identifier |
| 3349 | .*---------------------------------------------------------------------* |
| 3350 | |
| 3351 | This test case group covers the requirement SA-6/8. |
| 3352 | |
| 3353 | Startegy: in assignment of an object identifier the first two elements have to be defined. |
| 3354 | We can define these elements in three ways: |
| 3355 | :list. |
| 3356 | :li D='-'.with numbers : { 0 4 ...} |
| 3357 | :li D='-'.with identifiers : { itu_t identified_organization ...} |
| 3358 | :li D='-'.with both of them : { itu_t(0) identified_organization(4) ...} |
| 3359 | :elist. |
| 3360 | For more information see the ITU-T X.660. |
| 3361 | All occurances shall be tested, where such a notation can be used. |
| 3362 | |
| 3363 | Tested: |
| 3364 | :list. |
| 3365 | :li D='-'.wrong first number in definition part and function |
| 3366 | :li D='-'.wrong identifier in definition part and function |
| 3367 | :elist. |
| 3368 | .*---------------------------------------------------------------------* |
| 3369 | :h4.Allowed values of an object identifier - wrong first number (const in def. part) |
| 3370 | .*---------------------------------------------------------------------* |
| 3371 | :xmp tab=0. |
| 3372 | <TC - Allowed values of an object identifier - wrong first number (const in def. part)> |
| 3373 | <COMPILE> |
| 3374 | <VERDICT_LEAF PASS> |
| 3375 | <MODULE TTCN x x.ttcn> |
| 3376 | module x { |
| 3377 | |
| 3378 | const objid o:= objid{ 6 1 0 0 }; |
| 3379 | } |
| 3380 | <END_MODULE> |
| 3381 | <RESULT IF_PASS COUNT 1> |
| 3382 | (?im)value.+?first.+?OBJECT.+?IDENTIFIER.+?must.+?between.+?instead |
| 3383 | <END_RESULT> |
| 3384 | <RESULT IF_PASS COUNT 1> |
| 3385 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 3386 | <END_RESULT> |
| 3387 | <RESULT IF_PASS COUNT 1> |
| 3388 | (?is)\berror: |
| 3389 | <END_RESULT> |
| 3390 | <END_TC> |
| 3391 | :exmp. |
| 3392 | |
| 3393 | .*---------------------------------------------------------------------* |
| 3394 | :h4.Allowed values of an object identifier - wrong first number (const in function) |
| 3395 | .*---------------------------------------------------------------------* |
| 3396 | :xmp tab=0. |
| 3397 | <TC - Allowed values of an object identifier - wrong first number (const in function)> |
| 3398 | <COMPILE> |
| 3399 | <VERDICT_LEAF PASS> |
| 3400 | <MODULE TTCN x x.ttcn> |
| 3401 | module x { |
| 3402 | |
| 3403 | function MyFunc() { |
| 3404 | |
| 3405 | const objid o:= objid{ 6 1 0 0 }; |
| 3406 | } |
| 3407 | } |
| 3408 | <END_MODULE> |
| 3409 | <RESULT IF_PASS COUNT 1> |
| 3410 | (?im)value.+?first.+?OBJECT.+?IDENTIFIER.+?must.+?between.+?instead |
| 3411 | <END_RESULT> |
| 3412 | <RESULT IF_PASS COUNT 1> |
| 3413 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 3414 | <END_RESULT> |
| 3415 | <RESULT IF_PASS COUNT 1> |
| 3416 | (?is)\berror: |
| 3417 | <END_RESULT> |
| 3418 | <END_TC> |
| 3419 | :exmp. |
| 3420 | |
| 3421 | .*---------------------------------------------------------------------* |
| 3422 | :h4.Allowed values of an object identifier - wrong identifier (const in def. part) |
| 3423 | .*---------------------------------------------------------------------* |
| 3424 | :xmp tab=0. |
| 3425 | <TC - Allowed values of an object identifier - wrong identifier (const in def. part)> |
| 3426 | <COMPILE> |
| 3427 | <VERDICT_LEAF PASS> |
| 3428 | <MODULE TTCN x x.ttcn> |
| 3429 | module x { |
| 3430 | |
| 3431 | const objid o:= objid{ ecci identified_organization ehh(0) behh(0) }; |
| 3432 | } |
| 3433 | <END_MODULE> |
| 3434 | <RESULT IF_PASS COUNT 2> |
| 3435 | (?im)error.+?no.+?local.+?imported.+?definition |
| 3436 | <END_RESULT> |
| 3437 | <RESULT IF_PASS COUNT 1> |
| 3438 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 3439 | <END_RESULT> |
| 3440 | <RESULT IF_PASS COUNT 2> |
| 3441 | (?is)\berror: |
| 3442 | <END_RESULT> |
| 3443 | <END_TC> |
| 3444 | :exmp. |
| 3445 | |
| 3446 | .*---------------------------------------------------------------------* |
| 3447 | :h4.Allowed values of an object identifier - wrong identifier (const in function) |
| 3448 | .*---------------------------------------------------------------------* |
| 3449 | :xmp tab=0. |
| 3450 | <TC - Allowed values of an object identifier - wrong identifier (const in function)> |
| 3451 | <COMPILE> |
| 3452 | <VERDICT_LEAF PASS> |
| 3453 | <MODULE TTCN x x.ttcn> |
| 3454 | module x { |
| 3455 | |
| 3456 | function MyFunc() { |
| 3457 | |
| 3458 | const objid o:= objid{ ecci identified_organization ehh(0) behh(0) }; |
| 3459 | } |
| 3460 | } |
| 3461 | <END_MODULE> |
| 3462 | <RESULT IF_PASS COUNT 2> |
| 3463 | (?im)error.+?no.+?local.+?imported.+?definition |
| 3464 | <END_RESULT> |
| 3465 | <RESULT IF_PASS COUNT 1> |
| 3466 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 3467 | <END_RESULT> |
| 3468 | <RESULT IF_PASS COUNT 2> |
| 3469 | (?is)\berror: |
| 3470 | <END_RESULT> |
| 3471 | <END_TC> |
| 3472 | :exmp. |
| 3473 | |
| 3474 | .*---------------------------------------------------------------------* |
| 3475 | :h3.Allowed values of an universal charstring |
| 3476 | .*---------------------------------------------------------------------* |
| 3477 | This test case group covers the requirement SA-6/9. |
| 3478 | |
| 3479 | Strategy: for information see the ISO/IEC 10646. |
| 3480 | :nl. First number: 0-128 |
| 3481 | :nl. Second number: 0-255 |
| 3482 | :nl. Third number: 0-255 |
| 3483 | :nl. Fourth number: 0-255 |
| 3484 | :nl. Only numbers are allowed. |
| 3485 | All occurances shall be tested, where such a notation can be used. |
| 3486 | |
| 3487 | Tested: |
| 3488 | :list. |
| 3489 | :li D='-'.wrong first number in definition part and function |
| 3490 | :li D='-'.operator in definition part |
| 3491 | :li D='-'.constant in function |
| 3492 | :elist. |
| 3493 | |
| 3494 | .*---------------------------------------------------------------------* |
| 3495 | :h4.Allowed values of an universal charstring - wrong first number (const in def. part) |
| 3496 | .*---------------------------------------------------------------------* |
| 3497 | :xmp tab=0. |
| 3498 | <TC - Allowed values of an universal charstring - wrong first number (const in def. part)> |
| 3499 | <COMPILE> |
| 3500 | <VERDICT_LEAF FAIL> |
| 3501 | <MODULE TTCN x x.ttcn> |
| 3502 | module x { |
| 3503 | |
| 3504 | const universal charstring f:= "aiyyo" & char( 130, 25, 10, 25) & "gerappa"; |
| 3505 | } |
| 3506 | <END_MODULE> |
| 3507 | <RESULT IF_FAIL COUNT 1> |
| 3508 | (?im)\berror\b.+?first.+?number.+?must.+?within.+?range |
| 3509 | <END_RESULT> |
| 3510 | <RESULT IF_FAIL COUNT 1> |
| 3511 | (?is)\berror: |
| 3512 | <END_RESULT> |
| 3513 | <END_TC> |
| 3514 | :exmp. |
| 3515 | |
| 3516 | .*---------------------------------------------------------------------* |
| 3517 | :h4.Allowed values of an universal charstring - wrong first number (const in function) |
| 3518 | .*---------------------------------------------------------------------* |
| 3519 | :xmp tab=0. |
| 3520 | <TC - Allowed values of an universal charstring - wrong first number (const in function)> |
| 3521 | <COMPILE> |
| 3522 | <VERDICT_LEAF FAIL> |
| 3523 | <MODULE TTCN x x.ttcn> |
| 3524 | module x { |
| 3525 | |
| 3526 | function MyFunc() { |
| 3527 | |
| 3528 | const universal charstring f:= "aiyyo" & char( 130, 25, 10, 25) & "gerappa"; |
| 3529 | |
| 3530 | } |
| 3531 | } |
| 3532 | <END_MODULE> |
| 3533 | <RESULT IF_FAIL COUNT 1> |
| 3534 | (?im)\berror\b.+?first.+?number.+?must.+?within.+?range |
| 3535 | <END_RESULT> |
| 3536 | <RESULT IF_FAIL COUNT 1> |
| 3537 | (?is)\berror: |
| 3538 | <END_RESULT> |
| 3539 | <END_TC> |
| 3540 | :exmp. |
| 3541 | |
| 3542 | .*---------------------------------------------------------------------* |
| 3543 | :h4.Allowed values of an universal charstring - operator (const in def. part) |
| 3544 | .*---------------------------------------------------------------------* |
| 3545 | :xmp tab=0. |
| 3546 | <TC - Allowed values of an universal charstring - operator (const in def. part)> |
| 3547 | <COMPILE> |
| 3548 | <VERDICT_LEAF FAIL> |
| 3549 | <MODULE TTCN x x.ttcn> |
| 3550 | module x { |
| 3551 | |
| 3552 | const universal charstring f:= "aiyyo" & char( 13, 25+32, 10, 25) & "gerappa"; |
| 3553 | } |
| 3554 | <END_MODULE> |
| 3555 | <RESULT IF_FAIL COUNT 1> |
| 3556 | (?im)\berror\b.+?syntax.+?error.+?unexpected.+?\+ |
| 3557 | <END_RESULT> |
| 3558 | <RESULT IF_FAIL COUNT 1> |
| 3559 | (?is)\berror: |
| 3560 | <END_RESULT> |
| 3561 | <END_TC> |
| 3562 | :exmp. |
| 3563 | |
| 3564 | .*---------------------------------------------------------------------* |
| 3565 | :h4.Allowed values of an universal charstring - constant (const in function) |
| 3566 | .*---------------------------------------------------------------------* |
| 3567 | :xmp tab=0. |
| 3568 | <TC - Allowed values of an universal charstring - constant (const in function)> |
| 3569 | <COMPILE> |
| 3570 | <VERDICT_LEAF FAIL> |
| 3571 | <MODULE TTCN x x.ttcn> |
| 3572 | module x { |
| 3573 | |
| 3574 | const integer i:= 12; |
| 3575 | |
| 3576 | function MyFunc() { |
| 3577 | |
| 3578 | const universal charstring f:= "aiyyo" & char( i, 25, 10, 25) & "gerappa"; |
| 3579 | |
| 3580 | } |
| 3581 | } |
| 3582 | <END_MODULE> |
| 3583 | <RESULT IF_FAIL COUNT 1> |
| 3584 | (?im)\berror\b.+?syntax.+?error.+?unexpected.+?identifier |
| 3585 | <END_RESULT> |
| 3586 | <RESULT IF_FAIL COUNT 2> |
| 3587 | (?is)\berror: |
| 3588 | <END_RESULT> |
| 3589 | <END_TC> |
| 3590 | :exmp. |
| 3591 | |
| 3592 | .*---------------------------------------------------------------------* |
| 3593 | :h4.Function reference - incompatible types |
| 3594 | .*---------------------------------------------------------------------* |
| 3595 | :xmp tab=0. |
| 3596 | <TC - Function reference - incompatible types> |
| 3597 | <COMPILE> |
| 3598 | <VERDICT_LEAF FAIL> |
| 3599 | <MODULE TTCN x x.ttcn> |
| 3600 | module x { |
| 3601 | type function fntype1(); |
| 3602 | type function fntype2(); |
| 3603 | function MyFunc() { |
| 3604 | var fntype1 f1; |
| 3605 | var fntype2 f2; |
| 3606 | if (f1==f2) { } |
| 3607 | } |
| 3608 | } |
| 3609 | <END_MODULE> |
| 3610 | <RESULT IF_FAIL COUNT 1> |
| 3611 | (?is)\berror: |
| 3612 | <END_RESULT> |
| 3613 | <RESULT IF_FAIL POSITIVE> |
| 3614 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 3615 | <END_RESULT> |
| 3616 | <END_TC> |
| 3617 | :exmp. |
| 3618 | |
| 3619 | .*---------------------------------------------------------------------* |
| 3620 | :h4.Allowed values of an function reference - 1 |
| 3621 | .*---------------------------------------------------------------------* |
| 3622 | :xmp tab=0. |
| 3623 | <TC - Allowed values of an function reference - 1 > |
| 3624 | <COMPILE> |
| 3625 | <VERDICT_LEAF FAIL> |
| 3626 | <MODULE TTCN x x.ttcn> |
| 3627 | module x { |
| 3628 | type function fntype(); |
| 3629 | function fn1(integer i) { } |
| 3630 | function fn2() { } |
| 3631 | function MyFunc() { |
| 3632 | var fntype f1 := refers(fn1); |
| 3633 | var fntype f2 := refers(fn2); |
| 3634 | } |
| 3635 | } |
| 3636 | <END_MODULE> |
| 3637 | <RESULT IF_FAIL COUNT 1> |
| 3638 | (?is)\berror: |
| 3639 | <END_RESULT> |
| 3640 | <RESULT IF_FAIL POSITIVE> |
| 3641 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 3642 | <END_RESULT> |
| 3643 | <END_TC> |
| 3644 | :exmp. |
| 3645 | |
| 3646 | .*---------------------------------------------------------------------* |
| 3647 | :h4.Allowed values of an function reference - 2 |
| 3648 | .*---------------------------------------------------------------------* |
| 3649 | :xmp tab=0. |
| 3650 | <TC - Allowed values of an function reference - 2> |
| 3651 | <COMPILE> |
| 3652 | <VERDICT_LEAF FAIL> |
| 3653 | <MODULE TTCN x x.ttcn> |
| 3654 | module x { |
| 3655 | type function fntype(); |
| 3656 | function fn1() { } |
| 3657 | function fn2() return charstring { return ""; } |
| 3658 | function MyFunc() { |
| 3659 | var fntype f1:= refers(fn1); |
| 3660 | var fntype f2:= refers(fn2); |
| 3661 | } |
| 3662 | } |
| 3663 | <END_MODULE> |
| 3664 | <RESULT IF_FAIL COUNT 1> |
| 3665 | (?is)\berror: |
| 3666 | <END_RESULT> |
| 3667 | <RESULT IF_FAIL POSITIVE> |
| 3668 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 3669 | <END_RESULT> |
| 3670 | <END_TC> |
| 3671 | :exmp. |
| 3672 | |
| 3673 | .*---------------------------------------------------------------------* |
| 3674 | :h4.Allowed values of an function reference - 3 |
| 3675 | .*---------------------------------------------------------------------* |
| 3676 | :xmp tab=0. |
| 3677 | <TC - Allowed values of an function reference - 3> |
| 3678 | <COMPILE> |
| 3679 | <VERDICT_LEAF PASS> |
| 3680 | <MODULE TTCN x x.ttcn> |
| 3681 | module x { |
| 3682 | type function fntype(integer a); |
| 3683 | function fn1(integer b) { } |
| 3684 | function fn2(integer a) { } |
| 3685 | function MyFunc() { |
| 3686 | var fntype f1:= refers(fn1); |
| 3687 | var fntype f2:= refers(fn2); |
| 3688 | } |
| 3689 | } |
| 3690 | <END_MODULE> |
| 3691 | <RESULT IF_PASS COUNT 1> |
| 3692 | (?im)\bwarning\b.+?name.+?of.+?parameter.+?not.+?the.+?same |
| 3693 | <END_RESULT> |
| 3694 | <RESULT IF_FAIL POSITIVE> |
| 3695 | (?is)\berror: |
| 3696 | <END_RESULT> |
| 3697 | <RESULT IF_FAIL POSITIVE> |
| 3698 | (?im)\bnotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 3699 | <END_RESULT> |
| 3700 | <END_TC> |
| 3701 | :exmp. |
| 3702 | |
| 3703 | .*---------------------------------------------------------------------* |
| 3704 | :h3.Allowed values of an index when accessing a single element of a string value |
| 3705 | .*---------------------------------------------------------------------* |
| 3706 | |
| 3707 | This test case group covers the requirement SA-6/10. |
| 3708 | |
| 3709 | Strategy: indexing of string values has to beginning with 0. So shall not |
| 3710 | use negative numbers or higher numbers than size(string)-1. |
| 3711 | All occurances shall be tested, where such a notation can be used. |
| 3712 | |
| 3713 | Tested: |
| 3714 | :list. |
| 3715 | :li D='-'.higher number in index than the size in definition part and function |
| 3716 | :li D='-'.negative index in definition part and function |
| 3717 | :elist. |
| 3718 | |
| 3719 | .*---------------------------------------------------------------------* |
| 3720 | :h4.String indexing - indexing begin with zero (const in def. part) |
| 3721 | .*---------------------------------------------------------------------* |
| 3722 | :xmp tab=0. |
| 3723 | <TC - String indexing - indexing begin with zero (const in def. part)> |
| 3724 | <COMPILE> |
| 3725 | <VERDICT_LEAF PASS> |
| 3726 | <MODULE TTCN x x.ttcn> |
| 3727 | module x { |
| 3728 | |
| 3729 | const charstring CS:="WRONG"; |
| 3730 | const charstring wrongCS := CS[5]; |
| 3731 | |
| 3732 | } |
| 3733 | <END_MODULE> |
| 3734 | <RESULT IF_PASS COUNT 1> |
| 3735 | (?im)Index.+?overflow.+?string.+?element |
| 3736 | <END_RESULT> |
| 3737 | <RESULT IF_PASS COUNT 1> |
| 3738 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 3739 | <END_RESULT> |
| 3740 | <RESULT IF_PASS COUNT 1> |
| 3741 | (?is)\berror: |
| 3742 | <END_RESULT> |
| 3743 | <END_TC> |
| 3744 | :exmp. |
| 3745 | |
| 3746 | .*---------------------------------------------------------------------* |
| 3747 | :h4.String indexing - indexing begin with zero (const in function) |
| 3748 | .*---------------------------------------------------------------------* |
| 3749 | :xmp tab=0. |
| 3750 | <TC - String indexing - indexing begin with zero (const in function)> |
| 3751 | <COMPILE> |
| 3752 | <VERDICT_LEAF PASS> |
| 3753 | <MODULE TTCN x x.ttcn> |
| 3754 | module x { |
| 3755 | |
| 3756 | function MyFunc() { |
| 3757 | |
| 3758 | const charstring CS:="WRONG"; |
| 3759 | const charstring wrongCS := CS[5]; |
| 3760 | } |
| 3761 | } |
| 3762 | <END_MODULE> |
| 3763 | <RESULT IF_PASS COUNT 1> |
| 3764 | (?im)Index.+?overflow.+?string.+?element |
| 3765 | <END_RESULT> |
| 3766 | <RESULT IF_PASS COUNT 1> |
| 3767 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 3768 | <END_RESULT> |
| 3769 | <RESULT IF_PASS COUNT 1> |
| 3770 | (?is)\berror: |
| 3771 | <END_RESULT> |
| 3772 | <END_TC> |
| 3773 | :exmp. |
| 3774 | |
| 3775 | .*---------------------------------------------------------------------* |
| 3776 | :h4.String indexing - indexing must be non-negative (const in def. part) |
| 3777 | .*---------------------------------------------------------------------* |
| 3778 | :xmp tab=0. |
| 3779 | <TC - String indexing - indexing must be non-negative (const in def. part)> |
| 3780 | <COMPILE> |
| 3781 | <VERDICT_LEAF PASS> |
| 3782 | <MODULE TTCN x x.ttcn> |
| 3783 | module x { |
| 3784 | |
| 3785 | const charstring CS:="WRONG"; |
| 3786 | const charstring wrongCS := CS[-1]; |
| 3787 | |
| 3788 | } |
| 3789 | <END_MODULE> |
| 3790 | <RESULT IF_PASS COUNT 1> |
| 3791 | (?im)non-negative.+?value.+?expected.+?instead of.+?indexing.+?string.+?element |
| 3792 | <END_RESULT> |
| 3793 | <RESULT IF_PASS COUNT 1> |
| 3794 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 3795 | <END_RESULT> |
| 3796 | <RESULT IF_PASS COUNT 1> |
| 3797 | (?is)\berror: |
| 3798 | <END_RESULT> |
| 3799 | <END_TC> |
| 3800 | :exmp. |
| 3801 | |
| 3802 | .*---------------------------------------------------------------------* |
| 3803 | :h4.String indexing - indexing must be non-negative (const in function) |
| 3804 | .*---------------------------------------------------------------------* |
| 3805 | :xmp tab=0. |
| 3806 | <TC - String indexing - indexing must be non-negative (const in function)> |
| 3807 | <COMPILE> |
| 3808 | <VERDICT_LEAF PASS> |
| 3809 | <MODULE TTCN x x.ttcn> |
| 3810 | module x { |
| 3811 | |
| 3812 | function MyFunc() { |
| 3813 | |
| 3814 | const charstring CS:="WRONG"; |
| 3815 | const charstring wrongCS := CS[-1]; |
| 3816 | } |
| 3817 | } |
| 3818 | <END_MODULE> |
| 3819 | <RESULT IF_PASS COUNT 1> |
| 3820 | (?im)non-negative.+?value.+?expected.+?instead of.+?indexing.+?string.+?element |
| 3821 | <END_RESULT> |
| 3822 | <RESULT IF_PASS COUNT 1> |
| 3823 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 3824 | <END_RESULT> |
| 3825 | <RESULT IF_PASS COUNT 1> |
| 3826 | (?is)\berror: |
| 3827 | <END_RESULT> |
| 3828 | <END_TC> |
| 3829 | :exmp. |
| 3830 | |
| 3831 | .*---------------------------------------------------------------------* |
| 3832 | :h3.Omitting mandatory fields |
| 3833 | .*---------------------------------------------------------------------* |
| 3834 | |
| 3835 | This test case group covers the requirement SA-6/11. |
| 3836 | |
| 3837 | Strategy: shall not omitting mandatory fields |
| 3838 | All occurances shall be tested, where such a notation can be used. |
| 3839 | |
| 3840 | Tested: - record and set fields in definition part and function |
| 3841 | |
| 3842 | .*---------------------------------------------------------------------* |
| 3843 | :h4.Omitting mandatory fields - wrong optional record field (const in def. part) |
| 3844 | .*---------------------------------------------------------------------* |
| 3845 | :xmp tab=0. |
| 3846 | <TC - Omitting mandatory fields - wrong optional record field (const in def. part)> |
| 3847 | <COMPILE> |
| 3848 | <VERDICT_LEAF PASS> |
| 3849 | <MODULE TTCN x x.ttcn> |
| 3850 | module x { |
| 3851 | |
| 3852 | type record Record { |
| 3853 | integer I, |
| 3854 | float F optional, |
| 3855 | charstring CS |
| 3856 | } |
| 3857 | |
| 3858 | const Record r := { omit, 0.0, "error" }; |
| 3859 | |
| 3860 | } |
| 3861 | <END_MODULE> |
| 3862 | <RESULT IF_PASS COUNT 1> |
| 3863 | (?im)omit.+?not.+?allowed |
| 3864 | <END_RESULT> |
| 3865 | <RESULT IF_PASS COUNT 1> |
| 3866 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 3867 | <END_RESULT> |
| 3868 | <RESULT IF_PASS COUNT 1> |
| 3869 | (?is)\berror: |
| 3870 | <END_RESULT> |
| 3871 | <END_TC> |
| 3872 | :exmp. |
| 3873 | |
| 3874 | .*---------------------------------------------------------------------* |
| 3875 | :h4.Omitting mandatory fields - referencing unbound (const in def. part) |
| 3876 | .*---------------------------------------------------------------------* |
| 3877 | :xmp tab=0. |
| 3878 | <TC - Omitting mandatory fields - referencing unbound (const in def. part)> |
| 3879 | <COMPILE> |
| 3880 | <VERDICT_LEAF PASS> |
| 3881 | <MODULE TTCN x x.ttcn> |
| 3882 | module x { |
| 3883 | |
| 3884 | type record Record { |
| 3885 | integer a, |
| 3886 | integer b |
| 3887 | } |
| 3888 | |
| 3889 | const Record c_R := { b := 1 }; |
| 3890 | const integer c_i := c_R.a |
| 3891 | |
| 3892 | } |
| 3893 | <END_MODULE> |
| 3894 | <RESULT IF_PASS COUNT 1> |
| 3895 | (?im)Reference.+?unbound.+?field |
| 3896 | <END_RESULT> |
| 3897 | <RESULT IF_PASS COUNT 1> |
| 3898 | (?is)\berror: |
| 3899 | <END_RESULT> |
| 3900 | <END_TC> |
| 3901 | :exmp. |
| 3902 | |
| 3903 | .*---------------------------------------------------------------------* |
| 3904 | :h4.Omitting mandatory fields - wrong optional record field (const in function) |
| 3905 | .*---------------------------------------------------------------------* |
| 3906 | :xmp tab=0. |
| 3907 | <TC - Omitting mandatory fields - wrong optional record field (const in function)> |
| 3908 | <COMPILE> |
| 3909 | <VERDICT_LEAF PASS> |
| 3910 | <MODULE TTCN x x.ttcn> |
| 3911 | module x { |
| 3912 | |
| 3913 | type record Record { |
| 3914 | integer I, |
| 3915 | float F optional, |
| 3916 | charstring CS |
| 3917 | } |
| 3918 | |
| 3919 | function MyFunc() { |
| 3920 | |
| 3921 | const Record r := { omit, 0.0, "error" }; |
| 3922 | } |
| 3923 | |
| 3924 | } |
| 3925 | <END_MODULE> |
| 3926 | <RESULT IF_PASS COUNT 1> |
| 3927 | (?im)omit.+?not.+?allowed |
| 3928 | <END_RESULT> |
| 3929 | <RESULT IF_PASS COUNT 1> |
| 3930 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 3931 | <END_RESULT> |
| 3932 | <RESULT IF_PASS COUNT 1> |
| 3933 | (?is)\berror: |
| 3934 | <END_RESULT> |
| 3935 | <END_TC> |
| 3936 | :exmp. |
| 3937 | |
| 3938 | .*---------------------------------------------------------------------* |
| 3939 | :h4.Omitting mandatory fields - wrong optional set field (const in def. part) |
| 3940 | .*---------------------------------------------------------------------* |
| 3941 | :xmp tab=0. |
| 3942 | <TC - Omitting mandatory fields - wrong optional set field> (const in def. part) |
| 3943 | <COMPILE> |
| 3944 | <VERDICT_LEAF PASS> |
| 3945 | <MODULE TTCN x x.ttcn> |
| 3946 | module x { |
| 3947 | |
| 3948 | type set Set { |
| 3949 | integer I, |
| 3950 | float F optional, |
| 3951 | charstring CS |
| 3952 | } |
| 3953 | |
| 3954 | const Set s := { |
| 3955 | F:= 0.0, |
| 3956 | I:= omit, |
| 3957 | CS:= "error" |
| 3958 | }; |
| 3959 | |
| 3960 | } |
| 3961 | <END_MODULE> |
| 3962 | <RESULT IF_PASS COUNT 1> |
| 3963 | (?im)omit.+?not.+?allowed |
| 3964 | <END_RESULT> |
| 3965 | <RESULT IF_PASS COUNT 1> |
| 3966 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 3967 | <END_RESULT> |
| 3968 | <RESULT IF_PASS COUNT 1> |
| 3969 | (?is)\berror: |
| 3970 | <END_RESULT> |
| 3971 | <END_TC> |
| 3972 | :exmp. |
| 3973 | |
| 3974 | .*---------------------------------------------------------------------* |
| 3975 | :h4.Omitting mandatory fields - wrong optional set field (const in function) |
| 3976 | .*---------------------------------------------------------------------* |
| 3977 | :xmp tab=0. |
| 3978 | <TC - Omitting mandatory fields - wrong optional set field> (const in function) |
| 3979 | <COMPILE> |
| 3980 | <VERDICT_LEAF PASS> |
| 3981 | <MODULE TTCN x x.ttcn> |
| 3982 | module x { |
| 3983 | |
| 3984 | type set Set { |
| 3985 | integer I, |
| 3986 | float F optional, |
| 3987 | charstring CS |
| 3988 | } |
| 3989 | |
| 3990 | function MyFunc() { |
| 3991 | |
| 3992 | const Set s := { |
| 3993 | F:= 0.0, |
| 3994 | I:= omit, |
| 3995 | CS:= "error" |
| 3996 | }; |
| 3997 | } |
| 3998 | } |
| 3999 | <END_MODULE> |
| 4000 | <RESULT IF_PASS COUNT 1> |
| 4001 | (?im)omit.+?not.+?allowed |
| 4002 | <END_RESULT> |
| 4003 | <RESULT IF_PASS COUNT 1> |
| 4004 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 4005 | <END_RESULT> |
| 4006 | <RESULT IF_PASS COUNT 1> |
| 4007 | (?is)\berror: |
| 4008 | <END_RESULT> |
| 4009 | <END_TC> |
| 4010 | :exmp. |
| 4011 | |
| 4012 | .*---------------------------------------------------------------------* |
| 4013 | :h3.Values are not constants or literals in subtype-specifications |
| 4014 | .*---------------------------------------------------------------------* |
| 4015 | |
| 4016 | This test case group covers the requirement SA-6/12. |
| 4017 | |
| 4018 | Strategy: values in list, range and string length shall be initialized with constants or literal values. |
| 4019 | So it shall not contains functions returned with random values, and hand-made functions neither. |
| 4020 | See the table 3, side 26. |
| 4021 | All occurances shall be tested, where such a notation can be used. |
| 4022 | |
| 4023 | Tested: |
| 4024 | :list. |
| 4025 | :li D='-'.inner random and hand-made functions in charstring length |
| 4026 | :li D='-'.inner random and hand-made functions in bitstring length-range |
| 4027 | :li D='-'.both type of functions in bitstring length-range |
| 4028 | :li D='-'.inner random and hand-made functions in integer-range |
| 4029 | :li D='-'.both type of functions in float-range |
| 4030 | :li D='-'.inner random and hand-made functions in integer-list |
| 4031 | :li D='-'.both type of functions in float-list |
| 4032 | :elist. |
| 4033 | |
| 4034 | .*---------------------------------------------------------------------* |
| 4035 | :h4.Values are not constants or literals in subtype-specifications - rnd() in length (charstring ) |
| 4036 | .*---------------------------------------------------------------------* |
| 4037 | :xmp tab=0. |
| 4038 | |
| 4039 | <TC - Values are not constants or literals in subtype-specifications - rnd() in length (charstring )> |
| 4040 | |
| 4041 | <COMPILE> |
| 4042 | <VERDICT_LEAF PASS> |
| 4043 | <MODULE TTCN x x.ttcn> |
| 4044 | module x { |
| 4045 | |
| 4046 | type charstring myCharType length( float2int(rnd()) ); |
| 4047 | |
| 4048 | } |
| 4049 | <END_MODULE> |
| 4050 | <RESULT IF_PASS COUNT 1> |
| 4051 | (?im)error.+?evaluable.+?constant.+?value.+?expected.+?instead.+?of.+?operation |
| 4052 | <END_RESULT> |
| 4053 | <RESULT IF_PASS COUNT 1> |
| 4054 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 4055 | <END_RESULT> |
| 4056 | <RESULT IF_PASS COUNT 1> |
| 4057 | (?is)\berror: |
| 4058 | <END_RESULT> |
| 4059 | <END_TC> |
| 4060 | |
| 4061 | :exmp. |
| 4062 | |
| 4063 | .*---------------------------------------------------------------------* |
| 4064 | :h4.Values are not constants or literals in subtype-specifications - hand-made function in length (charstring ) |
| 4065 | .*---------------------------------------------------------------------* |
| 4066 | :xmp tab=0. |
| 4067 | |
| 4068 | <TC - Values are not constants or literals in subtype-specifications - hand-made function in length (charstring )> |
| 4069 | |
| 4070 | <COMPILE> |
| 4071 | <VERDICT_LEAF PASS> |
| 4072 | <MODULE TTCN x x.ttcn> |
| 4073 | module x { |
| 4074 | |
| 4075 | function myFunct() return integer{ |
| 4076 | return 5; |
| 4077 | } |
| 4078 | |
| 4079 | type charstring myCharType length( myFunct() ); |
| 4080 | |
| 4081 | } |
| 4082 | <END_MODULE> |
| 4083 | <RESULT IF_PASS COUNT 1> |
| 4084 | (?im)error.+?Reference.+?constant.+?expected.+?instead |
| 4085 | <END_RESULT> |
| 4086 | <RESULT IF_PASS COUNT 1> |
| 4087 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 4088 | <END_RESULT> |
| 4089 | <RESULT IF_PASS COUNT 1> |
| 4090 | (?is)\berror: |
| 4091 | <END_RESULT> |
| 4092 | <END_TC> |
| 4093 | |
| 4094 | :exmp. |
| 4095 | |
| 4096 | .*---------------------------------------------------------------------* |
| 4097 | :h4.Values are not constants or literals in subtype-specifications - rnd() in length range (bitstring ) |
| 4098 | .*---------------------------------------------------------------------* |
| 4099 | :xmp tab=0. |
| 4100 | |
| 4101 | <TC - Values are not constants or literals in subtype-specifications - rnd() in length range (bitstring )> |
| 4102 | |
| 4103 | <COMPILE> |
| 4104 | <VERDICT_LEAF PASS> |
| 4105 | <MODULE TTCN x x.ttcn> |
| 4106 | module x { |
| 4107 | |
| 4108 | type charstring myCharType length( float2int(rnd()) .. 5 ); |
| 4109 | |
| 4110 | } |
| 4111 | <END_MODULE> |
| 4112 | <RESULT IF_PASS COUNT 1> |
| 4113 | (?im)error.+?evaluable.+?constant.+?value.+?expected.+?instead.+?of.+?operation |
| 4114 | <END_RESULT> |
| 4115 | <RESULT IF_PASS COUNT 1> |
| 4116 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 4117 | <END_RESULT> |
| 4118 | <RESULT IF_PASS COUNT 1> |
| 4119 | (?is)\berror: |
| 4120 | <END_RESULT> |
| 4121 | <END_TC> |
| 4122 | |
| 4123 | :exmp. |
| 4124 | |
| 4125 | .*---------------------------------------------------------------------* |
| 4126 | :h4.Values are not constants or literals in subtype-specifications - hand-made function in length range (bitstring ) |
| 4127 | .*---------------------------------------------------------------------* |
| 4128 | :xmp tab=0. |
| 4129 | |
| 4130 | <TC - Values are not constants or literals in subtype-specifications - hand-made function in length range (bitstring )> |
| 4131 | |
| 4132 | <COMPILE> |
| 4133 | <VERDICT_LEAF PASS> |
| 4134 | <MODULE TTCN x x.ttcn> |
| 4135 | module x { |
| 4136 | |
| 4137 | function myFunct() return integer{ |
| 4138 | return 5; |
| 4139 | } |
| 4140 | |
| 4141 | type charstring myCharType length( 2 .. myFunct()); |
| 4142 | |
| 4143 | } |
| 4144 | <END_MODULE> |
| 4145 | <RESULT IF_PASS COUNT 1> |
| 4146 | (?im)error.+?Reference.+?constant.+?expected.+?instead |
| 4147 | <END_RESULT> |
| 4148 | <RESULT IF_PASS COUNT 1> |
| 4149 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 4150 | <END_RESULT> |
| 4151 | <RESULT IF_PASS COUNT 1> |
| 4152 | (?is)\berror: |
| 4153 | <END_RESULT> |
| 4154 | <END_TC> |
| 4155 | |
| 4156 | :exmp. |
| 4157 | |
| 4158 | .*---------------------------------------------------------------------* |
| 4159 | :h4.Values are not constants or literals in subtype-specifications - both types of functions in length range (bitstring ) |
| 4160 | .*---------------------------------------------------------------------* |
| 4161 | :xmp tab=0. |
| 4162 | |
| 4163 | <TC - Values are not constants or literals in subtype-specifications - both types of functions in length range (bitstring )> |
| 4164 | |
| 4165 | <COMPILE> |
| 4166 | <VERDICT_LEAF PASS> |
| 4167 | <MODULE TTCN x x.ttcn> |
| 4168 | module x { |
| 4169 | |
| 4170 | function myFunct() return integer{ |
| 4171 | return 5; |
| 4172 | } |
| 4173 | |
| 4174 | type charstring myCharType length( float2int(rnd()) .. myFunct()); |
| 4175 | |
| 4176 | } |
| 4177 | <END_MODULE> |
| 4178 | <RESULT IF_PASS COUNT 1> |
| 4179 | (?im)error.+?evaluable.+?constant.+?value.+?expected.+?instead.+?of.+?operation |
| 4180 | <END_RESULT> |
| 4181 | <RESULT IF_PASS COUNT 1> |
| 4182 | (?im)error.+?Reference.+?constant.+?expected.+?instead |
| 4183 | <END_RESULT> |
| 4184 | <RESULT IF_PASS COUNT 1> |
| 4185 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 4186 | <END_RESULT> |
| 4187 | <RESULT IF_PASS COUNT 2> |
| 4188 | (?is)\berror: |
| 4189 | <END_RESULT> |
| 4190 | <END_TC> |
| 4191 | |
| 4192 | :exmp. |
| 4193 | |
| 4194 | .*---------------------------------------------------------------------* |
| 4195 | :h4.Values are not constants or literals in subtype-specifications - rnd() in range (integer ) |
| 4196 | .*---------------------------------------------------------------------* |
| 4197 | :xmp tab=0. |
| 4198 | |
| 4199 | <TC - Values are not constants or literals in subtype-specifications - rnd() in range (integer )> |
| 4200 | |
| 4201 | <COMPILE> |
| 4202 | <VERDICT_LEAF PASS> |
| 4203 | <MODULE TTCN x x.ttcn> |
| 4204 | module x { |
| 4205 | |
| 4206 | type integer myIntType ( float2int(rnd()) .. 255 ); |
| 4207 | |
| 4208 | } |
| 4209 | <END_MODULE> |
| 4210 | <RESULT IF_PASS COUNT 1> |
| 4211 | (?im)error.+?evaluable.+?constant.+?value.+?expected.+?instead.+?of.+?operation |
| 4212 | <END_RESULT> |
| 4213 | <RESULT IF_PASS COUNT 1> |
| 4214 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 4215 | <END_RESULT> |
| 4216 | <RESULT IF_PASS COUNT 1> |
| 4217 | (?is)\berror: |
| 4218 | <END_RESULT> |
| 4219 | <END_TC> |
| 4220 | |
| 4221 | :exmp. |
| 4222 | |
| 4223 | .*---------------------------------------------------------------------* |
| 4224 | :h4.Values are not constants or literals in subtype-specifications - hand-made function in range (integer ) |
| 4225 | .*---------------------------------------------------------------------* |
| 4226 | :xmp tab=0. |
| 4227 | |
| 4228 | <TC - Values are not constants or literals in subtype-specifications - hand-made function in range (integer )> |
| 4229 | |
| 4230 | <COMPILE> |
| 4231 | <VERDICT_LEAF PASS> |
| 4232 | <MODULE TTCN x x.ttcn> |
| 4233 | module x { |
| 4234 | |
| 4235 | function myFunct() return integer{ |
| 4236 | return 5; |
| 4237 | } |
| 4238 | |
| 4239 | type integer myIntType ( 255 .. myFunct() ); |
| 4240 | |
| 4241 | } |
| 4242 | <END_MODULE> |
| 4243 | <RESULT IF_PASS COUNT 1> |
| 4244 | (?im)error.+?Reference.+?constant.+?expected.+?instead |
| 4245 | <END_RESULT> |
| 4246 | <RESULT IF_PASS COUNT 1> |
| 4247 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 4248 | <END_RESULT> |
| 4249 | <RESULT IF_PASS COUNT 1> |
| 4250 | (?is)\berror: |
| 4251 | <END_RESULT> |
| 4252 | <END_TC> |
| 4253 | |
| 4254 | :exmp. |
| 4255 | |
| 4256 | .*---------------------------------------------------------------------* |
| 4257 | :h4.Values are not constants or literals in subtype-specifications - both types of functions in range (float ) |
| 4258 | .*---------------------------------------------------------------------* |
| 4259 | :xmp tab=0. |
| 4260 | |
| 4261 | <TC - Values are not constants or literals in subtype-specifications - both types of functions in range (float )> |
| 4262 | |
| 4263 | <COMPILE> |
| 4264 | <VERDICT_LEAF PASS> |
| 4265 | <MODULE TTCN x x.ttcn> |
| 4266 | module x { |
| 4267 | |
| 4268 | function myFunct() return float{ |
| 4269 | return 5.0; |
| 4270 | } |
| 4271 | |
| 4272 | type float myIntType ( rnd() .. myFunct() ); |
| 4273 | |
| 4274 | } |
| 4275 | <END_MODULE> |
| 4276 | <RESULT IF_PASS COUNT 1> |
| 4277 | (?im)error.+?evaluable.+?constant.+?value.+?expected.+?instead.+?of.+?operation |
| 4278 | <END_RESULT> |
| 4279 | <RESULT IF_PASS COUNT 1> |
| 4280 | (?im)error.+?Reference.+?constant.+?expected.+?instead |
| 4281 | <END_RESULT> |
| 4282 | <RESULT IF_PASS COUNT 1> |
| 4283 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 4284 | <END_RESULT> |
| 4285 | <RESULT IF_PASS COUNT 2> |
| 4286 | (?is)\berror: |
| 4287 | <END_RESULT> |
| 4288 | <END_TC> |
| 4289 | |
| 4290 | :exmp. |
| 4291 | |
| 4292 | .*---------------------------------------------------------------------* |
| 4293 | :h4.Values are not constants or literals in subtype-specifications - rnd() in list (integer ) |
| 4294 | .*---------------------------------------------------------------------* |
| 4295 | :xmp tab=0. |
| 4296 | |
| 4297 | <TC - Values are not constants or literals in subtype-specifications - rnd() in list (integer )> |
| 4298 | |
| 4299 | <COMPILE> |
| 4300 | <VERDICT_LEAF PASS> |
| 4301 | <MODULE TTCN x x.ttcn> |
| 4302 | module x { |
| 4303 | |
| 4304 | type integer myIntType ( float2int(rnd()), 255 ); |
| 4305 | |
| 4306 | } |
| 4307 | <END_MODULE> |
| 4308 | <RESULT IF_PASS COUNT 1> |
| 4309 | (?im)error.+?evaluable.+?constant.+?value.+?expected.+?instead.+?of.+?operation |
| 4310 | <END_RESULT> |
| 4311 | <RESULT IF_PASS COUNT 1> |
| 4312 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 4313 | <END_RESULT> |
| 4314 | <RESULT IF_PASS COUNT 1> |
| 4315 | (?is)\berror: |
| 4316 | <END_RESULT> |
| 4317 | <END_TC> |
| 4318 | |
| 4319 | :exmp. |
| 4320 | |
| 4321 | .*---------------------------------------------------------------------* |
| 4322 | :h4.Values are not constants or literals in subtype-specifications - hand-made function in list (integer ) |
| 4323 | .*---------------------------------------------------------------------* |
| 4324 | :xmp tab=0. |
| 4325 | |
| 4326 | <TC - Values are not constants or literals in subtype-specifications - hand-made function in list (integer )> |
| 4327 | |
| 4328 | <COMPILE> |
| 4329 | <VERDICT_LEAF PASS> |
| 4330 | <MODULE TTCN x x.ttcn> |
| 4331 | module x { |
| 4332 | |
| 4333 | function myFunct() return integer{ |
| 4334 | return 5; |
| 4335 | } |
| 4336 | |
| 4337 | type integer myIntType ( 255, myFunct() ); |
| 4338 | |
| 4339 | } |
| 4340 | <END_MODULE> |
| 4341 | <RESULT IF_PASS COUNT 1> |
| 4342 | (?im)error.+?Reference.+?constant.+?expected.+?instead |
| 4343 | <END_RESULT> |
| 4344 | <RESULT IF_PASS COUNT 1> |
| 4345 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 4346 | <END_RESULT> |
| 4347 | <RESULT IF_PASS COUNT 1> |
| 4348 | (?is)\berror: |
| 4349 | <END_RESULT> |
| 4350 | <END_TC> |
| 4351 | |
| 4352 | :exmp. |
| 4353 | |
| 4354 | .*---------------------------------------------------------------------* |
| 4355 | :h4.Values are not constants or literals in subtype-specifications - both types of functions in list (float ) |
| 4356 | .*---------------------------------------------------------------------* |
| 4357 | :xmp tab=0. |
| 4358 | |
| 4359 | <TC - Values are not constants or literals in subtype-specifications - both types of functions in list (float )> |
| 4360 | |
| 4361 | <COMPILE> |
| 4362 | <VERDICT_LEAF PASS> |
| 4363 | <MODULE TTCN x x.ttcn> |
| 4364 | module x { |
| 4365 | |
| 4366 | function myFunct() return float{ |
| 4367 | return 5.0; |
| 4368 | } |
| 4369 | |
| 4370 | type float myIntType ( rnd(), 255.0, myFunct() ); |
| 4371 | |
| 4372 | } |
| 4373 | <END_MODULE> |
| 4374 | <RESULT IF_PASS COUNT 1> |
| 4375 | (?im)error.+?evaluable.+?constant.+?value.+?expected.+?instead.+?of.+?operation |
| 4376 | <END_RESULT> |
| 4377 | <RESULT IF_PASS COUNT 1> |
| 4378 | (?im)error.+?Reference.+?constant.+?expected.+?instead |
| 4379 | <END_RESULT> |
| 4380 | <RESULT IF_PASS COUNT 1> |
| 4381 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 4382 | <END_RESULT> |
| 4383 | <RESULT IF_PASS COUNT 2> |
| 4384 | (?is)\berror: |
| 4385 | <END_RESULT> |
| 4386 | <END_TC> |
| 4387 | |
| 4388 | :exmp. |
| 4389 | |
| 4390 | .*---------------------------------------------------------------------* |
| 4391 | :h3.Negative string lengths |
| 4392 | .*---------------------------------------------------------------------* |
| 4393 | |
| 4394 | This test case group covers the requirement SA-6/13. |
| 4395 | |
| 4396 | Strategy: TTCN-3 permits specification of length restrictions on string types. In all cases, the boundaries shall evaluate to non-negative integer or derived integer constant values. |
| 4397 | All occurances shall be tested, where such a notation can be used. |
| 4398 | |
| 4399 | Tested: |
| 4400 | :list. |
| 4401 | :li D='-'.type and ranged type definition in definition part for charstring |
| 4402 | :li D='-'.charstring in definition part |
| 4403 | :li D='-'.bitstring in function |
| 4404 | :elist. |
| 4405 | |
| 4406 | .*---------------------------------------------------------------------* |
| 4407 | :h4.Negative string lengths - type definition (charstring in def.part) |
| 4408 | .*---------------------------------------------------------------------* |
| 4409 | :xmp tab=0. |
| 4410 | |
| 4411 | <TC - Negative string lengths - type definition (charstring in def.part)> |
| 4412 | |
| 4413 | <COMPILE> |
| 4414 | <VERDICT_LEAF PASS> |
| 4415 | <MODULE TTCN x x.ttcn> |
| 4416 | module x { |
| 4417 | |
| 4418 | const integer i:= -6; |
| 4419 | |
| 4420 | type charstring myChars length( i); |
| 4421 | |
| 4422 | } |
| 4423 | <END_MODULE> |
| 4424 | <RESULT IF_PASS COUNT 1> |
| 4425 | (?im)error.+?length.+?restriction.+?must.+?non-negative |
| 4426 | <END_RESULT> |
| 4427 | <RESULT IF_PASS COUNT 1> |
| 4428 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 4429 | <END_RESULT> |
| 4430 | <RESULT IF_PASS COUNT 1> |
| 4431 | (?is)\berror: |
| 4432 | <END_RESULT> |
| 4433 | <END_TC> |
| 4434 | |
| 4435 | :exmp. |
| 4436 | |
| 4437 | .*---------------------------------------------------------------------* |
| 4438 | :h4.Negative string lengths - ranged type definition (charstring in def.part) |
| 4439 | .*---------------------------------------------------------------------* |
| 4440 | :xmp tab=0. |
| 4441 | |
| 4442 | <TC - Negative string lengths - ranged type definition (charstring in def.part)> |
| 4443 | |
| 4444 | <COMPILE> |
| 4445 | <VERDICT_LEAF PASS> |
| 4446 | <MODULE TTCN x x.ttcn> |
| 4447 | module x { |
| 4448 | |
| 4449 | const integer i:= -5; |
| 4450 | |
| 4451 | type charstring myChars length( i..3); |
| 4452 | |
| 4453 | } |
| 4454 | <END_MODULE> |
| 4455 | <RESULT IF_PASS COUNT 1> |
| 4456 | (?im)error.+?Lower.+?boundary.+?length.+?restriction.+?must.+?non-negative |
| 4457 | <END_RESULT> |
| 4458 | <RESULT IF_PASS COUNT 1> |
| 4459 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 4460 | <END_RESULT> |
| 4461 | <RESULT IF_PASS COUNT 1> |
| 4462 | (?is)\berror: |
| 4463 | <END_RESULT> |
| 4464 | <END_TC> |
| 4465 | |
| 4466 | :exmp. |
| 4467 | |
| 4468 | .*---------------------------------------------------------------------* |
| 4469 | :h4.Negative string lengths - using (charstring in def.part) |
| 4470 | .*---------------------------------------------------------------------* |
| 4471 | :xmp tab=0. |
| 4472 | |
| 4473 | <TC - Negative string lengths - using (charstring in def.part)> |
| 4474 | |
| 4475 | <COMPILE> |
| 4476 | <VERDICT_LEAF PASS> |
| 4477 | <MODULE TTCN x x.ttcn> |
| 4478 | module x { |
| 4479 | |
| 4480 | const charstring myChars:= "aiyyo"; |
| 4481 | const charstring f:= myChars[-1]; |
| 4482 | |
| 4483 | } |
| 4484 | <END_MODULE> |
| 4485 | <RESULT IF_PASS COUNT 1> |
| 4486 | (?im)error.+?non-negative.+?value.+?expected |
| 4487 | <END_RESULT> |
| 4488 | <RESULT IF_PASS COUNT 1> |
| 4489 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 4490 | <END_RESULT> |
| 4491 | <RESULT IF_PASS COUNT 1> |
| 4492 | (?is)\berror: |
| 4493 | <END_RESULT> |
| 4494 | <END_TC> |
| 4495 | |
| 4496 | :exmp. |
| 4497 | |
| 4498 | .*---------------------------------------------------------------------* |
| 4499 | :h4.Negative string lengths - using (bitstring in function) |
| 4500 | .*---------------------------------------------------------------------* |
| 4501 | :xmp tab=0. |
| 4502 | |
| 4503 | <TC - Negative string lengths - using (bitstring in function)> |
| 4504 | |
| 4505 | <COMPILE> |
| 4506 | <VERDICT_LEAF PASS> |
| 4507 | <MODULE TTCN x x.ttcn> |
| 4508 | module x { |
| 4509 | |
| 4510 | const integer i:= -9; |
| 4511 | const bitstring myBits:= '100001'B; |
| 4512 | const bitstring f:= myBits[i]; |
| 4513 | |
| 4514 | } |
| 4515 | <END_MODULE> |
| 4516 | <RESULT IF_PASS COUNT 1> |
| 4517 | (?im)error.+?non-negative.+?value.+?expected |
| 4518 | <END_RESULT> |
| 4519 | <RESULT IF_PASS COUNT 1> |
| 4520 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 4521 | <END_RESULT> |
| 4522 | <RESULT IF_PASS COUNT 1> |
| 4523 | (?is)\berror: |
| 4524 | <END_RESULT> |
| 4525 | <END_TC> |
| 4526 | |
| 4527 | :exmp. |
| 4528 | |
| 4529 | .*---------------------------------------------------------------------* |
| 4530 | :h3.Dimension in arrays |
| 4531 | .*---------------------------------------------------------------------* |
| 4532 | |
| 4533 | This test case group covers the requirement SA-6/14. |
| 4534 | |
| 4535 | Strategy: Array dimensions shall be specified using constant expressions which shall evaluate to a positive integer value. |
| 4536 | All occurances shall be tested, where such a notation can be used. |
| 4537 | |
| 4538 | Tested: |
| 4539 | :list. |
| 4540 | :li D='-'.declaration of integer array with references in control part and function |
| 4541 | :li D='-'.declaration of timer array with references in control part and function |
| 4542 | :li D='-'.declaration of integer ranged array with references in control part and function |
| 4543 | :li D='-'.declaration of timer ranged array with references in control part and function |
| 4544 | :li D='-'.declaration of integer array with negative numbers in control part and function |
| 4545 | :li D='-'.declaration of timer array with negative numbers in control part and function |
| 4546 | :li D='-'.declaration of port array with negative numbers in definition part |
| 4547 | :li D='-'.declaration of integer ranged array with negative numbers in control part and function |
| 4548 | :li D='-'.declaration of timer ranged array with negative numbers in control part and function |
| 4549 | :li D='-'.declaration of port ranged array with negative numbers in control part and function |
| 4550 | :li D='-'.declaration of integer array with zero number in control part and function |
| 4551 | :li D='-'.declaration of timer array with zero numbers in control part and function |
| 4552 | :li D='-'.declaration of port array with zero numbers in definition part |
| 4553 | :li D='-'.using of integer array with negative numbers in control part and function |
| 4554 | :li D='-'.using of timer array with negative numbers in control part and function |
| 4555 | :li D='-'.using of port array with negative numbers in function |
| 4556 | :li D='-'.using of integer ranged array with negative numbers in control part and function |
| 4557 | :li D='-'.using of timer ranged array with negative numbers in control part and function |
| 4558 | :li D='-'.using of port ranged array with negative numbers in function |
| 4559 | :elist. |
| 4560 | NOTE: it works for timer arrays |
| 4561 | |
| 4562 | .*---------------------------------------------------------------------* |
| 4563 | :h4.Dimension in arrays - variable declaration with references (integer array in control part) |
| 4564 | .*---------------------------------------------------------------------* |
| 4565 | :xmp tab=0. |
| 4566 | |
| 4567 | <TC - Dimension in arrays - variable declaration with references (integer array in control part)> |
| 4568 | |
| 4569 | <COMPILE> |
| 4570 | <VERDICT_LEAF FAIL> |
| 4571 | <MODULE TTCN x x.ttcn> |
| 4572 | module x { |
| 4573 | |
| 4574 | control{ |
| 4575 | var integer i:= 4; |
| 4576 | |
| 4577 | // TR693 |
| 4578 | var integer myArr[2][i]; |
| 4579 | } |
| 4580 | } |
| 4581 | <END_MODULE> |
| 4582 | <RESULT IF_PASS COUNT 1> |
| 4583 | (?im)error.+?Reference.+?to.+?constant.+?value.+?expected |
| 4584 | <END_RESULT> |
| 4585 | <RESULT IF_PASS COUNT 1> |
| 4586 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 4587 | <END_RESULT> |
| 4588 | <RESULT IF_PASS COUNT 1> |
| 4589 | (?is)\berror: |
| 4590 | <END_RESULT> |
| 4591 | <RESULT IF_FAIL COUNT 1> |
| 4592 | (?is)\berror: |
| 4593 | <END_RESULT> |
| 4594 | <END_TC> |
| 4595 | |
| 4596 | :exmp. |
| 4597 | |
| 4598 | .*---------------------------------------------------------------------* |
| 4599 | :h4.Dimension in arrays - variable declaration with references (integer array in function) |
| 4600 | .*---------------------------------------------------------------------* |
| 4601 | :xmp tab=0. |
| 4602 | |
| 4603 | <TC - Dimension in arrays - variable declaration with references (integer array in function)> |
| 4604 | |
| 4605 | <COMPILE> |
| 4606 | <VERDICT_LEAF FAIL> |
| 4607 | <MODULE TTCN x x.ttcn> |
| 4608 | module x { |
| 4609 | |
| 4610 | function myFunct(){ |
| 4611 | var integer i:= 9; |
| 4612 | |
| 4613 | // TR693 |
| 4614 | var integer myArr[i][3]; |
| 4615 | } |
| 4616 | } |
| 4617 | <END_MODULE> |
| 4618 | <RESULT IF_PASS COUNT 1> |
| 4619 | (?im)error.+?Reference.+?to.+?constant.+?value.+?expected |
| 4620 | <END_RESULT> |
| 4621 | <RESULT IF_PASS COUNT 1> |
| 4622 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 4623 | <END_RESULT> |
| 4624 | <RESULT IF_PASS COUNT 1> |
| 4625 | (?is)\berror: |
| 4626 | <END_RESULT> |
| 4627 | <RESULT IF_FAIL COUNT 1> |
| 4628 | (?is)\berror: |
| 4629 | <END_RESULT> |
| 4630 | <END_TC> |
| 4631 | |
| 4632 | :exmp. |
| 4633 | |
| 4634 | .*---------------------------------------------------------------------* |
| 4635 | :h4.Dimension in arrays - timer declaration with references (in control part) |
| 4636 | .*---------------------------------------------------------------------* |
| 4637 | :xmp tab=0. |
| 4638 | |
| 4639 | <TC - Dimension in arrays - timer declaration with references (in control part)> |
| 4640 | |
| 4641 | <COMPILE> |
| 4642 | <VERDICT_LEAF PASS> |
| 4643 | <MODULE TTCN x x.ttcn> |
| 4644 | module x { |
| 4645 | |
| 4646 | control{ |
| 4647 | var integer i:= 4; |
| 4648 | timer myTimerArr[2][i]; |
| 4649 | } |
| 4650 | } |
| 4651 | <END_MODULE> |
| 4652 | <RESULT IF_PASS COUNT 1> |
| 4653 | (?im)error.+?Reference.+?to.+?constant.+?value.+?expected |
| 4654 | <END_RESULT> |
| 4655 | <RESULT IF_PASS COUNT 1> |
| 4656 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 4657 | <END_RESULT> |
| 4658 | <RESULT IF_PASS COUNT 1> |
| 4659 | (?is)\berror: |
| 4660 | <END_RESULT> |
| 4661 | <END_TC> |
| 4662 | |
| 4663 | :exmp. |
| 4664 | |
| 4665 | .*---------------------------------------------------------------------* |
| 4666 | :h4.Dimension in arrays - timer declaration with references (in function) |
| 4667 | .*---------------------------------------------------------------------* |
| 4668 | :xmp tab=0. |
| 4669 | |
| 4670 | <TC - Dimension in arrays - timer declaration with references (in function)> |
| 4671 | |
| 4672 | <COMPILE> |
| 4673 | <VERDICT_LEAF PASS> |
| 4674 | <MODULE TTCN x x.ttcn> |
| 4675 | module x { |
| 4676 | |
| 4677 | function myFunct(){ |
| 4678 | var integer i:= 9; |
| 4679 | |
| 4680 | // TR 693 |
| 4681 | timer myTimerArr[i][3]; |
| 4682 | } |
| 4683 | } |
| 4684 | <END_MODULE> |
| 4685 | <RESULT IF_PASS COUNT 1> |
| 4686 | (?im)error.+?Reference.+?to.+?constant.+?value.+?expected |
| 4687 | <END_RESULT> |
| 4688 | <RESULT IF_PASS COUNT 1> |
| 4689 | (?is)\berror: |
| 4690 | <END_RESULT> |
| 4691 | <END_TC> |
| 4692 | |
| 4693 | :exmp. |
| 4694 | |
| 4695 | .*---------------------------------------------------------------------* |
| 4696 | :h4.Dimension in arrays - port declaration with references (in def.part) |
| 4697 | .*---------------------------------------------------------------------* |
| 4698 | :xmp tab=0. |
| 4699 | |
| 4700 | <TC - Dimension in arrays - port declaration with references (in def.part)> |
| 4701 | |
| 4702 | <COMPILE> |
| 4703 | <VERDICT_LEAF PASS> |
| 4704 | <MODULE TTCN x x.ttcn> |
| 4705 | module x { |
| 4706 | |
| 4707 | //TR 726 |
| 4708 | type port myport message{inout charstring}; |
| 4709 | type myport akarmi[5]; |
| 4710 | |
| 4711 | } |
| 4712 | <END_MODULE> |
| 4713 | <RESULT IF_PASS COUNT 1> |
| 4714 | (?im)error.+?cannot.+?embedded.+?into.+?array.+?type |
| 4715 | <END_RESULT> |
| 4716 | <RESULT IF_PASS COUNT 1> |
| 4717 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 4718 | <END_RESULT> |
| 4719 | <RESULT IF_PASS COUNT 1> |
| 4720 | (?is)\berror: |
| 4721 | <END_RESULT> |
| 4722 | <END_TC> |
| 4723 | |
| 4724 | :exmp. |
| 4725 | |
| 4726 | .*---------------------------------------------------------------------* |
| 4727 | :h4.Dimension in arrays - variable declaration with references (integer ranged-array in control part) |
| 4728 | .*---------------------------------------------------------------------* |
| 4729 | :xmp tab=0. |
| 4730 | |
| 4731 | <TC - Dimension in arrays - variable declaration with references (integer ranged-array in control part)> |
| 4732 | |
| 4733 | <COMPILE> |
| 4734 | <VERDICT_LEAF FAIL> |
| 4735 | <MODULE TTCN x x.ttcn> |
| 4736 | module x { |
| 4737 | |
| 4738 | control{ |
| 4739 | var integer i:= 4; |
| 4740 | |
| 4741 | // TR 693 |
| 4742 | var integer myArr[2..i][3..4]; |
| 4743 | } |
| 4744 | } |
| 4745 | <END_MODULE> |
| 4746 | <RESULT IF_PASS COUNT 1> |
| 4747 | (?im)error.+?Reference.+?to.+?constant.+?value.+?expected |
| 4748 | <END_RESULT> |
| 4749 | <RESULT IF_PASS COUNT 1> |
| 4750 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 4751 | <END_RESULT> |
| 4752 | <RESULT IF_PASS COUNT 1> |
| 4753 | (?is)\berror: |
| 4754 | <END_RESULT> |
| 4755 | <RESULT IF_FAIL COUNT 1> |
| 4756 | (?is)\berror: |
| 4757 | <END_RESULT> |
| 4758 | <END_TC> |
| 4759 | |
| 4760 | :exmp. |
| 4761 | |
| 4762 | .*---------------------------------------------------------------------* |
| 4763 | :h4.Dimension in arrays - variable declaration with references (integer ranged-array in function) |
| 4764 | .*---------------------------------------------------------------------* |
| 4765 | :xmp tab=0. |
| 4766 | |
| 4767 | <TC - Dimension in arrays - variable declaration with references (integer ranged-array in function)> |
| 4768 | |
| 4769 | <COMPILE> |
| 4770 | <VERDICT_LEAF FAIL> |
| 4771 | <MODULE TTCN x x.ttcn> |
| 4772 | module x { |
| 4773 | |
| 4774 | function myFunct(){ |
| 4775 | var integer i:= 4; |
| 4776 | |
| 4777 | // TR 693 |
| 4778 | var integer myArr[2..6][3..i]; |
| 4779 | } |
| 4780 | } |
| 4781 | <END_MODULE> |
| 4782 | <RESULT IF_PASS COUNT 1> |
| 4783 | (?im)error.+?Reference.+?to.+?constant.+?value.+?expected |
| 4784 | <END_RESULT> |
| 4785 | <RESULT IF_PASS COUNT 1> |
| 4786 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 4787 | <END_RESULT> |
| 4788 | <RESULT IF_PASS COUNT 1> |
| 4789 | (?is)\berror: |
| 4790 | <END_RESULT> |
| 4791 | <RESULT IF_FAIL COUNT 1> |
| 4792 | (?is)\berror: |
| 4793 | <END_RESULT> |
| 4794 | <END_TC> |
| 4795 | |
| 4796 | :exmp. |
| 4797 | |
| 4798 | .*---------------------------------------------------------------------* |
| 4799 | :h4.Dimension in arrays - timer declaration with references (ranged-array in control part) |
| 4800 | .*---------------------------------------------------------------------* |
| 4801 | :xmp tab=0. |
| 4802 | |
| 4803 | <TC - Dimension in arrays - timer declaration with references (ranged-array in control part)> |
| 4804 | |
| 4805 | <COMPILE> |
| 4806 | <VERDICT_LEAF PASS> |
| 4807 | <MODULE TTCN x x.ttcn> |
| 4808 | module x { |
| 4809 | |
| 4810 | control{ |
| 4811 | var integer i:= 4; |
| 4812 | timer myTimerArr[i..6][3..4]; |
| 4813 | } |
| 4814 | } |
| 4815 | <END_MODULE> |
| 4816 | <RESULT IF_PASS COUNT 1> |
| 4817 | (?im)error.+?Reference.+?to.+?constant.+?value.+?expected |
| 4818 | <END_RESULT> |
| 4819 | <RESULT IF_PASS COUNT 1> |
| 4820 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 4821 | <END_RESULT> |
| 4822 | <RESULT IF_PASS COUNT 1> |
| 4823 | (?is)\berror: |
| 4824 | <END_RESULT> |
| 4825 | <END_TC> |
| 4826 | |
| 4827 | :exmp. |
| 4828 | |
| 4829 | .*---------------------------------------------------------------------* |
| 4830 | :h4.Dimension in arrays - timer declaration with references (ranged-array in function) |
| 4831 | .*---------------------------------------------------------------------* |
| 4832 | :xmp tab=0. |
| 4833 | |
| 4834 | <TC - Dimension in arrays - timer declaration with references (ranged-array in function)> |
| 4835 | |
| 4836 | <COMPILE> |
| 4837 | <VERDICT_LEAF PASS> |
| 4838 | <MODULE TTCN x x.ttcn> |
| 4839 | module x { |
| 4840 | |
| 4841 | function myFunct(){ |
| 4842 | var integer i:= 4; |
| 4843 | timer myTimerArr[2..i][3..4]; |
| 4844 | } |
| 4845 | } |
| 4846 | <END_MODULE> |
| 4847 | <RESULT IF_PASS COUNT 1> |
| 4848 | (?im)error.+?Reference.+?to.+?constant.+?value.+?expected |
| 4849 | <END_RESULT> |
| 4850 | <RESULT IF_PASS COUNT 1> |
| 4851 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 4852 | <END_RESULT> |
| 4853 | <RESULT IF_PASS COUNT 1> |
| 4854 | (?is)\berror: |
| 4855 | <END_RESULT> |
| 4856 | <END_TC> |
| 4857 | |
| 4858 | :exmp. |
| 4859 | |
| 4860 | .*---------------------------------------------------------------------* |
| 4861 | :h4.Dimension in arrays - variable declaration with negative literal (integer array in control part) |
| 4862 | .*---------------------------------------------------------------------* |
| 4863 | :xmp tab=0. |
| 4864 | |
| 4865 | <TC - Dimension in arrays - variable declaration with negative literal (integer array in control part)> |
| 4866 | |
| 4867 | <COMPILE> |
| 4868 | <VERDICT_LEAF PASS> |
| 4869 | <MODULE TTCN x x.ttcn> |
| 4870 | module x { |
| 4871 | |
| 4872 | control{ |
| 4873 | var integer myArr[2][-3]; |
| 4874 | } |
| 4875 | } |
| 4876 | <END_MODULE> |
| 4877 | <RESULT IF_PASS COUNT 1> |
| 4878 | (?im)error.+?positive.+?value.+?expected.+?array.+?size |
| 4879 | <END_RESULT> |
| 4880 | <RESULT IF_PASS COUNT 1> |
| 4881 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 4882 | <END_RESULT> |
| 4883 | <RESULT IF_PASS COUNT 1> |
| 4884 | (?is)\berror: |
| 4885 | <END_RESULT> |
| 4886 | <END_TC> |
| 4887 | |
| 4888 | :exmp. |
| 4889 | |
| 4890 | .*---------------------------------------------------------------------* |
| 4891 | :h4.Dimension in arrays - variable declaration with negative constants (integer array in function) |
| 4892 | .*---------------------------------------------------------------------* |
| 4893 | :xmp tab=0. |
| 4894 | |
| 4895 | <TC - Dimension in arrays - variable declaration with negative constants (integer array in function)> |
| 4896 | |
| 4897 | <COMPILE> |
| 4898 | <VERDICT_LEAF PASS> |
| 4899 | <MODULE TTCN x x.ttcn> |
| 4900 | module x { |
| 4901 | |
| 4902 | function myFunct(){ |
| 4903 | |
| 4904 | const integer i:= -5; |
| 4905 | var integer myArr[i][3]; |
| 4906 | } |
| 4907 | } |
| 4908 | <END_MODULE> |
| 4909 | <RESULT IF_PASS COUNT 1> |
| 4910 | (?im)error.+?positive.+?value.+?expected.+?array.+?size |
| 4911 | <END_RESULT> |
| 4912 | <RESULT IF_PASS COUNT 1> |
| 4913 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 4914 | <END_RESULT> |
| 4915 | <RESULT IF_PASS COUNT 1> |
| 4916 | (?is)\berror: |
| 4917 | <END_RESULT> |
| 4918 | <END_TC> |
| 4919 | |
| 4920 | :exmp. |
| 4921 | |
| 4922 | .*---------------------------------------------------------------------* |
| 4923 | :h4.Dimension in arrays - timer declaration with negative literal (in control part) |
| 4924 | .*---------------------------------------------------------------------* |
| 4925 | :xmp tab=0. |
| 4926 | |
| 4927 | <TC - Dimension in arrays - timer declaration with negative literal (in control part)> |
| 4928 | |
| 4929 | <COMPILE> |
| 4930 | <VERDICT_LEAF PASS> |
| 4931 | <MODULE TTCN x x.ttcn> |
| 4932 | module x { |
| 4933 | |
| 4934 | control{ |
| 4935 | timer myArr[2][-3]; |
| 4936 | } |
| 4937 | } |
| 4938 | <END_MODULE> |
| 4939 | <RESULT IF_PASS COUNT 1> |
| 4940 | (?im)error.+?positive.+?integer.+?value.+?expected |
| 4941 | <END_RESULT> |
| 4942 | <RESULT IF_PASS COUNT 1> |
| 4943 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 4944 | <END_RESULT> |
| 4945 | <RESULT IF_PASS COUNT 1> |
| 4946 | (?is)\berror: |
| 4947 | <END_RESULT> |
| 4948 | <END_TC> |
| 4949 | |
| 4950 | :exmp. |
| 4951 | |
| 4952 | .*---------------------------------------------------------------------* |
| 4953 | :h4.Dimension in arrays - timer declaration with negative constants (in function) |
| 4954 | .*---------------------------------------------------------------------* |
| 4955 | :xmp tab=0. |
| 4956 | |
| 4957 | <TC - Dimension in arrays - timer declaration with negative constants (in function)> |
| 4958 | |
| 4959 | <COMPILE> |
| 4960 | <VERDICT_LEAF PASS> |
| 4961 | <MODULE TTCN x x.ttcn> |
| 4962 | module x { |
| 4963 | |
| 4964 | function myFunct(){ |
| 4965 | |
| 4966 | const integer i:= -5; |
| 4967 | timer myArr[i][3]; |
| 4968 | } |
| 4969 | } |
| 4970 | <END_MODULE> |
| 4971 | <RESULT IF_PASS COUNT 1> |
| 4972 | (?im)error.+?positive.+?integer.+?value.+?expected |
| 4973 | <END_RESULT> |
| 4974 | <RESULT IF_PASS COUNT 1> |
| 4975 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 4976 | <END_RESULT> |
| 4977 | <RESULT IF_PASS COUNT 1> |
| 4978 | (?is)\berror: |
| 4979 | <END_RESULT> |
| 4980 | <END_TC> |
| 4981 | |
| 4982 | :exmp. |
| 4983 | |
| 4984 | .*---------------------------------------------------------------------* |
| 4985 | :h4.Dimension in arrays - port declaration with negative constants (in def. part) |
| 4986 | .*---------------------------------------------------------------------* |
| 4987 | :xmp tab=0. |
| 4988 | |
| 4989 | <TC - Dimension in arrays - port declaration with negative constants (in def. part)> |
| 4990 | |
| 4991 | <COMPILE> |
| 4992 | <VERDICT_LEAF PASS> |
| 4993 | <MODULE TTCN x x.ttcn> |
| 4994 | module x { |
| 4995 | |
| 4996 | type port myPort message{inout charstring}; |
| 4997 | |
| 4998 | const integer i := -5; |
| 4999 | |
| 5000 | type component myComp{ |
| 5001 | port myPort ports[i]; |
| 5002 | } |
| 5003 | } |
| 5004 | <END_MODULE> |
| 5005 | <RESULT IF_PASS COUNT 1> |
| 5006 | (?im)error.+?positive.+?integer.+?value.+?expected |
| 5007 | <END_RESULT> |
| 5008 | <RESULT IF_PASS COUNT 1> |
| 5009 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 5010 | <END_RESULT> |
| 5011 | <RESULT IF_PASS COUNT 1> |
| 5012 | (?is)\berror: |
| 5013 | <END_RESULT> |
| 5014 | <END_TC> |
| 5015 | |
| 5016 | :exmp. |
| 5017 | |
| 5018 | |
| 5019 | .*---------------------------------------------------------------------* |
| 5020 | :h4.Dimension in arrays - variable declaration with negative literal (integer ranged-array in control part) |
| 5021 | .*---------------------------------------------------------------------* |
| 5022 | :xmp tab=0. |
| 5023 | |
| 5024 | <TC - Dimension in arrays - variable declaration with negative literal (integer ranged-array in control part)> |
| 5025 | |
| 5026 | <COMPILEGCC> |
| 5027 | <VERDICT_LEAF PASS> |
| 5028 | <MODULE TTCN x x.ttcn> |
| 5029 | module x { |
| 5030 | |
| 5031 | control{ |
| 5032 | |
| 5033 | var integer myArr[2..6][-8..10]; |
| 5034 | } |
| 5035 | } |
| 5036 | <END_MODULE> |
| 5037 | <RESULT IF_PASS NEGATIVE> |
| 5038 | (?is)\berror: |
| 5039 | <END_RESULT> |
| 5040 | <END_TC> |
| 5041 | |
| 5042 | :exmp. |
| 5043 | |
| 5044 | .*---------------------------------------------------------------------* |
| 5045 | :h4.Dimension in arrays - variable declaration with negative constants (integer ranged-array in function) |
| 5046 | .*---------------------------------------------------------------------* |
| 5047 | :xmp tab=0. |
| 5048 | |
| 5049 | <TC - Dimension in arrays - variable declaration with negative constants (integer ranged-array in function)> |
| 5050 | |
| 5051 | <COMPILEGCC> |
| 5052 | <VERDICT_LEAF PASS> |
| 5053 | <MODULE TTCN x x.ttcn> |
| 5054 | module x { |
| 5055 | |
| 5056 | function myFunct(){ |
| 5057 | |
| 5058 | const integer i:= -3; |
| 5059 | var integer myArr[i..6][8..10]; |
| 5060 | } |
| 5061 | } |
| 5062 | <END_MODULE> |
| 5063 | <RESULT IF_PASS NEGATIVE> |
| 5064 | (?is)\berror: |
| 5065 | <END_RESULT> |
| 5066 | <END_TC> |
| 5067 | |
| 5068 | :exmp. |
| 5069 | |
| 5070 | .*---------------------------------------------------------------------* |
| 5071 | :h4.Dimension in arrays - timer declaration with negative literal (ranged-array in control part) |
| 5072 | .*---------------------------------------------------------------------* |
| 5073 | :xmp tab=0. |
| 5074 | |
| 5075 | <TC - Dimension in arrays - timer declaration with negative literal (ranged-array in control part)> |
| 5076 | |
| 5077 | <COMPILEGCC> |
| 5078 | <VERDICT_LEAF PASS> |
| 5079 | <MODULE TTCN x x.ttcn> |
| 5080 | module x { |
| 5081 | |
| 5082 | control{ |
| 5083 | |
| 5084 | timer myArr[2..6][-8..10]; |
| 5085 | } |
| 5086 | } |
| 5087 | <END_MODULE> |
| 5088 | <RESULT IF_PASS NEGATIVE> |
| 5089 | (?is)\berror: |
| 5090 | <END_RESULT> |
| 5091 | <END_TC> |
| 5092 | |
| 5093 | :exmp. |
| 5094 | |
| 5095 | .*---------------------------------------------------------------------* |
| 5096 | :h4.Dimension in arrays - timer declaration with negative constants (ranged-array in function) |
| 5097 | .*---------------------------------------------------------------------* |
| 5098 | :xmp tab=0. |
| 5099 | |
| 5100 | <TC - Dimension in arrays - timer declaration with negative constants (ranged-array in function)> |
| 5101 | |
| 5102 | <COMPILEGCC> |
| 5103 | <VERDICT_LEAF PASS> |
| 5104 | <MODULE TTCN x x.ttcn> |
| 5105 | module x { |
| 5106 | |
| 5107 | function myFunct(){ |
| 5108 | |
| 5109 | const integer i:= -3; |
| 5110 | timer myArr[i..6][8..10]; |
| 5111 | } |
| 5112 | } |
| 5113 | <END_MODULE> |
| 5114 | <RESULT IF_PASS NEGATIVE> |
| 5115 | (?is)\berror: |
| 5116 | <END_RESULT> |
| 5117 | <END_TC> |
| 5118 | |
| 5119 | :exmp. |
| 5120 | |
| 5121 | .*---------------------------------------------------------------------* |
| 5122 | :h4.Dimension in arrays - port declaration with negative constants (ranged-array in def. part) |
| 5123 | .*---------------------------------------------------------------------* |
| 5124 | :xmp tab=0. |
| 5125 | |
| 5126 | <TC - Dimension in arrays - port declaration with negative constants (ranged-array in def. part)> |
| 5127 | |
| 5128 | <COMPILE> |
| 5129 | <VERDICT_LEAF PASS> |
| 5130 | <MODULE TTCN x x.ttcn> |
| 5131 | module x { |
| 5132 | |
| 5133 | type port myPort message{inout charstring}; |
| 5134 | |
| 5135 | const integer i := -5; |
| 5136 | |
| 5137 | type component myComp{ |
| 5138 | port myPort ports[i..10]; |
| 5139 | } |
| 5140 | |
| 5141 | } |
| 5142 | <END_MODULE> |
| 5143 | <RESULT IF_PASS NEGATIVE> |
| 5144 | (?is)\berror: |
| 5145 | <END_RESULT> |
| 5146 | <END_TC> |
| 5147 | |
| 5148 | :exmp. |
| 5149 | |
| 5150 | .*---------------------------------------------------------------------* |
| 5151 | :h4.Dimension in arrays - variable declaration with zero constants (integer array in control part) |
| 5152 | .*---------------------------------------------------------------------* |
| 5153 | :xmp tab=0. |
| 5154 | |
| 5155 | <TC - Dimension in arrays - variable declaration with zero constants (integer array in control part)> |
| 5156 | |
| 5157 | <COMPILE> |
| 5158 | <VERDICT_LEAF PASS> |
| 5159 | <MODULE TTCN x x.ttcn> |
| 5160 | module x { |
| 5161 | |
| 5162 | control{ |
| 5163 | |
| 5164 | var integer myArr[0]; |
| 5165 | } |
| 5166 | } |
| 5167 | <END_MODULE> |
| 5168 | <RESULT IF_PASS COUNT 1> |
| 5169 | (?im)error.+?positive.+?value.+?expected.+?array.+?size |
| 5170 | <END_RESULT> |
| 5171 | <RESULT IF_PASS COUNT 1> |
| 5172 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 5173 | <END_RESULT> |
| 5174 | <RESULT IF_PASS COUNT 1> |
| 5175 | (?is)\berror: |
| 5176 | <END_RESULT> |
| 5177 | <END_TC> |
| 5178 | |
| 5179 | :exmp. |
| 5180 | |
| 5181 | .*---------------------------------------------------------------------* |
| 5182 | :h4.Dimension in arrays - variable declaration with zero literal (integer array in function) |
| 5183 | .*---------------------------------------------------------------------* |
| 5184 | :xmp tab=0. |
| 5185 | |
| 5186 | <TC - Dimension in arrays - variable declaration with zero literal (integer array in function)> |
| 5187 | |
| 5188 | <COMPILE> |
| 5189 | <VERDICT_LEAF PASS> |
| 5190 | <MODULE TTCN x x.ttcn> |
| 5191 | module x { |
| 5192 | |
| 5193 | function myFunct(){ |
| 5194 | |
| 5195 | const integer i:= 0; |
| 5196 | var integer myArr[i]; |
| 5197 | } |
| 5198 | } |
| 5199 | <END_MODULE> |
| 5200 | <RESULT IF_PASS COUNT 1> |
| 5201 | (?im)error.+?positive.+?value.+?expected.+?array.+?size |
| 5202 | <END_RESULT> |
| 5203 | <RESULT IF_PASS COUNT 1> |
| 5204 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 5205 | <END_RESULT> |
| 5206 | <RESULT IF_PASS COUNT 1> |
| 5207 | (?is)\berror: |
| 5208 | <END_RESULT> |
| 5209 | <END_TC> |
| 5210 | |
| 5211 | :exmp. |
| 5212 | |
| 5213 | .*---------------------------------------------------------------------* |
| 5214 | :h4.Dimension in arrays - timer declaration with zero constants (in control part) |
| 5215 | .*---------------------------------------------------------------------* |
| 5216 | :xmp tab=0. |
| 5217 | |
| 5218 | <TC - Dimension in arrays - timer declaration with zero constants (in control part)> |
| 5219 | |
| 5220 | <COMPILE> |
| 5221 | <VERDICT_LEAF PASS> |
| 5222 | <MODULE TTCN x x.ttcn> |
| 5223 | module x { |
| 5224 | |
| 5225 | control{ |
| 5226 | |
| 5227 | timer myArr[0]; |
| 5228 | } |
| 5229 | } |
| 5230 | <END_MODULE> |
| 5231 | <RESULT IF_PASS COUNT 1> |
| 5232 | (?im)error.+?positive.+?integer.+?value.+?expected |
| 5233 | <END_RESULT> |
| 5234 | <RESULT IF_PASS COUNT 1> |
| 5235 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 5236 | <END_RESULT> |
| 5237 | <RESULT IF_PASS COUNT 1> |
| 5238 | (?is)\berror: |
| 5239 | <END_RESULT> |
| 5240 | <END_TC> |
| 5241 | |
| 5242 | :exmp. |
| 5243 | |
| 5244 | .*---------------------------------------------------------------------* |
| 5245 | :h4.Dimension in arrays - port declaration with zero constants (in def. part) |
| 5246 | .*---------------------------------------------------------------------* |
| 5247 | :xmp tab=0. |
| 5248 | |
| 5249 | <TC - Dimension in arrays - port declaration with zero constants (in def. part)> |
| 5250 | |
| 5251 | <COMPILE> |
| 5252 | <VERDICT_LEAF PASS> |
| 5253 | <MODULE TTCN x x.ttcn> |
| 5254 | module x { |
| 5255 | |
| 5256 | type port myPort message{inout charstring}; |
| 5257 | |
| 5258 | type component myComp{ |
| 5259 | port myPort ports[0]; |
| 5260 | } |
| 5261 | |
| 5262 | } |
| 5263 | <END_MODULE> |
| 5264 | <RESULT IF_PASS COUNT 1> |
| 5265 | (?im)error.+?positive.+?integer.+?value.+?expected |
| 5266 | <END_RESULT> |
| 5267 | <RESULT IF_PASS COUNT 1> |
| 5268 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 5269 | <END_RESULT> |
| 5270 | <RESULT IF_PASS COUNT 1> |
| 5271 | (?is)\berror: |
| 5272 | <END_RESULT> |
| 5273 | <END_TC> |
| 5274 | |
| 5275 | :exmp. |
| 5276 | |
| 5277 | .*---------------------------------------------------------------------* |
| 5278 | :h4.Dimension in arrays - timer declaration with zero literal (in function) |
| 5279 | .*---------------------------------------------------------------------* |
| 5280 | :xmp tab=0. |
| 5281 | |
| 5282 | <TC - Dimension in arrays - timer declaration with zero literal (in function)> |
| 5283 | |
| 5284 | <COMPILE> |
| 5285 | <VERDICT_LEAF PASS> |
| 5286 | <MODULE TTCN x x.ttcn> |
| 5287 | module x { |
| 5288 | |
| 5289 | function myFunct(){ |
| 5290 | |
| 5291 | const integer i:= 0; |
| 5292 | timer myArr[i]; |
| 5293 | } |
| 5294 | } |
| 5295 | <END_MODULE> |
| 5296 | <RESULT IF_PASS COUNT 1> |
| 5297 | (?im)error.+?positive.+?integer.+?value.+?expected |
| 5298 | <END_RESULT> |
| 5299 | <RESULT IF_PASS COUNT 1> |
| 5300 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 5301 | <END_RESULT> |
| 5302 | <RESULT IF_PASS COUNT 1> |
| 5303 | (?is)\berror: |
| 5304 | <END_RESULT> |
| 5305 | <END_TC> |
| 5306 | |
| 5307 | :exmp. |
| 5308 | |
| 5309 | .*---------------------------------------------------------------------* |
| 5310 | :h4.Dimension in arrays - port declaration with zero literal (in def. part) |
| 5311 | .*---------------------------------------------------------------------* |
| 5312 | :xmp tab=0. |
| 5313 | |
| 5314 | <TC - Dimension in arrays - port declaration with zero literal (in def. part)> |
| 5315 | |
| 5316 | <COMPILE> |
| 5317 | <VERDICT_LEAF PASS> |
| 5318 | <MODULE TTCN x x.ttcn> |
| 5319 | module x { |
| 5320 | |
| 5321 | type port myPort message{inout charstring}; |
| 5322 | |
| 5323 | const integer i := 0; |
| 5324 | |
| 5325 | type component myComp{ |
| 5326 | port myPort ports[i]; |
| 5327 | } |
| 5328 | |
| 5329 | } |
| 5330 | <END_MODULE> |
| 5331 | <RESULT IF_PASS COUNT 1> |
| 5332 | (?im)error.+?positive.+?integer.+?value.+?expected |
| 5333 | <END_RESULT> |
| 5334 | <RESULT IF_PASS COUNT 1> |
| 5335 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 5336 | <END_RESULT> |
| 5337 | <RESULT IF_PASS COUNT 1> |
| 5338 | (?is)\berror: |
| 5339 | <END_RESULT> |
| 5340 | <END_TC> |
| 5341 | |
| 5342 | :exmp. |
| 5343 | |
| 5344 | |
| 5345 | .*---------------------------------------------------------------------* |
| 5346 | :h4.Dimension in arrays - using (timer array in control part) |
| 5347 | .*---------------------------------------------------------------------* |
| 5348 | :xmp tab=0. |
| 5349 | |
| 5350 | <TC - Dimension in arrays - using (timer array in control part)> |
| 5351 | |
| 5352 | <COMPILE> |
| 5353 | <VERDICT_LEAF PASS> |
| 5354 | <MODULE TTCN x x.ttcn> |
| 5355 | module x { |
| 5356 | |
| 5357 | control{ |
| 5358 | |
| 5359 | timer myArr[3]; |
| 5360 | |
| 5361 | myArr[-1].start( 2.0); |
| 5362 | } |
| 5363 | } |
| 5364 | <END_MODULE> |
| 5365 | <RESULT IF_PASS COUNT 1> |
| 5366 | (?im)error.+?Array.+?index.+?underflow |
| 5367 | <END_RESULT> |
| 5368 | <RESULT IF_PASS COUNT 1> |
| 5369 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 5370 | <END_RESULT> |
| 5371 | <RESULT IF_PASS COUNT 1> |
| 5372 | (?is)\berror: |
| 5373 | <END_RESULT> |
| 5374 | <END_TC> |
| 5375 | |
| 5376 | :exmp. |
| 5377 | |
| 5378 | .*---------------------------------------------------------------------* |
| 5379 | :h4.Dimension in arrays - using (timer array in function) |
| 5380 | .*---------------------------------------------------------------------* |
| 5381 | :xmp tab=0. |
| 5382 | |
| 5383 | <TC - Dimension in arrays - using (timer array in function)> |
| 5384 | |
| 5385 | <COMPILE> |
| 5386 | <VERDICT_LEAF PASS> |
| 5387 | <MODULE TTCN x x.ttcn> |
| 5388 | module x { |
| 5389 | |
| 5390 | function myFunct(){ |
| 5391 | |
| 5392 | timer myArr[3]; |
| 5393 | const integer i:= -3; |
| 5394 | |
| 5395 | myArr[i].start( 2.0); |
| 5396 | } |
| 5397 | } |
| 5398 | <END_MODULE> |
| 5399 | <RESULT IF_PASS COUNT 1> |
| 5400 | (?im)error.+?Array.+?index.+?underflow |
| 5401 | <END_RESULT> |
| 5402 | <RESULT IF_PASS COUNT 1> |
| 5403 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 5404 | <END_RESULT> |
| 5405 | <RESULT IF_PASS COUNT 1> |
| 5406 | (?is)\berror: |
| 5407 | <END_RESULT> |
| 5408 | <END_TC> |
| 5409 | |
| 5410 | :exmp. |
| 5411 | |
| 5412 | .*---------------------------------------------------------------------* |
| 5413 | :h4.Dimension in arrays - using (port array in function) |
| 5414 | .*---------------------------------------------------------------------* |
| 5415 | :xmp tab=0. |
| 5416 | |
| 5417 | <TC - Dimension in arrays - using (port array in function)> |
| 5418 | |
| 5419 | <COMPILE> |
| 5420 | <VERDICT_LEAF PASS> |
| 5421 | <MODULE TTCN x x.ttcn> |
| 5422 | module x { |
| 5423 | |
| 5424 | type port myPort message{inout charstring}; |
| 5425 | |
| 5426 | type component myComp{ |
| 5427 | port myPort ports[3]; |
| 5428 | } |
| 5429 | |
| 5430 | function myFunc() runs on myComp{ |
| 5431 | const integer i := -3; |
| 5432 | ports[i].start; |
| 5433 | } |
| 5434 | |
| 5435 | } |
| 5436 | <END_MODULE> |
| 5437 | <RESULT IF_PASS COUNT 1> |
| 5438 | (?im)\berror\b.+?index.+?underflow |
| 5439 | <END_RESULT> |
| 5440 | <RESULT IF_PASS COUNT 1> |
| 5441 | (?is)\berror: |
| 5442 | <END_RESULT> |
| 5443 | <END_TC> |
| 5444 | |
| 5445 | :exmp. |
| 5446 | |
| 5447 | .*---------------------------------------------------------------------* |
| 5448 | :h4.Dimension in arrays - using (integer ranged-array in control part) |
| 5449 | .*---------------------------------------------------------------------* |
| 5450 | :xmp tab=0. |
| 5451 | |
| 5452 | <TC - Dimension in arrays - using (integer ranged-array in control part)> |
| 5453 | |
| 5454 | <COMPILE> |
| 5455 | <VERDICT_LEAF PASS> |
| 5456 | <MODULE TTCN x x.ttcn> |
| 5457 | module x { |
| 5458 | |
| 5459 | control{ |
| 5460 | |
| 5461 | var integer myArr[4..6][8..10]; |
| 5462 | |
| 5463 | const integer i:= -3; |
| 5464 | |
| 5465 | // TR694 |
| 5466 | var integer f:= myArr[i][9]; |
| 5467 | } |
| 5468 | } |
| 5469 | <END_MODULE> |
| 5470 | <RESULT IF_FAIL NEGATIVE> |
| 5471 | (?is)\berror: |
| 5472 | <END_RESULT> |
| 5473 | <END_TC> |
| 5474 | |
| 5475 | :exmp. |
| 5476 | |
| 5477 | .*---------------------------------------------------------------------* |
| 5478 | :h4.Dimension in arrays - using (integer ranged-array in function) |
| 5479 | .*---------------------------------------------------------------------* |
| 5480 | :xmp tab=0. |
| 5481 | |
| 5482 | <TC - Dimension in arrays - using (integer ranged-array in function)> |
| 5483 | |
| 5484 | <COMPILE> |
| 5485 | <VERDICT_LEAF PASS> |
| 5486 | <MODULE TTCN x x.ttcn> |
| 5487 | module x { |
| 5488 | |
| 5489 | function myFunct(){ |
| 5490 | |
| 5491 | const integer i:= 3; |
| 5492 | var integer myArr[i..6][8..10]; |
| 5493 | |
| 5494 | // TR694 |
| 5495 | var integer f:= myArr[4][-9]; |
| 5496 | } |
| 5497 | } |
| 5498 | <END_MODULE> |
| 5499 | <RESULT IF_FAIL NEGATIVE> |
| 5500 | (?is)\berror: |
| 5501 | <END_RESULT> |
| 5502 | <END_TC> |
| 5503 | |
| 5504 | :exmp. |
| 5505 | |
| 5506 | .*---------------------------------------------------------------------* |
| 5507 | :h4.Dimension in arrays - using (timer ranged-array in control part) |
| 5508 | .*---------------------------------------------------------------------* |
| 5509 | :xmp tab=0. |
| 5510 | |
| 5511 | <TC - Dimension in arrays - using (timer ranged-array in control part)> |
| 5512 | |
| 5513 | <COMPILE> |
| 5514 | <VERDICT_LEAF PASS> |
| 5515 | <MODULE TTCN x x.ttcn> |
| 5516 | module x { |
| 5517 | |
| 5518 | control{ |
| 5519 | |
| 5520 | timer myArr[3..6][1..10]; |
| 5521 | const integer i:= -3; |
| 5522 | |
| 5523 | // TR695 |
| 5524 | myArr[i][2].start(9.0); |
| 5525 | |
| 5526 | } |
| 5527 | } |
| 5528 | <END_MODULE> |
| 5529 | <RESULT IF_PASS COUNT 1> |
| 5530 | (?im)\berror\b.+?index.+?underflow |
| 5531 | <END_RESULT> |
| 5532 | <RESULT IF_PASS COUNT 1> |
| 5533 | (?is)\berror: |
| 5534 | <END_RESULT> |
| 5535 | <END_TC> |
| 5536 | |
| 5537 | :exmp. |
| 5538 | |
| 5539 | .*---------------------------------------------------------------------* |
| 5540 | :h4.Dimension in arrays - using (timer ranged-array in function) |
| 5541 | .*---------------------------------------------------------------------* |
| 5542 | :xmp tab=0. |
| 5543 | |
| 5544 | <TC - Dimension in arrays - using (timer ranged-array in function)> |
| 5545 | |
| 5546 | <COMPILE> |
| 5547 | <VERDICT_LEAF PASS> |
| 5548 | <MODULE TTCN x x.ttcn> |
| 5549 | module x { |
| 5550 | |
| 5551 | function myFunct(){ |
| 5552 | |
| 5553 | timer myArr[3..6][1..10]; |
| 5554 | const integer i:= -3; |
| 5555 | |
| 5556 | // TR695 |
| 5557 | myArr[i][2].start(9.0); |
| 5558 | } |
| 5559 | } |
| 5560 | <END_MODULE> |
| 5561 | <RESULT IF_PASS COUNT 1> |
| 5562 | (?im)\berror\b.+?index.+?underflow |
| 5563 | <END_RESULT> |
| 5564 | <RESULT IF_PASS COUNT 1> |
| 5565 | (?is)\berror: |
| 5566 | <END_RESULT> |
| 5567 | <END_TC> |
| 5568 | |
| 5569 | :exmp. |
| 5570 | |
| 5571 | .*---------------------------------------------------------------------* |
| 5572 | :h4.Dimension in arrays - using (port ranged-array in function) |
| 5573 | .*---------------------------------------------------------------------* |
| 5574 | :xmp tab=0. |
| 5575 | |
| 5576 | <TC - Dimension in arrays - using (port ranged-array in function)> |
| 5577 | |
| 5578 | <COMPILE> |
| 5579 | <VERDICT_LEAF PASS> |
| 5580 | <MODULE TTCN x x.ttcn> |
| 5581 | module x { |
| 5582 | |
| 5583 | type port myPort message{inout charstring}; |
| 5584 | |
| 5585 | type component myComp{ |
| 5586 | port myPort ports[3..5]; |
| 5587 | } |
| 5588 | |
| 5589 | function myFunc() runs on myComp{ |
| 5590 | const integer i := -3; |
| 5591 | ports[i].start; |
| 5592 | } |
| 5593 | |
| 5594 | } |
| 5595 | <END_MODULE> |
| 5596 | <RESULT IF_PASS COUNT 1> |
| 5597 | (?im)\berror\b.+?index.+?underflow |
| 5598 | <END_RESULT> |
| 5599 | <RESULT IF_PASS COUNT 1> |
| 5600 | (?is)\berror: |
| 5601 | <END_RESULT> |
| 5602 | <END_TC> |
| 5603 | |
| 5604 | :exmp. |
| 5605 | |
| 5606 | .*---------------------------------------------------------------------* |
| 5607 | :h3.Upper and lower boundaries |
| 5608 | .*---------------------------------------------------------------------* |
| 5609 | |
| 5610 | This test case group covers the requirement SA-6/15. |
| 5611 | |
| 5612 | Strategy: The lower boundary shall be smaller than the upper boundary in array definitions, string length restrictions and in |
| 5613 | definitions using ranges. |
| 5614 | All occurances shall be tested, where such a notation can be used. |
| 5615 | |
| 5616 | Tested: |
| 5617 | :list. |
| 5618 | :li D='-'.charstring and integer value-ranges in definition part |
| 5619 | :li D='-'.mixed integer list and value-ranges in definition part |
| 5620 | :li D='-'.charstring and bitstring length restriction in definition part |
| 5621 | :li D='-'.integer array declaration in control part |
| 5622 | :li D='-'.timer array declaration in definition part |
| 5623 | :li D='-'.port array declaration in definition part |
| 5624 | :li D='-'.charstring array declaration in function |
| 5625 | :elist. |
| 5626 | |
| 5627 | .*---------------------------------------------------------------------* |
| 5628 | :h4.Upper and lower boundaries - value-range (charstring in def.part) |
| 5629 | .*---------------------------------------------------------------------* |
| 5630 | :xmp tab=0. |
| 5631 | |
| 5632 | <TC - Upper and lower boundaries - value-range (charstring in def.part)> |
| 5633 | |
| 5634 | <COMPILE> |
| 5635 | <VERDICT_LEAF PASS> |
| 5636 | <MODULE TTCN x x.ttcn> |
| 5637 | module x { |
| 5638 | |
| 5639 | type charstring f ( "z".."a"); |
| 5640 | } |
| 5641 | <END_MODULE> |
| 5642 | <RESULT IF_PASS COUNT 1> |
| 5643 | (?im)error.+?lower.+?boundary.+?bigger.+?than.+?upper |
| 5644 | <END_RESULT> |
| 5645 | <RESULT IF_PASS COUNT 1> |
| 5646 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 5647 | <END_RESULT> |
| 5648 | <RESULT IF_PASS COUNT 1> |
| 5649 | (?is)\berror: |
| 5650 | <END_RESULT> |
| 5651 | <END_TC> |
| 5652 | |
| 5653 | :exmp. |
| 5654 | |
| 5655 | .*---------------------------------------------------------------------* |
| 5656 | :h4.Upper and lower boundaries - value-range (integer in def.part) |
| 5657 | .*---------------------------------------------------------------------* |
| 5658 | :xmp tab=0. |
| 5659 | |
| 5660 | <TC - Upper and lower boundaries - value-range (integer in def.part)> |
| 5661 | |
| 5662 | <COMPILE> |
| 5663 | <VERDICT_LEAF PASS> |
| 5664 | <MODULE TTCN x x.ttcn> |
| 5665 | module x { |
| 5666 | |
| 5667 | const integer i:= 500; |
| 5668 | type integer f (i..255); |
| 5669 | } |
| 5670 | <END_MODULE> |
| 5671 | <RESULT IF_PASS COUNT 1> |
| 5672 | (?im)error.+?lower.+?boundary.+?bigger.+?than.+?upper |
| 5673 | <END_RESULT> |
| 5674 | <RESULT IF_PASS COUNT 1> |
| 5675 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 5676 | <END_RESULT> |
| 5677 | <RESULT IF_PASS COUNT 1> |
| 5678 | (?is)\berror: |
| 5679 | <END_RESULT> |
| 5680 | <END_TC> |
| 5681 | |
| 5682 | :exmp. |
| 5683 | |
| 5684 | .*---------------------------------------------------------------------* |
| 5685 | :h4.Upper and lower boundaries - mixed value-list and value-range (integer in def.part) |
| 5686 | .*---------------------------------------------------------------------* |
| 5687 | :xmp tab=0. |
| 5688 | |
| 5689 | <TC - Upper and lower boundaries - mixed value-list and value-range (integer in def.part)> |
| 5690 | |
| 5691 | <COMPILE> |
| 5692 | <VERDICT_LEAF PASS> |
| 5693 | <MODULE TTCN x x.ttcn> |
| 5694 | module x { |
| 5695 | |
| 5696 | type integer f ( 1, 2, 300..255, 500); |
| 5697 | } |
| 5698 | <END_MODULE> |
| 5699 | <RESULT IF_PASS COUNT 1> |
| 5700 | (?im)error.+?lower.+?boundary.+?bigger.+?than.+?upper |
| 5701 | <END_RESULT> |
| 5702 | <RESULT IF_PASS COUNT 1> |
| 5703 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 5704 | <END_RESULT> |
| 5705 | <RESULT IF_PASS COUNT 1> |
| 5706 | (?is)\berror: |
| 5707 | <END_RESULT> |
| 5708 | <END_TC> |
| 5709 | |
| 5710 | :exmp. |
| 5711 | |
| 5712 | .*---------------------------------------------------------------------* |
| 5713 | :h4.Upper and lower boundaries - length restriction (charstring in def.part) |
| 5714 | .*---------------------------------------------------------------------* |
| 5715 | :xmp tab=0. |
| 5716 | |
| 5717 | <TC - Upper and lower boundaries - length restriction (charstring in def.part)> |
| 5718 | |
| 5719 | <COMPILE> |
| 5720 | <VERDICT_LEAF PASS> |
| 5721 | <MODULE TTCN x x.ttcn> |
| 5722 | module x { |
| 5723 | |
| 5724 | const integer i:= 5; |
| 5725 | type charstring f length(7..i); |
| 5726 | } |
| 5727 | <END_MODULE> |
| 5728 | <RESULT IF_PASS COUNT 1> |
| 5729 | (?im)error.+?upper.+?boundary.+?length.+?restriction.+?cannot.+?be.+?smaller.+?than.+?lower |
| 5730 | <END_RESULT> |
| 5731 | <RESULT IF_PASS COUNT 1> |
| 5732 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 5733 | <END_RESULT> |
| 5734 | <RESULT IF_PASS COUNT 1> |
| 5735 | (?is)\berror: |
| 5736 | <END_RESULT> |
| 5737 | <END_TC> |
| 5738 | |
| 5739 | :exmp. |
| 5740 | |
| 5741 | .*---------------------------------------------------------------------* |
| 5742 | :h4.Upper and lower boundaries - length restriction (bitstring in def.part) |
| 5743 | .*---------------------------------------------------------------------* |
| 5744 | :xmp tab=0. |
| 5745 | |
| 5746 | <TC - Upper and lower boundaries - length restriction (bitstring in def.part)> |
| 5747 | |
| 5748 | <COMPILE> |
| 5749 | <VERDICT_LEAF PASS> |
| 5750 | <MODULE TTCN x x.ttcn> |
| 5751 | module x { |
| 5752 | |
| 5753 | type bitstring f length(6..3); |
| 5754 | } |
| 5755 | <END_MODULE> |
| 5756 | <RESULT IF_PASS COUNT 1> |
| 5757 | (?im)error.+?upper.+?boundary.+?length.+?restriction.+?cannot.+?be.+?smaller.+?than.+?lower |
| 5758 | <END_RESULT> |
| 5759 | <RESULT IF_PASS COUNT 1> |
| 5760 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 5761 | <END_RESULT> |
| 5762 | <RESULT IF_PASS COUNT 1> |
| 5763 | (?is)\berror: |
| 5764 | <END_RESULT> |
| 5765 | <END_TC> |
| 5766 | |
| 5767 | :exmp. |
| 5768 | |
| 5769 | .*---------------------------------------------------------------------* |
| 5770 | :h4.Upper and lower boundaries - array definition (integer in control part) |
| 5771 | .*---------------------------------------------------------------------* |
| 5772 | :xmp tab=0. |
| 5773 | |
| 5774 | <TC - Upper and lower boundaries - array definition (integer in control part)> |
| 5775 | |
| 5776 | <COMPILE> |
| 5777 | <VERDICT_LEAF PASS> |
| 5778 | <MODULE TTCN x x.ttcn> |
| 5779 | module x { |
| 5780 | |
| 5781 | control{ |
| 5782 | const integer i:= 7; |
| 5783 | var integer f [1..2][i..4][3..4]; |
| 5784 | } |
| 5785 | } |
| 5786 | <END_MODULE> |
| 5787 | <RESULT IF_PASS COUNT 1> |
| 5788 | (?im)error.+?lower.+?bound.+?array.+?greater.+?upper.+?bound |
| 5789 | <END_RESULT> |
| 5790 | <RESULT IF_PASS COUNT 1> |
| 5791 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 5792 | <END_RESULT> |
| 5793 | <RESULT IF_PASS COUNT 1> |
| 5794 | (?is)\berror: |
| 5795 | <END_RESULT> |
| 5796 | <END_TC> |
| 5797 | |
| 5798 | :exmp. |
| 5799 | |
| 5800 | .*---------------------------------------------------------------------* |
| 5801 | :h4.Upper and lower boundaries - array definition (charstring in function) |
| 5802 | .*---------------------------------------------------------------------* |
| 5803 | :xmp tab=0. |
| 5804 | |
| 5805 | <TC - Upper and lower boundaries - array definition (charstring in function)> |
| 5806 | |
| 5807 | <COMPILE> |
| 5808 | <VERDICT_LEAF PASS> |
| 5809 | <MODULE TTCN x x.ttcn> |
| 5810 | module x { |
| 5811 | |
| 5812 | function myFunct(){ |
| 5813 | var charstring f [9..2][1..5]; |
| 5814 | } |
| 5815 | } |
| 5816 | <END_MODULE> |
| 5817 | <RESULT IF_PASS COUNT 1> |
| 5818 | (?im)error.+?lower.+?bound.+?array.+?greater.+?upper.+?bound |
| 5819 | <END_RESULT> |
| 5820 | <RESULT IF_PASS COUNT 1> |
| 5821 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 5822 | <END_RESULT> |
| 5823 | <RESULT IF_PASS COUNT 1> |
| 5824 | (?is)\berror: |
| 5825 | <END_RESULT> |
| 5826 | <END_TC> |
| 5827 | |
| 5828 | :exmp. |
| 5829 | |
| 5830 | .*---------------------------------------------------------------------* |
| 5831 | :h4.Upper and lower boundaries - timer-array definition (in control part) |
| 5832 | .*---------------------------------------------------------------------* |
| 5833 | :xmp tab=0. |
| 5834 | |
| 5835 | <TC - Upper and lower boundaries - timer-array definition (in control part)> |
| 5836 | |
| 5837 | <COMPILE> |
| 5838 | <VERDICT_LEAF PASS> |
| 5839 | <MODULE TTCN x x.ttcn> |
| 5840 | module x { |
| 5841 | |
| 5842 | control{ |
| 5843 | const integer i:= 7; |
| 5844 | timer f [1..2][i..4][3..4]; |
| 5845 | } |
| 5846 | } |
| 5847 | <END_MODULE> |
| 5848 | <RESULT IF_PASS COUNT 1> |
| 5849 | (?im)error.+?lower.+?bound.+?array.+?index.+?greater.+?than.+?upper |
| 5850 | <END_RESULT> |
| 5851 | <RESULT IF_PASS COUNT 1> |
| 5852 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 5853 | <END_RESULT> |
| 5854 | <RESULT IF_PASS COUNT 1> |
| 5855 | (?is)\berror: |
| 5856 | <END_RESULT> |
| 5857 | <END_TC> |
| 5858 | |
| 5859 | :exmp. |
| 5860 | |
| 5861 | .*---------------------------------------------------------------------* |
| 5862 | :h4.Upper and lower boundaries - timer-array definition (in function) |
| 5863 | .*---------------------------------------------------------------------* |
| 5864 | :xmp tab=0. |
| 5865 | |
| 5866 | <TC - Upper and lower boundaries - timer-array definition (in function)> |
| 5867 | |
| 5868 | <COMPILE> |
| 5869 | <VERDICT_LEAF PASS> |
| 5870 | <MODULE TTCN x x.ttcn> |
| 5871 | module x { |
| 5872 | |
| 5873 | function myFunct(){ |
| 5874 | timer f [9..2][1..5]; |
| 5875 | } |
| 5876 | } |
| 5877 | <END_MODULE> |
| 5878 | <RESULT IF_PASS COUNT 1> |
| 5879 | (?im)error.+?lower.+?bound.+?array.+?index.+?greater.+?than.+?upper |
| 5880 | <END_RESULT> |
| 5881 | <RESULT IF_PASS COUNT 1> |
| 5882 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 5883 | <END_RESULT> |
| 5884 | <RESULT IF_PASS COUNT 1> |
| 5885 | (?is)\berror: |
| 5886 | <END_RESULT> |
| 5887 | <END_TC> |
| 5888 | |
| 5889 | :exmp. |
| 5890 | |
| 5891 | .*---------------------------------------------------------------------* |
| 5892 | :h4.Upper and lower boundaries - port-array definition (in def. part) |
| 5893 | .*---------------------------------------------------------------------* |
| 5894 | :xmp tab=0. |
| 5895 | |
| 5896 | <TC - Upper and lower boundaries - port-array definition (in def. part)> |
| 5897 | |
| 5898 | <COMPILE> |
| 5899 | <VERDICT_LEAF PASS> |
| 5900 | <MODULE TTCN x x.ttcn> |
| 5901 | module x { |
| 5902 | |
| 5903 | type port myport message{ |
| 5904 | inout charstring |
| 5905 | } |
| 5906 | |
| 5907 | type component mycomp{ |
| 5908 | port myport ports[6..5] |
| 5909 | } |
| 5910 | } |
| 5911 | <END_MODULE> |
| 5912 | <RESULT IF_PASS COUNT 1> |
| 5913 | (?im)error.+?lower.+?bound.+?array.+?index.+?greater.+?than.+?upper |
| 5914 | <END_RESULT> |
| 5915 | <RESULT IF_PASS COUNT 1> |
| 5916 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 5917 | <END_RESULT> |
| 5918 | <RESULT IF_PASS COUNT 1> |
| 5919 | (?is)\berror: |
| 5920 | <END_RESULT> |
| 5921 | <END_TC> |
| 5922 | |
| 5923 | :exmp. |
| 5924 | |
| 5925 | .*---------------------------------------------------------------------* |
| 5926 | :h4.Upper and lower boundaries - port-array definition (in def. part) 2 |
| 5927 | .*---------------------------------------------------------------------* |
| 5928 | :xmp tab=0. |
| 5929 | |
| 5930 | <TC - Upper and lower boundaries - port-array definition (in def. part) 2> |
| 5931 | |
| 5932 | <COMPILE> |
| 5933 | <VERDICT_LEAF PASS> |
| 5934 | <MODULE TTCN x x.ttcn> |
| 5935 | module x { |
| 5936 | |
| 5937 | type port myport message{ |
| 5938 | inout charstring |
| 5939 | } |
| 5940 | |
| 5941 | const integer i := 6; |
| 5942 | |
| 5943 | type component mycomp{ |
| 5944 | port myport ports[i..5] |
| 5945 | } |
| 5946 | } |
| 5947 | <END_MODULE> |
| 5948 | <RESULT IF_PASS COUNT 1> |
| 5949 | (?im)error.+?lower.+?bound.+?array.+?index.+?greater.+?than.+?upper |
| 5950 | <END_RESULT> |
| 5951 | <RESULT IF_PASS COUNT 1> |
| 5952 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 5953 | <END_RESULT> |
| 5954 | <RESULT IF_PASS COUNT 1> |
| 5955 | (?is)\berror: |
| 5956 | <END_RESULT> |
| 5957 | <END_TC> |
| 5958 | |
| 5959 | .*---------------------------------------------------------------------* |
| 5960 | :h3.Overindexing |
| 5961 | .*---------------------------------------------------------------------* |
| 5962 | |
| 5963 | This test case group covers the requirement SA-6/16. |
| 5964 | |
| 5965 | Strategy: When referencing an element of an array, the index shall evaluate to a valid position within string and array. |
| 5966 | All occurances shall be tested, where such a notation can be used. |
| 5967 | |
| 5968 | Tested: |
| 5969 | :nl.Overindexing |
| 5970 | :list. |
| 5971 | :li D='-'.bitstring in definition part |
| 5972 | :li D='-'.charstring in control part |
| 5973 | :li D='-'.hexstring in function |
| 5974 | :li D='-'.integer array in control part |
| 5975 | :li D='-'.timer array in control part and function |
| 5976 | :li D='-'.port array in definition part |
| 5977 | :li D='-'.charstring array in function |
| 5978 | :li D='-'.integer ranged array in control part |
| 5979 | :li D='-'.timer ranged array in control part and function |
| 5980 | :li D='-'.port ranged array in definition part |
| 5981 | :li D='-'.float arnged array in function |
| 5982 | :elist. |
| 5983 | :nl.Underindexing |
| 5984 | :list. |
| 5985 | :li D='-'.integer ranged array in control part |
| 5986 | :li D='-'.timer array in control part and function |
| 5987 | :li D='-'.timer ranged array in control part and function |
| 5988 | :li D='-'.port array in definition part |
| 5989 | :li D='-'.port ranged array in definition part |
| 5990 | :li D='-'.float ranged array in function |
| 5991 | :elist. |
| 5992 | |
| 5993 | .*---------------------------------------------------------------------* |
| 5994 | :h4.Overindexing - string overindexing (bitstring in def.part) |
| 5995 | .*---------------------------------------------------------------------* |
| 5996 | :xmp tab=0. |
| 5997 | |
| 5998 | <TC - Overindexing - string overindexing (bitstring in def.part)> |
| 5999 | |
| 6000 | <COMPILE> |
| 6001 | <VERDICT_LEAF PASS> |
| 6002 | <MODULE TTCN x x.ttcn> |
| 6003 | module x { |
| 6004 | |
| 6005 | type bitstring myBits length(3..5); |
| 6006 | |
| 6007 | const myBits r:= '11111'B; |
| 6008 | const bitstring f:= r[5]; |
| 6009 | } |
| 6010 | <END_MODULE> |
| 6011 | <RESULT IF_PASS COUNT 1> |
| 6012 | (?im)error.+?Index.+?overflow.+?accessing.+?string.+?element |
| 6013 | <END_RESULT> |
| 6014 | <RESULT IF_PASS COUNT 1> |
| 6015 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 6016 | <END_RESULT> |
| 6017 | <RESULT IF_PASS COUNT 1> |
| 6018 | (?is)\berror: |
| 6019 | <END_RESULT> |
| 6020 | <END_TC> |
| 6021 | |
| 6022 | :exmp. |
| 6023 | |
| 6024 | .*---------------------------------------------------------------------* |
| 6025 | :h4.Overindexing - string overindexing (charstring in control part) |
| 6026 | .*---------------------------------------------------------------------* |
| 6027 | :xmp tab=0. |
| 6028 | |
| 6029 | <TC - Overindexing - string overindexing (charstring in control part)> |
| 6030 | |
| 6031 | <COMPILE> |
| 6032 | <VERDICT_LEAF PASS> |
| 6033 | <MODULE TTCN x x.ttcn> |
| 6034 | module x { |
| 6035 | |
| 6036 | type charstring myChars length(3..13); |
| 6037 | |
| 6038 | const myChars r:= "Ford Fairlane"; |
| 6039 | |
| 6040 | control{ |
| 6041 | const charstring f:= r[15]; |
| 6042 | } |
| 6043 | } |
| 6044 | <END_MODULE> |
| 6045 | <RESULT IF_PASS COUNT 1> |
| 6046 | (?im)error.+?Index.+?overflow.+?accessing.+?string.+?element |
| 6047 | <END_RESULT> |
| 6048 | <RESULT IF_PASS COUNT 1> |
| 6049 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 6050 | <END_RESULT> |
| 6051 | <RESULT IF_PASS COUNT 1> |
| 6052 | (?is)\berror: |
| 6053 | <END_RESULT> |
| 6054 | <END_TC> |
| 6055 | |
| 6056 | :exmp. |
| 6057 | |
| 6058 | .*---------------------------------------------------------------------* |
| 6059 | :h4.Overindexing - string overindexing (hexstring in function) |
| 6060 | .*---------------------------------------------------------------------* |
| 6061 | :xmp tab=0. |
| 6062 | |
| 6063 | <TC - Overindexing - string overindexing (hexstring in function)> |
| 6064 | |
| 6065 | <COMPILE> |
| 6066 | <VERDICT_LEAF PASS> |
| 6067 | <MODULE TTCN x x.ttcn> |
| 6068 | module x { |
| 6069 | |
| 6070 | type hexstring myHexes length(1..10); |
| 6071 | |
| 6072 | const myHexes r:= 'AbbaBaba'H; |
| 6073 | |
| 6074 | function myFunct(){ |
| 6075 | const hexstring f:= r[9]; |
| 6076 | } |
| 6077 | } |
| 6078 | <END_MODULE> |
| 6079 | <RESULT IF_PASS COUNT 1> |
| 6080 | (?im)error.+?Index.+?overflow.+?accessing.+?string.+?element |
| 6081 | <END_RESULT> |
| 6082 | <RESULT IF_PASS COUNT 1> |
| 6083 | (?im)\bNotify\b.+?\bcode\b.+?\bnot\b.+?\bgenerated\b |
| 6084 | <END_RESULT> |
| 6085 | <RESULT IF_PASS COUNT 1> |
| 6086 | (?is)\berror: |
| 6087 | <END_RESULT> |
| 6088 | <END_TC> |
| 6089 | |
| 6090 | :exmp. |
| 6091 | |
| 6092 | .*---------------------------------------------------------------------* |
| 6093 | :h4.Overindexing - array overindexing (integer in control part) |
| 6094 | .*---------------------------------------------------------------------* |
| 6095 | :xmp tab=0. |
| 6096 | |
| 6097 | <TC - Overindexing - array overindexing (integer in control part)> |
| 6098 | |
| 6099 | <COMPILE> |
| 6100 | <VERDICT_LEAF PASS> |
| 6101 | <MODULE TTCN x x.ttcn> |
| 6102 | module x { |
| 6103 | |
| 6104 | const integer i:= 10; |
| 6105 | |
| 6106 | control{ |
| 6107 | var integer myArr[2][4]; |
| 6108 | myArr[1]:= { 1, 2, 3, 4 }; |
| 6109 | |
| 6110 | // TR694 |
| 6111 | var integer f:= myArr[1][i]; |
| 6112 | } |
| 6113 | } |
| 6114 | <END_MODULE> |
| 6115 | <RESULT IF_FAIL NEGATIVE> |
| 6116 | (?is)\berror: |
| 6117 | <END_RESULT> |
| 6118 | <END_TC> |
| 6119 | |
| 6120 | :exmp. |
| 6121 | |
| 6122 | .*---------------------------------------------------------------------* |
| 6123 | :h4.Overindexing - array overindexing (charstring in function) |
| 6124 | .*---------------------------------------------------------------------* |
| 6125 | :xmp tab=0. |
| 6126 | |
| 6127 | <TC - Overindexing - array overindexing (charstring in function)> |
| 6128 | |
| 6129 | <COMPILE> |
| 6130 | <VERDICT_LEAF PASS> |
| 6131 | <MODULE TTCN x x.ttcn> |
| 6132 | module x { |
| 6133 | |
| 6134 | function myFunct(){ |
| 6135 | var charstring myArr[2][4]; |
| 6136 | myArr[1]:= { "EEE", "MUHAHA", "AIYYO", "GERAPPA"}; |
| 6137 | |
| 6138 | // TR694 |
| 6139 | myArr[2][6]:= "ERIXON"; |
| 6140 | } |
| 6141 | } |
| 6142 | <END_MODULE> |
| 6143 | <RESULT IF_FAIL NEGATIVE> |
| 6144 | (?is)\berror: |
| 6145 | <END_RESULT> |
| 6146 | <END_TC> |
| 6147 | |
| 6148 | :exmp. |
| 6149 | |
| 6150 | .*---------------------------------------------------------------------* |
| 6151 | :h4.Overindexing - timer-array overindexing (in control part) |
| 6152 | .*---------------------------------------------------------------------* |
| 6153 | :xmp tab=0. |
| 6154 | |
| 6155 | <TC - Overindexing - timer-array overindexing (in control part)> |
| 6156 | |
| 6157 | <COMPILE> |
| 6158 | <VERDICT_LEAF PASS> |
| 6159 | <MODULE TTCN x x.ttcn> |
| 6160 | module x { |
| 6161 | |
| 6162 | control{ |
| 6163 | timer myArr[2][4]:= {{ 1.0, 2.0, 3.0, 4.0 }, { 1.0, 2.0, 3.0, 4.0 }}; |
| 6164 | timer f; |
| 6165 | const integer i:= 5; |
| 6166 | |
| 6167 | // TR695 |
| 6168 | f.start( myArr[1][i].read); |
| 6169 | } |
| 6170 | } |
| 6171 | <END_MODULE> |
| 6172 | <RESULT IF_PASS COUNT 1> |
| 6173 | (?im)\berror\b.+?index.+?overflow |
| 6174 | <END_RESULT> |
| 6175 | <RESULT IF_PASS COUNT 1> |
| 6176 | (?is)\berror: |
| 6177 | <END_RESULT> |
| 6178 | <END_TC> |
| 6179 | |
| 6180 | :exmp. |
| 6181 | |
| 6182 | .*---------------------------------------------------------------------* |
| 6183 | :h4.Overindexing - timer-array overindexing (in function) |
| 6184 | .*---------------------------------------------------------------------* |
| 6185 | :xmp tab=0. |
| 6186 | |
| 6187 | <TC - Overindexing - timer-array overindexing (in function)> |
| 6188 | |
| 6189 | <COMPILE> |
| 6190 | <VERDICT_LEAF PASS> |
| 6191 | <MODULE TTCN x x.ttcn> |
| 6192 | module x { |
| 6193 | |
| 6194 | function myFunct(){ |
| 6195 | timer myArr[2][4]:= {{ 1.0, 2.0, 3.0, 4.0 }, { 1.0, 2.0, 3.0, 4.0 }}; |
| 6196 | timer f; |
| 6197 | const integer i:= 5; |
| 6198 | |
| 6199 | // TR695 |
| 6200 | f.start( myArr[1][i].read); |
| 6201 | } |
| 6202 | } |
| 6203 | <END_MODULE> |
| 6204 | <RESULT IF_PASS COUNT 1> |
| 6205 | (?im)\berror\b.+?index.+?overflow |
| 6206 | <END_RESULT> |
| 6207 | <RESULT IF_PASS COUNT 1> |
| 6208 | (?is)\berror: |
| 6209 | <END_RESULT> |
| 6210 | <END_TC> |
| 6211 | |
| 6212 | :exmp. |
| 6213 | |
| 6214 | .*---------------------------------------------------------------------* |
| 6215 | :h4.Overindexing - port-array overindexing (in function) |
| 6216 | .*---------------------------------------------------------------------* |
| 6217 | :xmp tab=0. |
| 6218 | |
| 6219 | <TC - Overindexing - port-array overindexing (in function> |
| 6220 | |
| 6221 | <COMPILE> |
| 6222 | <VERDICT_LEAF PASS> |
| 6223 | <MODULE TTCN x x.ttcn> |
| 6224 | module x { |
| 6225 | |
| 6226 | type port myport message{ |
| 6227 | inout charstring |
| 6228 | } |
| 6229 | |
| 6230 | type component mycomp{ |
| 6231 | port myport ports[5] |
| 6232 | } |
| 6233 | |
| 6234 | function myFunc() runs on mycomp{ |
| 6235 | ports[5].start; |
| 6236 | } |
| 6237 | } |
| 6238 | <END_MODULE> |
| 6239 | <RESULT IF_PASS COUNT 1> |
| 6240 | (?im)\berror\b.+?index.+?overflow |
| 6241 | <END_RESULT> |
| 6242 | <RESULT IF_PASS COUNT 1> |
| 6243 | (?is)\berror: |
| 6244 | <END_RESULT> |
| 6245 | <END_TC> |
| 6246 | |
| 6247 | :exmp. |
| 6248 | |
| 6249 | .*---------------------------------------------------------------------* |
| 6250 | :h4.Overindexing - ranged-array overindexing (integer in control part) |
| 6251 | .*---------------------------------------------------------------------* |
| 6252 | :xmp tab=0. |
| 6253 | |
| 6254 | <TC - Overindexing - ranged-array overindexing (integer in control part)> |
| 6255 | |
| 6256 | <COMPILE> |
| 6257 | <VERDICT_LEAF PASS> |
| 6258 | <MODULE TTCN x x.ttcn> |
| 6259 | module x { |
| 6260 | |
| 6261 | control{ |
| 6262 | var integer myArr[2..4][5..8]; |
| 6263 | |
| 6264 | // TR694 |
| 6265 | var integer f:= myArr[6][9]; |
| 6266 | } |
| 6267 | } |
| 6268 | <END_MODULE> |
| 6269 | <RESULT IF_FAIL NEGATIVE> |
| 6270 | (?is)\berror: |
| 6271 | <END_RESULT> |
| 6272 | <END_TC> |
| 6273 | |
| 6274 | :exmp. |
| 6275 | |
| 6276 | .*---------------------------------------------------------------------* |
| 6277 | :h4.Overindexing - ranged-array overindexing (float in function) |
| 6278 | .*---------------------------------------------------------------------* |
| 6279 | :xmp tab=0. |
| 6280 | |
| 6281 | <TC - Overindexing - ranged-array overindexing (float in function)> |
| 6282 | |
| 6283 | <COMPILE> |
| 6284 | <VERDICT_LEAF PASS> |
| 6285 | <MODULE TTCN x x.ttcn> |
| 6286 | module x { |
| 6287 | |
| 6288 | const integer i:= 6; |
| 6289 | const integer j:= 10; |
| 6290 | |
| 6291 | function myFunct(){ |
| 6292 | var float myArr[2..4][5..8]; |
| 6293 | |
| 6294 | // TR694 |
| 6295 | myArr[i][j]:= 3.14; |
| 6296 | } |
| 6297 | } |
| 6298 | <END_MODULE> |
| 6299 | <RESULT IF_FAIL NEGATIVE> |
| 6300 | (?is)\berror: |
| 6301 | <END_RESULT> |
| 6302 | <END_TC> |
| 6303 | |
| 6304 | :exmp. |
| 6305 | |
| 6306 | .*---------------------------------------------------------------------* |
| 6307 | :h4.Overindexing - ranged timer-array overindexing (in control part) |
| 6308 | .*---------------------------------------------------------------------* |
| 6309 | :xmp tab=0. |
| 6310 | |
| 6311 | <TC - Overindexing - ranged timer-array overindexing (in control part)> |
| 6312 | |
| 6313 | <COMPILE> |
| 6314 | <VERDICT_LEAF PASS> |
| 6315 | <MODULE TTCN x x.ttcn> |
| 6316 | module x { |
| 6317 | |
| 6318 | control{ |
| 6319 | timer myArr[2..3][4..7]:= {{ 1.0, 2.0, 3.0, 4.0 }, { 1.0, 2.0, 3.0, 4.0 }}; |
| 6320 | timer f; |
| 6321 | const integer i:= 9; |
| 6322 | |
| 6323 | // TR695 |
| 6324 | f.start( myArr[2][i].read); |
| 6325 | } |
| 6326 | } |
| 6327 | <END_MODULE> |
| 6328 | <RESULT IF_PASS COUNT 1> |
| 6329 | (?im)\berror\b.+?index.+?overflow |
| 6330 | <END_RESULT> |
| 6331 | <RESULT IF_PASS COUNT 1> |
| 6332 | (?is)\berror: |
| 6333 | <END_RESULT> |
| 6334 | <END_TC> |
| 6335 | |
| 6336 | :exmp. |
| 6337 | |
| 6338 | .*---------------------------------------------------------------------* |
| 6339 | :h4.Overindexing - ranged timer-array overindexing (in function) |
| 6340 | .*---------------------------------------------------------------------* |
| 6341 | :xmp tab=0. |
| 6342 | |
| 6343 | <TC - Overindexing - ranged timer-array overindexing (in function)> |
| 6344 | |
| 6345 | <COMPILE> |
| 6346 | <VERDICT_LEAF PASS> |
| 6347 | <MODULE TTCN x x.ttcn> |
| 6348 | module x { |
| 6349 | |
| 6350 | function myFunct(){ |
| 6351 | timer myArr[2..3][4..7]:= {{ 1.0, 2.0, 3.0, 4.0 }, { 1.0, 2.0, 3.0, 4.0 }}; |
| 6352 | timer f; |
| 6353 | const integer i:= 9; |
| 6354 | |
| 6355 | // TR695 |
| 6356 | f.start( myArr[2][i].read); |
| 6357 | } |
| 6358 | } |
| 6359 | <END_MODULE> |
| 6360 | <RESULT IF_PASS COUNT 1> |
| 6361 | (?im)\berror\b.+?index.+?overflow |
| 6362 | <END_RESULT> |
| 6363 | <RESULT IF_PASS COUNT 1> |
| 6364 | (?is)\berror: |
| 6365 | <END_RESULT> |
| 6366 | <END_TC> |
| 6367 | |
| 6368 | :exmp. |
| 6369 | |
| 6370 | .*---------------------------------------------------------------------* |
| 6371 | :h4.Overindexing - ranged port-array overindexing (in function) |
| 6372 | .*---------------------------------------------------------------------* |
| 6373 | :xmp tab=0. |
| 6374 | |
| 6375 | <TC - Overindexing - ranged port-array overindexing (in function> |
| 6376 | |
| 6377 | <COMPILE> |
| 6378 | <VERDICT_LEAF PASS> |
| 6379 | <MODULE TTCN x x.ttcn> |
| 6380 | module x { |
| 6381 | |
| 6382 | type port myport message{ |
| 6383 | inout charstring |
| 6384 | } |
| 6385 | |
| 6386 | type component mycomp{ |
| 6387 | port myport ports[5..6] |
| 6388 | } |
| 6389 | |
| 6390 | function myFunc() runs on mycomp{ |
| 6391 | ports[7].start; |
| 6392 | } |
| 6393 | } |
| 6394 | <END_MODULE> |
| 6395 | <RESULT IF_PASS COUNT 1> |
| 6396 | (?im)\berror\b.+?index.+?overflow |
| 6397 | <END_RESULT> |
| 6398 | <RESULT IF_PASS COUNT 1> |
| 6399 | (?is)\berror: |
| 6400 | <END_RESULT> |
| 6401 | <END_TC> |
| 6402 | |
| 6403 | :exmp. |
| 6404 | |
| 6405 | .*---------------------------------------------------------------------* |
| 6406 | :h4.Overindexing - ranged-array underindexing (integer in control part) |
| 6407 | .*---------------------------------------------------------------------* |
| 6408 | :xmp tab=0. |
| 6409 | |
| 6410 | <TC - Overindexing - ranged-array underindexing (integer in control part)> |
| 6411 | |
| 6412 | <COMPILE> |
| 6413 | <VERDICT_LEAF PASS> |
| 6414 | <MODULE TTCN x x.ttcn> |
| 6415 | module x { |
| 6416 | |
| 6417 | control{ |
| 6418 | var integer myArr[2..4][5..8]; |
| 6419 | |
| 6420 | // TR694 |
| 6421 | var integer f:= myArr[1][3]; |
| 6422 | } |
| 6423 | } |
| 6424 | <END_MODULE> |
| 6425 | <RESULT IF_FAIL NEGATIVE> |
| 6426 | (?is)\berror: |
| 6427 | <END_RESULT> |
| 6428 | <END_TC> |
| 6429 | |
| 6430 | :exmp. |
| 6431 | |
| 6432 | .*---------------------------------------------------------------------* |
| 6433 | :h4.Overindexing - ranged-array underindexing (integer in function) |
| 6434 | .*---------------------------------------------------------------------* |
| 6435 | :xmp tab=0. |
| 6436 | |
| 6437 | <TC - Overindexing - ranged-array underindexing (integer in function)> |
| 6438 | |
| 6439 | <COMPILE> |
| 6440 | <VERDICT_LEAF PASS> |
| 6441 | <MODULE TTCN x x.ttcn> |
| 6442 | module x { |
| 6443 | |
| 6444 | type integer myint[5..6]; |
| 6445 | |
| 6446 | function myFunc(){ |
| 6447 | var myint f := {1,2}; |
| 6448 | f[4] := 1; |
| 6449 | } |
| 6450 | } |
| 6451 | <END_MODULE> |
| 6452 | <RESULT IF_PASS COUNT 1> |
| 6453 | (?im)\berror\b.+?index.+?underflow |
| 6454 | <END_RESULT> |
| 6455 | <RESULT IF_PASS COUNT 1> |
| 6456 | (?is)\berror: |
| 6457 | <END_RESULT> |
| 6458 | <END_TC> |
| 6459 | |
| 6460 | :exmp. |
| 6461 | |
| 6462 | |
| 6463 | .*---------------------------------------------------------------------* |
| 6464 | :h4.Overindexing - ranged-array underindexing (float in function) |
| 6465 | .*---------------------------------------------------------------------* |
| 6466 | :xmp tab=0. |
| 6467 | |
| 6468 | <TC - Overindexing - ranged-array underindexing (float in function)> |
| 6469 | |
| 6470 | <COMPILE> |
| 6471 | <VERDICT_LEAF PASS> |
| 6472 | <MODULE TTCN x x.ttcn> |
| 6473 | module x { |
| 6474 | |
| 6475 | const integer i:= 0; |
| 6476 | const integer j:= 4; |
| 6477 | |
| 6478 | function myFunct(){ |
| 6479 | var float myArr[2..4][5..8]; |
| 6480 | |
| 6481 | // TR694 |
| 6482 | myArr[i][j]:= 3.14; |
| 6483 | } |
| 6484 | } |
| 6485 | <END_MODULE> |
| 6486 | <RESULT IF_FAIL NEGATIVE> |
| 6487 | (?is)\berror: |
| 6488 | <END_RESULT> |
| 6489 | <END_TC> |
| 6490 | |
| 6491 | :exmp. |
| 6492 | |
| 6493 | .*---------------------------------------------------------------------* |
| 6494 | :h4.Overindexing - ranged timer-array underindexing (in control part) |
| 6495 | .*---------------------------------------------------------------------* |
| 6496 | :xmp tab=0. |
| 6497 | |
| 6498 | <TC - Overindexing - ranged timer-array underindexing (in control part)> |
| 6499 | |
| 6500 | <COMPILE> |
| 6501 | <VERDICT_LEAF PASS> |
| 6502 | <MODULE TTCN x x.ttcn> |
| 6503 | module x { |
| 6504 | |
| 6505 | control{ |
| 6506 | timer myArr[2..3][4..7]:= {{ 1.0, 2.0, 3.0, 4.0 }, { 1.0, 2.0, 3.0, 4.0 }}; |
| 6507 | timer f; |
| 6508 | const integer i:= 1; |
| 6509 | |
| 6510 | // TR695 |
| 6511 | f.start( myArr[i][6].read); |
| 6512 | } |
| 6513 | } |
| 6514 | <END_MODULE> |
| 6515 | <RESULT IF_PASS COUNT 1> |
| 6516 | (?im)\berror\b.+?index.+?underflow |
| 6517 | <END_RESULT> |
| 6518 | <RESULT IF_PASS COUNT 1> |
| 6519 | (?is)\berror: |
| 6520 | <END_RESULT> |
| 6521 | <END_TC> |
| 6522 | |
| 6523 | :exmp. |
| 6524 | |
| 6525 | .*---------------------------------------------------------------------* |
| 6526 | :h4.Overindexing - ranged timer-array underindexing (in function) |
| 6527 | .*---------------------------------------------------------------------* |
| 6528 | :xmp tab=0. |
| 6529 | |
| 6530 | <TC - Overindexing - ranged timer-array underindexing (in function)> |
| 6531 | |
| 6532 | <COMPILE> |
| 6533 | <VERDICT_LEAF PASS> |
| 6534 | <MODULE TTCN x x.ttcn> |
| 6535 | module x { |
| 6536 | |
| 6537 | function myFunct(){ |
| 6538 | timer myArr[2..3][4..7]:= {{ 1.0, 2.0, 3.0, 4.0 }, { 1.0, 2.0, 3.0, 4.0 }}; |
| 6539 | timer f; |
| 6540 | const integer i:= 2; |
| 6541 | |
| 6542 | // TR695 |
| 6543 | f.start( myArr[2][i].read); |
| 6544 | } |
| 6545 | } |
| 6546 | <END_MODULE> |
| 6547 | <RESULT IF_PASS COUNT 1> |
| 6548 | (?im)\berror\b.+?index.+?underflow |
| 6549 | <END_RESULT> |
| 6550 | <RESULT IF_PASS COUNT 1> |
| 6551 | (?is)\berror: |
| 6552 | <END_RESULT> |
| 6553 | <END_TC> |
| 6554 | |
| 6555 | :exmp. |
| 6556 | |
| 6557 | .*---------------------------------------------------------------------* |
| 6558 | :h4.Overindexing - ranged port-array underindexing (in function) |
| 6559 | .*---------------------------------------------------------------------* |
| 6560 | :xmp tab=0. |
| 6561 | |
| 6562 | <TC - Overindexing - ranged port-array underindexing (in function)> |
| 6563 | |
| 6564 | <COMPILE> |
| 6565 | <VERDICT_LEAF PASS> |
| 6566 | <MODULE TTCN x x.ttcn> |
| 6567 | module x { |
| 6568 | |
| 6569 | type port myport message{ |
| 6570 | inout charstring |
| 6571 | } |
| 6572 | |
| 6573 | type component mycomp{ |
| 6574 | port myport ports[5..6] |
| 6575 | } |
| 6576 | |
| 6577 | function myFunc() runs on mycomp{ |
| 6578 | ports[4].start; |
| 6579 | } |
| 6580 | } |
| 6581 | <END_MODULE> |
| 6582 | <RESULT IF_PASS COUNT 1> |
| 6583 | (?im)\berror\b.+?index.+?underflow |
| 6584 | <END_RESULT> |
| 6585 | <RESULT IF_PASS COUNT 1> |
| 6586 | (?is)\berror: |
| 6587 | <END_RESULT> |
| 6588 | <END_TC> |
| 6589 | |
| 6590 | :exmp. |
| 6591 | |
| 6592 | .*---------------------------------------------------------------------* |
| 6593 | :h3.Negative timer duration |
| 6594 | .*---------------------------------------------------------------------* |
| 6595 | |
| 6596 | This test case group covers the requirement SA-6/17. |
| 6597 | |
| 6598 | Strategy: A timer declaration may have an optional default duration value assigned to it. The timer shall be started with this |
| 6599 | value if no other value is specified. This value shall be positive, but we can use constants too. Same is true for timer |
| 6600 | arrays and the oprional timer of the execute operation. |
| 6601 | All occurances shall be tested, where such a notation can be used. |
| 6602 | |
| 6603 | Tested: |
| 6604 | :list. |
| 6605 | :li D='-'.timer default values in control part and function |
| 6606 | :li D='-'.timer starting values in control part and function |
| 6607 | :li D='-'.timer-array default values in control part and function |
| 6608 | :li D='-'.timer-array starting values in control part and function |
| 6609 | :li D='-'.execution timer |
| 6610 | :elist. |
| 6611 | |
| 6612 | .*---------------------------------------------------------------------* |
| 6613 | :h4.Negative timer duration - default (in control part) |
| 6614 | .*---------------------------------------------------------------------* |
| 6615 | :xmp tab=0. |
| 6616 | |
| 6617 | <TC - Negative timer duration - default (in control part)> |
| 6618 | |
| 6619 | <COMPILE> |
| 6620 | <VERDICT_LEAF PASS> |
| 6621 | <MODULE TTCN x x.ttcn> |
| 6622 | module x { |
| 6623 | |
| 6624 | control{ |
| 6625 | timer T:= -12.0; |
| 6626 | } |
| 6627 | } |
| 6628 | <END_MODULE> |
| 6629 | <RESULT IF_PASS COUNT 1> |
| 6630 | (?im)error.+?non-negative.+?float.+?value.+?expected |
| 6631 | <END_RESULT> |
| 6632 | <RESULT IF_PASS COUNT 1> |
| 6633 | (?is)\berror: |
| 6634 | <END_RESULT> |
| 6635 | <END_TC> |
| 6636 | |
| 6637 | :exmp. |
| 6638 | |
| 6639 | .*---------------------------------------------------------------------* |
| 6640 | :h4.Negative timer duration - default (in function) |
| 6641 | .*---------------------------------------------------------------------* |
| 6642 | :xmp tab=0. |
| 6643 | |
| 6644 | <TC - Negative timer duration - default (in function)> |
| 6645 | |
| 6646 | <COMPILE> |
| 6647 | <VERDICT_LEAF PASS> |
| 6648 | <MODULE TTCN x x.ttcn> |
| 6649 | module x { |
| 6650 | |
| 6651 | const float f:= -2.22; |
| 6652 | |
| 6653 | function myFunct(){ |
| 6654 | timer T:= f; |
| 6655 | } |
| 6656 | } |
| 6657 | <END_MODULE> |
| 6658 | <RESULT IF_PASS COUNT 1> |
| 6659 | (?im)error.+?non-negative.+?float.+?value.+?expected |
| 6660 | <END_RESULT> |
| 6661 | <RESULT IF_PASS COUNT 1> |
| 6662 | (?is)\berror: |
| 6663 | <END_RESULT> |
| 6664 | <END_TC> |
| 6665 | |
| 6666 | :exmp. |
| 6667 | |
| 6668 | .*---------------------------------------------------------------------* |
| 6669 | :h4.Negative timer duration - array default (in control part) |
| 6670 | .*---------------------------------------------------------------------* |
| 6671 | :xmp tab=0. |
| 6672 | |
| 6673 | <TC - Negative timer duration - array default (in control part)> |
| 6674 | |
| 6675 | <COMPILE> |
| 6676 | <VERDICT_LEAF PASS> |
| 6677 | <MODULE TTCN x x.ttcn> |
| 6678 | module x { |
| 6679 | |
| 6680 | control{ |
| 6681 | timer T[5]:= { 1.0, 8.9, -3.14, 1.1, 1.5 }; |
| 6682 | } |
| 6683 | } |
| 6684 | <END_MODULE> |
| 6685 | <RESULT IF_PASS COUNT 1> |
| 6686 | (?im)error.+?non-negative.+?float.+?value.+?expected |
| 6687 | <END_RESULT> |
| 6688 | <RESULT IF_PASS COUNT 1> |
| 6689 | (?is)\berror: |
| 6690 | <END_RESULT> |
| 6691 | <END_TC> |
| 6692 | |
| 6693 | :exmp. |
| 6694 | |
| 6695 | .*---------------------------------------------------------------------* |
| 6696 | :h4.Negative timer duration - array default (in function) |
| 6697 | .*---------------------------------------------------------------------* |
| 6698 | :xmp tab=0. |
| 6699 | |
| 6700 | <TC - Negative timer duration - array default (in function)> |
| 6701 | |
| 6702 | <COMPILE> |
| 6703 | <VERDICT_LEAF PASS> |
| 6704 | <MODULE TTCN x x.ttcn> |
| 6705 | module x { |
| 6706 | |
| 6707 | const float f:= -2.22; |
| 6708 | |
| 6709 | function myFunct(){ |
| 6710 | timer T[5]:= { 1.0, f, 3.14, -, 1.5 }; |
| 6711 | } |
| 6712 | } |
| 6713 | <END_MODULE> |
| 6714 | <RESULT IF_PASS COUNT 1> |
| 6715 | (?im)error.+?non-negative.+?float.+?value.+?expected |
| 6716 | <END_RESULT> |
| 6717 | <RESULT IF_PASS COUNT 1> |
| 6718 | (?is)\berror: |
| 6719 | <END_RESULT> |
| 6720 | <END_TC> |
| 6721 | |
| 6722 | :exmp. |
| 6723 | |
| 6724 | .*---------------------------------------------------------------------* |
| 6725 | :h4.Negative timer duration - starting value (in control part) |
| 6726 | .*---------------------------------------------------------------------* |
| 6727 | :xmp tab=0. |
| 6728 | |
| 6729 | <TC - Negative timer duration - starting value (in control part)> |
| 6730 | |
| 6731 | <COMPILE> |
| 6732 | <VERDICT_LEAF PASS> |
| 6733 | <MODULE TTCN x x.ttcn> |
| 6734 | module x { |
| 6735 | |
| 6736 | control{ |
| 6737 | timer T:= 12.0; |
| 6738 | |
| 6739 | T.start( -5.9 ); |
| 6740 | } |
| 6741 | } |
| 6742 | <END_MODULE> |
| 6743 | <RESULT IF_PASS COUNT 1> |
| 6744 | (?im)error.+?timer.+?duration.+?negative |
| 6745 | <END_RESULT> |
| 6746 | <RESULT IF_PASS COUNT 1> |
| 6747 | (?is)\berror: |
| 6748 | <END_RESULT> |
| 6749 | <END_TC> |
| 6750 | |
| 6751 | :exmp. |
| 6752 | |
| 6753 | .*---------------------------------------------------------------------* |
| 6754 | :h4.Negative timer duration - starting value (in function) |
| 6755 | .*---------------------------------------------------------------------* |
| 6756 | :xmp tab=0. |
| 6757 | |
| 6758 | <TC - Negative timer duration - starting value (in function)> |
| 6759 | |
| 6760 | <COMPILE> |
| 6761 | <VERDICT_LEAF PASS> |
| 6762 | <MODULE TTCN x x.ttcn> |
| 6763 | module x { |
| 6764 | |
| 6765 | const float f:= -66.3; |
| 6766 | |
| 6767 | function myFunct(){ |
| 6768 | timer T:= 1234.56; |
| 6769 | |
| 6770 | T.start( f ); |
| 6771 | } |
| 6772 | } |
| 6773 | <END_MODULE> |
| 6774 | <RESULT IF_PASS COUNT 1> |
| 6775 | (?im)error.+?timer.+?duration.+?negative |
| 6776 | <END_RESULT> |
| 6777 | <RESULT IF_PASS COUNT 1> |
| 6778 | (?is)\berror: |
| 6779 | <END_RESULT> |
| 6780 | <END_TC> |
| 6781 | |
| 6782 | :exmp. |
| 6783 | |
| 6784 | .*---------------------------------------------------------------------* |
| 6785 | :h4.Negative timer duration - array starting value (in control part) |
| 6786 | .*---------------------------------------------------------------------* |
| 6787 | :xmp tab=0. |
| 6788 | |
| 6789 | <TC - Negative timer duration - array starting value (in control part)> |
| 6790 | |
| 6791 | <COMPILE> |
| 6792 | <VERDICT_LEAF PASS> |
| 6793 | <MODULE TTCN x x.ttcn> |
| 6794 | module x { |
| 6795 | |
| 6796 | control{ |
| 6797 | timer T[5]:= { 1.0, 8.9, 3.14, 1.1, 1.5 }; |
| 6798 | |
| 6799 | T[1].start( - 125.0 ); |
| 6800 | } |
| 6801 | } |
| 6802 | <END_MODULE> |
| 6803 | <RESULT IF_PASS COUNT 1> |
| 6804 | (?im)error.+?timer.+?duration.+?negative |
| 6805 | <END_RESULT> |
| 6806 | <RESULT IF_PASS COUNT 1> |
| 6807 | (?is)\berror: |
| 6808 | <END_RESULT> |
| 6809 | <END_TC> |
| 6810 | |
| 6811 | :exmp. |
| 6812 | |
| 6813 | .*---------------------------------------------------------------------* |
| 6814 | :h4.Negative timer duration - array starting value (in function) |
| 6815 | .*---------------------------------------------------------------------* |
| 6816 | :xmp tab=0. |
| 6817 | |
| 6818 | <TC - Negative timer duration - array starting value (in function)> |
| 6819 | |
| 6820 | <COMPILE> |
| 6821 | <VERDICT_LEAF PASS> |
| 6822 | <MODULE TTCN x x.ttcn> |
| 6823 | module x { |
| 6824 | |
| 6825 | const float f:= -18.07; |
| 6826 | |
| 6827 | function myFunct(){ |
| 6828 | timer T[5]:= { 3.3, 3.4, 3.14, 4.1, 2.3 }; |
| 6829 | |
| 6830 | T[1].start( f ); |
| 6831 | } |
| 6832 | } |
| 6833 | <END_MODULE> |
| 6834 | <RESULT IF_PASS COUNT 1> |
| 6835 | (?im)error.+?timer.+?duration.+?negative |
| 6836 | <END_RESULT> |
| 6837 | <RESULT IF_PASS COUNT 1> |
| 6838 | (?is)\berror: |
| 6839 | <END_RESULT> |
| 6840 | <END_TC> |
| 6841 | |
| 6842 | :exmp. |
| 6843 | |
| 6844 | .*---------------------------------------------------------------------* |
| 6845 | :h4.Negative timer duration - execution timer |
| 6846 | .*---------------------------------------------------------------------* |
| 6847 | :xmp tab=0. |
| 6848 | |
| 6849 | <TC - Negative timer duration - execution timer> |
| 6850 | |
| 6851 | <COMPILE> |
| 6852 | <VERDICT_LEAF PASS> |
| 6853 | <MODULE TTCN x x.ttcn> |
| 6854 | module x { |
| 6855 | |
| 6856 | type component myComponent{ |
| 6857 | const integer i:= 1; |
| 6858 | } |
| 6859 | |
| 6860 | function myFunct(){ |
| 6861 | |
| 6862 | timer T1:= 20.0; |
| 6863 | T1.start; |
| 6864 | } |
| 6865 | |
| 6866 | testcase myTestCase() runs on myComponent{ |
| 6867 | |
| 6868 | myFunct(); |
| 6869 | } |
| 6870 | |
| 6871 | control{ |
| 6872 | |
| 6873 | execute( myTestCase(), -5.3 ); |
| 6874 | } |
| 6875 | |
| 6876 | } |
| 6877 | <END_MODULE> |
| 6878 | <RESULT IF_PASS COUNT 1> |
| 6879 | (?im)error.+?testcase.+?guard.+?timer.+?negative.+?duration |
| 6880 | <END_RESULT> |
| 6881 | <RESULT IF_PASS COUNT 1> |
| 6882 | (?is)\berror: |
| 6883 | <END_RESULT> |
| 6884 | <END_TC> |
| 6885 | |
| 6886 | :exmp. |
| 6887 | |
| 6888 | .*---------------------------------------------------------------------* |
| 6889 | :h3.Default module parameters |
| 6890 | .*---------------------------------------------------------------------* |
| 6891 | |
| 6892 | This test case group covers the requirement SA-6/18. |
| 6893 | |
| 6894 | Strategy: Default values of module parameters shall be constant expression only. |
| 6895 | All occurances shall be tested, where such a notation can be used. |
| 6896 | |
| 6897 | Tested: |
| 6898 | :list. |
| 6899 | :li D='-'.module parameters with inner function |
| 6900 | :li D='-'.module parameters with hand-made function |
| 6901 | :elist. |
| 6902 | |
| 6903 | .*---------------------------------------------------------------------* |
| 6904 | :h4.Default module parameters - inner function |
| 6905 | .*---------------------------------------------------------------------* |
| 6906 | :xmp tab=0. |
| 6907 | |
| 6908 | <TC - Default module parameters - inner function> |
| 6909 | |
| 6910 | <COMPILE> |
| 6911 | <VERDICT_LEAF PASS> |
| 6912 | <MODULE TTCN x x.ttcn> |
| 6913 | module x { |
| 6914 | |
| 6915 | modulepar { integer i:= float2int( rnd()); charstring ch:= "aiyyo" }; |
| 6916 | } |
| 6917 | <END_MODULE> |
| 6918 | <RESULT IF_PASS COUNT 1> |
| 6919 | (?im)error.+?evaluable.+?constant.+?value.+?expected.+?instead.+?of.+?operation |
| 6920 | <END_RESULT> |
| 6921 | <RESULT IF_PASS COUNT 1> |
| 6922 | (?is)\berror: |
| 6923 | <END_RESULT> |
| 6924 | <END_TC> |
| 6925 | |
| 6926 | :exmp. |
| 6927 | |
| 6928 | .*---------------------------------------------------------------------* |
| 6929 | :h4.Default module parameters - hand-made function |
| 6930 | .*---------------------------------------------------------------------* |
| 6931 | :xmp tab=0. |
| 6932 | |
| 6933 | <TC - Default module parameters - hand-made function> |
| 6934 | |
| 6935 | <COMPILE> |
| 6936 | <VERDICT_LEAF PASS> |
| 6937 | <MODULE TTCN x x.ttcn> |
| 6938 | module x { |
| 6939 | |
| 6940 | function myFunct() return charstring{ |
| 6941 | return "RETURNED"; |
| 6942 | } |
| 6943 | |
| 6944 | modulepar { integer i:= 3; charstring ch:= "aiyyo" & myFunct() }; |
| 6945 | |
| 6946 | } |
| 6947 | <END_MODULE> |
| 6948 | <RESULT IF_PASS COUNT 1> |
| 6949 | (?im)error.+?Reference.+?constant.+?value.+?expected |
| 6950 | <END_RESULT> |
| 6951 | <RESULT IF_PASS COUNT 1> |
| 6952 | (?is)\berror: |
| 6953 | <END_RESULT> |
| 6954 | <END_TC> |
| 6955 | |
| 6956 | :exmp. |
| 6957 | |
| 6958 | .*---------------------------------------------------------------------* |
| 6959 | :h2.Variable references |
| 6960 | .*---------------------------------------------------------------------* |
| 6961 | |
| 6962 | Rule: each variable reference shall conform to the context-specific rules |
| 6963 | |
| 6964 | .*---------------------------------------------------------------------* |
| 6965 | :h3.No value shall be assigned to constant elements |
| 6966 | .*---------------------------------------------------------------------* |
| 6967 | |
| 6968 | This test case group covers the requirement SA-6/19. |
| 6969 | |
| 6970 | Strategy: can't change the value of constants, external constants and module parameters. |
| 6971 | All occurances shall be tested, where such a notation can be used. |
| 6972 | |
| 6973 | Tested: |
| 6974 | :list. |
| 6975 | :li D='-'.constants, external constants and module parameters in control part and function with ":=" |
| 6976 | :li D='-'.constants, external constants and module parameters in function with "-> value" |
| 6977 | :elist. |
| 6978 | |
| 6979 | .*---------------------------------------------------------------------* |
| 6980 | :h4.No value shall be assigned to constant elements - const in control part (:=) |
| 6981 | .*---------------------------------------------------------------------* |
| 6982 | :xmp tab=0. |
| 6983 | |
| 6984 | <TC - No value shall be assigned to constant elements - const in control part (:=)> |
| 6985 | |
| 6986 | <COMPILE> |
| 6987 | <VERDICT_LEAF PASS> |
| 6988 | <MODULE TTCN x x.ttcn> |
| 6989 | module x { |
| 6990 | |
| 6991 | const integer c:= 1; |
| 6992 | |
| 6993 | control{ |
| 6994 | |
| 6995 | c:=2; |
| 6996 | } |
| 6997 | } |
| 6998 | <END_MODULE> |
| 6999 | <RESULT IF_PASS COUNT 1> |
| 7000 | (?im)error.+?Reference.+?variable.+?template.+?expected |
| 7001 | <END_RESULT> |
| 7002 | <RESULT IF_PASS COUNT 1> |
| 7003 | (?is)\berror: |
| 7004 | <END_RESULT> |
| 7005 | <END_TC> |
| 7006 | |
| 7007 | :exmp. |
| 7008 | |
| 7009 | .*---------------------------------------------------------------------* |
| 7010 | :h4.No value shall be assigned to constant elements - const in function (:=) |
| 7011 | .*---------------------------------------------------------------------* |
| 7012 | :xmp tab=0. |
| 7013 | |
| 7014 | <TC - No value shall be assigned to constant elements - const in function (:=)> |
| 7015 | |
| 7016 | <COMPILE> |
| 7017 | <VERDICT_LEAF PASS> |
| 7018 | <MODULE TTCN x x.ttcn> |
| 7019 | module x { |
| 7020 | |
| 7021 | const integer c:= 1; |
| 7022 | |
| 7023 | function myFunct(){ |
| 7024 | |
| 7025 | c:=2; |
| 7026 | } |
| 7027 | } |
| 7028 | <END_MODULE> |
| 7029 | <RESULT IF_PASS COUNT 1> |
| 7030 | (?im)error.+?Reference.+?variable.+?template.+?expected |
| 7031 | <END_RESULT> |
| 7032 | <RESULT IF_PASS COUNT 1> |
| 7033 | (?is)\berror: |
| 7034 | <END_RESULT> |
| 7035 | <END_TC> |
| 7036 | |
| 7037 | :exmp. |
| 7038 | |
| 7039 | .*---------------------------------------------------------------------* |
| 7040 | :h4.No value shall be assigned to constant elements - const in function ( -> value) |
| 7041 | .*---------------------------------------------------------------------* |
| 7042 | :xmp tab=0. |
| 7043 | |
| 7044 | <TC - No value shall be assigned to constant elements - const in function ( -> value)> |
| 7045 | |
| 7046 | <COMPILE> |
| 7047 | <VERDICT_LEAF PASS> |
| 7048 | <MODULE TTCN x x.ttcn> |
| 7049 | module x { |
| 7050 | |
| 7051 | const integer c:= 2; |
| 7052 | |
| 7053 | type port portT message { |
| 7054 | in integer |
| 7055 | } with {extension "internal"} |
| 7056 | |
| 7057 | type component comp { |
| 7058 | port portT myPort; |
| 7059 | } |
| 7060 | |
| 7061 | function myFunct() runs on comp { |
| 7062 | myPort.receive( ?) -> value c; |
| 7063 | } |
| 7064 | |
| 7065 | } |
| 7066 | <END_MODULE> |
| 7067 | <RESULT IF_PASS COUNT 1> |
| 7068 | (?im)error.+?Reference.+?variable.+?value.+?parameter.+?expected |
| 7069 | <END_RESULT> |
| 7070 | <RESULT IF_PASS COUNT 1> |
| 7071 | (?is)\berror: |
| 7072 | <END_RESULT> |
| 7073 | <END_TC> |
| 7074 | |
| 7075 | :exmp. |
| 7076 | |
| 7077 | .*---------------------------------------------------------------------* |
| 7078 | :h4.No value shall be assigned to constant elements - external const in control part (:=) |
| 7079 | .*---------------------------------------------------------------------* |
| 7080 | :xmp tab=0. |
| 7081 | |
| 7082 | <TC - No value shall be assigned to constant elements - external const in control part (:=)> |
| 7083 | |
| 7084 | <COMPILE> |
| 7085 | <VERDICT_LEAF PASS> |
| 7086 | <MODULE TTCN x x.ttcn> |
| 7087 | module x { |
| 7088 | |
| 7089 | external const integer c; |
| 7090 | |
| 7091 | control{ |
| 7092 | |
| 7093 | c:=2; |
| 7094 | } |
| 7095 | } |
| 7096 | <END_MODULE> |
| 7097 | <RESULT IF_PASS COUNT 1> |
| 7098 | (?im)error.+?Reference.+?variable.+?template.+?expected |
| 7099 | <END_RESULT> |
| 7100 | <RESULT IF_PASS COUNT 1> |
| 7101 | (?is)\berror: |
| 7102 | <END_RESULT> |
| 7103 | <END_TC> |
| 7104 | |
| 7105 | :exmp. |
| 7106 | |
| 7107 | .*---------------------------------------------------------------------* |
| 7108 | :h4.No value shall be assigned to constant elements - external const in function (:=) |
| 7109 | .*---------------------------------------------------------------------* |
| 7110 | :xmp tab=0. |
| 7111 | |
| 7112 | <TC - No value shall be assigned to constant elements - external const in function (:=)> |
| 7113 | |
| 7114 | <COMPILE> |
| 7115 | <VERDICT_LEAF PASS> |
| 7116 | <MODULE TTCN x x.ttcn> |
| 7117 | module x { |
| 7118 | |
| 7119 | external const integer c; |
| 7120 | |
| 7121 | function myFunct(){ |
| 7122 | |
| 7123 | c:=2; |
| 7124 | } |
| 7125 | } |
| 7126 | <END_MODULE> |
| 7127 | <RESULT IF_PASS COUNT 1> |
| 7128 | (?im)error.+?Reference.+?variable.+?template.+?expected |
| 7129 | <END_RESULT> |
| 7130 | <RESULT IF_PASS COUNT 1> |
| 7131 | (?is)\berror: |
| 7132 | <END_RESULT> |
| 7133 | <END_TC> |
| 7134 | |
| 7135 | :exmp. |
| 7136 | |
| 7137 | .*---------------------------------------------------------------------* |
| 7138 | :h4.No value shall be assigned to constant elements - external const in function ( -> value) |
| 7139 | .*---------------------------------------------------------------------* |
| 7140 | :xmp tab=0. |
| 7141 | |
| 7142 | <TC - No value shall be assigned to constant elements - external const in function ( -> value)> |
| 7143 | |
| 7144 | <COMPILE> |
| 7145 | <VERDICT_LEAF PASS> |
| 7146 | <MODULE TTCN x x.ttcn> |
| 7147 | module x { |
| 7148 | |
| 7149 | external const integer c; |
| 7150 | |
| 7151 | type port portT message { |
| 7152 | in integer |
| 7153 | } with {extension "internal"} |
| 7154 | |
| 7155 | type component comp { |
| 7156 | port portT myPort; |
| 7157 | } |
| 7158 | |
| 7159 | function myFunct() runs on comp { |
| 7160 | myPort.receive( ?) -> value c; |
| 7161 | } |
| 7162 | |
| 7163 | } |
| 7164 | <END_MODULE> |
| 7165 | <RESULT IF_PASS COUNT 1> |
| 7166 | (?im)error.+?Reference.+?variable.+?value.+?parameter.+?expected |
| 7167 | <END_RESULT> |
| 7168 | <RESULT IF_PASS COUNT 1> |
| 7169 | (?is)\berror: |
| 7170 | <END_RESULT> |
| 7171 | <END_TC> |
| 7172 | |
| 7173 | :exmp. |
| 7174 | |
| 7175 | .*---------------------------------------------------------------------* |
| 7176 | :h4.No value shall be assigned to constant elements - module parameter in control part (:=) |
| 7177 | .*---------------------------------------------------------------------* |
| 7178 | :xmp tab=0. |
| 7179 | |
| 7180 | <TC - No value shall be assigned to constant elements - module parameter in control part (:=)> |
| 7181 | |
| 7182 | <COMPILE> |
| 7183 | <VERDICT_LEAF PASS> |
| 7184 | <MODULE TTCN x x.ttcn> |
| 7185 | module x { |
| 7186 | |
| 7187 | modulepar{ |
| 7188 | integer c |
| 7189 | } |
| 7190 | |
| 7191 | control{ |
| 7192 | c:= 3; |
| 7193 | } |
| 7194 | } |
| 7195 | <END_MODULE> |
| 7196 | <RESULT IF_PASS COUNT 1> |
| 7197 | (?im)error.+?Reference.+?variable.+?template.+?expected |
| 7198 | <END_RESULT> |
| 7199 | <RESULT IF_PASS COUNT 1> |
| 7200 | (?is)\berror: |
| 7201 | <END_RESULT> |
| 7202 | <END_TC> |
| 7203 | |
| 7204 | :exmp. |
| 7205 | |
| 7206 | .*---------------------------------------------------------------------* |
| 7207 | :h4.No value shall be assigned to constant elements - module parameter in function (:=) |
| 7208 | .*---------------------------------------------------------------------* |
| 7209 | :xmp tab=0. |
| 7210 | |
| 7211 | <TC - No value shall be assigned to constant elements - module parameter in function (:=)> |
| 7212 | |
| 7213 | <COMPILE> |
| 7214 | <VERDICT_LEAF PASS> |
| 7215 | <MODULE TTCN x x.ttcn> |
| 7216 | module x { |
| 7217 | |
| 7218 | modulepar{ |
| 7219 | integer c |
| 7220 | } |
| 7221 | |
| 7222 | function myFunct(){ |
| 7223 | c:= 3; |
| 7224 | } |
| 7225 | } |
| 7226 | <END_MODULE> |
| 7227 | <RESULT IF_PASS COUNT 1> |
| 7228 | (?im)error.+?Reference.+?variable.+?template.+?expected |
| 7229 | <END_RESULT> |
| 7230 | <RESULT IF_PASS COUNT 1> |
| 7231 | (?is)\berror: |
| 7232 | <END_RESULT> |
| 7233 | <END_TC> |
| 7234 | |
| 7235 | :exmp. |
| 7236 | |
| 7237 | .*---------------------------------------------------------------------* |
| 7238 | :h4.No value shall be assigned to constant elements - module parameter in function (-> value) |
| 7239 | .*---------------------------------------------------------------------* |
| 7240 | :xmp tab=0. |
| 7241 | |
| 7242 | <TC - No value shall be assigned to constant elements - module parameter in function (-> value)> |
| 7243 | |
| 7244 | <COMPILE> |
| 7245 | <VERDICT_LEAF PASS> |
| 7246 | <MODULE TTCN x x.ttcn> |
| 7247 | module x { |
| 7248 | |
| 7249 | modulepar{ |
| 7250 | integer c |
| 7251 | } |
| 7252 | |
| 7253 | type port portT message { |
| 7254 | in integer |
| 7255 | } with {extension "internal"} |
| 7256 | |
| 7257 | type component comp { |
| 7258 | port portT myPort; |
| 7259 | } |
| 7260 | |
| 7261 | function myFunct() runs on comp { |
| 7262 | myPort.receive( ?) -> value c; |
| 7263 | } |
| 7264 | |
| 7265 | } |
| 7266 | <END_MODULE> |
| 7267 | <RESULT IF_PASS COUNT 1> |
| 7268 | (?im)error.+?Reference.+?variable.+?value.+?parameter.+?expected |
| 7269 | <END_RESULT> |
| 7270 | <RESULT IF_PASS COUNT 1> |
| 7271 | (?is)\berror: |
| 7272 | <END_RESULT> |
| 7273 | <END_TC> |
| 7274 | |
| 7275 | :exmp. |
| 7276 | |
| 7277 | .*---------------------------------------------------------------------* |
| 7278 | :h2.Allowed matching mechanisms |
| 7279 | .*---------------------------------------------------------------------* |
| 7280 | .*---------------------------------------------------------------------* |
| 7281 | :h3.Allowed matching mechanisms |
| 7282 | .*---------------------------------------------------------------------* |
| 7283 | |
| 7284 | This test case group covers the requirement SA-6/20. |
| 7285 | |
| 7286 | Strategy: SA shall detect if a template of a type uses not allowed matching mechanism.(Table 6, side 68) |
| 7287 | Either can be used the following operations: create (99), mtc (101), |
| 7288 | system (101), self (101), running (102), getverdict (123) |
| 7289 | |
| 7290 | All occurances shall be tested, where such a notation can be used. |
| 7291 | |
| 7292 | Tested: range, superset, subset, length-restriction, ifpresent mechanisms in definition part, control part and function for |
| 7293 | templates and range, superset, subset, length-restriction, ifpresent mechanisms in function for inline-templates |
| 7294 | |
| 7295 | except |
| 7296 | - "inside values" columns are not tested |
| 7297 | |
| 7298 | .*---------------------------------------------------------------------* |
| 7299 | :h4.Allowed matching mechanisms - template range (boolean in def.part) |
| 7300 | .*---------------------------------------------------------------------* |
| 7301 | :xmp tab=0. |
| 7302 | |
| 7303 | <TC - Allowed matching mechanisms - template range (boolean in def.part)> |
| 7304 | |
| 7305 | <COMPILE> |
| 7306 | <VERDICT_LEAF PASS> |
| 7307 | <MODULE TTCN x x.ttcn> |
| 7308 | module x { |
| 7309 | |
| 7310 | template boolean r:= (false .. true); |
| 7311 | |
| 7312 | } |
| 7313 | <END_MODULE> |
| 7314 | <RESULT IF_PASS COUNT 1> |
| 7315 | (?im)error.+?value.+?range.+?match.+?cannot.+?used |
| 7316 | <END_RESULT> |
| 7317 | <RESULT IF_PASS COUNT 1> |
| 7318 | (?is)\berror: |
| 7319 | <END_RESULT> |
| 7320 | <END_TC> |
| 7321 | |
| 7322 | :exmp. |
| 7323 | |
| 7324 | .*---------------------------------------------------------------------* |
| 7325 | :h4.Allowed matching mechanisms - template range (boolean in control part) |
| 7326 | .*---------------------------------------------------------------------* |
| 7327 | :xmp tab=0. |
| 7328 | |
| 7329 | <TC - Allowed matching mechanisms - template range (boolean in control part)> |
| 7330 | |
| 7331 | <COMPILE> |
| 7332 | <VERDICT_LEAF PASS> |
| 7333 | <MODULE TTCN x x.ttcn> |
| 7334 | module x { |
| 7335 | |
| 7336 | control{ |
| 7337 | var template boolean r:= (false .. true); |
| 7338 | } |
| 7339 | |
| 7340 | } |
| 7341 | <END_MODULE> |
| 7342 | <RESULT IF_PASS COUNT 1> |
| 7343 | (?im)error.+?value.+?range.+?match.+?cannot.+?used |
| 7344 | <END_RESULT> |
| 7345 | <RESULT IF_PASS COUNT 1> |
| 7346 | (?is)\berror: |
| 7347 | <END_RESULT> |
| 7348 | <END_TC> |
| 7349 | |
| 7350 | :exmp. |
| 7351 | |
| 7352 | .*---------------------------------------------------------------------* |
| 7353 | :h4.Allowed matching mechanisms - template range (boolean in function) |
| 7354 | .*---------------------------------------------------------------------* |
| 7355 | :xmp tab=0. |
| 7356 | |
| 7357 | <TC - Allowed matching mechanisms - template range (boolean in function)> |
| 7358 | |
| 7359 | <COMPILE> |
| 7360 | <VERDICT_LEAF PASS> |
| 7361 | <MODULE TTCN x x.ttcn> |
| 7362 | module x { |
| 7363 | |
| 7364 | function myFunct(){ |
| 7365 | var template boolean r:= (false .. true); |
| 7366 | } |
| 7367 | |
| 7368 | } |
| 7369 | <END_MODULE> |
| 7370 | <RESULT IF_PASS COUNT 1> |
| 7371 | (?im)error.+?value.+?range.+?match.+?cannot.+?used |
| 7372 | <END_RESULT> |
| 7373 | <RESULT IF_PASS COUNT 1> |
| 7374 | (?is)\berror: |
| 7375 | <END_RESULT> |
| 7376 | <END_TC> |
| 7377 | |
| 7378 | :exmp. |
| 7379 | |
| 7380 | .*---------------------------------------------------------------------* |
| 7381 | :h4.Allowed matching mechanisms - template range (bitstring in def.part) |
| 7382 | .*---------------------------------------------------------------------* |
| 7383 | :xmp tab=0. |
| 7384 | |
| 7385 | <TC - Allowed matching mechanisms - template range (bitstring in def.part)> |
| 7386 | |
| 7387 | <COMPILE> |
| 7388 | <VERDICT_LEAF PASS> |
| 7389 | <MODULE TTCN x x.ttcn> |
| 7390 | module x { |
| 7391 | |
| 7392 | template bitstring r:= ('000'B .. '111'B); |
| 7393 | |
| 7394 | } |
| 7395 | <END_MODULE> |
| 7396 | <RESULT IF_PASS COUNT 1> |
| 7397 | (?im)error.+?Value.+?range.+?match.+?cannot.+?used |
| 7398 | <END_RESULT> |
| 7399 | <RESULT IF_PASS COUNT 1> |
| 7400 | (?is)\berror: |
| 7401 | <END_RESULT> |
| 7402 | <END_TC> |
| 7403 | |
| 7404 | :exmp. |
| 7405 | |
| 7406 | .*---------------------------------------------------------------------* |
| 7407 | :h4.Allowed matching mechanisms - template range (bitstring in control part) |
| 7408 | .*---------------------------------------------------------------------* |
| 7409 | :xmp tab=0. |
| 7410 | |
| 7411 | <TC - Allowed matching mechanisms - template range (bitstring in control part)> |
| 7412 | |
| 7413 | <COMPILE> |
| 7414 | <VERDICT_LEAF PASS> |
| 7415 | <MODULE TTCN x x.ttcn> |
| 7416 | module x { |
| 7417 | |
| 7418 | control{ |
| 7419 | var template bitstring r:= ('000'B .. '111'B); |
| 7420 | } |
| 7421 | |
| 7422 | } |
| 7423 | <END_MODULE> |
| 7424 | <RESULT IF_PASS COUNT 1> |
| 7425 | (?im)error.+?Value.+?range.+?match.+?cannot.+?used |
| 7426 | <END_RESULT> |
| 7427 | <RESULT IF_PASS COUNT 1> |
| 7428 | (?is)\berror: |
| 7429 | <END_RESULT> |
| 7430 | <END_TC> |
| 7431 | |
| 7432 | :exmp. |
| 7433 | |
| 7434 | .*---------------------------------------------------------------------* |
| 7435 | :h4.Allowed matching mechanisms - template range (bitstring in function) |
| 7436 | .*---------------------------------------------------------------------* |
| 7437 | :xmp tab=0. |
| 7438 | |
| 7439 | <TC - Allowed matching mechanisms - template range (bitstring in function)> |
| 7440 | |
| 7441 | <COMPILE> |
| 7442 | <VERDICT_LEAF PASS> |
| 7443 | <MODULE TTCN x x.ttcn> |
| 7444 | module x { |
| 7445 | |
| 7446 | function myFunct(){ |
| 7447 | var template bitstring r:= ('000'B .. '111'B); |
| 7448 | } |
| 7449 | |
| 7450 | } |
| 7451 | <END_MODULE> |
| 7452 | <RESULT IF_PASS COUNT 1> |
| 7453 | (?im)error.+?Value.+?range.+?match.+?cannot.+?used |
| 7454 | <END_RESULT> |
| 7455 | <RESULT IF_PASS COUNT 1> |
| 7456 | (?is)\berror: |
| 7457 | <END_RESULT> |
| 7458 | <END_TC> |
| 7459 | |
| 7460 | :exmp. |
| 7461 | |
| 7462 | .*---------------------------------------------------------------------* |
| 7463 | :h4.Allowed matching mechanisms - template range (octetstring in def.part) |
| 7464 | .*---------------------------------------------------------------------* |
| 7465 | :xmp tab=0. |
| 7466 | |
| 7467 | <TC - Allowed matching mechanisms - template range (octetstring in def.part)> |
| 7468 | |
| 7469 | <COMPILE> |
| 7470 | <VERDICT_LEAF PASS> |
| 7471 | <MODULE TTCN x x.ttcn> |
| 7472 | module x { |
| 7473 | |
| 7474 | template octetstring r:= ('0011'O .. '1111'O); |
| 7475 | |
| 7476 | } |
| 7477 | <END_MODULE> |
| 7478 | <RESULT IF_PASS COUNT 1> |
| 7479 | (?im)error.+?Value.+?range.+?match.+?cannot.+?used |
| 7480 | <END_RESULT> |
| 7481 | <RESULT IF_PASS COUNT 1> |
| 7482 | (?is)\berror: |
| 7483 | <END_RESULT> |
| 7484 | <END_TC> |
| 7485 | |
| 7486 | :exmp. |
| 7487 | |
| 7488 | .*---------------------------------------------------------------------* |
| 7489 | :h4.Allowed matching mechanisms - template range (octetstring in control part) |
| 7490 | .*---------------------------------------------------------------------* |
| 7491 | :xmp tab=0. |
| 7492 | |
| 7493 | <TC - Allowed matching mechanisms - template range (octetstring in control part)> |
| 7494 | |
| 7495 | <COMPILE> |
| 7496 | <VERDICT_LEAF PASS> |
| 7497 | <MODULE TTCN x x.ttcn> |
| 7498 | module x { |
| 7499 | |
| 7500 | control{ |
| 7501 | var template octetstring r:= ('0011'O .. '1111'O); |
| 7502 | } |
| 7503 | |
| 7504 | } |
| 7505 | <END_MODULE> |
| 7506 | <RESULT IF_PASS COUNT 1> |
| 7507 | (?im)error.+?Value.+?range.+?match.+?cannot.+?used |
| 7508 | <END_RESULT> |
| 7509 | <RESULT IF_PASS COUNT 1> |
| 7510 | (?is)\berror: |
| 7511 | <END_RESULT> |
| 7512 | <END_TC> |
| 7513 | |
| 7514 | :exmp. |
| 7515 | |
| 7516 | .*---------------------------------------------------------------------* |
| 7517 | :h4.Allowed matching mechanisms - template range (octetstring in function) |
| 7518 | .*---------------------------------------------------------------------* |
| 7519 | :xmp tab=0. |
| 7520 | |
| 7521 | <TC - Allowed matching mechanisms - template range (octetstring in function)> |
| 7522 | |
| 7523 | <COMPILE> |
| 7524 | <VERDICT_LEAF PASS> |
| 7525 | <MODULE TTCN x x.ttcn> |
| 7526 | module x { |
| 7527 | |
| 7528 | function myFunct(){ |
| 7529 | var template octetstring r:= ('0011'O .. '1111'O); |
| 7530 | } |
| 7531 | |
| 7532 | } |
| 7533 | <END_MODULE> |
| 7534 | <RESULT IF_PASS COUNT 1> |
| 7535 | (?im)error.+?Value.+?range.+?match.+?cannot.+?used |
| 7536 | <END_RESULT> |
| 7537 | <RESULT IF_PASS COUNT 1> |
| 7538 | (?is)\berror: |
| 7539 | <END_RESULT> |
| 7540 | <END_TC> |
| 7541 | |
| 7542 | :exmp. |
| 7543 | |
| 7544 | .*---------------------------------------------------------------------* |
| 7545 | :h4.Allowed matching mechanisms - template range (hexstring in def.part) |
| 7546 | .*---------------------------------------------------------------------* |
| 7547 | :xmp tab=0. |
| 7548 | |
| 7549 | <TC - Allowed matching mechanisms - template range (hexstring in def.part)> |
| 7550 | |
| 7551 | <COMPILE> |
| 7552 | <VERDICT_LEAF PASS> |
| 7553 | <MODULE TTCN x x.ttcn> |
| 7554 | module x { |
| 7555 | |
| 7556 | template hexstring r:= ('0011'H .. '1111'H); |
| 7557 | |
| 7558 | } |
| 7559 | <END_MODULE> |
| 7560 | <RESULT IF_PASS COUNT 1> |
| 7561 | (?im)error.+?Value.+?range.+?match.+?cannot.+?used |
| 7562 | <END_RESULT> |
| 7563 | <RESULT IF_PASS COUNT 1> |
| 7564 | (?is)\berror: |
| 7565 | <END_RESULT> |
| 7566 | <END_TC> |
| 7567 | |
| 7568 | :exmp. |
| 7569 | |
| 7570 | .*---------------------------------------------------------------------* |
| 7571 | :h4.Allowed matching mechanisms - template range (hexstring in control part) |
| 7572 | .*---------------------------------------------------------------------* |
| 7573 | :xmp tab=0. |
| 7574 | |
| 7575 | <TC - Allowed matching mechanisms - template range (hexstring in control part)> |
| 7576 | |
| 7577 | <COMPILE> |
| 7578 | <VERDICT_LEAF PASS> |
| 7579 | <MODULE TTCN x x.ttcn> |
| 7580 | module x { |
| 7581 | |
| 7582 | control{ |
| 7583 | var template hexstring r:= ('0011'H .. '1111'H); |
| 7584 | } |
| 7585 | |
| 7586 | } |
| 7587 | <END_MODULE> |
| 7588 | <RESULT IF_PASS COUNT 1> |
| 7589 | (?im)error.+?Value.+?range.+?match.+?cannot.+?used |
| 7590 | <END_RESULT> |
| 7591 | <RESULT IF_PASS COUNT 1> |
| 7592 | (?is)\berror: |
| 7593 | <END_RESULT> |
| 7594 | <END_TC> |
| 7595 | |
| 7596 | :exmp. |
| 7597 | |
| 7598 | .*---------------------------------------------------------------------* |
| 7599 | :h4.Allowed matching mechanisms - template range (hexstring in function) |
| 7600 | .*---------------------------------------------------------------------* |
| 7601 | :xmp tab=0. |
| 7602 | |
| 7603 | <TC - Allowed matching mechanisms - template range (hexstring in function)> |
| 7604 | |
| 7605 | <COMPILE> |
| 7606 | <VERDICT_LEAF PASS> |
| 7607 | <MODULE TTCN x x.ttcn> |
| 7608 | module x { |
| 7609 | |
| 7610 | function myFunct(){ |
| 7611 | var template hexstring r:= ('0011'H .. '1111'H); |
| 7612 | } |
| 7613 | |
| 7614 | } |
| 7615 | <END_MODULE> |
| 7616 | <RESULT IF_PASS COUNT 1> |
| 7617 | (?im)error.+?Value.+?range.+?match.+?cannot.+?used |
| 7618 | <END_RESULT> |
| 7619 | <RESULT IF_PASS COUNT 1> |
| 7620 | (?is)\berror: |
| 7621 | <END_RESULT> |
| 7622 | <END_TC> |
| 7623 | |
| 7624 | :exmp. |
| 7625 | |
| 7626 | .*---------------------------------------------------------------------* |
| 7627 | :h4.Allowed matching mechanisms - template range (record in def.part) |
| 7628 | .*---------------------------------------------------------------------* |
| 7629 | :xmp tab=0. |
| 7630 | |
| 7631 | <TC - Allowed matching mechanisms - template range (record in def.part)> |
| 7632 | |
| 7633 | <COMPILE> |
| 7634 | <VERDICT_LEAF PASS> |
| 7635 | <MODULE TTCN x x.ttcn> |
| 7636 | module x { |
| 7637 | |
| 7638 | type record recT{ |
| 7639 | integer f1, |
| 7640 | float f2 |
| 7641 | } |
| 7642 | |
| 7643 | const recT c1:= { f1:= 1, f2:= 2.0}; |
| 7644 | const recT c2:= { f1:= 5, f2:= 7.0}; |
| 7645 | |
| 7646 | template recT r:= (c1 .. c2); |
| 7647 | |
| 7648 | } |
| 7649 | <END_MODULE> |
| 7650 | <RESULT IF_PASS COUNT 1> |
| 7651 | (?im)error.+?value.+?range.+?match.+?cannot.+?used |
| 7652 | <END_RESULT> |
| 7653 | <RESULT IF_PASS COUNT 1> |
| 7654 | (?is)\berror: |
| 7655 | <END_RESULT> |
| 7656 | <END_TC> |
| 7657 | |
| 7658 | :exmp. |
| 7659 | |
| 7660 | .*---------------------------------------------------------------------* |
| 7661 | :h4.Allowed matching mechanisms - template range (record in control part) |
| 7662 | .*---------------------------------------------------------------------* |
| 7663 | :xmp tab=0. |
| 7664 | |
| 7665 | <TC - Allowed matching mechanisms - template range (record in control part)> |
| 7666 | |
| 7667 | <COMPILE> |
| 7668 | <VERDICT_LEAF PASS> |
| 7669 | <MODULE TTCN x x.ttcn> |
| 7670 | module x { |
| 7671 | |
| 7672 | type record recT{ |
| 7673 | integer f1, |
| 7674 | float f2 |
| 7675 | } |
| 7676 | |
| 7677 | const recT c1:= { f1:= 1, f2:= 2.0}; |
| 7678 | const recT c2:= { f1:= 5, f2:= 7.0}; |
| 7679 | |
| 7680 | control{ |
| 7681 | var template recT r:= (c1 .. c2); |
| 7682 | } |
| 7683 | |
| 7684 | } |
| 7685 | <END_MODULE> |
| 7686 | <RESULT IF_PASS COUNT 1> |
| 7687 | (?im)error.+?value.+?range.+?match.+?cannot.+?used |
| 7688 | <END_RESULT> |
| 7689 | <RESULT IF_PASS COUNT 1> |
| 7690 | (?is)\berror: |
| 7691 | <END_RESULT> |
| 7692 | <END_TC> |
| 7693 | |
| 7694 | :exmp. |
| 7695 | |
| 7696 | .*---------------------------------------------------------------------* |
| 7697 | :h4.Allowed matching mechanisms - template range (record in function) |
| 7698 | .*---------------------------------------------------------------------* |
| 7699 | :xmp tab=0. |
| 7700 | |
| 7701 | <TC - Allowed matching mechanisms - template range (record in function)> |
| 7702 | |
| 7703 | <COMPILE> |
| 7704 | <VERDICT_LEAF PASS> |
| 7705 | <MODULE TTCN x x.ttcn> |
| 7706 | module x { |
| 7707 | |
| 7708 | type record recT{ |
| 7709 | integer f1, |
| 7710 | float f2 |
| 7711 | } |
| 7712 | |
| 7713 | const recT c1:= { f1:= 1, f2:= 2.0}; |
| 7714 | const recT c2:= { f1:= 5, f2:= 7.0}; |
| 7715 | |
| 7716 | function myFunct(){ |
| 7717 | var template recT r:= (c1 .. c2); |
| 7718 | } |
| 7719 | |
| 7720 | } |
| 7721 | <END_MODULE> |
| 7722 | <RESULT IF_PASS COUNT 1> |
| 7723 | (?im)error.+?value.+?range.+?match.+?cannot.+?used |
| 7724 | <END_RESULT> |
| 7725 | <RESULT IF_PASS COUNT 1> |
| 7726 | (?is)\berror: |
| 7727 | <END_RESULT> |
| 7728 | <END_TC> |
| 7729 | |
| 7730 | :exmp. |
| 7731 | |
| 7732 | .*---------------------------------------------------------------------* |
| 7733 | :h4.Allowed matching mechanisms - template range (record of in def.part) |
| 7734 | .*---------------------------------------------------------------------* |
| 7735 | :xmp tab=0. |
| 7736 | |
| 7737 | <TC - Allowed matching mechanisms - template range (record of in def.part)> |
| 7738 | |
| 7739 | <COMPILE> |
| 7740 | <VERDICT_LEAF PASS> |
| 7741 | <MODULE TTCN x x.ttcn> |
| 7742 | module x { |
| 7743 | |
| 7744 | type record of integer rofT; |
| 7745 | |
| 7746 | const rofT c1:= { 1, 2, 3 }; |
| 7747 | const rofT c2:= { 4, 5, 6 }; |
| 7748 | |
| 7749 | template rofT r:= (c1 .. c2); |
| 7750 | |
| 7751 | } |
| 7752 | <END_MODULE> |
| 7753 | <RESULT IF_PASS COUNT 1> |
| 7754 | (?im)error.+?value.+?range.+?match.+?cannot.+?used |
| 7755 | <END_RESULT> |
| 7756 | <RESULT IF_PASS COUNT 1> |
| 7757 | (?is)\berror: |
| 7758 | <END_RESULT> |
| 7759 | <END_TC> |
| 7760 | |
| 7761 | :exmp. |
| 7762 | |
| 7763 | .*---------------------------------------------------------------------* |
| 7764 | :h4.Allowed matching mechanisms - template range (record of in control part) |
| 7765 | .*---------------------------------------------------------------------* |
| 7766 | :xmp tab=0. |
| 7767 | |
| 7768 | <TC - Allowed matching mechanisms - template range (record of in control part)> |
| 7769 | |
| 7770 | <COMPILE> |
| 7771 | <VERDICT_LEAF PASS> |
| 7772 | <MODULE TTCN x x.ttcn> |
| 7773 | module x { |
| 7774 | |
| 7775 | type record of integer rofT; |
| 7776 | |
| 7777 | const rofT c1:= { 1, 2, 3 }; |
| 7778 | const rofT c2:= { 4, 5, 6 }; |
| 7779 | |
| 7780 | control{ |
| 7781 | var template rofT r:= (c1 .. c2); |
| 7782 | } |
| 7783 | |
| 7784 | } |
| 7785 | <END_MODULE> |
| 7786 | <RESULT IF_PASS COUNT 1> |
| 7787 | (?im)error.+?value.+?range.+?match.+?cannot.+?used |
| 7788 | <END_RESULT> |
| 7789 | <RESULT IF_PASS COUNT 1> |
| 7790 | (?is)\berror: |
| 7791 | <END_RESULT> |
| 7792 | <END_TC> |
| 7793 | |
| 7794 | :exmp. |
| 7795 | |
| 7796 | .*---------------------------------------------------------------------* |
| 7797 | :h4.Allowed matching mechanisms - template range (record of in function) |
| 7798 | .*---------------------------------------------------------------------* |
| 7799 | :xmp tab=0. |
| 7800 | |
| 7801 | <TC - Allowed matching mechanisms - template range (record of in function)> |
| 7802 | |
| 7803 | <COMPILE> |
| 7804 | <VERDICT_LEAF PASS> |
| 7805 | <MODULE TTCN x x.ttcn> |
| 7806 | module x { |
| 7807 | |
| 7808 | type record of integer rofT; |
| 7809 | |
| 7810 | const rofT c1:= { 1, 2, 3 }; |
| 7811 | const rofT c2:= { 4, 5, 6 }; |
| 7812 | |
| 7813 | function myFunct(){ |
| 7814 | var template rofT r:= (c1 .. c2); |
| 7815 | } |
| 7816 | |
| 7817 | } |
| 7818 | <END_MODULE> |
| 7819 | <RESULT IF_PASS COUNT 1> |
| 7820 | (?im)error.+?value.+?range.+?match.+?cannot.+?used |
| 7821 | <END_RESULT> |
| 7822 | <RESULT IF_PASS COUNT 1> |
| 7823 | (?is)\berror: |
| 7824 | <END_RESULT> |
| 7825 | <END_TC> |
| 7826 | |
| 7827 | :exmp. |
| 7828 | |
| 7829 | .*---------------------------------------------------------------------* |
| 7830 | :h4.Allowed matching mechanisms - template range (set in def.part) |
| 7831 | .*---------------------------------------------------------------------* |
| 7832 | :xmp tab=0. |
| 7833 | |
| 7834 | <TC - Allowed matching mechanisms - template range (set in def.part)> |
| 7835 | |
| 7836 | <COMPILE> |
| 7837 | <VERDICT_LEAF PASS> |
| 7838 | <MODULE TTCN x x.ttcn> |
| 7839 | module x { |
| 7840 | |
| 7841 | type set setT{ |
| 7842 | integer f1, |
| 7843 | float f2 |
| 7844 | } |
| 7845 | |
| 7846 | const setT c1:= { f1:= 1, f2:= 2.0}; |
| 7847 | const setT c2:= { f1:= 5, f2:= 7.0}; |
| 7848 | |
| 7849 | |
| 7850 | template setT r:= (c1 .. c2); |
| 7851 | |
| 7852 | } |
| 7853 | <END_MODULE> |
| 7854 | <RESULT IF_PASS COUNT 1> |
| 7855 | (?im)error.+?value.+?range.+?match.+?cannot.+?used |
| 7856 | <END_RESULT> |
| 7857 | <RESULT IF_PASS COUNT 1> |
| 7858 | (?is)\berror: |
| 7859 | <END_RESULT> |
| 7860 | <END_TC> |
| 7861 | |
| 7862 | :exmp. |
| 7863 | |
| 7864 | .*---------------------------------------------------------------------* |
| 7865 | :h4.Allowed matching mechanisms - template range (set in control part) |
| 7866 | .*---------------------------------------------------------------------* |
| 7867 | :xmp tab=0. |
| 7868 | |
| 7869 | <TC - Allowed matching mechanisms - template range (set in control part)> |
| 7870 | |
| 7871 | <COMPILE> |
| 7872 | <VERDICT_LEAF PASS> |
| 7873 | <MODULE TTCN x x.ttcn> |
| 7874 | module x { |
| 7875 | |
| 7876 | type set setT{ |
| 7877 | integer f1, |
| 7878 | float f2 |
| 7879 | } |
| 7880 | |
| 7881 | const setT c1:= { f1:= 1, f2:= 2.0}; |
| 7882 | const setT c2:= { f1:= 5, f2:= 7.0}; |
| 7883 | |
| 7884 | |
| 7885 | control{ |
| 7886 | var template setT r:= (c1 .. c2); |
| 7887 | } |
| 7888 | |
| 7889 | } |
| 7890 | <END_MODULE> |
| 7891 | <RESULT IF_PASS COUNT 1> |
| 7892 | (?im)error.+?value.+?range.+?match.+?cannot.+?used |
| 7893 | <END_RESULT> |
| 7894 | <RESULT IF_PASS COUNT 1> |
| 7895 | (?is)\berror: |
| 7896 | <END_RESULT> |
| 7897 | <END_TC> |
| 7898 | |
| 7899 | :exmp. |
| 7900 | |
| 7901 | .*---------------------------------------------------------------------* |
| 7902 | :h4.Allowed matching mechanisms - template range (set in function) |
| 7903 | .*---------------------------------------------------------------------* |
| 7904 | :xmp tab=0. |
| 7905 | |
| 7906 | <TC - Allowed matching mechanisms - template range (set in function)> |
| 7907 | |
| 7908 | <COMPILE> |
| 7909 | <VERDICT_LEAF PASS> |
| 7910 | <MODULE TTCN x x.ttcn> |
| 7911 | module x { |
| 7912 | |
| 7913 | type set setT{ |
| 7914 | integer f1, |
| 7915 | float f2 |
| 7916 | } |
| 7917 | |
| 7918 | const setT c1:= { f1:= 1, f2:= 2.0}; |
| 7919 | const setT c2:= { f1:= 5, f2:= 7.0}; |
| 7920 | |
| 7921 | |
| 7922 | function myFunct(){ |
| 7923 | var template setT r:= (c1 .. c2); |
| 7924 | } |
| 7925 | |
| 7926 | } |
| 7927 | <END_MODULE> |
| 7928 | <RESULT IF_PASS COUNT 1> |
| 7929 | (?im)error.+?value.+?range.+?match.+?cannot.+?used |
| 7930 | <END_RESULT> |
| 7931 | <RESULT IF_PASS COUNT 1> |
| 7932 | (?is)\berror: |
| 7933 | <END_RESULT> |
| 7934 | <END_TC> |
| 7935 | |
| 7936 | :exmp. |
| 7937 | |
| 7938 | .*---------------------------------------------------------------------* |
| 7939 | :h4.Allowed matching mechanisms - template range (set of in def.part) |
| 7940 | .*---------------------------------------------------------------------* |
| 7941 | :xmp tab=0. |
| 7942 | |
| 7943 | <TC - Allowed matching mechanisms - template range (set of in def.part)> |
| 7944 | |
| 7945 | <COMPILE> |
| 7946 | <VERDICT_LEAF PASS> |
| 7947 | <MODULE TTCN x x.ttcn> |
| 7948 | module x { |
| 7949 | |
| 7950 | type set of integer sofT; |
| 7951 | |
| 7952 | const sofT c1:= { 1, 2, 3 }; |
| 7953 | const sofT c2:= { 4, 5, 6 }; |
| 7954 | |
| 7955 | |
| 7956 | template sofT r:= (c1 .. c2); |
| 7957 | |
| 7958 | } |
| 7959 | <END_MODULE> |
| 7960 | <RESULT IF_PASS COUNT 1> |
| 7961 | (?im)error.+?value.+?range.+?match.+?cannot.+?used |
| 7962 | <END_RESULT> |
| 7963 | <RESULT IF_PASS COUNT 1> |
| 7964 | (?is)\berror: |
| 7965 | <END_RESULT> |
| 7966 | <END_TC> |
| 7967 | |
| 7968 | :exmp. |
| 7969 | |
| 7970 | .*---------------------------------------------------------------------* |
| 7971 | :h4.Allowed matching mechanisms - template range (set of in control part) |
| 7972 | .*---------------------------------------------------------------------* |
| 7973 | :xmp tab=0. |
| 7974 | |
| 7975 | <TC - Allowed matching mechanisms - template range (set of in control part)> |
| 7976 | |
| 7977 | <COMPILE> |
| 7978 | <VERDICT_LEAF PASS> |
| 7979 | <MODULE TTCN x x.ttcn> |
| 7980 | module x { |
| 7981 | |
| 7982 | type set of integer sofT; |
| 7983 | |
| 7984 | const sofT c1:= { 1, 2, 3 }; |
| 7985 | const sofT c2:= { 4, 5, 6 }; |
| 7986 | |
| 7987 | |
| 7988 | control{ |
| 7989 | var template sofT r:= (c1 .. c2); |
| 7990 | } |
| 7991 | |
| 7992 | } |
| 7993 | <END_MODULE> |
| 7994 | <RESULT IF_PASS COUNT 1> |
| 7995 | (?im)error.+?value.+?range.+?match.+?cannot.+?used |
| 7996 | <END_RESULT> |
| 7997 | <RESULT IF_PASS COUNT 1> |
| 7998 | (?is)\berror: |
| 7999 | <END_RESULT> |
| 8000 | <END_TC> |
| 8001 | |
| 8002 | :exmp. |
| 8003 | |
| 8004 | .*---------------------------------------------------------------------* |
| 8005 | :h4.Allowed matching mechanisms - template range (set of in function) |
| 8006 | .*---------------------------------------------------------------------* |
| 8007 | :xmp tab=0. |
| 8008 | |
| 8009 | <TC - Allowed matching mechanisms - template range (set of in function)> |
| 8010 | |
| 8011 | <COMPILE> |
| 8012 | <VERDICT_LEAF PASS> |
| 8013 | <MODULE TTCN x x.ttcn> |
| 8014 | module x { |
| 8015 | |
| 8016 | type set of integer sofT; |
| 8017 | |
| 8018 | const sofT c1:= { 1, 2, 3 }; |
| 8019 | const sofT c2:= { 4, 5, 6 }; |
| 8020 | |
| 8021 | |
| 8022 | function myFunct(){ |
| 8023 | var template sofT r:= (c1 .. c2); |
| 8024 | } |
| 8025 | |
| 8026 | } |
| 8027 | <END_MODULE> |
| 8028 | <RESULT IF_PASS COUNT 1> |
| 8029 | (?im)error.+?value.+?range.+?match.+?cannot.+?used |
| 8030 | <END_RESULT> |
| 8031 | <RESULT IF_PASS COUNT 1> |
| 8032 | (?is)\berror: |
| 8033 | <END_RESULT> |
| 8034 | <END_TC> |
| 8035 | |
| 8036 | :exmp. |
| 8037 | |
| 8038 | .*---------------------------------------------------------------------* |
| 8039 | :h4.Allowed matching mechanisms - template range (enumerated in def.part) |
| 8040 | .*---------------------------------------------------------------------* |
| 8041 | :xmp tab=0. |
| 8042 | |
| 8043 | <TC - Allowed matching mechanisms - template range (enumerated in def.part)> |
| 8044 | |
| 8045 | <COMPILE> |
| 8046 | <VERDICT_LEAF PASS> |
| 8047 | <MODULE TTCN x x.ttcn> |
| 8048 | module x { |
| 8049 | |
| 8050 | type enumerated enumT{ ONE(1), TWO(2), THREE(3)}; |
| 8051 | |
| 8052 | const enumT c1:= ONE; |
| 8053 | const enumT c2:= THREE; |
| 8054 | |
| 8055 | template enumT r:= (c1 .. c2); |
| 8056 | |
| 8057 | } |
| 8058 | <END_MODULE> |
| 8059 | <RESULT IF_PASS COUNT 1> |
| 8060 | (?im)error.+?value.+?range.+?match.+?cannot.+?used |
| 8061 | <END_RESULT> |
| 8062 | <RESULT IF_PASS COUNT 1> |
| 8063 | (?is)\berror: |
| 8064 | <END_RESULT> |
| 8065 | <END_TC> |
| 8066 | |
| 8067 | :exmp. |
| 8068 | |
| 8069 | .*---------------------------------------------------------------------* |
| 8070 | :h4.Allowed matching mechanisms - template range (enumerated in control part) |
| 8071 | .*---------------------------------------------------------------------* |
| 8072 | :xmp tab=0. |
| 8073 | |
| 8074 | <TC - Allowed matching mechanisms - template range (enumerated in control part)> |
| 8075 | |
| 8076 | <COMPILE> |
| 8077 | <VERDICT_LEAF PASS> |
| 8078 | <MODULE TTCN x x.ttcn> |
| 8079 | module x { |
| 8080 | |
| 8081 | type enumerated enumT{ ONE(1), TWO(2), THREE(3)}; |
| 8082 | |
| 8083 | const enumT c1:= ONE; |
| 8084 | const enumT c2:= THREE; |
| 8085 | |
| 8086 | control{ |
| 8087 | var template enumT r:= (c1 .. c2); |
| 8088 | } |
| 8089 | |
| 8090 | } |
| 8091 | <END_MODULE> |
| 8092 | <RESULT IF_PASS COUNT 1> |
| 8093 | (?im)error.+?value.+?range.+?match.+?cannot.+?used |
| 8094 | <END_RESULT> |
| 8095 | <RESULT IF_PASS COUNT 1> |
| 8096 | (?is)\berror: |
| 8097 | <END_RESULT> |
| 8098 | <END_TC> |
| 8099 | |
| 8100 | :exmp. |
| 8101 | |
| 8102 | .*---------------------------------------------------------------------* |
| 8103 | :h4.Allowed matching mechanisms - template range (enumerated in function) |
| 8104 | .*---------------------------------------------------------------------* |
| 8105 | :xmp tab=0. |
| 8106 | |
| 8107 | <TC - Allowed matching mechanisms - template range (enumerated in function)> |
| 8108 | |
| 8109 | <COMPILE> |
| 8110 | <VERDICT_LEAF PASS> |
| 8111 | <MODULE TTCN x x.ttcn> |
| 8112 | module x { |
| 8113 | |
| 8114 | type enumerated enumT{ ONE(1), TWO(2), THREE(3)}; |
| 8115 | |
| 8116 | const enumT c1:= ONE; |
| 8117 | const enumT c2:= THREE; |
| 8118 | |
| 8119 | function myFunct(){ |
| 8120 | var template enumT r:= (c1 .. c2); |
| 8121 | } |
| 8122 | |
| 8123 | } |
| 8124 | <END_MODULE> |
| 8125 | <RESULT IF_PASS COUNT 1> |
| 8126 | (?im)error.+?value.+?range.+?match.+?cannot.+?used |
| 8127 | <END_RESULT> |
| 8128 | <RESULT IF_PASS COUNT 1> |
| 8129 | (?is)\berror: |
| 8130 | <END_RESULT> |
| 8131 | <END_TC> |
| 8132 | |
| 8133 | :exmp. |
| 8134 | |
| 8135 | .*---------------------------------------------------------------------* |
| 8136 | :h4.Allowed matching mechanisms - template range (union in def.part) |
| 8137 | .*---------------------------------------------------------------------* |
| 8138 | :xmp tab=0. |
| 8139 | |
| 8140 | <TC - Allowed matching mechanisms - template range (union in def.part)> |
| 8141 | |
| 8142 | <COMPILE> |
| 8143 | <VERDICT_LEAF PASS> |
| 8144 | <MODULE TTCN x x.ttcn> |
| 8145 | module x { |
| 8146 | |
| 8147 | type union uniT{ |
| 8148 | integer f1, |
| 8149 | float f2, |
| 8150 | charstring f3 |
| 8151 | } |
| 8152 | |
| 8153 | const uniT c1:= { f1:= 1 }; |
| 8154 | const uniT c2:= { f1:= 5 }; |
| 8155 | |
| 8156 | template uniT r:= (c1 .. c2); |
| 8157 | |
| 8158 | } |
| 8159 | <END_MODULE> |
| 8160 | <RESULT IF_PASS COUNT 1> |
| 8161 | (?im)error.+?value.+?range.+?match.+?cannot.+?used |
| 8162 | <END_RESULT> |
| 8163 | <RESULT IF_PASS COUNT 1> |
| 8164 | (?is)\berror: |
| 8165 | <END_RESULT> |
| 8166 | <END_TC> |
| 8167 | |
| 8168 | :exmp. |
| 8169 | |
| 8170 | .*---------------------------------------------------------------------* |
| 8171 | :h4.Allowed matching mechanisms - template range (union in control part) |
| 8172 | .*---------------------------------------------------------------------* |
| 8173 | :xmp tab=0. |
| 8174 | |
| 8175 | <TC - Allowed matching mechanisms - template range (union in control part)> |
| 8176 | |
| 8177 | <COMPILE> |
| 8178 | <VERDICT_LEAF PASS> |
| 8179 | <MODULE TTCN x x.ttcn> |
| 8180 | module x { |
| 8181 | |
| 8182 | type union uniT{ |
| 8183 | integer f1, |
| 8184 | float f2, |
| 8185 | charstring f3 |
| 8186 | } |
| 8187 | |
| 8188 | const uniT c1:= { f1:= 1 }; |
| 8189 | const uniT c2:= { f1:= 5 }; |
| 8190 | |
| 8191 | control{ |
| 8192 | var template uniT r:= (c1 .. c2); |
| 8193 | } |
| 8194 | |
| 8195 | } |
| 8196 | <END_MODULE> |
| 8197 | <RESULT IF_PASS COUNT 1> |
| 8198 | (?im)error.+?value.+?range.+?match.+?cannot.+?used |
| 8199 | <END_RESULT> |
| 8200 | <RESULT IF_PASS COUNT 1> |
| 8201 | (?is)\berror: |
| 8202 | <END_RESULT> |
| 8203 | <END_TC> |
| 8204 | |
| 8205 | :exmp. |
| 8206 | |
| 8207 | .*---------------------------------------------------------------------* |
| 8208 | :h4.Allowed matching mechanisms - template range (union in function) |
| 8209 | .*---------------------------------------------------------------------* |
| 8210 | :xmp tab=0. |
| 8211 | |
| 8212 | <TC - Allowed matching mechanisms - template range (union in function)> |
| 8213 | |
| 8214 | <COMPILE> |
| 8215 | <VERDICT_LEAF PASS> |
| 8216 | <MODULE TTCN x x.ttcn> |
| 8217 | module x { |
| 8218 | |
| 8219 | type union uniT{ |
| 8220 | integer f1, |
| 8221 | float f2, |
| 8222 | charstring f3 |
| 8223 | } |
| 8224 | |
| 8225 | const uniT c1:= { f1:= 1 }; |
| 8226 | const uniT c2:= { f1:= 5 }; |
| 8227 | |
| 8228 | function myFunct(){ |
| 8229 | var template uniT r:= (c1 .. c2); |
| 8230 | } |
| 8231 | |
| 8232 | } |
| 8233 | <END_MODULE> |
| 8234 | <RESULT IF_PASS COUNT 1> |
| 8235 | (?im)error.+?value.+?range.+?match.+?cannot.+?used |
| 8236 | <END_RESULT> |
| 8237 | <RESULT IF_PASS COUNT 1> |
| 8238 | (?is)\berror: |
| 8239 | <END_RESULT> |
| 8240 | <END_TC> |
| 8241 | |
| 8242 | :exmp. |
| 8243 | |
| 8244 | .*---------------------------------------------------------------------* |
| 8245 | :h4.Allowed matching mechanisms - template range (array in def.part) |
| 8246 | .*---------------------------------------------------------------------* |
| 8247 | :xmp tab=0. |
| 8248 | |
| 8249 | <TC - Allowed matching mechanisms - template range (array in def.part)> |
| 8250 | |
| 8251 | <COMPILE> |
| 8252 | <VERDICT_LEAF PASS> |
| 8253 | <MODULE TTCN x x.ttcn> |
| 8254 | module x { |
| 8255 | |
| 8256 | type integer myint[1]; |
| 8257 | |
| 8258 | const myint c1:={1}; |
| 8259 | const myint c2 :={3}; |
| 8260 | |
| 8261 | template myint r :=(c1..c2); |
| 8262 | |
| 8263 | } |
| 8264 | <END_MODULE> |
| 8265 | <RESULT IF_PASS COUNT 1> |
| 8266 | (?im)error.+?value.+?range.+?match.+?cannot.+?used |
| 8267 | <END_RESULT> |
| 8268 | <RESULT IF_PASS COUNT 1> |
| 8269 | (?is)\berror: |
| 8270 | <END_RESULT> |
| 8271 | <END_TC> |
| 8272 | |
| 8273 | :exmp. |
| 8274 | |
| 8275 | .*---------------------------------------------------------------------* |
| 8276 | :h4.Allowed matching mechanisms - template range (array in control part) |
| 8277 | .*---------------------------------------------------------------------* |
| 8278 | :xmp tab=0. |
| 8279 | |
| 8280 | <TC - Allowed matching mechanisms - template range (array in control part)> |
| 8281 | |
| 8282 | <COMPILE> |
| 8283 | <VERDICT_LEAF PASS> |
| 8284 | <MODULE TTCN x x.ttcn> |
| 8285 | module x { |
| 8286 | |
| 8287 | type integer myint[1]; |
| 8288 | |
| 8289 | const myint c1:={1}; |
| 8290 | const myint c2 :={3}; |
| 8291 | |
| 8292 | control{ |
| 8293 | template myint r :=(c1..c2); |
| 8294 | } |
| 8295 | } |
| 8296 | <END_MODULE> |
| 8297 | <RESULT IF_PASS COUNT 1> |
| 8298 | (?im)error.+?value.+?range.+?match.+?cannot.+?used |
| 8299 | <END_RESULT> |
| 8300 | <RESULT IF_PASS COUNT 1> |
| 8301 | (?is)\berror: |
| 8302 | <END_RESULT> |
| 8303 | <END_TC> |
| 8304 | |
| 8305 | :exmp. |
| 8306 | |
| 8307 | .*---------------------------------------------------------------------* |
| 8308 | :h4.Allowed matching mechanisms - template range (array in function) |
| 8309 | .*---------------------------------------------------------------------* |
| 8310 | :xmp tab=0. |
| 8311 | |
| 8312 | <TC - Allowed matching mechanisms - template range (array in function)> |
| 8313 | |
| 8314 | <COMPILE> |
| 8315 | <VERDICT_LEAF PASS> |
| 8316 | <MODULE TTCN x x.ttcn> |
| 8317 | module x { |
| 8318 | |
| 8319 | type integer myint[1]; |
| 8320 | |
| 8321 | const myint c1:={1}; |
| 8322 | const myint c2 :={3}; |
| 8323 | |
| 8324 | function myFunct(){ |
| 8325 | template myint r :=(c1..c2); |
| 8326 | } |
| 8327 | } |
| 8328 | <END_MODULE> |
| 8329 | <RESULT IF_PASS COUNT 1> |
| 8330 | (?im)error.+?value.+?range.+?match.+?cannot.+?used |
| 8331 | <END_RESULT> |
| 8332 | <RESULT IF_PASS COUNT 1> |
| 8333 | (?is)\berror: |
| 8334 | <END_RESULT> |
| 8335 | <END_TC> |
| 8336 | |
| 8337 | :exmp. |
| 8338 | |
| 8339 | .*---------------------------------------------------------------------* |
| 8340 | :h4.Allowed matching mechanisms - template superset (boolean in def.part) |
| 8341 | .*---------------------------------------------------------------------* |
| 8342 | :xmp tab=0. |
| 8343 | |
| 8344 | <TC - Allowed matching mechanisms - template superset (boolean in def.part)> |
| 8345 | |
| 8346 | <COMPILE> |
| 8347 | <VERDICT_LEAF PASS> |
| 8348 | <MODULE TTCN x x.ttcn> |
| 8349 | module x { |
| 8350 | |
| 8351 | const boolean c1:= false; |
| 8352 | const boolean c2:= true; |
| 8353 | |
| 8354 | template boolean r:= superset (c1, c2); |
| 8355 | |
| 8356 | } |
| 8357 | <END_MODULE> |
| 8358 | <RESULT IF_PASS COUNT 1> |
| 8359 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 8360 | <END_RESULT> |
| 8361 | <RESULT IF_PASS COUNT 1> |
| 8362 | (?is)\berror: |
| 8363 | <END_RESULT> |
| 8364 | <END_TC> |
| 8365 | |
| 8366 | :exmp. |
| 8367 | |
| 8368 | .*---------------------------------------------------------------------* |
| 8369 | :h4.Allowed matching mechanisms - template superset (boolean in control part) |
| 8370 | .*---------------------------------------------------------------------* |
| 8371 | :xmp tab=0. |
| 8372 | |
| 8373 | <TC - Allowed matching mechanisms - template superset (boolean in control part)> |
| 8374 | |
| 8375 | <COMPILE> |
| 8376 | <VERDICT_LEAF PASS> |
| 8377 | <MODULE TTCN x x.ttcn> |
| 8378 | module x { |
| 8379 | |
| 8380 | const boolean c1:= false; |
| 8381 | const boolean c2:= true; |
| 8382 | |
| 8383 | control{ |
| 8384 | var template boolean r:= superset (c1, c2); |
| 8385 | } |
| 8386 | |
| 8387 | } |
| 8388 | <END_MODULE> |
| 8389 | <RESULT IF_PASS COUNT 1> |
| 8390 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 8391 | <END_RESULT> |
| 8392 | <RESULT IF_PASS COUNT 1> |
| 8393 | (?is)\berror: |
| 8394 | <END_RESULT> |
| 8395 | <END_TC> |
| 8396 | |
| 8397 | :exmp. |
| 8398 | |
| 8399 | .*---------------------------------------------------------------------* |
| 8400 | :h4.Allowed matching mechanisms - template superset (boolean in function) |
| 8401 | .*---------------------------------------------------------------------* |
| 8402 | :xmp tab=0. |
| 8403 | |
| 8404 | <TC - Allowed matching mechanisms - template superset (boolean in function)> |
| 8405 | |
| 8406 | <COMPILE> |
| 8407 | <VERDICT_LEAF PASS> |
| 8408 | <MODULE TTCN x x.ttcn> |
| 8409 | module x { |
| 8410 | |
| 8411 | const boolean c1:= false; |
| 8412 | const boolean c2:= true; |
| 8413 | |
| 8414 | function myFunct(){ |
| 8415 | var template boolean r:= superset (c1, c2); |
| 8416 | } |
| 8417 | |
| 8418 | } |
| 8419 | <END_MODULE> |
| 8420 | <RESULT IF_PASS COUNT 1> |
| 8421 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 8422 | <END_RESULT> |
| 8423 | <RESULT IF_PASS COUNT 1> |
| 8424 | (?is)\berror: |
| 8425 | <END_RESULT> |
| 8426 | <END_TC> |
| 8427 | |
| 8428 | :exmp. |
| 8429 | |
| 8430 | .*---------------------------------------------------------------------* |
| 8431 | :h4.Allowed matching mechanisms - template superset (integer in def.part) |
| 8432 | .*---------------------------------------------------------------------* |
| 8433 | :xmp tab=0. |
| 8434 | |
| 8435 | <TC - Allowed matching mechanisms - template superset (integer in def.part)> |
| 8436 | |
| 8437 | <COMPILE> |
| 8438 | <VERDICT_LEAF PASS> |
| 8439 | <MODULE TTCN x x.ttcn> |
| 8440 | module x { |
| 8441 | |
| 8442 | const integer c1:= 1; |
| 8443 | const integer c2:= 2; |
| 8444 | const integer c3:= 3; |
| 8445 | |
| 8446 | template integer r:= superset (c1, c2, c3); |
| 8447 | |
| 8448 | } |
| 8449 | <END_MODULE> |
| 8450 | <RESULT IF_PASS COUNT 1> |
| 8451 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 8452 | <END_RESULT> |
| 8453 | <RESULT IF_PASS COUNT 1> |
| 8454 | (?is)\berror: |
| 8455 | <END_RESULT> |
| 8456 | <END_TC> |
| 8457 | |
| 8458 | :exmp. |
| 8459 | |
| 8460 | .*---------------------------------------------------------------------* |
| 8461 | :h4.Allowed matching mechanisms - template superset (integer in control part) |
| 8462 | .*---------------------------------------------------------------------* |
| 8463 | :xmp tab=0. |
| 8464 | |
| 8465 | <TC - Allowed matching mechanisms - template superset (integer in control part)> |
| 8466 | |
| 8467 | <COMPILE> |
| 8468 | <VERDICT_LEAF PASS> |
| 8469 | <MODULE TTCN x x.ttcn> |
| 8470 | module x { |
| 8471 | |
| 8472 | const integer c1:= 1; |
| 8473 | const integer c2:= 2; |
| 8474 | const integer c3:= 3; |
| 8475 | |
| 8476 | control{ |
| 8477 | var template integer r:= superset (c1, c2, c3); |
| 8478 | } |
| 8479 | |
| 8480 | } |
| 8481 | <END_MODULE> |
| 8482 | <RESULT IF_PASS COUNT 1> |
| 8483 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 8484 | <END_RESULT> |
| 8485 | <RESULT IF_PASS COUNT 1> |
| 8486 | (?is)\berror: |
| 8487 | <END_RESULT> |
| 8488 | <END_TC> |
| 8489 | |
| 8490 | :exmp. |
| 8491 | |
| 8492 | .*---------------------------------------------------------------------* |
| 8493 | :h4.Allowed matching mechanisms - template superset (integer in function) |
| 8494 | .*---------------------------------------------------------------------* |
| 8495 | :xmp tab=0. |
| 8496 | |
| 8497 | <TC - Allowed matching mechanisms - template superset (integer in function)> |
| 8498 | |
| 8499 | <COMPILE> |
| 8500 | <VERDICT_LEAF PASS> |
| 8501 | <MODULE TTCN x x.ttcn> |
| 8502 | module x { |
| 8503 | |
| 8504 | const integer c1:= 1; |
| 8505 | const integer c2:= 2; |
| 8506 | const integer c3:= 3; |
| 8507 | |
| 8508 | function myFunct(){ |
| 8509 | var template integer r:= superset (c1, c2, c3); |
| 8510 | } |
| 8511 | |
| 8512 | } |
| 8513 | <END_MODULE> |
| 8514 | <RESULT IF_PASS COUNT 1> |
| 8515 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 8516 | <END_RESULT> |
| 8517 | <RESULT IF_PASS COUNT 1> |
| 8518 | (?is)\berror: |
| 8519 | <END_RESULT> |
| 8520 | <END_TC> |
| 8521 | |
| 8522 | :exmp. |
| 8523 | |
| 8524 | .*---------------------------------------------------------------------* |
| 8525 | :h4.Allowed matching mechanisms - template superset (float in def.part) |
| 8526 | .*---------------------------------------------------------------------* |
| 8527 | :xmp tab=0. |
| 8528 | |
| 8529 | <TC - Allowed matching mechanisms - template superset (float in def.part)> |
| 8530 | |
| 8531 | <COMPILE> |
| 8532 | <VERDICT_LEAF PASS> |
| 8533 | <MODULE TTCN x x.ttcn> |
| 8534 | module x { |
| 8535 | |
| 8536 | const float c1:= 1.6; |
| 8537 | const float c2:= 2.4; |
| 8538 | const float c3:= 3.9; |
| 8539 | |
| 8540 | template float r:= superset (c1, c2, c3); |
| 8541 | |
| 8542 | } |
| 8543 | <END_MODULE> |
| 8544 | <RESULT IF_PASS COUNT 1> |
| 8545 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 8546 | <END_RESULT> |
| 8547 | <RESULT IF_PASS COUNT 1> |
| 8548 | (?is)\berror: |
| 8549 | <END_RESULT> |
| 8550 | <END_TC> |
| 8551 | |
| 8552 | :exmp. |
| 8553 | |
| 8554 | .*---------------------------------------------------------------------* |
| 8555 | :h4.Allowed matching mechanisms - template superset (float in control part) |
| 8556 | .*---------------------------------------------------------------------* |
| 8557 | :xmp tab=0. |
| 8558 | |
| 8559 | <TC - Allowed matching mechanisms - template superset (float in control part)> |
| 8560 | |
| 8561 | <COMPILE> |
| 8562 | <VERDICT_LEAF PASS> |
| 8563 | <MODULE TTCN x x.ttcn> |
| 8564 | module x { |
| 8565 | |
| 8566 | const float c1:= 1.1; |
| 8567 | const float c2:= 2.3; |
| 8568 | const float c3:= 3.1; |
| 8569 | |
| 8570 | control{ |
| 8571 | var template float r:= superset (c1, c2, c3); |
| 8572 | } |
| 8573 | |
| 8574 | } |
| 8575 | <END_MODULE> |
| 8576 | <RESULT IF_PASS COUNT 1> |
| 8577 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 8578 | <END_RESULT> |
| 8579 | <RESULT IF_PASS COUNT 1> |
| 8580 | (?is)\berror: |
| 8581 | <END_RESULT> |
| 8582 | <END_TC> |
| 8583 | |
| 8584 | :exmp. |
| 8585 | |
| 8586 | .*---------------------------------------------------------------------* |
| 8587 | :h4.Allowed matching mechanisms - template superset (float in function) |
| 8588 | .*---------------------------------------------------------------------* |
| 8589 | :xmp tab=0. |
| 8590 | |
| 8591 | <TC - Allowed matching mechanisms - template superset (float in function)> |
| 8592 | |
| 8593 | <COMPILE> |
| 8594 | <VERDICT_LEAF PASS> |
| 8595 | <MODULE TTCN x x.ttcn> |
| 8596 | module x { |
| 8597 | |
| 8598 | const float c1:= 1.1; |
| 8599 | const float c2:= 2.9; |
| 8600 | const float c3:= 3.2; |
| 8601 | |
| 8602 | function myFunct(){ |
| 8603 | var template float r:= superset (c1, c2, c3); |
| 8604 | } |
| 8605 | |
| 8606 | } |
| 8607 | <END_MODULE> |
| 8608 | <RESULT IF_PASS COUNT 1> |
| 8609 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 8610 | <END_RESULT> |
| 8611 | <RESULT IF_PASS COUNT 1> |
| 8612 | (?is)\berror: |
| 8613 | <END_RESULT> |
| 8614 | <END_TC> |
| 8615 | |
| 8616 | :exmp. |
| 8617 | |
| 8618 | .*---------------------------------------------------------------------* |
| 8619 | :h4.Allowed matching mechanisms - template superset (bitstring in def.part) |
| 8620 | .*---------------------------------------------------------------------* |
| 8621 | :xmp tab=0. |
| 8622 | |
| 8623 | <TC - Allowed matching mechanisms - template superset (bitstring in def.part)> |
| 8624 | |
| 8625 | <COMPILE> |
| 8626 | <VERDICT_LEAF PASS> |
| 8627 | <MODULE TTCN x x.ttcn> |
| 8628 | module x { |
| 8629 | |
| 8630 | const bitstring c1:= '101'B; |
| 8631 | const bitstring c2:= '110'B; |
| 8632 | const bitstring c3:= '111'B; |
| 8633 | |
| 8634 | template bitstring r:= superset (c1, c2, c3); |
| 8635 | |
| 8636 | } |
| 8637 | <END_MODULE> |
| 8638 | <RESULT IF_PASS COUNT 1> |
| 8639 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 8640 | <END_RESULT> |
| 8641 | <RESULT IF_PASS COUNT 1> |
| 8642 | (?is)\berror: |
| 8643 | <END_RESULT> |
| 8644 | <END_TC> |
| 8645 | |
| 8646 | :exmp. |
| 8647 | |
| 8648 | .*---------------------------------------------------------------------* |
| 8649 | :h4.Allowed matching mechanisms - template superset (bitstring in control part) |
| 8650 | .*---------------------------------------------------------------------* |
| 8651 | :xmp tab=0. |
| 8652 | |
| 8653 | <TC - Allowed matching mechanisms - template superset (bitstring in control part)> |
| 8654 | |
| 8655 | <COMPILE> |
| 8656 | <VERDICT_LEAF PASS> |
| 8657 | <MODULE TTCN x x.ttcn> |
| 8658 | module x { |
| 8659 | |
| 8660 | const bitstring c1:= '101'B; |
| 8661 | const bitstring c2:= '110'B; |
| 8662 | const bitstring c3:= '111'B; |
| 8663 | |
| 8664 | control{ |
| 8665 | var template bitstring r:= superset (c1, c2, c3); |
| 8666 | } |
| 8667 | |
| 8668 | } |
| 8669 | <END_MODULE> |
| 8670 | <RESULT IF_PASS COUNT 1> |
| 8671 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 8672 | <END_RESULT> |
| 8673 | <RESULT IF_PASS COUNT 1> |
| 8674 | (?is)\berror: |
| 8675 | <END_RESULT> |
| 8676 | <END_TC> |
| 8677 | |
| 8678 | :exmp. |
| 8679 | |
| 8680 | .*---------------------------------------------------------------------* |
| 8681 | :h4.Allowed matching mechanisms - template superset (bitstring in function) |
| 8682 | .*---------------------------------------------------------------------* |
| 8683 | :xmp tab=0. |
| 8684 | |
| 8685 | <TC - Allowed matching mechanisms - template superset (bitstring in function)> |
| 8686 | |
| 8687 | <COMPILE> |
| 8688 | <VERDICT_LEAF PASS> |
| 8689 | <MODULE TTCN x x.ttcn> |
| 8690 | module x { |
| 8691 | |
| 8692 | const bitstring c1:= '101'B; |
| 8693 | const bitstring c2:= '110'B; |
| 8694 | const bitstring c3:= '111'B; |
| 8695 | |
| 8696 | function myFunct(){ |
| 8697 | var template bitstring r:= superset (c1, c2, c3); |
| 8698 | } |
| 8699 | |
| 8700 | } |
| 8701 | <END_MODULE> |
| 8702 | <RESULT IF_PASS COUNT 1> |
| 8703 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 8704 | <END_RESULT> |
| 8705 | <RESULT IF_PASS COUNT 1> |
| 8706 | (?is)\berror: |
| 8707 | <END_RESULT> |
| 8708 | <END_TC> |
| 8709 | |
| 8710 | :exmp. |
| 8711 | |
| 8712 | .*---------------------------------------------------------------------* |
| 8713 | :h4.Allowed matching mechanisms - template superset (octetstring in def.part) |
| 8714 | .*---------------------------------------------------------------------* |
| 8715 | :xmp tab=0. |
| 8716 | |
| 8717 | <TC - Allowed matching mechanisms - template superset (octetstring in def.part)> |
| 8718 | |
| 8719 | <COMPILE> |
| 8720 | <VERDICT_LEAF PASS> |
| 8721 | <MODULE TTCN x x.ttcn> |
| 8722 | module x { |
| 8723 | |
| 8724 | const octetstring c1:= '1011'O; |
| 8725 | const octetstring c2:= '1110'O; |
| 8726 | const octetstring c3:= '1111'O; |
| 8727 | |
| 8728 | template octetstring r:= superset (c1, c2, c3); |
| 8729 | |
| 8730 | } |
| 8731 | <END_MODULE> |
| 8732 | <RESULT IF_PASS COUNT 1> |
| 8733 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 8734 | <END_RESULT> |
| 8735 | <RESULT IF_PASS COUNT 1> |
| 8736 | (?is)\berror: |
| 8737 | <END_RESULT> |
| 8738 | <END_TC> |
| 8739 | |
| 8740 | :exmp. |
| 8741 | |
| 8742 | .*---------------------------------------------------------------------* |
| 8743 | :h4.Allowed matching mechanisms - template superset (octetstring in control part) |
| 8744 | .*---------------------------------------------------------------------* |
| 8745 | :xmp tab=0. |
| 8746 | |
| 8747 | <TC - Allowed matching mechanisms - template superset (octetstring in control part)> |
| 8748 | |
| 8749 | <COMPILE> |
| 8750 | <VERDICT_LEAF PASS> |
| 8751 | <MODULE TTCN x x.ttcn> |
| 8752 | module x { |
| 8753 | |
| 8754 | const octetstring c1:= '1011'O; |
| 8755 | const octetstring c2:= '1110'O; |
| 8756 | const octetstring c3:= '1111'O; |
| 8757 | |
| 8758 | control{ |
| 8759 | var template octetstring r:= superset (c1, c2, c3); |
| 8760 | } |
| 8761 | |
| 8762 | } |
| 8763 | <END_MODULE> |
| 8764 | <RESULT IF_PASS COUNT 1> |
| 8765 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 8766 | <END_RESULT> |
| 8767 | <RESULT IF_PASS COUNT 1> |
| 8768 | (?is)\berror: |
| 8769 | <END_RESULT> |
| 8770 | <END_TC> |
| 8771 | |
| 8772 | :exmp. |
| 8773 | |
| 8774 | .*---------------------------------------------------------------------* |
| 8775 | :h4.Allowed matching mechanisms - template superset (octetstring in function) |
| 8776 | .*---------------------------------------------------------------------* |
| 8777 | :xmp tab=0. |
| 8778 | |
| 8779 | <TC - Allowed matching mechanisms - template superset (octetstring in function)> |
| 8780 | |
| 8781 | <COMPILE> |
| 8782 | <VERDICT_LEAF PASS> |
| 8783 | <MODULE TTCN x x.ttcn> |
| 8784 | module x { |
| 8785 | |
| 8786 | const octetstring c1:= '1011'O; |
| 8787 | const octetstring c2:= '1110'O; |
| 8788 | const octetstring c3:= '1111'O; |
| 8789 | |
| 8790 | function myFunct(){ |
| 8791 | var template octetstring r:= superset (c1, c2, c3); |
| 8792 | } |
| 8793 | |
| 8794 | } |
| 8795 | <END_MODULE> |
| 8796 | <RESULT IF_PASS COUNT 1> |
| 8797 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 8798 | <END_RESULT> |
| 8799 | <RESULT IF_PASS COUNT 1> |
| 8800 | (?is)\berror: |
| 8801 | <END_RESULT> |
| 8802 | <END_TC> |
| 8803 | |
| 8804 | :exmp. |
| 8805 | |
| 8806 | .*---------------------------------------------------------------------* |
| 8807 | :h4.Allowed matching mechanisms - template superset (hexstring in def.part) |
| 8808 | .*---------------------------------------------------------------------* |
| 8809 | :xmp tab=0. |
| 8810 | |
| 8811 | <TC - Allowed matching mechanisms - template superset (hexstring in def.part)> |
| 8812 | |
| 8813 | <COMPILE> |
| 8814 | <VERDICT_LEAF PASS> |
| 8815 | <MODULE TTCN x x.ttcn> |
| 8816 | module x { |
| 8817 | |
| 8818 | const hexstring c1:= '1011'H; |
| 8819 | const hexstring c2:= '1110'H; |
| 8820 | const hexstring c3:= '1111'H; |
| 8821 | |
| 8822 | template hexstring r:= superset (c1, c2, c3); |
| 8823 | |
| 8824 | } |
| 8825 | <END_MODULE> |
| 8826 | <RESULT IF_PASS COUNT 1> |
| 8827 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 8828 | <END_RESULT> |
| 8829 | <RESULT IF_PASS COUNT 1> |
| 8830 | (?is)\berror: |
| 8831 | <END_RESULT> |
| 8832 | <END_TC> |
| 8833 | |
| 8834 | :exmp. |
| 8835 | |
| 8836 | .*---------------------------------------------------------------------* |
| 8837 | :h4.Allowed matching mechanisms - template superset (hexstring in control part) |
| 8838 | .*---------------------------------------------------------------------* |
| 8839 | :xmp tab=0. |
| 8840 | |
| 8841 | <TC - Allowed matching mechanisms - template superset (hexstring in control part)> |
| 8842 | |
| 8843 | <COMPILE> |
| 8844 | <VERDICT_LEAF PASS> |
| 8845 | <MODULE TTCN x x.ttcn> |
| 8846 | module x { |
| 8847 | |
| 8848 | const hexstring c1:= '1011'H; |
| 8849 | const hexstring c2:= '1110'H; |
| 8850 | const hexstring c3:= '1111'H; |
| 8851 | |
| 8852 | control{ |
| 8853 | var template hexstring r:= superset (c1, c2, c3); |
| 8854 | } |
| 8855 | |
| 8856 | } |
| 8857 | <END_MODULE> |
| 8858 | <RESULT IF_PASS COUNT 1> |
| 8859 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 8860 | <END_RESULT> |
| 8861 | <RESULT IF_PASS COUNT 1> |
| 8862 | (?is)\berror: |
| 8863 | <END_RESULT> |
| 8864 | <END_TC> |
| 8865 | |
| 8866 | :exmp. |
| 8867 | |
| 8868 | .*---------------------------------------------------------------------* |
| 8869 | :h4.Allowed matching mechanisms - template superset (hexstring in function) |
| 8870 | .*---------------------------------------------------------------------* |
| 8871 | :xmp tab=0. |
| 8872 | |
| 8873 | <TC - Allowed matching mechanisms - template superset (hexstring in function)> |
| 8874 | |
| 8875 | <COMPILE> |
| 8876 | <VERDICT_LEAF PASS> |
| 8877 | <MODULE TTCN x x.ttcn> |
| 8878 | module x { |
| 8879 | |
| 8880 | const hexstring c1:= '1011'H; |
| 8881 | const hexstring c2:= '1110'H; |
| 8882 | const hexstring c3:= '1111'H; |
| 8883 | |
| 8884 | function myFunct(){ |
| 8885 | var template hexstring r:= superset (c1, c2, c3); |
| 8886 | } |
| 8887 | |
| 8888 | } |
| 8889 | <END_MODULE> |
| 8890 | <RESULT IF_PASS COUNT 1> |
| 8891 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 8892 | <END_RESULT> |
| 8893 | <RESULT IF_PASS COUNT 1> |
| 8894 | (?is)\berror: |
| 8895 | <END_RESULT> |
| 8896 | <END_TC> |
| 8897 | |
| 8898 | :exmp. |
| 8899 | |
| 8900 | .*---------------------------------------------------------------------* |
| 8901 | :h4.Allowed matching mechanisms - template superset (charstring in def.part) |
| 8902 | .*---------------------------------------------------------------------* |
| 8903 | :xmp tab=0. |
| 8904 | |
| 8905 | <TC - Allowed matching mechanisms - template superset (charstring in def.part)> |
| 8906 | |
| 8907 | <COMPILE> |
| 8908 | <VERDICT_LEAF PASS> |
| 8909 | <MODULE TTCN x x.ttcn> |
| 8910 | module x { |
| 8911 | |
| 8912 | const charstring c1:= "ogin"; |
| 8913 | const charstring c2:= "dwa"; |
| 8914 | const charstring c3:= "try"; |
| 8915 | |
| 8916 | template charstring r:= superset (c1, c2, c3); |
| 8917 | |
| 8918 | } |
| 8919 | <END_MODULE> |
| 8920 | <RESULT IF_PASS COUNT 1> |
| 8921 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 8922 | <END_RESULT> |
| 8923 | <RESULT IF_PASS COUNT 1> |
| 8924 | (?is)\berror: |
| 8925 | <END_RESULT> |
| 8926 | <END_TC> |
| 8927 | |
| 8928 | :exmp. |
| 8929 | |
| 8930 | .*---------------------------------------------------------------------* |
| 8931 | :h4.Allowed matching mechanisms - template superset (charstring in control part) |
| 8932 | .*---------------------------------------------------------------------* |
| 8933 | :xmp tab=0. |
| 8934 | |
| 8935 | <TC - Allowed matching mechanisms - template superset (charstring in control part)> |
| 8936 | |
| 8937 | <COMPILE> |
| 8938 | <VERDICT_LEAF PASS> |
| 8939 | <MODULE TTCN x x.ttcn> |
| 8940 | module x { |
| 8941 | |
| 8942 | const charstring c1:= "ogin"; |
| 8943 | const charstring c2:= "dwa"; |
| 8944 | const charstring c3:= "try"; |
| 8945 | |
| 8946 | control{ |
| 8947 | var template charstring r:= superset (c1, c2, c3); |
| 8948 | } |
| 8949 | |
| 8950 | } |
| 8951 | <END_MODULE> |
| 8952 | <RESULT IF_PASS COUNT 1> |
| 8953 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 8954 | <END_RESULT> |
| 8955 | <RESULT IF_PASS COUNT 1> |
| 8956 | (?is)\berror: |
| 8957 | <END_RESULT> |
| 8958 | <END_TC> |
| 8959 | |
| 8960 | :exmp. |
| 8961 | |
| 8962 | .*---------------------------------------------------------------------* |
| 8963 | :h4.Allowed matching mechanisms - template superset (charstring in function) |
| 8964 | .*---------------------------------------------------------------------* |
| 8965 | :xmp tab=0. |
| 8966 | |
| 8967 | <TC - Allowed matching mechanisms - template superset (charstring in function)> |
| 8968 | |
| 8969 | <COMPILE> |
| 8970 | <VERDICT_LEAF PASS> |
| 8971 | <MODULE TTCN x x.ttcn> |
| 8972 | module x { |
| 8973 | |
| 8974 | const charstring c1:= "ogin"; |
| 8975 | const charstring c2:= "dwa"; |
| 8976 | const charstring c3:= "try"; |
| 8977 | |
| 8978 | function myFunct(){ |
| 8979 | var template charstring r:= superset (c1, c2, c3); |
| 8980 | } |
| 8981 | |
| 8982 | } |
| 8983 | <END_MODULE> |
| 8984 | <RESULT IF_PASS COUNT 1> |
| 8985 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 8986 | <END_RESULT> |
| 8987 | <RESULT IF_PASS COUNT 1> |
| 8988 | (?is)\berror: |
| 8989 | <END_RESULT> |
| 8990 | <END_TC> |
| 8991 | |
| 8992 | :exmp. |
| 8993 | |
| 8994 | .*---------------------------------------------------------------------* |
| 8995 | :h4.Allowed matching mechanisms - template superset (record in def.part) |
| 8996 | .*---------------------------------------------------------------------* |
| 8997 | :xmp tab=0. |
| 8998 | |
| 8999 | <TC - Allowed matching mechanisms - template superset (record in def.part)> |
| 9000 | |
| 9001 | <COMPILE> |
| 9002 | <VERDICT_LEAF PASS> |
| 9003 | <MODULE TTCN x x.ttcn> |
| 9004 | module x { |
| 9005 | |
| 9006 | type record recT{ |
| 9007 | integer f1, |
| 9008 | float f2, |
| 9009 | charstring f3 |
| 9010 | } |
| 9011 | |
| 9012 | const recT c1:= { f1:= 1, f2:= 2.0, f3:= "a"}; |
| 9013 | const recT c2:= { f1:= 5, f2:= 7.0, f3:= "z"}; |
| 9014 | |
| 9015 | template recT r:= superset (c1, c2); |
| 9016 | |
| 9017 | } |
| 9018 | <END_MODULE> |
| 9019 | <RESULT IF_PASS COUNT 1> |
| 9020 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 9021 | <END_RESULT> |
| 9022 | <RESULT IF_PASS COUNT 1> |
| 9023 | (?is)\berror: |
| 9024 | <END_RESULT> |
| 9025 | <END_TC> |
| 9026 | |
| 9027 | :exmp. |
| 9028 | |
| 9029 | .*---------------------------------------------------------------------* |
| 9030 | :h4.Allowed matching mechanisms - template superset (record in control part) |
| 9031 | .*---------------------------------------------------------------------* |
| 9032 | :xmp tab=0. |
| 9033 | |
| 9034 | <TC - Allowed matching mechanisms - template superset (record in control part)> |
| 9035 | |
| 9036 | <COMPILE> |
| 9037 | <VERDICT_LEAF PASS> |
| 9038 | <MODULE TTCN x x.ttcn> |
| 9039 | module x { |
| 9040 | |
| 9041 | type record recT{ |
| 9042 | integer f1, |
| 9043 | float f2, |
| 9044 | charstring f3 |
| 9045 | } |
| 9046 | |
| 9047 | const recT c1:= { f1:= 1, f2:= 2.0, f3:= "a"}; |
| 9048 | const recT c2:= { f1:= 5, f2:= 7.0, f3:= "z"}; |
| 9049 | |
| 9050 | control{ |
| 9051 | var template recT r:= superset (c1, c2); |
| 9052 | } |
| 9053 | |
| 9054 | } |
| 9055 | <END_MODULE> |
| 9056 | <RESULT IF_PASS COUNT 1> |
| 9057 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 9058 | <END_RESULT> |
| 9059 | <RESULT IF_PASS COUNT 1> |
| 9060 | (?is)\berror: |
| 9061 | <END_RESULT> |
| 9062 | <END_TC> |
| 9063 | |
| 9064 | :exmp. |
| 9065 | |
| 9066 | .*---------------------------------------------------------------------* |
| 9067 | :h4.Allowed matching mechanisms - template superset (record in function) |
| 9068 | .*---------------------------------------------------------------------* |
| 9069 | :xmp tab=0. |
| 9070 | |
| 9071 | <TC - Allowed matching mechanisms - template superset (record in function)> |
| 9072 | |
| 9073 | <COMPILE> |
| 9074 | <VERDICT_LEAF PASS> |
| 9075 | <MODULE TTCN x x.ttcn> |
| 9076 | module x { |
| 9077 | |
| 9078 | type record recT{ |
| 9079 | integer f1, |
| 9080 | float f2, |
| 9081 | charstring f3 |
| 9082 | } |
| 9083 | |
| 9084 | const recT c1:= { f1:= 1, f2:= 2.0, f3:= "a"}; |
| 9085 | const recT c2:= { f1:= 5, f2:= 7.0, f3:= "z"}; |
| 9086 | |
| 9087 | function myFunct(){ |
| 9088 | var template recT r:= superset (c1, c2); |
| 9089 | } |
| 9090 | |
| 9091 | } |
| 9092 | <END_MODULE> |
| 9093 | <RESULT IF_PASS COUNT 1> |
| 9094 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 9095 | <END_RESULT> |
| 9096 | <RESULT IF_PASS COUNT 1> |
| 9097 | (?is)\berror: |
| 9098 | <END_RESULT> |
| 9099 | <END_TC> |
| 9100 | |
| 9101 | :exmp. |
| 9102 | |
| 9103 | .*---------------------------------------------------------------------* |
| 9104 | :h4.Allowed matching mechanisms - template superset (record of in def.part) |
| 9105 | .*---------------------------------------------------------------------* |
| 9106 | :xmp tab=0. |
| 9107 | |
| 9108 | <TC - Allowed matching mechanisms - template superset (record of in def.part)> |
| 9109 | |
| 9110 | <COMPILE> |
| 9111 | <VERDICT_LEAF PASS> |
| 9112 | <MODULE TTCN x x.ttcn> |
| 9113 | module x { |
| 9114 | |
| 9115 | type record of integer rofT; |
| 9116 | |
| 9117 | const rofT c1:= { 1, 2, 3 }; |
| 9118 | const rofT c2:= { 4, 5, 6 }; |
| 9119 | |
| 9120 | template rofT r:= superset (c1, c2); |
| 9121 | |
| 9122 | } |
| 9123 | <END_MODULE> |
| 9124 | <RESULT IF_PASS COUNT 1> |
| 9125 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 9126 | <END_RESULT> |
| 9127 | <RESULT IF_PASS COUNT 1> |
| 9128 | (?is)\berror: |
| 9129 | <END_RESULT> |
| 9130 | <END_TC> |
| 9131 | |
| 9132 | :exmp. |
| 9133 | |
| 9134 | .*---------------------------------------------------------------------* |
| 9135 | :h4.Allowed matching mechanisms - template superset (record of in control part) |
| 9136 | .*---------------------------------------------------------------------* |
| 9137 | :xmp tab=0. |
| 9138 | |
| 9139 | <TC - Allowed matching mechanisms - template superset (record of in control part)> |
| 9140 | |
| 9141 | <COMPILE> |
| 9142 | <VERDICT_LEAF PASS> |
| 9143 | <MODULE TTCN x x.ttcn> |
| 9144 | module x { |
| 9145 | |
| 9146 | type record of integer rofT; |
| 9147 | |
| 9148 | const rofT c1:= { 1, 2, 3 }; |
| 9149 | const rofT c2:= { 4, 5, 6 }; |
| 9150 | |
| 9151 | control{ |
| 9152 | var template rofT r:= superset (c1, c2); |
| 9153 | } |
| 9154 | |
| 9155 | } |
| 9156 | <END_MODULE> |
| 9157 | <RESULT IF_PASS COUNT 1> |
| 9158 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 9159 | <END_RESULT> |
| 9160 | <RESULT IF_PASS COUNT 1> |
| 9161 | (?is)\berror: |
| 9162 | <END_RESULT> |
| 9163 | <END_TC> |
| 9164 | |
| 9165 | :exmp. |
| 9166 | |
| 9167 | .*---------------------------------------------------------------------* |
| 9168 | :h4.Allowed matching mechanisms - template superset (record of in function) |
| 9169 | .*---------------------------------------------------------------------* |
| 9170 | :xmp tab=0. |
| 9171 | |
| 9172 | <TC - Allowed matching mechanisms - template superset (record of in function)> |
| 9173 | |
| 9174 | <COMPILE> |
| 9175 | <VERDICT_LEAF PASS> |
| 9176 | <MODULE TTCN x x.ttcn> |
| 9177 | module x { |
| 9178 | |
| 9179 | type record of integer rofT; |
| 9180 | |
| 9181 | const rofT c1:= { 1, 2, 3 }; |
| 9182 | const rofT c2:= { 4, 5, 6 }; |
| 9183 | |
| 9184 | function myFunct(){ |
| 9185 | var template rofT r:= superset (c1, c2); |
| 9186 | } |
| 9187 | |
| 9188 | } |
| 9189 | <END_MODULE> |
| 9190 | <RESULT IF_PASS COUNT 1> |
| 9191 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 9192 | <END_RESULT> |
| 9193 | <RESULT IF_PASS COUNT 1> |
| 9194 | (?is)\berror: |
| 9195 | <END_RESULT> |
| 9196 | <END_TC> |
| 9197 | |
| 9198 | :exmp. |
| 9199 | |
| 9200 | .*---------------------------------------------------------------------* |
| 9201 | :h4.Allowed matching mechanisms - template superset (set in def.part) |
| 9202 | .*---------------------------------------------------------------------* |
| 9203 | :xmp tab=0. |
| 9204 | |
| 9205 | <TC - Allowed matching mechanisms - template superset (set in def.part)> |
| 9206 | |
| 9207 | <COMPILE> |
| 9208 | <VERDICT_LEAF PASS> |
| 9209 | <MODULE TTCN x x.ttcn> |
| 9210 | module x { |
| 9211 | |
| 9212 | type set setT{ |
| 9213 | integer f1, |
| 9214 | float f2, |
| 9215 | charstring f3 |
| 9216 | } |
| 9217 | |
| 9218 | const setT c1:= { f1:= 1, f2:= 2.0, f3:= "a"}; |
| 9219 | const setT c2:= { f1:= 5, f2:= 7.0, f3:= "z"}; |
| 9220 | |
| 9221 | template setT r:= superset (c1, c2); |
| 9222 | |
| 9223 | } |
| 9224 | <END_MODULE> |
| 9225 | <RESULT IF_PASS COUNT 1> |
| 9226 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 9227 | <END_RESULT> |
| 9228 | <RESULT IF_PASS COUNT 1> |
| 9229 | (?is)\berror: |
| 9230 | <END_RESULT> |
| 9231 | <END_TC> |
| 9232 | |
| 9233 | :exmp. |
| 9234 | |
| 9235 | .*---------------------------------------------------------------------* |
| 9236 | :h4.Allowed matching mechanisms - template superset (set in control part) |
| 9237 | .*---------------------------------------------------------------------* |
| 9238 | :xmp tab=0. |
| 9239 | |
| 9240 | <TC - Allowed matching mechanisms - template superset (set in control part)> |
| 9241 | |
| 9242 | <COMPILE> |
| 9243 | <VERDICT_LEAF PASS> |
| 9244 | <MODULE TTCN x x.ttcn> |
| 9245 | module x { |
| 9246 | |
| 9247 | type set setT{ |
| 9248 | integer f1, |
| 9249 | float f2, |
| 9250 | charstring f3 |
| 9251 | } |
| 9252 | |
| 9253 | const setT c1:= { f1:= 1, f2:= 2.0, f3:= "a"}; |
| 9254 | const setT c2:= { f1:= 5, f2:= 7.0, f3:= "z"}; |
| 9255 | |
| 9256 | control{ |
| 9257 | var template setT r:= superset (c1, c2); |
| 9258 | } |
| 9259 | |
| 9260 | } |
| 9261 | <END_MODULE> |
| 9262 | <RESULT IF_PASS COUNT 1> |
| 9263 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 9264 | <END_RESULT> |
| 9265 | <RESULT IF_PASS COUNT 1> |
| 9266 | (?is)\berror: |
| 9267 | <END_RESULT> |
| 9268 | <END_TC> |
| 9269 | |
| 9270 | :exmp. |
| 9271 | |
| 9272 | .*---------------------------------------------------------------------* |
| 9273 | :h4.Allowed matching mechanisms - template superset (set in function) |
| 9274 | .*---------------------------------------------------------------------* |
| 9275 | :xmp tab=0. |
| 9276 | |
| 9277 | <TC - Allowed matching mechanisms - template superset (set in function)> |
| 9278 | |
| 9279 | <COMPILE> |
| 9280 | <VERDICT_LEAF PASS> |
| 9281 | <MODULE TTCN x x.ttcn> |
| 9282 | module x { |
| 9283 | |
| 9284 | type set setT{ |
| 9285 | integer f1, |
| 9286 | float f2, |
| 9287 | charstring f3 |
| 9288 | } |
| 9289 | |
| 9290 | const setT c1:= { f1:= 1, f2:= 2.0, f3:= "a"}; |
| 9291 | const setT c2:= { f1:= 5, f2:= 7.0, f3:= "z"}; |
| 9292 | |
| 9293 | function myFunct(){ |
| 9294 | var template setT r:= superset (c1, c2); |
| 9295 | } |
| 9296 | |
| 9297 | } |
| 9298 | <END_MODULE> |
| 9299 | <RESULT IF_PASS COUNT 1> |
| 9300 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 9301 | <END_RESULT> |
| 9302 | <RESULT IF_PASS COUNT 1> |
| 9303 | (?is)\berror: |
| 9304 | <END_RESULT> |
| 9305 | <END_TC> |
| 9306 | |
| 9307 | :exmp. |
| 9308 | |
| 9309 | .*---------------------------------------------------------------------* |
| 9310 | :h4.Allowed matching mechanisms - template superset (enumerated in def.part) |
| 9311 | .*---------------------------------------------------------------------* |
| 9312 | :xmp tab=0. |
| 9313 | |
| 9314 | <TC - Allowed matching mechanisms - template superset (enumerated in def.part)> |
| 9315 | |
| 9316 | <COMPILE> |
| 9317 | <VERDICT_LEAF PASS> |
| 9318 | <MODULE TTCN x x.ttcn> |
| 9319 | module x { |
| 9320 | |
| 9321 | type enumerated enumT { ONE(1), TWO(2), THREE(3) }; |
| 9322 | |
| 9323 | const enumT c1:= ONE; |
| 9324 | const enumT c2:= TWO; |
| 9325 | |
| 9326 | template enumT r:= superset (c1, c2); |
| 9327 | |
| 9328 | } |
| 9329 | <END_MODULE> |
| 9330 | <RESULT IF_PASS COUNT 1> |
| 9331 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 9332 | <END_RESULT> |
| 9333 | <RESULT IF_PASS COUNT 1> |
| 9334 | (?is)\berror: |
| 9335 | <END_RESULT> |
| 9336 | <END_TC> |
| 9337 | |
| 9338 | :exmp. |
| 9339 | |
| 9340 | .*---------------------------------------------------------------------* |
| 9341 | :h4.Allowed matching mechanisms - template superset (enumerated in control part) |
| 9342 | .*---------------------------------------------------------------------* |
| 9343 | :xmp tab=0. |
| 9344 | |
| 9345 | <TC - Allowed matching mechanisms - template superset (enumerated in control part)> |
| 9346 | |
| 9347 | <COMPILE> |
| 9348 | <VERDICT_LEAF PASS> |
| 9349 | <MODULE TTCN x x.ttcn> |
| 9350 | module x { |
| 9351 | |
| 9352 | type enumerated enumT { ONE(1), TWO(2), THREE(3) }; |
| 9353 | |
| 9354 | const enumT c1:= ONE; |
| 9355 | const enumT c2:= TWO; |
| 9356 | |
| 9357 | control{ |
| 9358 | var template enumT r:= superset (c1, c2); |
| 9359 | } |
| 9360 | |
| 9361 | } |
| 9362 | <END_MODULE> |
| 9363 | <RESULT IF_PASS COUNT 1> |
| 9364 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 9365 | <END_RESULT> |
| 9366 | <RESULT IF_PASS COUNT 1> |
| 9367 | (?is)\berror: |
| 9368 | <END_RESULT> |
| 9369 | <END_TC> |
| 9370 | |
| 9371 | :exmp. |
| 9372 | |
| 9373 | .*---------------------------------------------------------------------* |
| 9374 | :h4.Allowed matching mechanisms - template superset (enumerated in function) |
| 9375 | .*---------------------------------------------------------------------* |
| 9376 | :xmp tab=0. |
| 9377 | |
| 9378 | <TC - Allowed matching mechanisms - template superset (enumerated in function)> |
| 9379 | |
| 9380 | <COMPILE> |
| 9381 | <VERDICT_LEAF PASS> |
| 9382 | <MODULE TTCN x x.ttcn> |
| 9383 | module x { |
| 9384 | |
| 9385 | type enumerated enumT { ONE(1), TWO(2), THREE(3) }; |
| 9386 | |
| 9387 | const enumT c1:= ONE; |
| 9388 | const enumT c2:= TWO; |
| 9389 | |
| 9390 | function myFunct(){ |
| 9391 | var template enumT r:= superset (c1, c2); |
| 9392 | } |
| 9393 | |
| 9394 | } |
| 9395 | <END_MODULE> |
| 9396 | <RESULT IF_PASS COUNT 1> |
| 9397 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 9398 | <END_RESULT> |
| 9399 | <RESULT IF_PASS COUNT 1> |
| 9400 | (?is)\berror: |
| 9401 | <END_RESULT> |
| 9402 | <END_TC> |
| 9403 | |
| 9404 | :exmp. |
| 9405 | |
| 9406 | .*---------------------------------------------------------------------* |
| 9407 | :h4.Allowed matching mechanisms - template superset (union in def.part) |
| 9408 | .*---------------------------------------------------------------------* |
| 9409 | :xmp tab=0. |
| 9410 | |
| 9411 | <TC - Allowed matching mechanisms - template superset (union in def.part)> |
| 9412 | |
| 9413 | <COMPILE> |
| 9414 | <VERDICT_LEAF PASS> |
| 9415 | <MODULE TTCN x x.ttcn> |
| 9416 | module x { |
| 9417 | |
| 9418 | type union uniT{ |
| 9419 | integer f1, |
| 9420 | float f2, |
| 9421 | charstring f3 |
| 9422 | } |
| 9423 | |
| 9424 | const uniT c1:= { f1:= 1 }; |
| 9425 | const uniT c2:= { f2:= 7.0 }; |
| 9426 | |
| 9427 | template uniT r:= superset (c1, c2); |
| 9428 | |
| 9429 | } |
| 9430 | <END_MODULE> |
| 9431 | <RESULT IF_PASS COUNT 1> |
| 9432 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 9433 | <END_RESULT> |
| 9434 | <RESULT IF_PASS COUNT 1> |
| 9435 | (?is)\berror: |
| 9436 | <END_RESULT> |
| 9437 | <END_TC> |
| 9438 | |
| 9439 | :exmp. |
| 9440 | |
| 9441 | .*---------------------------------------------------------------------* |
| 9442 | :h4.Allowed matching mechanisms - template superset (union in control part) |
| 9443 | .*---------------------------------------------------------------------* |
| 9444 | :xmp tab=0. |
| 9445 | |
| 9446 | <TC - Allowed matching mechanisms - template superset (union in control part)> |
| 9447 | |
| 9448 | <COMPILE> |
| 9449 | <VERDICT_LEAF PASS> |
| 9450 | <MODULE TTCN x x.ttcn> |
| 9451 | module x { |
| 9452 | |
| 9453 | type union uniT{ |
| 9454 | integer f1, |
| 9455 | float f2, |
| 9456 | charstring f3 |
| 9457 | } |
| 9458 | |
| 9459 | const uniT c1:= { f1:= 1 }; |
| 9460 | const uniT c2:= { f2:= 7.0 }; |
| 9461 | |
| 9462 | control{ |
| 9463 | var template uniT r:= superset (c1, c2); |
| 9464 | } |
| 9465 | |
| 9466 | } |
| 9467 | <END_MODULE> |
| 9468 | <RESULT IF_PASS COUNT 1> |
| 9469 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 9470 | <END_RESULT> |
| 9471 | <RESULT IF_PASS COUNT 1> |
| 9472 | (?is)\berror: |
| 9473 | <END_RESULT> |
| 9474 | <END_TC> |
| 9475 | |
| 9476 | :exmp. |
| 9477 | |
| 9478 | .*---------------------------------------------------------------------* |
| 9479 | :h4.Allowed matching mechanisms - template superset (union in function) |
| 9480 | .*---------------------------------------------------------------------* |
| 9481 | :xmp tab=0. |
| 9482 | |
| 9483 | <TC - Allowed matching mechanisms - template superset (union in function)> |
| 9484 | |
| 9485 | <COMPILE> |
| 9486 | <VERDICT_LEAF PASS> |
| 9487 | <MODULE TTCN x x.ttcn> |
| 9488 | module x { |
| 9489 | |
| 9490 | type union uniT{ |
| 9491 | integer f1, |
| 9492 | float f2, |
| 9493 | charstring f3 |
| 9494 | } |
| 9495 | |
| 9496 | const uniT c1:= { f1:= 1 }; |
| 9497 | const uniT c2:= { f2:= 7.0 }; |
| 9498 | |
| 9499 | function myFunct(){ |
| 9500 | var template uniT r:= superset (c1, c2); |
| 9501 | } |
| 9502 | |
| 9503 | } |
| 9504 | <END_MODULE> |
| 9505 | <RESULT IF_PASS COUNT 1> |
| 9506 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 9507 | <END_RESULT> |
| 9508 | <RESULT IF_PASS COUNT 1> |
| 9509 | (?is)\berror: |
| 9510 | <END_RESULT> |
| 9511 | <END_TC> |
| 9512 | |
| 9513 | :exmp. |
| 9514 | |
| 9515 | .*---------------------------------------------------------------------* |
| 9516 | :h4.Allowed matching mechanisms - template superset (array in def. part) |
| 9517 | .*---------------------------------------------------------------------* |
| 9518 | :xmp tab=0. |
| 9519 | |
| 9520 | <TC - Allowed matching mechanisms - template superset (array in def.part)> |
| 9521 | |
| 9522 | <COMPILE> |
| 9523 | <VERDICT_LEAF PASS> |
| 9524 | <MODULE TTCN x x.ttcn> |
| 9525 | module x { |
| 9526 | |
| 9527 | type integer myint[1]; |
| 9528 | |
| 9529 | const myint c1:={1}; |
| 9530 | const myint c2 :={3}; |
| 9531 | |
| 9532 | template myint r := superset(c1,c2); |
| 9533 | |
| 9534 | } |
| 9535 | <END_MODULE> |
| 9536 | <RESULT IF_PASS COUNT 1> |
| 9537 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 9538 | <END_RESULT> |
| 9539 | <RESULT IF_PASS COUNT 1> |
| 9540 | (?is)\berror: |
| 9541 | <END_RESULT> |
| 9542 | <END_TC> |
| 9543 | |
| 9544 | :exmp. |
| 9545 | |
| 9546 | .*---------------------------------------------------------------------* |
| 9547 | :h4.Allowed matching mechanisms - template superset (array in control part) |
| 9548 | .*---------------------------------------------------------------------* |
| 9549 | :xmp tab=0. |
| 9550 | |
| 9551 | <TC - Allowed matching mechanisms - template superset (array in control part)> |
| 9552 | |
| 9553 | <COMPILE> |
| 9554 | <VERDICT_LEAF PASS> |
| 9555 | <MODULE TTCN x x.ttcn> |
| 9556 | module x { |
| 9557 | |
| 9558 | type integer myint[1]; |
| 9559 | |
| 9560 | const myint c1:={1}; |
| 9561 | const myint c2 :={3}; |
| 9562 | |
| 9563 | control{ |
| 9564 | template myint r := superset(c1,c2); |
| 9565 | } |
| 9566 | } |
| 9567 | <END_MODULE> |
| 9568 | <RESULT IF_PASS COUNT 1> |
| 9569 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 9570 | <END_RESULT> |
| 9571 | <RESULT IF_PASS COUNT 1> |
| 9572 | (?is)\berror: |
| 9573 | <END_RESULT> |
| 9574 | <END_TC> |
| 9575 | |
| 9576 | :exmp. |
| 9577 | |
| 9578 | .*---------------------------------------------------------------------* |
| 9579 | :h4.Allowed matching mechanisms - template superset (array in function) |
| 9580 | .*---------------------------------------------------------------------* |
| 9581 | :xmp tab=0. |
| 9582 | |
| 9583 | <TC - Allowed matching mechanisms - template superset (array in function)> |
| 9584 | |
| 9585 | <COMPILE> |
| 9586 | <VERDICT_LEAF PASS> |
| 9587 | <MODULE TTCN x x.ttcn> |
| 9588 | module x { |
| 9589 | |
| 9590 | type integer myint[1]; |
| 9591 | |
| 9592 | const myint c1:={1}; |
| 9593 | const myint c2 :={3}; |
| 9594 | |
| 9595 | function myFunct(){ |
| 9596 | template myint r := superset(c1,c2); |
| 9597 | } |
| 9598 | } |
| 9599 | <END_MODULE> |
| 9600 | <RESULT IF_PASS COUNT 1> |
| 9601 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 9602 | <END_RESULT> |
| 9603 | <RESULT IF_PASS COUNT 1> |
| 9604 | (?is)\berror: |
| 9605 | <END_RESULT> |
| 9606 | <END_TC> |
| 9607 | |
| 9608 | :exmp. |
| 9609 | |
| 9610 | .*---------------------------------------------------------------------* |
| 9611 | :h4.Allowed matching mechanisms - template subset (boolean in def.part) |
| 9612 | .*---------------------------------------------------------------------* |
| 9613 | :xmp tab=0. |
| 9614 | |
| 9615 | <TC - Allowed matching mechanisms - template subset (boolean in def.part)> |
| 9616 | |
| 9617 | <COMPILE> |
| 9618 | <VERDICT_LEAF PASS> |
| 9619 | <MODULE TTCN x x.ttcn> |
| 9620 | module x { |
| 9621 | |
| 9622 | const boolean c1:= false; |
| 9623 | const boolean c2:= true; |
| 9624 | |
| 9625 | template boolean r:= subset (c1, c2); |
| 9626 | |
| 9627 | } |
| 9628 | <END_MODULE> |
| 9629 | <RESULT IF_PASS COUNT 1> |
| 9630 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 9631 | <END_RESULT> |
| 9632 | <RESULT IF_PASS COUNT 1> |
| 9633 | (?is)\berror: |
| 9634 | <END_RESULT> |
| 9635 | <END_TC> |
| 9636 | |
| 9637 | :exmp. |
| 9638 | |
| 9639 | .*---------------------------------------------------------------------* |
| 9640 | :h4.Allowed matching mechanisms - template subset (boolean in control part) |
| 9641 | .*---------------------------------------------------------------------* |
| 9642 | :xmp tab=0. |
| 9643 | |
| 9644 | <TC - Allowed matching mechanisms - template subset (boolean in control part)> |
| 9645 | |
| 9646 | <COMPILE> |
| 9647 | <VERDICT_LEAF PASS> |
| 9648 | <MODULE TTCN x x.ttcn> |
| 9649 | module x { |
| 9650 | |
| 9651 | const boolean c1:= false; |
| 9652 | const boolean c2:= true; |
| 9653 | |
| 9654 | control{ |
| 9655 | var template boolean r:= subset (c1, c2); |
| 9656 | } |
| 9657 | |
| 9658 | } |
| 9659 | <END_MODULE> |
| 9660 | <RESULT IF_PASS COUNT 1> |
| 9661 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 9662 | <END_RESULT> |
| 9663 | <RESULT IF_PASS COUNT 1> |
| 9664 | (?is)\berror: |
| 9665 | <END_RESULT> |
| 9666 | <END_TC> |
| 9667 | |
| 9668 | :exmp. |
| 9669 | |
| 9670 | .*---------------------------------------------------------------------* |
| 9671 | :h4.Allowed matching mechanisms - template subset (boolean in function) |
| 9672 | .*---------------------------------------------------------------------* |
| 9673 | :xmp tab=0. |
| 9674 | |
| 9675 | <TC - Allowed matching mechanisms - template subset (boolean in function)> |
| 9676 | |
| 9677 | <COMPILE> |
| 9678 | <VERDICT_LEAF PASS> |
| 9679 | <MODULE TTCN x x.ttcn> |
| 9680 | module x { |
| 9681 | |
| 9682 | const boolean c1:= false; |
| 9683 | const boolean c2:= true; |
| 9684 | |
| 9685 | function myFunct(){ |
| 9686 | var template boolean r:= subset (c1, c2); |
| 9687 | } |
| 9688 | |
| 9689 | } |
| 9690 | <END_MODULE> |
| 9691 | <RESULT IF_PASS COUNT 1> |
| 9692 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 9693 | <END_RESULT> |
| 9694 | <RESULT IF_PASS COUNT 1> |
| 9695 | (?is)\berror: |
| 9696 | <END_RESULT> |
| 9697 | <END_TC> |
| 9698 | |
| 9699 | :exmp. |
| 9700 | |
| 9701 | .*---------------------------------------------------------------------* |
| 9702 | :h4.Allowed matching mechanisms - template subset (integer in def.part) |
| 9703 | .*---------------------------------------------------------------------* |
| 9704 | :xmp tab=0. |
| 9705 | |
| 9706 | <TC - Allowed matching mechanisms - template subset (integer in def.part)> |
| 9707 | |
| 9708 | <COMPILE> |
| 9709 | <VERDICT_LEAF PASS> |
| 9710 | <MODULE TTCN x x.ttcn> |
| 9711 | module x { |
| 9712 | |
| 9713 | const integer c1:= 1; |
| 9714 | const integer c2:= 2; |
| 9715 | const integer c3:= 3; |
| 9716 | |
| 9717 | template integer r:= subset (c1, c2, c3); |
| 9718 | |
| 9719 | } |
| 9720 | <END_MODULE> |
| 9721 | <RESULT IF_PASS COUNT 1> |
| 9722 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 9723 | <END_RESULT> |
| 9724 | <RESULT IF_PASS COUNT 1> |
| 9725 | (?is)\berror: |
| 9726 | <END_RESULT> |
| 9727 | <END_TC> |
| 9728 | |
| 9729 | :exmp. |
| 9730 | |
| 9731 | .*---------------------------------------------------------------------* |
| 9732 | :h4.Allowed matching mechanisms - template subset (integer in control part) |
| 9733 | .*---------------------------------------------------------------------* |
| 9734 | :xmp tab=0. |
| 9735 | |
| 9736 | <TC - Allowed matching mechanisms - template subset (integer in control part)> |
| 9737 | |
| 9738 | <COMPILE> |
| 9739 | <VERDICT_LEAF PASS> |
| 9740 | <MODULE TTCN x x.ttcn> |
| 9741 | module x { |
| 9742 | |
| 9743 | const integer c1:= 1; |
| 9744 | const integer c2:= 2; |
| 9745 | const integer c3:= 3; |
| 9746 | |
| 9747 | control{ |
| 9748 | var template integer r:= subset (c1, c2, c3); |
| 9749 | } |
| 9750 | |
| 9751 | } |
| 9752 | <END_MODULE> |
| 9753 | <RESULT IF_PASS COUNT 1> |
| 9754 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 9755 | <END_RESULT> |
| 9756 | <RESULT IF_PASS COUNT 1> |
| 9757 | (?is)\berror: |
| 9758 | <END_RESULT> |
| 9759 | <END_TC> |
| 9760 | |
| 9761 | :exmp. |
| 9762 | |
| 9763 | .*---------------------------------------------------------------------* |
| 9764 | :h4.Allowed matching mechanisms - template subset (integer in function) |
| 9765 | .*---------------------------------------------------------------------* |
| 9766 | :xmp tab=0. |
| 9767 | |
| 9768 | <TC - Allowed matching mechanisms - template subset (integer in function)> |
| 9769 | |
| 9770 | <COMPILE> |
| 9771 | <VERDICT_LEAF PASS> |
| 9772 | <MODULE TTCN x x.ttcn> |
| 9773 | module x { |
| 9774 | |
| 9775 | const integer c1:= 1; |
| 9776 | const integer c2:= 2; |
| 9777 | const integer c3:= 3; |
| 9778 | |
| 9779 | function myFunct(){ |
| 9780 | var template integer r:= subset (c1, c2, c3); |
| 9781 | } |
| 9782 | |
| 9783 | } |
| 9784 | <END_MODULE> |
| 9785 | <RESULT IF_PASS COUNT 1> |
| 9786 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 9787 | <END_RESULT> |
| 9788 | <RESULT IF_PASS COUNT 1> |
| 9789 | (?is)\berror: |
| 9790 | <END_RESULT> |
| 9791 | <END_TC> |
| 9792 | |
| 9793 | :exmp. |
| 9794 | |
| 9795 | .*---------------------------------------------------------------------* |
| 9796 | :h4.Allowed matching mechanisms - template subset (float in def.part) |
| 9797 | .*---------------------------------------------------------------------* |
| 9798 | :xmp tab=0. |
| 9799 | |
| 9800 | <TC - Allowed matching mechanisms - template subset (float in def.part)> |
| 9801 | |
| 9802 | <COMPILE> |
| 9803 | <VERDICT_LEAF PASS> |
| 9804 | <MODULE TTCN x x.ttcn> |
| 9805 | module x { |
| 9806 | |
| 9807 | const float c1:= 1.6; |
| 9808 | const float c2:= 2.4; |
| 9809 | const float c3:= 3.9; |
| 9810 | |
| 9811 | template float r:= subset (c1, c2, c3); |
| 9812 | |
| 9813 | } |
| 9814 | <END_MODULE> |
| 9815 | <RESULT IF_PASS COUNT 1> |
| 9816 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 9817 | <END_RESULT> |
| 9818 | <RESULT IF_PASS COUNT 1> |
| 9819 | (?is)\berror: |
| 9820 | <END_RESULT> |
| 9821 | <END_TC> |
| 9822 | |
| 9823 | :exmp. |
| 9824 | |
| 9825 | .*---------------------------------------------------------------------* |
| 9826 | :h4.Allowed matching mechanisms - template subset (float in control part) |
| 9827 | .*---------------------------------------------------------------------* |
| 9828 | :xmp tab=0. |
| 9829 | |
| 9830 | <TC - Allowed matching mechanisms - template subset (float in control part)> |
| 9831 | |
| 9832 | <COMPILE> |
| 9833 | <VERDICT_LEAF PASS> |
| 9834 | <MODULE TTCN x x.ttcn> |
| 9835 | module x { |
| 9836 | |
| 9837 | const float c1:= 1.1; |
| 9838 | const float c2:= 2.3; |
| 9839 | const float c3:= 3.1; |
| 9840 | |
| 9841 | control{ |
| 9842 | var template float r:= subset (c1, c2, c3); |
| 9843 | } |
| 9844 | |
| 9845 | } |
| 9846 | <END_MODULE> |
| 9847 | <RESULT IF_PASS COUNT 1> |
| 9848 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 9849 | <END_RESULT> |
| 9850 | <RESULT IF_PASS COUNT 1> |
| 9851 | (?is)\berror: |
| 9852 | <END_RESULT> |
| 9853 | <END_TC> |
| 9854 | |
| 9855 | :exmp. |
| 9856 | |
| 9857 | .*---------------------------------------------------------------------* |
| 9858 | :h4.Allowed matching mechanisms - template subset (float in function) |
| 9859 | .*---------------------------------------------------------------------* |
| 9860 | :xmp tab=0. |
| 9861 | |
| 9862 | <TC - Allowed matching mechanisms - template subset (float in function)> |
| 9863 | |
| 9864 | <COMPILE> |
| 9865 | <VERDICT_LEAF PASS> |
| 9866 | <MODULE TTCN x x.ttcn> |
| 9867 | module x { |
| 9868 | |
| 9869 | const float c1:= 1.1; |
| 9870 | const float c2:= 2.9; |
| 9871 | const float c3:= 3.2; |
| 9872 | |
| 9873 | function myFunct(){ |
| 9874 | var template float r:= subset (c1, c2, c3); |
| 9875 | } |
| 9876 | |
| 9877 | } |
| 9878 | <END_MODULE> |
| 9879 | <RESULT IF_PASS COUNT 1> |
| 9880 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 9881 | <END_RESULT> |
| 9882 | <RESULT IF_PASS COUNT 1> |
| 9883 | (?is)\berror: |
| 9884 | <END_RESULT> |
| 9885 | <END_TC> |
| 9886 | |
| 9887 | :exmp. |
| 9888 | |
| 9889 | .*---------------------------------------------------------------------* |
| 9890 | :h4.Allowed matching mechanisms - template subset (bitstring in def.part) |
| 9891 | .*---------------------------------------------------------------------* |
| 9892 | :xmp tab=0. |
| 9893 | |
| 9894 | <TC - Allowed matching mechanisms - template subset (bitstring in def.part)> |
| 9895 | |
| 9896 | <COMPILE> |
| 9897 | <VERDICT_LEAF PASS> |
| 9898 | <MODULE TTCN x x.ttcn> |
| 9899 | module x { |
| 9900 | |
| 9901 | const bitstring c1:= '101'B; |
| 9902 | const bitstring c2:= '110'B; |
| 9903 | const bitstring c3:= '111'B; |
| 9904 | |
| 9905 | template bitstring r:= subset (c1, c2, c3); |
| 9906 | |
| 9907 | } |
| 9908 | <END_MODULE> |
| 9909 | <RESULT IF_PASS COUNT 1> |
| 9910 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 9911 | <END_RESULT> |
| 9912 | <RESULT IF_PASS COUNT 1> |
| 9913 | (?is)\berror: |
| 9914 | <END_RESULT> |
| 9915 | <END_TC> |
| 9916 | |
| 9917 | :exmp. |
| 9918 | |
| 9919 | .*---------------------------------------------------------------------* |
| 9920 | :h4.Allowed matching mechanisms - template subset (bitstring in control part) |
| 9921 | .*---------------------------------------------------------------------* |
| 9922 | :xmp tab=0. |
| 9923 | |
| 9924 | <TC - Allowed matching mechanisms - template subset (bitstring in control part)> |
| 9925 | |
| 9926 | <COMPILE> |
| 9927 | <VERDICT_LEAF PASS> |
| 9928 | <MODULE TTCN x x.ttcn> |
| 9929 | module x { |
| 9930 | |
| 9931 | const bitstring c1:= '101'B; |
| 9932 | const bitstring c2:= '110'B; |
| 9933 | const bitstring c3:= '111'B; |
| 9934 | |
| 9935 | control{ |
| 9936 | var template bitstring r:= subset (c1, c2, c3); |
| 9937 | } |
| 9938 | |
| 9939 | } |
| 9940 | <END_MODULE> |
| 9941 | <RESULT IF_PASS COUNT 1> |
| 9942 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 9943 | <END_RESULT> |
| 9944 | <RESULT IF_PASS COUNT 1> |
| 9945 | (?is)\berror: |
| 9946 | <END_RESULT> |
| 9947 | <END_TC> |
| 9948 | |
| 9949 | :exmp. |
| 9950 | |
| 9951 | .*---------------------------------------------------------------------* |
| 9952 | :h4.Allowed matching mechanisms - template subset (bitstring in function) |
| 9953 | .*---------------------------------------------------------------------* |
| 9954 | :xmp tab=0. |
| 9955 | |
| 9956 | <TC - Allowed matching mechanisms - template subset (bitstring in function)> |
| 9957 | |
| 9958 | <COMPILE> |
| 9959 | <VERDICT_LEAF PASS> |
| 9960 | <MODULE TTCN x x.ttcn> |
| 9961 | module x { |
| 9962 | |
| 9963 | const bitstring c1:= '101'B; |
| 9964 | const bitstring c2:= '110'B; |
| 9965 | const bitstring c3:= '111'B; |
| 9966 | |
| 9967 | function myFunct(){ |
| 9968 | var template bitstring r:= subset (c1, c2, c3); |
| 9969 | } |
| 9970 | |
| 9971 | } |
| 9972 | <END_MODULE> |
| 9973 | <RESULT IF_PASS COUNT 1> |
| 9974 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 9975 | <END_RESULT> |
| 9976 | <RESULT IF_PASS COUNT 1> |
| 9977 | (?is)\berror: |
| 9978 | <END_RESULT> |
| 9979 | <END_TC> |
| 9980 | |
| 9981 | :exmp. |
| 9982 | |
| 9983 | .*---------------------------------------------------------------------* |
| 9984 | :h4.Allowed matching mechanisms - template subset (octetstring in def.part) |
| 9985 | .*---------------------------------------------------------------------* |
| 9986 | :xmp tab=0. |
| 9987 | |
| 9988 | <TC - Allowed matching mechanisms - template subset (octetstring in def.part)> |
| 9989 | |
| 9990 | <COMPILE> |
| 9991 | <VERDICT_LEAF PASS> |
| 9992 | <MODULE TTCN x x.ttcn> |
| 9993 | module x { |
| 9994 | |
| 9995 | const octetstring c1:= '1011'O; |
| 9996 | const octetstring c2:= '1110'O; |
| 9997 | const octetstring c3:= '1111'O; |
| 9998 | |
| 9999 | template octetstring r:= subset (c1, c2, c3); |
| 10000 | |
| 10001 | } |
| 10002 | <END_MODULE> |
| 10003 | <RESULT IF_PASS COUNT 1> |
| 10004 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 10005 | <END_RESULT> |
| 10006 | <RESULT IF_PASS COUNT 1> |
| 10007 | (?is)\berror: |
| 10008 | <END_RESULT> |
| 10009 | <END_TC> |
| 10010 | |
| 10011 | :exmp. |
| 10012 | |
| 10013 | .*---------------------------------------------------------------------* |
| 10014 | :h4.Allowed matching mechanisms - template subset (octetstring in control part) |
| 10015 | .*---------------------------------------------------------------------* |
| 10016 | :xmp tab=0. |
| 10017 | |
| 10018 | <TC - Allowed matching mechanisms - template subset (octetstring in control part)> |
| 10019 | |
| 10020 | <COMPILE> |
| 10021 | <VERDICT_LEAF PASS> |
| 10022 | <MODULE TTCN x x.ttcn> |
| 10023 | module x { |
| 10024 | |
| 10025 | const octetstring c1:= '1011'O; |
| 10026 | const octetstring c2:= '1110'O; |
| 10027 | const octetstring c3:= '1111'O; |
| 10028 | |
| 10029 | control{ |
| 10030 | var template octetstring r:= subset (c1, c2, c3); |
| 10031 | } |
| 10032 | |
| 10033 | } |
| 10034 | <END_MODULE> |
| 10035 | <RESULT IF_PASS COUNT 1> |
| 10036 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 10037 | <END_RESULT> |
| 10038 | <RESULT IF_PASS COUNT 1> |
| 10039 | (?is)\berror: |
| 10040 | <END_RESULT> |
| 10041 | <END_TC> |
| 10042 | |
| 10043 | :exmp. |
| 10044 | |
| 10045 | .*---------------------------------------------------------------------* |
| 10046 | :h4.Allowed matching mechanisms - template subset (octetstring in function) |
| 10047 | .*---------------------------------------------------------------------* |
| 10048 | :xmp tab=0. |
| 10049 | |
| 10050 | <TC - Allowed matching mechanisms - template subset (octetstring in function)> |
| 10051 | |
| 10052 | <COMPILE> |
| 10053 | <VERDICT_LEAF PASS> |
| 10054 | <MODULE TTCN x x.ttcn> |
| 10055 | module x { |
| 10056 | |
| 10057 | const octetstring c1:= '1011'O; |
| 10058 | const octetstring c2:= '1110'O; |
| 10059 | const octetstring c3:= '1111'O; |
| 10060 | |
| 10061 | function myFunct(){ |
| 10062 | var template octetstring r:= subset (c1, c2, c3); |
| 10063 | } |
| 10064 | |
| 10065 | } |
| 10066 | <END_MODULE> |
| 10067 | <RESULT IF_PASS COUNT 1> |
| 10068 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 10069 | <END_RESULT> |
| 10070 | <RESULT IF_PASS COUNT 1> |
| 10071 | (?is)\berror: |
| 10072 | <END_RESULT> |
| 10073 | <END_TC> |
| 10074 | |
| 10075 | :exmp. |
| 10076 | |
| 10077 | .*---------------------------------------------------------------------* |
| 10078 | :h4.Allowed matching mechanisms - template subset (hexstring in def.part) |
| 10079 | .*---------------------------------------------------------------------* |
| 10080 | :xmp tab=0. |
| 10081 | |
| 10082 | <TC - Allowed matching mechanisms - template subset (hexstring in def.part)> |
| 10083 | |
| 10084 | <COMPILE> |
| 10085 | <VERDICT_LEAF PASS> |
| 10086 | <MODULE TTCN x x.ttcn> |
| 10087 | module x { |
| 10088 | |
| 10089 | const hexstring c1:= '1011'H; |
| 10090 | const hexstring c2:= '1110'H; |
| 10091 | const hexstring c3:= '1111'H; |
| 10092 | |
| 10093 | template hexstring r:= subset (c1, c2, c3); |
| 10094 | |
| 10095 | } |
| 10096 | <END_MODULE> |
| 10097 | <RESULT IF_PASS COUNT 1> |
| 10098 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 10099 | <END_RESULT> |
| 10100 | <RESULT IF_PASS COUNT 1> |
| 10101 | (?is)\berror: |
| 10102 | <END_RESULT> |
| 10103 | <END_TC> |
| 10104 | |
| 10105 | :exmp. |
| 10106 | |
| 10107 | .*---------------------------------------------------------------------* |
| 10108 | :h4.Allowed matching mechanisms - template subset (hexstring in control part) |
| 10109 | .*---------------------------------------------------------------------* |
| 10110 | :xmp tab=0. |
| 10111 | |
| 10112 | <TC - Allowed matching mechanisms - template subset (hexstring in control part)> |
| 10113 | |
| 10114 | <COMPILE> |
| 10115 | <VERDICT_LEAF PASS> |
| 10116 | <MODULE TTCN x x.ttcn> |
| 10117 | module x { |
| 10118 | |
| 10119 | const hexstring c1:= '1011'H; |
| 10120 | const hexstring c2:= '1110'H; |
| 10121 | const hexstring c3:= '1111'H; |
| 10122 | |
| 10123 | control{ |
| 10124 | var template hexstring r:= subset (c1, c2, c3); |
| 10125 | } |
| 10126 | |
| 10127 | } |
| 10128 | <END_MODULE> |
| 10129 | <RESULT IF_PASS COUNT 1> |
| 10130 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 10131 | <END_RESULT> |
| 10132 | <RESULT IF_PASS COUNT 1> |
| 10133 | (?is)\berror: |
| 10134 | <END_RESULT> |
| 10135 | <END_TC> |
| 10136 | |
| 10137 | :exmp. |
| 10138 | |
| 10139 | .*---------------------------------------------------------------------* |
| 10140 | :h4.Allowed matching mechanisms - template subset (hexstring in function) |
| 10141 | .*---------------------------------------------------------------------* |
| 10142 | :xmp tab=0. |
| 10143 | |
| 10144 | <TC - Allowed matching mechanisms - template subset (hexstring in function)> |
| 10145 | |
| 10146 | <COMPILE> |
| 10147 | <VERDICT_LEAF PASS> |
| 10148 | <MODULE TTCN x x.ttcn> |
| 10149 | module x { |
| 10150 | |
| 10151 | const hexstring c1:= '1011'H; |
| 10152 | const hexstring c2:= '1110'H; |
| 10153 | const hexstring c3:= '1111'H; |
| 10154 | |
| 10155 | function myFunct(){ |
| 10156 | var template hexstring r:= subset (c1, c2, c3); |
| 10157 | } |
| 10158 | |
| 10159 | } |
| 10160 | <END_MODULE> |
| 10161 | <RESULT IF_PASS COUNT 1> |
| 10162 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 10163 | <END_RESULT> |
| 10164 | <RESULT IF_PASS COUNT 1> |
| 10165 | (?is)\berror: |
| 10166 | <END_RESULT> |
| 10167 | <END_TC> |
| 10168 | |
| 10169 | :exmp. |
| 10170 | |
| 10171 | .*---------------------------------------------------------------------* |
| 10172 | :h4.Allowed matching mechanisms - template subset (charstring in def.part) |
| 10173 | .*---------------------------------------------------------------------* |
| 10174 | :xmp tab=0. |
| 10175 | |
| 10176 | <TC - Allowed matching mechanisms - template subset (charstring in def.part)> |
| 10177 | |
| 10178 | <COMPILE> |
| 10179 | <VERDICT_LEAF PASS> |
| 10180 | <MODULE TTCN x x.ttcn> |
| 10181 | module x { |
| 10182 | |
| 10183 | const charstring c1:= "ogin"; |
| 10184 | const charstring c2:= "dwa"; |
| 10185 | const charstring c3:= "try"; |
| 10186 | |
| 10187 | template charstring r:= subset (c1, c2, c3); |
| 10188 | |
| 10189 | } |
| 10190 | <END_MODULE> |
| 10191 | <RESULT IF_PASS COUNT 1> |
| 10192 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 10193 | <END_RESULT> |
| 10194 | <RESULT IF_PASS COUNT 1> |
| 10195 | (?is)\berror: |
| 10196 | <END_RESULT> |
| 10197 | <END_TC> |
| 10198 | |
| 10199 | :exmp. |
| 10200 | |
| 10201 | .*---------------------------------------------------------------------* |
| 10202 | :h4.Allowed matching mechanisms - template subset (charstring in control part) |
| 10203 | .*---------------------------------------------------------------------* |
| 10204 | :xmp tab=0. |
| 10205 | |
| 10206 | <TC - Allowed matching mechanisms - template subset (charstring in control part)> |
| 10207 | |
| 10208 | <COMPILE> |
| 10209 | <VERDICT_LEAF PASS> |
| 10210 | <MODULE TTCN x x.ttcn> |
| 10211 | module x { |
| 10212 | |
| 10213 | const charstring c1:= "ogin"; |
| 10214 | const charstring c2:= "dwa"; |
| 10215 | const charstring c3:= "try"; |
| 10216 | |
| 10217 | control{ |
| 10218 | var template charstring r:= subset (c1, c2, c3); |
| 10219 | } |
| 10220 | |
| 10221 | } |
| 10222 | <END_MODULE> |
| 10223 | <RESULT IF_PASS COUNT 1> |
| 10224 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 10225 | <END_RESULT> |
| 10226 | <RESULT IF_PASS COUNT 1> |
| 10227 | (?is)\berror: |
| 10228 | <END_RESULT> |
| 10229 | <END_TC> |
| 10230 | |
| 10231 | :exmp. |
| 10232 | |
| 10233 | .*---------------------------------------------------------------------* |
| 10234 | :h4.Allowed matching mechanisms - template subset (charstring in function) |
| 10235 | .*---------------------------------------------------------------------* |
| 10236 | :xmp tab=0. |
| 10237 | |
| 10238 | <TC - Allowed matching mechanisms - template subset (charstring in function)> |
| 10239 | |
| 10240 | <COMPILE> |
| 10241 | <VERDICT_LEAF PASS> |
| 10242 | <MODULE TTCN x x.ttcn> |
| 10243 | module x { |
| 10244 | |
| 10245 | const charstring c1:= "ogin"; |
| 10246 | const charstring c2:= "dwa"; |
| 10247 | const charstring c3:= "try"; |
| 10248 | |
| 10249 | function myFunct(){ |
| 10250 | var template charstring r:= subset (c1, c2, c3); |
| 10251 | } |
| 10252 | |
| 10253 | } |
| 10254 | <END_MODULE> |
| 10255 | <RESULT IF_PASS COUNT 1> |
| 10256 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 10257 | <END_RESULT> |
| 10258 | <RESULT IF_PASS COUNT 1> |
| 10259 | (?is)\berror: |
| 10260 | <END_RESULT> |
| 10261 | <END_TC> |
| 10262 | |
| 10263 | :exmp. |
| 10264 | |
| 10265 | .*---------------------------------------------------------------------* |
| 10266 | :h4.Allowed matching mechanisms - template subset (record in def.part) |
| 10267 | .*---------------------------------------------------------------------* |
| 10268 | :xmp tab=0. |
| 10269 | |
| 10270 | <TC - Allowed matching mechanisms - template subset (record in def.part)> |
| 10271 | |
| 10272 | <COMPILE> |
| 10273 | <VERDICT_LEAF PASS> |
| 10274 | <MODULE TTCN x x.ttcn> |
| 10275 | module x { |
| 10276 | |
| 10277 | type record recT{ |
| 10278 | integer f1, |
| 10279 | float f2, |
| 10280 | charstring f3 |
| 10281 | } |
| 10282 | |
| 10283 | const recT c1:= { f1:= 1, f2:= 2.0, f3:= "a"}; |
| 10284 | const recT c2:= { f1:= 5, f2:= 7.0, f3:= "z"}; |
| 10285 | |
| 10286 | template recT r:= subset (c1, c2); |
| 10287 | |
| 10288 | } |
| 10289 | <END_MODULE> |
| 10290 | <RESULT IF_PASS COUNT 1> |
| 10291 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 10292 | <END_RESULT> |
| 10293 | <RESULT IF_PASS COUNT 1> |
| 10294 | (?is)\berror: |
| 10295 | <END_RESULT> |
| 10296 | <END_TC> |
| 10297 | |
| 10298 | :exmp. |
| 10299 | |
| 10300 | .*---------------------------------------------------------------------* |
| 10301 | :h4.Allowed matching mechanisms - template subset (record in control part) |
| 10302 | .*---------------------------------------------------------------------* |
| 10303 | :xmp tab=0. |
| 10304 | |
| 10305 | <TC - Allowed matching mechanisms - template subset (record in control part)> |
| 10306 | |
| 10307 | <COMPILE> |
| 10308 | <VERDICT_LEAF PASS> |
| 10309 | <MODULE TTCN x x.ttcn> |
| 10310 | module x { |
| 10311 | |
| 10312 | type record recT{ |
| 10313 | integer f1, |
| 10314 | float f2, |
| 10315 | charstring f3 |
| 10316 | } |
| 10317 | |
| 10318 | const recT c1:= { f1:= 1, f2:= 2.0, f3:= "a"}; |
| 10319 | const recT c2:= { f1:= 5, f2:= 7.0, f3:= "z"}; |
| 10320 | |
| 10321 | control{ |
| 10322 | var template recT r:= subset (c1, c2); |
| 10323 | } |
| 10324 | |
| 10325 | } |
| 10326 | <END_MODULE> |
| 10327 | <RESULT IF_PASS COUNT 1> |
| 10328 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 10329 | <END_RESULT> |
| 10330 | <RESULT IF_PASS COUNT 1> |
| 10331 | (?is)\berror: |
| 10332 | <END_RESULT> |
| 10333 | <END_TC> |
| 10334 | |
| 10335 | :exmp. |
| 10336 | |
| 10337 | .*---------------------------------------------------------------------* |
| 10338 | :h4.Allowed matching mechanisms - template subset (record in function) |
| 10339 | .*---------------------------------------------------------------------* |
| 10340 | :xmp tab=0. |
| 10341 | |
| 10342 | <TC - Allowed matching mechanisms - template subset (record in function)> |
| 10343 | |
| 10344 | <COMPILE> |
| 10345 | <VERDICT_LEAF PASS> |
| 10346 | <MODULE TTCN x x.ttcn> |
| 10347 | module x { |
| 10348 | |
| 10349 | type record recT{ |
| 10350 | integer f1, |
| 10351 | float f2, |
| 10352 | charstring f3 |
| 10353 | } |
| 10354 | |
| 10355 | const recT c1:= { f1:= 1, f2:= 2.0, f3:= "a"}; |
| 10356 | const recT c2:= { f1:= 5, f2:= 7.0, f3:= "z"}; |
| 10357 | |
| 10358 | function myFunct(){ |
| 10359 | var template recT r:= subset (c1, c2); |
| 10360 | } |
| 10361 | |
| 10362 | } |
| 10363 | <END_MODULE> |
| 10364 | <RESULT IF_PASS COUNT 1> |
| 10365 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 10366 | <END_RESULT> |
| 10367 | <RESULT IF_PASS COUNT 1> |
| 10368 | (?is)\berror: |
| 10369 | <END_RESULT> |
| 10370 | <END_TC> |
| 10371 | |
| 10372 | :exmp. |
| 10373 | |
| 10374 | .*---------------------------------------------------------------------* |
| 10375 | :h4.Allowed matching mechanisms - template subset (record of in def.part) |
| 10376 | .*---------------------------------------------------------------------* |
| 10377 | :xmp tab=0. |
| 10378 | |
| 10379 | <TC - Allowed matching mechanisms - template subset (record of in def.part)> |
| 10380 | |
| 10381 | <COMPILE> |
| 10382 | <VERDICT_LEAF PASS> |
| 10383 | <MODULE TTCN x x.ttcn> |
| 10384 | module x { |
| 10385 | |
| 10386 | type record of integer rofT; |
| 10387 | |
| 10388 | const rofT c1:= { 1, 2, 3 }; |
| 10389 | const rofT c2:= { 4, 5, 6 }; |
| 10390 | |
| 10391 | template rofT r:= subset (c1, c2); |
| 10392 | |
| 10393 | } |
| 10394 | <END_MODULE> |
| 10395 | <RESULT IF_PASS COUNT 1> |
| 10396 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 10397 | <END_RESULT> |
| 10398 | <RESULT IF_PASS COUNT 1> |
| 10399 | (?is)\berror: |
| 10400 | <END_RESULT> |
| 10401 | <END_TC> |
| 10402 | |
| 10403 | :exmp. |
| 10404 | |
| 10405 | .*---------------------------------------------------------------------* |
| 10406 | :h4.Allowed matching mechanisms - template subset (record of in control part) |
| 10407 | .*---------------------------------------------------------------------* |
| 10408 | :xmp tab=0. |
| 10409 | |
| 10410 | <TC - Allowed matching mechanisms - template subset (record of in control part)> |
| 10411 | |
| 10412 | <COMPILE> |
| 10413 | <VERDICT_LEAF PASS> |
| 10414 | <MODULE TTCN x x.ttcn> |
| 10415 | module x { |
| 10416 | |
| 10417 | type record of integer rofT; |
| 10418 | |
| 10419 | const rofT c1:= { 1, 2, 3 }; |
| 10420 | const rofT c2:= { 4, 5, 6 }; |
| 10421 | |
| 10422 | control{ |
| 10423 | var template rofT r:= subset (c1, c2); |
| 10424 | } |
| 10425 | |
| 10426 | } |
| 10427 | <END_MODULE> |
| 10428 | <RESULT IF_PASS COUNT 1> |
| 10429 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 10430 | <END_RESULT> |
| 10431 | <RESULT IF_PASS COUNT 1> |
| 10432 | (?is)\berror: |
| 10433 | <END_RESULT> |
| 10434 | <END_TC> |
| 10435 | |
| 10436 | :exmp. |
| 10437 | |
| 10438 | .*---------------------------------------------------------------------* |
| 10439 | :h4.Allowed matching mechanisms - template subset (record of in function) |
| 10440 | .*---------------------------------------------------------------------* |
| 10441 | :xmp tab=0. |
| 10442 | |
| 10443 | <TC - Allowed matching mechanisms - template subset (record of in function)> |
| 10444 | |
| 10445 | <COMPILE> |
| 10446 | <VERDICT_LEAF PASS> |
| 10447 | <MODULE TTCN x x.ttcn> |
| 10448 | module x { |
| 10449 | |
| 10450 | type record of integer rofT; |
| 10451 | |
| 10452 | const rofT c1:= { 1, 2, 3 }; |
| 10453 | const rofT c2:= { 4, 5, 6 }; |
| 10454 | |
| 10455 | function myFunct(){ |
| 10456 | var template rofT r:= subset (c1, c2); |
| 10457 | } |
| 10458 | |
| 10459 | } |
| 10460 | <END_MODULE> |
| 10461 | <RESULT IF_PASS COUNT 1> |
| 10462 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 10463 | <END_RESULT> |
| 10464 | <RESULT IF_PASS COUNT 1> |
| 10465 | (?is)\berror: |
| 10466 | <END_RESULT> |
| 10467 | <END_TC> |
| 10468 | |
| 10469 | :exmp. |
| 10470 | |
| 10471 | .*---------------------------------------------------------------------* |
| 10472 | :h4.Allowed matching mechanisms - template subset (set in def.part) |
| 10473 | .*---------------------------------------------------------------------* |
| 10474 | :xmp tab=0. |
| 10475 | |
| 10476 | <TC - Allowed matching mechanisms - template subset (set in def.part)> |
| 10477 | |
| 10478 | <COMPILE> |
| 10479 | <VERDICT_LEAF PASS> |
| 10480 | <MODULE TTCN x x.ttcn> |
| 10481 | module x { |
| 10482 | |
| 10483 | type set setT{ |
| 10484 | integer f1, |
| 10485 | float f2, |
| 10486 | charstring f3 |
| 10487 | } |
| 10488 | |
| 10489 | const setT c1:= { f1:= 1, f2:= 2.0, f3:= "a"}; |
| 10490 | const setT c2:= { f1:= 5, f2:= 7.0, f3:= "z"}; |
| 10491 | |
| 10492 | template setT r:= subset (c1, c2); |
| 10493 | |
| 10494 | } |
| 10495 | <END_MODULE> |
| 10496 | <RESULT IF_PASS COUNT 1> |
| 10497 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 10498 | <END_RESULT> |
| 10499 | <RESULT IF_PASS COUNT 1> |
| 10500 | (?is)\berror: |
| 10501 | <END_RESULT> |
| 10502 | <END_TC> |
| 10503 | |
| 10504 | :exmp. |
| 10505 | |
| 10506 | .*---------------------------------------------------------------------* |
| 10507 | :h4.Allowed matching mechanisms - template subset (set in control part) |
| 10508 | .*---------------------------------------------------------------------* |
| 10509 | :xmp tab=0. |
| 10510 | |
| 10511 | <TC - Allowed matching mechanisms - template subset (set in control part)> |
| 10512 | |
| 10513 | <COMPILE> |
| 10514 | <VERDICT_LEAF PASS> |
| 10515 | <MODULE TTCN x x.ttcn> |
| 10516 | module x { |
| 10517 | |
| 10518 | type set setT{ |
| 10519 | integer f1, |
| 10520 | float f2, |
| 10521 | charstring f3 |
| 10522 | } |
| 10523 | |
| 10524 | const setT c1:= { f1:= 1, f2:= 2.0, f3:= "a"}; |
| 10525 | const setT c2:= { f1:= 5, f2:= 7.0, f3:= "z"}; |
| 10526 | |
| 10527 | control{ |
| 10528 | var template setT r:= subset (c1, c2); |
| 10529 | } |
| 10530 | |
| 10531 | } |
| 10532 | <END_MODULE> |
| 10533 | <RESULT IF_PASS COUNT 1> |
| 10534 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 10535 | <END_RESULT> |
| 10536 | <RESULT IF_PASS COUNT 1> |
| 10537 | (?is)\berror: |
| 10538 | <END_RESULT> |
| 10539 | <END_TC> |
| 10540 | |
| 10541 | :exmp. |
| 10542 | |
| 10543 | .*---------------------------------------------------------------------* |
| 10544 | :h4.Allowed matching mechanisms - template subset (set in function) |
| 10545 | .*---------------------------------------------------------------------* |
| 10546 | :xmp tab=0. |
| 10547 | |
| 10548 | <TC - Allowed matching mechanisms - template subset (set in function)> |
| 10549 | |
| 10550 | <COMPILE> |
| 10551 | <VERDICT_LEAF PASS> |
| 10552 | <MODULE TTCN x x.ttcn> |
| 10553 | module x { |
| 10554 | |
| 10555 | type set setT{ |
| 10556 | integer f1, |
| 10557 | float f2, |
| 10558 | charstring f3 |
| 10559 | } |
| 10560 | |
| 10561 | const setT c1:= { f1:= 1, f2:= 2.0, f3:= "a"}; |
| 10562 | const setT c2:= { f1:= 5, f2:= 7.0, f3:= "z"}; |
| 10563 | |
| 10564 | function myFunct(){ |
| 10565 | var template setT r:= subset (c1, c2); |
| 10566 | } |
| 10567 | |
| 10568 | } |
| 10569 | <END_MODULE> |
| 10570 | <RESULT IF_PASS COUNT 1> |
| 10571 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 10572 | <END_RESULT> |
| 10573 | <RESULT IF_PASS COUNT 1> |
| 10574 | (?is)\berror: |
| 10575 | <END_RESULT> |
| 10576 | <END_TC> |
| 10577 | |
| 10578 | :exmp. |
| 10579 | |
| 10580 | .*---------------------------------------------------------------------* |
| 10581 | :h4.Allowed matching mechanisms - template subset (enumerated in def.part) |
| 10582 | .*---------------------------------------------------------------------* |
| 10583 | :xmp tab=0. |
| 10584 | |
| 10585 | <TC - Allowed matching mechanisms - template subset (enumerated in def.part)> |
| 10586 | |
| 10587 | <COMPILE> |
| 10588 | <VERDICT_LEAF PASS> |
| 10589 | <MODULE TTCN x x.ttcn> |
| 10590 | module x { |
| 10591 | |
| 10592 | type enumerated enumT { ONE(1), TWO(2), THREE(3) }; |
| 10593 | |
| 10594 | const enumT c1:= ONE; |
| 10595 | const enumT c2:= TWO; |
| 10596 | |
| 10597 | template enumT r:= subset (c1, c2); |
| 10598 | |
| 10599 | } |
| 10600 | <END_MODULE> |
| 10601 | <RESULT IF_PASS COUNT 1> |
| 10602 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 10603 | <END_RESULT> |
| 10604 | <RESULT IF_PASS COUNT 1> |
| 10605 | (?is)\berror: |
| 10606 | <END_RESULT> |
| 10607 | <END_TC> |
| 10608 | |
| 10609 | :exmp. |
| 10610 | |
| 10611 | .*---------------------------------------------------------------------* |
| 10612 | :h4.Allowed matching mechanisms - template subset (enumerated in control part) |
| 10613 | .*---------------------------------------------------------------------* |
| 10614 | :xmp tab=0. |
| 10615 | |
| 10616 | <TC - Allowed matching mechanisms - template subset (enumerated in control part)> |
| 10617 | |
| 10618 | <COMPILE> |
| 10619 | <VERDICT_LEAF PASS> |
| 10620 | <MODULE TTCN x x.ttcn> |
| 10621 | module x { |
| 10622 | |
| 10623 | type enumerated enumT { ONE(1), TWO(2), THREE(3) }; |
| 10624 | |
| 10625 | const enumT c1:= ONE; |
| 10626 | const enumT c2:= TWO; |
| 10627 | |
| 10628 | control{ |
| 10629 | var template enumT r:= subset (c1, c2); |
| 10630 | } |
| 10631 | |
| 10632 | } |
| 10633 | <END_MODULE> |
| 10634 | <RESULT IF_PASS COUNT 1> |
| 10635 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 10636 | <END_RESULT> |
| 10637 | <RESULT IF_PASS COUNT 1> |
| 10638 | (?is)\berror: |
| 10639 | <END_RESULT> |
| 10640 | <END_TC> |
| 10641 | |
| 10642 | :exmp. |
| 10643 | |
| 10644 | .*---------------------------------------------------------------------* |
| 10645 | :h4.Allowed matching mechanisms - template subset (enumerated in function) |
| 10646 | .*---------------------------------------------------------------------* |
| 10647 | :xmp tab=0. |
| 10648 | |
| 10649 | <TC - Allowed matching mechanisms - template subset (enumerated in function)> |
| 10650 | |
| 10651 | <COMPILE> |
| 10652 | <VERDICT_LEAF PASS> |
| 10653 | <MODULE TTCN x x.ttcn> |
| 10654 | module x { |
| 10655 | |
| 10656 | type enumerated enumT { ONE(1), TWO(2), THREE(3) }; |
| 10657 | |
| 10658 | const enumT c1:= ONE; |
| 10659 | const enumT c2:= TWO; |
| 10660 | |
| 10661 | function myFunct(){ |
| 10662 | var template enumT r:= subset (c1, c2); |
| 10663 | } |
| 10664 | |
| 10665 | } |
| 10666 | <END_MODULE> |
| 10667 | <RESULT IF_PASS COUNT 1> |
| 10668 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 10669 | <END_RESULT> |
| 10670 | <RESULT IF_PASS COUNT 1> |
| 10671 | (?is)\berror: |
| 10672 | <END_RESULT> |
| 10673 | <END_TC> |
| 10674 | |
| 10675 | :exmp. |
| 10676 | |
| 10677 | .*---------------------------------------------------------------------* |
| 10678 | :h4.Allowed matching mechanisms - template subset (union in def.part) |
| 10679 | .*---------------------------------------------------------------------* |
| 10680 | :xmp tab=0. |
| 10681 | |
| 10682 | <TC - Allowed matching mechanisms - template subset (union in def.part)> |
| 10683 | |
| 10684 | <COMPILE> |
| 10685 | <VERDICT_LEAF PASS> |
| 10686 | <MODULE TTCN x x.ttcn> |
| 10687 | module x { |
| 10688 | |
| 10689 | type union uniT{ |
| 10690 | integer f1, |
| 10691 | float f2, |
| 10692 | charstring f3 |
| 10693 | } |
| 10694 | |
| 10695 | const uniT c1:= { f1:= 1 }; |
| 10696 | const uniT c2:= { f2:= 7.0 }; |
| 10697 | |
| 10698 | template uniT r:= subset (c1, c2); |
| 10699 | |
| 10700 | } |
| 10701 | <END_MODULE> |
| 10702 | <RESULT IF_PASS COUNT 1> |
| 10703 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 10704 | <END_RESULT> |
| 10705 | <RESULT IF_PASS COUNT 1> |
| 10706 | (?is)\berror: |
| 10707 | <END_RESULT> |
| 10708 | <END_TC> |
| 10709 | |
| 10710 | :exmp. |
| 10711 | |
| 10712 | .*---------------------------------------------------------------------* |
| 10713 | :h4.Allowed matching mechanisms - template subset (union in control part) |
| 10714 | .*---------------------------------------------------------------------* |
| 10715 | :xmp tab=0. |
| 10716 | |
| 10717 | <TC - Allowed matching mechanisms - template subset (union in control part)> |
| 10718 | |
| 10719 | <COMPILE> |
| 10720 | <VERDICT_LEAF PASS> |
| 10721 | <MODULE TTCN x x.ttcn> |
| 10722 | module x { |
| 10723 | |
| 10724 | type union uniT{ |
| 10725 | integer f1, |
| 10726 | float f2, |
| 10727 | charstring f3 |
| 10728 | } |
| 10729 | |
| 10730 | const uniT c1:= { f1:= 1 }; |
| 10731 | const uniT c2:= { f2:= 7.0 }; |
| 10732 | |
| 10733 | control{ |
| 10734 | var template uniT r:= subset (c1, c2); |
| 10735 | } |
| 10736 | |
| 10737 | } |
| 10738 | <END_MODULE> |
| 10739 | <RESULT IF_PASS COUNT 1> |
| 10740 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 10741 | <END_RESULT> |
| 10742 | <RESULT IF_PASS COUNT 1> |
| 10743 | (?is)\berror: |
| 10744 | <END_RESULT> |
| 10745 | <END_TC> |
| 10746 | |
| 10747 | :exmp. |
| 10748 | |
| 10749 | .*---------------------------------------------------------------------* |
| 10750 | :h4.Allowed matching mechanisms - template subset (union in function) |
| 10751 | .*---------------------------------------------------------------------* |
| 10752 | :xmp tab=0. |
| 10753 | |
| 10754 | <TC - Allowed matching mechanisms - template subset (union in function)> |
| 10755 | |
| 10756 | <COMPILE> |
| 10757 | <VERDICT_LEAF PASS> |
| 10758 | <MODULE TTCN x x.ttcn> |
| 10759 | module x { |
| 10760 | |
| 10761 | type union uniT{ |
| 10762 | integer f1, |
| 10763 | float f2, |
| 10764 | charstring f3 |
| 10765 | } |
| 10766 | |
| 10767 | const uniT c1:= { f1:= 1 }; |
| 10768 | const uniT c2:= { f2:= 7.0 }; |
| 10769 | |
| 10770 | function myFunct(){ |
| 10771 | var template uniT r:= subset (c1, c2); |
| 10772 | } |
| 10773 | |
| 10774 | } |
| 10775 | <END_MODULE> |
| 10776 | <RESULT IF_PASS COUNT 1> |
| 10777 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 10778 | <END_RESULT> |
| 10779 | <RESULT IF_PASS COUNT 1> |
| 10780 | (?is)\berror: |
| 10781 | <END_RESULT> |
| 10782 | <END_TC> |
| 10783 | |
| 10784 | :exmp. |
| 10785 | |
| 10786 | .*---------------------------------------------------------------------* |
| 10787 | :h4.Allowed matching mechanisms - template subset (array in def. part) |
| 10788 | .*---------------------------------------------------------------------* |
| 10789 | :xmp tab=0. |
| 10790 | |
| 10791 | <TC - Allowed matching mechanisms - template subset (array in def.part)> |
| 10792 | |
| 10793 | <COMPILE> |
| 10794 | <VERDICT_LEAF PASS> |
| 10795 | <MODULE TTCN x x.ttcn> |
| 10796 | module x { |
| 10797 | |
| 10798 | type integer myint[1]; |
| 10799 | |
| 10800 | const myint c1:={1}; |
| 10801 | const myint c2 :={3}; |
| 10802 | |
| 10803 | template myint r := subset(c1,c2); |
| 10804 | |
| 10805 | } |
| 10806 | <END_MODULE> |
| 10807 | <RESULT IF_PASS COUNT 1> |
| 10808 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 10809 | <END_RESULT> |
| 10810 | <RESULT IF_PASS COUNT 1> |
| 10811 | (?is)\berror: |
| 10812 | <END_RESULT> |
| 10813 | <END_TC> |
| 10814 | |
| 10815 | :exmp. |
| 10816 | |
| 10817 | .*---------------------------------------------------------------------* |
| 10818 | :h4.Allowed matching mechanisms - template subset (array in control part) |
| 10819 | .*---------------------------------------------------------------------* |
| 10820 | :xmp tab=0. |
| 10821 | |
| 10822 | <TC - Allowed matching mechanisms - template subset (array in control part)> |
| 10823 | |
| 10824 | <COMPILE> |
| 10825 | <VERDICT_LEAF PASS> |
| 10826 | <MODULE TTCN x x.ttcn> |
| 10827 | module x { |
| 10828 | |
| 10829 | type integer myint[1]; |
| 10830 | |
| 10831 | const myint c1:={1}; |
| 10832 | const myint c2 :={3}; |
| 10833 | |
| 10834 | control{ |
| 10835 | template myint r := subset(c1,c2); |
| 10836 | } |
| 10837 | } |
| 10838 | <END_MODULE> |
| 10839 | <RESULT IF_PASS COUNT 1> |
| 10840 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 10841 | <END_RESULT> |
| 10842 | <RESULT IF_PASS COUNT 1> |
| 10843 | (?is)\berror: |
| 10844 | <END_RESULT> |
| 10845 | <END_TC> |
| 10846 | |
| 10847 | :exmp. |
| 10848 | |
| 10849 | .*---------------------------------------------------------------------* |
| 10850 | :h4.Allowed matching mechanisms - template subset (array in function) |
| 10851 | .*---------------------------------------------------------------------* |
| 10852 | :xmp tab=0. |
| 10853 | |
| 10854 | <TC - Allowed matching mechanisms - template subset (array in function)> |
| 10855 | |
| 10856 | <COMPILE> |
| 10857 | <VERDICT_LEAF PASS> |
| 10858 | <MODULE TTCN x x.ttcn> |
| 10859 | module x { |
| 10860 | |
| 10861 | type integer myint[1]; |
| 10862 | |
| 10863 | const myint c1:={1}; |
| 10864 | const myint c2 :={3}; |
| 10865 | |
| 10866 | function myFunct(){ |
| 10867 | template myint r := subset(c1,c2); |
| 10868 | } |
| 10869 | } |
| 10870 | <END_MODULE> |
| 10871 | <RESULT IF_PASS COUNT 1> |
| 10872 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 10873 | <END_RESULT> |
| 10874 | <RESULT IF_PASS COUNT 1> |
| 10875 | (?is)\berror: |
| 10876 | <END_RESULT> |
| 10877 | <END_TC> |
| 10878 | |
| 10879 | :exmp. |
| 10880 | |
| 10881 | .*---------------------------------------------------------------------* |
| 10882 | :h4.Allowed matching mechanisms - template length-restriction (boolean in def.part) |
| 10883 | .*---------------------------------------------------------------------* |
| 10884 | :xmp tab=0. |
| 10885 | |
| 10886 | <TC - Allowed matching mechanisms - template length-restriction (boolean in def.part)> |
| 10887 | |
| 10888 | <COMPILE> |
| 10889 | <VERDICT_LEAF PASS> |
| 10890 | <MODULE TTCN x x.ttcn> |
| 10891 | module x { |
| 10892 | |
| 10893 | template boolean r:= ? length(1); |
| 10894 | |
| 10895 | } |
| 10896 | <END_MODULE> |
| 10897 | <RESULT IF_PASS COUNT 1> |
| 10898 | (?im)error.+?Length.+?restriction.+?cannot.+?used |
| 10899 | <END_RESULT> |
| 10900 | <RESULT IF_PASS COUNT 1> |
| 10901 | (?is)\berror: |
| 10902 | <END_RESULT> |
| 10903 | <END_TC> |
| 10904 | |
| 10905 | :exmp. |
| 10906 | |
| 10907 | .*---------------------------------------------------------------------* |
| 10908 | :h4.Allowed matching mechanisms - template length-restriction (boolean in control part) |
| 10909 | .*---------------------------------------------------------------------* |
| 10910 | :xmp tab=0. |
| 10911 | |
| 10912 | <TC - Allowed matching mechanisms - template length-restriction (boolean in control part)> |
| 10913 | |
| 10914 | <COMPILE> |
| 10915 | <VERDICT_LEAF PASS> |
| 10916 | <MODULE TTCN x x.ttcn> |
| 10917 | module x { |
| 10918 | |
| 10919 | control{ |
| 10920 | var template boolean r:= ? length(1); |
| 10921 | } |
| 10922 | |
| 10923 | } |
| 10924 | <END_MODULE> |
| 10925 | <RESULT IF_PASS COUNT 1> |
| 10926 | (?im)error.+?Length.+?restriction.+?cannot.+?used |
| 10927 | <END_RESULT> |
| 10928 | <RESULT IF_PASS COUNT 1> |
| 10929 | (?is)\berror: |
| 10930 | <END_RESULT> |
| 10931 | <END_TC> |
| 10932 | |
| 10933 | :exmp. |
| 10934 | |
| 10935 | .*---------------------------------------------------------------------* |
| 10936 | :h4.Allowed matching mechanisms - template length-restriction (boolean in function) |
| 10937 | .*---------------------------------------------------------------------* |
| 10938 | :xmp tab=0. |
| 10939 | |
| 10940 | <TC - Allowed matching mechanisms - template length-restriction (boolean in function)> |
| 10941 | |
| 10942 | <COMPILE> |
| 10943 | <VERDICT_LEAF PASS> |
| 10944 | <MODULE TTCN x x.ttcn> |
| 10945 | module x { |
| 10946 | |
| 10947 | function myFunct(){ |
| 10948 | var template boolean r:= ? length(1); |
| 10949 | } |
| 10950 | |
| 10951 | } |
| 10952 | <END_MODULE> |
| 10953 | <RESULT IF_PASS COUNT 1> |
| 10954 | (?im)error.+?Length.+?restriction.+?cannot.+?used |
| 10955 | <END_RESULT> |
| 10956 | <RESULT IF_PASS COUNT 1> |
| 10957 | (?is)\berror: |
| 10958 | <END_RESULT> |
| 10959 | <END_TC> |
| 10960 | |
| 10961 | :exmp. |
| 10962 | |
| 10963 | .*---------------------------------------------------------------------* |
| 10964 | :h4.Allowed matching mechanisms - template length-restriction (integer in def.part) |
| 10965 | .*---------------------------------------------------------------------* |
| 10966 | :xmp tab=0. |
| 10967 | |
| 10968 | <TC - Allowed matching mechanisms - template length-restriction (integer in def.part)> |
| 10969 | |
| 10970 | <COMPILE> |
| 10971 | <VERDICT_LEAF PASS> |
| 10972 | <MODULE TTCN x x.ttcn> |
| 10973 | module x { |
| 10974 | |
| 10975 | template integer r:= ? length(1); |
| 10976 | |
| 10977 | } |
| 10978 | <END_MODULE> |
| 10979 | <RESULT IF_PASS COUNT 1> |
| 10980 | (?im)error.+?Length.+?restriction.+?cannot.+?used |
| 10981 | <END_RESULT> |
| 10982 | <RESULT IF_PASS COUNT 1> |
| 10983 | (?is)\berror: |
| 10984 | <END_RESULT> |
| 10985 | <END_TC> |
| 10986 | |
| 10987 | :exmp. |
| 10988 | |
| 10989 | .*---------------------------------------------------------------------* |
| 10990 | :h4.Allowed matching mechanisms - template length-restriction (integer in control part) |
| 10991 | .*---------------------------------------------------------------------* |
| 10992 | :xmp tab=0. |
| 10993 | |
| 10994 | <TC - Allowed matching mechanisms - template length-restriction (integer in control part)> |
| 10995 | |
| 10996 | <COMPILE> |
| 10997 | <VERDICT_LEAF PASS> |
| 10998 | <MODULE TTCN x x.ttcn> |
| 10999 | module x { |
| 11000 | |
| 11001 | control{ |
| 11002 | var template integer r:= ? length(1); |
| 11003 | } |
| 11004 | |
| 11005 | } |
| 11006 | <END_MODULE> |
| 11007 | <RESULT IF_PASS COUNT 1> |
| 11008 | (?im)error.+?Length.+?restriction.+?cannot.+?used |
| 11009 | <END_RESULT> |
| 11010 | <RESULT IF_PASS COUNT 1> |
| 11011 | (?is)\berror: |
| 11012 | <END_RESULT> |
| 11013 | <END_TC> |
| 11014 | |
| 11015 | :exmp. |
| 11016 | |
| 11017 | .*---------------------------------------------------------------------* |
| 11018 | :h4.Allowed matching mechanisms - template length-restriction (integer in function) |
| 11019 | .*---------------------------------------------------------------------* |
| 11020 | :xmp tab=0. |
| 11021 | |
| 11022 | <TC - Allowed matching mechanisms - template length-restriction (integer in function)> |
| 11023 | |
| 11024 | <COMPILE> |
| 11025 | <VERDICT_LEAF PASS> |
| 11026 | <MODULE TTCN x x.ttcn> |
| 11027 | module x { |
| 11028 | |
| 11029 | function myFunct(){ |
| 11030 | var template integer r:= ? length(1); |
| 11031 | } |
| 11032 | |
| 11033 | } |
| 11034 | <END_MODULE> |
| 11035 | <RESULT IF_PASS COUNT 1> |
| 11036 | (?im)error.+?Length.+?restriction.+?cannot.+?used |
| 11037 | <END_RESULT> |
| 11038 | <RESULT IF_PASS COUNT 1> |
| 11039 | (?is)\berror: |
| 11040 | <END_RESULT> |
| 11041 | <END_TC> |
| 11042 | |
| 11043 | :exmp. |
| 11044 | |
| 11045 | .*---------------------------------------------------------------------* |
| 11046 | :h4.Allowed matching mechanisms - template length-restriction (float in def.part) |
| 11047 | .*---------------------------------------------------------------------* |
| 11048 | :xmp tab=0. |
| 11049 | |
| 11050 | <TC - Allowed matching mechanisms - template length-restriction (float in def.part)> |
| 11051 | |
| 11052 | <COMPILE> |
| 11053 | <VERDICT_LEAF PASS> |
| 11054 | <MODULE TTCN x x.ttcn> |
| 11055 | module x { |
| 11056 | |
| 11057 | template float r:= ? length(1); |
| 11058 | |
| 11059 | } |
| 11060 | <END_MODULE> |
| 11061 | <RESULT IF_PASS COUNT 1> |
| 11062 | (?im)error.+?Length.+?restriction.+?cannot.+?used |
| 11063 | <END_RESULT> |
| 11064 | <RESULT IF_PASS COUNT 1> |
| 11065 | (?is)\berror: |
| 11066 | <END_RESULT> |
| 11067 | <END_TC> |
| 11068 | |
| 11069 | :exmp. |
| 11070 | |
| 11071 | .*---------------------------------------------------------------------* |
| 11072 | :h4.Allowed matching mechanisms - template length-restriction (float in control part) |
| 11073 | .*---------------------------------------------------------------------* |
| 11074 | :xmp tab=0. |
| 11075 | |
| 11076 | <TC - Allowed matching mechanisms - template length-restriction (float in control part)> |
| 11077 | |
| 11078 | <COMPILE> |
| 11079 | <VERDICT_LEAF PASS> |
| 11080 | <MODULE TTCN x x.ttcn> |
| 11081 | module x { |
| 11082 | |
| 11083 | control{ |
| 11084 | var template float r:= ? length(1); |
| 11085 | } |
| 11086 | |
| 11087 | } |
| 11088 | <END_MODULE> |
| 11089 | <RESULT IF_PASS COUNT 1> |
| 11090 | (?im)error.+?Length.+?restriction.+?cannot.+?used |
| 11091 | <END_RESULT> |
| 11092 | <RESULT IF_PASS COUNT 1> |
| 11093 | (?is)\berror: |
| 11094 | <END_RESULT> |
| 11095 | <END_TC> |
| 11096 | |
| 11097 | :exmp. |
| 11098 | |
| 11099 | .*---------------------------------------------------------------------* |
| 11100 | :h4.Allowed matching mechanisms - template length-restriction (float in function) |
| 11101 | .*---------------------------------------------------------------------* |
| 11102 | :xmp tab=0. |
| 11103 | |
| 11104 | <TC - Allowed matching mechanisms - template length-restriction (float in function)> |
| 11105 | |
| 11106 | <COMPILE> |
| 11107 | <VERDICT_LEAF PASS> |
| 11108 | <MODULE TTCN x x.ttcn> |
| 11109 | module x { |
| 11110 | |
| 11111 | function myFunct(){ |
| 11112 | var template float r:= ? length(1); |
| 11113 | } |
| 11114 | |
| 11115 | } |
| 11116 | <END_MODULE> |
| 11117 | <RESULT IF_PASS COUNT 1> |
| 11118 | (?im)error.+?Length.+?restriction.+?cannot.+?used |
| 11119 | <END_RESULT> |
| 11120 | <RESULT IF_PASS COUNT 1> |
| 11121 | (?is)\berror: |
| 11122 | <END_RESULT> |
| 11123 | <END_TC> |
| 11124 | |
| 11125 | :exmp. |
| 11126 | |
| 11127 | .*---------------------------------------------------------------------* |
| 11128 | :h4.Allowed matching mechanisms - template length-restriction (record in def.part) |
| 11129 | .*---------------------------------------------------------------------* |
| 11130 | :xmp tab=0. |
| 11131 | |
| 11132 | <TC - Allowed matching mechanisms - template length-restriction (record in def.part)> |
| 11133 | |
| 11134 | <COMPILE> |
| 11135 | <VERDICT_LEAF PASS> |
| 11136 | <MODULE TTCN x x.ttcn> |
| 11137 | module x { |
| 11138 | |
| 11139 | type record recT{ |
| 11140 | integer f1, |
| 11141 | float f2, |
| 11142 | charstring f3 |
| 11143 | } |
| 11144 | |
| 11145 | template recT r:= ? length(1); |
| 11146 | |
| 11147 | } |
| 11148 | <END_MODULE> |
| 11149 | <RESULT IF_PASS COUNT 1> |
| 11150 | (?im)error.+?Length.+?restriction.+?cannot.+?used |
| 11151 | <END_RESULT> |
| 11152 | <RESULT IF_PASS COUNT 1> |
| 11153 | (?is)\berror: |
| 11154 | <END_RESULT> |
| 11155 | <END_TC> |
| 11156 | |
| 11157 | :exmp. |
| 11158 | |
| 11159 | .*---------------------------------------------------------------------* |
| 11160 | :h4.Allowed matching mechanisms - template length-restriction (record in control part) |
| 11161 | .*---------------------------------------------------------------------* |
| 11162 | :xmp tab=0. |
| 11163 | |
| 11164 | <TC - Allowed matching mechanisms - template length-restriction (record in control part)> |
| 11165 | |
| 11166 | <COMPILE> |
| 11167 | <VERDICT_LEAF PASS> |
| 11168 | <MODULE TTCN x x.ttcn> |
| 11169 | module x { |
| 11170 | |
| 11171 | type record recT{ |
| 11172 | integer f1, |
| 11173 | float f2, |
| 11174 | charstring f3 |
| 11175 | } |
| 11176 | |
| 11177 | control{ |
| 11178 | var template recT r:= ? length(1); |
| 11179 | } |
| 11180 | |
| 11181 | } |
| 11182 | <END_MODULE> |
| 11183 | <RESULT IF_PASS COUNT 1> |
| 11184 | (?im)error.+?Length.+?restriction.+?cannot.+?used |
| 11185 | <END_RESULT> |
| 11186 | <RESULT IF_PASS COUNT 1> |
| 11187 | (?is)\berror: |
| 11188 | <END_RESULT> |
| 11189 | <END_TC> |
| 11190 | |
| 11191 | :exmp. |
| 11192 | |
| 11193 | .*---------------------------------------------------------------------* |
| 11194 | :h4.Allowed matching mechanisms - template length-restriction (record in function) |
| 11195 | .*---------------------------------------------------------------------* |
| 11196 | :xmp tab=0. |
| 11197 | |
| 11198 | <TC - Allowed matching mechanisms - template length-restriction (record in function)> |
| 11199 | |
| 11200 | <COMPILE> |
| 11201 | <VERDICT_LEAF PASS> |
| 11202 | <MODULE TTCN x x.ttcn> |
| 11203 | module x { |
| 11204 | |
| 11205 | type record recT{ |
| 11206 | integer f1, |
| 11207 | float f2, |
| 11208 | charstring f3 |
| 11209 | } |
| 11210 | |
| 11211 | function myFunct(){ |
| 11212 | var template recT r:= ? length(1); |
| 11213 | } |
| 11214 | |
| 11215 | } |
| 11216 | <END_MODULE> |
| 11217 | <RESULT IF_PASS COUNT 1> |
| 11218 | (?im)error.+?Length.+?restriction.+?cannot.+?used |
| 11219 | <END_RESULT> |
| 11220 | <RESULT IF_PASS COUNT 1> |
| 11221 | (?is)\berror: |
| 11222 | <END_RESULT> |
| 11223 | <END_TC> |
| 11224 | |
| 11225 | :exmp. |
| 11226 | |
| 11227 | .*---------------------------------------------------------------------* |
| 11228 | :h4.Allowed matching mechanisms - template length-restriction (set in def.part) |
| 11229 | .*---------------------------------------------------------------------* |
| 11230 | :xmp tab=0. |
| 11231 | |
| 11232 | <TC - Allowed matching mechanisms - template length-restriction (set in def.part)> |
| 11233 | |
| 11234 | <COMPILE> |
| 11235 | <VERDICT_LEAF PASS> |
| 11236 | <MODULE TTCN x x.ttcn> |
| 11237 | module x { |
| 11238 | |
| 11239 | type set setT{ |
| 11240 | integer f1, |
| 11241 | float f2, |
| 11242 | charstring f3 |
| 11243 | } |
| 11244 | |
| 11245 | template setT r:= ? length(1); |
| 11246 | |
| 11247 | } |
| 11248 | <END_MODULE> |
| 11249 | <RESULT IF_PASS COUNT 1> |
| 11250 | (?im)error.+?Length.+?restriction.+?cannot.+?used |
| 11251 | <END_RESULT> |
| 11252 | <RESULT IF_PASS COUNT 1> |
| 11253 | (?is)\berror: |
| 11254 | <END_RESULT> |
| 11255 | <END_TC> |
| 11256 | |
| 11257 | :exmp. |
| 11258 | |
| 11259 | .*---------------------------------------------------------------------* |
| 11260 | :h4.Allowed matching mechanisms - template length-restriction (set in control part) |
| 11261 | .*---------------------------------------------------------------------* |
| 11262 | :xmp tab=0. |
| 11263 | |
| 11264 | <TC - Allowed matching mechanisms - template length-restriction (set in control part)> |
| 11265 | |
| 11266 | <COMPILE> |
| 11267 | <VERDICT_LEAF PASS> |
| 11268 | <MODULE TTCN x x.ttcn> |
| 11269 | module x { |
| 11270 | |
| 11271 | type set setT{ |
| 11272 | integer f1, |
| 11273 | float f2, |
| 11274 | charstring f3 |
| 11275 | } |
| 11276 | |
| 11277 | control{ |
| 11278 | var template setT r:= ? length(1); |
| 11279 | } |
| 11280 | |
| 11281 | } |
| 11282 | <END_MODULE> |
| 11283 | <RESULT IF_PASS COUNT 1> |
| 11284 | (?im)error.+?Length.+?restriction.+?cannot.+?used |
| 11285 | <END_RESULT> |
| 11286 | <RESULT IF_PASS COUNT 1> |
| 11287 | (?is)\berror: |
| 11288 | <END_RESULT> |
| 11289 | <END_TC> |
| 11290 | |
| 11291 | :exmp. |
| 11292 | |
| 11293 | .*---------------------------------------------------------------------* |
| 11294 | :h4.Allowed matching mechanisms - template length-restriction (set in function) |
| 11295 | .*---------------------------------------------------------------------* |
| 11296 | :xmp tab=0. |
| 11297 | |
| 11298 | <TC - Allowed matching mechanisms - template length-restriction (set in function)> |
| 11299 | |
| 11300 | <COMPILE> |
| 11301 | <VERDICT_LEAF PASS> |
| 11302 | <MODULE TTCN x x.ttcn> |
| 11303 | module x { |
| 11304 | |
| 11305 | type set setT{ |
| 11306 | integer f1, |
| 11307 | float f2, |
| 11308 | charstring f3 |
| 11309 | } |
| 11310 | |
| 11311 | function myFunct(){ |
| 11312 | var template setT r:= ? length(1); |
| 11313 | } |
| 11314 | |
| 11315 | } |
| 11316 | <END_MODULE> |
| 11317 | <RESULT IF_PASS COUNT 1> |
| 11318 | (?im)error.+?Length.+?restriction.+?cannot.+?used |
| 11319 | <END_RESULT> |
| 11320 | <RESULT IF_PASS COUNT 1> |
| 11321 | (?is)\berror: |
| 11322 | <END_RESULT> |
| 11323 | <END_TC> |
| 11324 | |
| 11325 | :exmp. |
| 11326 | |
| 11327 | .*---------------------------------------------------------------------* |
| 11328 | :h4.Allowed matching mechanisms - template length-restriction (enumerated in def.part) |
| 11329 | .*---------------------------------------------------------------------* |
| 11330 | :xmp tab=0. |
| 11331 | |
| 11332 | <TC - Allowed matching mechanisms - template length-restriction (enumerated in def.part)> |
| 11333 | |
| 11334 | <COMPILE> |
| 11335 | <VERDICT_LEAF PASS> |
| 11336 | <MODULE TTCN x x.ttcn> |
| 11337 | module x { |
| 11338 | |
| 11339 | type enumerated enumT { ONE(1), TWO(2), THREE(3) }; |
| 11340 | |
| 11341 | template enumT r:= ? length(1); |
| 11342 | |
| 11343 | } |
| 11344 | <END_MODULE> |
| 11345 | <RESULT IF_PASS COUNT 1> |
| 11346 | (?im)error.+?Length.+?restriction.+?cannot.+?used |
| 11347 | <END_RESULT> |
| 11348 | <RESULT IF_PASS COUNT 1> |
| 11349 | (?is)\berror: |
| 11350 | <END_RESULT> |
| 11351 | <END_TC> |
| 11352 | |
| 11353 | :exmp. |
| 11354 | |
| 11355 | .*---------------------------------------------------------------------* |
| 11356 | :h4.Allowed matching mechanisms - template length-restriction (enumerated in control part) |
| 11357 | .*---------------------------------------------------------------------* |
| 11358 | :xmp tab=0. |
| 11359 | |
| 11360 | <TC - Allowed matching mechanisms - template length-restriction (enumerated in control part)> |
| 11361 | |
| 11362 | <COMPILE> |
| 11363 | <VERDICT_LEAF PASS> |
| 11364 | <MODULE TTCN x x.ttcn> |
| 11365 | module x { |
| 11366 | |
| 11367 | type enumerated enumT { ONE(1), TWO(2), THREE(3) }; |
| 11368 | |
| 11369 | control{ |
| 11370 | var template enumT r:= ? length(1); |
| 11371 | } |
| 11372 | |
| 11373 | } |
| 11374 | <END_MODULE> |
| 11375 | <RESULT IF_PASS COUNT 1> |
| 11376 | (?im)error.+?Length.+?restriction.+?cannot.+?used |
| 11377 | <END_RESULT> |
| 11378 | <RESULT IF_PASS COUNT 1> |
| 11379 | (?is)\berror: |
| 11380 | <END_RESULT> |
| 11381 | <END_TC> |
| 11382 | |
| 11383 | :exmp. |
| 11384 | |
| 11385 | .*---------------------------------------------------------------------* |
| 11386 | :h4.Allowed matching mechanisms - template length-restriction (enumerated in function) |
| 11387 | .*---------------------------------------------------------------------* |
| 11388 | :xmp tab=0. |
| 11389 | |
| 11390 | <TC - Allowed matching mechanisms - template length-restriction (enumerated in function)> |
| 11391 | |
| 11392 | <COMPILE> |
| 11393 | <VERDICT_LEAF PASS> |
| 11394 | <MODULE TTCN x x.ttcn> |
| 11395 | module x { |
| 11396 | |
| 11397 | type enumerated enumT { ONE(1), TWO(2), THREE(3) }; |
| 11398 | |
| 11399 | function myFunct(){ |
| 11400 | var template enumT r:= ? length(1); |
| 11401 | } |
| 11402 | |
| 11403 | } |
| 11404 | <END_MODULE> |
| 11405 | <RESULT IF_PASS COUNT 1> |
| 11406 | (?im)error.+?Length.+?restriction.+?cannot.+?used |
| 11407 | <END_RESULT> |
| 11408 | <RESULT IF_PASS COUNT 1> |
| 11409 | (?is)\berror: |
| 11410 | <END_RESULT> |
| 11411 | <END_TC> |
| 11412 | |
| 11413 | :exmp. |
| 11414 | |
| 11415 | .*---------------------------------------------------------------------* |
| 11416 | :h4.Allowed matching mechanisms - template length-restriction (union in def.part) |
| 11417 | .*---------------------------------------------------------------------* |
| 11418 | :xmp tab=0. |
| 11419 | |
| 11420 | <TC - Allowed matching mechanisms - template length-restriction (union in def.part)> |
| 11421 | |
| 11422 | <COMPILE> |
| 11423 | <VERDICT_LEAF PASS> |
| 11424 | <MODULE TTCN x x.ttcn> |
| 11425 | module x { |
| 11426 | |
| 11427 | type union uniT{ |
| 11428 | integer f1, |
| 11429 | float f2, |
| 11430 | charstring f3 |
| 11431 | } |
| 11432 | |
| 11433 | template uniT r:= ? length(1); |
| 11434 | |
| 11435 | } |
| 11436 | <END_MODULE> |
| 11437 | <RESULT IF_PASS COUNT 1> |
| 11438 | (?im)error.+?Length.+?restriction.+?cannot.+?used |
| 11439 | <END_RESULT> |
| 11440 | <RESULT IF_PASS COUNT 1> |
| 11441 | (?is)\berror: |
| 11442 | <END_RESULT> |
| 11443 | <END_TC> |
| 11444 | |
| 11445 | :exmp. |
| 11446 | |
| 11447 | .*---------------------------------------------------------------------* |
| 11448 | :h4.Allowed matching mechanisms - template length-restriction (union in control part) |
| 11449 | .*---------------------------------------------------------------------* |
| 11450 | :xmp tab=0. |
| 11451 | |
| 11452 | <TC - Allowed matching mechanisms - template length-restriction (union in control part)> |
| 11453 | |
| 11454 | <COMPILE> |
| 11455 | <VERDICT_LEAF PASS> |
| 11456 | <MODULE TTCN x x.ttcn> |
| 11457 | module x { |
| 11458 | |
| 11459 | type union uniT{ |
| 11460 | integer f1, |
| 11461 | float f2, |
| 11462 | charstring f3 |
| 11463 | } |
| 11464 | |
| 11465 | control{ |
| 11466 | var template uniT r:= ? length(1); |
| 11467 | } |
| 11468 | |
| 11469 | } |
| 11470 | <END_MODULE> |
| 11471 | <RESULT IF_PASS COUNT 1> |
| 11472 | (?im)error.+?Length.+?restriction.+?cannot.+?used |
| 11473 | <END_RESULT> |
| 11474 | <RESULT IF_PASS COUNT 1> |
| 11475 | (?is)\berror: |
| 11476 | <END_RESULT> |
| 11477 | <END_TC> |
| 11478 | |
| 11479 | :exmp. |
| 11480 | |
| 11481 | .*---------------------------------------------------------------------* |
| 11482 | :h4.Allowed matching mechanisms - template length-restriction (union in function) |
| 11483 | .*---------------------------------------------------------------------* |
| 11484 | :xmp tab=0. |
| 11485 | |
| 11486 | <TC - Allowed matching mechanisms - template length-restriction (union in function)> |
| 11487 | |
| 11488 | <COMPILE> |
| 11489 | <VERDICT_LEAF PASS> |
| 11490 | <MODULE TTCN x x.ttcn> |
| 11491 | module x { |
| 11492 | |
| 11493 | type union uniT{ |
| 11494 | integer f1, |
| 11495 | float f2, |
| 11496 | charstring f3 |
| 11497 | } |
| 11498 | |
| 11499 | function myFunct(){ |
| 11500 | var template uniT r:= ? length(1); |
| 11501 | } |
| 11502 | |
| 11503 | } |
| 11504 | <END_MODULE> |
| 11505 | <RESULT IF_PASS COUNT 1> |
| 11506 | (?im)error.+?Length.+?restriction.+?cannot.+?used |
| 11507 | <END_RESULT> |
| 11508 | <RESULT IF_PASS COUNT 1> |
| 11509 | (?is)\berror: |
| 11510 | <END_RESULT> |
| 11511 | <END_TC> |
| 11512 | |
| 11513 | :exmp. |
| 11514 | |
| 11515 | .*---------------------------------------------------------------------* |
| 11516 | :h4.Allowed matching mechanisms - template length-restriction (array in def.part) |
| 11517 | .*---------------------------------------------------------------------* |
| 11518 | :xmp tab=0. |
| 11519 | |
| 11520 | <TC - Allowed matching mechanisms - template length-restriction (array in def.part)> |
| 11521 | |
| 11522 | <COMPILE> |
| 11523 | <VERDICT_LEAF PASS> |
| 11524 | <MODULE TTCN x x.ttcn> |
| 11525 | module x { |
| 11526 | |
| 11527 | type integer arrint[1]; |
| 11528 | //TR 727 |
| 11529 | template arrint r:= ? length(10); |
| 11530 | |
| 11531 | } |
| 11532 | <END_MODULE> |
| 11533 | <RESULT IF_PASS COUNT 1> |
| 11534 | (?im)error.+?number.+?elements.+?allowed.+?length.+?restriction.+?contradicts.+?array.+?size |
| 11535 | <END_RESULT> |
| 11536 | <RESULT IF_PASS COUNT 1> |
| 11537 | (?is)\berror: |
| 11538 | <END_RESULT> |
| 11539 | <END_TC> |
| 11540 | |
| 11541 | :exmp. |
| 11542 | |
| 11543 | .*---------------------------------------------------------------------* |
| 11544 | :h4.Allowed matching mechanisms - template length-restriction (array in control part) |
| 11545 | .*---------------------------------------------------------------------* |
| 11546 | :xmp tab=0. |
| 11547 | |
| 11548 | <TC - Allowed matching mechanisms - template length-restriction (array in control part)> |
| 11549 | |
| 11550 | <COMPILE> |
| 11551 | <VERDICT_LEAF PASS> |
| 11552 | <MODULE TTCN x x.ttcn> |
| 11553 | module x { |
| 11554 | |
| 11555 | type integer arrint[1]; |
| 11556 | |
| 11557 | control{ |
| 11558 | //TR 727 |
| 11559 | template arrint r:= ? length(10); |
| 11560 | } |
| 11561 | } |
| 11562 | <END_MODULE> |
| 11563 | <RESULT IF_PASS COUNT 1> |
| 11564 | (?im)error.+?number.+?elements.+?allowed.+?length.+?restriction.+?contradicts.+?array.+?size |
| 11565 | <END_RESULT> |
| 11566 | <RESULT IF_PASS COUNT 1> |
| 11567 | (?is)\berror: |
| 11568 | <END_RESULT> |
| 11569 | <END_TC> |
| 11570 | |
| 11571 | :exmp. |
| 11572 | |
| 11573 | .*---------------------------------------------------------------------* |
| 11574 | :h4.Allowed matching mechanisms - template length-restriction (array in function) |
| 11575 | .*---------------------------------------------------------------------* |
| 11576 | :xmp tab=0. |
| 11577 | |
| 11578 | <TC - Allowed matching mechanisms - template length-restriction (array in function)> |
| 11579 | |
| 11580 | <COMPILE> |
| 11581 | <VERDICT_LEAF PASS> |
| 11582 | <MODULE TTCN x x.ttcn> |
| 11583 | module x { |
| 11584 | |
| 11585 | type integer arrint[1]; |
| 11586 | |
| 11587 | function myFunct(){ |
| 11588 | //TR 727 |
| 11589 | template arrint r:= ? length(10); |
| 11590 | } |
| 11591 | } |
| 11592 | <END_MODULE> |
| 11593 | <RESULT IF_PASS COUNT 1> |
| 11594 | (?im)error.+?number.+?elements.+?allowed.+?length.+?restriction.+?contradicts.+?array.+?size |
| 11595 | <END_RESULT> |
| 11596 | <RESULT IF_PASS COUNT 1> |
| 11597 | (?is)\berror: |
| 11598 | <END_RESULT> |
| 11599 | <END_TC> |
| 11600 | |
| 11601 | :exmp. |
| 11602 | |
| 11603 | .*---------------------------------------------------------------------* |
| 11604 | :h4.Allowed matching mechanisms - template ifpresent (boolean in def.part) |
| 11605 | .*---------------------------------------------------------------------* |
| 11606 | :xmp tab=0. |
| 11607 | |
| 11608 | <TC - Allowed matching mechanisms - template ifpresent (boolean in def.part)> |
| 11609 | |
| 11610 | <COMPILEGCC> |
| 11611 | <VERDICT_LEAF PASS> |
| 11612 | <MODULE TTCN x x.ttcn> |
| 11613 | module x { |
| 11614 | |
| 11615 | template boolean f:= ? ifpresent; |
| 11616 | |
| 11617 | } |
| 11618 | <END_MODULE> |
| 11619 | <RESULT IF_PASS NEGATIVE> |
| 11620 | (?is)\berror: |
| 11621 | <END_RESULT> |
| 11622 | <END_TC> |
| 11623 | |
| 11624 | :exmp. |
| 11625 | |
| 11626 | .*---------------------------------------------------------------------* |
| 11627 | :h4.Allowed matching mechanisms - template ifpresent (boolean in control part) |
| 11628 | .*---------------------------------------------------------------------* |
| 11629 | :xmp tab=0. |
| 11630 | |
| 11631 | <TC - Allowed matching mechanisms - template ifpresent (boolean in control part)> |
| 11632 | |
| 11633 | <COMPILEGCC> |
| 11634 | <VERDICT_LEAF PASS> |
| 11635 | <MODULE TTCN x x.ttcn> |
| 11636 | module x { |
| 11637 | |
| 11638 | control{ |
| 11639 | var template boolean f:= ? ifpresent; |
| 11640 | } |
| 11641 | |
| 11642 | } |
| 11643 | <END_MODULE> |
| 11644 | <RESULT IF_PASS NEGATIVE> |
| 11645 | (?is)\berror: |
| 11646 | <END_RESULT> |
| 11647 | <END_TC> |
| 11648 | |
| 11649 | :exmp. |
| 11650 | |
| 11651 | .*---------------------------------------------------------------------* |
| 11652 | :h4.Allowed matching mechanisms - template ifpresent (boolean in function) |
| 11653 | .*---------------------------------------------------------------------* |
| 11654 | :xmp tab=0. |
| 11655 | |
| 11656 | <TC - Allowed matching mechanisms - template ifpresent (boolean in function)> |
| 11657 | |
| 11658 | <COMPILEGCC> |
| 11659 | <VERDICT_LEAF PASS> |
| 11660 | <MODULE TTCN x x.ttcn> |
| 11661 | module x { |
| 11662 | |
| 11663 | function myFunct(){ |
| 11664 | var template boolean f:= ? ifpresent; |
| 11665 | } |
| 11666 | |
| 11667 | } |
| 11668 | <END_MODULE> |
| 11669 | <RESULT IF_PASS NEGATIVE> |
| 11670 | (?is)\berror: |
| 11671 | <END_RESULT> |
| 11672 | <END_TC> |
| 11673 | |
| 11674 | :exmp. |
| 11675 | |
| 11676 | .*---------------------------------------------------------------------* |
| 11677 | :h4.Allowed matching mechanisms - template ifpresent (integer in def.part) |
| 11678 | .*---------------------------------------------------------------------* |
| 11679 | :xmp tab=0. |
| 11680 | |
| 11681 | <TC - Allowed matching mechanisms - template ifpresent (integer in def.part)> |
| 11682 | |
| 11683 | <COMPILEGCC> |
| 11684 | <VERDICT_LEAF PASS> |
| 11685 | <MODULE TTCN x x.ttcn> |
| 11686 | module x { |
| 11687 | |
| 11688 | template integer f:= ? ifpresent; |
| 11689 | |
| 11690 | } |
| 11691 | <END_MODULE> |
| 11692 | <RESULT IF_PASS NEGATIVE> |
| 11693 | (?is)\berror: |
| 11694 | <END_RESULT> |
| 11695 | <END_TC> |
| 11696 | |
| 11697 | :exmp. |
| 11698 | |
| 11699 | .*---------------------------------------------------------------------* |
| 11700 | :h4.Allowed matching mechanisms - template ifpresent (integer in control part) |
| 11701 | .*---------------------------------------------------------------------* |
| 11702 | :xmp tab=0. |
| 11703 | |
| 11704 | <TC - Allowed matching mechanisms - template ifpresent (integer in control part)> |
| 11705 | |
| 11706 | <COMPILEGCC> |
| 11707 | <VERDICT_LEAF PASS> |
| 11708 | <MODULE TTCN x x.ttcn> |
| 11709 | module x { |
| 11710 | |
| 11711 | control{ |
| 11712 | var template integer f:= ? ifpresent; |
| 11713 | } |
| 11714 | |
| 11715 | } |
| 11716 | <END_MODULE> |
| 11717 | <RESULT IF_PASS NEGATIVE> |
| 11718 | (?is)\berror: |
| 11719 | <END_RESULT> |
| 11720 | <END_TC> |
| 11721 | |
| 11722 | :exmp. |
| 11723 | |
| 11724 | .*---------------------------------------------------------------------* |
| 11725 | :h4.Allowed matching mechanisms - template ifpresent (integer in function) |
| 11726 | .*---------------------------------------------------------------------* |
| 11727 | :xmp tab=0. |
| 11728 | |
| 11729 | <TC - Allowed matching mechanisms - template ifpresent (integer in function)> |
| 11730 | |
| 11731 | <COMPILEGCC> |
| 11732 | <VERDICT_LEAF PASS> |
| 11733 | <MODULE TTCN x x.ttcn> |
| 11734 | module x { |
| 11735 | |
| 11736 | function myFunct(){ |
| 11737 | var template integer f:= ? ifpresent; |
| 11738 | } |
| 11739 | |
| 11740 | } |
| 11741 | <END_MODULE> |
| 11742 | <RESULT IF_PASS NEGATIVE> |
| 11743 | (?is)\berror: |
| 11744 | <END_RESULT> |
| 11745 | <END_TC> |
| 11746 | |
| 11747 | :exmp. |
| 11748 | |
| 11749 | .*---------------------------------------------------------------------* |
| 11750 | :h4.Allowed matching mechanisms - template ifpresent (float in def.part) |
| 11751 | .*---------------------------------------------------------------------* |
| 11752 | :xmp tab=0. |
| 11753 | |
| 11754 | <TC - Allowed matching mechanisms - template ifpresent (float in def.part)> |
| 11755 | |
| 11756 | <COMPILEGCC> |
| 11757 | <VERDICT_LEAF PASS> |
| 11758 | <MODULE TTCN x x.ttcn> |
| 11759 | module x { |
| 11760 | |
| 11761 | template float f:= ? ifpresent; |
| 11762 | |
| 11763 | } |
| 11764 | <END_MODULE> |
| 11765 | <RESULT IF_PASS NEGATIVE> |
| 11766 | (?is)\berror: |
| 11767 | <END_RESULT> |
| 11768 | <END_TC> |
| 11769 | |
| 11770 | :exmp. |
| 11771 | |
| 11772 | .*---------------------------------------------------------------------* |
| 11773 | :h4.Allowed matching mechanisms - template ifpresent (float in control part) |
| 11774 | .*---------------------------------------------------------------------* |
| 11775 | :xmp tab=0. |
| 11776 | |
| 11777 | <TC - Allowed matching mechanisms - template ifpresent (float in control part)> |
| 11778 | |
| 11779 | <COMPILEGCC> |
| 11780 | <VERDICT_LEAF PASS> |
| 11781 | <MODULE TTCN x x.ttcn> |
| 11782 | module x { |
| 11783 | |
| 11784 | control{ |
| 11785 | var template float f:= ? ifpresent; |
| 11786 | } |
| 11787 | |
| 11788 | } |
| 11789 | <END_MODULE> |
| 11790 | <RESULT IF_PASS NEGATIVE> |
| 11791 | (?is)\berror: |
| 11792 | <END_RESULT> |
| 11793 | <END_TC> |
| 11794 | |
| 11795 | :exmp. |
| 11796 | |
| 11797 | .*---------------------------------------------------------------------* |
| 11798 | :h4.Allowed matching mechanisms - template ifpresent (float in function) |
| 11799 | .*---------------------------------------------------------------------* |
| 11800 | :xmp tab=0. |
| 11801 | |
| 11802 | <TC - Allowed matching mechanisms - template ifpresent (float in function)> |
| 11803 | |
| 11804 | <COMPILEGCC> |
| 11805 | <VERDICT_LEAF PASS> |
| 11806 | <MODULE TTCN x x.ttcn> |
| 11807 | module x { |
| 11808 | |
| 11809 | function myFunct(){ |
| 11810 | var template float f:= ? ifpresent; |
| 11811 | } |
| 11812 | |
| 11813 | } |
| 11814 | <END_MODULE> |
| 11815 | <RESULT IF_PASS NEGATIVE> |
| 11816 | (?is)\berror: |
| 11817 | <END_RESULT> |
| 11818 | <END_TC> |
| 11819 | |
| 11820 | :exmp. |
| 11821 | |
| 11822 | .*---------------------------------------------------------------------* |
| 11823 | :h4.Allowed matching mechanisms - template ifpresent (bitstring in def.part) |
| 11824 | .*---------------------------------------------------------------------* |
| 11825 | :xmp tab=0. |
| 11826 | |
| 11827 | <TC - Allowed matching mechanisms - template ifpresent (bitstring in def.part)> |
| 11828 | |
| 11829 | <COMPILEGCC> |
| 11830 | <VERDICT_LEAF PASS> |
| 11831 | <MODULE TTCN x x.ttcn> |
| 11832 | module x { |
| 11833 | |
| 11834 | template bitstring f:= ? ifpresent; |
| 11835 | |
| 11836 | } |
| 11837 | <END_MODULE> |
| 11838 | <RESULT IF_PASS NEGATIVE> |
| 11839 | (?is)\berror: |
| 11840 | <END_RESULT> |
| 11841 | <END_TC> |
| 11842 | |
| 11843 | :exmp. |
| 11844 | |
| 11845 | .*---------------------------------------------------------------------* |
| 11846 | :h4.Allowed matching mechanisms - template ifpresent (bitstring in control part) |
| 11847 | .*---------------------------------------------------------------------* |
| 11848 | :xmp tab=0. |
| 11849 | |
| 11850 | <TC - Allowed matching mechanisms - template ifpresent (bitstring in control part)> |
| 11851 | |
| 11852 | <COMPILEGCC> |
| 11853 | <VERDICT_LEAF PASS> |
| 11854 | <MODULE TTCN x x.ttcn> |
| 11855 | module x { |
| 11856 | |
| 11857 | control{ |
| 11858 | var template bitstring f:= ? ifpresent; |
| 11859 | } |
| 11860 | |
| 11861 | } |
| 11862 | <END_MODULE> |
| 11863 | <RESULT IF_PASS NEGATIVE> |
| 11864 | (?is)\berror: |
| 11865 | <END_RESULT> |
| 11866 | <END_TC> |
| 11867 | |
| 11868 | :exmp. |
| 11869 | |
| 11870 | .*---------------------------------------------------------------------* |
| 11871 | :h4.Allowed matching mechanisms - template ifpresent (bitstring in function) |
| 11872 | .*---------------------------------------------------------------------* |
| 11873 | :xmp tab=0. |
| 11874 | |
| 11875 | <TC - Allowed matching mechanisms - template ifpresent (bitstring in function)> |
| 11876 | |
| 11877 | <COMPILEGCC> |
| 11878 | <VERDICT_LEAF PASS> |
| 11879 | <MODULE TTCN x x.ttcn> |
| 11880 | module x { |
| 11881 | |
| 11882 | function myFunct(){ |
| 11883 | var template bitstring f:= ? ifpresent; |
| 11884 | } |
| 11885 | |
| 11886 | } |
| 11887 | <END_MODULE> |
| 11888 | <RESULT IF_PASS NEGATIVE> |
| 11889 | (?is)\berror: |
| 11890 | <END_RESULT> |
| 11891 | <END_TC> |
| 11892 | |
| 11893 | :exmp. |
| 11894 | |
| 11895 | .*---------------------------------------------------------------------* |
| 11896 | :h4.Allowed matching mechanisms - template ifpresent (octetstring in def.part) |
| 11897 | .*---------------------------------------------------------------------* |
| 11898 | :xmp tab=0. |
| 11899 | |
| 11900 | <TC - Allowed matching mechanisms - template ifpresent (octetstring in def.part)> |
| 11901 | |
| 11902 | <COMPILEGCC> |
| 11903 | <VERDICT_LEAF PASS> |
| 11904 | <MODULE TTCN x x.ttcn> |
| 11905 | module x { |
| 11906 | |
| 11907 | template octetstring f:= ? ifpresent; |
| 11908 | |
| 11909 | } |
| 11910 | <END_MODULE> |
| 11911 | <RESULT IF_PASS NEGATIVE> |
| 11912 | (?is)\berror: |
| 11913 | <END_RESULT> |
| 11914 | <END_TC> |
| 11915 | |
| 11916 | :exmp. |
| 11917 | |
| 11918 | .*---------------------------------------------------------------------* |
| 11919 | :h4.Allowed matching mechanisms - template ifpresent (octetstring in control part) |
| 11920 | .*---------------------------------------------------------------------* |
| 11921 | :xmp tab=0. |
| 11922 | |
| 11923 | <TC - Allowed matching mechanisms - template ifpresent (octetstring in control part)> |
| 11924 | |
| 11925 | <COMPILEGCC> |
| 11926 | <VERDICT_LEAF PASS> |
| 11927 | <MODULE TTCN x x.ttcn> |
| 11928 | module x { |
| 11929 | |
| 11930 | control{ |
| 11931 | var template octetstring f:= ? ifpresent; |
| 11932 | } |
| 11933 | |
| 11934 | } |
| 11935 | <END_MODULE> |
| 11936 | <RESULT IF_PASS NEGATIVE> |
| 11937 | (?is)\berror: |
| 11938 | <END_RESULT> |
| 11939 | <END_TC> |
| 11940 | |
| 11941 | :exmp. |
| 11942 | |
| 11943 | .*---------------------------------------------------------------------* |
| 11944 | :h4.Allowed matching mechanisms - template ifpresent (octetstring in function) |
| 11945 | .*---------------------------------------------------------------------* |
| 11946 | :xmp tab=0. |
| 11947 | |
| 11948 | <TC - Allowed matching mechanisms - template ifpresent (octetstring in function)> |
| 11949 | |
| 11950 | <COMPILEGCC> |
| 11951 | <VERDICT_LEAF PASS> |
| 11952 | <MODULE TTCN x x.ttcn> |
| 11953 | module x { |
| 11954 | |
| 11955 | function myFunct(){ |
| 11956 | var template octetstring f:= ? ifpresent; |
| 11957 | } |
| 11958 | |
| 11959 | } |
| 11960 | <END_MODULE> |
| 11961 | <RESULT IF_PASS NEGATIVE> |
| 11962 | (?is)\berror: |
| 11963 | <END_RESULT> |
| 11964 | <END_TC> |
| 11965 | |
| 11966 | :exmp. |
| 11967 | |
| 11968 | .*---------------------------------------------------------------------* |
| 11969 | :h4.Allowed matching mechanisms - template ifpresent (hexstring in def.part) |
| 11970 | .*---------------------------------------------------------------------* |
| 11971 | :xmp tab=0. |
| 11972 | |
| 11973 | <TC - Allowed matching mechanisms - template ifpresent (hexstring in def.part)> |
| 11974 | |
| 11975 | <COMPILEGCC> |
| 11976 | <VERDICT_LEAF PASS> |
| 11977 | <MODULE TTCN x x.ttcn> |
| 11978 | module x { |
| 11979 | |
| 11980 | template hexstring f:= ? ifpresent; |
| 11981 | |
| 11982 | } |
| 11983 | <END_MODULE> |
| 11984 | <RESULT IF_PASS NEGATIVE> |
| 11985 | (?is)\berror: |
| 11986 | <END_RESULT> |
| 11987 | <END_TC> |
| 11988 | |
| 11989 | :exmp. |
| 11990 | |
| 11991 | .*---------------------------------------------------------------------* |
| 11992 | :h4.Allowed matching mechanisms - template ifpresent (hexstring in control part) |
| 11993 | .*---------------------------------------------------------------------* |
| 11994 | :xmp tab=0. |
| 11995 | |
| 11996 | <TC - Allowed matching mechanisms - template ifpresent (hexstring in control part)> |
| 11997 | |
| 11998 | <COMPILEGCC> |
| 11999 | <VERDICT_LEAF PASS> |
| 12000 | <MODULE TTCN x x.ttcn> |
| 12001 | module x { |
| 12002 | |
| 12003 | control{ |
| 12004 | var template hexstring f:= ? ifpresent; |
| 12005 | } |
| 12006 | |
| 12007 | } |
| 12008 | <END_MODULE> |
| 12009 | <RESULT IF_PASS NEGATIVE> |
| 12010 | (?is)\berror: |
| 12011 | <END_RESULT> |
| 12012 | <END_TC> |
| 12013 | |
| 12014 | :exmp. |
| 12015 | |
| 12016 | .*---------------------------------------------------------------------* |
| 12017 | :h4.Allowed matching mechanisms - template ifpresent (hexstring in function) |
| 12018 | .*---------------------------------------------------------------------* |
| 12019 | :xmp tab=0. |
| 12020 | |
| 12021 | <TC - Allowed matching mechanisms - template ifpresent (hexstring in function)> |
| 12022 | |
| 12023 | <COMPILEGCC> |
| 12024 | <VERDICT_LEAF PASS> |
| 12025 | <MODULE TTCN x x.ttcn> |
| 12026 | module x { |
| 12027 | |
| 12028 | function myFunct(){ |
| 12029 | var template hexstring f:= ? ifpresent; |
| 12030 | } |
| 12031 | |
| 12032 | } |
| 12033 | <END_MODULE> |
| 12034 | <RESULT IF_PASS NEGATIVE> |
| 12035 | (?is)\berror: |
| 12036 | <END_RESULT> |
| 12037 | <END_TC> |
| 12038 | |
| 12039 | :exmp. |
| 12040 | |
| 12041 | .*---------------------------------------------------------------------* |
| 12042 | :h4.Allowed matching mechanisms - template ifpresent (charstring in def.part) |
| 12043 | .*---------------------------------------------------------------------* |
| 12044 | :xmp tab=0. |
| 12045 | |
| 12046 | <TC - Allowed matching mechanisms - template ifpresent (charstring in def.part)> |
| 12047 | |
| 12048 | <COMPILEGCC> |
| 12049 | <VERDICT_LEAF PASS> |
| 12050 | <MODULE TTCN x x.ttcn> |
| 12051 | module x { |
| 12052 | |
| 12053 | template charstring f:= ? ifpresent; |
| 12054 | |
| 12055 | } |
| 12056 | <END_MODULE> |
| 12057 | <RESULT IF_PASS NEGATIVE> |
| 12058 | (?is)\berror: |
| 12059 | <END_RESULT> |
| 12060 | <END_TC> |
| 12061 | |
| 12062 | :exmp. |
| 12063 | |
| 12064 | .*---------------------------------------------------------------------* |
| 12065 | :h4.Allowed matching mechanisms - template ifpresent (charstring in control part) |
| 12066 | .*---------------------------------------------------------------------* |
| 12067 | :xmp tab=0. |
| 12068 | |
| 12069 | <TC - Allowed matching mechanisms - template ifpresent (charstring in control part)> |
| 12070 | |
| 12071 | <COMPILEGCC> |
| 12072 | <VERDICT_LEAF PASS> |
| 12073 | <MODULE TTCN x x.ttcn> |
| 12074 | module x { |
| 12075 | |
| 12076 | control{ |
| 12077 | var template charstring f:= ? ifpresent; |
| 12078 | } |
| 12079 | |
| 12080 | } |
| 12081 | <END_MODULE> |
| 12082 | <RESULT IF_PASS NEGATIVE> |
| 12083 | (?is)\berror: |
| 12084 | <END_RESULT> |
| 12085 | <END_TC> |
| 12086 | |
| 12087 | :exmp. |
| 12088 | |
| 12089 | .*---------------------------------------------------------------------* |
| 12090 | :h4.Allowed matching mechanisms - template ifpresent (charstring in function) |
| 12091 | .*---------------------------------------------------------------------* |
| 12092 | :xmp tab=0. |
| 12093 | |
| 12094 | <TC - Allowed matching mechanisms - template ifpresent (charstring in function)> |
| 12095 | |
| 12096 | <COMPILEGCC> |
| 12097 | <VERDICT_LEAF PASS> |
| 12098 | <MODULE TTCN x x.ttcn> |
| 12099 | module x { |
| 12100 | |
| 12101 | function myFunct(){ |
| 12102 | var template charstring f:= ? ifpresent; |
| 12103 | } |
| 12104 | |
| 12105 | } |
| 12106 | <END_MODULE> |
| 12107 | <RESULT IF_PASS NEGATIVE> |
| 12108 | (?is)\berror: |
| 12109 | <END_RESULT> |
| 12110 | <END_TC> |
| 12111 | |
| 12112 | :exmp. |
| 12113 | |
| 12114 | .*---------------------------------------------------------------------* |
| 12115 | :h4.Allowed matching mechanisms - template ifpresent (record of in def.part) |
| 12116 | .*---------------------------------------------------------------------* |
| 12117 | :xmp tab=0. |
| 12118 | |
| 12119 | <TC - Allowed matching mechanisms - template ifpresent (record of in def.part)> |
| 12120 | |
| 12121 | <COMPILEGCC> |
| 12122 | <VERDICT_LEAF PASS> |
| 12123 | <MODULE TTCN x x.ttcn> |
| 12124 | module x { |
| 12125 | |
| 12126 | type record of integer rofT; |
| 12127 | |
| 12128 | template rofT f:= ? ifpresent; |
| 12129 | |
| 12130 | } |
| 12131 | <END_MODULE> |
| 12132 | <RESULT IF_PASS NEGATIVE> |
| 12133 | (?is)\berror: |
| 12134 | <END_RESULT> |
| 12135 | <END_TC> |
| 12136 | |
| 12137 | :exmp. |
| 12138 | |
| 12139 | .*---------------------------------------------------------------------* |
| 12140 | :h4.Allowed matching mechanisms - template ifpresent (record of in control part) |
| 12141 | .*---------------------------------------------------------------------* |
| 12142 | :xmp tab=0. |
| 12143 | |
| 12144 | <TC - Allowed matching mechanisms - template ifpresent (record of in control part)> |
| 12145 | |
| 12146 | <COMPILEGCC> |
| 12147 | <VERDICT_LEAF PASS> |
| 12148 | <MODULE TTCN x x.ttcn> |
| 12149 | module x { |
| 12150 | |
| 12151 | type record of integer rofT; |
| 12152 | |
| 12153 | control{ |
| 12154 | var template rofT f:= ? ifpresent; |
| 12155 | } |
| 12156 | |
| 12157 | } |
| 12158 | <END_MODULE> |
| 12159 | <RESULT IF_PASS NEGATIVE> |
| 12160 | (?is)\berror: |
| 12161 | <END_RESULT> |
| 12162 | <END_TC> |
| 12163 | |
| 12164 | :exmp. |
| 12165 | |
| 12166 | .*---------------------------------------------------------------------* |
| 12167 | :h4.Allowed matching mechanisms - template ifpresent (record of in function) |
| 12168 | .*---------------------------------------------------------------------* |
| 12169 | :xmp tab=0. |
| 12170 | |
| 12171 | <TC - Allowed matching mechanisms - template ifpresent (record of in function)> |
| 12172 | |
| 12173 | <COMPILEGCC> |
| 12174 | <VERDICT_LEAF PASS> |
| 12175 | <MODULE TTCN x x.ttcn> |
| 12176 | module x { |
| 12177 | |
| 12178 | type record of integer rofT; |
| 12179 | |
| 12180 | function myFunct(){ |
| 12181 | var template rofT f:= ? ifpresent; |
| 12182 | } |
| 12183 | |
| 12184 | } |
| 12185 | <END_MODULE> |
| 12186 | <RESULT IF_PASS NEGATIVE> |
| 12187 | (?is)\berror: |
| 12188 | <END_RESULT> |
| 12189 | <END_TC> |
| 12190 | |
| 12191 | :exmp. |
| 12192 | |
| 12193 | .*---------------------------------------------------------------------* |
| 12194 | :h4.Allowed matching mechanisms - template ifpresent (set of in def.part) |
| 12195 | .*---------------------------------------------------------------------* |
| 12196 | :xmp tab=0. |
| 12197 | |
| 12198 | <TC - Allowed matching mechanisms - template ifpresent (set of in def.part)> |
| 12199 | |
| 12200 | <COMPILEGCC> |
| 12201 | <VERDICT_LEAF PASS> |
| 12202 | <MODULE TTCN x x.ttcn> |
| 12203 | module x { |
| 12204 | |
| 12205 | type set of integer sofT; |
| 12206 | |
| 12207 | template sofT f:= ? ifpresent; |
| 12208 | |
| 12209 | } |
| 12210 | <END_MODULE> |
| 12211 | <RESULT IF_PASS NEGATIVE> |
| 12212 | (?is)\berror: |
| 12213 | <END_RESULT> |
| 12214 | <END_TC> |
| 12215 | |
| 12216 | :exmp. |
| 12217 | |
| 12218 | .*---------------------------------------------------------------------* |
| 12219 | :h4.Allowed matching mechanisms - template ifpresent (set of in control part) |
| 12220 | .*---------------------------------------------------------------------* |
| 12221 | :xmp tab=0. |
| 12222 | |
| 12223 | <TC - Allowed matching mechanisms - template ifpresent (set of in control part)> |
| 12224 | |
| 12225 | <COMPILEGCC> |
| 12226 | <VERDICT_LEAF PASS> |
| 12227 | <MODULE TTCN x x.ttcn> |
| 12228 | module x { |
| 12229 | |
| 12230 | type set of integer sofT; |
| 12231 | |
| 12232 | control{ |
| 12233 | var template sofT f:= ? ifpresent; |
| 12234 | } |
| 12235 | |
| 12236 | } |
| 12237 | <END_MODULE> |
| 12238 | <RESULT IF_PASS NEGATIVE> |
| 12239 | (?is)\berror: |
| 12240 | <END_RESULT> |
| 12241 | <END_TC> |
| 12242 | |
| 12243 | :exmp. |
| 12244 | |
| 12245 | .*---------------------------------------------------------------------* |
| 12246 | :h4.Allowed matching mechanisms - template ifpresent (set of in function) |
| 12247 | .*---------------------------------------------------------------------* |
| 12248 | :xmp tab=0. |
| 12249 | |
| 12250 | <TC - Allowed matching mechanisms - template ifpresent (set of in function)> |
| 12251 | |
| 12252 | <COMPILEGCC> |
| 12253 | <VERDICT_LEAF PASS> |
| 12254 | <MODULE TTCN x x.ttcn> |
| 12255 | module x { |
| 12256 | |
| 12257 | type set of integer sofT; |
| 12258 | |
| 12259 | function myFunct(){ |
| 12260 | var template sofT f:= ? ifpresent; |
| 12261 | } |
| 12262 | |
| 12263 | } |
| 12264 | <END_MODULE> |
| 12265 | <RESULT IF_PASS NEGATIVE> |
| 12266 | (?is)\berror: |
| 12267 | <END_RESULT> |
| 12268 | <END_TC> |
| 12269 | |
| 12270 | :exmp. |
| 12271 | |
| 12272 | .*---------------------------------------------------------------------* |
| 12273 | :h4.Allowed matching mechanisms - template ifpresent (enumerated in def.part) |
| 12274 | .*---------------------------------------------------------------------* |
| 12275 | :xmp tab=0. |
| 12276 | |
| 12277 | <TC - Allowed matching mechanisms - template ifpresent (enumerated in def.part)> |
| 12278 | |
| 12279 | <COMPILEGCC> |
| 12280 | <VERDICT_LEAF PASS> |
| 12281 | <MODULE TTCN x x.ttcn> |
| 12282 | module x { |
| 12283 | |
| 12284 | type enumerated enumT { ONE(1), TWO(2), THREE(3) }; |
| 12285 | |
| 12286 | template enumT f:= ? ifpresent; |
| 12287 | |
| 12288 | } |
| 12289 | <END_MODULE> |
| 12290 | <RESULT IF_PASS NEGATIVE> |
| 12291 | (?is)\berror: |
| 12292 | <END_RESULT> |
| 12293 | <END_TC> |
| 12294 | |
| 12295 | :exmp. |
| 12296 | |
| 12297 | .*---------------------------------------------------------------------* |
| 12298 | :h4.Allowed matching mechanisms - template ifpresent (enumerated in control part) |
| 12299 | .*---------------------------------------------------------------------* |
| 12300 | :xmp tab=0. |
| 12301 | |
| 12302 | <TC - Allowed matching mechanisms - template ifpresent (enumerated in control part)> |
| 12303 | |
| 12304 | <COMPILEGCC> |
| 12305 | <VERDICT_LEAF PASS> |
| 12306 | <MODULE TTCN x x.ttcn> |
| 12307 | module x { |
| 12308 | |
| 12309 | type enumerated enumT { ONE(1), TWO(2), THREE(3) }; |
| 12310 | |
| 12311 | control{ |
| 12312 | var template enumT f:= ? ifpresent; |
| 12313 | } |
| 12314 | |
| 12315 | } |
| 12316 | <END_MODULE> |
| 12317 | <RESULT IF_PASS NEGATIVE> |
| 12318 | (?is)\berror: |
| 12319 | <END_RESULT> |
| 12320 | <END_TC> |
| 12321 | |
| 12322 | :exmp. |
| 12323 | |
| 12324 | .*---------------------------------------------------------------------* |
| 12325 | :h4.Allowed matching mechanisms - template ifpresent (enumerated in function) |
| 12326 | .*---------------------------------------------------------------------* |
| 12327 | :xmp tab=0. |
| 12328 | |
| 12329 | <TC - Allowed matching mechanisms - template ifpresent (enumerated in function)> |
| 12330 | |
| 12331 | <COMPILEGCC> |
| 12332 | <VERDICT_LEAF PASS> |
| 12333 | <MODULE TTCN x x.ttcn> |
| 12334 | module x { |
| 12335 | |
| 12336 | type enumerated enumT { ONE(1), TWO(2), THREE(3) }; |
| 12337 | |
| 12338 | function myFunct(){ |
| 12339 | var template enumT f:= ? ifpresent; |
| 12340 | } |
| 12341 | |
| 12342 | } |
| 12343 | <END_MODULE> |
| 12344 | <RESULT IF_PASS NEGATIVE> |
| 12345 | (?is)\berror: |
| 12346 | <END_RESULT> |
| 12347 | <END_TC> |
| 12348 | |
| 12349 | :exmp. |
| 12350 | |
| 12351 | .*---------------------------------------------------------------------* |
| 12352 | :h4.Allowed matching mechanisms - template ifpresent (union in def.part) |
| 12353 | .*---------------------------------------------------------------------* |
| 12354 | :xmp tab=0. |
| 12355 | |
| 12356 | <TC - Allowed matching mechanisms - template ifpresent (union in def.part)> |
| 12357 | |
| 12358 | <COMPILEGCC> |
| 12359 | <VERDICT_LEAF PASS> |
| 12360 | <MODULE TTCN x x.ttcn> |
| 12361 | module x { |
| 12362 | |
| 12363 | type union uniT{ |
| 12364 | integer f1, |
| 12365 | float f2, |
| 12366 | charstring f3 |
| 12367 | } |
| 12368 | |
| 12369 | template uniT f:= ? ifpresent; |
| 12370 | |
| 12371 | } |
| 12372 | <END_MODULE> |
| 12373 | <RESULT IF_PASS NEGATIVE> |
| 12374 | (?is)\berror: |
| 12375 | <END_RESULT> |
| 12376 | <END_TC> |
| 12377 | |
| 12378 | :exmp. |
| 12379 | |
| 12380 | .*---------------------------------------------------------------------* |
| 12381 | :h4.Allowed matching mechanisms - template ifpresent (union in control part) |
| 12382 | .*---------------------------------------------------------------------* |
| 12383 | :xmp tab=0. |
| 12384 | |
| 12385 | <TC - Allowed matching mechanisms - template ifpresent (union in control part)> |
| 12386 | |
| 12387 | <COMPILEGCC> |
| 12388 | <VERDICT_LEAF PASS> |
| 12389 | <MODULE TTCN x x.ttcn> |
| 12390 | module x { |
| 12391 | |
| 12392 | type union uniT{ |
| 12393 | integer f1, |
| 12394 | float f2, |
| 12395 | charstring f3 |
| 12396 | } |
| 12397 | |
| 12398 | control{ |
| 12399 | var template uniT f:= ? ifpresent; |
| 12400 | } |
| 12401 | |
| 12402 | } |
| 12403 | <END_MODULE> |
| 12404 | <RESULT IF_PASS NEGATIVE> |
| 12405 | (?is)\berror: |
| 12406 | <END_RESULT> |
| 12407 | <END_TC> |
| 12408 | |
| 12409 | :exmp. |
| 12410 | |
| 12411 | .*---------------------------------------------------------------------* |
| 12412 | :h4.Allowed matching mechanisms - template ifpresent (union in function) |
| 12413 | .*---------------------------------------------------------------------* |
| 12414 | :xmp tab=0. |
| 12415 | |
| 12416 | <TC - Allowed matching mechanisms - template ifpresent (union in function)> |
| 12417 | |
| 12418 | <COMPILEGCC> |
| 12419 | <VERDICT_LEAF PASS> |
| 12420 | <MODULE TTCN x x.ttcn> |
| 12421 | module x { |
| 12422 | |
| 12423 | type union uniT{ |
| 12424 | integer f1, |
| 12425 | float f2, |
| 12426 | charstring f3 |
| 12427 | } |
| 12428 | |
| 12429 | function myFunct(){ |
| 12430 | var template uniT f:= ? ifpresent; |
| 12431 | } |
| 12432 | |
| 12433 | } |
| 12434 | <END_MODULE> |
| 12435 | <RESULT IF_PASS NEGATIVE> |
| 12436 | (?is)\berror: |
| 12437 | <END_RESULT> |
| 12438 | <END_TC> |
| 12439 | |
| 12440 | :exmp. |
| 12441 | |
| 12442 | .*---------------------------------------------------------------------* |
| 12443 | :h4.Allowed matching mechanisms - template ifpresent (array in def.part) |
| 12444 | .*---------------------------------------------------------------------* |
| 12445 | :xmp tab=0. |
| 12446 | |
| 12447 | <TC - Allowed matching mechanisms - template ifpresent (array in def.part)> |
| 12448 | |
| 12449 | <COMPILEGCC> |
| 12450 | <VERDICT_LEAF PASS> |
| 12451 | <MODULE TTCN x x.ttcn> |
| 12452 | module x { |
| 12453 | |
| 12454 | type integer arrint[1]; |
| 12455 | |
| 12456 | template arrint f:= ? ifpresent; |
| 12457 | |
| 12458 | } |
| 12459 | <END_MODULE> |
| 12460 | <RESULT IF_PASS NEGATIVE> |
| 12461 | (?is)\berror: |
| 12462 | <END_RESULT> |
| 12463 | <END_TC> |
| 12464 | |
| 12465 | :exmp. |
| 12466 | |
| 12467 | .*---------------------------------------------------------------------* |
| 12468 | :h4.Allowed matching mechanisms - template ifpresent (array in control part) |
| 12469 | .*---------------------------------------------------------------------* |
| 12470 | :xmp tab=0. |
| 12471 | |
| 12472 | <TC - Allowed matching mechanisms - template ifpresent (array in control part)> |
| 12473 | |
| 12474 | <COMPILEGCC> |
| 12475 | <VERDICT_LEAF PASS> |
| 12476 | <MODULE TTCN x x.ttcn> |
| 12477 | module x { |
| 12478 | |
| 12479 | type integer arrint[1]; |
| 12480 | |
| 12481 | control{ |
| 12482 | template arrint f:= ? ifpresent; |
| 12483 | } |
| 12484 | |
| 12485 | } |
| 12486 | <END_MODULE> |
| 12487 | <RESULT IF_PASS NEGATIVE> |
| 12488 | (?is)\berror: |
| 12489 | <END_RESULT> |
| 12490 | <END_TC> |
| 12491 | |
| 12492 | :exmp. |
| 12493 | |
| 12494 | .*---------------------------------------------------------------------* |
| 12495 | :h4.Allowed matching mechanisms - template ifpresent (array in function) |
| 12496 | .*---------------------------------------------------------------------* |
| 12497 | :xmp tab=0. |
| 12498 | |
| 12499 | <TC - Allowed matching mechanisms - template ifpresent (array in function)> |
| 12500 | |
| 12501 | <COMPILEGCC> |
| 12502 | <VERDICT_LEAF PASS> |
| 12503 | <MODULE TTCN x x.ttcn> |
| 12504 | module x { |
| 12505 | |
| 12506 | type integer arrint[1]; |
| 12507 | |
| 12508 | function myFunct(){ |
| 12509 | template arrint f:= ? ifpresent; |
| 12510 | } |
| 12511 | |
| 12512 | } |
| 12513 | <END_MODULE> |
| 12514 | <RESULT IF_PASS NEGATIVE> |
| 12515 | (?is)\berror: |
| 12516 | <END_RESULT> |
| 12517 | <END_TC> |
| 12518 | |
| 12519 | :exmp. |
| 12520 | |
| 12521 | .*---------------------------------------------------------------------* |
| 12522 | :h4.Allowed matching mechanisms - inline-template range (boolean in function) |
| 12523 | .*---------------------------------------------------------------------* |
| 12524 | :xmp tab=0. |
| 12525 | |
| 12526 | <TC - Allowed matching mechanisms - inline-template range (boolean in function)> |
| 12527 | |
| 12528 | <COMPILE> |
| 12529 | <VERDICT_LEAF PASS> |
| 12530 | <MODULE TTCN x x.ttcn> |
| 12531 | module x { |
| 12532 | |
| 12533 | type port portT message { |
| 12534 | in boolean |
| 12535 | } with {extension "internal"} |
| 12536 | |
| 12537 | type component c { |
| 12538 | port portT myPort; |
| 12539 | } |
| 12540 | |
| 12541 | function myFunct() runs on c { |
| 12542 | |
| 12543 | const boolean c1:= false; |
| 12544 | const boolean c2:= true; |
| 12545 | |
| 12546 | alt{ |
| 12547 | [] myPort.receive( (c1..c2) ) |
| 12548 | {} |
| 12549 | } |
| 12550 | } |
| 12551 | |
| 12552 | } |
| 12553 | <END_MODULE> |
| 12554 | <RESULT IF_PASS COUNT 1> |
| 12555 | (?im)error.+?value.+?range.+?match.+?cannot.+?used |
| 12556 | <END_RESULT> |
| 12557 | <RESULT IF_PASS COUNT 1> |
| 12558 | (?is)\berror: |
| 12559 | <END_RESULT> |
| 12560 | <END_TC> |
| 12561 | |
| 12562 | :exmp. |
| 12563 | .*---------------------------------------------------------------------* |
| 12564 | :h4.Allowed matching mechanisms - inline-template range (bitstring in function) |
| 12565 | .*---------------------------------------------------------------------* |
| 12566 | :xmp tab=0. |
| 12567 | |
| 12568 | <TC - Allowed matching mechanisms - inline-template range (bitstring in function)> |
| 12569 | |
| 12570 | <COMPILE> |
| 12571 | <VERDICT_LEAF PASS> |
| 12572 | <MODULE TTCN x x.ttcn> |
| 12573 | module x { |
| 12574 | |
| 12575 | type port portT message { |
| 12576 | in bitstring |
| 12577 | } with {extension "internal"} |
| 12578 | |
| 12579 | type component c { |
| 12580 | port portT myPort; |
| 12581 | } |
| 12582 | |
| 12583 | function myFunct() runs on c { |
| 12584 | |
| 12585 | const bitstring c1:= '000'B; |
| 12586 | const bitstring c2:= '111'B; |
| 12587 | |
| 12588 | alt{ |
| 12589 | [] myPort.receive( (c1..c2) ) |
| 12590 | {} |
| 12591 | } |
| 12592 | } |
| 12593 | |
| 12594 | } |
| 12595 | <END_MODULE> |
| 12596 | <RESULT IF_PASS COUNT 1> |
| 12597 | (?im)error.+?value.+?range.+?match.+?cannot.+?used |
| 12598 | <END_RESULT> |
| 12599 | <RESULT IF_PASS COUNT 1> |
| 12600 | (?is)\berror: |
| 12601 | <END_RESULT> |
| 12602 | <END_TC> |
| 12603 | |
| 12604 | :exmp. |
| 12605 | |
| 12606 | .*---------------------------------------------------------------------* |
| 12607 | :h4.Allowed matching mechanisms - inline-template range (octetstring in function) |
| 12608 | .*---------------------------------------------------------------------* |
| 12609 | :xmp tab=0. |
| 12610 | |
| 12611 | <TC - Allowed matching mechanisms - inline-template range (octetstring in function)> |
| 12612 | |
| 12613 | <COMPILE> |
| 12614 | <VERDICT_LEAF PASS> |
| 12615 | <MODULE TTCN x x.ttcn> |
| 12616 | module x { |
| 12617 | |
| 12618 | type port portT message { |
| 12619 | in octetstring |
| 12620 | } with {extension "internal"} |
| 12621 | |
| 12622 | type component c { |
| 12623 | port portT myPort; |
| 12624 | } |
| 12625 | |
| 12626 | function myFunct() runs on c { |
| 12627 | |
| 12628 | const octetstring c1:= '0000'O; |
| 12629 | const octetstring c2:= '1111'O; |
| 12630 | |
| 12631 | alt{ |
| 12632 | [] myPort.receive( (c1..c2) ) |
| 12633 | {} |
| 12634 | } |
| 12635 | } |
| 12636 | |
| 12637 | } |
| 12638 | <END_MODULE> |
| 12639 | <RESULT IF_PASS COUNT 1> |
| 12640 | (?im)error.+?value.+?range.+?match.+?cannot.+?used |
| 12641 | <END_RESULT> |
| 12642 | <RESULT IF_PASS COUNT 1> |
| 12643 | (?is)\berror: |
| 12644 | <END_RESULT> |
| 12645 | <END_TC> |
| 12646 | |
| 12647 | :exmp. |
| 12648 | |
| 12649 | .*---------------------------------------------------------------------* |
| 12650 | :h4.Allowed matching mechanisms - inline-template range (hexstring in function) |
| 12651 | .*---------------------------------------------------------------------* |
| 12652 | :xmp tab=0. |
| 12653 | |
| 12654 | <TC - Allowed matching mechanisms - inline-template range (hexstring in function)> |
| 12655 | |
| 12656 | <COMPILE> |
| 12657 | <VERDICT_LEAF PASS> |
| 12658 | <MODULE TTCN x x.ttcn> |
| 12659 | module x { |
| 12660 | |
| 12661 | type port portT message { |
| 12662 | in hexstring |
| 12663 | } with {extension "internal"} |
| 12664 | |
| 12665 | type component c { |
| 12666 | port portT myPort; |
| 12667 | } |
| 12668 | |
| 12669 | function myFunct() runs on c { |
| 12670 | |
| 12671 | const hexstring c1:= '0000'H; |
| 12672 | const hexstring c2:= '1111'H; |
| 12673 | |
| 12674 | alt{ |
| 12675 | [] myPort.receive( (c1..c2) ) |
| 12676 | {} |
| 12677 | } |
| 12678 | } |
| 12679 | |
| 12680 | } |
| 12681 | <END_MODULE> |
| 12682 | <RESULT IF_PASS COUNT 1> |
| 12683 | (?im)error.+?value.+?range.+?match.+?cannot.+?used |
| 12684 | <END_RESULT> |
| 12685 | <RESULT IF_PASS COUNT 1> |
| 12686 | (?is)\berror: |
| 12687 | <END_RESULT> |
| 12688 | <END_TC> |
| 12689 | |
| 12690 | :exmp. |
| 12691 | |
| 12692 | .*---------------------------------------------------------------------* |
| 12693 | :h4.Allowed matching mechanisms - inline-template range (record in function) |
| 12694 | .*---------------------------------------------------------------------* |
| 12695 | :xmp tab=0. |
| 12696 | |
| 12697 | <TC - Allowed matching mechanisms - inline-template range (record in function)> |
| 12698 | |
| 12699 | <COMPILE> |
| 12700 | <VERDICT_LEAF PASS> |
| 12701 | <MODULE TTCN x x.ttcn> |
| 12702 | module x { |
| 12703 | |
| 12704 | type record recT{ |
| 12705 | integer f1, |
| 12706 | float f2, |
| 12707 | charstring f3 |
| 12708 | } |
| 12709 | |
| 12710 | type port portT message { |
| 12711 | in recT |
| 12712 | } with {extension "internal"} |
| 12713 | |
| 12714 | type component c { |
| 12715 | port portT myPort; |
| 12716 | } |
| 12717 | |
| 12718 | const recT c1:= { f1:= 1, f2:= 2.0, f3:= "a"}; |
| 12719 | const recT c2:= { f1:= 5, f2:= 7.0, f3:= "z"}; |
| 12720 | |
| 12721 | function myFunct() runs on c { |
| 12722 | |
| 12723 | alt{ |
| 12724 | [] myPort.receive( (c1..c2) ) |
| 12725 | {} |
| 12726 | } |
| 12727 | } |
| 12728 | |
| 12729 | } |
| 12730 | <END_MODULE> |
| 12731 | <RESULT IF_PASS COUNT 1> |
| 12732 | (?im)error.+?value.+?range.+?match.+?cannot.+?used |
| 12733 | <END_RESULT> |
| 12734 | <RESULT IF_PASS COUNT 1> |
| 12735 | (?is)\berror: |
| 12736 | <END_RESULT> |
| 12737 | <END_TC> |
| 12738 | |
| 12739 | :exmp. |
| 12740 | |
| 12741 | .*---------------------------------------------------------------------* |
| 12742 | :h4.Allowed matching mechanisms - inline-template range (record of in function) |
| 12743 | .*---------------------------------------------------------------------* |
| 12744 | :xmp tab=0. |
| 12745 | |
| 12746 | <TC - Allowed matching mechanisms - inline-template range (record of in function)> |
| 12747 | |
| 12748 | <COMPILE> |
| 12749 | <VERDICT_LEAF PASS> |
| 12750 | <MODULE TTCN x x.ttcn> |
| 12751 | module x { |
| 12752 | |
| 12753 | type record of integer rofT; |
| 12754 | |
| 12755 | const rofT c1:= { 1, 2, 3 }; |
| 12756 | const rofT c2:= { 4, 5, 6 }; |
| 12757 | |
| 12758 | type port portT message { |
| 12759 | in rofT |
| 12760 | } with {extension "internal"} |
| 12761 | |
| 12762 | type component c { |
| 12763 | port portT myPort; |
| 12764 | } |
| 12765 | |
| 12766 | function myFunct() runs on c { |
| 12767 | |
| 12768 | alt{ |
| 12769 | [] myPort.receive( (c1..c2) ) |
| 12770 | {} |
| 12771 | } |
| 12772 | } |
| 12773 | |
| 12774 | } |
| 12775 | <END_MODULE> |
| 12776 | <RESULT IF_PASS COUNT 1> |
| 12777 | (?im)error.+?value.+?range.+?match.+?cannot.+?used |
| 12778 | <END_RESULT> |
| 12779 | <RESULT IF_PASS COUNT 1> |
| 12780 | (?is)\berror: |
| 12781 | <END_RESULT> |
| 12782 | <END_TC> |
| 12783 | |
| 12784 | :exmp. |
| 12785 | |
| 12786 | .*---------------------------------------------------------------------* |
| 12787 | :h4.Allowed matching mechanisms - inline-template range (set in function) |
| 12788 | .*---------------------------------------------------------------------* |
| 12789 | :xmp tab=0. |
| 12790 | |
| 12791 | <TC - Allowed matching mechanisms - inline-template range (set in function)> |
| 12792 | |
| 12793 | <COMPILE> |
| 12794 | <VERDICT_LEAF PASS> |
| 12795 | <MODULE TTCN x x.ttcn> |
| 12796 | module x { |
| 12797 | |
| 12798 | type set setT{ |
| 12799 | integer f1, |
| 12800 | float f2, |
| 12801 | charstring f3 |
| 12802 | } |
| 12803 | |
| 12804 | type port portT message { |
| 12805 | in setT |
| 12806 | } with {extension "internal"} |
| 12807 | |
| 12808 | type component c { |
| 12809 | port portT myPort; |
| 12810 | } |
| 12811 | |
| 12812 | const setT c1:= { f1:= 1, f2:= 2.0, f3:= "a"}; |
| 12813 | const setT c2:= { f1:= 5, f2:= 7.0, f3:= "z"}; |
| 12814 | |
| 12815 | function myFunct() runs on c { |
| 12816 | |
| 12817 | alt{ |
| 12818 | [] myPort.receive( (c1..c2) ) |
| 12819 | {} |
| 12820 | } |
| 12821 | } |
| 12822 | |
| 12823 | } |
| 12824 | <END_MODULE> |
| 12825 | <RESULT IF_PASS COUNT 1> |
| 12826 | (?im)error.+?value.+?range.+?match.+?cannot.+?used |
| 12827 | <END_RESULT> |
| 12828 | <RESULT IF_PASS COUNT 1> |
| 12829 | (?is)\berror: |
| 12830 | <END_RESULT> |
| 12831 | <END_TC> |
| 12832 | |
| 12833 | :exmp. |
| 12834 | |
| 12835 | .*---------------------------------------------------------------------* |
| 12836 | :h4.Allowed matching mechanisms - inline-template range (set of in function) |
| 12837 | .*---------------------------------------------------------------------* |
| 12838 | :xmp tab=0. |
| 12839 | |
| 12840 | <TC - Allowed matching mechanisms - inline-template range (set of in function)> |
| 12841 | |
| 12842 | <COMPILE> |
| 12843 | <VERDICT_LEAF PASS> |
| 12844 | <MODULE TTCN x x.ttcn> |
| 12845 | module x { |
| 12846 | |
| 12847 | type set of integer sofT; |
| 12848 | |
| 12849 | const sofT c1:= { 1, 2, 3 }; |
| 12850 | const sofT c2:= { 4, 5, 6 }; |
| 12851 | |
| 12852 | type port portT message { |
| 12853 | in sofT |
| 12854 | } with {extension "internal"} |
| 12855 | |
| 12856 | type component c { |
| 12857 | port portT myPort; |
| 12858 | } |
| 12859 | |
| 12860 | function myFunct() runs on c { |
| 12861 | |
| 12862 | alt{ |
| 12863 | [] myPort.receive( (c1..c2) ) |
| 12864 | {} |
| 12865 | } |
| 12866 | } |
| 12867 | |
| 12868 | } |
| 12869 | <END_MODULE> |
| 12870 | <RESULT IF_PASS COUNT 1> |
| 12871 | (?im)error.+?value.+?range.+?match.+?cannot.+?used |
| 12872 | <END_RESULT> |
| 12873 | <RESULT IF_PASS COUNT 1> |
| 12874 | (?is)\berror: |
| 12875 | <END_RESULT> |
| 12876 | <END_TC> |
| 12877 | |
| 12878 | :exmp. |
| 12879 | |
| 12880 | .*---------------------------------------------------------------------* |
| 12881 | :h4.Allowed matching mechanisms - inline-template range (enumerated in function) |
| 12882 | .*---------------------------------------------------------------------* |
| 12883 | :xmp tab=0. |
| 12884 | |
| 12885 | <TC - Allowed matching mechanisms - inline-template range (enumerated in function)> |
| 12886 | |
| 12887 | <COMPILE> |
| 12888 | <VERDICT_LEAF PASS> |
| 12889 | <MODULE TTCN x x.ttcn> |
| 12890 | module x { |
| 12891 | |
| 12892 | type enumerated enumT { ONE(1), TWO(2), THREE(3) }; |
| 12893 | |
| 12894 | const enumT c1:= ONE; |
| 12895 | const enumT c2:= TWO; |
| 12896 | |
| 12897 | type port portT message { |
| 12898 | in enumT |
| 12899 | } with {extension "internal"} |
| 12900 | |
| 12901 | type component c { |
| 12902 | port portT myPort; |
| 12903 | } |
| 12904 | |
| 12905 | function myFunct() runs on c { |
| 12906 | |
| 12907 | alt{ |
| 12908 | [] myPort.receive( (c1..c2) ) |
| 12909 | {} |
| 12910 | } |
| 12911 | } |
| 12912 | |
| 12913 | } |
| 12914 | <END_MODULE> |
| 12915 | <RESULT IF_PASS COUNT 1> |
| 12916 | (?im)error.+?value.+?range.+?match.+?cannot.+?used |
| 12917 | <END_RESULT> |
| 12918 | <RESULT IF_PASS COUNT 1> |
| 12919 | (?is)\berror: |
| 12920 | <END_RESULT> |
| 12921 | <END_TC> |
| 12922 | |
| 12923 | :exmp. |
| 12924 | |
| 12925 | .*---------------------------------------------------------------------* |
| 12926 | :h4.Allowed matching mechanisms - inline-template range (union in function) |
| 12927 | .*---------------------------------------------------------------------* |
| 12928 | :xmp tab=0. |
| 12929 | |
| 12930 | <TC - Allowed matching mechanisms - inline-template range (union in function)> |
| 12931 | |
| 12932 | <COMPILE> |
| 12933 | <VERDICT_LEAF PASS> |
| 12934 | <MODULE TTCN x x.ttcn> |
| 12935 | module x { |
| 12936 | |
| 12937 | type union uniT{ |
| 12938 | integer f1, |
| 12939 | float f2, |
| 12940 | charstring f3 |
| 12941 | } |
| 12942 | |
| 12943 | const uniT c1:= { f1:= 1 }; |
| 12944 | const uniT c2:= { f1:= 5 }; |
| 12945 | |
| 12946 | type port portT message { |
| 12947 | in uniT |
| 12948 | } with {extension "internal"} |
| 12949 | |
| 12950 | type component c { |
| 12951 | port portT myPort; |
| 12952 | } |
| 12953 | |
| 12954 | function myFunct() runs on c { |
| 12955 | |
| 12956 | alt{ |
| 12957 | [] myPort.receive( (c1..c2) ) |
| 12958 | {} |
| 12959 | } |
| 12960 | } |
| 12961 | |
| 12962 | } |
| 12963 | <END_MODULE> |
| 12964 | <RESULT IF_PASS COUNT 1> |
| 12965 | (?im)error.+?value.+?range.+?match.+?cannot.+?used |
| 12966 | <END_RESULT> |
| 12967 | <RESULT IF_PASS COUNT 1> |
| 12968 | (?is)\berror: |
| 12969 | <END_RESULT> |
| 12970 | <END_TC> |
| 12971 | |
| 12972 | :exmp. |
| 12973 | |
| 12974 | .*---------------------------------------------------------------------* |
| 12975 | :h4.Allowed matching mechanisms - inline-template range (array in function) |
| 12976 | .*---------------------------------------------------------------------* |
| 12977 | :xmp tab=0. |
| 12978 | |
| 12979 | <TC - Allowed matching mechanisms - inline-template range (array in function)> |
| 12980 | |
| 12981 | <COMPILE> |
| 12982 | <VERDICT_LEAF PASS> |
| 12983 | <MODULE TTCN x x.ttcn> |
| 12984 | module x { |
| 12985 | |
| 12986 | type integer arrint[1]; |
| 12987 | |
| 12988 | const arrint c1:= { 1 }; |
| 12989 | const arrint c2:= { 5 }; |
| 12990 | |
| 12991 | type port portT message { |
| 12992 | in arrint |
| 12993 | } with {extension "internal"} |
| 12994 | |
| 12995 | type component c { |
| 12996 | port portT myPort; |
| 12997 | } |
| 12998 | |
| 12999 | function myFunct() runs on c { |
| 13000 | //TR 728 |
| 13001 | alt{ |
| 13002 | [] myPort.receive( (c1..c2) ) |
| 13003 | {} |
| 13004 | } |
| 13005 | } |
| 13006 | |
| 13007 | } |
| 13008 | <END_MODULE> |
| 13009 | <RESULT IF_PASS COUNT 1> |
| 13010 | (?im)error.+?value.+?range.+?match.+?cannot.+?used |
| 13011 | <END_RESULT> |
| 13012 | <RESULT IF_PASS COUNT 1> |
| 13013 | (?is)\berror: |
| 13014 | <END_RESULT> |
| 13015 | <END_TC> |
| 13016 | |
| 13017 | :exmp. |
| 13018 | |
| 13019 | |
| 13020 | .*---------------------------------------------------------------------* |
| 13021 | :h4.Allowed matching mechanisms - inline-template superset (boolean in function) |
| 13022 | .*---------------------------------------------------------------------* |
| 13023 | :xmp tab=0. |
| 13024 | |
| 13025 | <TC - Allowed matching mechanisms - inline-template superset (boolean in function)> |
| 13026 | |
| 13027 | <COMPILE> |
| 13028 | <VERDICT_LEAF PASS> |
| 13029 | <MODULE TTCN x x.ttcn> |
| 13030 | module x { |
| 13031 | |
| 13032 | const boolean c1:= false; |
| 13033 | const boolean c2:= true; |
| 13034 | |
| 13035 | type port portT message { |
| 13036 | in boolean |
| 13037 | } with {extension "internal"} |
| 13038 | |
| 13039 | type component c { |
| 13040 | port portT myPort; |
| 13041 | } |
| 13042 | |
| 13043 | function myFunct() runs on c { |
| 13044 | |
| 13045 | alt{ |
| 13046 | [] myPort.receive( superset(c1,c2) ) |
| 13047 | {} |
| 13048 | } |
| 13049 | } |
| 13050 | |
| 13051 | } |
| 13052 | <END_MODULE> |
| 13053 | <RESULT IF_PASS COUNT 1> |
| 13054 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 13055 | <END_RESULT> |
| 13056 | <RESULT IF_PASS COUNT 1> |
| 13057 | (?is)\berror: |
| 13058 | <END_RESULT> |
| 13059 | <END_TC> |
| 13060 | |
| 13061 | :exmp. |
| 13062 | |
| 13063 | .*---------------------------------------------------------------------* |
| 13064 | :h4.Allowed matching mechanisms - inline-template superset (integer in function) |
| 13065 | .*---------------------------------------------------------------------* |
| 13066 | :xmp tab=0. |
| 13067 | |
| 13068 | <TC - Allowed matching mechanisms - inline-template superset (integer in function)> |
| 13069 | |
| 13070 | <COMPILE> |
| 13071 | <VERDICT_LEAF PASS> |
| 13072 | <MODULE TTCN x x.ttcn> |
| 13073 | module x { |
| 13074 | |
| 13075 | const integer c1:= 1; |
| 13076 | const integer c2:= 5; |
| 13077 | |
| 13078 | type port portT message { |
| 13079 | in integer |
| 13080 | } with {extension "internal"} |
| 13081 | |
| 13082 | type component c { |
| 13083 | port portT myPort; |
| 13084 | } |
| 13085 | |
| 13086 | function myFunct() runs on c { |
| 13087 | |
| 13088 | alt{ |
| 13089 | [] myPort.receive( superset(c1,c2) ) |
| 13090 | {} |
| 13091 | } |
| 13092 | } |
| 13093 | |
| 13094 | } |
| 13095 | <END_MODULE> |
| 13096 | <RESULT IF_PASS COUNT 1> |
| 13097 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 13098 | <END_RESULT> |
| 13099 | <RESULT IF_PASS COUNT 1> |
| 13100 | (?is)\berror: |
| 13101 | <END_RESULT> |
| 13102 | <END_TC> |
| 13103 | |
| 13104 | :exmp. |
| 13105 | |
| 13106 | .*---------------------------------------------------------------------* |
| 13107 | :h4.Allowed matching mechanisms - inline-template superset (float in function) |
| 13108 | .*---------------------------------------------------------------------* |
| 13109 | :xmp tab=0. |
| 13110 | |
| 13111 | <TC - Allowed matching mechanisms - inline-template superset (float in function)> |
| 13112 | |
| 13113 | <COMPILE> |
| 13114 | <VERDICT_LEAF PASS> |
| 13115 | <MODULE TTCN x x.ttcn> |
| 13116 | module x { |
| 13117 | |
| 13118 | const float c1:= 1.0; |
| 13119 | const float c2:= 5.0; |
| 13120 | |
| 13121 | type port portT message { |
| 13122 | in float |
| 13123 | } with {extension "internal"} |
| 13124 | |
| 13125 | type component c { |
| 13126 | port portT myPort; |
| 13127 | } |
| 13128 | |
| 13129 | function myFunct() runs on c { |
| 13130 | |
| 13131 | alt{ |
| 13132 | [] myPort.receive( superset(c1,c2) ) |
| 13133 | {} |
| 13134 | } |
| 13135 | } |
| 13136 | |
| 13137 | } |
| 13138 | <END_MODULE> |
| 13139 | <RESULT IF_PASS COUNT 1> |
| 13140 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 13141 | <END_RESULT> |
| 13142 | <RESULT IF_PASS COUNT 1> |
| 13143 | (?is)\berror: |
| 13144 | <END_RESULT> |
| 13145 | <END_TC> |
| 13146 | |
| 13147 | :exmp. |
| 13148 | |
| 13149 | .*---------------------------------------------------------------------* |
| 13150 | :h4.Allowed matching mechanisms - inline-template superset (bitstring in function) |
| 13151 | .*---------------------------------------------------------------------* |
| 13152 | :xmp tab=0. |
| 13153 | |
| 13154 | <TC - Allowed matching mechanisms - inline-template superset (bitstring in function)> |
| 13155 | |
| 13156 | <COMPILE> |
| 13157 | <VERDICT_LEAF PASS> |
| 13158 | <MODULE TTCN x x.ttcn> |
| 13159 | module x { |
| 13160 | |
| 13161 | const bitstring c1:= '0000'B; |
| 13162 | const bitstring c2:= '1111'B; |
| 13163 | |
| 13164 | type port portT message { |
| 13165 | in bitstring |
| 13166 | } with {extension "internal"} |
| 13167 | |
| 13168 | type component c { |
| 13169 | port portT myPort; |
| 13170 | } |
| 13171 | |
| 13172 | function myFunct() runs on c { |
| 13173 | |
| 13174 | alt{ |
| 13175 | [] myPort.receive( superset(c1,c2) ) |
| 13176 | {} |
| 13177 | } |
| 13178 | } |
| 13179 | |
| 13180 | } |
| 13181 | <END_MODULE> |
| 13182 | <RESULT IF_PASS COUNT 1> |
| 13183 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 13184 | <END_RESULT> |
| 13185 | <RESULT IF_PASS COUNT 1> |
| 13186 | (?is)\berror: |
| 13187 | <END_RESULT> |
| 13188 | <END_TC> |
| 13189 | |
| 13190 | :exmp. |
| 13191 | |
| 13192 | .*---------------------------------------------------------------------* |
| 13193 | :h4.Allowed matching mechanisms - inline-template superset (octetstring in function) |
| 13194 | .*---------------------------------------------------------------------* |
| 13195 | :xmp tab=0. |
| 13196 | |
| 13197 | <TC - Allowed matching mechanisms - inline-template superset (octetstring in function)> |
| 13198 | |
| 13199 | <COMPILE> |
| 13200 | <VERDICT_LEAF PASS> |
| 13201 | <MODULE TTCN x x.ttcn> |
| 13202 | module x { |
| 13203 | |
| 13204 | const octetstring c1:= '0000'O; |
| 13205 | const octetstring c2:= '1111'O; |
| 13206 | |
| 13207 | type port portT message { |
| 13208 | in octetstring |
| 13209 | } with {extension "internal"} |
| 13210 | |
| 13211 | type component c { |
| 13212 | port portT myPort; |
| 13213 | } |
| 13214 | |
| 13215 | function myFunct() runs on c { |
| 13216 | |
| 13217 | alt{ |
| 13218 | [] myPort.receive( superset(c1,c2) ) |
| 13219 | {} |
| 13220 | } |
| 13221 | } |
| 13222 | |
| 13223 | } |
| 13224 | <END_MODULE> |
| 13225 | <RESULT IF_PASS COUNT 1> |
| 13226 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 13227 | <END_RESULT> |
| 13228 | <RESULT IF_PASS COUNT 1> |
| 13229 | (?is)\berror: |
| 13230 | <END_RESULT> |
| 13231 | <END_TC> |
| 13232 | |
| 13233 | :exmp. |
| 13234 | |
| 13235 | .*---------------------------------------------------------------------* |
| 13236 | :h4.Allowed matching mechanisms - inline-template superset (hexstring in function) |
| 13237 | .*---------------------------------------------------------------------* |
| 13238 | :xmp tab=0. |
| 13239 | |
| 13240 | <TC - Allowed matching mechanisms - inline-template superset (hexstring in function)> |
| 13241 | |
| 13242 | <COMPILE> |
| 13243 | <VERDICT_LEAF PASS> |
| 13244 | <MODULE TTCN x x.ttcn> |
| 13245 | module x { |
| 13246 | |
| 13247 | const hexstring c1:= '0000'H; |
| 13248 | const hexstring c2:= '1111'H; |
| 13249 | |
| 13250 | type port portT message { |
| 13251 | in hexstring |
| 13252 | } with {extension "internal"} |
| 13253 | |
| 13254 | type component c { |
| 13255 | port portT myPort; |
| 13256 | } |
| 13257 | |
| 13258 | function myFunct() runs on c { |
| 13259 | |
| 13260 | alt{ |
| 13261 | [] myPort.receive( superset(c1,c2) ) |
| 13262 | {} |
| 13263 | } |
| 13264 | } |
| 13265 | |
| 13266 | } |
| 13267 | <END_MODULE> |
| 13268 | <RESULT IF_PASS COUNT 1> |
| 13269 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 13270 | <END_RESULT> |
| 13271 | <RESULT IF_PASS COUNT 1> |
| 13272 | (?is)\berror: |
| 13273 | <END_RESULT> |
| 13274 | <END_TC> |
| 13275 | |
| 13276 | :exmp. |
| 13277 | |
| 13278 | .*---------------------------------------------------------------------* |
| 13279 | :h4.Allowed matching mechanisms - inline-template superset (charstring in function) |
| 13280 | .*---------------------------------------------------------------------* |
| 13281 | :xmp tab=0. |
| 13282 | |
| 13283 | <TC - Allowed matching mechanisms - inline-template superset (charstring in function)> |
| 13284 | |
| 13285 | <COMPILE> |
| 13286 | <VERDICT_LEAF PASS> |
| 13287 | <MODULE TTCN x x.ttcn> |
| 13288 | module x { |
| 13289 | |
| 13290 | const charstring c1:= "a"; |
| 13291 | const charstring c2:= "z"; |
| 13292 | |
| 13293 | type port portT message { |
| 13294 | in charstring |
| 13295 | } with {extension "internal"} |
| 13296 | |
| 13297 | type component c { |
| 13298 | port portT myPort; |
| 13299 | } |
| 13300 | |
| 13301 | function myFunct() runs on c { |
| 13302 | |
| 13303 | alt{ |
| 13304 | [] myPort.receive( superset(c1,c2) ) |
| 13305 | {} |
| 13306 | } |
| 13307 | } |
| 13308 | |
| 13309 | } |
| 13310 | <END_MODULE> |
| 13311 | <RESULT IF_PASS COUNT 1> |
| 13312 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 13313 | <END_RESULT> |
| 13314 | <RESULT IF_PASS COUNT 1> |
| 13315 | (?is)\berror: |
| 13316 | <END_RESULT> |
| 13317 | <END_TC> |
| 13318 | |
| 13319 | :exmp. |
| 13320 | |
| 13321 | .*---------------------------------------------------------------------* |
| 13322 | :h4.Allowed matching mechanisms - inline-template superset (record in function) |
| 13323 | .*---------------------------------------------------------------------* |
| 13324 | :xmp tab=0. |
| 13325 | |
| 13326 | <TC - Allowed matching mechanisms - inline-template superset (record in function)> |
| 13327 | |
| 13328 | <COMPILE> |
| 13329 | <VERDICT_LEAF PASS> |
| 13330 | <MODULE TTCN x x.ttcn> |
| 13331 | module x { |
| 13332 | |
| 13333 | type record recT{ |
| 13334 | integer f1, |
| 13335 | float f2, |
| 13336 | charstring f3 |
| 13337 | } |
| 13338 | |
| 13339 | const recT c1:= { f1:= 1, f2:= 2.0, f3:= "a"}; |
| 13340 | const recT c2:= { f1:= 5, f2:= 7.0, f3:= "z"}; |
| 13341 | |
| 13342 | type port portT message { |
| 13343 | in recT |
| 13344 | } with {extension "internal"} |
| 13345 | |
| 13346 | type component c { |
| 13347 | port portT myPort; |
| 13348 | } |
| 13349 | |
| 13350 | function myFunct() runs on c { |
| 13351 | |
| 13352 | alt{ |
| 13353 | [] myPort.receive( superset(c1,c2) ) |
| 13354 | {} |
| 13355 | } |
| 13356 | } |
| 13357 | |
| 13358 | } |
| 13359 | <END_MODULE> |
| 13360 | <RESULT IF_PASS COUNT 1> |
| 13361 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 13362 | <END_RESULT> |
| 13363 | <RESULT IF_PASS COUNT 1> |
| 13364 | (?is)\berror: |
| 13365 | <END_RESULT> |
| 13366 | <END_TC> |
| 13367 | |
| 13368 | :exmp. |
| 13369 | |
| 13370 | .*---------------------------------------------------------------------* |
| 13371 | :h4.Allowed matching mechanisms - inline-template superset (record of in function) |
| 13372 | .*---------------------------------------------------------------------* |
| 13373 | :xmp tab=0. |
| 13374 | |
| 13375 | <TC - Allowed matching mechanisms - inline-template superset (record of in function)> |
| 13376 | |
| 13377 | <COMPILE> |
| 13378 | <VERDICT_LEAF PASS> |
| 13379 | <MODULE TTCN x x.ttcn> |
| 13380 | module x { |
| 13381 | |
| 13382 | type record of integer rofT; |
| 13383 | |
| 13384 | const rofT c1:= { 1, 2, 3 }; |
| 13385 | const rofT c2:= { 4, 5, 6 }; |
| 13386 | |
| 13387 | type port portT message { |
| 13388 | in rofT |
| 13389 | } with {extension "internal"} |
| 13390 | |
| 13391 | type component c { |
| 13392 | port portT myPort; |
| 13393 | } |
| 13394 | |
| 13395 | function myFunct() runs on c { |
| 13396 | |
| 13397 | alt{ |
| 13398 | [] myPort.receive( superset(c1,c2) ) |
| 13399 | {} |
| 13400 | } |
| 13401 | } |
| 13402 | |
| 13403 | } |
| 13404 | <END_MODULE> |
| 13405 | <RESULT IF_PASS COUNT 1> |
| 13406 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 13407 | <END_RESULT> |
| 13408 | <RESULT IF_PASS COUNT 1> |
| 13409 | (?is)\berror: |
| 13410 | <END_RESULT> |
| 13411 | <END_TC> |
| 13412 | |
| 13413 | :exmp. |
| 13414 | |
| 13415 | .*---------------------------------------------------------------------* |
| 13416 | :h4.Allowed matching mechanisms - inline-template superset (set in function) |
| 13417 | .*---------------------------------------------------------------------* |
| 13418 | :xmp tab=0. |
| 13419 | |
| 13420 | <TC - Allowed matching mechanisms - inline-template superset (set in function)> |
| 13421 | |
| 13422 | <COMPILE> |
| 13423 | <VERDICT_LEAF PASS> |
| 13424 | <MODULE TTCN x x.ttcn> |
| 13425 | module x { |
| 13426 | |
| 13427 | type set setT{ |
| 13428 | integer f1, |
| 13429 | float f2, |
| 13430 | charstring f3 |
| 13431 | } |
| 13432 | |
| 13433 | const setT c1:= { f1:= 1, f2:= 2.0, f3:= "a"}; |
| 13434 | const setT c2:= { f1:= 5, f2:= 7.0, f3:= "z"}; |
| 13435 | |
| 13436 | type port portT message { |
| 13437 | in setT |
| 13438 | } with {extension "internal"} |
| 13439 | |
| 13440 | type component c { |
| 13441 | port portT myPort; |
| 13442 | } |
| 13443 | |
| 13444 | function myFunct() runs on c { |
| 13445 | |
| 13446 | alt{ |
| 13447 | [] myPort.receive( superset(c1,c2) ) |
| 13448 | {} |
| 13449 | } |
| 13450 | } |
| 13451 | |
| 13452 | } |
| 13453 | <END_MODULE> |
| 13454 | <RESULT IF_PASS COUNT 1> |
| 13455 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 13456 | <END_RESULT> |
| 13457 | <RESULT IF_PASS COUNT 1> |
| 13458 | (?is)\berror: |
| 13459 | <END_RESULT> |
| 13460 | <END_TC> |
| 13461 | |
| 13462 | :exmp. |
| 13463 | |
| 13464 | .*---------------------------------------------------------------------* |
| 13465 | :h4.Allowed matching mechanisms - inline-template superset (enumerated in function) |
| 13466 | .*---------------------------------------------------------------------* |
| 13467 | :xmp tab=0. |
| 13468 | |
| 13469 | <TC - Allowed matching mechanisms - inline-template superset (enumerated in function)> |
| 13470 | |
| 13471 | <COMPILE> |
| 13472 | <VERDICT_LEAF PASS> |
| 13473 | <MODULE TTCN x x.ttcn> |
| 13474 | module x { |
| 13475 | |
| 13476 | type enumerated enumT { ONE(1), TWO(2), THREE(3) }; |
| 13477 | |
| 13478 | const enumT c1:= ONE; |
| 13479 | const enumT c2:= TWO; |
| 13480 | |
| 13481 | type port portT message { |
| 13482 | in enumT |
| 13483 | } with {extension "internal"} |
| 13484 | |
| 13485 | type component c { |
| 13486 | port portT myPort; |
| 13487 | } |
| 13488 | |
| 13489 | function myFunct() runs on c { |
| 13490 | |
| 13491 | alt{ |
| 13492 | [] myPort.receive( superset(c1,c2) ) |
| 13493 | {} |
| 13494 | } |
| 13495 | } |
| 13496 | |
| 13497 | } |
| 13498 | <END_MODULE> |
| 13499 | <RESULT IF_PASS COUNT 1> |
| 13500 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 13501 | <END_RESULT> |
| 13502 | <RESULT IF_PASS COUNT 1> |
| 13503 | (?is)\berror: |
| 13504 | <END_RESULT> |
| 13505 | <END_TC> |
| 13506 | |
| 13507 | :exmp. |
| 13508 | |
| 13509 | .*---------------------------------------------------------------------* |
| 13510 | :h4.Allowed matching mechanisms - inline-template superset (union in function) |
| 13511 | .*---------------------------------------------------------------------* |
| 13512 | :xmp tab=0. |
| 13513 | |
| 13514 | <TC - Allowed matching mechanisms - inline-template superset (union in function)> |
| 13515 | |
| 13516 | <COMPILE> |
| 13517 | <VERDICT_LEAF PASS> |
| 13518 | <MODULE TTCN x x.ttcn> |
| 13519 | module x { |
| 13520 | |
| 13521 | type union uniT{ |
| 13522 | integer f1, |
| 13523 | float f2, |
| 13524 | charstring f3 |
| 13525 | } |
| 13526 | |
| 13527 | const uniT c1:= { f3:= "a"}; |
| 13528 | const uniT c2:= { f3:= "z"}; |
| 13529 | |
| 13530 | type port portT message { |
| 13531 | in uniT |
| 13532 | } with {extension "internal"} |
| 13533 | |
| 13534 | type component c { |
| 13535 | port portT myPort; |
| 13536 | } |
| 13537 | |
| 13538 | function myFunct() runs on c { |
| 13539 | |
| 13540 | alt{ |
| 13541 | [] myPort.receive( superset(c1,c2) ) |
| 13542 | {} |
| 13543 | } |
| 13544 | } |
| 13545 | |
| 13546 | } |
| 13547 | <END_MODULE> |
| 13548 | <RESULT IF_PASS COUNT 1> |
| 13549 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 13550 | <END_RESULT> |
| 13551 | <RESULT IF_PASS COUNT 1> |
| 13552 | (?is)\berror: |
| 13553 | <END_RESULT> |
| 13554 | <END_TC> |
| 13555 | |
| 13556 | :exmp. |
| 13557 | |
| 13558 | .*---------------------------------------------------------------------* |
| 13559 | :h4.Allowed matching mechanisms - inline-template superset (array in function) |
| 13560 | .*---------------------------------------------------------------------* |
| 13561 | :xmp tab=0. |
| 13562 | |
| 13563 | <TC - Allowed matching mechanisms - inline-template superset (array in function)> |
| 13564 | |
| 13565 | <COMPILE> |
| 13566 | <VERDICT_LEAF PASS> |
| 13567 | <MODULE TTCN x x.ttcn> |
| 13568 | module x { |
| 13569 | |
| 13570 | type integer arrint[1]; |
| 13571 | |
| 13572 | const arrint c1:= { 1 }; |
| 13573 | const arrint c2:= { 5 }; |
| 13574 | |
| 13575 | type port portT message { |
| 13576 | in arrint |
| 13577 | } with {extension "internal"} |
| 13578 | |
| 13579 | type component c { |
| 13580 | port portT myPort; |
| 13581 | } |
| 13582 | |
| 13583 | function myFunct() runs on c { |
| 13584 | |
| 13585 | alt{ |
| 13586 | [] myPort.receive( superset(c1,c2) ) |
| 13587 | {} |
| 13588 | } |
| 13589 | } |
| 13590 | |
| 13591 | } |
| 13592 | <END_MODULE> |
| 13593 | <RESULT IF_PASS COUNT 1> |
| 13594 | (?im)error.+?superset.+?match.+?cannot.+?used |
| 13595 | <END_RESULT> |
| 13596 | <RESULT IF_PASS COUNT 1> |
| 13597 | (?is)\berror: |
| 13598 | <END_RESULT> |
| 13599 | <END_TC> |
| 13600 | |
| 13601 | :exmp. |
| 13602 | |
| 13603 | .*---------------------------------------------------------------------* |
| 13604 | :h4.Allowed matching mechanisms - inline-template subset (boolean in function) |
| 13605 | .*---------------------------------------------------------------------* |
| 13606 | :xmp tab=0. |
| 13607 | |
| 13608 | <TC - Allowed matching mechanisms - inline-template subset (boolean in function)> |
| 13609 | |
| 13610 | <COMPILE> |
| 13611 | <VERDICT_LEAF PASS> |
| 13612 | <MODULE TTCN x x.ttcn> |
| 13613 | module x { |
| 13614 | |
| 13615 | const boolean c1:= false; |
| 13616 | const boolean c2:= true; |
| 13617 | |
| 13618 | type port portT message { |
| 13619 | in boolean |
| 13620 | } with {extension "internal"} |
| 13621 | |
| 13622 | type component c { |
| 13623 | port portT myPort; |
| 13624 | } |
| 13625 | |
| 13626 | function myFunct() runs on c { |
| 13627 | |
| 13628 | alt{ |
| 13629 | [] myPort.receive( subset(c1,c2) ) |
| 13630 | {} |
| 13631 | } |
| 13632 | } |
| 13633 | |
| 13634 | } |
| 13635 | <END_MODULE> |
| 13636 | <RESULT IF_PASS COUNT 1> |
| 13637 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 13638 | <END_RESULT> |
| 13639 | <RESULT IF_PASS COUNT 1> |
| 13640 | (?is)\berror: |
| 13641 | <END_RESULT> |
| 13642 | <END_TC> |
| 13643 | |
| 13644 | :exmp. |
| 13645 | |
| 13646 | .*---------------------------------------------------------------------* |
| 13647 | :h4.Allowed matching mechanisms - inline-template subset (integer in function) |
| 13648 | .*---------------------------------------------------------------------* |
| 13649 | :xmp tab=0. |
| 13650 | |
| 13651 | <TC - Allowed matching mechanisms - inline-template subset (integer in function)> |
| 13652 | |
| 13653 | <COMPILE> |
| 13654 | <VERDICT_LEAF PASS> |
| 13655 | <MODULE TTCN x x.ttcn> |
| 13656 | module x { |
| 13657 | |
| 13658 | const integer c1:= 1; |
| 13659 | const integer c2:= 5; |
| 13660 | |
| 13661 | type port portT message { |
| 13662 | in integer |
| 13663 | } with {extension "internal"} |
| 13664 | |
| 13665 | type component c { |
| 13666 | port portT myPort; |
| 13667 | } |
| 13668 | |
| 13669 | function myFunct() runs on c { |
| 13670 | |
| 13671 | alt{ |
| 13672 | [] myPort.receive( subset(c1,c2) ) |
| 13673 | {} |
| 13674 | } |
| 13675 | } |
| 13676 | |
| 13677 | } |
| 13678 | <END_MODULE> |
| 13679 | <RESULT IF_PASS COUNT 1> |
| 13680 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 13681 | <END_RESULT> |
| 13682 | <RESULT IF_PASS COUNT 1> |
| 13683 | (?is)\berror: |
| 13684 | <END_RESULT> |
| 13685 | <END_TC> |
| 13686 | |
| 13687 | :exmp. |
| 13688 | |
| 13689 | .*---------------------------------------------------------------------* |
| 13690 | :h4.Allowed matching mechanisms - inline-template subset (float in function) |
| 13691 | .*---------------------------------------------------------------------* |
| 13692 | :xmp tab=0. |
| 13693 | |
| 13694 | <TC - Allowed matching mechanisms - inline-template subset (float in function)> |
| 13695 | |
| 13696 | <COMPILE> |
| 13697 | <VERDICT_LEAF PASS> |
| 13698 | <MODULE TTCN x x.ttcn> |
| 13699 | module x { |
| 13700 | |
| 13701 | const float c1:= 1.0; |
| 13702 | const float c2:= 5.0; |
| 13703 | |
| 13704 | type port portT message { |
| 13705 | in float |
| 13706 | } with {extension "internal"} |
| 13707 | |
| 13708 | type component c { |
| 13709 | port portT myPort; |
| 13710 | } |
| 13711 | |
| 13712 | function myFunct() runs on c { |
| 13713 | |
| 13714 | alt{ |
| 13715 | [] myPort.receive( subset(c1,c2) ) |
| 13716 | {} |
| 13717 | } |
| 13718 | } |
| 13719 | |
| 13720 | } |
| 13721 | <END_MODULE> |
| 13722 | <RESULT IF_PASS COUNT 1> |
| 13723 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 13724 | <END_RESULT> |
| 13725 | <RESULT IF_PASS COUNT 1> |
| 13726 | (?is)\berror: |
| 13727 | <END_RESULT> |
| 13728 | <END_TC> |
| 13729 | |
| 13730 | :exmp. |
| 13731 | |
| 13732 | .*---------------------------------------------------------------------* |
| 13733 | :h4.Allowed matching mechanisms - inline-template subset (bitstring in function) |
| 13734 | .*---------------------------------------------------------------------* |
| 13735 | :xmp tab=0. |
| 13736 | |
| 13737 | <TC - Allowed matching mechanisms - inline-template subset (bitstring in function)> |
| 13738 | |
| 13739 | <COMPILE> |
| 13740 | <VERDICT_LEAF PASS> |
| 13741 | <MODULE TTCN x x.ttcn> |
| 13742 | module x { |
| 13743 | |
| 13744 | const bitstring c1:= '0000'B; |
| 13745 | const bitstring c2:= '1111'B; |
| 13746 | |
| 13747 | type port portT message { |
| 13748 | in bitstring |
| 13749 | } with {extension "internal"} |
| 13750 | |
| 13751 | type component c { |
| 13752 | port portT myPort; |
| 13753 | } |
| 13754 | |
| 13755 | function myFunct() runs on c { |
| 13756 | |
| 13757 | alt{ |
| 13758 | [] myPort.receive( subset(c1,c2) ) |
| 13759 | {} |
| 13760 | } |
| 13761 | } |
| 13762 | |
| 13763 | } |
| 13764 | <END_MODULE> |
| 13765 | <RESULT IF_PASS COUNT 1> |
| 13766 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 13767 | <END_RESULT> |
| 13768 | <RESULT IF_PASS COUNT 1> |
| 13769 | (?is)\berror: |
| 13770 | <END_RESULT> |
| 13771 | <END_TC> |
| 13772 | |
| 13773 | :exmp. |
| 13774 | |
| 13775 | .*---------------------------------------------------------------------* |
| 13776 | :h4.Allowed matching mechanisms - inline-template subset (octetstring in function) |
| 13777 | .*---------------------------------------------------------------------* |
| 13778 | :xmp tab=0. |
| 13779 | |
| 13780 | <TC - Allowed matching mechanisms - inline-template subset (octetstring in function)> |
| 13781 | |
| 13782 | <COMPILE> |
| 13783 | <VERDICT_LEAF PASS> |
| 13784 | <MODULE TTCN x x.ttcn> |
| 13785 | module x { |
| 13786 | |
| 13787 | const octetstring c1:= '0000'O; |
| 13788 | const octetstring c2:= '1111'O; |
| 13789 | |
| 13790 | type port portT message { |
| 13791 | in octetstring |
| 13792 | } with {extension "internal"} |
| 13793 | |
| 13794 | type component c { |
| 13795 | port portT myPort; |
| 13796 | } |
| 13797 | |
| 13798 | function myFunct() runs on c { |
| 13799 | |
| 13800 | alt{ |
| 13801 | [] myPort.receive( subset(c1,c2) ) |
| 13802 | {} |
| 13803 | } |
| 13804 | } |
| 13805 | |
| 13806 | } |
| 13807 | <END_MODULE> |
| 13808 | <RESULT IF_PASS COUNT 1> |
| 13809 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 13810 | <END_RESULT> |
| 13811 | <RESULT IF_PASS COUNT 1> |
| 13812 | (?is)\berror: |
| 13813 | <END_RESULT> |
| 13814 | <END_TC> |
| 13815 | |
| 13816 | :exmp. |
| 13817 | |
| 13818 | .*---------------------------------------------------------------------* |
| 13819 | :h4.Allowed matching mechanisms - inline-template subset (hexstring in function) |
| 13820 | .*---------------------------------------------------------------------* |
| 13821 | :xmp tab=0. |
| 13822 | |
| 13823 | <TC - Allowed matching mechanisms - inline-template subset (hexstring in function)> |
| 13824 | |
| 13825 | <COMPILE> |
| 13826 | <VERDICT_LEAF PASS> |
| 13827 | <MODULE TTCN x x.ttcn> |
| 13828 | module x { |
| 13829 | |
| 13830 | const hexstring c1:= '0000'H; |
| 13831 | const hexstring c2:= '1111'H; |
| 13832 | |
| 13833 | type port portT message { |
| 13834 | in hexstring |
| 13835 | } with {extension "internal"} |
| 13836 | |
| 13837 | type component c { |
| 13838 | port portT myPort; |
| 13839 | } |
| 13840 | |
| 13841 | function myFunct() runs on c { |
| 13842 | |
| 13843 | alt{ |
| 13844 | [] myPort.receive( subset(c1,c2) ) |
| 13845 | {} |
| 13846 | } |
| 13847 | } |
| 13848 | |
| 13849 | } |
| 13850 | <END_MODULE> |
| 13851 | <RESULT IF_PASS COUNT 1> |
| 13852 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 13853 | <END_RESULT> |
| 13854 | <RESULT IF_PASS COUNT 1> |
| 13855 | (?is)\berror: |
| 13856 | <END_RESULT> |
| 13857 | <END_TC> |
| 13858 | |
| 13859 | :exmp. |
| 13860 | |
| 13861 | .*---------------------------------------------------------------------* |
| 13862 | :h4.Allowed matching mechanisms - inline-template subset (charstring in function) |
| 13863 | .*---------------------------------------------------------------------* |
| 13864 | :xmp tab=0. |
| 13865 | |
| 13866 | <TC - Allowed matching mechanisms - inline-template subset (charstring in function)> |
| 13867 | |
| 13868 | <COMPILE> |
| 13869 | <VERDICT_LEAF PASS> |
| 13870 | <MODULE TTCN x x.ttcn> |
| 13871 | module x { |
| 13872 | |
| 13873 | const charstring c1:= "a"; |
| 13874 | const charstring c2:= "z"; |
| 13875 | |
| 13876 | type port portT message { |
| 13877 | in charstring |
| 13878 | } with {extension "internal"} |
| 13879 | |
| 13880 | type component c { |
| 13881 | port portT myPort; |
| 13882 | } |
| 13883 | |
| 13884 | function myFunct() runs on c { |
| 13885 | |
| 13886 | alt{ |
| 13887 | [] myPort.receive( subset(c1,c2) ) |
| 13888 | {} |
| 13889 | } |
| 13890 | } |
| 13891 | |
| 13892 | } |
| 13893 | <END_MODULE> |
| 13894 | <RESULT IF_PASS COUNT 1> |
| 13895 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 13896 | <END_RESULT> |
| 13897 | <RESULT IF_PASS COUNT 1> |
| 13898 | (?is)\berror: |
| 13899 | <END_RESULT> |
| 13900 | <END_TC> |
| 13901 | |
| 13902 | :exmp. |
| 13903 | |
| 13904 | .*---------------------------------------------------------------------* |
| 13905 | :h4.Allowed matching mechanisms - inline-template subset (record in function) |
| 13906 | .*---------------------------------------------------------------------* |
| 13907 | :xmp tab=0. |
| 13908 | |
| 13909 | <TC - Allowed matching mechanisms - inline-template subset (record in function)> |
| 13910 | |
| 13911 | <COMPILE> |
| 13912 | <VERDICT_LEAF PASS> |
| 13913 | <MODULE TTCN x x.ttcn> |
| 13914 | module x { |
| 13915 | |
| 13916 | type record recT{ |
| 13917 | integer f1, |
| 13918 | float f2, |
| 13919 | charstring f3 |
| 13920 | } |
| 13921 | |
| 13922 | const recT c1:= { f1:= 1, f2:= 2.0, f3:= "a"}; |
| 13923 | const recT c2:= { f1:= 5, f2:= 7.0, f3:= "z"}; |
| 13924 | |
| 13925 | type port portT message { |
| 13926 | in recT |
| 13927 | } with {extension "internal"} |
| 13928 | |
| 13929 | type component c { |
| 13930 | port portT myPort; |
| 13931 | } |
| 13932 | |
| 13933 | function myFunct() runs on c { |
| 13934 | |
| 13935 | alt{ |
| 13936 | [] myPort.receive( subset(c1,c2) ) |
| 13937 | {} |
| 13938 | } |
| 13939 | } |
| 13940 | |
| 13941 | } |
| 13942 | <END_MODULE> |
| 13943 | <RESULT IF_PASS COUNT 1> |
| 13944 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 13945 | <END_RESULT> |
| 13946 | <RESULT IF_PASS COUNT 1> |
| 13947 | (?is)\berror: |
| 13948 | <END_RESULT> |
| 13949 | <END_TC> |
| 13950 | |
| 13951 | :exmp. |
| 13952 | |
| 13953 | .*---------------------------------------------------------------------* |
| 13954 | :h4.Allowed matching mechanisms - inline-template subset (record of in function) |
| 13955 | .*---------------------------------------------------------------------* |
| 13956 | :xmp tab=0. |
| 13957 | |
| 13958 | <TC - Allowed matching mechanisms - inline-template subset (record of in function)> |
| 13959 | |
| 13960 | <COMPILE> |
| 13961 | <VERDICT_LEAF PASS> |
| 13962 | <MODULE TTCN x x.ttcn> |
| 13963 | module x { |
| 13964 | |
| 13965 | type record of integer rofT; |
| 13966 | |
| 13967 | const rofT c1:= { 1, 2, 3 }; |
| 13968 | const rofT c2:= { 4, 5, 6 }; |
| 13969 | |
| 13970 | type port portT message { |
| 13971 | in rofT |
| 13972 | } with {extension "internal"} |
| 13973 | |
| 13974 | type component c { |
| 13975 | port portT myPort; |
| 13976 | } |
| 13977 | |
| 13978 | function myFunct() runs on c { |
| 13979 | |
| 13980 | alt{ |
| 13981 | [] myPort.receive( subset(c1,c2) ) |
| 13982 | {} |
| 13983 | } |
| 13984 | } |
| 13985 | |
| 13986 | } |
| 13987 | <END_MODULE> |
| 13988 | <RESULT IF_PASS COUNT 1> |
| 13989 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 13990 | <END_RESULT> |
| 13991 | <RESULT IF_PASS COUNT 1> |
| 13992 | (?is)\berror: |
| 13993 | <END_RESULT> |
| 13994 | <END_TC> |
| 13995 | |
| 13996 | :exmp. |
| 13997 | |
| 13998 | .*---------------------------------------------------------------------* |
| 13999 | :h4.Allowed matching mechanisms - inline-template subset (set in function) |
| 14000 | .*---------------------------------------------------------------------* |
| 14001 | :xmp tab=0. |
| 14002 | |
| 14003 | <TC - Allowed matching mechanisms - inline-template subset (set in function)> |
| 14004 | |
| 14005 | <COMPILE> |
| 14006 | <VERDICT_LEAF PASS> |
| 14007 | <MODULE TTCN x x.ttcn> |
| 14008 | module x { |
| 14009 | |
| 14010 | type set setT{ |
| 14011 | integer f1, |
| 14012 | float f2, |
| 14013 | charstring f3 |
| 14014 | } |
| 14015 | |
| 14016 | const setT c1:= { f1:= 1, f2:= 2.0, f3:= "a"}; |
| 14017 | const setT c2:= { f1:= 5, f2:= 7.0, f3:= "z"}; |
| 14018 | |
| 14019 | type port portT message { |
| 14020 | in setT |
| 14021 | } with {extension "internal"} |
| 14022 | |
| 14023 | type component c { |
| 14024 | port portT myPort; |
| 14025 | } |
| 14026 | |
| 14027 | function myFunct() runs on c { |
| 14028 | |
| 14029 | alt{ |
| 14030 | [] myPort.receive( subset(c1,c2) ) |
| 14031 | {} |
| 14032 | } |
| 14033 | } |
| 14034 | |
| 14035 | } |
| 14036 | <END_MODULE> |
| 14037 | <RESULT IF_PASS COUNT 1> |
| 14038 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 14039 | <END_RESULT> |
| 14040 | <RESULT IF_PASS COUNT 1> |
| 14041 | (?is)\berror: |
| 14042 | <END_RESULT> |
| 14043 | <END_TC> |
| 14044 | |
| 14045 | :exmp. |
| 14046 | |
| 14047 | .*---------------------------------------------------------------------* |
| 14048 | :h4.Allowed matching mechanisms - inline-template subset (enumerated in function) |
| 14049 | .*---------------------------------------------------------------------* |
| 14050 | :xmp tab=0. |
| 14051 | |
| 14052 | <TC - Allowed matching mechanisms - inline-template subset (enumerated in function)> |
| 14053 | |
| 14054 | <COMPILE> |
| 14055 | <VERDICT_LEAF PASS> |
| 14056 | <MODULE TTCN x x.ttcn> |
| 14057 | module x { |
| 14058 | |
| 14059 | type enumerated enumT { ONE(1), TWO(2), THREE(3) }; |
| 14060 | |
| 14061 | const enumT c1:= ONE; |
| 14062 | const enumT c2:= TWO; |
| 14063 | |
| 14064 | type port portT message { |
| 14065 | in enumT |
| 14066 | } with {extension "internal"} |
| 14067 | |
| 14068 | type component c { |
| 14069 | port portT myPort; |
| 14070 | } |
| 14071 | |
| 14072 | function myFunct() runs on c { |
| 14073 | |
| 14074 | alt{ |
| 14075 | [] myPort.receive( subset(c1,c2) ) |
| 14076 | {} |
| 14077 | } |
| 14078 | } |
| 14079 | |
| 14080 | } |
| 14081 | <END_MODULE> |
| 14082 | <RESULT IF_PASS COUNT 1> |
| 14083 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 14084 | <END_RESULT> |
| 14085 | <RESULT IF_PASS COUNT 1> |
| 14086 | (?is)\berror: |
| 14087 | <END_RESULT> |
| 14088 | <END_TC> |
| 14089 | |
| 14090 | :exmp. |
| 14091 | |
| 14092 | .*---------------------------------------------------------------------* |
| 14093 | :h4.Allowed matching mechanisms - inline-template subset (union in function) |
| 14094 | .*---------------------------------------------------------------------* |
| 14095 | :xmp tab=0. |
| 14096 | |
| 14097 | <TC - Allowed matching mechanisms - inline-template subset (union in function)> |
| 14098 | |
| 14099 | <COMPILE> |
| 14100 | <VERDICT_LEAF PASS> |
| 14101 | <MODULE TTCN x x.ttcn> |
| 14102 | module x { |
| 14103 | |
| 14104 | type union uniT{ |
| 14105 | integer f1, |
| 14106 | float f2, |
| 14107 | charstring f3 |
| 14108 | } |
| 14109 | |
| 14110 | const uniT c1:= { f3:= "a"}; |
| 14111 | const uniT c2:= { f3:= "z"}; |
| 14112 | |
| 14113 | type port portT message { |
| 14114 | in uniT |
| 14115 | } with {extension "internal"} |
| 14116 | |
| 14117 | type component c { |
| 14118 | port portT myPort; |
| 14119 | } |
| 14120 | |
| 14121 | function myFunct() runs on c { |
| 14122 | |
| 14123 | alt{ |
| 14124 | [] myPort.receive( subset(c1,c2) ) |
| 14125 | {} |
| 14126 | } |
| 14127 | } |
| 14128 | |
| 14129 | } |
| 14130 | <END_MODULE> |
| 14131 | <RESULT IF_PASS COUNT 1> |
| 14132 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 14133 | <END_RESULT> |
| 14134 | <RESULT IF_PASS COUNT 1> |
| 14135 | (?is)\berror: |
| 14136 | <END_RESULT> |
| 14137 | <END_TC> |
| 14138 | |
| 14139 | :exmp. |
| 14140 | |
| 14141 | .*---------------------------------------------------------------------* |
| 14142 | :h4.Allowed matching mechanisms - inline-template subset (array in function) |
| 14143 | .*---------------------------------------------------------------------* |
| 14144 | :xmp tab=0. |
| 14145 | |
| 14146 | <TC - Allowed matching mechanisms - inline-template subset (array in function)> |
| 14147 | |
| 14148 | <COMPILE> |
| 14149 | <VERDICT_LEAF PASS> |
| 14150 | <MODULE TTCN x x.ttcn> |
| 14151 | module x { |
| 14152 | |
| 14153 | type integer arrint[1]; |
| 14154 | |
| 14155 | const arrint c1:= { 1 }; |
| 14156 | const arrint c2:= { 5 }; |
| 14157 | |
| 14158 | type port portT message { |
| 14159 | in arrint |
| 14160 | } with {extension "internal"} |
| 14161 | |
| 14162 | type component c { |
| 14163 | port portT myPort; |
| 14164 | } |
| 14165 | |
| 14166 | function myFunct() runs on c { |
| 14167 | |
| 14168 | alt{ |
| 14169 | [] myPort.receive( subset(c1,c2) ) |
| 14170 | {} |
| 14171 | } |
| 14172 | } |
| 14173 | |
| 14174 | } |
| 14175 | <END_MODULE> |
| 14176 | <RESULT IF_PASS COUNT 1> |
| 14177 | (?im)error.+?subset.+?match.+?cannot.+?used |
| 14178 | <END_RESULT> |
| 14179 | <RESULT IF_PASS COUNT 1> |
| 14180 | (?is)\berror: |
| 14181 | <END_RESULT> |
| 14182 | <END_TC> |
| 14183 | |
| 14184 | :exmp. |
| 14185 | |
| 14186 | .*---------------------------------------------------------------------* |
| 14187 | :h4.Allowed matching mechanisms - inline-template length-restriction (boolean in function) |
| 14188 | .*---------------------------------------------------------------------* |
| 14189 | :xmp tab=0. |
| 14190 | |
| 14191 | <TC - Allowed matching mechanisms - inline-template length-restriction (boolean in function)> |
| 14192 | |
| 14193 | <COMPILE> |
| 14194 | <VERDICT_LEAF PASS> |
| 14195 | <MODULE TTCN x x.ttcn> |
| 14196 | module x { |
| 14197 | |
| 14198 | type port portT message { |
| 14199 | in boolean |
| 14200 | } with {extension "internal"} |
| 14201 | |
| 14202 | type component c { |
| 14203 | port portT myPort; |
| 14204 | } |
| 14205 | |
| 14206 | function myFunct() runs on c { |
| 14207 | |
| 14208 | alt{ |
| 14209 | [] myPort.receive( ? length(1) ) |
| 14210 | {} |
| 14211 | } |
| 14212 | } |
| 14213 | |
| 14214 | } |
| 14215 | <END_MODULE> |
| 14216 | <RESULT IF_PASS COUNT 1> |
| 14217 | (?im)error.+?Length.+?restriction.+?cannot.+?used |
| 14218 | <END_RESULT> |
| 14219 | <RESULT IF_PASS COUNT 1> |
| 14220 | (?is)\berror: |
| 14221 | <END_RESULT> |
| 14222 | <END_TC> |
| 14223 | |
| 14224 | :exmp. |
| 14225 | |
| 14226 | .*---------------------------------------------------------------------* |
| 14227 | :h4.Allowed matching mechanisms - inline-template length-restriction (integer in function) |
| 14228 | .*---------------------------------------------------------------------* |
| 14229 | :xmp tab=0. |
| 14230 | |
| 14231 | <TC - Allowed matching mechanisms - inline-template length-restriction (integer in function)> |
| 14232 | |
| 14233 | <COMPILE> |
| 14234 | <VERDICT_LEAF PASS> |
| 14235 | <MODULE TTCN x x.ttcn> |
| 14236 | module x { |
| 14237 | |
| 14238 | type port portT message { |
| 14239 | in integer |
| 14240 | } with {extension "internal"} |
| 14241 | |
| 14242 | type component c { |
| 14243 | port portT myPort; |
| 14244 | } |
| 14245 | |
| 14246 | function myFunct() runs on c { |
| 14247 | |
| 14248 | alt{ |
| 14249 | [] myPort.receive( ? length(1) ) |
| 14250 | {} |
| 14251 | } |
| 14252 | } |
| 14253 | |
| 14254 | } |
| 14255 | <END_MODULE> |
| 14256 | <RESULT IF_PASS COUNT 1> |
| 14257 | (?im)error.+?Length.+?restriction.+?cannot.+?used |
| 14258 | <END_RESULT> |
| 14259 | <RESULT IF_PASS COUNT 1> |
| 14260 | (?is)\berror: |
| 14261 | <END_RESULT> |
| 14262 | <END_TC> |
| 14263 | |
| 14264 | :exmp. |
| 14265 | |
| 14266 | .*---------------------------------------------------------------------* |
| 14267 | :h4.Allowed matching mechanisms - inline-template length-restriction (float in function) |
| 14268 | .*---------------------------------------------------------------------* |
| 14269 | :xmp tab=0. |
| 14270 | |
| 14271 | <TC - Allowed matching mechanisms - inline-template length-restriction (float in function)> |
| 14272 | |
| 14273 | <COMPILE> |
| 14274 | <VERDICT_LEAF PASS> |
| 14275 | <MODULE TTCN x x.ttcn> |
| 14276 | module x { |
| 14277 | |
| 14278 | type port portT message { |
| 14279 | in float |
| 14280 | } with {extension "internal"} |
| 14281 | |
| 14282 | type component c { |
| 14283 | port portT myPort; |
| 14284 | } |
| 14285 | |
| 14286 | function myFunct() runs on c { |
| 14287 | |
| 14288 | alt{ |
| 14289 | [] myPort.receive( ? length(1) ) |
| 14290 | {} |
| 14291 | } |
| 14292 | } |
| 14293 | |
| 14294 | } |
| 14295 | <END_MODULE> |
| 14296 | <RESULT IF_PASS COUNT 1> |
| 14297 | (?im)error.+?Length.+?restriction.+?cannot.+?used |
| 14298 | <END_RESULT> |
| 14299 | <RESULT IF_PASS COUNT 1> |
| 14300 | (?is)\berror: |
| 14301 | <END_RESULT> |
| 14302 | <END_TC> |
| 14303 | |
| 14304 | :exmp. |
| 14305 | |
| 14306 | .*---------------------------------------------------------------------* |
| 14307 | :h4.Allowed matching mechanisms - inline-template length-restriction (record in function) |
| 14308 | .*---------------------------------------------------------------------* |
| 14309 | :xmp tab=0. |
| 14310 | |
| 14311 | <TC - Allowed matching mechanisms - inline-template length-restriction (record in function)> |
| 14312 | |
| 14313 | <COMPILE> |
| 14314 | <VERDICT_LEAF PASS> |
| 14315 | <MODULE TTCN x x.ttcn> |
| 14316 | module x { |
| 14317 | |
| 14318 | type record recT{ |
| 14319 | integer f1, |
| 14320 | float f2, |
| 14321 | charstring f3 |
| 14322 | } |
| 14323 | |
| 14324 | type port portT message { |
| 14325 | in recT |
| 14326 | } with {extension "internal"} |
| 14327 | |
| 14328 | type component c { |
| 14329 | port portT myPort; |
| 14330 | } |
| 14331 | |
| 14332 | function myFunct() runs on c { |
| 14333 | |
| 14334 | alt{ |
| 14335 | [] myPort.receive( ? length(1) ) |
| 14336 | {} |
| 14337 | } |
| 14338 | } |
| 14339 | |
| 14340 | } |
| 14341 | <END_MODULE> |
| 14342 | <RESULT IF_PASS COUNT 1> |
| 14343 | (?im)error.+?Length.+?restriction.+?cannot.+?used |
| 14344 | <END_RESULT> |
| 14345 | <RESULT IF_PASS COUNT 1> |
| 14346 | (?is)\berror: |
| 14347 | <END_RESULT> |
| 14348 | <END_TC> |
| 14349 | |
| 14350 | :exmp. |
| 14351 | |
| 14352 | .*---------------------------------------------------------------------* |
| 14353 | :h4.Allowed matching mechanisms - inline-template length-restriction (set in function) |
| 14354 | .*---------------------------------------------------------------------* |
| 14355 | :xmp tab=0. |
| 14356 | |
| 14357 | <TC - Allowed matching mechanisms - inline-template length-restriction (set in function)> |
| 14358 | |
| 14359 | <COMPILE> |
| 14360 | <VERDICT_LEAF PASS> |
| 14361 | <MODULE TTCN x x.ttcn> |
| 14362 | module x { |
| 14363 | |
| 14364 | type set setT{ |
| 14365 | integer f1, |
| 14366 | float f2, |
| 14367 | charstring f3 |
| 14368 | } |
| 14369 | |
| 14370 | type port portT message { |
| 14371 | in setT |
| 14372 | } with {extension "internal"} |
| 14373 | |
| 14374 | type component c { |
| 14375 | port portT myPort; |
| 14376 | } |
| 14377 | |
| 14378 | function myFunct() runs on c { |
| 14379 | |
| 14380 | alt{ |
| 14381 | [] myPort.receive( ? length(1) ) |
| 14382 | {} |
| 14383 | } |
| 14384 | } |
| 14385 | |
| 14386 | } |
| 14387 | <END_MODULE> |
| 14388 | <RESULT IF_PASS COUNT 1> |
| 14389 | (?im)error.+?Length.+?restriction.+?cannot.+?used |
| 14390 | <END_RESULT> |
| 14391 | <RESULT IF_PASS COUNT 1> |
| 14392 | (?is)\berror: |
| 14393 | <END_RESULT> |
| 14394 | <END_TC> |
| 14395 | |
| 14396 | :exmp. |
| 14397 | |
| 14398 | .*---------------------------------------------------------------------* |
| 14399 | :h4.Allowed matching mechanisms - inline-template length-restriction (enumerated in function) |
| 14400 | .*---------------------------------------------------------------------* |
| 14401 | :xmp tab=0. |
| 14402 | |
| 14403 | <TC - Allowed matching mechanisms - inline-template length-restriction (enumerated in function)> |
| 14404 | |
| 14405 | <COMPILE> |
| 14406 | <VERDICT_LEAF PASS> |
| 14407 | <MODULE TTCN x x.ttcn> |
| 14408 | module x { |
| 14409 | |
| 14410 | type enumerated enumT { ONE(1), TWO(2), THREE(3) }; |
| 14411 | |
| 14412 | type port portT message { |
| 14413 | in enumT |
| 14414 | } with {extension "internal"} |
| 14415 | |
| 14416 | type component c { |
| 14417 | port portT myPort; |
| 14418 | } |
| 14419 | |
| 14420 | function myFunct() runs on c { |
| 14421 | |
| 14422 | alt{ |
| 14423 | [] myPort.receive( ? length(1) ) |
| 14424 | {} |
| 14425 | } |
| 14426 | } |
| 14427 | |
| 14428 | } |
| 14429 | <END_MODULE> |
| 14430 | <RESULT IF_PASS COUNT 1> |
| 14431 | (?im)error.+?Length.+?restriction.+?cannot.+?used |
| 14432 | <END_RESULT> |
| 14433 | <RESULT IF_PASS COUNT 1> |
| 14434 | (?is)\berror: |
| 14435 | <END_RESULT> |
| 14436 | <END_TC> |
| 14437 | |
| 14438 | :exmp. |
| 14439 | |
| 14440 | .*---------------------------------------------------------------------* |
| 14441 | :h4.Allowed matching mechanisms - inline-template length-restriction (union in function) |
| 14442 | .*---------------------------------------------------------------------* |
| 14443 | :xmp tab=0. |
| 14444 | |
| 14445 | <TC - Allowed matching mechanisms - inline-template length-restriction (union in function)> |
| 14446 | |
| 14447 | <COMPILE> |
| 14448 | <VERDICT_LEAF PASS> |
| 14449 | <MODULE TTCN x x.ttcn> |
| 14450 | module x { |
| 14451 | |
| 14452 | type union uniT{ |
| 14453 | integer f1, |
| 14454 | float f2, |
| 14455 | charstring f3 |
| 14456 | } |
| 14457 | |
| 14458 | type port portT message { |
| 14459 | in uniT |
| 14460 | } with {extension "internal"} |
| 14461 | |
| 14462 | type component c { |
| 14463 | port portT myPort; |
| 14464 | } |
| 14465 | |
| 14466 | function myFunct() runs on c { |
| 14467 | |
| 14468 | alt{ |
| 14469 | [] myPort.receive( ? length(1) ) |
| 14470 | {} |
| 14471 | } |
| 14472 | } |
| 14473 | |
| 14474 | } |
| 14475 | <END_MODULE> |
| 14476 | <RESULT IF_PASS COUNT 1> |
| 14477 | (?im)error.+?Length.+?restriction.+?cannot.+?used |
| 14478 | <END_RESULT> |
| 14479 | <RESULT IF_PASS COUNT 1> |
| 14480 | (?is)\berror: |
| 14481 | <END_RESULT> |
| 14482 | <END_TC> |
| 14483 | |
| 14484 | :exmp. |
| 14485 | |
| 14486 | .*---------------------------------------------------------------------* |
| 14487 | :h4.Allowed matching mechanisms - inline-template length-restriction (array in function) |
| 14488 | .*---------------------------------------------------------------------* |
| 14489 | :xmp tab=0. |
| 14490 | |
| 14491 | <TC - Allowed matching mechanisms - inline-template length-restriction (array in function)> |
| 14492 | |
| 14493 | <COMPILE> |
| 14494 | <VERDICT_LEAF PASS> |
| 14495 | <MODULE TTCN x x.ttcn> |
| 14496 | module x { |
| 14497 | |
| 14498 | type integer arrint[1]; |
| 14499 | |
| 14500 | const arrint c1:= { 1 }; |
| 14501 | const arrint c2:= { 5 }; |
| 14502 | |
| 14503 | type port portT message { |
| 14504 | in arrint |
| 14505 | } with {extension "internal"} |
| 14506 | |
| 14507 | type component c { |
| 14508 | port portT myPort; |
| 14509 | } |
| 14510 | |
| 14511 | function myFunct() runs on c { |
| 14512 | |
| 14513 | alt{ |
| 14514 | [] myPort.receive( ? length(10) ) |
| 14515 | {} |
| 14516 | } |
| 14517 | } |
| 14518 | |
| 14519 | } |
| 14520 | <END_MODULE> |
| 14521 | <RESULT IF_PASS COUNT 1> |
| 14522 | (?im)error.+?number.+?elements.+?allowed.+?length.+?restriction.+?contradicts.+?array.+?size |
| 14523 | <END_RESULT> |
| 14524 | <RESULT IF_PASS COUNT 1> |
| 14525 | (?is)\berror: |
| 14526 | <END_RESULT> |
| 14527 | <END_TC> |
| 14528 | |
| 14529 | :exmp. |
| 14530 | |
| 14531 | .*---------------------------------------------------------------------* |
| 14532 | :h4.Allowed matching mechanisms - inline-template ifpresent (boolean in function) |
| 14533 | .*---------------------------------------------------------------------* |
| 14534 | :xmp tab=0. |
| 14535 | |
| 14536 | <TC - Allowed matching mechanisms - inline-template ifpresent (boolean in function)> |
| 14537 | |
| 14538 | <COMPILE> |
| 14539 | <VERDICT_LEAF PASS> |
| 14540 | <MODULE TTCN x x.ttcn> |
| 14541 | module x { |
| 14542 | |
| 14543 | type port portT message { |
| 14544 | in boolean |
| 14545 | } with {extension "internal"} |
| 14546 | |
| 14547 | type component c { |
| 14548 | port portT myPort; |
| 14549 | } |
| 14550 | |
| 14551 | function myFunct() runs on c { |
| 14552 | |
| 14553 | alt{ |
| 14554 | [] myPort.receive( ? ifpresent ) |
| 14555 | {} |
| 14556 | } |
| 14557 | } |
| 14558 | |
| 14559 | } |
| 14560 | <END_MODULE> |
| 14561 | <RESULT IF_PASS NEGATIVE> |
| 14562 | (?is)\berror: |
| 14563 | <END_RESULT> |
| 14564 | <END_TC> |
| 14565 | |
| 14566 | :exmp. |
| 14567 | |
| 14568 | .*---------------------------------------------------------------------* |
| 14569 | :h4.Allowed matching mechanisms - inline-template ifpresent (integer in function) |
| 14570 | .*---------------------------------------------------------------------* |
| 14571 | :xmp tab=0. |
| 14572 | |
| 14573 | <TC - Allowed matching mechanisms - inline-template ifpresent (integer in function)> |
| 14574 | |
| 14575 | <COMPILE> |
| 14576 | <VERDICT_LEAF PASS> |
| 14577 | <MODULE TTCN x x.ttcn> |
| 14578 | module x { |
| 14579 | |
| 14580 | type port portT message { |
| 14581 | in integer |
| 14582 | } with {extension "internal"} |
| 14583 | |
| 14584 | type component c { |
| 14585 | port portT myPort; |
| 14586 | } |
| 14587 | |
| 14588 | function myFunct() runs on c { |
| 14589 | |
| 14590 | alt{ |
| 14591 | [] myPort.receive( ? ifpresent ) |
| 14592 | {} |
| 14593 | } |
| 14594 | } |
| 14595 | |
| 14596 | } |
| 14597 | <END_MODULE> |
| 14598 | <RESULT IF_PASS NEGATIVE> |
| 14599 | (?is)\berror: |
| 14600 | <END_RESULT> |
| 14601 | <END_TC> |
| 14602 | |
| 14603 | :exmp. |
| 14604 | |
| 14605 | .*---------------------------------------------------------------------* |
| 14606 | :h4.Allowed matching mechanisms - inline-template ifpresent (float in function) |
| 14607 | .*---------------------------------------------------------------------* |
| 14608 | :xmp tab=0. |
| 14609 | |
| 14610 | <TC - Allowed matching mechanisms - inline-template ifpresent (float in function)> |
| 14611 | |
| 14612 | <COMPILE> |
| 14613 | <VERDICT_LEAF PASS> |
| 14614 | <MODULE TTCN x x.ttcn> |
| 14615 | module x { |
| 14616 | |
| 14617 | type port portT message { |
| 14618 | in float |
| 14619 | } with {extension "internal"} |
| 14620 | |
| 14621 | type component c { |
| 14622 | port portT myPort; |
| 14623 | } |
| 14624 | |
| 14625 | function myFunct() runs on c { |
| 14626 | |
| 14627 | alt{ |
| 14628 | [] myPort.receive( ? ifpresent ) |
| 14629 | {} |
| 14630 | } |
| 14631 | } |
| 14632 | |
| 14633 | } |
| 14634 | <END_MODULE> |
| 14635 | <RESULT IF_PASS NEGATIVE> |
| 14636 | (?is)\berror: |
| 14637 | <END_RESULT> |
| 14638 | <END_TC> |
| 14639 | |
| 14640 | :exmp. |
| 14641 | |
| 14642 | .*---------------------------------------------------------------------* |
| 14643 | :h4.Allowed matching mechanisms - inline-template ifpresent (bitstring in function) |
| 14644 | .*---------------------------------------------------------------------* |
| 14645 | :xmp tab=0. |
| 14646 | |
| 14647 | <TC - Allowed matching mechanisms - inline-template ifpresent (bitstring in function)> |
| 14648 | |
| 14649 | <COMPILE> |
| 14650 | <VERDICT_LEAF PASS> |
| 14651 | <MODULE TTCN x x.ttcn> |
| 14652 | module x { |
| 14653 | |
| 14654 | type port portT message { |
| 14655 | in bitstring |
| 14656 | } with {extension "internal"} |
| 14657 | |
| 14658 | type component c { |
| 14659 | port portT myPort; |
| 14660 | } |
| 14661 | |
| 14662 | function myFunct() runs on c { |
| 14663 | |
| 14664 | alt{ |
| 14665 | [] myPort.receive( ? ifpresent ) |
| 14666 | {} |
| 14667 | } |
| 14668 | } |
| 14669 | |
| 14670 | } |
| 14671 | <END_MODULE> |
| 14672 | <RESULT IF_PASS NEGATIVE> |
| 14673 | (?is)\berror: |
| 14674 | <END_RESULT> |
| 14675 | <END_TC> |
| 14676 | |
| 14677 | :exmp. |
| 14678 | |
| 14679 | .*---------------------------------------------------------------------* |
| 14680 | :h4.Allowed matching mechanisms - inline-template ifpresent (octetstring in function) |
| 14681 | .*---------------------------------------------------------------------* |
| 14682 | :xmp tab=0. |
| 14683 | |
| 14684 | <TC - Allowed matching mechanisms - inline-template ifpresent (octetstring in function)> |
| 14685 | |
| 14686 | <COMPILE> |
| 14687 | <VERDICT_LEAF PASS> |
| 14688 | <MODULE TTCN x x.ttcn> |
| 14689 | module x { |
| 14690 | |
| 14691 | type port portT message { |
| 14692 | in octetstring |
| 14693 | } with {extension "internal"} |
| 14694 | |
| 14695 | type component c { |
| 14696 | port portT myPort; |
| 14697 | } |
| 14698 | |
| 14699 | function myFunct() runs on c { |
| 14700 | |
| 14701 | alt{ |
| 14702 | [] myPort.receive( ? ifpresent ) |
| 14703 | {} |
| 14704 | } |
| 14705 | } |
| 14706 | |
| 14707 | } |
| 14708 | <END_MODULE> |
| 14709 | <RESULT IF_PASS NEGATIVE> |
| 14710 | (?is)\berror: |
| 14711 | <END_RESULT> |
| 14712 | <END_TC> |
| 14713 | |
| 14714 | :exmp. |
| 14715 | |
| 14716 | .*---------------------------------------------------------------------* |
| 14717 | :h4.Allowed matching mechanisms - inline-template ifpresent (hexstring in function) |
| 14718 | .*---------------------------------------------------------------------* |
| 14719 | :xmp tab=0. |
| 14720 | |
| 14721 | <TC - Allowed matching mechanisms - inline-template ifpresent (hexstring in function)> |
| 14722 | |
| 14723 | <COMPILE> |
| 14724 | <VERDICT_LEAF PASS> |
| 14725 | <MODULE TTCN x x.ttcn> |
| 14726 | module x { |
| 14727 | |
| 14728 | type port portT message { |
| 14729 | in hexstring |
| 14730 | } with {extension "internal"} |
| 14731 | |
| 14732 | type component c { |
| 14733 | port portT myPort; |
| 14734 | } |
| 14735 | |
| 14736 | function myFunct() runs on c { |
| 14737 | |
| 14738 | alt{ |
| 14739 | [] myPort.receive( ? ifpresent ) |
| 14740 | {} |
| 14741 | } |
| 14742 | } |
| 14743 | |
| 14744 | } |
| 14745 | <END_MODULE> |
| 14746 | <RESULT IF_PASS NEGATIVE> |
| 14747 | (?is)\berror: |
| 14748 | <END_RESULT> |
| 14749 | <END_TC> |
| 14750 | |
| 14751 | :exmp. |
| 14752 | |
| 14753 | .*---------------------------------------------------------------------* |
| 14754 | :h4.Allowed matching mechanisms - inline-template ifpresent (charstring in function) |
| 14755 | .*---------------------------------------------------------------------* |
| 14756 | :xmp tab=0. |
| 14757 | |
| 14758 | <TC - Allowed matching mechanisms - inline-template ifpresent (charstring in function)> |
| 14759 | |
| 14760 | <COMPILE> |
| 14761 | <VERDICT_LEAF PASS> |
| 14762 | <MODULE TTCN x x.ttcn> |
| 14763 | module x { |
| 14764 | |
| 14765 | type port portT message { |
| 14766 | in charstring |
| 14767 | } with {extension "internal"} |
| 14768 | |
| 14769 | type component c { |
| 14770 | port portT myPort; |
| 14771 | } |
| 14772 | |
| 14773 | function myFunct() runs on c { |
| 14774 | |
| 14775 | alt{ |
| 14776 | [] myPort.receive( ? ifpresent ) |
| 14777 | {} |
| 14778 | } |
| 14779 | } |
| 14780 | |
| 14781 | } |
| 14782 | <END_MODULE> |
| 14783 | <RESULT IF_PASS NEGATIVE> |
| 14784 | (?is)\berror: |
| 14785 | <END_RESULT> |
| 14786 | <END_TC> |
| 14787 | |
| 14788 | :exmp. |
| 14789 | |
| 14790 | .*---------------------------------------------------------------------* |
| 14791 | :h4.Allowed matching mechanisms - inline-template ifpresent (record of in function) |
| 14792 | .*---------------------------------------------------------------------* |
| 14793 | :xmp tab=0. |
| 14794 | |
| 14795 | <TC - Allowed matching mechanisms - inline-template ifpresent (record of in function)> |
| 14796 | |
| 14797 | <COMPILE> |
| 14798 | <VERDICT_LEAF PASS> |
| 14799 | <MODULE TTCN x x.ttcn> |
| 14800 | module x { |
| 14801 | |
| 14802 | type record of integer myT; |
| 14803 | |
| 14804 | type port portT message { |
| 14805 | in myT |
| 14806 | } with {extension "internal"} |
| 14807 | |
| 14808 | type component c { |
| 14809 | port portT myPort; |
| 14810 | } |
| 14811 | |
| 14812 | function myFunct() runs on c { |
| 14813 | |
| 14814 | alt{ |
| 14815 | [] myPort.receive( ? ifpresent ) |
| 14816 | {} |
| 14817 | } |
| 14818 | } |
| 14819 | |
| 14820 | } |
| 14821 | <END_MODULE> |
| 14822 | <RESULT IF_PASS NEGATIVE> |
| 14823 | (?is)\berror: |
| 14824 | <END_RESULT> |
| 14825 | <END_TC> |
| 14826 | |
| 14827 | :exmp. |
| 14828 | |
| 14829 | .*---------------------------------------------------------------------* |
| 14830 | :h4.Allowed matching mechanisms - inline-template ifpresent (set of in function) |
| 14831 | .*---------------------------------------------------------------------* |
| 14832 | :xmp tab=0. |
| 14833 | |
| 14834 | <TC - Allowed matching mechanisms - inline-template ifpresent (set of in function)> |
| 14835 | |
| 14836 | <COMPILE> |
| 14837 | <VERDICT_LEAF PASS> |
| 14838 | <MODULE TTCN x x.ttcn> |
| 14839 | module x { |
| 14840 | |
| 14841 | type set of integer myT; |
| 14842 | |
| 14843 | type port portT message { |
| 14844 | in myT |
| 14845 | } with {extension "internal"} |
| 14846 | |
| 14847 | type component c { |
| 14848 | port portT myPort; |
| 14849 | } |
| 14850 | |
| 14851 | function myFunct() runs on c { |
| 14852 | |
| 14853 | alt{ |
| 14854 | [] myPort.receive( ? ifpresent ) |
| 14855 | {} |
| 14856 | } |
| 14857 | } |
| 14858 | |
| 14859 | } |
| 14860 | <END_MODULE> |
| 14861 | <RESULT IF_PASS NEGATIVE> |
| 14862 | (?is)\berror: |
| 14863 | <END_RESULT> |
| 14864 | <END_TC> |
| 14865 | |
| 14866 | :exmp. |
| 14867 | |
| 14868 | .*---------------------------------------------------------------------* |
| 14869 | :h4.Allowed matching mechanisms - inline-template ifpresent (enumerated in function) |
| 14870 | .*---------------------------------------------------------------------* |
| 14871 | :xmp tab=0. |
| 14872 | |
| 14873 | <TC - Allowed matching mechanisms - inline-template ifpresent (enumerated in function)> |
| 14874 | |
| 14875 | <COMPILE> |
| 14876 | <VERDICT_LEAF PASS> |
| 14877 | <MODULE TTCN x x.ttcn> |
| 14878 | module x { |
| 14879 | |
| 14880 | type enumerated enumT { ONE(1), TWO(2), THREE(3) }; |
| 14881 | |
| 14882 | type port portT message { |
| 14883 | in enumT |
| 14884 | } with {extension "internal"} |
| 14885 | |
| 14886 | type component c { |
| 14887 | port portT myPort; |
| 14888 | } |
| 14889 | |
| 14890 | function myFunct() runs on c { |
| 14891 | |
| 14892 | alt{ |
| 14893 | [] myPort.receive( ? ifpresent ) |
| 14894 | {} |
| 14895 | } |
| 14896 | } |
| 14897 | |
| 14898 | } |
| 14899 | <END_MODULE> |
| 14900 | <RESULT IF_PASS NEGATIVE> |
| 14901 | (?is)\berror: |
| 14902 | <END_RESULT> |
| 14903 | <END_TC> |
| 14904 | |
| 14905 | :exmp. |
| 14906 | |
| 14907 | .*---------------------------------------------------------------------* |
| 14908 | :h4.Allowed matching mechanisms - inline-template ifpresent (union in function) |
| 14909 | .*---------------------------------------------------------------------* |
| 14910 | :xmp tab=0. |
| 14911 | |
| 14912 | <TC - Allowed matching mechanisms - inline-template ifpresent (union in function)> |
| 14913 | |
| 14914 | <COMPILE> |
| 14915 | <VERDICT_LEAF PASS> |
| 14916 | <MODULE TTCN x x.ttcn> |
| 14917 | module x { |
| 14918 | |
| 14919 | type union uniT{ |
| 14920 | integer f1, |
| 14921 | float f2, |
| 14922 | charstring f3 |
| 14923 | } |
| 14924 | |
| 14925 | type port portT message { |
| 14926 | in uniT |
| 14927 | } with {extension "internal"} |
| 14928 | |
| 14929 | type component c { |
| 14930 | port portT myPort; |
| 14931 | } |
| 14932 | |
| 14933 | function myFunct() runs on c { |
| 14934 | |
| 14935 | alt{ |
| 14936 | [] myPort.receive( ? ifpresent ) |
| 14937 | {} |
| 14938 | } |
| 14939 | } |
| 14940 | |
| 14941 | } |
| 14942 | <END_MODULE> |
| 14943 | <RESULT IF_PASS NEGATIVE> |
| 14944 | (?is)\berror: |
| 14945 | <END_RESULT> |
| 14946 | <END_TC> |
| 14947 | |
| 14948 | :exmp. |
| 14949 | |
| 14950 | .*---------------------------------------------------------------------* |
| 14951 | :h4.Allowed matching mechanisms - inline-template ifpresent (array in function) |
| 14952 | .*---------------------------------------------------------------------* |
| 14953 | :xmp tab=0. |
| 14954 | |
| 14955 | <TC - Allowed matching mechanisms - inline-template ifpresent (array in function)> |
| 14956 | |
| 14957 | <COMPILE> |
| 14958 | <VERDICT_LEAF PASS> |
| 14959 | <MODULE TTCN x x.ttcn> |
| 14960 | module x { |
| 14961 | |
| 14962 | type integer arrint[1]; |
| 14963 | |
| 14964 | const arrint c1:= { 1 }; |
| 14965 | const arrint c2:= { 5 }; |
| 14966 | |
| 14967 | type port portT message { |
| 14968 | in arrint |
| 14969 | } with {extension "internal"} |
| 14970 | |
| 14971 | type component c { |
| 14972 | port portT myPort; |
| 14973 | } |
| 14974 | |
| 14975 | function myFunct() runs on c { |
| 14976 | |
| 14977 | alt{ |
| 14978 | [] myPort.receive( ? ifpresent) |
| 14979 | {} |
| 14980 | } |
| 14981 | } |
| 14982 | |
| 14983 | } |
| 14984 | <END_MODULE> |
| 14985 | <RESULT IF_PASS NEGATIVE> |
| 14986 | (?is)\berror: |
| 14987 | <END_RESULT> |
| 14988 | <END_TC> |
| 14989 | |
| 14990 | :exmp. |
| 14991 | |
| 14992 | .*---------------------------------------------------------------------* |
| 14993 | :h2.Infinite recursive loops |
| 14994 | .*---------------------------------------------------------------------* |
| 14995 | |
| 14996 | NOTE: In case of non-constant ele |
| 14997 | For example: |
| 14998 | template mytype t := { f := t } s |
| 14999 | but |
| 15000 | var mytype v := { f := v } is not |
| 15001 | |
| 15002 | .*---------------------------------------------------------------------* |
| 15003 | :h3.Infinite recursive loops in templates/values |
| 15004 | .*---------------------------------------------------------------------* |
| 15005 | |
| 15006 | This test case group covers the requirement SA-6/21. |
| 15007 | |
| 15008 | Strategy: SA shall detect the infinite recursive loops in templates/values. |
| 15009 | Two types of infinite loops are existing: |
| 15010 | |
| 15011 | x:= x.field; |
| 15012 | and |
| 15013 | x:= { f1:= x... }; |
| 15014 | |
| 15015 | All occurances shall be tested, where such a notation can be used. |
| 15016 | |
| 15017 | Tested: |
| 15018 | :list. |
| 15019 | :li D='-'.1, 2 and 3 steps long circles in definition part |
| 15020 | :li D='-'.2, 3 and 4 steps long cross circles in definition part |
| 15021 | :li D='-'.3 steps long double cross circles in definition part |
| 15022 | :elist. |
| 15023 | |
| 15024 | .*---------------------------------------------------------------------* |
| 15025 | :h4.Infinite recursive loops in templates/values - one step long (in def.part) |
| 15026 | .*---------------------------------------------------------------------* |
| 15027 | :xmp tab=0. |
| 15028 | |
| 15029 | <TC - Infinite recursive loops in templates/values - one step long (in def.part)> |
| 15030 | |
| 15031 | <COMPILE> |
| 15032 | <VERDICT_LEAF PASS> |
| 15033 | <MODULE TTCN x x.ttcn> |
| 15034 | module x { |
| 15035 | |
| 15036 | type record recT { |
| 15037 | integer f1, |
| 15038 | float f2, |
| 15039 | charstring f3, |
| 15040 | integer f4 |
| 15041 | } |
| 15042 | |
| 15043 | template recT temp1:= { f1:= temp1.f1, f2:= 1.1, f3:= "ERIXON", f4:= 1 }; |
| 15044 | |
| 15045 | } |
| 15046 | <END_MODULE> |
| 15047 | <RESULT IF_PASS COUNT 1> |
| 15048 | (?im)error.+?Circular.+?reference |
| 15049 | <END_RESULT> |
| 15050 | <RESULT IF_PASS COUNT 1> |
| 15051 | (?is)\berror: |
| 15052 | <END_RESULT> |
| 15053 | <END_TC> |
| 15054 | |
| 15055 | :exmp. |
| 15056 | |
| 15057 | .*---------------------------------------------------------------------* |
| 15058 | :h4.Infinite recursive loops in templates/values - one steps long (in def.part) |
| 15059 | .*---------------------------------------------------------------------* |
| 15060 | :xmp tab=0. |
| 15061 | |
| 15062 | <TC - Infinite recursive loops in templates/values - one steps long (in def.part)> |
| 15063 | |
| 15064 | <COMPILE> |
| 15065 | <VERDICT_LEAF FAIL> |
| 15066 | <MODULE TTCN x x.ttcn> |
| 15067 | module x { |
| 15068 | |
| 15069 | type integer myint[2]; |
| 15070 | |
| 15071 | template myint t := {0,t[1]}; |
| 15072 | |
| 15073 | |
| 15074 | } |
| 15075 | <END_MODULE> |
| 15076 | <RESULT IF_PASS COUNT 1> |
| 15077 | (?im)error.+?Circular.+?reference |
| 15078 | <END_RESULT> |
| 15079 | <RESULT IF_PASS COUNT 1> |
| 15080 | (?is)\berror: |
| 15081 | <END_RESULT> |
| 15082 | <RESULT IF_FAIL POSITIVE> |
| 15083 | (?im)error.+?Circular.+?reference |
| 15084 | <END_RESULT> |
| 15085 | <END_TC> |
| 15086 | |
| 15087 | :exmp. |
| 15088 | |
| 15089 | .*---------------------------------------------------------------------* |
| 15090 | :h4.Infinite recursive loops in templates/values - two steps long (in def.part) |
| 15091 | .*---------------------------------------------------------------------* |
| 15092 | :xmp tab=0. |
| 15093 | |
| 15094 | <TC - Infinite recursive loops in templates/values - two steps long (in def.part)> |
| 15095 | |
| 15096 | <COMPILE> |
| 15097 | <VERDICT_LEAF FAIL> |
| 15098 | <MODULE TTCN x x.ttcn> |
| 15099 | module x { |
| 15100 | |
| 15101 | type record recT { |
| 15102 | integer f1, |
| 15103 | float f2, |
| 15104 | charstring f3, |
| 15105 | integer f4 |
| 15106 | } |
| 15107 | |
| 15108 | // TR 696 |
| 15109 | template recT temp1:= { f1:= temp1.f4, f2:= 1.1, f3:= "ERIXON", f4:= temp1.f1 }; |
| 15110 | |
| 15111 | } |
| 15112 | <END_MODULE> |
| 15113 | <RESULT IF_PASS COUNT 1> |
| 15114 | (?im)error.+?Circular.+?reference |
| 15115 | <END_RESULT> |
| 15116 | <RESULT IF_PASS COUNT 1> |
| 15117 | (?is)\berror: |
| 15118 | <END_RESULT> |
| 15119 | <RESULT IF_FAIL POSITIVE> |
| 15120 | (?im)error.+?Circular.+?reference |
| 15121 | <END_RESULT> |
| 15122 | <END_TC> |
| 15123 | |
| 15124 | :exmp. |
| 15125 | |
| 15126 | .*---------------------------------------------------------------------* |
| 15127 | :h4.Infinite recursive loops in templates/values - three steps long (in def.part) |
| 15128 | .*---------------------------------------------------------------------* |
| 15129 | :xmp tab=0. |
| 15130 | |
| 15131 | <TC - Infinite recursive loops in templates/values - three steps long (in def.part)> |
| 15132 | |
| 15133 | <COMPILE> |
| 15134 | <VERDICT_LEAF FAIL> |
| 15135 | <MODULE TTCN x x.ttcn> |
| 15136 | module x { |
| 15137 | |
| 15138 | type record recT { |
| 15139 | integer f1, |
| 15140 | float f2, |
| 15141 | charstring f3, |
| 15142 | integer f4, |
| 15143 | integer f5 |
| 15144 | } |
| 15145 | |
| 15146 | // TR 696 |
| 15147 | template recT temp1:= { f1:= temp1.f4, f2:= 1.1, f3:= "ERIXON", f4:= temp1.f5, f5:= temp1.f1 }; |
| 15148 | |
| 15149 | } |
| 15150 | <END_MODULE> |
| 15151 | <RESULT IF_PASS COUNT 1> |
| 15152 | (?im)error.+?Circular.+?reference |
| 15153 | <END_RESULT> |
| 15154 | <RESULT IF_PASS COUNT 1> |
| 15155 | (?is)\berror: |
| 15156 | <END_RESULT> |
| 15157 | <RESULT IF_FAIL POSITIVE> |
| 15158 | (?im)error.+?Circular.+?reference |
| 15159 | <END_RESULT> |
| 15160 | <END_TC> |
| 15161 | |
| 15162 | :exmp. |
| 15163 | |
| 15164 | .*---------------------------------------------------------------------* |
| 15165 | :h4.Infinite recursive loops in templates/values - cross two steps long (in def.part) |
| 15166 | .*---------------------------------------------------------------------* |
| 15167 | :xmp tab=0. |
| 15168 | |
| 15169 | <TC - Infinite recursive loops in templates/values - cross two steps long (in def.part)> |
| 15170 | |
| 15171 | <COMPILE> |
| 15172 | <VERDICT_LEAF PASS> |
| 15173 | <MODULE TTCN x x.ttcn> |
| 15174 | module x { |
| 15175 | |
| 15176 | type record recT { |
| 15177 | integer f1, |
| 15178 | float f2, |
| 15179 | charstring f3, |
| 15180 | integer f4, |
| 15181 | integer f5 |
| 15182 | } |
| 15183 | |
| 15184 | template recT temp1:= { f1:= temp2.f1, f2:= 1.1, f3:= "ERIXON", f4:= 1, f5:= 2 }; |
| 15185 | template recT temp2:= { f1:= temp1.f1, f2:= 1.1, f3:= "ERIXON", f4:= 1, f5:= 2 }; |
| 15186 | |
| 15187 | } |
| 15188 | <END_MODULE> |
| 15189 | <RESULT IF_PASS COUNT 1> |
| 15190 | (?im)error.+?Circular.+?reference |
| 15191 | <END_RESULT> |
| 15192 | <RESULT IF_PASS COUNT 1> |
| 15193 | (?is)\berror: |
| 15194 | <END_RESULT> |
| 15195 | <END_TC> |
| 15196 | |
| 15197 | :exmp. |
| 15198 | |
| 15199 | .*---------------------------------------------------------------------* |
| 15200 | :h4.Infinite recursive loops in templates/values - cross three steps long (in def.part) |
| 15201 | .*---------------------------------------------------------------------* |
| 15202 | :xmp tab=0. |
| 15203 | |
| 15204 | <TC - Infinite recursive loops in templates/values - cross three steps long (in def.part)> |
| 15205 | |
| 15206 | <COMPILE> |
| 15207 | <VERDICT_LEAF FAIL> |
| 15208 | <MODULE TTCN x x.ttcn> |
| 15209 | module x { |
| 15210 | |
| 15211 | type record recT { |
| 15212 | integer f1, |
| 15213 | float f2, |
| 15214 | charstring f3, |
| 15215 | integer f4, |
| 15216 | integer f5 |
| 15217 | } |
| 15218 | |
| 15219 | // TR 696 |
| 15220 | template recT temp1:= { f1:= temp2.f1, f2:= 1.1, f3:= "ERIXON", f4:= 1, f5:= 2 }; |
| 15221 | template recT temp2:= { f1:= temp2.f4, f2:= 1.1, f3:= "ERIXON", f4:= temp1.f1, f5:= 2 }; |
| 15222 | |
| 15223 | } |
| 15224 | <END_MODULE> |
| 15225 | <RESULT IF_PASS COUNT 1> |
| 15226 | (?im)error.+?Circular.+?reference |
| 15227 | <END_RESULT> |
| 15228 | <RESULT IF_PASS COUNT 1> |
| 15229 | (?is)\berror: |
| 15230 | <END_RESULT> |
| 15231 | <RESULT IF_FAIL POSITIVE> |
| 15232 | (?im)error.+?Circular.+?reference |
| 15233 | <END_RESULT> |
| 15234 | <END_TC> |
| 15235 | |
| 15236 | :exmp. |
| 15237 | |
| 15238 | .*---------------------------------------------------------------------* |
| 15239 | :h4.Infinite recursive loops in templates/values - cross four steps long (in def.part) |
| 15240 | .*---------------------------------------------------------------------* |
| 15241 | :xmp tab=0. |
| 15242 | |
| 15243 | <TC - Infinite recursive loops in templates/values - cross four steps long (in def.part)> |
| 15244 | |
| 15245 | <COMPILE> |
| 15246 | <VERDICT_LEAF FAIL> |
| 15247 | <MODULE TTCN x x.ttcn> |
| 15248 | module x { |
| 15249 | |
| 15250 | type record recT { |
| 15251 | integer f1, |
| 15252 | float f2, |
| 15253 | charstring f3, |
| 15254 | integer f4, |
| 15255 | integer f5 |
| 15256 | } |
| 15257 | |
| 15258 | // TR 697 |
| 15259 | template recT temp1:= { f1:= temp2.f1, f2:= 1.1, f3:= "ERIXON", f4:= 1, f5:= temp1.f1 }; |
| 15260 | template recT temp2:= { f1:= temp2.f4, f2:= 1.1, f3:= "ERIXON", f4:= temp1.f5, f5:= 2 }; |
| 15261 | |
| 15262 | } |
| 15263 | <END_MODULE> |
| 15264 | <RESULT IF_PASS COUNT 1> |
| 15265 | (?im)error.+?Circular.+?reference |
| 15266 | <END_RESULT> |
| 15267 | <RESULT IF_PASS COUNT 1> |
| 15268 | (?is)\berror: |
| 15269 | <END_RESULT> |
| 15270 | <RESULT IF_FAIL POSITIVE> |
| 15271 | (?im)error |
| 15272 | <END_RESULT> |
| 15273 | <END_TC> |
| 15274 | |
| 15275 | :exmp. |
| 15276 | |
| 15277 | .*---------------------------------------------------------------------* |
| 15278 | :h4.Infinite recursive loops in templates/values - double cross four steps long (in def.part) |
| 15279 | .*---------------------------------------------------------------------* |
| 15280 | :xmp tab=0. |
| 15281 | |
| 15282 | <TC - Infinite recursive loops in templates/values - double cross four steps long (in def.part)> |
| 15283 | |
| 15284 | <COMPILE> |
| 15285 | <VERDICT_LEAF PASS> |
| 15286 | <MODULE TTCN x x.ttcn> |
| 15287 | module x { |
| 15288 | |
| 15289 | type record recT { |
| 15290 | integer f1, |
| 15291 | float f2, |
| 15292 | charstring f3, |
| 15293 | integer f4, |
| 15294 | integer f5 |
| 15295 | } |
| 15296 | |
| 15297 | template recT temp1:= { f1:= temp2.f1, f2:= 1.1, f3:= "ERIXON", f4:= 1, f5:= 7 }; |
| 15298 | template recT temp2:= { f1:= temp3.f4, f2:= 1.1, f3:= "ERIXON", f4:= 2, f5:= 2 }; |
| 15299 | template recT temp3:= { f1:= 1, f2:= 1.1, f3:= "ERIXON", f4:= temp1.f1, f5:= 2 }; |
| 15300 | |
| 15301 | } |
| 15302 | <END_MODULE> |
| 15303 | <RESULT IF_PASS COUNT 1> |
| 15304 | (?im)error.+?Circular.+?reference |
| 15305 | <END_RESULT> |
| 15306 | <RESULT IF_PASS COUNT 1> |
| 15307 | (?is)\berror: |
| 15308 | <END_RESULT> |
| 15309 | <END_TC> |
| 15310 | |
| 15311 | :exmp. |
| 15312 | |
| 15313 | .*---------------------------------------------------------------------* |
| 15314 | :h3.Recursive loops in modified template chains |
| 15315 | .*---------------------------------------------------------------------* |
| 15316 | |
| 15317 | This test case group covers the requirement SA-6/22. |
| 15318 | |
| 15319 | Strategy: a modified template shall not refer to itself, either directly or indirectly, that is recursive derivation is not allowed. |
| 15320 | All occurances shall be tested, where such a notation can be used. |
| 15321 | |
| 15322 | Tested: - 1, 2 and 3 steps long modified templates in definition part |
| 15323 | |
| 15324 | .*---------------------------------------------------------------------* |
| 15325 | :h4.Recursive loops in modified template chains - one step long (in def.part) |
| 15326 | .*---------------------------------------------------------------------* |
| 15327 | :xmp tab=0. |
| 15328 | |
| 15329 | <TC - Recursive loops in modified template chains - one step long (in def.part)> |
| 15330 | |
| 15331 | <COMPILE> |
| 15332 | <VERDICT_LEAF PASS> |
| 15333 | <MODULE TTCN x x.ttcn> |
| 15334 | module x { |
| 15335 | |
| 15336 | type record recT { |
| 15337 | integer f1, |
| 15338 | float f2, |
| 15339 | charstring f3, |
| 15340 | integer f4, |
| 15341 | integer f5 |
| 15342 | } |
| 15343 | |
| 15344 | template recT temp1:= { f1:= 1, f2:= 1.1, f3:= "ERIXON", f4:= 1, f5:= 7 }; |
| 15345 | |
| 15346 | template recT temp2 modifies temp1:= { f1:= temp2.f1, f4:= 6}; |
| 15347 | |
| 15348 | } |
| 15349 | <END_MODULE> |
| 15350 | <RESULT IF_PASS COUNT 1> |
| 15351 | (?im)error.+?Circular.+?reference |
| 15352 | <END_RESULT> |
| 15353 | <RESULT IF_PASS COUNT 1> |
| 15354 | (?is)\berror: |
| 15355 | <END_RESULT> |
| 15356 | <END_TC> |
| 15357 | |
| 15358 | :exmp. |
| 15359 | |
| 15360 | .*---------------------------------------------------------------------* |
| 15361 | :h4.Recursive loops in modified template chains - two steps long (in def.part) |
| 15362 | .*---------------------------------------------------------------------* |
| 15363 | :xmp tab=0. |
| 15364 | |
| 15365 | <TC - Recursive loops in modified template chains - two steps long (in def.part)> |
| 15366 | |
| 15367 | <COMPILE> |
| 15368 | <VERDICT_LEAF FAIL> |
| 15369 | <MODULE TTCN x x.ttcn> |
| 15370 | module x { |
| 15371 | |
| 15372 | type record recT { |
| 15373 | integer f1, |
| 15374 | float f2, |
| 15375 | charstring f3, |
| 15376 | integer f4, |
| 15377 | integer f5 |
| 15378 | } |
| 15379 | |
| 15380 | template recT temp1:= { f1:= 1, f2:= 1.1, f3:= "ERIXON", f4:= 1, f5:= 7 }; |
| 15381 | |
| 15382 | // TR 696 |
| 15383 | template recT temp2 modifies temp1:= { f1:= temp2.f4, f4:= temp2.f1}; |
| 15384 | |
| 15385 | } |
| 15386 | <END_MODULE> |
| 15387 | <RESULT IF_PASS COUNT 1> |
| 15388 | (?im)error.+?Circular.+?reference |
| 15389 | <END_RESULT> |
| 15390 | <RESULT IF_PASS COUNT 1> |
| 15391 | (?is)\berror: |
| 15392 | <END_RESULT> |
| 15393 | <RESULT IF_FAIL POSITIVE> |
| 15394 | (?im)error.+?Circular.+?reference |
| 15395 | <END_RESULT> |
| 15396 | <END_TC> |
| 15397 | |
| 15398 | :exmp. |
| 15399 | |
| 15400 | .*---------------------------------------------------------------------* |
| 15401 | :h4.Recursive loops in modified template chains - three steps long (in def.part) |
| 15402 | .*---------------------------------------------------------------------* |
| 15403 | :xmp tab=0. |
| 15404 | |
| 15405 | <TC - Recursive loops in modified template chains - three steps long (in def.part)> |
| 15406 | |
| 15407 | <COMPILE> |
| 15408 | <VERDICT_LEAF FAIL> |
| 15409 | <MODULE TTCN x x.ttcn> |
| 15410 | module x { |
| 15411 | |
| 15412 | type record recT { |
| 15413 | integer f1, |
| 15414 | float f2, |
| 15415 | charstring f3, |
| 15416 | integer f4, |
| 15417 | integer f5 |
| 15418 | } |
| 15419 | |
| 15420 | // TR 696 |
| 15421 | template recT temp1:= { f1:= 1, f2:= 1.1, f3:= "ERIXON", f4:= 1, f5:= 7 }; |
| 15422 | template recT temp2 modifies temp1:= { f1:= temp2.f4, f4:= temp2.f5, f5:= temp2.f1}; |
| 15423 | |
| 15424 | } |
| 15425 | <END_MODULE> |
| 15426 | <RESULT IF_PASS COUNT 1> |
| 15427 | (?im)error.+?Circular.+?reference |
| 15428 | <END_RESULT> |
| 15429 | <RESULT IF_PASS COUNT 1> |
| 15430 | (?is)\berror: |
| 15431 | <END_RESULT> |
| 15432 | <RESULT IF_FAIL POSITIVE> |
| 15433 | (?im)error.+?Circular.+?reference |
| 15434 | <END_RESULT> |
| 15435 | <END_TC> |
| 15436 | |
| 15437 | :exmp. |
| 15438 | |
| 15439 | .*---------------------------------------------------------------------* |
| 15440 | :h3.Value Overflows shall be detected if possible in compile time |
| 15441 | .*---------------------------------------------------------------------* |
| 15442 | |
| 15443 | This test case group covers the requirement SA-6/23. |
| 15444 | |
| 15445 | Strategy: SA shall detect any value overflow caused by implementation (for example integer value overflow, assigned number of an enumerated |
| 15446 | identifier is greater than the MAX_INT) |
| 15447 | All occurances shall be tested, where such a notation can be used. |
| 15448 | |
| 15449 | Tested: |
| 15450 | :list. |
| 15451 | :li D='-'.simple integer constant and float constant overflows in definition part, control part and function |
| 15452 | :li D='-'.simple integer variables and float variables overflows in control part and function |
| 15453 | :li D='-'.integer overflowing in definition of an enumerated type |
| 15454 | :li D='-'.float overflowing when redefines a timer at start (in control part and function) |
| 15455 | :elist. |
| 15456 | |
| 15457 | .*---------------------------------------------------------------------* |
| 15458 | :h4.Value Overflows shall be detected if possible in compile time - integer Overflow (enumerated in def.part) |
| 15459 | .*---------------------------------------------------------------------* |
| 15460 | :xmp tab=0. |
| 15461 | |
| 15462 | <TC - Value Overflows shall be detected if possible in compile time - integer Overflow (enumerated in def.part)> |
| 15463 | |
| 15464 | <COMPILE> |
| 15465 | <VERDICT_LEAF PASS> |
| 15466 | <MODULE TTCN x x.ttcn> |
| 15467 | module x { |
| 15468 | |
| 15469 | type enumerated enumT { ONE(1), TWO(2), HUGE(99999999999999999999999999999)}; |
| 15470 | |
| 15471 | } |
| 15472 | <END_MODULE> |
| 15473 | <RESULT COUNT 1> |
| 15474 | (?is)\berror: The numeric value of enumeration `HUGE' \(99999999999999999999999999999\) is too large for being represented in memory |
| 15475 | <END_RESULT> |
| 15476 | <END_TC> |
| 15477 | |
| 15478 | :exmp. |
| 15479 | |
| 15480 | .*---------------------------------------------------------------------* |
| 15481 | :h4.Value Overflows shall be detected if possible in compile time - simple float Overflow (const in def.part) |
| 15482 | .*---------------------------------------------------------------------* |
| 15483 | :xmp tab=0. |
| 15484 | |
| 15485 | <TC - Value Overflows shall be detected if possible in compile time - simple float Overflow (const in def.part)> |
| 15486 | |
| 15487 | <COMPILE> |
| 15488 | <VERDICT_LEAF PASS> |
| 15489 | <MODULE TTCN x x.ttcn> |
| 15490 | module x { |
| 15491 | |
| 15492 | // TR 673: fatal error on value overflows |
| 15493 | const float f:= 9.1E+999; |
| 15494 | |
| 15495 | } |
| 15496 | <END_MODULE> |
| 15497 | <RESULT IF_PASS COUNT 1> |
| 15498 | (?im)error.+?Overflow |
| 15499 | <END_RESULT> |
| 15500 | <RESULT IF_PASS COUNT 1> |
| 15501 | (?is)\berror: |
| 15502 | <END_RESULT> |
| 15503 | <END_TC> |
| 15504 | |
| 15505 | :exmp. |
| 15506 | |
| 15507 | .*---------------------------------------------------------------------* |
| 15508 | :h4.Value Overflows shall be detected if possible in compile time - simple float Overflow (const in control part) |
| 15509 | TR 673: fatal error on value overflows |
| 15510 | .*---------------------------------------------------------------------* |
| 15511 | :xmp tab=0. |
| 15512 | |
| 15513 | <TC - Value Overflows shall be detected if possible in compile time - simple float Overflow (const in control part)> |
| 15514 | |
| 15515 | <COMPILE> |
| 15516 | <VERDICT_LEAF PASS> |
| 15517 | <MODULE TTCN x x.ttcn> |
| 15518 | module x { |
| 15519 | |
| 15520 | control{ |
| 15521 | const float f:= 9.1E+999; |
| 15522 | } |
| 15523 | } |
| 15524 | <END_MODULE> |
| 15525 | <RESULT IF_PASS COUNT 1> |
| 15526 | (?im)error.+?Overflow |
| 15527 | <END_RESULT> |
| 15528 | <RESULT IF_PASS COUNT 1> |
| 15529 | (?is)\berror: |
| 15530 | <END_RESULT> |
| 15531 | <END_TC> |
| 15532 | |
| 15533 | :exmp. |
| 15534 | |
| 15535 | .*---------------------------------------------------------------------* |
| 15536 | :h4.Value Overflows shall be detected if possible in compile time - simple float Overflow (const in function) |
| 15537 | TR 673: fatal error on value overflows |
| 15538 | .*---------------------------------------------------------------------* |
| 15539 | :xmp tab=0. |
| 15540 | |
| 15541 | <TC - Value Overflows shall be detected if possible in compile time - simple float Overflow (const in function)> |
| 15542 | |
| 15543 | <COMPILE> |
| 15544 | <VERDICT_LEAF PASS> |
| 15545 | <MODULE TTCN x x.ttcn> |
| 15546 | module x { |
| 15547 | |
| 15548 | function myFunct(){ |
| 15549 | const float f:= 9.1E+999; |
| 15550 | } |
| 15551 | } |
| 15552 | <END_MODULE> |
| 15553 | <RESULT IF_PASS COUNT 1> |
| 15554 | (?im)error.+?Overflow |
| 15555 | <END_RESULT> |
| 15556 | <RESULT IF_PASS COUNT 1> |
| 15557 | (?is)\berror: |
| 15558 | <END_RESULT> |
| 15559 | <END_TC> |
| 15560 | |
| 15561 | :exmp. |
| 15562 | |
| 15563 | .*---------------------------------------------------------------------* |
| 15564 | :h4.Value Overflows shall be detected if possible in compile time - simple float Overflow (variable in control part) |
| 15565 | TR 673: fatal error on value overflows |
| 15566 | .*---------------------------------------------------------------------* |
| 15567 | :xmp tab=0. |
| 15568 | |
| 15569 | <TC - Value Overflows shall be detected if possible in compile time - simple float Overflow (variable in control part)> |
| 15570 | |
| 15571 | <COMPILE> |
| 15572 | <VERDICT_LEAF PASS> |
| 15573 | <MODULE TTCN x x.ttcn> |
| 15574 | module x { |
| 15575 | |
| 15576 | control{ |
| 15577 | var float f:= 9.1E+999; |
| 15578 | } |
| 15579 | } |
| 15580 | <END_MODULE> |
| 15581 | <RESULT IF_PASS COUNT 1> |
| 15582 | (?im)error.+?Overflow |
| 15583 | <END_RESULT> |
| 15584 | <RESULT IF_PASS COUNT 1> |
| 15585 | (?is)\berror: |
| 15586 | <END_RESULT> |
| 15587 | <END_TC> |
| 15588 | |
| 15589 | :exmp. |
| 15590 | |
| 15591 | .*---------------------------------------------------------------------* |
| 15592 | :h4.Value Overflows shall be detected if possible in compile time - simple float Overflow (variable in function) |
| 15593 | TR 673: fatal error on value overflows |
| 15594 | .*---------------------------------------------------------------------* |
| 15595 | :xmp tab=0. |
| 15596 | |
| 15597 | <TC - Value Overflows shall be detected if possible in compile time - simple float Overflow (variable in function)> |
| 15598 | |
| 15599 | <COMPILE> |
| 15600 | <VERDICT_LEAF PASS> |
| 15601 | <MODULE TTCN x x.ttcn> |
| 15602 | module x { |
| 15603 | |
| 15604 | function myFunct(){ |
| 15605 | var float f:= 9.1E+999; |
| 15606 | } |
| 15607 | } |
| 15608 | <END_MODULE> |
| 15609 | <RESULT IF_PASS COUNT 1> |
| 15610 | (?im)error.+?Overflow |
| 15611 | <END_RESULT> |
| 15612 | <RESULT IF_PASS COUNT 1> |
| 15613 | (?is)\berror: |
| 15614 | <END_RESULT> |
| 15615 | <END_TC> |
| 15616 | |
| 15617 | :exmp. |
| 15618 | |
| 15619 | .*---------------------------------------------------------------------* |
| 15620 | :h4.Value Overflows shall be detected if possible in compile time - float Overflow (timer start in control part) |
| 15621 | TR 673: fatal error on value overflows |
| 15622 | .*---------------------------------------------------------------------* |
| 15623 | :xmp tab=0. |
| 15624 | |
| 15625 | <TC - Value Overflows shall be detected if possible in compile time - float Overflow (timer start in control part)> |
| 15626 | |
| 15627 | <COMPILE> |
| 15628 | <VERDICT_LEAF PASS> |
| 15629 | <MODULE TTCN x x.ttcn> |
| 15630 | module x { |
| 15631 | |
| 15632 | control{ |
| 15633 | timer T1:= 500.0; |
| 15634 | T1.start( 9.1E+999); |
| 15635 | } |
| 15636 | } |
| 15637 | <END_MODULE> |
| 15638 | <RESULT IF_PASS COUNT 1> |
| 15639 | (?im)error.+?Overflow |
| 15640 | <END_RESULT> |
| 15641 | <RESULT IF_PASS COUNT 1> |
| 15642 | (?is)\berror: |
| 15643 | <END_RESULT> |
| 15644 | <END_TC> |
| 15645 | |
| 15646 | :exmp. |
| 15647 | |
| 15648 | .*---------------------------------------------------------------------* |
| 15649 | :h4.Value Overflows shall be detected if possible in compile time - float Overflow (timer start in function) |
| 15650 | TR 673: fatal error on value overflows |
| 15651 | .*---------------------------------------------------------------------* |
| 15652 | :xmp tab=0. |
| 15653 | |
| 15654 | <TC - Value Overflows shall be detected if possible in compile time - float Overflow (timer start in function)> |
| 15655 | |
| 15656 | <COMPILE> |
| 15657 | <VERDICT_LEAF PASS> |
| 15658 | <MODULE TTCN x x.ttcn> |
| 15659 | module x { |
| 15660 | |
| 15661 | function myFunct(){ |
| 15662 | timer T1:= 500.0; |
| 15663 | T1.start( 9.1E+999); |
| 15664 | } |
| 15665 | } |
| 15666 | <END_MODULE> |
| 15667 | <RESULT IF_PASS COUNT 1> |
| 15668 | (?im)error.+?Overflow |
| 15669 | <END_RESULT> |
| 15670 | <RESULT IF_PASS COUNT 1> |
| 15671 | (?is)\berror: |
| 15672 | <END_RESULT> |
| 15673 | <END_TC> |
| 15674 | |
| 15675 | :exmp. |
| 15676 | |
| 15677 | .*---------------------------------------------------------------------* |
| 15678 | :h4.Constant folding - indexed arrays |
| 15679 | .*---------------------------------------------------------------------* |
| 15680 | :xmp tab=0. |
| 15681 | |
| 15682 | <TC - Constant folding - indexed arrays> |
| 15683 | |
| 15684 | <COMPILE> |
| 15685 | <VERDICT_LEAF PASS> |
| 15686 | <MODULE TTCN x x.ttcn> |
| 15687 | module x { |
| 15688 | control { |
| 15689 | const integer c_array1[4] := { 1,2,3,4}; |
| 15690 | const integer c_array2[4] := { 1,2,3,4}; |
| 15691 | const integer c_array3[4] := { 4,3,2,1}; |
| 15692 | const integer c_array4_ind[4] := { [0] := 1, [1] := 2, [2] := 3, [3] := 4}; |
| 15693 | const integer c_array5_ind[4] := { [3] := 4, [1] := 2, [2] := 3, [0] := 1}; |
| 15694 | |
| 15695 | |
| 15696 | var integer vl_array5[4] := { 1,2,3,4}; |
| 15697 | var boolean b := false; |
| 15698 | |
| 15699 | if(c_array1 == c_array1) {b:= true;} |
| 15700 | else {b := false;} |
| 15701 | |
| 15702 | if({1,2,3,4} == c_array1) {b:= true;} |
| 15703 | else {b := false;} |
| 15704 | if(c_array1 == {1,2,3,4}) {b:= true;} |
| 15705 | else {b := false;} |
| 15706 | |
| 15707 | if(c_array1 == c_array2) {b:= true;} |
| 15708 | else {b := false;} |
| 15709 | |
| 15710 | if(c_array4_ind == c_array4_ind) {b:= true;} |
| 15711 | else {b := false;} |
| 15712 | |
| 15713 | if(c_array1 == c_array4_ind) {b:= true;} |
| 15714 | else {b := false;} |
| 15715 | if(c_array4_ind == c_array1) {b:= true;} |
| 15716 | else {b := false;} |
| 15717 | |
| 15718 | if({ [0] := 1, [1] := 2, [2] := 3, [3] := 4} == c_array4_ind) {b:= true;} |
| 15719 | else {b := false;} |
| 15720 | if(c_array4_ind == { [0] := 1, [1] := 2, [2] := 3, [3] := 4}) {b:= true;} |
| 15721 | else {b := false;} |
| 15722 | |
| 15723 | if(c_array4_ind == c_array5_ind) {b:= true;} |
| 15724 | else {b := false;} |
| 15725 | |
| 15726 | if(vl_array5 == c_array1) {b:= true;} |
| 15727 | else {b := false;} |
| 15728 | } |
| 15729 | |
| 15730 | } |
| 15731 | <END_MODULE> |
| 15732 | <RESULT IF_PASS COUNT 10> |
| 15733 | (?im)warning: Control never reaches this code because of previous effective condition\(s\) |
| 15734 | <END_RESULT> |
| 15735 | <END_TC> |
| 15736 | |
| 15737 | :exmp. |
| 15738 | |
| 15739 | .*---------------------------------------------------------------------* |
| 15740 | :h4.Constant folding - indexed record of |
| 15741 | .*---------------------------------------------------------------------* |
| 15742 | :xmp tab=0. |
| 15743 | |
| 15744 | <TC - Constant folding - indexed record of> |
| 15745 | |
| 15746 | <COMPILE> |
| 15747 | <VERDICT_LEAF PASS> |
| 15748 | <MODULE TTCN x x.ttcn> |
| 15749 | module x { |
| 15750 | type record of integer recof; |
| 15751 | control { |
| 15752 | |
| 15753 | const recof c_r1 := { 1,2,3,4}; |
| 15754 | const recof c_r2 := { 1,2,3,4}; |
| 15755 | const recof c_r3 := { 4,3,2,1}; |
| 15756 | const recof c_r4_ind := { [0] := 1, [1] := 2, [2] := 3, [3] := 4}; |
| 15757 | const recof c_r5_ind := { [3] := 1, [1] := 2, [2] := 3, [0] := 4}; |
| 15758 | const recof c_r6_ind := { [3] := 4, [1] := 2, [2] := 3, [0] := 1}; |
| 15759 | const recof c_r8_ind := { [0] := 1, [1] := 2, [2] := 3, [3] := 4}; |
| 15760 | |
| 15761 | |
| 15762 | var recof vl_r7_ind := { [3] := 4, [1] := 2}; |
| 15763 | |
| 15764 | var recof vl_r10 := { 1,2,3,4}; |
| 15765 | var recof vl_r11 := { 1,2,3,4}; |
| 15766 | |
| 15767 | var boolean b := false; |
| 15768 | |
| 15769 | if(c_r1 == c_r1) {b:= true;} |
| 15770 | else {b:= false;} |
| 15771 | |
| 15772 | if(c_r1 == c_r2) {b:= true;} |
| 15773 | else {b:= false;} |
| 15774 | |
| 15775 | if(c_r4_ind == c_r4_ind) {b:= true;} |
| 15776 | else {b:= false;} |
| 15777 | |
| 15778 | if(c_r1 == c_r4_ind) {b:= true;} |
| 15779 | else {b:= false;} |
| 15780 | if(c_r4_ind == c_r1) {b:= true;} |
| 15781 | else {b:= false;} |
| 15782 | |
| 15783 | if(c_r1 == c_r6_ind) {b:= true;} |
| 15784 | else {b:= false;} |
| 15785 | |
| 15786 | if(c_r1 != vl_r7_ind) {b:= true;} |
| 15787 | else { b:= false;} |
| 15788 | |
| 15789 | if(c_r4_ind == c_r8_ind) {b:= true;} |
| 15790 | else {b:= false;} |
| 15791 | |
| 15792 | if(vl_r10 == vl_r11) {b:= true;} |
| 15793 | else {b:= false;} |
| 15794 | } |
| 15795 | |
| 15796 | } |
| 15797 | <END_MODULE> |
| 15798 | <RESULT IF_PASS COUNT 7> |
| 15799 | (?im)warning: Control never reaches this code because of previous effective condition\(s\) |
| 15800 | <END_RESULT> |
| 15801 | <END_TC> |
| 15802 | |
| 15803 | :exmp. |
| 15804 | |
| 15805 | .*---------------------------------------------------------------------* |
| 15806 | :h4.Constant folding - indexed set of |
| 15807 | .*---------------------------------------------------------------------* |
| 15808 | :xmp tab=0. |
| 15809 | |
| 15810 | <TC - Constant folding - indexed set of> |
| 15811 | <COMPILE> |
| 15812 | <VERDICT_LEAF PASS> |
| 15813 | <MODULE TTCN x x.ttcn> |
| 15814 | module x { |
| 15815 | type set of integer mysetof; |
| 15816 | control { |
| 15817 | |
| 15818 | const mysetof c_s1 := {1,2,3,4}; |
| 15819 | const mysetof c_s2 := {4,3,2,1}; |
| 15820 | const mysetof c_s3 := {1,3,2,4}; |
| 15821 | const mysetof c_s4 := {1,2,3,4,5}; |
| 15822 | const mysetof c_s5 := {0,1,2,3,4}; |
| 15823 | const mysetof c_s6 := {0,1,2,3,4,5} |
| 15824 | |
| 15825 | const mysetof c_s1_ind := {[0] := 1,[1] := 2,[2] := 3, [3] := 4}; |
| 15826 | const mysetof c_s2_ind := {[0] := 1,[3] := 4,[2] := 3, [1] := 2}; |
| 15827 | const mysetof c_s3_ind := {[0] := 2,[3] := 1,[2] := 3, [1] := 4}; |
| 15828 | |
| 15829 | var mysetof vl_s1 := {1,2,3,4}; |
| 15830 | |
| 15831 | var boolean b := false; |
| 15832 | |
| 15833 | if(c_s1 == c_s1) {b:= true;} |
| 15834 | else {b:= false;} |
| 15835 | |
| 15836 | if(c_s1 == {1,2,3,4}) {b:= true;} |
| 15837 | else {b:= false;} |
| 15838 | if({1,2,3,4} == c_s1) {b:= true;} |
| 15839 | else {b:= false;} |
| 15840 | |
| 15841 | if(c_s1 == {[0] := 1,[1] := 2,[2] := 3, [3] := 4}) {b:= true;} |
| 15842 | else {b:= false;} |
| 15843 | if({[0] := 1,[1] := 2,[2] := 3, [3] := 4} == c_s1) {b:= true;} |
| 15844 | else {b:= false;} |
| 15845 | |
| 15846 | if(c_s1 == c_s1_ind) {b:= true;} |
| 15847 | else {b:= false;} |
| 15848 | if(c_s1_ind == c_s1) {b:= true;} |
| 15849 | else {b:= false;} |
| 15850 | |
| 15851 | if(c_s1_ind == c_s2_ind) {b:= true;} |
| 15852 | else {b:= false;} |
| 15853 | |
| 15854 | if(c_s1_ind == c_s3_ind) {b:= true;} |
| 15855 | else {b:= false;} |
| 15856 | |
| 15857 | if(c_s1 == c_s3_ind) {b:= true;} |
| 15858 | else {b:= false;} |
| 15859 | |
| 15860 | if(c_s2_ind == c_s3_ind) {b:= true;} |
| 15861 | else {b:= false;} |
| 15862 | |
| 15863 | if(c_s1 == vl_s1) {b:= true;} |
| 15864 | else {b:= false;} |
| 15865 | if(vl_s1 == c_s1) {b:= true;} |
| 15866 | else {b:= false;} |
| 15867 | |
| 15868 | if(c_s1 == c_s2) {b:= true;} |
| 15869 | else {b:= false;} |
| 15870 | |
| 15871 | if(c_s1 == c_s3) {b:= true;} |
| 15872 | else {b:= false;} |
| 15873 | |
| 15874 | if(c_s1 != c_s4) {b:= true;} |
| 15875 | else {b:= false;} |
| 15876 | |
| 15877 | if(c_s1 != c_s5) {b:= true;} |
| 15878 | else {b:= false;} |
| 15879 | |
| 15880 | if(c_s1 != c_s6) {b:= true;} |
| 15881 | else {b:= false;} |
| 15882 | |
| 15883 | if(c_s5 != c_s6) {b:= true;} |
| 15884 | else {b:= false;} |
| 15885 | } |
| 15886 | |
| 15887 | } |
| 15888 | <END_MODULE> |
| 15889 | <RESULT IF_PASS COUNT 17> |
| 15890 | (?im)warning: Control never reaches this code because of previous effective condition\(s\) |
| 15891 | <END_RESULT> |
| 15892 | <END_TC> |
| 15893 | |
| 15894 | :exmp. |
| 15895 | |
| 15896 | .*---------------------------------------------------------------------* |
| 15897 | :h4.Invalid access to not-selected union field shall cause dyanimc testcase error - access to non-actual union element 1 |
| 15898 | TR HN30230: Value of union is set to unbount if other union possibilities are tried to be accessed. |
| 15899 | .*---------------------------------------------------------------------* |
| 15900 | :xmp tab=0. |
| 15901 | |
| 15902 | <TC - Invalid access to not-selected union field shall cause dyanimc testcase error - access to non-actual union element 1> |
| 15903 | <EXECUTE> |
| 15904 | <VERDICT_LEAF PASS> |
| 15905 | <MODULE TTCN Temp Temp.ttcn> |
| 15906 | module Temp { |
| 15907 | type union UnionType1{ |
| 15908 | UnionType2 girl, |
| 15909 | integer numero |
| 15910 | } |
| 15911 | type union UnionType2{ |
| 15912 | Emma emma, |
| 15913 | Eszter eszter |
| 15914 | } |
| 15915 | |
| 15916 | type record Emma { charstring name} |
| 15917 | type record Eszter { charstring name} |
| 15918 | |
| 15919 | type component dummy_CT {} |
| 15920 | testcase tc_UnboundUnion () runs on dummy_CT{ |
| 15921 | var UnionType1 vl_e := {girl := {emma := {name := "Emma"}}}; |
| 15922 | log(log2str("numero: ",vl_e.numero)); |
| 15923 | } |
| 15924 | |
| 15925 | control |
| 15926 | { |
| 15927 | execute(tc_UnboundUnion()); |
| 15928 | } |
| 15929 | } |
| 15930 | <END_MODULE> |
| 15931 | <MODULE CFG Temp Temp.cfg> |
| 15932 | [MODULE_PARAMETERS] |
| 15933 | [LOGGING] |
| 15934 | LogSourceInfo := Yes |
| 15935 | Logfile := "Temp%i.log" |
| 15936 | LogFileSize := 10 |
| 15937 | LogFileNumber := 10 |
| 15938 | DiskFullAction := error |
| 15939 | FileMask := LOG_ALL |
| 15940 | ConsoleMask := WARNING | ERROR | TESTCASE | STATISTICS |
| 15941 | [EXECUTE] |
| 15942 | Temp |
| 15943 | <END_MODULE> |
| 15944 | <RESULT IF_PASS COUNT 1> |
| 15945 | (?im)Dynamic test case error: Using non-selected field numero in a value of union type @Temp.UnionType1. |
| 15946 | <END_RESULT> |
| 15947 | |
| 15948 | <END_TC> |
| 15949 | :exmp. |
| 15950 | |
| 15951 | .*---------------------------------------------------------------------* |
| 15952 | :h4.Invalid access to not-selected union field shall cause dyanimc testcase error - access to non-actual union element 2 |
| 15953 | TR HN30230: Value of union is set to unbount if other union possibilities are tried to be accessed. |
| 15954 | .*---------------------------------------------------------------------* |
| 15955 | :xmp tab=0. |
| 15956 | |
| 15957 | <TC - Invalid access to not-selected union field shall cause dyanimc testcase error - access to non-actual union element 2> |
| 15958 | <EXECUTE> |
| 15959 | <VERDICT_LEAF PASS> |
| 15960 | <MODULE TTCN Temp Temp.ttcn> |
| 15961 | module Temp { |
| 15962 | type union UnionType1{ |
| 15963 | UnionType2 girl, |
| 15964 | integer numero |
| 15965 | } |
| 15966 | type union UnionType2{ |
| 15967 | Emma emma, |
| 15968 | Eszter eszter |
| 15969 | } |
| 15970 | |
| 15971 | type record Emma { charstring name} |
| 15972 | type record Eszter { charstring name} |
| 15973 | |
| 15974 | type component dummy_CT {} |
| 15975 | testcase tc_UnboundUnion () runs on dummy_CT{ |
| 15976 | var UnionType1 vl_e := {girl := {emma := {name := "Emma"}}}; |
| 15977 | var integer temp := vl_e.numero; |
| 15978 | } |
| 15979 | |
| 15980 | control |
| 15981 | { |
| 15982 | execute(tc_UnboundUnion()); |
| 15983 | } |
| 15984 | } |
| 15985 | <END_MODULE> |
| 15986 | <MODULE CFG Temp Temp.cfg> |
| 15987 | [MODULE_PARAMETERS] |
| 15988 | [LOGGING] |
| 15989 | LogSourceInfo := Yes |
| 15990 | Logfile := "Temp%i.log" |
| 15991 | LogFileSize := 10 |
| 15992 | LogFileNumber := 10 |
| 15993 | DiskFullAction := error |
| 15994 | FileMask := LOG_ALL |
| 15995 | ConsoleMask := WARNING | ERROR | TESTCASE | STATISTICS |
| 15996 | [EXECUTE] |
| 15997 | Temp |
| 15998 | <END_MODULE> |
| 15999 | <RESULT IF_PASS COUNT 1> |
| 16000 | (?im)Dynamic test case error: Using non-selected field numero in a value of union type @Temp.UnionType1. |
| 16001 | <END_RESULT> |
| 16002 | |
| 16003 | <END_TC> |
| 16004 | :exmp. |
| 16005 | |
| 16006 | .*---------------------------------------------------------------------* |
| 16007 | :h4.Invalid access to not-selected union field shall cause dyanimc testcase error - access to non-actual union element 3 |
| 16008 | TR HN30230: Value of union is set to unbount if other union possibilities are tried to be accessed. |
| 16009 | .*---------------------------------------------------------------------* |
| 16010 | :xmp tab=0. |
| 16011 | |
| 16012 | <TC - Invalid access to not-selected union field shall cause dyanimc testcase error - access to non-actual union element 3> |
| 16013 | <EXECUTE> |
| 16014 | <VERDICT_LEAF PASS> |
| 16015 | <MODULE TTCN Temp Temp.ttcn> |
| 16016 | module Temp { |
| 16017 | type union UnionType1{ |
| 16018 | UnionType2 girl, |
| 16019 | integer numero |
| 16020 | } |
| 16021 | type union UnionType2{ |
| 16022 | Emma emma, |
| 16023 | Eszter eszter |
| 16024 | } |
| 16025 | |
| 16026 | type record Emma { charstring name} |
| 16027 | type record Eszter { charstring name} |
| 16028 | |
| 16029 | type component dummy_CT {} |
| 16030 | testcase tc_UnboundUnion () runs on dummy_CT{ |
| 16031 | var UnionType1 vl_e := {girl := {emma := {name := "Emma"}}}; |
| 16032 | var integer temp; |
| 16033 | temp := vl_e.numero; |
| 16034 | } |
| 16035 | |
| 16036 | control |
| 16037 | { |
| 16038 | execute(tc_UnboundUnion()); |
| 16039 | } |
| 16040 | } |
| 16041 | <END_MODULE> |
| 16042 | <MODULE CFG Temp Temp.cfg> |
| 16043 | [MODULE_PARAMETERS] |
| 16044 | [LOGGING] |
| 16045 | LogSourceInfo := Yes |
| 16046 | Logfile := "Temp%i.log" |
| 16047 | LogFileSize := 10 |
| 16048 | LogFileNumber := 10 |
| 16049 | DiskFullAction := error |
| 16050 | FileMask := LOG_ALL |
| 16051 | ConsoleMask := WARNING | ERROR | TESTCASE | STATISTICS |
| 16052 | [EXECUTE] |
| 16053 | Temp |
| 16054 | <END_MODULE> |
| 16055 | <RESULT IF_PASS COUNT 1> |
| 16056 | (?im)Dynamic test case error: Using non-selected field numero in a value of union type @Temp.UnionType1. |
| 16057 | <END_RESULT> |
| 16058 | |
| 16059 | <END_TC> |
| 16060 | :exmp. |
| 16061 | |
| 16062 | .*---------------------------------------------------------------------* |
| 16063 | :h4.Invalid access to not-selected union field shall cause dyanimc testcase error - access to non-actual union element 4 |
| 16064 | TR HN30230: Value of union is set to unbount if other union possibilities are tried to be accessed. |
| 16065 | .*---------------------------------------------------------------------* |
| 16066 | :xmp tab=0. |
| 16067 | |
| 16068 | <TC - Invalid access to not-selected union field shall cause dyanimc testcase error - access to non-actual union element 4> |
| 16069 | <EXECUTE> |
| 16070 | <VERDICT_LEAF PASS> |
| 16071 | <MODULE TTCN Temp Temp.ttcn> |
| 16072 | module Temp { |
| 16073 | type union UnionType1{ |
| 16074 | UnionType2 girl, |
| 16075 | integer numero |
| 16076 | } |
| 16077 | type union UnionType2{ |
| 16078 | Emma emma, |
| 16079 | Eszter eszter |
| 16080 | } |
| 16081 | |
| 16082 | type record Emma { charstring name} |
| 16083 | type record Eszter { charstring name} |
| 16084 | |
| 16085 | function dummy(integer par) { |
| 16086 | } |
| 16087 | |
| 16088 | type component dummy_CT {} |
| 16089 | testcase tc_UnboundUnion () runs on dummy_CT{ |
| 16090 | var UnionType1 vl_e := {girl := {emma := {name := "Emma"}}}; |
| 16091 | dummy(vl_e.numero); |
| 16092 | } |
| 16093 | |
| 16094 | control |
| 16095 | { |
| 16096 | execute(tc_UnboundUnion()); |
| 16097 | } |
| 16098 | } |
| 16099 | <END_MODULE> |
| 16100 | <MODULE CFG Temp Temp.cfg> |
| 16101 | [MODULE_PARAMETERS] |
| 16102 | [LOGGING] |
| 16103 | LogSourceInfo := Yes |
| 16104 | Logfile := "Temp%i.log" |
| 16105 | LogFileSize := 10 |
| 16106 | LogFileNumber := 10 |
| 16107 | DiskFullAction := error |
| 16108 | FileMask := LOG_ALL |
| 16109 | ConsoleMask := WARNING | ERROR | TESTCASE | STATISTICS |
| 16110 | [EXECUTE] |
| 16111 | Temp |
| 16112 | <END_MODULE> |
| 16113 | <RESULT IF_PASS COUNT 1> |
| 16114 | (?im)Dynamic test case error: Using non-selected field numero in a value of union type @Temp.UnionType1. |
| 16115 | <END_RESULT> |
| 16116 | |
| 16117 | <END_TC> |
| 16118 | :exmp. |
| 16119 | |
| 16120 | .*---------------------------------------------------------------------* |
| 16121 | :h4.Invalid access to not-selected union field shall cause dyanimc testcase error - access to non-actual union element 5 |
| 16122 | TR HN30230: Value of union is set to unbount if other union possibilities are tried to be accessed. |
| 16123 | .*---------------------------------------------------------------------* |
| 16124 | :xmp tab=0. |
| 16125 | |
| 16126 | <TC - Invalid access to not-selected union field shall cause dyanimc testcase error - access to non-actual union element 5> |
| 16127 | <EXECUTE> |
| 16128 | <VERDICT_LEAF PASS> |
| 16129 | <MODULE TTCN Temp Temp.ttcn> |
| 16130 | module Temp { |
| 16131 | type union UnionType1{ |
| 16132 | UnionType2 girl, |
| 16133 | integer numero |
| 16134 | } |
| 16135 | type union UnionType2{ |
| 16136 | Emma emma, |
| 16137 | Eszter eszter |
| 16138 | } |
| 16139 | |
| 16140 | type record Emma { charstring name} |
| 16141 | type record Eszter { charstring name} |
| 16142 | |
| 16143 | type component dummy_CT {} |
| 16144 | testcase tc_UnboundUnion () runs on dummy_CT{ |
| 16145 | var UnionType1 vl_e := {girl := {emma := {name := "Emma"}}}; |
| 16146 | var integer v[5]; |
| 16147 | v[vl_e.numero] := 1; |
| 16148 | } |
| 16149 | |
| 16150 | control |
| 16151 | { |
| 16152 | execute(tc_UnboundUnion()); |
| 16153 | } |
| 16154 | } |
| 16155 | <END_MODULE> |
| 16156 | <MODULE CFG Temp Temp.cfg> |
| 16157 | [MODULE_PARAMETERS] |
| 16158 | [LOGGING] |
| 16159 | LogSourceInfo := Yes |
| 16160 | Logfile := "Temp%i.log" |
| 16161 | LogFileSize := 10 |
| 16162 | LogFileNumber := 10 |
| 16163 | DiskFullAction := error |
| 16164 | FileMask := LOG_ALL |
| 16165 | ConsoleMask := WARNING | ERROR | TESTCASE | STATISTICS |
| 16166 | [EXECUTE] |
| 16167 | Temp |
| 16168 | <END_MODULE> |
| 16169 | <RESULT IF_PASS COUNT 1> |
| 16170 | (?im)Dynamic test case error: Using non-selected field numero in a value of union type @Temp.UnionType1. |
| 16171 | <END_RESULT> |
| 16172 | |
| 16173 | <END_TC> |
| 16174 | :exmp. |
| 16175 | |
| 16176 | .*---------------------------------------------------------------------* |
| 16177 | :h3.TTCN-3::Referencing a unbound field |
| 16178 | .*---------------------------------------------------------------------* |
| 16179 | :xmp tab=0. |
| 16180 | <TC - TTCN-3::Referencing a unbound field> |
| 16181 | |
| 16182 | <COMPILE> |
| 16183 | <VERDICT_LEAF PASS> |
| 16184 | <MODULE TTCN ModuleA ModuleA.ttcn> |
| 16185 | module ModuleA { |
| 16186 | type record recordInner {integer f1, integer f2}; |
| 16187 | type record recordOuter {recordInner f1, integer f2}; |
| 16188 | |
| 16189 | function problem() { |
| 16190 | template recordOuter vt_temp := {f2 := 5}; |
| 16191 | template integer t_temp := vt_temp.f1.f1; |
| 16192 | } |
| 16193 | } |
| 16194 | <END_MODULE> |
| 16195 | <RESULT IF_PASS COUNT 1> |
| 16196 | (?im)\berror\b.+?Reference.+?unbound.*?field.+?f1 |
| 16197 | <END_RESULT> |
| 16198 | <END_TC> |
| 16199 | :exmp. |
| 16200 | |
| 16201 | .*---------------------------------------------------------------------* |
| 16202 | :h3.TTCN-3::Referencing a unbound component variable (TR no. HO24162, HO23581) |
| 16203 | .*---------------------------------------------------------------------* |
| 16204 | :xmp tab=0. |
| 16205 | <TC - TTCN-3::Referencing a unbound component variable (TR no. HO24162, HO23581)> |
| 16206 | |
| 16207 | <COMPILEGCC> |
| 16208 | <VERDICT_LEAF PASS> |
| 16209 | <MODULE TTCN ModuleA ModuleA.ttcn> |
| 16210 | module ModuleA { |
| 16211 | type record of integer IList; |
| 16212 | |
| 16213 | type component C { |
| 16214 | var integer i; |
| 16215 | var IList ilist; |
| 16216 | } |
| 16217 | |
| 16218 | function problem() runs on C { |
| 16219 | action(isbound(i), " i: ", i); |
| 16220 | } |
| 16221 | } |
| 16222 | <END_MODULE> |
| 16223 | <MODULE TTCN ModuleB ModuleB.ttcn> |
| 16224 | module ModuleB { |
| 16225 | import from ModuleA all; |
| 16226 | |
| 16227 | function problem() runs on C { |
| 16228 | action(isbound(i), " i: ", i); |
| 16229 | action(isbound(ilist[i]), " ilist[i]: ", ilist[i]); |
| 16230 | } |
| 16231 | } |
| 16232 | <END_MODULE> |
| 16233 | <RESULT IF_PASS NEGATIVE> |
| 16234 | (?is)\berror: |
| 16235 | <END_RESULT> |
| 16236 | <END_TC> |
| 16237 | :exmp. |
| 16238 | |
| 16239 | .*---------------------------------------------------------------------* |
| 16240 | :h3.TTCN-3::Referencing a unbound field (TR no. HN91136) |
| 16241 | .*---------------------------------------------------------------------* |
| 16242 | :xmp tab=0. |
| 16243 | <TC - TTCN-3::Referencing a unbound field (TR no. HN91136)> |
| 16244 | |
| 16245 | <EXECUTE> |
| 16246 | <VERDICT_LEAF PASS> |
| 16247 | <MODULE TTCN ModuleA ModuleA.ttcn> |
| 16248 | module ModuleA { |
| 16249 | type union bubu { |
| 16250 | integer a, |
| 16251 | integer b |
| 16252 | } |
| 16253 | |
| 16254 | type record of integer intrec; |
| 16255 | |
| 16256 | control { |
| 16257 | var bubu i := { a:= 2}; |
| 16258 | action(isbound(i.b)); |
| 16259 | var intrec vl_rec := {}; |
| 16260 | action(isbound(vl_rec[2])); |
| 16261 | } |
| 16262 | } |
| 16263 | <END_MODULE> |
| 16264 | <MODULE CFG Temp Temp.cfg> |
| 16265 | [MODULE_PARAMETERS] |
| 16266 | [LOGGING] |
| 16267 | LogSourceInfo := Yes |
| 16268 | Logfile := "Temp%i.log" |
| 16269 | LogFileSize := 10 |
| 16270 | LogFileNumber := 10 |
| 16271 | DiskFullAction := error |
| 16272 | FileMask := LOG_ALL |
| 16273 | ConsoleMask := WARNING | ERROR | TESTCASE | STATISTICS |
| 16274 | [EXECUTE] |
| 16275 | ModuleA |
| 16276 | <END_MODULE> |
| 16277 | <RESULT IF_PASS POSITIVE> |
| 16278 | (?im)Test execution summary: 0 test case was executed. Overall verdict: none |
| 16279 | <END_RESULT> |
| 16280 | <END_TC> |
| 16281 | :exmp. |
| 16282 | |
| 16283 | .*---------------------------------------------------------------------* |
| 16284 | :h3.TTCN-3::Referencing a unbound bitstring bit |
| 16285 | .*---------------------------------------------------------------------* |
| 16286 | :xmp tab=0. |
| 16287 | <TC - TTCN-3::Referencing a unbound bitstring bit> |
| 16288 | |
| 16289 | <EXECUTE> |
| 16290 | <VERDICT_LEAF PASS> |
| 16291 | <MODULE TTCN ModuleA ModuleA.ttcn> |
| 16292 | module ModuleA { |
| 16293 | type component dummy_CT {} |
| 16294 | testcase tc_temp () runs on dummy_CT{ |
| 16295 | var bitstring bstr; |
| 16296 | log(isvalue(bstr[0])); |
| 16297 | } |
| 16298 | control { |
| 16299 | execute(tc_temp()); |
| 16300 | } |
| 16301 | } |
| 16302 | <END_MODULE> |
| 16303 | <MODULE CFG Temp Temp.cfg> |
| 16304 | [MODULE_PARAMETERS] |
| 16305 | [LOGGING] |
| 16306 | LogSourceInfo := Yes |
| 16307 | Logfile := "Temp%i.log" |
| 16308 | LogFileSize := 10 |
| 16309 | LogFileNumber := 10 |
| 16310 | DiskFullAction := error |
| 16311 | FileMask := LOG_ALL |
| 16312 | ConsoleMask := WARNING | ERROR | TESTCASE | STATISTICS |
| 16313 | [EXECUTE] |
| 16314 | ModuleA |
| 16315 | <END_MODULE> |
| 16316 | <RESULT IF_FAIL POSITIVE> |
| 16317 | (?im)Dynamic test case error: Accessing an element of an unbound bitstring value. |
| 16318 | <END_RESULT> |
| 16319 | <END_TC> |
| 16320 | :exmp. |
| 16321 | |
| 16322 | .*---------------------------------------------------------------------* |
| 16323 | :h3.TTCN-3::Referencing a unbound charstring bit |
| 16324 | .*---------------------------------------------------------------------* |
| 16325 | :xmp tab=0. |
| 16326 | <TC - TTCN-3::Referencing a unbound charstring bit> |
| 16327 | |
| 16328 | <EXECUTE> |
| 16329 | <VERDICT_LEAF PASS> |
| 16330 | <MODULE TTCN ModuleA ModuleA.ttcn> |
| 16331 | module ModuleA { |
| 16332 | type component dummy_CT {} |
| 16333 | testcase tc_temp () runs on dummy_CT{ |
| 16334 | var charstring cstr; |
| 16335 | log(isvalue(cstr[0])); |
| 16336 | } |
| 16337 | control { |
| 16338 | execute(tc_temp()); |
| 16339 | } |
| 16340 | } |
| 16341 | <END_MODULE> |
| 16342 | <MODULE CFG Temp Temp.cfg> |
| 16343 | [MODULE_PARAMETERS] |
| 16344 | [LOGGING] |
| 16345 | LogSourceInfo := Yes |
| 16346 | Logfile := "Temp%i.log" |
| 16347 | LogFileSize := 10 |
| 16348 | LogFileNumber := 10 |
| 16349 | DiskFullAction := error |
| 16350 | FileMask := LOG_ALL |
| 16351 | ConsoleMask := WARNING | ERROR | TESTCASE | STATISTICS |
| 16352 | [EXECUTE] |
| 16353 | ModuleA |
| 16354 | <END_MODULE> |
| 16355 | <RESULT IF_FAIL POSITIVE> |
| 16356 | (?im)Dynamic test case error: Accessing an element of an unbound charstring value. |
| 16357 | <END_RESULT> |
| 16358 | <END_TC> |
| 16359 | :exmp. |
| 16360 | |
| 16361 | .*---------------------------------------------------------------------* |
| 16362 | :h3.TTCN-3::Referencing a unbound hexstring octet |
| 16363 | .*---------------------------------------------------------------------* |
| 16364 | :xmp tab=0. |
| 16365 | <TC - TTCN-3::Referencing a unbound hexstring octet> |
| 16366 | |
| 16367 | <EXECUTE> |
| 16368 | <VERDICT_LEAF PASS> |
| 16369 | <MODULE TTCN ModuleA ModuleA.ttcn> |
| 16370 | module ModuleA { |
| 16371 | type component dummy_CT {} |
| 16372 | testcase tc_temp () runs on dummy_CT{ |
| 16373 | var hexstring hstr; |
| 16374 | log(isvalue(hstr[0])); |
| 16375 | } |
| 16376 | control { |
| 16377 | execute(tc_temp()); |
| 16378 | } |
| 16379 | } |
| 16380 | <END_MODULE> |
| 16381 | <MODULE CFG Temp Temp.cfg> |
| 16382 | [MODULE_PARAMETERS] |
| 16383 | [LOGGING] |
| 16384 | LogSourceInfo := Yes |
| 16385 | Logfile := "Temp%i.log" |
| 16386 | LogFileSize := 10 |
| 16387 | LogFileNumber := 10 |
| 16388 | DiskFullAction := error |
| 16389 | FileMask := LOG_ALL |
| 16390 | ConsoleMask := WARNING | ERROR | TESTCASE | STATISTICS |
| 16391 | [EXECUTE] |
| 16392 | ModuleA |
| 16393 | <END_MODULE> |
| 16394 | <RESULT IF_FAIL POSITIVE> |
| 16395 | (?im)Dynamic test case error: Accessing an element of an unbound hexstring value. |
| 16396 | <END_RESULT> |
| 16397 | <END_TC> |
| 16398 | :exmp. |
| 16399 | |
| 16400 | .*---------------------------------------------------------------------* |
| 16401 | :h3.TTCN-3::Referencing a unbound octetstring octet |
| 16402 | .*---------------------------------------------------------------------* |
| 16403 | :xmp tab=0. |
| 16404 | <TC - TTCN-3::Referencing a unbound octetstring octet> |
| 16405 | |
| 16406 | <EXECUTE> |
| 16407 | <VERDICT_LEAF PASS> |
| 16408 | <MODULE TTCN ModuleA ModuleA.ttcn> |
| 16409 | module ModuleA { |
| 16410 | type component dummy_CT {} |
| 16411 | testcase tc_temp () runs on dummy_CT{ |
| 16412 | var octetstring ostr; |
| 16413 | log(isvalue(ostr[0])); |
| 16414 | } |
| 16415 | control { |
| 16416 | execute(tc_temp()); |
| 16417 | } |
| 16418 | } |
| 16419 | <END_MODULE> |
| 16420 | <MODULE CFG Temp Temp.cfg> |
| 16421 | [MODULE_PARAMETERS] |
| 16422 | [LOGGING] |
| 16423 | LogSourceInfo := Yes |
| 16424 | Logfile := "Temp%i.log" |
| 16425 | LogFileSize := 10 |
| 16426 | LogFileNumber := 10 |
| 16427 | DiskFullAction := error |
| 16428 | FileMask := LOG_ALL |
| 16429 | ConsoleMask := WARNING | ERROR | TESTCASE | STATISTICS |
| 16430 | [EXECUTE] |
| 16431 | ModuleA |
| 16432 | <END_MODULE> |
| 16433 | <RESULT IF_FAIL POSITIVE> |
| 16434 | (?im)Dynamic test case error: Accessing an element of an unbound octetstring value. |
| 16435 | <END_RESULT> |
| 16436 | <END_TC> |
| 16437 | :exmp. |
| 16438 | |
| 16439 | .*---------------------------------------------------------------------* |
| 16440 | :h3.TTCN-3::Referencing a unbound universal charstring bit |
| 16441 | .*---------------------------------------------------------------------* |
| 16442 | :xmp tab=0. |
| 16443 | <TC - TTCN-3::Referencing a unbound universal charstring bit> |
| 16444 | |
| 16445 | <EXECUTE> |
| 16446 | <VERDICT_LEAF PASS> |
| 16447 | <MODULE TTCN ModuleA ModuleA.ttcn> |
| 16448 | module ModuleA { |
| 16449 | type component dummy_CT {} |
| 16450 | testcase tc_temp () runs on dummy_CT{ |
| 16451 | var universal charstring cstr; |
| 16452 | log(isvalue(cstr[0])); |
| 16453 | } |
| 16454 | control { |
| 16455 | execute(tc_temp()); |
| 16456 | } |
| 16457 | } |
| 16458 | <END_MODULE> |
| 16459 | <MODULE CFG Temp Temp.cfg> |
| 16460 | [MODULE_PARAMETERS] |
| 16461 | [LOGGING] |
| 16462 | LogSourceInfo := Yes |
| 16463 | Logfile := "Temp%i.log" |
| 16464 | LogFileSize := 10 |
| 16465 | LogFileNumber := 10 |
| 16466 | DiskFullAction := error |
| 16467 | FileMask := LOG_ALL |
| 16468 | ConsoleMask := WARNING | ERROR | TESTCASE | STATISTICS |
| 16469 | [EXECUTE] |
| 16470 | ModuleA |
| 16471 | <END_MODULE> |
| 16472 | <RESULT IF_PASS COUNT 1> |
| 16473 | (?im)Dynamic test case error: Accessing an element of an unbound universal charstring value. |
| 16474 | <END_RESULT> |
| 16475 | <END_TC> |
| 16476 | :exmp. |
| 16477 | |
| 16478 | .*---------------------------------------------------------------------* |
| 16479 | :h3.TTCN-3::Referencing a unbound union field |
| 16480 | .*---------------------------------------------------------------------* |
| 16481 | :xmp tab=0. |
| 16482 | <TC - TTCN-3::Referencing a unbound union field> |
| 16483 | |
| 16484 | <EXECUTE> |
| 16485 | <VERDICT_LEAF PASS> |
| 16486 | <MODULE TTCN ModuleA ModuleA.ttcn> |
| 16487 | module ModuleA { |
| 16488 | type union tunion { |
| 16489 | integer x1, |
| 16490 | integer x2 |
| 16491 | } |
| 16492 | type component dummy_CT {} |
| 16493 | testcase tc_temp () runs on dummy_CT{ |
| 16494 | var tunion temp := {x1 := 1}; |
| 16495 | log(isvalue(temp.x2)); |
| 16496 | } |
| 16497 | control { |
| 16498 | execute(tc_temp()); |
| 16499 | } |
| 16500 | } |
| 16501 | <END_MODULE> |
| 16502 | <MODULE CFG Temp Temp.cfg> |
| 16503 | [MODULE_PARAMETERS] |
| 16504 | [LOGGING] |
| 16505 | LogSourceInfo := Yes |
| 16506 | Logfile := "Temp%i.log" |
| 16507 | LogFileSize := 10 |
| 16508 | LogFileNumber := 10 |
| 16509 | DiskFullAction := error |
| 16510 | FileMask := LOG_ALL |
| 16511 | ConsoleMask := WARNING | ERROR | TESTCASE | STATISTICS |
| 16512 | [EXECUTE] |
| 16513 | ModuleA |
| 16514 | <END_MODULE> |
| 16515 | <RESULT IF_PASS COUNT 1> |
| 16516 | (?im)Dynamic test case error: Using non-selected field x2 in a value of union type @ModuleA.tunion. |
| 16517 | <END_RESULT> |
| 16518 | <END_TC> |
| 16519 | :exmp. |
| 16520 | |
| 16521 | .*---------------------------------------------------------------------* |
| 16522 | :h3.TTCN-3::Referencing a unbound record of element |
| 16523 | .*---------------------------------------------------------------------* |
| 16524 | :xmp tab=0. |
| 16525 | <TC - TTCN-3::Referencing a unbound record of element> |
| 16526 | |
| 16527 | <EXECUTE> |
| 16528 | <VERDICT_LEAF PASS> |
| 16529 | <MODULE TTCN ModuleA ModuleA.ttcn> |
| 16530 | module ModuleA { |
| 16531 | type record of integer t_recof; |
| 16532 | type component dummy_CT {} |
| 16533 | testcase tc_temp () runs on dummy_CT{ |
| 16534 | var t_recof temp; |
| 16535 | log(isvalue(temp[0])); |
| 16536 | } |
| 16537 | control { |
| 16538 | execute(tc_temp()); |
| 16539 | } |
| 16540 | } |
| 16541 | <END_MODULE> |
| 16542 | <MODULE CFG Temp Temp.cfg> |
| 16543 | [MODULE_PARAMETERS] |
| 16544 | [LOGGING] |
| 16545 | LogSourceInfo := Yes |
| 16546 | Logfile := "Temp%i.log" |
| 16547 | LogFileSize := 10 |
| 16548 | LogFileNumber := 10 |
| 16549 | DiskFullAction := error |
| 16550 | FileMask := LOG_ALL |
| 16551 | ConsoleMask := WARNING | ERROR | TESTCASE | STATISTICS |
| 16552 | [EXECUTE] |
| 16553 | ModuleA |
| 16554 | <END_MODULE> |
| 16555 | <RESULT IF_PASS COUNT 1> |
| 16556 | (?im)Dynamic test case error: Accessing an element in an unbound value of type @PreGenRecordOf.PREGEN_RECORD_OF_INTEGER. |
| 16557 | <END_RESULT> |
| 16558 | <END_TC> |
| 16559 | :exmp. |
| 16560 | |
| 16561 | .*---------------------------------------------------------------------* |
| 16562 | :h3.TTCN-3::Referencing a unbound record of element (overflow) |
| 16563 | .*---------------------------------------------------------------------* |
| 16564 | :xmp tab=0. |
| 16565 | <TC - TTCN-3::Referencing a unbound record of element (overflow)> |
| 16566 | |
| 16567 | <EXECUTE> |
| 16568 | <VERDICT_LEAF PASS> |
| 16569 | <MODULE TTCN ModuleA ModuleA.ttcn> |
| 16570 | module ModuleA { |
| 16571 | type record of integer t_recof; |
| 16572 | type component dummy_CT {} |
| 16573 | testcase tc_temp () runs on dummy_CT{ |
| 16574 | var t_recof temp := {[1] := 1}; |
| 16575 | log(isvalue(temp[10])); |
| 16576 | } |
| 16577 | control { |
| 16578 | execute(tc_temp()); |
| 16579 | } |
| 16580 | } |
| 16581 | <END_MODULE> |
| 16582 | <MODULE CFG Temp Temp.cfg> |
| 16583 | [MODULE_PARAMETERS] |
| 16584 | [LOGGING] |
| 16585 | LogSourceInfo := Yes |
| 16586 | Logfile := "Temp%i.log" |
| 16587 | LogFileSize := 10 |
| 16588 | LogFileNumber := 10 |
| 16589 | DiskFullAction := error |
| 16590 | FileMask := LOG_ALL |
| 16591 | ConsoleMask := WARNING | ERROR | TESTCASE | STATISTICS |
| 16592 | [EXECUTE] |
| 16593 | ModuleA |
| 16594 | <END_MODULE> |
| 16595 | <RESULT IF_PASS COUNT 1> |
| 16596 | (?im)Dynamic test case error: Index overflow in a value of type @PreGenRecordOf.PREGEN_RECORD_OF_INTEGER: The index is 10, but the value has only 2 elements. |
| 16597 | <END_RESULT> |
| 16598 | <END_TC> |
| 16599 | :exmp. |
| 16600 | |
| 16601 | .*---------------------------------------------------------------------* |
| 16602 | :h3.TTCN-3::Referencing a unbound set of element |
| 16603 | .*---------------------------------------------------------------------* |
| 16604 | :xmp tab=0. |
| 16605 | <TC - TTCN-3::Referencing a unbound set of element> |
| 16606 | |
| 16607 | <EXECUTE> |
| 16608 | <VERDICT_LEAF PASS> |
| 16609 | <MODULE TTCN ModuleA ModuleA.ttcn> |
| 16610 | module ModuleA { |
| 16611 | type set of integer t_setof; |
| 16612 | type component dummy_CT {} |
| 16613 | testcase tc_temp () runs on dummy_CT{ |
| 16614 | var t_setof temp; |
| 16615 | log(isvalue(temp[0])); |
| 16616 | } |
| 16617 | control { |
| 16618 | execute(tc_temp()); |
| 16619 | } |
| 16620 | } |
| 16621 | <END_MODULE> |
| 16622 | <MODULE CFG Temp Temp.cfg> |
| 16623 | [MODULE_PARAMETERS] |
| 16624 | [LOGGING] |
| 16625 | LogSourceInfo := Yes |
| 16626 | Logfile := "Temp%i.log" |
| 16627 | LogFileSize := 10 |
| 16628 | LogFileNumber := 10 |
| 16629 | DiskFullAction := error |
| 16630 | FileMask := LOG_ALL |
| 16631 | ConsoleMask := WARNING | ERROR | TESTCASE | STATISTICS |
| 16632 | [EXECUTE] |
| 16633 | ModuleA |
| 16634 | <END_MODULE> |
| 16635 | <RESULT IF_PASS COUNT 1> |
| 16636 | (?im)Dynamic test case error: Accessing an element in an unbound value of type @PreGenRecordOf.PREGEN_SET_OF_INTEGER. |
| 16637 | <END_RESULT> |
| 16638 | <END_TC> |
| 16639 | :exmp. |
| 16640 | |
| 16641 | .*---------------------------------------------------------------------* |
| 16642 | :h3.TTCN-3::Referencing a unbound set of element (overflow) |
| 16643 | .*---------------------------------------------------------------------* |
| 16644 | :xmp tab=0. |
| 16645 | <TC - TTCN-3::Referencing a unbound set of element (overflow)> |
| 16646 | |
| 16647 | <EXECUTE> |
| 16648 | <VERDICT_LEAF PASS> |
| 16649 | <MODULE TTCN ModuleA ModuleA.ttcn> |
| 16650 | module ModuleA { |
| 16651 | type set of integer t_setof; |
| 16652 | type component dummy_CT {} |
| 16653 | testcase tc_temp () runs on dummy_CT{ |
| 16654 | var t_setof temp := {[1] := 1}; |
| 16655 | log(isvalue(temp[10])); |
| 16656 | } |
| 16657 | control { |
| 16658 | execute(tc_temp()); |
| 16659 | } |
| 16660 | } |
| 16661 | <END_MODULE> |
| 16662 | <MODULE CFG Temp Temp.cfg> |
| 16663 | [MODULE_PARAMETERS] |
| 16664 | [LOGGING] |
| 16665 | LogSourceInfo := Yes |
| 16666 | Logfile := "Temp%i.log" |
| 16667 | LogFileSize := 10 |
| 16668 | LogFileNumber := 10 |
| 16669 | DiskFullAction := error |
| 16670 | FileMask := LOG_ALL |
| 16671 | ConsoleMask := WARNING | ERROR | TESTCASE | STATISTICS |
| 16672 | [EXECUTE] |
| 16673 | ModuleA |
| 16674 | <END_MODULE> |
| 16675 | <RESULT IF_PASS COUNT 1> |
| 16676 | (?im)Dynamic test case error: Index overflow in a value of type @PreGenRecordOf.PREGEN_SET_OF_INTEGER: The index is 10, but the value has only 2 elements. |
| 16677 | <END_RESULT> |
| 16678 | <END_TC> |
| 16679 | :exmp. |
| 16680 | |
| 16681 | .*---------------------------------------------------------------------* |
| 16682 | :h3.Adhoc:: ispresent() isbound() DTEs |
| 16683 | .*---------------------------------------------------------------------* |
| 16684 | :xmp tab=0. |
| 16685 | <TC - ispresent() isbound() DTEs> |
| 16686 | <EXECUTE> |
| 16687 | <VERDICT_LEAF PASS> |
| 16688 | <MODULE TTCN Temp Temp.ttcn> |
| 16689 | module Temp { |
| 16690 | type component MyComp {} |
| 16691 | |
| 16692 | type record of charstring ROC; |
| 16693 | type record of integer ROI; |
| 16694 | type record MyRecord1 { |
| 16695 | integer i optional, |
| 16696 | float x optional, |
| 16697 | charstring c |
| 16698 | } |
| 16699 | |
| 16700 | type union MyUnion1 { |
| 16701 | ROC roc, |
| 16702 | integer i, |
| 16703 | ROI roi, |
| 16704 | MyRecord1 r |
| 16705 | } |
| 16706 | |
| 16707 | const MyUnion1 c_myunion2:= { i:= 5 } |
| 16708 | |
| 16709 | testcase tc_runtimeDivisionByZero_ispresent() runs on MyComp { |
| 16710 | var MyUnion1 vl_u:= c_myunion2; |
| 16711 | if(ispresent(vl_u)) {setverdict(pass)} else {setverdict(fail)} |
| 16712 | if(ispresent(vl_u.i)){setverdict(pass)}else {setverdict(fail)} |
| 16713 | if(ispresent(vl_u.i/2)){setverdict(pass)}else {setverdict(fail)} |
| 16714 | if(ispresent(vl_u.i*0)){setverdict(pass)}else {setverdict(fail)} |
| 16715 | if(ispresent(vl_u.i/(vl_u.i-5))){setverdict(fail)}else {setverdict(pass)} //DTE - OK |
| 16716 | } |
| 16717 | |
| 16718 | testcase tc_runtimeDivisionByZero() runs on MyComp { |
| 16719 | var MyUnion1 vl_u:= c_myunion2; |
| 16720 | if(isbound(vl_u)) {setverdict(pass)} else {setverdict(fail)} |
| 16721 | if(isbound(vl_u.i)){setverdict(pass)}else {setverdict(fail)} |
| 16722 | if(isbound(vl_u.i/2)){setverdict(pass)}else {setverdict(fail)} |
| 16723 | if(isbound(vl_u.i*0)){setverdict(pass)}else {setverdict(fail)} |
| 16724 | if(isbound(vl_u.i/(vl_u.i-5))){setverdict(fail)}else {setverdict(pass)} //DTE - OK |
| 16725 | } |
| 16726 | |
| 16727 | control |
| 16728 | { |
| 16729 | execute(tc_runtimeDivisionByZero()); |
| 16730 | execute(tc_runtimeDivisionByZero_ispresent()); |
| 16731 | } |
| 16732 | } |
| 16733 | <END_MODULE> |
| 16734 | <MODULE CFG Temp Temp.cfg> |
| 16735 | [LOGGING] |
| 16736 | LogSourceInfo := Yes |
| 16737 | Logfile := "Temp%i.log" |
| 16738 | FileMask := LOG_ALL |
| 16739 | ConsoleMask := LOG_ALL |
| 16740 | [EXECUTE] |
| 16741 | Temp |
| 16742 | <END_MODULE> |
| 16743 | <RESULT IF_PASS COUNT 2> |
| 16744 | (?im)Dynamic test case error: Integer division by zero. |
| 16745 | <END_RESULT> |
| 16746 | <END_TC> |
| 16747 | :exmp. |
| 16748 | |
| 16749 | .*---------------------------------------------------------------------* |
| 16750 | :h1.Abbreviations |
| 16751 | .*---------------------------------------------------------------------* |
| 16752 | :list. |
| 16753 | :li D='ASN.1'.Abstract Syntax Notation 1 |
| 16754 | :li D='EDML'.Ericsson Document Markup Language |
| 16755 | :li D='SA'.Semantic Analyser |
| 16756 | :li D='TTCN-3'.Test and Test Control Notation version 3 |
| 16757 | :elist. |
| 16758 | |
| 16759 | .*---------------------------------------------------------------------* |
| 16760 | :h1.References |
| 16761 | .*---------------------------------------------------------------------* |
| 16762 | :list. |
| 16763 | :li D='[1]'.3/ETH/RUS-2003:0087 Uen |
| 16764 | :nl.Requirement Specification for TITAN's TTCN-3 Semantic Analyser |
| 16765 | :li D='[2]'.1/174 02-FCPCA 101 22 Uen |
| 16766 | :nl.Statement of Compliance for TITAN project |
| 16767 | :li D='[3]'.ETSI ES 201 873-1, v3.0.0 Mockup v1 (2004-03): |
| 16768 | :nl.Testing and Test Control Notation version 3., |
| 16769 | :nl.Part 1: TTCN-3 Core Language |
| 16770 | :elist. |
| 16771 | |
| 16772 | .*---------------------------------------------------------------------* |
| 16773 | :h1.Terminology |
| 16774 | .*---------------------------------------------------------------------* |
| 16775 | :list. |
| 16776 | :li D='TITAN'.Ericsson's TTCN-3 Test Environment |
| 16777 | :elist. |
| 16778 | |
| 16779 | :etext. |