/****************************************************************************** * Copyright (c) 2000-2014 Ericsson Telecom AB * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html ******************************************************************************/ // TTCN-3 version of "Hello, world!" module MyExample { type port PCOType message { inout charstring; } type component MTCType { port PCOType MyPCO_PT; } testcase tc_HelloW() runs on MTCType system MTCType { map(mtc:MyPCO_PT, system:MyPCO_PT); MyPCO_PT.send("Hello, world!"); setverdict(pass); } testcase tc_HelloW2() runs on MTCType system MTCType { timer TL_T := 15.0; map(mtc:MyPCO_PT, system:MyPCO_PT); MyPCO_PT.send("Hello, world!"); TL_T.start; alt { [] MyPCO_PT.receive("Hello, TTCN-3!") { TL_T.stop; setverdict(pass); } [] TL_T.timeout { setverdict(inconc); } [] MyPCO_PT.receive { TL_T.stop; setverdict(fail); } } } control { execute(tc_HelloW()); execute(tc_HelloW2()); } }