Newer
Older
/***************************************************
** @author STF 470
** @version 0.0.1
** @purpose 1:6.2.3.2, verify handling of value list assignment used for initialization of set of values
** @verdict pass accept, ttcn3verdict:pass
***************************************************/
// The following requirement is tested:
// When using the value list notation, all elements in the structure shall
// be specified either with a value or the not used symbol "-". The first
// member of the list is assigned to the first element, the second list
// member is assigned to the second element, etc.
module Sem_060203_records_and_sets_of_single_types_009 {
type component GeneralComp {
}
type record of integer SoI;
testcase TC_Sem_060203_records_and_sets_of_single_types_009() runs on GeneralComp {
var SoI v_set := { 0, 1, - };
if (v_set[0] == 0 and v_set[1] == 1 and not isbound(v_set[2])
and lengthof (v_set & {2}) == 4) {
setverdict(pass);
}
else {
setverdict(fail);
}
}
control {
execute(TC_Sem_060203_records_and_sets_of_single_types_009());
}
}