1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540
|
.******************************************************************************
.* Copyright (c) 2000-2016 Ericsson Telecom AB
.* All rights reserved. This program and the accompanying materials
.* are made available under the terms of the Eclipse Public License v1.0
.* which accompanies this distribution, and is available at
.* http://www.eclipse.org/legal/epl-v10.html
.*
.* Contributors:
.* Balasko, Jeno
.* Baranyi, Botond
.* Bartha, Norbert
.* Beres, Szabolcs
.* Delic, Adam
.* Kovacs, Ferenc
.* Szabados, Kristof
.*
.******************************************************************************/
:text.
:lang eng.
.* EDML webpage: http://cpi.ericsson.se/dwaxe/
.* EDML2PDF converter: http://dwaxe.ericsson.se/x2pdf
.* EDML user guide: http://www.lmc.ericsson.se/~lmcmarg/isit/edml_ug.html
.* Document header information
:docname.Test Description
:docno.24/152 91-CRL 113 200/5 Uen
:rev.C
:date.2015-04-27
:prep.ETH/RZX Norbert Bartha (ethnba)
:appr.ETH/RZX (Csaba Koppany)
:checked.EKRISZA
:title.Test description of the TTCN-3 Logging, the BigInteger handling,
IPv6 address handling,module parameter handling, macro handling
:contents level=2.
.*---------------------------------------------------------------------*
:h1.Introduction
.*---------------------------------------------------------------------*
.*---------------------------------------------------------------------*
:h2.Revision history
.*---------------------------------------------------------------------*
:xmp tab=2.
REV DATE PREPARED CHANGE
__________________________________________________
PA1 2007-12-03 ETHNBA New document for TITAN R7.2
PA5 2012-11-10 ETHBAAT Preprocessor macro test
PA6 2014-04-01 ETHBAAT TR: HQ20070: modulepar cannot be component, test port or default
:exmp.
.*---------------------------------------------------------------------*
:h2.Purpose
.*---------------------------------------------------------------------*
The purpose of this Test Description is to define and describe the function
test activity for the listed functionality of the TTCN-3 executor including
the relevant configuration options and the configuration file parser as follows:
:li D='1.'Logging
:li D='2.'Big Integer handling
:li D='3.'IPv6 address handling
:li D='4.'Module parameter handling
:li D='5.'Macro definition handling in the section DEFINE
:nl.SA-1/x: Unknown object.
:p.The specification of the test cases can be found in this document.
.*---------------------------------------------------------------------*
:h1.Test environment
.*---------------------------------------------------------------------*
.*---------------------------------------------------------------------*
:h2.Hardware
.*---------------------------------------------------------------------*
No specific hardware requirement.
.*---------------------------------------------------------------------*
:h2.Software
.*---------------------------------------------------------------------*
Tests shall be carried out on the following platforms:
:list.
:li D='1.'.Solaris 8 (Sun OS 5.8) (gcc 3.0.4)
:li D='2.'.SUSE Linux Enterprise server 8 (2.4.19-4GB) (gcc 3.2)
:li D='3.'.CYGWIN_NT-5.0 (Cygwin DLL: 1.5.12) on Windows 2000 (gcc 3.3.3)
:elist.
.*---------------------------------------------------------------------*
:h2.Configuration
.*---------------------------------------------------------------------*
The test environment had been setup in CVS. The tester program is stored in:
:nl.TTCNv3/function_test/Tools/SAtester.pl
:nl.Test cases are stored with extension .script in the directory:
:nl.TTCNv3/function_test/Semantic_Analyser/
.*---------------------------------------------------------------------*
:h2.Installation
.*---------------------------------------------------------------------*
Install proper TITAN binaries on the used platforms and make sure that
your environment settings are correct:
:list.
:li D='1.'.TTCN3_DIR is set
:li D='2.'.$TTCN3_DIR/bin is added to the PATH variable
:li D='3.'.$TTCN3_DIR/lib is added to the LD_LIBRARY_PATH variable
:li D='4.'.Perl 5.6.0 or higher is available on the platform
:li D='5.'.Create a symlink to your Perl binary into the directory where the
test cases are stored:
:nl.ln -s <your Perl> perl
:elist.
.*---------------------------------------------------------------------*
:h2.Test Tools
.*---------------------------------------------------------------------*
A tester program had been written in Perl especially for the Semantic Analyser
tests. For the list of command line parameters, type 'SAtester.pl -help', for the
complete documentation, type 'SAtester.pl -doc'.
:p.Test cases are specified in the Test Description documents in EDML format.
The tester program parses these files and generates the TTCN-3/ASN.1 modules, then
calls the compiler to compile them. The result printout is then matched against
different patterns to be able to set the verdict. Test cases contain not only
the source modules, but the patterns as well.
:p.The tester program allows one-by-one execution of test cases and batched
execution as well.
:p.NOTE: the tester program requires Perl 5.6.0 or higher.
.*---------------------------------------------------------------------*
:h2.Test scope
.*---------------------------------------------------------------------*
Ref [1]: SA-1/x: Unknown object
:nl.Explanation: all unknown objects shall be detected by SA.
.*---------------------------------------------------------------------*
:h2.Test strategy
.*---------------------------------------------------------------------*
Test cases are based on TTCN-3 BNF according to the followings:
:list.
:li D='1.'.For each 'basic' definition a complete coverage is done (e.g. for
expressions, assignments, etc.). 'Basic' means that the definition is
used in several places.
:li D='2.'.For each definition a complete coverage is done, except for basic
definitions, in which case only 1-2 examples are covered, not the
whole basic definition. This is to avoid testing all possible subcases
for all possible places it may appear.
:nl.NOTE: a complete coverage means that all occurances are tested where
the specific definition may occur. This is however not complete. Only
one occurance is tested for each construct.
:li D='3.'.Test case names are contsructed following the path in the BNF in TTCN-3
and following the possible notations/subtyping in ASN.1.
:elist.
.*---------------------------------------------------------------------*
:h2.Status
.*---------------------------------------------------------------------*
The following structures are not covered:
:list.
:li D='-'.sub-structures that causes parse error due to limited support of that
part of the language (e.g. interleave construct)
:elist.
.*---------------------------------------------------------------------*
:h1.Test cases
.*---------------------------------------------------------------------*
.*---------------------------------------------------------------------*
:h3.Splitting logfiles - allowed settings1
.*---------------------------------------------------------------------*
:xmp tab=0.
<TC - Splitting logfiles - allowed settings1>
<EXECUTE>
<MODULE TTCN Temp Temp.ttcn>
module Temp {
external function checkFile(charstring filename, integer fileSizeInBytes) return boolean;
type component TempComp {}
testcase TC() runs on TempComp{
var charstring testline := "TEST LOGLINE -------------------------- TEST LOGLINE > NO : ";
for(var integer i := 0; i < 1000; i := i + 1)
{
log(testline & int2str(i));
}
if( checkFile("Temp1.log", 10240) and
checkFile("Temp2.log", 10240) and
checkFile("Temp3.log", 10240) and
checkFile("Temp4.log", 10240) and
checkFile("Temp5.log", 10240) and
checkFile("Temp6.log", 10240) and
checkFile("Temp7.log", 10240) and
checkFile("Temp8.log", 10240) and
checkFile("Temp9.log", 10240) and
checkFile("Temp10.log", 10240) and
(not checkFile("Temp11.log", 0)))
{
setverdict(pass);
}
else {setverdict(fail);}
}
control {
execute (TC());
}
}
<END_MODULE>
<MODULE CFG Temp Temp.cfg>
[MODULE_PARAMETERS]
[LOGGING]
LogSourceInfo := Yes
Logfile := "Temp%i.log"
LogFileSize := 10
LogFileNumber := 10
DiskFullAction := error
FileMask := LOG_ALL
ConsoleMask := WARNING | ERROR | TESTCASE | STATISTICS
[EXECUTE]
Temp
<END_MODULE>
<RESULT>
Overall verdict: pass
<END_RESULT>
<END_TC>
:exmp.
.*---------------------------------------------------------------------*
:h3.Splitting logfiles - allowed settings2
.*---------------------------------------------------------------------*
:xmp tab=0.
<TC - Splitting logfiles - allowed settings2>
<EXECUTE>
<MODULE TTCN Temp Temp.ttcn>
module Temp {
external function checkFile(charstring filename, integer fileSizeInBytes) return boolean;
type component TempComp {}
testcase TC() runs on TempComp{
var charstring testline := "TEST LOGLINE -------------------------- TEST LOGLINE > NO : ";
for(var integer i := 0; i < 1000; i := i + 1)
{
log(testline & int2str(i));
}
if( checkFile("Temp6.log", 10240) and
checkFile("Temp7.log", 10240) and
checkFile("Temp8.log", 10240) and
checkFile("Temp9.log", 10240) and
checkFile("Temp10.log", 10240) and
(not checkFile("Temp11.log", 0)))
{
setverdict(pass);
}
else {setverdict(fail);}
}
control {
execute (TC());
}
}
<END_MODULE>
<MODULE CFG Temp Temp.cfg>
[MODULE_PARAMETERS]
[LOGGING]
LogSourceInfo := Yes
Logfile := "Temp%i.log"
LogFileSize := 10
LogFileNumber := 5
DiskFullAction := error
FileMask := LOG_ALL
ConsoleMask := WARNING | ERROR | TESTCASE | STATISTICS
[EXECUTE]
Temp
<END_MODULE>
<RESULT>
Overall verdict: pass
<END_RESULT>
<END_TC>
:exmp.
.*---------------------------------------------------------------------*
:h3.Splitting logfiles - LogFileSize>0 & LogFileNumber=1
.*---------------------------------------------------------------------*
:xmp tab=0.
<TC - Splitting logfiles - LogFileSize>0 & LogFileNumber=1>
<EXECUTE>
<MODULE TTCN Temp Temp.ttcn>
module Temp {
external function checkFile(charstring filename, integer fileSizeInBytes) return boolean;
type component TempComp {}
testcase TC() runs on TempComp{
var charstring testline := "TEST LOGLINE -------------------------- TEST LOGLINE > NO : ";
for(var integer i := 0; i < 1000; i := i + 1)
{
log(testline & int2str(i));
}
if( checkFile("Temp.log", 0) and
(not checkFile("Temp1.log", 0)))
{
setverdict(pass);
}
else {setverdict(fail);}
}
control {
execute (TC());
}
}
<END_MODULE>
<MODULE CFG Temp Temp.cfg>
[MODULE_PARAMETERS]
[LOGGING]
LogSourceInfo := Yes
Logfile := "Temp%i.log"
LogFileSize := 10
LogFileNumber := 1
DiskFullAction := error
FileMask := LOG_ALL
ConsoleMask := WARNING | ERROR | TESTCASE | STATISTICS
[EXECUTE]
Temp
<END_MODULE>
<RESULT>
Overall verdict: pass
<END_RESULT>
<END_TC>
:exmp.
.*---------------------------------------------------------------------*
:h3.Splitting logfiles - LogFileSize=0 & LogFileNumber>1
.*---------------------------------------------------------------------*
:xmp tab=0.
<TC - Splitting logfiles - LogFileSize=0 & LogFileNumber>1>
<EXECUTE>
<MODULE TTCN Temp Temp.ttcn>
module Temp {
external function checkFile(charstring filename, integer fileSizeInBytes) return boolean;
type component TempComp {}
testcase TC() runs on TempComp{
var charstring testline := "TEST LOGLINE -------------------------- TEST LOGLINE > NO : ";
for(var integer i := 0; i < 1000; i := i + 1)
{
log(testline & int2str(i));
}
if( checkFile("Temp.log", 0) and
(not checkFile("Temp1.log", 0)))
{
setverdict(pass);
}
else {setverdict(fail);}
}
control {
execute (TC());
}
}
<END_MODULE>
<MODULE CFG Temp Temp.cfg>
[MODULE_PARAMETERS]
[LOGGING]
LogSourceInfo := Yes
Logfile := "Temp%i.log"
LogFileSize := 0
LogFileNumber := 2
DiskFullAction := error
FileMask := LOG_ALL
ConsoleMask := WARNING | ERROR | TESTCASE | STATISTICS
[EXECUTE]
Temp
<END_MODULE>
<RESULT>
Overall verdict: pass
<END_RESULT>
<END_TC>
:exmp.
.*---------------------------------------------------------------------*
:h3.Splitting logfiles - LogFileNumber=1 & DiskFullAction= Delete
.*---------------------------------------------------------------------*
:xmp tab=0.
<TC - Splitting logfiles - LogFileNumber=1 & DiskFullAction= Delete>
<EXECUTE>
<MODULE TTCN Temp Temp.ttcn>
module Temp {
external function checkFile(charstring filename, integer fileSizeInBytes) return boolean;
type component TempComp {}
testcase TC() runs on TempComp{
var charstring testline := "TEST LOGLINE -------------------------- TEST LOGLINE > NO : ";
for(var integer i := 0; i < 1000; i := i + 1)
{
log(testline & int2str(i));
}
if( checkFile("Temp.log", 0) and
(not checkFile("Temp1.log", 0)))
{
setverdict(pass);
}
else {setverdict(fail);}
}
control {
execute (TC());
}
}
<END_MODULE>
<MODULE CFG Temp Temp.cfg>
[MODULE_PARAMETERS]
[LOGGING]
LogSourceInfo := Yes
Logfile := "Temp%i.log"
LogFileSize := 0
LogFileNumber := 2
DiskFullAction := delete
FileMask := LOG_ALL
ConsoleMask := WARNING | ERROR | TESTCASE | STATISTICS
[EXECUTE]
Temp
<END_MODULE>
<RESULT>
Overall verdict: pass
<END_RESULT>
<END_TC>
:exmp.
.*---------------------------------------------------------------------*
:h3.Big integers - Big integers in configuration files
.*---------------------------------------------------------------------*
:xmp tab=0.
<TC - Big integers - Big integers in configuration files>
<EXECUTE>
<MODULE TTCN Temp Temp.ttcn>
module Temp {
type component TempComp { }
modulepar integer par0 := 1000000000000000000000000, par1, par2, par3, par4, par5, par6, par7, par8, par9, par10, par11, par12, par13, par14
testcase TC() runs on TempComp {
if (par0 == par1) { setverdict(pass) } else { setverdict(fail) }
if (par0 == par2) { setverdict(pass) } else { setverdict(fail) }
if (par0 == par8) { setverdict(pass) } else { setverdict(fail) }
if (par0 == par9) { setverdict(pass) } else { setverdict(fail) }
if (par1 == 1000000000000000000000000) { setverdict(pass) } else { setverdict(fail) }
if (par8 == 1000000000000000000000000) { setverdict(pass) } else { setverdict(fail) }
if (par1 == par2) { setverdict(pass) } else { setverdict(fail) }
if (par1 == par8) { setverdict(pass) } else { setverdict(fail) }
if (par1 == par9) { setverdict(pass) } else { setverdict(fail) }
if (par3 == -1000000000000000000000000) { setverdict(pass) } else { setverdict(fail) }
if (par10 == -1000000000000000000000000) { setverdict(pass) } else { setverdict(fail) }
if (par5 == 0) { setverdict(pass) } else { setverdict(fail) }
if (par12 == 0) { setverdict(pass) } else { setverdict(fail) }
if (par7 == 1) { setverdict(pass) } else { setverdict(fail) }
if (par14 == 1) { setverdict(pass) } else { setverdict(fail) }
if (par6 == 1000000000000000000000000000000000000000000000000) { setverdict(pass) } else { setverdict(fail) }
if (par13 == 1000000000000000000000000000000000000000000000000) { setverdict(pass) } else { setverdict(fail) }
}
control {
execute(TC());
}
}
<END_MODULE>
<MODULE CFG Temp Temp.cfg>
[MODULE_PARAMETERS]
par1 := 1000000000000000000000000
par2 := +1000000000000000000000000
par3 := -1000000000000000000000000
par4 := 1000000000000000000000000 + 1000000000000000000000000
par5 := 1000000000000000000000000 - 1000000000000000000000000
par6 := 1000000000000000000000000 * 1000000000000000000000000
par7 := 1000000000000000000000000 / 1000000000000000000000000
par8 := ${DEFINE1, integer}
par9 := +${DEFINE1, integer}
par10 := -${DEFINE1, integer}
par11 := ${DEFINE1, integer} + 1000000000000000000000000
par12 := ${DEFINE1, integer} - 1000000000000000000000000
par13 := ${DEFINE1, integer} * 1000000000000000000000000
par14 := ${DEFINE1, integer} / 1000000000000000000000000
[DEFINE]
DEFINE1 := 1000000000000000000000000
[LOGGING]
FileMask := LOG_ALL
ConsoleMask := WARNING | ERROR | TESTCASE | STATISTICS
[EXECUTE]
Temp
<END_MODULE>
<RESULT>
Overall verdict: pass
<END_RESULT>
<END_TC>
:exmp.
.*---------------------------------------------------------------------*
:h3.Big integers - Various integers in configuration files (single mode)
.*---------------------------------------------------------------------*
:xmp tab=0.
<TC - Big integers - Various integers in configuration files (single mode)>
<EXECUTE>
<MODULE TTCN Temp Temp.ttcn>
module Temp {
type component TempComp { }
modulepar {
// Small integer parameters.
integer s_mp1
integer s_mp2
integer s_mp3
integer s_mp4
integer s_mp5
integer s_mp6
integer s_mp7
integer s_mp8
integer s_mp9
integer s_mp10
integer s_mp11
integer s_mp12
integer s_mp13
integer s_mp14
integer s_mp15
integer s_mp16
integer s_mp17
// Big integer parameters.
integer b_mp1
integer b_mp2
integer b_mp3
integer b_mp4
integer b_mp5
integer b_mp6
integer b_mp7
integer b_mp8
integer b_mp9
integer b_mp10
integer b_mp11
integer b_mp12
integer b_mp13
integer b_mp14
integer b_mp15
integer b_mp16
integer b_mp17
integer b_mp18
integer b_mp19
integer b_mp20
integer b_mp21
integer b_mp22
integer b_mp23
integer b_mp24
integer b_mp25
// Others.
universal charstring c_mp1
}
testcase TC() runs on TempComp {
if (s_mp1 == 9) { setverdict(pass) } else { setverdict(fail) }
if (s_mp2 == 1) { setverdict(pass) } else { setverdict(fail) }
if (s_mp3 == -2) { setverdict(pass) } else { setverdict(fail) }
if (s_mp4 == -20) { setverdict(pass) } else { setverdict(fail) }
if (s_mp5 == 25) { setverdict(pass) } else { setverdict(fail) }
if (s_mp6 == 15) { setverdict(pass) } else { setverdict(fail) }
if (s_mp7 == -19) { setverdict(pass) } else { setverdict(fail) }
if (s_mp8 == 19) { setverdict(pass) } else { setverdict(fail) }
if (s_mp9 == 50) { setverdict(pass) } else { setverdict(fail) }
if (s_mp10 == -15) { setverdict(pass) } else { setverdict(fail) }
if (s_mp11 == 15) { setverdict(pass) } else { setverdict(fail) }
if (s_mp12 == -25) { setverdict(pass) } else { setverdict(fail) }
if (s_mp13 == 3) { setverdict(pass) } else { setverdict(fail) }
if (s_mp14 == -4) { setverdict(pass) } else { setverdict(fail) }
if (s_mp15 == -4) { setverdict(pass) } else { setverdict(fail) }
if (s_mp16 == 4) { setverdict(pass) } else { setverdict(fail) }
if (s_mp17 == 0) { setverdict(pass) } else { setverdict(fail) }
if (b_mp1 == 222222222222222) { setverdict(pass) } else { setverdict(fail) }
if (b_mp2 == 0) { setverdict(pass) } else { setverdict(fail) }
if (b_mp3 == -111111111111111) { setverdict(pass) } else { setverdict(fail) }
if (b_mp4 == 111111111111111) { setverdict(pass) } else { setverdict(fail) }
if (b_mp5 == 0) { setverdict(pass) } else { setverdict(fail) }
if (b_mp6 == -111111111111111) { setverdict(pass) } else { setverdict(fail) }
if (b_mp7 == -111111111111111) { setverdict(pass) } else { setverdict(fail) }
if (b_mp8 == 111111111111111) { setverdict(pass) } else { setverdict(fail) }
if (b_mp9 == 111111111111110) { setverdict(pass) } else { setverdict(fail) }
if (b_mp10 == 111111111111120) { setverdict(pass) } else { setverdict(fail) }
if (b_mp11 == 2222222222222222222) { setverdict(pass) } else { setverdict(fail) }
if (b_mp12 == -2222222222222222222) { setverdict(pass) } else { setverdict(fail) }
if (b_mp13 == 5555555555555555555) { setverdict(pass) } else { setverdict(fail) }
if (b_mp14 == -1111111111111111111) { setverdict(pass) } else { setverdict(fail) }
if (b_mp15 == 2222222222222222222) { setverdict(pass) } else { setverdict(fail) }
if (b_mp16 == 2222222222222222222) { setverdict(pass) } else { setverdict(fail) }
if (b_mp17 == -2222222222222222222) { setverdict(pass) } else { setverdict(fail) }
if (b_mp18 == -2) { setverdict(pass) } else { setverdict(fail) }
if (b_mp19 == 2222222222222222220) { setverdict(pass) } else { setverdict(fail) }
if (b_mp20 == 12345678910111213141516171819202122) { setverdict(pass) } else { setverdict(fail) }
if (b_mp21 == -12345678910111213141516171819202122) { setverdict(pass) } else { setverdict(fail) }
if (b_mp22 == 24691357820222426283032343638404244) { setverdict(pass) } else { setverdict(fail) }
if (b_mp23 == 0) { setverdict(pass) } else { setverdict(fail) }
if (b_mp24 == 197530862561779410264258749107233952) { setverdict(pass) } else { setverdict(fail) }
if (b_mp25 == 771604931881950821344760738700132) { setverdict(pass) } else { setverdict(fail) }
if (c_mp1 == char(12, 24, 36, 48)) { setverdict(pass) } else { setverdict(fail) }
}
control {
execute(TC())
}
}
<END_MODULE>
<MODULE CFG Temp Temp.cfg>
[LOGGING]
LogFileNumber := 16
LogFileSize := 512
DiskFullAction := Retry(2)
ConsoleMask := LOG_ALL | TTCN_DEBUG
SourceInfoFormat := Single
[MAIN_CONTROLLER]
NumHCs := 2
[EXECUTE]
Temp.control
[MODULE_PARAMETERS]
#############################
## Small integer expressions.
#############################
s_mp1 := + - 1 * 2 * 3 * 4 / - + 2 + -3 // 9
s_mp2 := -1 * -1 // 1
s_mp3 := -1 * 2 // -2
s_mp4 := 5 * -4 // -20
s_mp5 := 5 * 5 // 25
s_mp6 := +15 // 15
s_mp7 := -19 // -19
s_mp8 := (19) // 19
s_mp9 := 45 + 5 // 50
s_mp10 := -20 + 5 // -15
s_mp11 := 20 - 5 // 15
s_mp12 := -20 - 5 // -25
s_mp13 := 15 / 5 // 3
s_mp14 := 20 / -5 // -4
s_mp15 := -20 / 5 // -4
s_mp16 := -20 / -5 // 4
s_mp17 := 1 + 2 + -3 + 0 - 5 * 5 + (10 / 2) * 5 // 0
###########################
## Big integer expressions.
###########################
b_mp1 := 111111111111111 + 111111111111111 // 222222222222222
b_mp2 := 111111111111111 - 111111111111111 // 0
b_mp3 := -111111111111111 // -111111111111111
b_mp4 := +111111111111111 // 111111111111111
b_mp5 := 111111111111111 * 111111111111111 / 111111111111111 - 111111111111111 // 0
b_mp6 := -(+111111111111111) // -111111111111111
b_mp7 := -111111111111111 / 1 // -111111111111111
b_mp8 := 1 * 111111111111111 // 111111111111111
b_mp9 := 111111111111111 - 1 // 111111111111110
b_mp10 := 111111111111111 + 9 // 111111111111120
b_mp11 := ${C1, integer} // 2222222222222222222
b_mp12 := +(-${C1, integer}) // -2222222222222222222
b_mp13 := ${C1, integer} + ${C2, integer} // 5555555555555555555
b_mp14 := ${C1, integer} - ${C2, integer} // -1111111111111111111
b_mp15 := ${C1, integer} * 1 // 2222222222222222222
b_mp16 := ${C1, integer} / 1 // 2222222222222222222
b_mp17 := -1 * ${C1, integer} // -2222222222222222222
b_mp18 := -${C1, integer} / 1111111111111111111 // -2
b_mp19 := ${C1, integer} + -${C1, integer} / 1111111111111111111 // 2222222222222222220
b_mp20 := ${C3, integer}
b_mp21 := -${C3, integer}
b_mp22 := ${C3, integer} + ${C3, integer}
b_mp23 := ${C3, integer} - ${C3, integer}
b_mp24 := ${C3, integer} * ${C4, integer}
b_mp25 := ${C3, integer} / ${C4, integer}
c_mp1 := char(12, 24, 36, 48)
[DEFINE]
C1 := 2222222222222222222
C2 := 3333333333333333333
C3 := 12345678910111213141516171819202122
C4 := 16
<END_MODULE>
<RESULT>
Overall verdict: pass
<END_RESULT>
<END_TC>
.*---------------------------------------------------------------------*
:h3.Big integers - Various integers in configuration files (parallel mode)
.*---------------------------------------------------------------------*
:xmp tab=0.
<TC - Big integers - Various integers in configuration files (parallel mode)>
<EXECUTE_PARALLEL>
<MODULE TTCN Temp Temp.ttcn>
module Temp {
type component TempComp { }
modulepar {
// Small integer parameters.
integer s_mp1
integer s_mp2
integer s_mp3
integer s_mp4
integer s_mp5
integer s_mp6
integer s_mp7
integer s_mp8
integer s_mp9
integer s_mp10
integer s_mp11
integer s_mp12
integer s_mp13
integer s_mp14
integer s_mp15
integer s_mp16
integer s_mp17
// Big integer parameters.
integer b_mp1
integer b_mp2
integer b_mp3
integer b_mp4
integer b_mp5
integer b_mp6
integer b_mp7
integer b_mp8
integer b_mp9
integer b_mp10
integer b_mp11
integer b_mp12
integer b_mp13
integer b_mp14
integer b_mp15
integer b_mp16
integer b_mp17
integer b_mp18
integer b_mp19
integer b_mp20
integer b_mp21
integer b_mp22
integer b_mp23
integer b_mp24
integer b_mp25
// Others.
universal charstring c_mp1
}
testcase TC() runs on TempComp {
if (s_mp1 == 9) { setverdict(pass) } else { setverdict(fail) }
if (s_mp2 == 1) { setverdict(pass) } else { setverdict(fail) }
if (s_mp3 == -2) { setverdict(pass) } else { setverdict(fail) }
if (s_mp4 == -20) { setverdict(pass) } else { setverdict(fail) }
if (s_mp5 == 25) { setverdict(pass) } else { setverdict(fail) }
if (s_mp6 == 15) { setverdict(pass) } else { setverdict(fail) }
if (s_mp7 == -19) { setverdict(pass) } else { setverdict(fail) }
if (s_mp8 == 19) { setverdict(pass) } else { setverdict(fail) }
if (s_mp9 == 50) { setverdict(pass) } else { setverdict(fail) }
if (s_mp10 == -15) { setverdict(pass) } else { setverdict(fail) }
if (s_mp11 == 15) { setverdict(pass) } else { setverdict(fail) }
if (s_mp12 == -25) { setverdict(pass) } else { setverdict(fail) }
if (s_mp13 == 3) { setverdict(pass) } else { setverdict(fail) }
if (s_mp14 == -4) { setverdict(pass) } else { setverdict(fail) }
if (s_mp15 == -4) { setverdict(pass) } else { setverdict(fail) }
if (s_mp16 == 4) { setverdict(pass) } else { setverdict(fail) }
if (s_mp17 == 0) { setverdict(pass) } else { setverdict(fail) }
if (b_mp1 == 222222222222222) { setverdict(pass) } else { setverdict(fail) }
if (b_mp2 == 0) { setverdict(pass) } else { setverdict(fail) }
if (b_mp3 == -111111111111111) { setverdict(pass) } else { setverdict(fail) }
if (b_mp4 == 111111111111111) { setverdict(pass) } else { setverdict(fail) }
if (b_mp5 == 0) { setverdict(pass) } else { setverdict(fail) }
if (b_mp6 == -111111111111111) { setverdict(pass) } else { setverdict(fail) }
if (b_mp7 == -111111111111111) { setverdict(pass) } else { setverdict(fail) }
if (b_mp8 == 111111111111111) { setverdict(pass) } else { setverdict(fail) }
if (b_mp9 == 111111111111110) { setverdict(pass) } else { setverdict(fail) }
if (b_mp10 == 111111111111120) { setverdict(pass) } else { setverdict(fail) }
if (b_mp11 == 2222222222222222222) { setverdict(pass) } else { setverdict(fail) }
if (b_mp12 == -2222222222222222222) { setverdict(pass) } else { setverdict(fail) }
if (b_mp13 == 5555555555555555555) { setverdict(pass) } else { setverdict(fail) }
if (b_mp14 == -1111111111111111111) { setverdict(pass) } else { setverdict(fail) }
if (b_mp15 == 2222222222222222222) { setverdict(pass) } else { setverdict(fail) }
if (b_mp16 == 2222222222222222222) { setverdict(pass) } else { setverdict(fail) }
if (b_mp17 == -2222222222222222222) { setverdict(pass) } else { setverdict(fail) }
if (b_mp18 == -2) { setverdict(pass) } else { setverdict(fail) }
if (b_mp19 == 2222222222222222220) { setverdict(pass) } else { setverdict(fail) }
if (b_mp20 == 12345678910111213141516171819202122) { setverdict(pass) } else { setverdict(fail) }
if (b_mp21 == -12345678910111213141516171819202122) { setverdict(pass) } else { setverdict(fail) }
if (b_mp22 == 24691357820222426283032343638404244) { setverdict(pass) } else { setverdict(fail) }
if (b_mp23 == 0) { setverdict(pass) } else { setverdict(fail) }
if (b_mp24 == 197530862561779410264258749107233952) { setverdict(pass) } else { setverdict(fail) }
if (b_mp25 == 771604931881950821344760738700132) { setverdict(pass) } else { setverdict(fail) }
if (c_mp1 == char(12, 24, 36, 48)) { setverdict(pass) } else { setverdict(fail) }
}
control {
execute(TC())
}
}
<END_MODULE>
<MODULE CFG Temp Temp.cfg>
[LOGGING]
LogFileNumber := 16
LogFileSize := 512
DiskFullAction := Retry(2)
ConsoleMask := LOG_ALL | TTCN_DEBUG
SourceInfoFormat := Single
[MAIN_CONTROLLER]
// Cannot be used with `ttcn3_start'...
// NumHCs := 2
[EXECUTE]
Temp.control
[MODULE_PARAMETERS]
#############################
## Small integer expressions.
#############################
s_mp1 := + - 1 * 2 * 3 * 4 / - + 2 + -3 // 9
s_mp2 := -1 * -1 // 1
s_mp3 := -1 * 2 // -2
s_mp4 := 5 * -4 // -20
s_mp5 := 5 * 5 // 25
s_mp6 := +15 // 15
s_mp7 := -19 // -19
s_mp8 := (19) // 19
s_mp9 := 45 + 5 // 50
s_mp10 := -20 + 5 // -15
s_mp11 := 20 - 5 // 15
s_mp12 := -20 - 5 // -25
s_mp13 := 15 / 5 // 3
s_mp14 := 20 / -5 // -4
s_mp15 := -20 / 5 // -4
s_mp16 := -20 / -5 // 4
s_mp17 := 1 + 2 + -3 + 0 - 5 * 5 + (10 / 2) * 5 // 0
###########################
## Big integer expressions.
###########################
b_mp1 := 111111111111111 + 111111111111111 // 222222222222222
b_mp2 := 111111111111111 - 111111111111111 // 0
b_mp3 := -111111111111111 // -111111111111111
b_mp4 := +111111111111111 // 111111111111111
b_mp5 := 111111111111111 * 111111111111111 / 111111111111111 - 111111111111111 // 0
b_mp6 := -(+111111111111111) // -111111111111111
b_mp7 := -111111111111111 / 1 // -111111111111111
b_mp8 := 1 * 111111111111111 // 111111111111111
b_mp9 := 111111111111111 - 1 // 111111111111110
b_mp10 := 111111111111111 + 9 // 111111111111120
b_mp11 := ${C1, integer} // 2222222222222222222
b_mp12 := +(-${C1, integer}) // -2222222222222222222
b_mp13 := ${C1, integer} + ${C2, integer} // 5555555555555555555
b_mp14 := ${C1, integer} - ${C2, integer} // -1111111111111111111
b_mp15 := ${C1, integer} * 1 // 2222222222222222222
b_mp16 := ${C1, integer} / 1 // 2222222222222222222
b_mp17 := -1 * ${C1, integer} // -2222222222222222222
b_mp18 := -${C1, integer} / 1111111111111111111 // -2
b_mp19 := ${C1, integer} + -${C1, integer} / 1111111111111111111 // 2222222222222222220
b_mp20 := ${C3, integer}
b_mp21 := -${C3, integer}
b_mp22 := ${C3, integer} + ${C3, integer}
b_mp23 := ${C3, integer} - ${C3, integer}
b_mp24 := ${C3, integer} * ${C4, integer}
b_mp25 := ${C3, integer} / ${C4, integer}
c_mp1 := char(12, 24, 36, 48)
[DEFINE]
C1 := 2222222222222222222
C2 := 3333333333333333333
C3 := 12345678910111213141516171819202122
C4 := 16
<END_MODULE>
<RESULT>
Overall verdict: pass
<END_RESULT>
<END_TC>
.*---------------------------------------------------------------------*
:h3.BeginTestCase and EndTestCase in configuration files
.*---------------------------------------------------------------------*
:xmp tab=0.
<TC - BeginTestCase and EndTestCase in configuration files>
<EXECUTE>
<MODULE TTCN Temp Temp.ttcn>
module Temp {
external function check_script_out(integer phase, charstring to_match) return boolean
type component EmptyComp { }
testcase FailTC() runs on EmptyComp { setverdict(fail) }
testcase PassTC() runs on EmptyComp {
// Check for BeginTestCase. Not committed due to a memleak reported in TR 961.
// if (check_script_out(0, "Temp.PassTC")) { setverdict(pass) }
// else { setverdict(fail) }
setverdict(pass)
}
control {
execute(PassTC())
// Check for EndTestCase. We have an additional verdict at the end. Enable
// this test, when TR961 is fixed.
// if (check_script_out(1, "Temp.PassTC pass")) { execute(PassTC()) }
// else { execute(FailTC()) }
}
}
<END_MODULE>
<MODULE CFG Temp Temp.cfg>
[EXTERNAL_COMMANDS]
#BeginTestCase := "./begin_script.sh"
#EndTestCase := "./end_script.sh"
[EXECUTE]
Temp.control
<END_MODULE>
<RESULT>
Overall verdict: pass
<END_RESULT>
<END_TC>
:exmp.
.*---------------------------------------------------------------------*
:h3. IPv6 addresses
.*---------------------------------------------------------------------*
:xmp tab=0.
<TC - IPv6 addresses>
<EXECUTE>
<MODULE TTCN Temp Temp.ttcn>
module Temp {
type component EmptyComp {};
testcase PassTC() runs on EmptyComp {
setverdict(pass)
}
control {
execute(PassTC())
}
}
<END_MODULE>
<MODULE CFG Temp Temp.cfg>
[GROUPS]
first := *
second := 1.0.0.0.0.0.0, a.b.c.d.e.f, identifier
#based on http://tools.ietf.org/html/rfc3513
myGroup := FEDC:BA98:7654:3210:FEDC:BA98:7654:3210
myGroup := 1080:0:0:0:8:800:200C:417
myGroup := 1080:0:0:0:8:800:200C:417A #a unicast address
myGroup := 1080::8:800:200C:417A #a unicast address
myGroup := FF01:0:0:0:0:0:0:101 #a multicast address
myGroup :=FF01::101 #a multicast address
myGroup := 0:0:0:0:0:0:0:1 #the loopback address
myGroup := ::1 #the loopback address
myGroup := 0:0:0:0:0:0:0:0 #the unspecified addresses
myGroup := :: #the unspecified addresses
myGroup := 0:0:0:0:0:0:13.1.68.3
myGroup := ::13.1.68.3
myGroup := 0:0:0:0:0:FFFF:129.144.52.38
myGroup := ::FFFF:129.144.52.38
#The following are NOT legal representations of the above prefix: BUT they are eaten >(
myGroup := FF02:0:0:0:0:0:0:101 #means all NTP servers on the same link as the sender.
myGroup := FF05:0:0:0:0:0:0:101 #means all NTP servers in the same site as the sender.
myGroup := FF0E:0:0:0:0:0:0:101 #means all NTP servers in the internet.
myGroup := FF00:0:0:0:0:0:0:0 #FF0Reserved Multicast Addresses:
myGroup := FF01:0:0:0:0:0:0:1 #All Nodes Addresses:
myGroup := FF02:0:0:0:0:0:0:1 #All Nodes Addresses:
myGroup := FF01:0:0:0:0:0:0:2 #All Routers Addresses:
myGroup := FF02:0:0:0:0:0:0:2 #All Routers Addresses:
myGroup := FF05:0:0:0:0:0:0:2 #All Routers Addresses:
myGroup := FF02:0:0:0:0:1:FF00:0000
myGroup := FF02:0:0:0:0:1:FFFF:FFFF
myGroup := b.a.9.8.7.6.5.0.4.0.0.0.3.0.0.0.2.0.0.0.1.0.0.0.0.0.0.0.1.2.3.4.IP6.ARPA.
[COMPONENTS]
# This section consists of rules restricting the location of created PTCs.
myComponent_0 := host1
* := host1
myComponent_1 := 1.0.0.0
myComponent_2 := 1.0.0.0.0.0.0.0
myComponent_3 := a.b.c.d.e.f
myComponent_4 := FEDC:BA98:7654:3210:FEDC:BA98:7654:3210
myComponent_5 := 1080:0:0:0:8:800:200C:417A
myComponent_6 := 1080:0:0:0:8:800:200C:417
myComponent_7 := FF01:0:0:0:0:0:0:101
myComponent_8 := 1080:0:0:0:8:800:200C:417A #a unicast address
myComponent_9 := 1080::8:800:200C:417A #a unicast address
myComponent_10 := FF01:0:0:0:0:0:0:101 #a multicast address
myComponent_11 :=FF01::101 #a multicast address
myComponent_12 := 0:0:0:0:0:0:0:1 #the loopback address
myComponent_13 := ::1 #the loopback address
myComponent_14 := 0:0:0:0:0:0:0:0 #the unspecified addresses
myComponent_15 := :: #the unspecified addresses
myComponent_16 := 0:0:0:0:0:0:13.1.68.3
myComponent_17 := ::13.1.68.3
myComponent_18 := 0:0:0:0:0:FFFF:129.144.52.38
myComponent_19 := ::FFFF:129.144.52.38
#The following are NOT legal representations of the above prefix: BUT they are eaten >(
myComponent_20 := FF01:0:0:0:0:0:0:101
myComponent_21 := FF02:0:0:0:0:0:0:101 #means all NTP servers on the same link as the sender.
myComponent_22 := FF05:0:0:0:0:0:0:101 #means all NTP servers in the same site as the sender.
myComponent_23 := FF0E:0:0:0:0:0:0:101 #means all NTP servers in the internet.
myComponent_24 := FF00:0:0:0:0:0:0:0 #FF0Reserved Multicast Addresses:
myComponent_25 := FF01:0:0:0:0:0:0:1 #All Nodes Addresses:
myComponent_26 := FF02:0:0:0:0:0:0:1 #All Nodes Addresses:
myComponent_27 := FF01:0:0:0:0:0:0:2 #All Routers Addresses:
myComponent_28 := FF02:0:0:0:0:0:0:2 #All Routers Addresses:
myComponent_29 := FF05:0:0:0:0:0:0:2 #All Routers Addresses:
myComponent_30 := FF02:0:0:0:0:1:FF00:0000
myComponent_31 := FF02:0:0:0:0:1:FFFF:FFFF
myComponent_32 := b.a.9.8.7.6.5.0.4.0.0.0.3.0.0.0.2.0.0.0.1.0.0.0.0.0.0.0.1.2.3.4.IP6.ARPA.
[MAIN_CONTROLLER]
TCPPort := 5555
# It's not necessary to give a full pattern for IPv6 addresses, the pattern
# was not full for even IPv4. E.g. `LocalAddress := 1.1.localhost.1' is
# possible, but invalid. It's not checked by the parser.
LocalAddress := ::1 #fe80::c002:37ff:fe6c:0%fastethernet0/0
#based on http://tools.ietf.org/html/rfc3513
LocalAddress := FEDC:BA98:7654:3210:FEDC:BA98:7654:3210
LocalAddress := 1080:0:0:0:8:800:200C:417A
LocalAddress := 1080:0:0:0:8:800:200C:417
LocalAddress := FF01:0:0:0:0:0:0:101
LocalAddress := 1080:0:0:0:8:800:200C:417A #a unicast address
LocalAddress := 1080::8:800:200C:417A #a unicast address
LocalAddress := FF01:0:0:0:0:0:0:101 #a multicast address
LocalAddress :=FF01::101 #a multicast address
LocalAddress := 0:0:0:0:0:0:0:1 #the loopback address
LocalAddress := ::1 #the loopback address
LocalAddress := 0:0:0:0:0:0:0:0 #the unspecified addresses
LocalAddress := :: #the unspecified addresses
LocalAddress := 0:0:0:0:0:0:13.1.68.3
LocalAddress := ::13.1.68.3
LocalAddress := 0:0:0:0:0:FFFF:129.144.52.38
LocalAddress := ::FFFF:129.144.52.38
#The following are NOT legal representations of the above prefix: BUT they are eaten >(
LocalAddress := FF01:0:0:0:0:0:0:101
LocalAddress := FF02:0:0:0:0:0:0:101 #means all NTP servers on the same link as the sender.
LocalAddress := FF05:0:0:0:0:0:0:101 #means all NTP servers in the same site as the sender.
LocalAddress := FF0E:0:0:0:0:0:0:101 #means all NTP servers in the internet.
LocalAddress := FF00:0:0:0:0:0:0:0 #FF0Reserved Multicast Addresses:
LocalAddress := FF01:0:0:0:0:0:0:1 #All Nodes Addresses:
LocalAddress := FF02:0:0:0:0:0:0:1 #All Nodes Addresses:
LocalAddress := FF01:0:0:0:0:0:0:2 #All Routers Addresses:
LocalAddress := FF02:0:0:0:0:0:0:2 #All Routers Addresses:
LocalAddress := FF05:0:0:0:0:0:0:2 #All Routers Addresses:
LocalAddress := FF02:0:0:0:0:1:FF00:0000
LocalAddress := FF02:0:0:0:0:1:FFFF:FFFF
LocalAddress := b.a.9.8.7.6.5.0.4.0.0.0.3.0.0.0.2.0.0.0.1.0.0.0.0.0.0.0.1.2.3.4.IP6.ARPA.
[DEFINE]
# This section consists of rules restricting the location of created PTCs.
d_0 := host1
d_1 := 1
d_2 := 1.0
d_3 := 1.0.0.0
d_4 := 1.0.0.0.0.0.0.0
d_5 := a.b.c.d.e.f
d_7 := FEDC:BA98:7654:3210:FEDC:BA98:7654:3210
d_8 := 1080:0:0:0:8:800:200C:417A
d_9 := 1080:0:0:0:8:800:200C:417
d_10 := FF01:0:0:0:0:0:0:101
d_11 := 0:0:0:0:0:0:13.1.68.3
d_12 := ::13.1.68.3
d_13 := 0:0:0:0:0:FFFF:129.144.52.38
d_14 := ::FFFF:129.144.52.38
d_unicast_0 := 1080:0:0:0:8:800:200C:417A #a unicast address
d_unicast_1 := 1080::8:800:200C:417A #a unicast address
d_multicast_0 := FF01:0:0:0:0:0:0:101 #a multicast address
d_multicast_1 :=FF01::101 #a multicast address
d_loopback_0 := 0:0:0:0:0:0:0:1 #the loopback address
d_loopback_1 := ::1 #the loopback address
d_unspecified_0 := 0:0:0:0:0:0:0:0 #the unspecified addresses
d_unspecified_1 := :: #the unspecified addresses
#The following are NOT legal representations of the above prefix: BUT they are eaten >(
d_illegal_0 := FF01:0:0:0:0:0:0:101
d_illegal_1 := FF02:0:0:0:0:0:0:101 #means all NTP servers on the same link as the sender.
d_illegal_2 := FF05:0:0:0:0:0:0:101 #means all NTP servers in the same site as the sender.
d_illegal_3 := FF0E:0:0:0:0:0:0:101 #means all NTP servers in the internet.
d_illegal_4 := FF00:0:0:0:0:0:0:0 #FF0Reserved Multicast Addresses:
d_illegal_5 := FF01:0:0:0:0:0:0:1 #All Nodes Addresses:
d_illegal_6 := FF02:0:0:0:0:0:0:1 #All Nodes Addresses:
d_illegal_7 := FF01:0:0:0:0:0:0:2 #All Routers Addresses:
d_illegal_8 := FF02:0:0:0:0:0:0:2 #All Routers Addresses:
d_illegal_9 := FF05:0:0:0:0:0:0:2 #All Routers Addresses:
d_illegal_10 := FF02:0:0:0:0:1:FF00:0000
d_illegal_11 := FF02:0:0:0:0:1:FFFF:FFFF
[EXECUTE]
Temp.control
<END_MODULE>
<RESULT>
Overall verdict: pass
<END_RESULT>
<END_TC>
:exmp.
.*---------------------------------------------------------------------*
:h3. HP36538 space needed before ":=" in config files
.*---------------------------------------------------------------------*
:xmp tab=0.
<TC - HP36538 space needed before ":=" in config files>
<EXECUTE>
<MODULE TTCN Temp Temp.ttcn>
module Temp {
type component EmptyComp {};
testcase PassTC() runs on EmptyComp {
setverdict(pass)
}
control {
execute(PassTC())
}
}
<END_MODULE>
<MODULE CFG Temp Temp.cfg>
[DEFINE]
d_something_0 := 5 d_something_1:= 5
d_something_2 :=5 d_something_3:=5
d_something_4 = 5 d_something_5= 5
d_something_6 =5 d_something_7=5
d_ipv6_0:=1:2:3:4:5 d_ipv6_1:=1:2:3:4:5%3
d_ipv6_2:=::1 d_ipv6_3=::1
[EXECUTE]
Temp.control
<END_MODULE>
<RESULT>
Overall verdict: pass
<END_RESULT>
<END_TC>
:exmp.
.*---------------------------------------------------------------------*
:h3. Module Parameters - assignment - negative tests
.*---------------------------------------------------------------------*
:xmp tab=0.
<TC - Module Parameters - assignment - negative tests>
<EXECUTE>
<MODULE TTCN Temp Temp.ttcn>
module Temp {
type record of integer ROI;
type record Rec {
integer field1
}
type set of integer SOI;
type set MySet {
integer field1
}
type enumerated MyEnum {
ENUM_1, ENUM_2
}
type union MyUnion {
integer asdf
}
modulepar integer tsp_integer;
modulepar float tsp_float;
modulepar boolean tsp_boolean;
modulepar objid tsp_objid;
modulepar verdicttype tsp_verdict;
modulepar bitstring tsp_bitstring;
modulepar hexstring tsp_hexstring;
modulepar octetstring tsp_octetstring;
modulepar charstring tsp_charstring;
modulepar universal charstring tsp_universal_charstring;
modulepar MyEnum tsp_enumerated;
modulepar Rec tsp_record;
modulepar ROI tsp_record_of;
modulepar MySet tsp_set;
modulepar SOI tsp_set_of;
modulepar anytype tsp_anytype;
modulepar MyUnion tsp_union;
//modulepar MyComp_CT tsp_component; TR: HQ20070: modulepar cannot be component, test port or default
//modulepar default tsp_default;
type component MyComp_CT { }
testcase tc_fail() runs on MyComp_CT {
setverdict(fail);
}
control {
execute(tc_fail());
}
}
<END_MODULE>
<MODULE CFG Temp Temp.cfg>
[MODULE_PARAMETERS]
///////////////////////////////////////////
// Type mismatch tests //
/////////////////////////////////////////
// Integer
tsp_integer := 1.0
tsp_integer := true
tsp_integer := objid {0 4 0 12345 6789}
tsp_integer := none
tsp_integer := '1010101'B
tsp_integer := 'ABC'H
tsp_integer := 'AB'O
tsp_integer := "abc"
tsp_integer := char(0, 0, 1, 113);
tsp_integer := {1, 2, 3}
tsp_integer := {[0] := 1, [1] := 2, [2] := 3}
tsp_integer := {field1 := 1, field2 := 2, field3 := 3}
tsp_integer := ENUM_1
// Float
tsp_float := 1
tsp_float := 1000000000000
tsp_float := true
tsp_float := objid {0 4 0 12345 6789}
tsp_float := none
tsp_float := '1010101'B
tsp_float := 'ABC'H
tsp_float := 'AB'O
tsp_float := "abc"
tsp_float := char(0, 0, 1, 113);
tsp_float := {1, 2, 3}
tsp_float := {[0] := 1, [1] := 2, [2] := 3}
tsp_float := {field1 := 1, field2 := 2, field3 := 3}
tsp_float := ENUM_1
// Boolean
tsp_boolean := 1
tsp_boolean := 1000000000000
tsp_boolean := 1.0
tsp_boolean := objid {0 4 0 12345 6789}
tsp_boolean := none
tsp_boolean := '1010101'B
tsp_boolean := 'ABC'H
tsp_boolean := 'AB'O
tsp_boolean := "abc"
tsp_boolean := char(0, 0, 1, 113);
tsp_boolean := {1, 2, 3}
tsp_boolean := {[0] := 1, [1] := 2, [2] := 3}
tsp_boolean := {field1 := 1, field2 := 2, field3 := 3}
tsp_boolean := ENUM_1
// Objid
tsp_objid := 1
tsp_objid := 1000000000000
tsp_objid := 1.0
tsp_objid := true
tsp_objid := none
tsp_objid := '1010101'B
tsp_objid := 'ABC'H
tsp_objid := 'AB'O
tsp_objid := "abc"
tsp_objid := char(0, 0, 1, 113);
tsp_objid := {1, 2, 3}
tsp_objid := {[0] := 1, [1] := 2, [2] := 3}
tsp_objid := {field1 := 1, field2 := 2, field3 := 3}
tsp_objid := ENUM_1
// Verdict
tsp_verdict := 1
tsp_verdict := 1000000000000
tsp_verdict := 1.0
tsp_verdict := true
tsp_verdict := objid {0 4 0 12345 6789}
tsp_verdict := '1010101'B
tsp_verdict := 'ABC'H
tsp_verdict := 'AB'O
tsp_verdict := "abc"
tsp_verdict := char(0, 0, 1, 113);
tsp_verdict := {1, 2, 3}
tsp_verdict := {[0] := 1, [1] := 2, [2] := 3}
tsp_verdict := {field1 := 1, field2 := 2, field3 := 3}
tsp_verdict := ENUM_1
// Bitstring
tsp_bitstring := 1
tsp_bitstring := 1000000000000
tsp_bitstring := 1.0
tsp_bitstring := true
tsp_bitstring := objid {0 4 0 12345 6789}
tsp_bitstring := none
tsp_bitstring := 'ABC'H
tsp_bitstring := 'AB'O
tsp_bitstring := "abc"
tsp_bitstring := char(0, 0, 1, 113);
tsp_bitstring := {1, 2, 3}
tsp_bitstring := {[0] := 1, [1] := 2, [2] := 3}
tsp_bitstring := {field1 := 1, field2 := 2, field3 := 3}
tsp_bitstring := ENUM_1
// Hexstring
tsp_hexstring := 1
tsp_hexstring := 1000000000000
tsp_hexstring := 1.0
tsp_hexstring := true
tsp_hexstring := objid {0 4 0 12345 6789}
tsp_hexstring := none
tsp_hexstring := '1010101'B
tsp_hexstring := 'AB'O
tsp_hexstring := "abc"
tsp_hexstring := char(0, 0, 1, 113);
tsp_hexstring := {1, 2, 3}
tsp_hexstring := {[0] := 1, [1] := 2, [2] := 3}
tsp_hexstring := {field1 := 1, field2 := 2, field3 := 3}
tsp_hexstring := ENUM_1
// Octetstring
tsp_octetstring := 1
tsp_octetstring := 1000000000000
tsp_octetstring := 1.0
tsp_octetstring := true
tsp_octetstring := objid {0 4 0 12345 6789}
tsp_octetstring := none
tsp_octetstring := '1010101'B
tsp_octetstring := 'ABC'H
tsp_octetstring := "abc"
tsp_octetstring := char(0, 0, 1, 113)
tsp_octetstring := {1, 2, 3}
tsp_octetstring := {[0] := 1, [1] := 2, [2] := 3}
tsp_octetstring := {field1 := 1, field2 := 2, field3 := 3}
tsp_octetstring := ENUM_1
// Charstring
tsp_charstring := 1
tsp_charstring := 1000000000000
tsp_charstring := 1.0
tsp_charstring := true
tsp_charstring := objid {0 4 0 12345 6789}
tsp_charstring := none
tsp_charstring := '1010101'B
tsp_charstring := 'ABC'H
tsp_charstring := 'AB'O
tsp_charstring := char(0, 0, 1, 113)
tsp_charstring := {1, 2, 3}
tsp_charstring := {[0] := 1, [1] := 2, [2] := 3}
tsp_charstring := {field1 := 1, field2 := 2, field3 := 3}
tsp_charstring := ENUM_1
// Universal charstring
tsp_universal_charstring := 1
tsp_universal_charstring := 1000000000000
tsp_universal_charstring := 1.0
tsp_universal_charstring := true
tsp_universal_charstring := objid {0 4 0 12345 6789}
tsp_universal_charstring := none
tsp_universal_charstring := '1010101'B
tsp_universal_charstring := 'ABC'H
tsp_universal_charstring := 'AB'O
tsp_universal_charstring := {1, 2, 3}
tsp_universal_charstring := {[0] := 1, [1] := 2, [2] := 3}
tsp_universal_charstring := {field1 := 1, field2 := 2, field3 := 3}
tsp_universal_charstring := ENUM_1
// Enumerated
tsp_enumerated := 1
tsp_enumerated := 1000000000000
tsp_enumerated := 1.0
tsp_enumerated := true
tsp_enumerated := objid {0 4 0 12345 6789}
tsp_enumerated := none
tsp_enumerated := '1010101'B
tsp_enumerated := 'ABC'H
tsp_enumerated := 'AB'O
tsp_enumerated := "abc"
tsp_enumerated := char(0, 0, 1, 113)
tsp_enumerated := {1, 2, 3}
tsp_enumerated := {[0] := 1, [1] := 2, [2] := 3}
tsp_enumerated := {field1 := 1, field2 := 2, field3 := 3}
// Record
tsp_record := 1
tsp_record := 1000000000000
tsp_record := 1.0
tsp_record := true
tsp_record := objid {0 4 0 12345 6789}
tsp_record := none
tsp_record := '1010101'B
tsp_record := 'ABC'H
tsp_record := 'AB'O
tsp_record := "abc"
tsp_record := char(0, 0, 1, 113);
tsp_record := {1, 2, 3}
tsp_record := {[0] := 1, [1] := 2, [2] := 3}
tsp_record := { nonexistent1 := 1, nonexistent2 := 2, nonexistent3 := 3}
tsp_record := ENUM_1
// Record of
tsp_record_of := 1
tsp_record_of := 1000000000000
tsp_record_of := 1.0
tsp_record_of := true
tsp_record_of := objid {0 4 0 12345 6789}
tsp_record_of := none
tsp_record_of := '1010101'B
tsp_record_of := 'ABC'H
tsp_record_of := 'AB'O
tsp_record_of := "abc"
tsp_record_of := char(0, 0, 1, 113);
tsp_record_of := { nonexistent1 := 1, nonexistent2 := 2, nonexistent3 := 3}
tsp_record_of:= ENUM_1
// Set
tsp_set := 1
tsp_set := 1000000000000
tsp_set := 1.0
tsp_set := true
tsp_set := objid {0 4 0 12345 6789}
tsp_set := none
tsp_set := '1010101'B
tsp_set := 'ABC'H
tsp_set := 'AB'O
tsp_set := "abc"
tsp_set := char(0, 0, 1, 113);
tsp_set := {1, 2, 3}
tsp_set := {[0] := 1, [1] := 2, [2] := 3}
tsp_set := { nonexistent1 := 1, nonexistent2 := 2, nonexistent3 := 3}
tsp_set := ENUM_1
// Set of
tsp_set_of := 1
tsp_set_of := 1000000000000
tsp_set_of := 1.0
tsp_set_of := true
tsp_set_of := objid {0 4 0 12345 6789}
tsp_set_of := none
tsp_set_of := '1010101'B
tsp_set_of := 'ABC'H
tsp_set_of := 'AB'O
tsp_set_of := "abc"
tsp_set_of := char(0, 0, 1, 113);
tsp_set_of := { nonexistent1 := 1, nonexistent2 := 2, nonexistent3 := 3}
tsp_set_of := ENUM_1
// Anytype
tsp_anytype := 1
tsp_anytype := 1000000000000
tsp_anytype := 1.0
tsp_anytype := true
tsp_anytype := objid {0 4 0 12345 6789}
tsp_anytype := '1010101'B
tsp_anytype := 'ABC'H
tsp_anytype := 'AB'O
tsp_anytype := "abc"
tsp_anytype := char(0, 0, 1, 113);
tsp_anytype := {1, 2, 3}
tsp_anytype := {[0] := 1, [1] := 2, [2] := 3}
tsp_anytype := {field1 := 1, field2 := 2, field3 := 3}
tsp_anytype := ENUM_1
// Union
tsp_union := 1
tsp_union := 1000000000000
tsp_union := 1.0
tsp_union := true
tsp_union := objid {0 4 0 12345 6789}
tsp_union := '1010101'B
tsp_union := 'ABC'H
tsp_union := 'AB'O
tsp_union := "abc"
tsp_union := char(0, 0, 1, 113);
tsp_union := {}
tsp_union := {1, 2, 3}
tsp_union := {[0] := 1, [1] := 2, [2] := 3}
tsp_union := {field1 := 1, field2 := 2, field3 := 3}
tsp_union := ENUM_1
[EXECUTE]
Temp.control
<END_MODULE>
<RESULT COUNT 26>
(?im)Error while setting parameter field 'tsp_integer'
<END_RESULT>
<RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_float'
<END_RESULT>
<RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_boolean'
<END_RESULT>
<RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_objid'
<END_RESULT>
<RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_verdict'
<END_RESULT>
<RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_bitstring'
<END_RESULT>
<RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_hexstring'
<END_RESULT>
<RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_octetstring'
<END_RESULT>
<RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_charstring'
<END_RESULT>
<RESULT COUNT 26>
(?im)Error while setting parameter field 'tsp_universal_charstring'
<END_RESULT>
<RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_enumerated'
<END_RESULT>
<RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_record'
<END_RESULT>
<RESULT COUNT 2>
(?im)Error while setting parameter field 'tsp_record.nonexistent1'
<END_RESULT>
<RESULT COUNT 26>
(?im)Error while setting parameter field 'tsp_record_of'
<END_RESULT>
<RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_set'
<END_RESULT>
<RESULT COUNT 2>
(?im)Error while setting parameter field 'tsp_set.nonexistent1'
<END_RESULT>
<RESULT COUNT 26>
(?im)Error while setting parameter field 'tsp_set_of'
<END_RESULT>
<RESULT COUNT 26>
(?im)Error while setting parameter field 'tsp_anytype'
<END_RESULT>
<RESULT COUNT 2>
(?im)Error while setting parameter field 'tsp_anytype.field3'
<END_RESULT>
<RESULT COUNT 26>
(?im)Error while setting parameter field 'tsp_union'
<END_RESULT>
<RESULT COUNT 2>
(?im)Error while setting parameter field 'tsp_union.field3'
<END_RESULT>
<RESULT COUNT 1>
(?im)Test execution summary: 0 test case was executed. Overall verdict: none
<END_RESULT>
<RESULT COUNT 1>
<END_RESULT>
<END_TC>
:exmp.
.*---------------------------------------------------------------------*
:h3. Module parameters - concatenation - negative tests
.*---------------------------------------------------------------------*
:xmp tab=0.
<TC - Module parameters - concatenation - negative tests>
<EXECUTE>
<MODULE TTCN Temp Temp.ttcn>
module Temp {
type record of integer ROI;
type record of ROI ROROI;
type set of integer SOI;
type set of SOI SOSOI;
// Record of
modulepar ROI tsp_ROI;
modulepar ROROI tsp_ROROI;
// Set of
modulepar SOI tsp_SOI;
modulepar SOSOI tsp_SOSOI;
type enumerated MyEnum {
ENUM_1, ENUM_2
}
type record Rec {
integer field1,
integer field2
}
type record MySet {
integer field1,
integer field2
}
modulepar integer tsp_integer;
modulepar float tsp_float;
modulepar boolean tsp_boolean;
modulepar objid tsp_objid;
modulepar verdicttype tsp_verdict;
modulepar bitstring tsp_bitstring;
modulepar hexstring tsp_hexstring;
modulepar octetstring tsp_octetstring;
modulepar charstring tsp_charstring;
modulepar universal charstring tsp_universal_charstring;
modulepar MyEnum tsp_enumerated;
modulepar Rec tsp_record;
modulepar MySet tsp_set;
modulepar anytype tsp_anytype;
//modulepar MyComp_CT tsp_component; TR: HQ20070: modulepar cannot be component, test port or default
//modulepar default tsp_default;
type component MyComp_CT {
}
testcase tc_fail() runs on MyComp_CT {
setverdict(fail);
}
control {
execute(tc_fail());
}
}
<END_MODULE>
<MODULE CFG Temp Temp.cfg>
[MODULE_PARAMETERS]
// record of
tsp_ROI &= 1
tsp_ROI &= 1000000000000
tsp_ROI &= 1.0
tsp_ROI &= true
tsp_ROI &= objid {0 4 0 12345 6789}
tsp_ROI &= none
tsp_ROI &= '1010101'B
tsp_ROI &= 'ABC'H
tsp_ROI &= 'AB'O
tsp_ROI &= "abc"
tsp_ROI &= char(0, 0, 1, 113);
tsp_ROI &= { nonexistent1 := 1, nonexistent2 := 2, nonexistent3 := 3}
tsp_ROI &= ENUM_1
tsp_ROI &= {2.5, 3.4}
tsp_ROI &= {pass}
tsp_ROI &= {[0] := 2, [1] := 3.4}
tsp_ROROI &= 1
tsp_ROROI &= {1}
// set of
tsp_SOI &= 1
tsp_SOI &= 1000000000000
tsp_SOI &= 1.0
tsp_SOI &= true
tsp_SOI &= objid {0 4 0 12345 6789}
tsp_SOI &= none
tsp_SOI &= '1010101'B
tsp_SOI &= 'ABC'H
tsp_SOI &= 'AB'O
tsp_SOI &= "abc"
tsp_SOI &= char(0, 0, 1, 113);
tsp_SOI &= { nonexistent1 := 1, nonexistent2 := 2, nonexistent3 := 3}
tsp_SOI &= ENUM_1
tsp_SOI &= {2.5, 3.4}
tsp_SOI &= {pass}
tsp_SOI &= {[0] := 2, [1] := 3.4}
tsp_SOSOI &= 1
tsp_SOSOI &= {1}
tsp_integer &= 1
tsp_float &= 2.0
tsp_boolean &= true
tsp_objid &= objid {0 4 0 12345 6789}
tsp_verdict &= pass
tsp_bitstring &= '1010101'B
tsp_hexstring &= 'ABC'H
tsp_octetstring &= 'AB'O
tsp_charstring &= "abc"
tsp_universal_charstring &= char(0, 0, 1, 113)
tsp_enumerated &= ENUM_1
tsp_record &= 1
tsp_set &= 1
tsp_anytype &= 1
//tsp_component &= null
//tsp_default &= null;
tsp_integer &= {1}
tsp_float &= {2.0}
tsp_boolean &= {true}
tsp_objid &= {objid {0 4 0 12345 6789}}
tsp_verdict &= {pass}
tsp_bitstring &= {'1010101'B}
tsp_hexstring &= {'ABC'H}
tsp_octetstring &= {'AB'O}
tsp_charstring &= {"abc"}
tsp_universal_charstring &= {char(0, 0, 1, 113)}
tsp_enumerated &= {ENUM_1}
tsp_record &= {field1 := 1, field2 := 2}
tsp_set &= {field1 := 1, field2 := 2}
tsp_anytype &= {integer := 3}
//tsp_component &= {null}
//tsp_default &= {null};
[EXECUTE]
Temp.control
<END_MODULE>
<RESULT COUNT 28>
(?im)Error while concatenating parameter field 'tsp_ROI'
<END_RESULT>
<RESULT COUNT 4>
(?im)Error while setting parameter field 'tsp_ROI\[0\]'
<END_RESULT>
<RESULT COUNT 2>
(?im)Error while concatenating parameter field 'tsp_ROROI'
<END_RESULT>
<RESULT COUNT 2>
(?im)Error while setting parameter field 'tsp_ROROI\[0\]'
<END_RESULT>
<RESULT COUNT 28>
(?im)Error while concatenating parameter field 'tsp_SOI'
<END_RESULT>
<RESULT COUNT 4>
(?im)Error while setting parameter field 'tsp_SOI\[0\]'
<END_RESULT>
<RESULT COUNT 2>
(?im)Error while concatenating parameter field 'tsp_SOSOI'
<END_RESULT>
<RESULT COUNT 2>
(?im)Error while setting parameter field 'tsp_SOSOI\[0\]'
<END_RESULT>
<RESULT COUNT 4>
(?im)Error while concatenating parameter field 'tsp_integer'
<END_RESULT>
<RESULT COUNT 4>
(?im)Error while concatenating parameter field 'tsp_float'
<END_RESULT>
<RESULT COUNT 4>
(?im)Error while concatenating parameter field 'tsp_boolean'
<END_RESULT>
<RESULT COUNT 4>
(?im)Error while concatenating parameter field 'tsp_objid'
<END_RESULT>
<RESULT COUNT 4>
(?im)Error while concatenating parameter field 'tsp_verdict'
<END_RESULT>
<RESULT COUNT 2>
(?im)Error while concatenating parameter field 'tsp_bitstring'
<END_RESULT>
<RESULT COUNT 2>
(?im)Error while concatenating parameter field 'tsp_hexstring'
<END_RESULT>
<RESULT COUNT 2>
(?im)Error while concatenating parameter field 'tsp_octetstring'
<END_RESULT>
<RESULT COUNT 2>
(?im)Error while concatenating parameter field 'tsp_charstring'
<END_RESULT>
<RESULT COUNT 2>
(?im)Error while concatenating parameter field 'tsp_universal_charstring'
<END_RESULT>
<RESULT COUNT 4>
(?im)Error while concatenating parameter field 'tsp_enumerated'
<END_RESULT>
<RESULT COUNT 4>
(?im)Error while concatenating parameter field 'tsp_record'
<END_RESULT>
<RESULT COUNT 4>
(?im)Error while concatenating parameter field 'tsp_set'
<END_RESULT>
<RESULT COUNT 4>
(?im)Error while concatenating parameter field 'tsp_anytype'
<END_RESULT>
<END_TC>
:exmp.
.*---------------------------------------------------------------------*
:h3. Module Parameters - assignment - negative tests (parallel)
.*---------------------------------------------------------------------*
:xmp tab=0.
<TC - Module Parameters - assignment - negative tests (parallel)>
<EXECUTE_PARALLEL>
<MODULE TTCN Temp Temp.ttcn>
module Temp {
type record of integer ROI;
type record Rec {
integer field1
}
type set of integer SOI;
type set MySet {
integer field1
}
type enumerated MyEnum {
ENUM_1, ENUM_2
}
type union MyUnion {
integer asdf
}
modulepar integer tsp_integer;
modulepar float tsp_float;
modulepar boolean tsp_boolean;
modulepar objid tsp_objid;
modulepar verdicttype tsp_verdict;
modulepar bitstring tsp_bitstring;
modulepar hexstring tsp_hexstring;
modulepar octetstring tsp_octetstring;
modulepar charstring tsp_charstring;
modulepar universal charstring tsp_universal_charstring;
modulepar MyEnum tsp_enumerated;
modulepar Rec tsp_record;
modulepar ROI tsp_record_of;
modulepar MySet tsp_set;
modulepar SOI tsp_set_of;
modulepar anytype tsp_anytype;
modulepar MyUnion tsp_union;
//modulepar MyComp_CT tsp_component; TR: HQ20070: modulepar cannot be component, test port or default
//modulepar default tsp_default;
type component MyComp_CT { }
testcase tc_fail() runs on MyComp_CT {
setverdict(fail);
}
control {
execute(tc_fail());
}
}
<END_MODULE>
<MODULE CFG Temp Temp.cfg>
[MODULE_PARAMETERS]
///////////////////////////////////////////
// Type mismatch tests //
/////////////////////////////////////////
// Integer
tsp_integer := 1.0
tsp_integer := true
tsp_integer := objid {0 4 0 12345 6789}
tsp_integer := none
tsp_integer := '1010101'B
tsp_integer := 'ABC'H
tsp_integer := 'AB'O
tsp_integer := "abc"
tsp_integer := char(0, 0, 1, 113);
tsp_integer := {1, 2, 3}
tsp_integer := {[0] := 1, [1] := 2, [2] := 3}
tsp_integer := {field1 := 1, field2 := 2, field3 := 3}
tsp_integer := ENUM_1
// Float
tsp_float := 1
tsp_float := 1000000000000
tsp_float := true
tsp_float := objid {0 4 0 12345 6789}
tsp_float := none
tsp_float := '1010101'B
tsp_float := 'ABC'H
tsp_float := 'AB'O
tsp_float := "abc"
tsp_float := char(0, 0, 1, 113);
tsp_float := {1, 2, 3}
tsp_float := {[0] := 1, [1] := 2, [2] := 3}
tsp_float := {field1 := 1, field2 := 2, field3 := 3}
tsp_float := ENUM_1
// Boolean
tsp_boolean := 1
tsp_boolean := 1000000000000
tsp_boolean := 1.0
tsp_boolean := objid {0 4 0 12345 6789}
tsp_boolean := none
tsp_boolean := '1010101'B
tsp_boolean := 'ABC'H
tsp_boolean := 'AB'O
tsp_boolean := "abc"
tsp_boolean := char(0, 0, 1, 113);
tsp_boolean := {1, 2, 3}
tsp_boolean := {[0] := 1, [1] := 2, [2] := 3}
tsp_boolean := {field1 := 1, field2 := 2, field3 := 3}
tsp_boolean := ENUM_1
// Objid
tsp_objid := 1
tsp_objid := 1000000000000
tsp_objid := 1.0
tsp_objid := true
tsp_objid := none
tsp_objid := '1010101'B
tsp_objid := 'ABC'H
tsp_objid := 'AB'O
tsp_objid := "abc"
tsp_objid := char(0, 0, 1, 113);
tsp_objid := {1, 2, 3}
tsp_objid := {[0] := 1, [1] := 2, [2] := 3}
tsp_objid := {field1 := 1, field2 := 2, field3 := 3}
tsp_objid := ENUM_1
// Verdict
tsp_verdict := 1
tsp_verdict := 1000000000000
tsp_verdict := 1.0
tsp_verdict := true
tsp_verdict := objid {0 4 0 12345 6789}
tsp_verdict := '1010101'B
tsp_verdict := 'ABC'H
tsp_verdict := 'AB'O
tsp_verdict := "abc"
tsp_verdict := char(0, 0, 1, 113);
tsp_verdict := {1, 2, 3}
tsp_verdict := {[0] := 1, [1] := 2, [2] := 3}
tsp_verdict := {field1 := 1, field2 := 2, field3 := 3}
tsp_verdict := ENUM_1
// Bitstring
tsp_bitstring := 1
tsp_bitstring := 1000000000000
tsp_bitstring := 1.0
tsp_bitstring := true
tsp_bitstring := objid {0 4 0 12345 6789}
tsp_bitstring := none
tsp_bitstring := 'ABC'H
tsp_bitstring := 'AB'O
tsp_bitstring := "abc"
tsp_bitstring := char(0, 0, 1, 113);
tsp_bitstring := {1, 2, 3}
tsp_bitstring := {[0] := 1, [1] := 2, [2] := 3}
tsp_bitstring := {field1 := 1, field2 := 2, field3 := 3}
tsp_bitstring := ENUM_1
// Hexstring
tsp_hexstring := 1
tsp_hexstring := 1000000000000
tsp_hexstring := 1.0
tsp_hexstring := true
tsp_hexstring := objid {0 4 0 12345 6789}
tsp_hexstring := none
tsp_hexstring := '1010101'B
tsp_hexstring := 'AB'O
tsp_hexstring := "abc"
tsp_hexstring := char(0, 0, 1, 113);
tsp_hexstring := {1, 2, 3}
tsp_hexstring := {[0] := 1, [1] := 2, [2] := 3}
tsp_hexstring := {field1 := 1, field2 := 2, field3 := 3}
tsp_hexstring := ENUM_1
// Octetstring
tsp_octetstring := 1
tsp_octetstring := 1000000000000
tsp_octetstring := 1.0
tsp_octetstring := true
tsp_octetstring := objid {0 4 0 12345 6789}
tsp_octetstring := none
tsp_octetstring := '1010101'B
tsp_octetstring := 'ABC'H
tsp_octetstring := "abc"
tsp_octetstring := char(0, 0, 1, 113)
tsp_octetstring := {1, 2, 3}
tsp_octetstring := {[0] := 1, [1] := 2, [2] := 3}
tsp_octetstring := {field1 := 1, field2 := 2, field3 := 3}
tsp_octetstring := ENUM_1
// Charstring
tsp_charstring := 1
tsp_charstring := 1000000000000
tsp_charstring := 1.0
tsp_charstring := true
tsp_charstring := objid {0 4 0 12345 6789}
tsp_charstring := none
tsp_charstring := '1010101'B
tsp_charstring := 'ABC'H
tsp_charstring := 'AB'O
tsp_charstring := char(0, 0, 1, 113)
tsp_charstring := {1, 2, 3}
tsp_charstring := {[0] := 1, [1] := 2, [2] := 3}
tsp_charstring := {field1 := 1, field2 := 2, field3 := 3}
tsp_charstring := ENUM_1
// Universal charstring
tsp_universal_charstring := 1
tsp_universal_charstring := 1000000000000
tsp_universal_charstring := 1.0
tsp_universal_charstring := true
tsp_universal_charstring := objid {0 4 0 12345 6789}
tsp_universal_charstring := none
tsp_universal_charstring := '1010101'B
tsp_universal_charstring := 'ABC'H
tsp_universal_charstring := 'AB'O
tsp_universal_charstring := {1, 2, 3}
tsp_universal_charstring := {[0] := 1, [1] := 2, [2] := 3}
tsp_universal_charstring := {field1 := 1, field2 := 2, field3 := 3}
tsp_universal_charstring := ENUM_1
// Enumerated
tsp_enumerated := 1
tsp_enumerated := 1000000000000
tsp_enumerated := 1.0
tsp_enumerated := true
tsp_enumerated := objid {0 4 0 12345 6789}
tsp_enumerated := none
tsp_enumerated := '1010101'B
tsp_enumerated := 'ABC'H
tsp_enumerated := 'AB'O
tsp_enumerated := "abc"
tsp_enumerated := char(0, 0, 1, 113)
tsp_enumerated := {1, 2, 3}
tsp_enumerated := {[0] := 1, [1] := 2, [2] := 3}
tsp_enumerated := {field1 := 1, field2 := 2, field3 := 3}
// Record
tsp_record := 1
tsp_record := 1000000000000
tsp_record := 1.0
tsp_record := true
tsp_record := objid {0 4 0 12345 6789}
tsp_record := none
tsp_record := '1010101'B
tsp_record := 'ABC'H
tsp_record := 'AB'O
tsp_record := "abc"
tsp_record := char(0, 0, 1, 113);
tsp_record := {1, 2, 3}
tsp_record := {[0] := 1, [1] := 2, [2] := 3}
tsp_record := { nonexistent1 := 1, nonexistent2 := 2, nonexistent3 := 3}
tsp_record := ENUM_1
// Record of
tsp_record_of := 1
tsp_record_of := 1000000000000
tsp_record_of := 1.0
tsp_record_of := true
tsp_record_of := objid {0 4 0 12345 6789}
tsp_record_of := none
tsp_record_of := '1010101'B
tsp_record_of := 'ABC'H
tsp_record_of := 'AB'O
tsp_record_of := "abc"
tsp_record_of := char(0, 0, 1, 113);
tsp_record_of := { nonexistent1 := 1, nonexistent2 := 2, nonexistent3 := 3}
tsp_record_of:= ENUM_1
// Set
tsp_set := 1
tsp_set := 1000000000000
tsp_set := 1.0
tsp_set := true
tsp_set := objid {0 4 0 12345 6789}
tsp_set := none
tsp_set := '1010101'B
tsp_set := 'ABC'H
tsp_set := 'AB'O
tsp_set := "abc"
tsp_set := char(0, 0, 1, 113);
tsp_set := {1, 2, 3}
tsp_set := {[0] := 1, [1] := 2, [2] := 3}
tsp_set := { nonexistent1 := 1, nonexistent2 := 2, nonexistent3 := 3}
tsp_set := ENUM_1
// Set of
tsp_set_of := 1
tsp_set_of := 1000000000000
tsp_set_of := 1.0
tsp_set_of := true
tsp_set_of := objid {0 4 0 12345 6789}
tsp_set_of := none
tsp_set_of := '1010101'B
tsp_set_of := 'ABC'H
tsp_set_of := 'AB'O
tsp_set_of := "abc"
tsp_set_of := char(0, 0, 1, 113);
tsp_set_of := { nonexistent1 := 1, nonexistent2 := 2, nonexistent3 := 3}
tsp_set_of := ENUM_1
// Anytype
tsp_anytype := 1
tsp_anytype := 1000000000000
tsp_anytype := 1.0
tsp_anytype := true
tsp_anytype := objid {0 4 0 12345 6789}
tsp_anytype := '1010101'B
tsp_anytype := 'ABC'H
tsp_anytype := 'AB'O
tsp_anytype := "abc"
tsp_anytype := char(0, 0, 1, 113);
tsp_anytype := {1, 2, 3}
tsp_anytype := {[0] := 1, [1] := 2, [2] := 3}
tsp_anytype := {field1 := 1, field2 := 2, field3 := 3}
tsp_anytype := ENUM_1
// Union
tsp_union := 1
tsp_union := 1000000000000
tsp_union := 1.0
tsp_union := true
tsp_union := objid {0 4 0 12345 6789}
tsp_union := '1010101'B
tsp_union := 'ABC'H
tsp_union := 'AB'O
tsp_union := "abc"
tsp_union := char(0, 0, 1, 113);
tsp_union := {}
tsp_union := {1, 2, 3}
tsp_union := {[0] := 1, [1] := 2, [2] := 3}
tsp_union := {field1 := 1, field2 := 2, field3 := 3}
tsp_union := ENUM_1
[EXECUTE]
Temp.control
<END_MODULE>
<RESULT COUNT 26>
(?im)Error while setting parameter field 'tsp_integer'
<END_RESULT>
<RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_float'
<END_RESULT>
<RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_boolean'
<END_RESULT>
<RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_objid'
<END_RESULT>
<RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_verdict'
<END_RESULT>
<RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_bitstring'
<END_RESULT>
<RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_hexstring'
<END_RESULT>
<RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_octetstring'
<END_RESULT>
<RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_charstring'
<END_RESULT>
<RESULT COUNT 26>
(?im)Error while setting parameter field 'tsp_universal_charstring'
<END_RESULT>
<RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_enumerated'
<END_RESULT>
<RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_record'
<END_RESULT>
<RESULT COUNT 2>
(?im)Error while setting parameter field 'tsp_record.nonexistent1'
<END_RESULT>
<RESULT COUNT 26>
(?im)Error while setting parameter field 'tsp_record_of'
<END_RESULT>
<RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_set'
<END_RESULT>
<RESULT COUNT 2>
(?im)Error while setting parameter field 'tsp_set.nonexistent1'
<END_RESULT>
<RESULT COUNT 26>
(?im)Error while setting parameter field 'tsp_set_of'
<END_RESULT>
<RESULT COUNT 26>
(?im)Error while setting parameter field 'tsp_anytype'
<END_RESULT>
<RESULT COUNT 26>
(?im)Error while setting parameter field 'tsp_union'
<END_RESULT>
<RESULT COUNT 1>
(?im)There were errors during configuring HCs.
<END_RESULT>
<RESULT COUNT 1>
<END_RESULT>
<END_TC>
:exmp.
.*---------------------------------------------------------------------*
:h3. Module parameters - concatenation - negative tests (parallel)
.*---------------------------------------------------------------------*
:xmp tab=0.
<TC - Module parameters - concatenation - negative tests (parallel)>
<EXECUTE_PARALLEL>
<MODULE TTCN Temp Temp.ttcn>
module Temp {
type record of integer ROI;
type record of ROI ROROI;
type set of integer SOI;
type set of SOI SOSOI;
// Record of
modulepar ROI tsp_ROI;
modulepar ROROI tsp_ROROI;
// Set of
modulepar SOI tsp_SOI;
modulepar SOSOI tsp_SOSOI;
type enumerated MyEnum {
ENUM_1, ENUM_2
}
type record Rec {
integer field1,
integer field2
}
type record MySet {
integer field1,
integer field2
}
modulepar integer tsp_integer;
modulepar float tsp_float;
modulepar boolean tsp_boolean;
modulepar objid tsp_objid;
modulepar verdicttype tsp_verdict;
modulepar bitstring tsp_bitstring;
modulepar hexstring tsp_hexstring;
modulepar octetstring tsp_octetstring;
modulepar charstring tsp_charstring;
modulepar universal charstring tsp_universal_charstring;
modulepar MyEnum tsp_enumerated;
modulepar Rec tsp_record;
modulepar MySet tsp_set;
modulepar anytype tsp_anytype;
//modulepar MyComp_CT tsp_component; TR: HQ20070: modulepar cannot be component, test port or default
//modulepar default tsp_default;
type component MyComp_CT {
}
testcase tc_fail() runs on MyComp_CT {
setverdict(fail);
}
control {
execute(tc_fail());
}
}
<END_MODULE>
<MODULE CFG Temp Temp.cfg>
[MODULE_PARAMETERS]
// record of
tsp_ROI &= 1
tsp_ROI &= 1000000000000
tsp_ROI &= 1.0
tsp_ROI &= true
tsp_ROI &= objid {0 4 0 12345 6789}
tsp_ROI &= none
tsp_ROI &= '1010101'B
tsp_ROI &= 'ABC'H
tsp_ROI &= 'AB'O
tsp_ROI &= "abc"
tsp_ROI &= char(0, 0, 1, 113);
tsp_ROI &= { nonexistent1 := 1, nonexistent2 := 2, nonexistent3 := 3}
tsp_ROI &= ENUM_1
tsp_ROI &= {2.5, 3.4}
tsp_ROI &= {pass}
tsp_ROI &= {[0] := 2, [1] := 3.4}
tsp_ROROI &= 1
tsp_ROROI &= {1}
// set of
tsp_SOI &= 1
tsp_SOI &= 1000000000000
tsp_SOI &= 1.0
tsp_SOI &= true
tsp_SOI &= objid {0 4 0 12345 6789}
tsp_SOI &= none
tsp_SOI &= '1010101'B
tsp_SOI &= 'ABC'H
tsp_SOI &= 'AB'O
tsp_SOI &= "abc"
tsp_SOI &= char(0, 0, 1, 113);
tsp_SOI &= { nonexistent1 := 1, nonexistent2 := 2, nonexistent3 := 3}
tsp_SOI &= ENUM_1
tsp_SOI &= {2.5, 3.4}
tsp_SOI &= {pass}
tsp_SOI &= {[0] := 2, [1] := 3.4}
tsp_SOSOI &= 1
tsp_SOSOI &= {1}
tsp_integer &= 1
tsp_float &= 2.0
tsp_boolean &= true
tsp_objid &= objid {0 4 0 12345 6789}
tsp_verdict &= pass
tsp_bitstring &= '1010101'B
tsp_hexstring &= 'ABC'H
tsp_octetstring &= 'AB'O
tsp_charstring &= "abc"
tsp_universal_charstring &= char(0, 0, 1, 113)
tsp_enumerated &= ENUM_1
tsp_record &= 1
tsp_set &= 1
tsp_anytype &= 1
//tsp_component &= null
//tsp_default &= null;
tsp_integer &= {1}
tsp_float &= {2.0}
tsp_boolean &= {true}
tsp_objid &= {objid {0 4 0 12345 6789}}
tsp_verdict &= {pass}
tsp_bitstring &= {'1010101'B}
tsp_hexstring &= {'ABC'H}
tsp_octetstring &= {'AB'O}
tsp_charstring &= {"abc"}
tsp_universal_charstring &= {char(0, 0, 1, 113)}
tsp_enumerated &= {ENUM_1}
tsp_record &= {field1 := 1, field2 := 2}
tsp_set &= {field1 := 1, field2 := 2}
tsp_anytype &= {integer := 3}
//tsp_component &= {null}
//tsp_default &= {null};
[EXECUTE]
Temp.control
<END_MODULE>
<RESULT COUNT 28>
(?im)Error while concatenating parameter field 'tsp_ROI'
<END_RESULT>
<RESULT COUNT 4>
(?im)Error while setting parameter field 'tsp_ROI\[0\]'
<END_RESULT>
<RESULT COUNT 2>
(?im)Error while concatenating parameter field 'tsp_ROROI'
<END_RESULT>
<RESULT COUNT 2>
(?im)Error while setting parameter field 'tsp_ROROI\[0\]'
<END_RESULT>
<RESULT COUNT 28>
(?im)Error while concatenating parameter field 'tsp_SOI'
<END_RESULT>
<RESULT COUNT 4>
(?im)Error while setting parameter field 'tsp_SOI\[0\]'
<END_RESULT>
<RESULT COUNT 2>
(?im)Error while concatenating parameter field 'tsp_SOSOI'
<END_RESULT>
<RESULT COUNT 2>
(?im)Error while setting parameter field 'tsp_SOSOI\[0\]'
<END_RESULT>
<RESULT COUNT 4>
(?im)Error while concatenating parameter field 'tsp_integer'
<END_RESULT>
<RESULT COUNT 4>
(?im)Error while concatenating parameter field 'tsp_float'
<END_RESULT>
<RESULT COUNT 4>
(?im)Error while concatenating parameter field 'tsp_boolean'
<END_RESULT>
<RESULT COUNT 4>
(?im)Error while concatenating parameter field 'tsp_objid'
<END_RESULT>
<RESULT COUNT 4>
(?im)Error while concatenating parameter field 'tsp_verdict'
<END_RESULT>
<RESULT COUNT 2>
(?im)Error while concatenating parameter field 'tsp_bitstring'
<END_RESULT>
<RESULT COUNT 2>
(?im)Error while concatenating parameter field 'tsp_hexstring'
<END_RESULT>
<RESULT COUNT 2>
(?im)Error while concatenating parameter field 'tsp_octetstring'
<END_RESULT>
<RESULT COUNT 2>
(?im)Error while concatenating parameter field 'tsp_charstring'
<END_RESULT>
<RESULT COUNT 2>
(?im)Error while concatenating parameter field 'tsp_universal_charstring'
<END_RESULT>
<RESULT COUNT 4>
(?im)Error while concatenating parameter field 'tsp_enumerated'
<END_RESULT>
<RESULT COUNT 4>
(?im)Error while concatenating parameter field 'tsp_record'
<END_RESULT>
<RESULT COUNT 4>
(?im)Error while concatenating parameter field 'tsp_set'
<END_RESULT>
<RESULT COUNT 4>
(?im)Error while concatenating parameter field 'tsp_anytype'
<END_RESULT>
<END_TC>
:exmp.
.*---------------------------------------------------------------------*
:h1.Abbreviations
.*---------------------------------------------------------------------*
:list.
:li D='ASN.1'.Abstract Syntax Notation 1
:li D='EDML'.Ericsson Document Markup Language
:li D='SA'.Semantic Analyser
:li D='TTCN-3'.Test and Test Control Notation version 3
:elist.
.*---------------------------------------------------------------------*
:h1.References
.*---------------------------------------------------------------------*
:list.
:li D='[1]'.ETH/RZ-2005:0120 Uen
:nl.Requirement Specification for the TITAN TTCN-3 Executor
:li D='[2]'.1/174 02-FCPCA 101 42 Uen
:nl.Statement of Compliance for TITAN project
:li D='[3]'.ETSI ES 201 873-1, v3.0.0 Mockup v1 (2004-03):
:nl.Testing and Test Control Notation version 3.,
:nl.Part 1: TTCN-3 Core Language
:elist.
.*---------------------------------------------------------------------*
:h1.Terminology
.*---------------------------------------------------------------------*
:list.
:li D='TITAN'.Ericsson's TTCN-3 Test Environment
:elist.
:etext.
|