/***************************************************
 ** @author   STF 487
 ** @version  0.0.1
 ** @purpose  1:B.1.5.1, Ensure that the IUT correctly handles template matching of character pattern set expressions
 ** @verdict  pass accept, ttcn3verdict:pass
 ***************************************************/

module Sem_B010501_set_expression_006 {


	type record MessageType {
  	 universal charstring  	field1,
  	 universal charstring	field2
	}

    type port loopbackPort message {
	  inout MessageType
	}


type component GeneralComp {
	  port loopbackPort messagePort
}

testcase TC_Sem_B010501_set_expression_006() runs on GeneralComp {

    var MessageType v_testMessage;

 template MessageType mw_matchingTemplate:=
 {
  field1 := pattern "test[\q{0,0,1,113}]",    //accepted \q character is ű
  field2 := pattern "test[^\q{0,0,1,113}]"    //accepted characters are: anything execpt ű
 }

 v_testMessage:=  {
  field1 := "testű",
  field2 := "testb"
 }

 messagePort.send(v_testMessage);

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

control{
    execute(TC_Sem_B010501_set_expression_006());
}

}
