Loading 15_templates/1503_global_and_local_templates/Sem_1503_GlobalAndLocalTemplates_001.ttcn 0 → 100644 +41 −0 Original line number Diff line number Diff line /***************************************************************** ** @author STF 409 ** @version $Rev: 150 $ ** @purpose 1:15.3, Ensure that a template values can be accessed with the dot notation as expected. ** @verdict pass accept, ttcn3verdict:pass *****************************************************************/ module Sem_1503_GlobalAndLocalTemplates_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_myTemplate := { field1 := 2, field2 := "foobar", field3 := true } testcase TC_Sem_1503_GlobalAndLocalTemplates_001() runs on GeneralComp { if ((m_myTemplate.field1 == 2) and (m_myTemplate.field2 == "foobar") and (m_myTemplate.field3 == true) ) { setverdict(pass); } else { setverdict(fail); } } control{ execute(TC_Sem_1503_GlobalAndLocalTemplates_001()); } } No newline at end of file 15_templates/1503_global_and_local_templates/Sem_1503_GlobalAndLocalTemplates_002.ttcn 0 → 100644 +41 −0 Original line number Diff line number Diff line /***************************************************************** ** @author STF 409 ** @version $Rev: 150 $ ** @purpose 1:15.3, Ensure that a template actual parameter is passed through correctly. ** @verdict pass accept, ttcn3verdict:pass *****************************************************************/ module Sem_1503_GlobalAndLocalTemplates_002 { 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_myTemplate(integer p_myFormalParam):= { field1 := p_myFormalParam, field2 := pattern "abc*xyz", field3 := true } testcase TC_Sem_1503_GlobalAndLocalTemplates_002() runs on GeneralComp { if (m_myTemplate(2).field1 == 2) { setverdict(pass); } else { setverdict(fail); } } control{ execute(TC_Sem_1503_GlobalAndLocalTemplates_002()); } } No newline at end of file 15_templates/1503_global_and_local_templates/Syn_1503_GlobalAndLocalTemplates_001.ttcn +1 −1 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ type record MyMessageType { boolean field3 } template MyMessageType m_MyTemplate(integer p_myFormalParam):= { template MyMessageType m_myTemplate(integer p_myFormalParam):= { field1 := p_myFormalParam, field2 := pattern "abc*xyz", field3 := true Loading 15_templates/1503_global_and_local_templates/Syn_1503_GlobalAndLocalTemplates_003.ttcn +0 −1 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ type record MyMessageType { boolean field3 } testcase TC_Syn_1503_GlobalAndLocalTemplates_003() runs on GeneralComp { template MyMessageType m_myTemplate(integer p_myFormalParam):= { field1 := p_myFormalParam, Loading 15_templates/1504_inline_templates/Sem_1504_InlineTemplates_001.ttcn 0 → 100644 +35 −0 Original line number Diff line number Diff line /***************************************************************** ** @author STF 409 ** @version $Rev: 150 $ ** @purpose 1:15.4, Ensure that an inline template can be accessed as exepcted by the dot notation. ** @verdict pass accept, ttcn3verdict:pass *****************************************************************/ module Sem_1504_InlineTemplates_001 { type port MyMessagePortType message { inout MyMessageType } type component GeneralComp { port MyMessagePortType pt_myPort; } type record MyMessageType { integer field1, charstring field2, boolean field3 } testcase TC_Sem_1504_InlineTemplates_001() runs on GeneralComp { if ((MyMessageType:{2,"foobar",true}).field1 == 2) { setverdict(pass); } else { setverdict(fail); } } control{ execute(TC_Sem_1504_InlineTemplates_001()); } } No newline at end of file Loading
15_templates/1503_global_and_local_templates/Sem_1503_GlobalAndLocalTemplates_001.ttcn 0 → 100644 +41 −0 Original line number Diff line number Diff line /***************************************************************** ** @author STF 409 ** @version $Rev: 150 $ ** @purpose 1:15.3, Ensure that a template values can be accessed with the dot notation as expected. ** @verdict pass accept, ttcn3verdict:pass *****************************************************************/ module Sem_1503_GlobalAndLocalTemplates_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_myTemplate := { field1 := 2, field2 := "foobar", field3 := true } testcase TC_Sem_1503_GlobalAndLocalTemplates_001() runs on GeneralComp { if ((m_myTemplate.field1 == 2) and (m_myTemplate.field2 == "foobar") and (m_myTemplate.field3 == true) ) { setverdict(pass); } else { setverdict(fail); } } control{ execute(TC_Sem_1503_GlobalAndLocalTemplates_001()); } } No newline at end of file
15_templates/1503_global_and_local_templates/Sem_1503_GlobalAndLocalTemplates_002.ttcn 0 → 100644 +41 −0 Original line number Diff line number Diff line /***************************************************************** ** @author STF 409 ** @version $Rev: 150 $ ** @purpose 1:15.3, Ensure that a template actual parameter is passed through correctly. ** @verdict pass accept, ttcn3verdict:pass *****************************************************************/ module Sem_1503_GlobalAndLocalTemplates_002 { 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_myTemplate(integer p_myFormalParam):= { field1 := p_myFormalParam, field2 := pattern "abc*xyz", field3 := true } testcase TC_Sem_1503_GlobalAndLocalTemplates_002() runs on GeneralComp { if (m_myTemplate(2).field1 == 2) { setverdict(pass); } else { setverdict(fail); } } control{ execute(TC_Sem_1503_GlobalAndLocalTemplates_002()); } } No newline at end of file
15_templates/1503_global_and_local_templates/Syn_1503_GlobalAndLocalTemplates_001.ttcn +1 −1 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ type record MyMessageType { boolean field3 } template MyMessageType m_MyTemplate(integer p_myFormalParam):= { template MyMessageType m_myTemplate(integer p_myFormalParam):= { field1 := p_myFormalParam, field2 := pattern "abc*xyz", field3 := true Loading
15_templates/1503_global_and_local_templates/Syn_1503_GlobalAndLocalTemplates_003.ttcn +0 −1 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ type record MyMessageType { boolean field3 } testcase TC_Syn_1503_GlobalAndLocalTemplates_003() runs on GeneralComp { template MyMessageType m_myTemplate(integer p_myFormalParam):= { field1 := p_myFormalParam, Loading
15_templates/1504_inline_templates/Sem_1504_InlineTemplates_001.ttcn 0 → 100644 +35 −0 Original line number Diff line number Diff line /***************************************************************** ** @author STF 409 ** @version $Rev: 150 $ ** @purpose 1:15.4, Ensure that an inline template can be accessed as exepcted by the dot notation. ** @verdict pass accept, ttcn3verdict:pass *****************************************************************/ module Sem_1504_InlineTemplates_001 { type port MyMessagePortType message { inout MyMessageType } type component GeneralComp { port MyMessagePortType pt_myPort; } type record MyMessageType { integer field1, charstring field2, boolean field3 } testcase TC_Sem_1504_InlineTemplates_001() runs on GeneralComp { if ((MyMessageType:{2,"foobar",true}).field1 == 2) { setverdict(pass); } else { setverdict(fail); } } control{ execute(TC_Sem_1504_InlineTemplates_001()); } } No newline at end of file