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_021.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 element value range 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_021 {
23 type integer RestrInt(0..2);
24 type port P message {
25 inout integer;
26 } with {extension "internal"}
27
28 type component GeneralComp {
29 port P p[4][2][3];
30 }
31
32 testcase TC_NegSem_220202_ReceiveOperation_021() runs on GeneralComp {
33 var RestrInt v_indices[3];
34
35 p[3][1][2].send(100);
36 any from p.receive(integer:?) -> @index v_indices;
37
38 setverdict(pass);
39 }
40
41 control {
42 execute(TC_NegSem_220202_ReceiveOperation_021(), 5.0);
43 }
44 }
This page took 0.032425 seconds and 5 git commands to generate.