Loading ATS/core_language/11_variables/1101_value_variables/Sem_1101_ValueVars_008.ttcn 0 → 100644 +30 −0 Original line number Diff line number Diff line /*************************************************** ** @author TTF 032 ** @version 0.0.1 ** @purpose 1:11.1, Ensure that the value of the assigned expression shall be though compatible with the type of the assignee. ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ module Sem_1101_ValueVars_008 { type component GeneralComp {} type integer positive (0..infinity); testcase TC_Sem_1101_ValueVars_008() runs on GeneralComp { var integer v_i1 := 1; var integer v_i2 := 2; var positive v_p := v_i1 + v_i2; if(v_p == 3){ setverdict(pass); } else{ setverdict(fail); } } control { execute(TC_Sem_1101_ValueVars_008()); } } ATS/core_language/15_templates/1508_template_restrictions/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_028.ttcn 0 → 100644 +38 −0 Original line number Diff line number Diff line /***************************************************************** ** @author TTF 032 ** @version 0.0.1 ** @purpose 1:15.8.2, Ensure that referenced item have implicit template restriction. ** @verdict pass accept, ttcn3verdict:pass *****************************************************************/ /* * Reference element of a 'map' template without restriction. * (see Table 13C: Implicit restrictions) * */ module Sem_150802_ImplicitRestrictions_028{ type component GeneralComp { } type integer SetKeys; type charstring SetValues; type map from SetKeys to SetValues MyMaptype; testcase TC_Sem_150802_ImplicitRestrictions_028() runs on GeneralComp { var template MyMaptype m_map := { [1] := "12345"}; var template (present) charstring v_map := m_map[1]; if (ispresent(v_map)) { setverdict(pass); } else { setverdict(fail); } } control{ execute(TC_Sem_150802_ImplicitRestrictions_028()); } } No newline at end of file ATS/core_language/15_templates/1508_template_restrictions/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_029.ttcn 0 → 100644 +36 −0 Original line number Diff line number Diff line /***************************************************************** ** @author TTF 032 ** @version 0.0.1 ** @purpose 1:15.8.2, Ensure that referenced item have implicit template restriction. ** @verdict pass accept, ttcn3verdict:pass *****************************************************************/ /* * Reference element of a 'parameters of a signature' template without restriction. * (see Table 13C: Implicit restrictions) * */ module Sem_150802_ImplicitRestrictions_029{ type component GeneralComp { } signature MyProcedure (in integer p1); testcase TC_Sem_150802_ImplicitRestrictions_029() runs on GeneralComp { var template MyProcedure m_proc := {p1:=1}; var template (present) MyProcedure v_proc := m_proc; if (ispresent(v_proc)) { setverdict(pass); } else { setverdict(fail); } } control{ execute(TC_Sem_150802_ImplicitRestrictions_029()); } } No newline at end of file Loading
ATS/core_language/11_variables/1101_value_variables/Sem_1101_ValueVars_008.ttcn 0 → 100644 +30 −0 Original line number Diff line number Diff line /*************************************************** ** @author TTF 032 ** @version 0.0.1 ** @purpose 1:11.1, Ensure that the value of the assigned expression shall be though compatible with the type of the assignee. ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ module Sem_1101_ValueVars_008 { type component GeneralComp {} type integer positive (0..infinity); testcase TC_Sem_1101_ValueVars_008() runs on GeneralComp { var integer v_i1 := 1; var integer v_i2 := 2; var positive v_p := v_i1 + v_i2; if(v_p == 3){ setverdict(pass); } else{ setverdict(fail); } } control { execute(TC_Sem_1101_ValueVars_008()); } }
ATS/core_language/15_templates/1508_template_restrictions/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_028.ttcn 0 → 100644 +38 −0 Original line number Diff line number Diff line /***************************************************************** ** @author TTF 032 ** @version 0.0.1 ** @purpose 1:15.8.2, Ensure that referenced item have implicit template restriction. ** @verdict pass accept, ttcn3verdict:pass *****************************************************************/ /* * Reference element of a 'map' template without restriction. * (see Table 13C: Implicit restrictions) * */ module Sem_150802_ImplicitRestrictions_028{ type component GeneralComp { } type integer SetKeys; type charstring SetValues; type map from SetKeys to SetValues MyMaptype; testcase TC_Sem_150802_ImplicitRestrictions_028() runs on GeneralComp { var template MyMaptype m_map := { [1] := "12345"}; var template (present) charstring v_map := m_map[1]; if (ispresent(v_map)) { setverdict(pass); } else { setverdict(fail); } } control{ execute(TC_Sem_150802_ImplicitRestrictions_028()); } } No newline at end of file
ATS/core_language/15_templates/1508_template_restrictions/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_029.ttcn 0 → 100644 +36 −0 Original line number Diff line number Diff line /***************************************************************** ** @author TTF 032 ** @version 0.0.1 ** @purpose 1:15.8.2, Ensure that referenced item have implicit template restriction. ** @verdict pass accept, ttcn3verdict:pass *****************************************************************/ /* * Reference element of a 'parameters of a signature' template without restriction. * (see Table 13C: Implicit restrictions) * */ module Sem_150802_ImplicitRestrictions_029{ type component GeneralComp { } signature MyProcedure (in integer p1); testcase TC_Sem_150802_ImplicitRestrictions_029() runs on GeneralComp { var template MyProcedure m_proc := {p1:=1}; var template (present) MyProcedure v_proc := m_proc; if (ispresent(v_proc)) { setverdict(pass); } else { setverdict(fail); } } control{ execute(TC_Sem_150802_ImplicitRestrictions_029()); } } No newline at end of file