conformance_test/positive_tests added
[deliverable/titan.core.git] / conformance_test / positive_tests / 20_statement_and_operations_for_alt / 2002_the_alt_statement / NegSem_2002_TheAltStatement_001.ttcn
1 /******************************************************************************
2 * Copyright (c) 2000-2016 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 * Contributors:
9 * Adrien Kirjak – initial implementation
10 *
11 ** @version 0.0.1
12 ** @purpose 1:20.2, dynamic error if a test component is completely blocked
13 ** @verdict pass reject
14 *****************************************************************/
15
16 // The following requirement is tested:
17 // The test case shall stop and indicate a dynamic error if a test component is
18 // completely blocked. This means none of the alternatives can be chosen, no
19 // relevant test component is running, no relevant timer is running and all
20 // relevant ports contain at least one message, call, reply or exception that
21 // do not match.
22
23 module NegSem_2002_TheAltStatement_001 {
24
25 type port MyPort message {
26 inout charstring
27 } with {extension "internal"}
28
29 type component GeneralComp {
30 port MyPort p;
31 }
32
33 template charstring m_test := "ping";
34
35 testcase TC_NegSem_2002_TheAltStatement_001() runs on GeneralComp {
36 timer t_tmr1;
37
38 connect(self:p,self:p);
39
40 p.send(m_test);
41 alt {
42 [] p.receive("abc") {
43 setverdict(pass);
44 }
45 [] t_tmr1.timeout {
46 setverdict(pass);
47 }
48 }
49 }
50
51 control {
52 execute(TC_NegSem_2002_TheAltStatement_001());
53 }
54 }
This page took 0.032266 seconds and 5 git commands to generate.