/***************************************************
 ** @author   STF T003
 ** @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 accept, ttcn3verdict:pass
 ***************************************************/

/* The following requirements are tested:
 *16.1.2 Restriction a.3:
 * any parameters of the functions lengthof may be partially initialized; */


module Sem_160102_predefined_functions_116 {

    type component GeneralComp {}

    type record of integer RoI;


    testcase TC_Sem_160102_predefined_functions_116 () runs on GeneralComp {

        var RoI v_Rec1;
        var RoI v_res;
        var RoI v_expected;

        v_Rec1 := {-,0,-,2};      //partially initialized record of integers
        v_res := replace(v_Rec1,0,1,{23});
        v_expected := {23,0,-,2};

        if(match(v_res, v_expected)) {
            setverdict(pass,v_res);
        } else {
            setverdict(fail,"The value of v_res:",v_res);
        }
    }

    control{
        execute(TC_Sem_160102_predefined_functions_116());
    }

}