/*****************************************************************
 ** @author  STF 572
 ** @version 0.0.1
 ** @purpose 5.1.1.5, Ensure that use class constructor with its superclass constructor.
 ** @verdict pass accept
*****************************************************************/
module Sem_5010105_Constructors_002 "TTCN-3:2018 Object-Oriented" {

    type component GeneralComp {
    }

    type class MySuperClass {
        var octetstring v_o;

        create(octetstring v_o) {
            this.v_o := v_o;
        }

        public function get_vo() return octetstring {
            return this.v_o;
        }
    }

    type class MySubClass extends MySuperClass {
        var template charstring vt_cstr;

        create(template charstring vt_cstr) : MySuperClass('AA5600'O) {
            this.vt_cstr := vt_cstr;
        }
    }

    testcase TC_Sem_5010105_Constructors_002() runs on GeneralComp {
        var MySubClass v_a := MySubClass.create( pattern "?abc*");
        if (v_a.get_vo() == 'AA5600'O) {
            setverdict(pass);
        } else {
            setverdict(fail);
        }
    }

    control {
        execute(TC_Sem_5010105_Constructors_002());
    }
}