/*****************************************************************
 ** @author   STF 409
 ** @version  0.0.1
 ** @purpose  1:15.5, Ensure that the values of plain modified template definitions are as expected.
 ** @verdict  pass accept, ttcn3verdict:pass
 *****************************************************************/

module Sem_1505_ModifiedTemplates_001 {

type port MyMessagePortType message {
	inout MyMessageType
}

type component GeneralComp {
	port MyMessagePortType pt_myPort;
}

type record MyMessageType {
	integer field1,
	charstring field2,
	boolean field3
}

template MyMessageType m_templateOne := {
	field1 := 2,
	field2 := "Hello World",
	field3 := true
}

template MyMessageType m_templateTwo modifies m_templateOne := {
	field1 := 4
}

testcase TC_Sem_1505_ModifiedTemplates_001() runs on GeneralComp {
	if (match(valueof(m_templateTwo.field1), 4) and
	    match(valueof(m_templateTwo.field2), "Hello World") and
	    match(valueof(m_templateTwo.field3), true)
	   ) {
		setverdict(pass);
	} else {
		setverdict(fail);
	}
}

control{
    execute(TC_Sem_1505_ModifiedTemplates_001());
}

}