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

    type component GeneralComp {
    }

    type integer MyType;

    public type class t_class_subt_var_field {
        var MyType v_mytype := 345;

        function get_v_mytype() return MyType {
            return this.v_mytype;
        }
    }

    testcase TC_Sem_50101_top_level_002() runs on GeneralComp {
        var t_class_subt_var_field v_a := t_class_subt_var_field.create();
        if (v_a.get_v_mytype() == 345) {
            setverdict(pass);
        } else {
            setverdict(fail);
        }
    }

    control {
        execute(TC_Sem_50101_top_level_002());
    }
}