Loading 15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/Sem_150603_ReferencingRecordOfAndSetElements_001.ttcn 0 → 100644 +35 −0 Original line number Diff line number Diff line /***************************************************************** ** @author STF 409 ** @version $Rev: 150 $ ** @purpose 1:15.6.3, Ensure that assignment of an anyvalue on the right hand side yields an anyvalue in the context of record of. ** @verdict pass accept, ttcn3verdict:pass *****************************************************************/ module Sem_150603_ReferencingRecordOfAndSetElements_001 { type component GeneralComp { } type record of integer RoI; testcase TC_Sem_150603_ReferencingRecordOfAndSetElements_001() runs on GeneralComp { var template RoI m_one; var template RoI m_two; m_one := {0,?,2}; m_two := {0,1,2}; m_two[1] := m_one[1]; if (match("?",m_two[1])) { setverdict(pass); } else { setverdict(fail); } } control{ execute(TC_Sem_150603_ReferencingRecordOfAndSetElements_001()); } } No newline at end of file 15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/Sem_150603_ReferencingRecordOfAndSetElements_002.ttcn 0 → 100644 +38 −0 Original line number Diff line number Diff line /***************************************************************** ** @author STF 409 ** @version $Rev: 150 $ ** @purpose 1:15.6.3, Ensure that assignment to a anyvalue in the context of record of is handled correctly. ** @verdict pass accept, ttcn3verdict:pass *****************************************************************/ module Sem_150603_ReferencingRecordOfAndSetElements_002 { type component GeneralComp { } type record of integer RoI; testcase TC_Sem_150603_ReferencingRecordOfAndSetElements_002() runs on GeneralComp { var template RoI m_one; m_one := ?; m_one[2] := 2; // assignment should yield {?,?,2,*} if (match("?",m_one[0]) and match("?",m_one[1]) and match(2,m_one[2]) and match("*",m_one[3]) ) { setverdict(pass); } else { setverdict(fail); } } control{ execute(TC_Sem_150603_ReferencingRecordOfAndSetElements_002()); } } No newline at end of file 15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/Sem_150603_ReferencingRecordOfAndSetElements_003.ttcn 0 → 100644 +42 −0 Original line number Diff line number Diff line /***************************************************************** ** @author STF 409 ** @version $Rev: 150 $ ** @purpose 1:15.6.3, Ensure that assignment to a anyvalue in the context of record of is handled correctly in two subsequent assignments. ** @verdict pass accept, ttcn3verdict:pass *****************************************************************/ module Sem_150603_ReferencingRecordOfAndSetElements_003 { type component GeneralComp { } type record of integer RoI; testcase TC_Sem_150603_ReferencingRecordOfAndSetElements_003() runs on GeneralComp { var template RoI m_one; m_one := ?; m_one[2] := 2; // assignment should yield {?,?,2,*} m_one[4] := 3; // assignment should yield {?,?,2,?,3,*} if (match("?",m_one[0]) and match("?",m_one[1]) and match(2,m_one[2]) and match("?",m_one[3]) and match(3,m_one[4]) and match("*",m_one[5]) ) { setverdict(pass); } else { setverdict(fail); } } control{ execute(TC_Sem_150603_ReferencingRecordOfAndSetElements_003()); } } No newline at end of file 15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/Sem_150603_ReferencingRecordOfAndSetElements_004.ttcn 0 → 100644 +36 −0 Original line number Diff line number Diff line /***************************************************************** ** @author STF 409 ** @version $Rev: 150 $ ** @purpose 1:15.6.3, Ensure that assignment to a anyvalue in the context of record of is handled correctly when the first element is changed. ** @verdict pass accept, ttcn3verdict:pass *****************************************************************/ module Sem_150603_ReferencingRecordOfAndSetElements_004 { type component GeneralComp { } type record of integer RoI; testcase TC_Sem_150603_ReferencingRecordOfAndSetElements_004() runs on GeneralComp { var template RoI m_one; m_one := ?; m_one[0] := 2; // assignment should yield {2,*} if (match("2",m_one[0]) and match("*",m_one[1]) ) { setverdict(pass); } else { setverdict(fail); } } control{ execute(TC_Sem_150603_ReferencingRecordOfAndSetElements_004()); } } No newline at end of file Loading
15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/Sem_150603_ReferencingRecordOfAndSetElements_001.ttcn 0 → 100644 +35 −0 Original line number Diff line number Diff line /***************************************************************** ** @author STF 409 ** @version $Rev: 150 $ ** @purpose 1:15.6.3, Ensure that assignment of an anyvalue on the right hand side yields an anyvalue in the context of record of. ** @verdict pass accept, ttcn3verdict:pass *****************************************************************/ module Sem_150603_ReferencingRecordOfAndSetElements_001 { type component GeneralComp { } type record of integer RoI; testcase TC_Sem_150603_ReferencingRecordOfAndSetElements_001() runs on GeneralComp { var template RoI m_one; var template RoI m_two; m_one := {0,?,2}; m_two := {0,1,2}; m_two[1] := m_one[1]; if (match("?",m_two[1])) { setverdict(pass); } else { setverdict(fail); } } control{ execute(TC_Sem_150603_ReferencingRecordOfAndSetElements_001()); } } No newline at end of file
15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/Sem_150603_ReferencingRecordOfAndSetElements_002.ttcn 0 → 100644 +38 −0 Original line number Diff line number Diff line /***************************************************************** ** @author STF 409 ** @version $Rev: 150 $ ** @purpose 1:15.6.3, Ensure that assignment to a anyvalue in the context of record of is handled correctly. ** @verdict pass accept, ttcn3verdict:pass *****************************************************************/ module Sem_150603_ReferencingRecordOfAndSetElements_002 { type component GeneralComp { } type record of integer RoI; testcase TC_Sem_150603_ReferencingRecordOfAndSetElements_002() runs on GeneralComp { var template RoI m_one; m_one := ?; m_one[2] := 2; // assignment should yield {?,?,2,*} if (match("?",m_one[0]) and match("?",m_one[1]) and match(2,m_one[2]) and match("*",m_one[3]) ) { setverdict(pass); } else { setverdict(fail); } } control{ execute(TC_Sem_150603_ReferencingRecordOfAndSetElements_002()); } } No newline at end of file
15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/Sem_150603_ReferencingRecordOfAndSetElements_003.ttcn 0 → 100644 +42 −0 Original line number Diff line number Diff line /***************************************************************** ** @author STF 409 ** @version $Rev: 150 $ ** @purpose 1:15.6.3, Ensure that assignment to a anyvalue in the context of record of is handled correctly in two subsequent assignments. ** @verdict pass accept, ttcn3verdict:pass *****************************************************************/ module Sem_150603_ReferencingRecordOfAndSetElements_003 { type component GeneralComp { } type record of integer RoI; testcase TC_Sem_150603_ReferencingRecordOfAndSetElements_003() runs on GeneralComp { var template RoI m_one; m_one := ?; m_one[2] := 2; // assignment should yield {?,?,2,*} m_one[4] := 3; // assignment should yield {?,?,2,?,3,*} if (match("?",m_one[0]) and match("?",m_one[1]) and match(2,m_one[2]) and match("?",m_one[3]) and match(3,m_one[4]) and match("*",m_one[5]) ) { setverdict(pass); } else { setverdict(fail); } } control{ execute(TC_Sem_150603_ReferencingRecordOfAndSetElements_003()); } } No newline at end of file
15_templates/1506_referencing_elements_of_templates_or_template_fields/150603_referencing_record_of_and_set_elements/Sem_150603_ReferencingRecordOfAndSetElements_004.ttcn 0 → 100644 +36 −0 Original line number Diff line number Diff line /***************************************************************** ** @author STF 409 ** @version $Rev: 150 $ ** @purpose 1:15.6.3, Ensure that assignment to a anyvalue in the context of record of is handled correctly when the first element is changed. ** @verdict pass accept, ttcn3verdict:pass *****************************************************************/ module Sem_150603_ReferencingRecordOfAndSetElements_004 { type component GeneralComp { } type record of integer RoI; testcase TC_Sem_150603_ReferencingRecordOfAndSetElements_004() runs on GeneralComp { var template RoI m_one; m_one := ?; m_one[0] := 2; // assignment should yield {2,*} if (match("2",m_one[0]) and match("*",m_one[1]) ) { setverdict(pass); } else { setverdict(fail); } } control{ execute(TC_Sem_150603_ReferencingRecordOfAndSetElements_004()); } } No newline at end of file