/*****************************************************************
 ** @author  TTF T003
 ** @version 0.0.1
 ** @purpose 5.1.1.6, Ensure that external class constructor with parameter list can not be invoked without external actual parameter.
 ** @verdict pass reject
*****************************************************************/
module NegSem_5010106_ConstructorInvocation_002 language "TTCN-3:2018 Object-Oriented" {

    type component GeneralComp {
    }

	type class MyClass {
	   var integer v_id;

	   public function get_vid() return integer {
			return this.v_id;
		}
	}

	type external class MyExternalClass extends MyClass {
		var charstring v_cstr;

		create(integer id)
		external (charstring cstr): MyClass(id){
			this.v_cstr := cstr;
		}

		public function get_vcstr() return charstring {
			return this.v_cstr;
		}
	}

    testcase TC_NegSem_5010106_ConstructorInvocation_002() runs on GeneralComp {
		var MyExternalClass v_ext := MyExternalClass.create(123); //not allowed: "external" is missing

		if (v_ext.get_vid() == 123) {
			setverdict(pass);
		} else {
			setverdict(fail);
		}
    }

    control {
        execute(TC_NegSem_5010106_ConstructorInvocation_002());
    }
}