conformance_test/positive_tests added
[deliverable/titan.core.git] / conformance_test / positive_tests / 20_statement_and_operations_for_alt / 2005_default_handling / 200503_the_deactivate_operation / NegSem_200503_the_deactivate_operation_003.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.5.1, verify that error is generated when deactivated reference is on incorrect type
13 ** @verdict pass reject
14 ***************************************************/
15
16 // The following requirement is tested:
17 // A deactivate operation will remove the referenced default from the list of defaults.
18
19 module NegSem_200503_the_deactivate_operation_003 {
20
21 type port P message {
22 inout integer;
23 } with {extension "internal"}
24
25 type component GeneralComp {
26 port P p;
27 }
28
29 altstep a1() runs on GeneralComp {
30 [] p.receive(integer:?) {
31 setverdict(pass);
32 }
33 }
34
35 testcase TC_NegSem_200503_the_deactivate_operation_003() runs on GeneralComp {
36 var GeneralComp v_ptc := null;
37
38 connect(self:p, self:p);
39 p.send(integer:1);
40
41 deactivate(v_ptc); // incorrect type -> error
42
43 alt {
44 [] p.receive(integer:0) { // not expected: leads to default invocation
45 setverdict(fail);
46 }
47 }
48 }
49
50 control{
51 execute(TC_NegSem_200503_the_deactivate_operation_003());
52 }
53 }
This page took 0.05499 seconds and 5 git commands to generate.