/*****************************************************************
 ** @author  STF 572
 ** @version 0.0.1
 ** @purpose 5.1.1.8, Ensure that is  'runs on, mtc, system' clauses are not permitted  on  methods.
 ** @verdict pass reject
 *****************************************************************/
module NegSem_5010108_Methods_006 language "TTCN-3:2018 Object-Oriented" {

    type component GeneralComp {
    }

    type class MySuperClass runs on GeneralComp {
        var octetstring v_o;

        function doSomething() return integer mtc GeneralComp { //not allowed
            return oct2int(this.v_o);
        }
    }

    type class MySubClass extends MySuperClass {

        function doSomething() return integer mtc GeneralComp {
            return 1;
        }
    }

    testcase TC_NegSem_5010108_Methods_006() 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_006());
    }
}