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
9 * Adrien Kirjak – initial implementation
12 ** @purpose 1:21.3.7, Verify that any from done index redirection for multi-D arrays requires arrays
13 ** @verdict pass reject
14 *****************************************************************/
15 // The following requirements are tested:
17 // If the index redirection is used for multi-dimensional component arrays, the size
18 // of the integer array or record of integer type shall exactly be the same as the dimension
19 // of the respective array, and its type shall allow storing the highest index (from all
20 // dimensions) of the array.
21 module NegSem_210307_done_operation_006 {
23 type component GeneralComp {}
25 function f() runs on GeneralComp {
31 testcase TC_NegSem_210307_done_operation_006() runs on GeneralComp system GeneralComp {
32 const integer c_size := 3;
33 var GeneralComp v_ptc[c_size][c_size];
36 for (var integer i := 0; i < c_size; i := i + 1) {
37 for (var integer j := 0; j < c_size; j := j + 1) {
38 v_ptc[i][j] := GeneralComp.create; // created components are inactive
39 if (i mod 2 == 0 or j mod 2 == 1) { v_ptc[i][j].kill; } // kill components on even i or odd j
40 else { v_ptc[i][j].start(f());} // activate v_ptc
46 [] any from v_ptc.done -> @index v_index
51 setverdict(fail, "Invalid index value");
55 [else] { setverdict(fail, "The any from done operation didn't find done components"); }
60 execute(TC_NegSem_210307_done_operation_006(), 5.0);