Titan Core Initial Contribution
[deliverable/titan.core.git] / regression_test / compileonly / mfgen-tpd / invalid_buildconfig_param / HelloTpd / src / MyExample.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 // TTCN-3 version of "Hello, world!"
9 module MyExample
10 {
11 type port PCOType message
12 {
13 inout charstring;
14 }
15
16 type component MTCType
17 {
18 port PCOType MyPCO_PT;
19 }
20
21 testcase tc_HelloW() runs on MTCType system MTCType
22 {
23 map(mtc:MyPCO_PT, system:MyPCO_PT);
24 MyPCO_PT.send("Hello, world!");
25 setverdict(pass);
26 }
27
28 testcase tc_HelloW2() runs on MTCType system MTCType
29 {
30 timer TL_T := 15.0;
31 map(mtc:MyPCO_PT, system:MyPCO_PT);
32 MyPCO_PT.send("Hello, world!");
33 TL_T.start;
34 alt {
35 [] MyPCO_PT.receive("Hello, TTCN-3!") { TL_T.stop; setverdict(pass); }
36 [] TL_T.timeout { setverdict(inconc); }
37 [] MyPCO_PT.receive { TL_T.stop; setverdict(fail); }
38 }
39 }
40
41 control
42 {
43 execute(tc_HelloW());
44 execute(tc_HelloW2());
45 }
46 }
This page took 0.032725 seconds and 5 git commands to generate.