conformance_test/positive_tests added
[deliverable/titan.core.git] / conformance_test / positive_tests / 09_test_configurations / 0901_communication_ports / NegSem_0901_Communication_ports_008.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:9.1, Verify that mapping an already connected port is not allowed
13 ** @verdict pass reject
14 ***************************************************/
15
16 /*NOTE: see Figure 7(g): Two components (A and B). MycompA:p1 is connected to MycompB:p1.
17 * Therefore mapping MycompB to TSI port p1 is not allowed
18 * */
19
20 module NegSem_0901_Communication_ports_008 {
21
22 type port P message {
23 inout integer
24 } with {extension "internal"}
25
26 type component GeneralComp
27 {
28 port P p1;
29 }
30
31 testcase TC_NegSem_0901_Communication_ports_008() runs on GeneralComp system GeneralComp {
32
33 // generate test components
34 var GeneralComp MycompA;
35 var GeneralComp MycompB;
36 MycompA := GeneralComp.create;
37 MycompB := GeneralComp.create;
38
39 connect(MycompA:p1,MycompB:p1);
40 map(MycompB:p1,system:p1); // not allowed, since MyCompB:p1 is already connected to MyCompA:p1
41
42 setverdict(pass);
43 }
44
45 control{
46 execute(TC_NegSem_0901_Communication_ports_008());
47 }
48 }
49
This page took 0.032186 seconds and 5 git commands to generate.