/***************************************************
 ** @author   STF 433
 ** @version  0.0.1
 ** @purpose  1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C)
 ** @verdict  pass reject
 ***************************************************/
module NegSem_160102_predefined_functions_028 {
    type enumerated EnumeratedType {e_black, e_white};
    type enumerated EnumeratedTypeWithLabels1 {e_black (1), e_white};
    type enumerated EnumeratedTypeWithLabels2 {e_black (-1), e_white};
    type enumerated EnumeratedTypeWithLabels3 {e_black (-1), e_white , e_yellow (0) };
    type enumerated Fruits {e_apple, e_peach, e_cherry};

type component GeneralComp {
}


testcase TC_NegSem_160102_predefined_functions_028 () runs on GeneralComp {

 var EnumeratedType vl_enum_black := e_black;
 var EnumeratedType vl_enum_white := e_white;
 var EnumeratedTypeWithLabels1 vl_enum1_black := e_black;
 var EnumeratedTypeWithLabels1 vl_enum1_white := e_white;
 var EnumeratedTypeWithLabels2 vl_enum2_black := e_black;
 var EnumeratedTypeWithLabels2 vl_enum2_white := e_white;
 var EnumeratedTypeWithLabels3 vl_enum3_black := e_black;
 var EnumeratedTypeWithLabels3 vl_enum3_white := e_white;
 var EnumeratedTypeWithLabels3 vl_enum3_yellow := e_yellow;


    if( match(enum2int(e_black), 0)	//ambiguous label
      ) {
        setverdict(pass);
    }
    else {
        setverdict(fail);
    }


}


control{

    execute(TC_NegSem_160102_predefined_functions_028());

}

}
