/*****************************************************************
 ** @author  STF 572
 ** @version 0.0.1
 ** @purpose 5.1.1.8, Ensure that protected methods may be overridden by public or protected methods only
 ** @verdict pass reject
*****************************************************************/
module NegSem_5010108_Methods_002 language "TTCN-3:2018 Object-Oriented" {

    type component GeneralComp {
    }

    type class MySuperClass {
        var octetstring v_o;

        function doSomething() return integer { //protected method
            return oct2int(this.v_o);
        }
    }

    type class MySubClass extends MySuperClass {

        private function doSomething() return integer { //not allowed
            return 1;
        }
    }

    testcase TC_NegSem_5010108_Methods_002() runs on GeneralComp {
        var MySubClass v_a := MySubClass.create('AAFF'O);
        if (v_a.doSomething() == 1) {
            setverdict(pass);
        } else {
            setverdict(fail);
        }
    }

    control {
        execute(TC_NegSem_5010108_Methods_002());
    }
}
