/*****************************************************************
 ** @author  STF 572
 ** @version 0.0.1
 ** @purpose 5.1.1.9, Ensure that method invocation can be used.
 ** @verdict pass accept
*****************************************************************/
module Sem_5010109_MethodInvocation_001 language "TTCN-3:2018 Object-Oriented" {

    type component GeneralComp {
    }

    type class MyClass {
        var hexstring v_h;

        public function f_hex() return bitstring {
            return hex2bit(this.v_h);
        }
    }

    testcase TC_Sem_5010109_MethodInvocation_001() runs on GeneralComp {
        var MyClass v_a := MyClass.create('FA1'H);
        if (v_a.f_hex() == '111110100001'B) {
            setverdict(pass);
        } else {
            setverdict(fail);
        }
    }

    control {
        execute(TC_Sem_5010109_MethodInvocation_001());
    }
}