NegSem_1101_ValueVars_004.ttcn 1.01 KB
Newer Older
kovacsa's avatar
kovacsa committed
/*****************************************************************
 ** @author   STF 487
 ** @version  0.0.1
 ** @purpose  1:11.1, Ensure that index notation referencing to a "set of", which actual value is null shall cause an error. 
 ** @verdict  pass reject
 *****************************************************************/

/* The following requirements are tested:
Restriction h. : Using the dot notation and index notation for referencing a field, alternative or element of an address value, which actual value is null shall cause an
error.
*/

module NegSem_1101_ValueVars_004 {

type component GeneralComp {	    	    
}

    type integer address;
    type set of address MySetofInt;

testcase TC_NegSem_1101_ValueVars_004() runs on GeneralComp {
 
 var MySetofInt R1:= {[0] := null};
  
    var integer Myvar := R1[0];    //error
    
kovacsa's avatar
kovacsa committed
	if (match(Myvar,R1[0])) { setverdict(pass,"match") }
kovacsa's avatar
kovacsa committed
		else { setverdict(fail) }
    }
    

control{
    execute(TC_NegSem_1101_ValueVars_004());
}

}