/***************************************************
 ** @author   STF 470
 ** @version  0.0.1
 ** @purpose  1:9.1, Verify that a port can connect to another port of the same component
 ** @verdict  pass accept, ttcn3verdict:pass
 ***************************************************/

// The following requirements are tested:
// Figure 6: Allowed connections, connection scheme f)

module Sem_0901_Communication_ports_007 {

    type port P message {
        inout integer
    }

    type component GeneralComp
    {
        port P p1, p2;
    }

    testcase TC_Sem_0901_Communication_ports_007() runs on GeneralComp system GeneralComp {
		connect(self:p1, self:p2);
		if(p1.checkstate("Connected")) {
			setverdict(pass);
		} else {
			setverdict(fail);
		}
    }

    control{
        execute(TC_Sem_0901_Communication_ports_007());
    }
}

