Titan Core Initial Contribution
[deliverable/titan.core.git] / regression_test / ASN1 / Test309 / Test309T.ttcn
1 /******************************************************************************
2 * Copyright (c) 2000-2014 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 Test309T
9 {
10 import from Test309A all;
11
12 type charstring MyIA5StringType2
13
14 // AS A CONSTANT *********************************************
15 const MyIA5StringType2 myIA5StringValue2 := myIA5StringValue1
16 const MyIA5StringType1 myIA5StringValue3 := "~!@#$%^%&^*()_+`""HAHO"" 1234567890-=qwertyuiop[]\\QWERTYUIOP{}|asdfghjkl;'ASDFGHJKL:zxcvbnm,./ZXCVBNM<>?"
17 // AS A CONSTANT *********************************************
18
19
20 type port MyPort message
21 {
22 inout MyType
23 } with { extension "internal" }
24
25 type record MyType
26 {
27 charstring field1
28 }
29
30 template MyType myMessage(charstring par_IA5String) :=
31 {
32 field1 := par_IA5String
33 }
34
35 template MyType myMessage2(MyIA5StringType1 par_IA5String) :=
36 {
37 field1 := par_IA5String
38 }
39
40 type component MyMainComponent
41 {
42 port MyPort M_PCO;
43 }
44
45 type component MyParallelComponent
46 {
47 port MyPort P_PCO;
48 }
49
50
51 function handle_msg_on_ptc() runs on MyParallelComponent
52 {
53
54 // AS A PARAMETER *********************************************
55 P_PCO.receive (myMessage(myIA5StringValue1))
56 P_PCO.receive (myMessage2("~!@#$%^%&^*()_+`""HAHO"" 1234567890-=qwertyuiop[]\\QWERTYUIOP{}|asdfghjkl;'ASDFGHJKL:zxcvbnm,./ZXCVBNM<>?"))
57 // AS A PARAMETER *********************************************
58
59 setverdict ( pass );
60 }
61 testcase Test() runs on MyMainComponent
62 {
63
64 // AS A VARIABLE *********************************************
65 var MyIA5StringType2 myIA5StringValue5 := myIA5StringValue1
66 var MyIA5StringType1 myIA5StringValue4 := "~!@#$%^%&^*()_+`""HAHO"" 1234567890-=qwertyuiop[]\\QWERTYUIOP{}|asdfghjkl;'ASDFGHJKL:zxcvbnm,./ZXCVBNM<>?"
67 // AS A VARIABLE *********************************************
68
69 var MyParallelComponent myparallelcomponent := MyParallelComponent.create;
70 connect ( mtc:M_PCO, myparallelcomponent: P_PCO );
71 myparallelcomponent.start(handle_msg_on_ptc());
72
73 // AS A PARAMETER *********************************************
74 M_PCO.send(myMessage(myIA5StringValue1))
75 M_PCO.send(myMessage2("~!@#$%^%&^*()_+`""HAHO"" 1234567890-=qwertyuiop[]\\QWERTYUIOP{}|asdfghjkl;'ASDFGHJKL:zxcvbnm,./ZXCVBNM<>?"))
76 // AS A PARAMETER *********************************************
77
78 myparallelcomponent.done;
79 }
80
81 control
82 {
83 execute (Test())
84 }
85 }
86
This page took 0.03719 seconds and 5 git commands to generate.