/***************************************************
 ** @author   STF 470 (updated by STF 521)
 ** @version  0.0.2
 ** @purpose  1:6.2.7, verify assignment of explicitly identified elements to two dimensional array
 ** @verdict  pass accept, ttcn3verdict:pass
 ***************************************************/

// The following requirement is tested:
// When specifying values for multi-dimensional arrays, the leftmost dimension
// corresponds to the outermost structure of the value, and the rightmost dimension to
// the innermost structure.

module Sem_060207_arrays_014 {

 type component GeneralComp {
 }


 type integer MyArrayType1[2][3] (1 .. 10);


testcase TC_Sem_060207_arrays_014() runs on GeneralComp {

  var MyArrayType1 v_array1;
  v_array1[0][0] := 8;
  v_array1[0][1] := 10;
  v_array1[0][2] := 9;
  v_array1[1][0] := 2;
  v_array1[1][1] := 3;
  //v_array1[1][2] := -; // NOT ALLOWED!!!

  if (match(v_array1[0][0], 8) and match(v_array1[1][0], 2) and not isbound(v_array1[1][2])
      and match(lengthof (v_array1), 2) and match(lengthof (v_array1[0]), 3))
  {
    setverdict(pass);
  }
  else {
    setverdict(fail);
  }

}

control {
    execute(TC_Sem_060207_arrays_014());
}

}
