Loading 08_modules/0803_module_control_part/NegSyn_0803_ModuleControlPart_001.ttcn 0 → 100644 +14 −0 Original line number Diff line number Diff line /***************************************************************** ** @author STF 409 ** @version $Rev: 61 $ ** @purpose 1:8.3, Ensure that the control part is not empty (not strictly allowed by the BNF). ** @verdict pass reject *****************************************************************/ module Syn_0803_ModuleControlPart_001 { control { } } No newline at end of file 08_modules/0803_module_control_part/NegSyn_0803_ModuleControlPart_002.ttcn 0 → 100644 +18 −0 Original line number Diff line number Diff line /***************************************************************** ** @author STF 409 ** @version $Rev: 61 $ ** @purpose 1:8.3, Ensure that there is not more than one control part. ** @verdict pass reject *****************************************************************/ module Syn_0803_ModuleControlPart_002 { control { var integer count := 0; } control { var integer count := 0; } } No newline at end of file 08_modules/0803_module_control_part/Sem_0803_ModuleControlPart_001.ttcn 0 → 100644 +31 −0 Original line number Diff line number Diff line /***************************************************************** ** @author STF 409 ** @version $Rev: 61 $ ** @purpose 1:8.3, Ensure that the verdict returned from a test case to the control-part is in fact the verdict of the component. The result of the last test case execution corresponds to the overall test verdict. ** @verdict pass ttcn3verdict:pass *****************************************************************/ module Sem_0803_ModuleControlPart_001 { type component GeneralComp {} testcase Syn_0803_ModuleControlPart_001() runs on GeneralComp { setverdict(pass); } testcase Syn_0803_ModuleControlPart_001_second(verdicttype p_passthroughVerdict) runs on GeneralComp { if (p_passthroughVerdict == getverdict) { setverdict(pass); } else { setverdict(fail); } } control { var verdicttype v_myverdict; v_myverdict := execute(Syn_0803_ModuleControlPart_001()); execute(Syn_0803_ModuleControlPart_001_second(v_myverdict)); } } No newline at end of file 08_modules/0803_module_control_part/Syn_0803_ModuleControlPart_001.ttcn 0 → 100644 +20 −0 Original line number Diff line number Diff line /***************************************************************** ** @author STF 409 ** @version $Rev: 61 $ ** @purpose 1:8.3, Ensure that the module control is able to accept execute statements. ** @verdict pass accept, noexecution *****************************************************************/ module Syn_0803_ModuleControlPart_001 { type component GeneralComp {} testcase Syn_0803_ModuleControlPart_001() runs on GeneralComp { setverdict(pass); } control { execute(Syn_0803_ModuleControlPart_001()); } } No newline at end of file 08_modules/0803_module_control_part/Syn_0803_ModuleControlPart_002.ttcn 0 → 100644 +34 −0 Original line number Diff line number Diff line /***************************************************************** ** @author STF 409 ** @version $Rev: 61 $ ** @purpose 1:8.3, Ensure that the module control part with a few commonly used stateents is accepted. ** @verdict pass accept, noexecution *****************************************************************/ module Syn_0803_ModuleControlPart_001 { type component GeneralComp {} type record MyRecordType { integer field1, charstring field2 } testcase Syn_0803_ModuleControlPart_001() runs on GeneralComp { setverdict(pass); } control { var integer v_i := 1; const charstring v_hello := "Hello World"; timer t_mytimer; t_mytimer.start; if (v_i == 1) { execute(Syn_0803_ModuleControlPart_001()); } else { log("something went wrong"); } t_mytimer.stop; } } No newline at end of file Loading
08_modules/0803_module_control_part/NegSyn_0803_ModuleControlPart_001.ttcn 0 → 100644 +14 −0 Original line number Diff line number Diff line /***************************************************************** ** @author STF 409 ** @version $Rev: 61 $ ** @purpose 1:8.3, Ensure that the control part is not empty (not strictly allowed by the BNF). ** @verdict pass reject *****************************************************************/ module Syn_0803_ModuleControlPart_001 { control { } } No newline at end of file
08_modules/0803_module_control_part/NegSyn_0803_ModuleControlPart_002.ttcn 0 → 100644 +18 −0 Original line number Diff line number Diff line /***************************************************************** ** @author STF 409 ** @version $Rev: 61 $ ** @purpose 1:8.3, Ensure that there is not more than one control part. ** @verdict pass reject *****************************************************************/ module Syn_0803_ModuleControlPart_002 { control { var integer count := 0; } control { var integer count := 0; } } No newline at end of file
08_modules/0803_module_control_part/Sem_0803_ModuleControlPart_001.ttcn 0 → 100644 +31 −0 Original line number Diff line number Diff line /***************************************************************** ** @author STF 409 ** @version $Rev: 61 $ ** @purpose 1:8.3, Ensure that the verdict returned from a test case to the control-part is in fact the verdict of the component. The result of the last test case execution corresponds to the overall test verdict. ** @verdict pass ttcn3verdict:pass *****************************************************************/ module Sem_0803_ModuleControlPart_001 { type component GeneralComp {} testcase Syn_0803_ModuleControlPart_001() runs on GeneralComp { setverdict(pass); } testcase Syn_0803_ModuleControlPart_001_second(verdicttype p_passthroughVerdict) runs on GeneralComp { if (p_passthroughVerdict == getverdict) { setverdict(pass); } else { setverdict(fail); } } control { var verdicttype v_myverdict; v_myverdict := execute(Syn_0803_ModuleControlPart_001()); execute(Syn_0803_ModuleControlPart_001_second(v_myverdict)); } } No newline at end of file
08_modules/0803_module_control_part/Syn_0803_ModuleControlPart_001.ttcn 0 → 100644 +20 −0 Original line number Diff line number Diff line /***************************************************************** ** @author STF 409 ** @version $Rev: 61 $ ** @purpose 1:8.3, Ensure that the module control is able to accept execute statements. ** @verdict pass accept, noexecution *****************************************************************/ module Syn_0803_ModuleControlPart_001 { type component GeneralComp {} testcase Syn_0803_ModuleControlPart_001() runs on GeneralComp { setverdict(pass); } control { execute(Syn_0803_ModuleControlPart_001()); } } No newline at end of file
08_modules/0803_module_control_part/Syn_0803_ModuleControlPart_002.ttcn 0 → 100644 +34 −0 Original line number Diff line number Diff line /***************************************************************** ** @author STF 409 ** @version $Rev: 61 $ ** @purpose 1:8.3, Ensure that the module control part with a few commonly used stateents is accepted. ** @verdict pass accept, noexecution *****************************************************************/ module Syn_0803_ModuleControlPart_001 { type component GeneralComp {} type record MyRecordType { integer field1, charstring field2 } testcase Syn_0803_ModuleControlPart_001() runs on GeneralComp { setverdict(pass); } control { var integer v_i := 1; const charstring v_hello := "Hello World"; timer t_mytimer; t_mytimer.start; if (v_i == 1) { execute(Syn_0803_ModuleControlPart_001()); } else { log("something went wrong"); } t_mytimer.stop; } } No newline at end of file