/***************************************************
 ** @author   STF 451
 ** @version  0.0.1
 ** @purpose  1:20.2, Ensure that alt statements are correctly handled for dynamically mapped ports
 ** @verdict  pass accept, ttcn3verdict:pass
 ***************************************************/

// Mycompport A is dynamically mapped
module Sem_2002_TheAltStatement_012{

    type port loopbackPort message {
	  inout integer
	}

	type port IntegerOutputPortType message {
	  inout integer
	}

type component GeneralComp
	{

		port IntegerOutputPortType MycomportA
	}

type component MyTestSystemInterface
	{
 		port loopbackPort messagePort
	}

// MyTestSystemInterface is the test system interface
testcase TC_Sem_2002_TheAltStatement_012() runs on GeneralComp system MyTestSystemInterface {
 timer tc_timer := 0.1;
 map(mtc:MycomportA, system:messagePort);


 MycomportA.send(2);
 tc_timer.start;
 unmap(mtc:MycomportA);
 setverdict(pass);

    alt {
     [] MycomportA.receive {
     }
     [] tc_timer.timeout {
        setverdict(pass);
     }
    }
}
control{
    execute(TC_Sem_2002_TheAltStatement_012());
}
}