conformance_test/positive_tests added
[deliverable/titan.core.git] / conformance_test / positive_tests / 16_functions_altsteps_testcases / 1602_altsteps / 160201_invoking_altsteps / Sem_160201_invoking_altsteps_003.ttcn
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 * Adrien Kirjak – initial implementation
10 *
11 ** @version 0.0.1
12 ** @purpose 1:16.2.1, Ensure that altsteps are correctly handled for dynamically mapped ports
13 ** @verdict pass accept, ttcn3verdict:pass
14 ***************************************************/
15
16 // Mycompport A is dynamically mapped
17 module Sem_160201_invoking_altsteps_003{
18
19 type port loopbackPort message {
20 inout integer
21 } with {extension "internal"}
22
23 type port IntegerOutputPortType message {
24 inout integer
25 } with {extension "internal"}
26
27 type component GeneralComp
28 {
29 port IntegerOutputPortType MycomportA
30 }
31
32 type component MyTestSystemInterface
33 {
34 port loopbackPort messagePort
35 }
36
37 altstep AltStep1() runs on GeneralComp {
38
39 [] MycomportA.receive { }
40 }
41
42
43 // MyTestSystemInterface is the test system interface
44 testcase TC_Sem_160201_invoking_altsteps_003() runs on GeneralComp system MyTestSystemInterface {
45
46 timer tc_timer := 1.0;
47
48 map(mtc:MycomportA, system:messagePort);
49
50 MycomportA.send(2);
51 tc_timer.start;
52
53 unmap(mtc:MycomportA, system:messagePort);
54
55 setverdict(pass);
56
57 alt {
58 [] AltStep1();
59 [] tc_timer.timeout {
60 setverdict(pass);
61 }
62 }
63 }
64
65 control{
66 execute(TC_Sem_160201_invoking_altsteps_003());
67 }
68 }
This page took 0.044558 seconds and 5 git commands to generate.