/*****************************************************************
 ** @author   STF 470
 ** @version  0.0.1
 ** @purpose  1:15.8, Ensure that a template(present) base template can be modified with template(present) restriction.
 ** @verdict  pass accept, ttcn3verdict:pass
 *****************************************************************/

module Sem_1508_TemplateRestrictions_019 {

    type component GeneralComp { }

    type record ExampleType {
        integer a,
        boolean b optional
    }

    template(present) ExampleType m_baseTemplate := {
        a := 20,
        b := true
    }

    template(present) ExampleType m_modifiedTemplate modifies m_baseTemplate := {
        a := 22
    }

    testcase TC_Sem_1508_TemplateRestrictions_019() runs on GeneralComp {
        if (match(valueof(m_modifiedTemplate.a), 22) and
            match(valueof(m_modifiedTemplate.b), true)
        ) {
            setverdict(pass);
        } else {
            setverdict(fail);
        }
    }

    control{
        execute(TC_Sem_1508_TemplateRestrictions_019());
    }


}