conformance_test/positive_tests added
[deliverable/titan.core.git] / conformance_test / positive_tests / 21_configuration_operations / 2101_connection_operations / 210101_connect_and_map_operations / Sem_210101_connect_and_map_operations_006.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, Map operation accepts ports with compatible message type list containing several types
13 ** @verdict pass accept, ttcn3verdict:pass
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 // c) The map operation (assuming PORT2 is the test system interface port) is allowed if
25 // and only if:
26 // outlist-PORT1 â\8a\86 outlist-PORT2 and inlist-PORT2 â\8a\86 inlist-PORT1.
27 //
28 // In this test, outlist-PORT1 â\8a\82 outlist-PORT2 and inlist-PORT2 == inlist-PORT1
29
30 module Sem_210101_connect_and_map_operations_006 {
31 type record R {
32 integer field1,
33 charstring field2
34 }
35
36 type port P1 message {
37 inout integer;
38 out R;
39 } with {extension "internal"}
40
41 type port P2 message {
42 out charstring, R, integer, bitstring;
43 in integer;
44 } with {extension "internal"}
45
46 type component GeneralComp {
47 port P1 p
48 }
49
50 type component SystemComp {
51 port P2 p;
52 }
53
54 testcase TC_Sem_210101_connect_and_map_operations_006() runs on GeneralComp system SystemComp {
55 // self:p outlist is (integer, R) and system:p outlist is (charstring, boolean, R, integer)
56 map(self:p, system:p);
57 if(p.checkstate("Mapped")) {
58 setverdict(pass);
59 } else {
60 setverdict(fail);
61 }
62 }
63
64 control{
65 execute(TC_Sem_210101_connect_and_map_operations_006());
66 }
67 }
This page took 0.032262 seconds and 5 git commands to generate.