Sync with 5.4.0
[deliverable/titan.core.git] / regression_test / compileonly / mfgen-tpd / invalid_buildconfig_tpd / HelloTpd / src / MyExample.ttcn
CommitLineData
970ed795 1/******************************************************************************
3abe9331 2 * Copyright (c) 2000-2015 Ericsson Telecom AB
970ed795
EL
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!"
9module MyExample
10{
11type port PCOType message
12{
13 inout charstring;
14}
15
16type component MTCType
17{
18 port PCOType MyPCO_PT;
19}
20
21testcase 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
28testcase 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
41control
42{
43 execute(tc_HelloW());
44 execute(tc_HelloW2());
45}
46}
This page took 0.066585 seconds and 5 git commands to generate.