/***************************************************
 ** @author   STF 521
 ** @version  0.0.1
 ** @purpose  1:B.1.2.1, Ensure that the IUT correctly handles template matching with all from clause
 ** @verdict  pass accept, ttcn3verdict:pass
 ***************************************************/

// The following requirements are tested:
//A template list may contain values, templates obeying the template(present) restriction, and members added by all from clauses.

module Sem_B010201_value_list_002 {

	type record of integer RoI;

	type record MessageType {
  	 integer  		field1,
  	 charstring  	field2
	}
    template RoI m_RoI := {1,2,3,4};
    template integer mw_RoI := (all from m_RoI);

    type port loopbackPort message {
	  inout integer
	}


type component GeneralComp {
	  port loopbackPort messagePort
}

testcase TC_Sem_B010201_value_list_002() runs on GeneralComp {

    var integer v_testMessage;
     v_testMessage:= 2;

 messagePort.send(v_testMessage);

    alt {
     [] messagePort.receive(mw_RoI) {
        setverdict(pass);
     }
     [] messagePort.receive {
        setverdict(fail);
     }
    }
}

control{
    execute(TC_Sem_B010201_value_list_002());
}

}
