/*****************************************************************
 ** @author  STF 572
 ** @version 0.0.1
 ** @purpose 5.1.1.0, Ensure that a class declare templates as its members.
 ** @verdict pass accept
*****************************************************************/
module Sem_50101_top_level_004 "TTCN-3:2018 Object-Oriented" {

    type component GeneralComp {
    }

    public type class t_class_template_field {
        var template charstring vt_cs := pattern "[abc]";

        public function get_vtcs() return template charstring {
            return this.vt_cs;
        }
    }

    testcase TC_Sem_50101_top_level_004() runs on GeneralComp {
        var charstring v_cs := "b";
        var t_class_template_field v_a := t_class_template_field.create();

        if (match(v_cs, v_a.get_vtcs())) {
            setverdict(pass);
        } else {
            setverdict(fail);
        }
    }

    control {
        execute(TC_Sem_50101_top_level_004());
    }
}