conformance_test/positive_tests added
[deliverable/titan.core.git] / conformance_test / positive_tests / 22_communication_operations / 2202_message_based_communication / 220202_receive_operation / NegSem_220202_ReceiveOperation_020.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:22.2.2, insufficient array dimension of variable in index redirection
13 ** @verdict pass reject
14 *****************************************************************/
15
16 // The following requirements are tested:
17 // If the index redirection is used for multi-dimensional port arrays, the size of the
18 // integer array or record of integer type shall exactly be the same as the dimension of
19 // the respective array, and its type shall allow storing the highest index (from all
20 // dimensions) of the array.
21
22 module NegSem_220202_ReceiveOperation_020 {
23 type port P message {
24 inout integer;
25 } with {extension "internal"}
26
27 type component GeneralComp {
28 port P p[3][2][3];
29 }
30
31 testcase TC_NegSem_220202_ReceiveOperation_020() runs on GeneralComp {
32 var integer v_indices[2];
33 p[0][1][2].send(100);
34 any from p.receive(integer:?) -> @index v_indices;
35 setverdict(pass);
36 }
37
38 control {
39 execute(TC_NegSem_220202_ReceiveOperation_020(), 5.0);
40 }
41 }
This page took 0.031136 seconds and 5 git commands to generate.