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_007.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 == outlist-PORT2 and inlist-PORT2 â\8a\82 inlist-PORT1
29
30 module Sem_210101_connect_and_map_operations_007 {
31 type record R {
32 integer field1,
33 charstring field2
34 }
35
36 type port P1 message {
37 in charstring, bitstring;
38 inout integer;
39 out R;
40 } with {extension "internal"}
41
42 type port P2 message {
43 out R, integer;
44 in integer;
45 } with {extension "internal"}
46
47 type component GeneralComp {
48 port P1 p
49 }
50
51 type component SystemComp {
52 port P2 p;
53 }
54
55 testcase TC_Sem_210101_connect_and_map_operations_007() runs on GeneralComp system SystemComp {
56 // self:p inlist is (integer, charstring, bitstring) and system:p inlist is (integer)
57 map(self:p, system:p);
58 if(p.checkstate("Mapped")) {
59 setverdict(pass);
60 } else {
61 setverdict(fail);
62 }
63
64 }
65
66 control{
67 execute(TC_Sem_210101_connect_and_map_operations_007());
68 }
69 }
This page took 0.038623 seconds and 5 git commands to generate.