Newer
Older
/***************************************************
** @author STF 521
** @version 0.0.1
** @purpose 1:5.2.2, Ensure that identifiers for fields of structured types, enumerated values and groups do not have to be globally unique.
** @verdict pass accept, ttcn3verdict:pass
***************************************************/
/* The following requirements are tested:
* Within the same module,they shall only be reused for enumerated values within other enumerated types or as identifiers for fields of structured types. In addition, enumeration values shall not be used as names of value or
* template definitions of imported enumeration types, defining the given enumeration value
*/
module Sem_050202_Uniqueness_005 {
type component GeneralComp {
}
type enumerated MyFirstEnumType {MyInt,MySecondEnumValue};
type integer MyInt;
testcase TC_Sem_050202_Uniqueness_005() runs on GeneralComp {
var MyFirstEnumType v_enum := MySecondEnumValue;
var MyInt v_int := 1; // local scope
if (match(v_enum,MySecondEnumValue) and match(v_int,1)) {
setverdict(pass);
} else {
setverdict(fail);
}
}
control {
execute(TC_Sem_050202_Uniqueness_005());
}
}