/***************************************************************** ** @author STF 487 ** @version 0.0.1 ** @purpose 1:15.5, Ensure that default values in formal parameters of modified templates are working as expected. ** @verdict pass accept, ttcn3verdict:pass *****************************************************************/ //Restriction c) /*if the value list notation is used, only the number of elements listed in the modified template is inherited from the parent (i.e. the list is truncated at the last element of the list notation in the modified template)*/ module Sem_1505_ModifiedTemplates_010 { type component GeneralComp { } type set MyMessageType { integer field1, charstring field2, boolean field3, charstring field4 } template MyMessageType m_templateOne := { field1 := 1, field2 := "Hello World", field3 := true, field4 := "Hello World2" } template MyMessageType m_templateTwo modifies m_templateOne := { -, "ABC", false} //field 4 is not inherited from the parent testcase TC_Sem_1505_ModifiedTemplates_010() runs on GeneralComp { if ( (match(valueof(m_templateOne.field1),1)) and (match(valueof(m_templateTwo.field2),"ABC")) and (match(valueof(m_templateTwo.field3), false)) and (match(valueof(m_templateTwo.field4),"")) ){ setverdict(pass,m_templateTwo.field4); } else { setverdict(fail,m_templateTwo.field4); } } control{ execute(TC_Sem_1505_ModifiedTemplates_010()); } }