conformance_test/positive_tests added
[deliverable/titan.core.git] / conformance_test / positive_tests / 21_configuration_operations / 2101_connection_operations / 210101_connect_and_map_operations / NegSem_210101_connect_and_map_operations_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:21.1.1, Verify that connect operation rejects ports with incompatible message type lists
13 ** @verdict pass reject
14 ***************************************************/
15
16 // The following requirements are tested:
17 // For the connect operations, only consistent connections are allowed.
18 // a) Assuming the following:
19 // 1) ports PORT1 and PORT2 are the ports to be connected;
20 // 2) inlist-PORT1 defines the messages or procedures of the in-direction of PORT1;
21 // 3) outlist-PORT1defines the messages or procedures of the out-direction of PORT1;
22 // 4) inlist-PORT2 defines the messages or procedures of the in-direction of PORT2; and
23 // 5) outlist-PORT2 defines the messages or procedures of the out-direction of PORT2.
24 // b) The connect operation is allowed if and only if:
25 // outlist-PORT1 â\8a\86 inlist-PORT2 and outlist-PORT2 â\8a\86 inlist-PORT1.
26 //
27 // In this test, inlists and outlists are completely incompatible
28
29 module NegSem_210101_connect_and_map_operations_001 {
30 type record R {
31 integer field1,
32 charstring field2
33 }
34
35 type port P1 message {
36 inout integer;
37 in R;
38 } with {extension "internal"}
39
40 type port P2 message {
41 out bitstring;
42 in boolean;
43 } with {extension "internal"}
44
45 type component GeneralComp {
46 }
47
48 type component C1 {
49 port P1 p;
50 }
51
52 type component C2 {
53 port P2 p;
54 }
55
56 testcase TC_NegSem_210101_connect_and_map_operations_001() runs on GeneralComp system GeneralComp {
57 var C1 v_ptc1 := C1.create;
58 var C2 v_ptc2 := C2.create;
59 connect(v_ptc1:p, v_ptc2:p); // incompatible message types: error expected
60 setverdict(pass);
61 }
62
63 control{
64 execute(TC_NegSem_210101_connect_and_map_operations_001());
65 }
66 }
This page took 0.052765 seconds and 5 git commands to generate.