Sync with 5.4.0
[deliverable/titan.core.git] / regression_test / ASN1 / Test338 / Test338T.ttcn
1 /******************************************************************************
2 * Copyright (c) 2000-2015 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 module Test338T
9 {
10 import from Test338A all;
11
12 type boolean MyBooleanType2
13
14 // AS A CONSTANT *********************************************
15 const MyBooleanType2 myBooleanValue2 := myBooleanValue1
16
17 type port MyPort message
18 {
19 inout MyType
20 } with { extension "internal" }
21
22 type record MyType
23 {
24 boolean field1
25 }
26
27 template MyType myMessage(boolean par_boolean) :=
28 {
29 field1 := par_boolean
30 }
31
32 type component MyMainComponent
33 {
34 port MyPort M_PCO;
35 }
36
37 type component MyParallelComponent
38 {
39 port MyPort P_PCO;
40 }
41
42 function handle_msg_on_ptc() runs on MyParallelComponent
43 {
44
45 // AS A PARAMETER *********************************************
46 P_PCO.receive (myMessage(myBooleanValue1))
47 setverdict ( pass );
48 }
49
50 testcase Test() runs on MyMainComponent
51 {
52
53 // AS A VARIABLE *********************************************
54 var MyBooleanType2 myBooleanValue3 := myBooleanValue1
55
56 var MyParallelComponent myparallelcomponent := MyParallelComponent.create;
57 connect ( mtc:M_PCO, myparallelcomponent: P_PCO );
58 myparallelcomponent.start(handle_msg_on_ptc());
59
60 // AS A PARAMETER *********************************************
61 M_PCO.send(myMessage(myBooleanValue1))
62 myparallelcomponent.done;
63 }
64
65 control
66 {
67 execute (Test())
68 }
69 }
70
This page took 0.041048 seconds and 5 git commands to generate.