Loading ATS/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_003.ttcn 0 → 100644 +35 −0 Original line number Diff line number Diff line /***************************************************************** ** @author STF 487 ** @version 0.0.1 ** @purpose 1:22.3.1, null component in the to clause of the call operation ** @verdict pass reject *****************************************************************/ // The following requirements are tested: // No AddressRef shall contain the special value null at the time of the operation. module NegSem_220301_CallOperation_003 { signature S(); type port P procedure { inout S; } type component GeneralComp { port P p; } testcase TC_NegSem_220301_CallOperation_003() runs on GeneralComp system GeneralComp { var GeneralComp v_ptc := GeneralComp.create("PTC"), v_compRef := null; connect(self:p, v_ptc:p); p.call(S:{}, nowait) to v_compRef; setverdict(pass); } control{ execute(TC_NegSem_220301_CallOperation_003(), 5.0); } } No newline at end of file ATS/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_004.ttcn 0 → 100644 +35 −0 Original line number Diff line number Diff line /***************************************************************** ** @author STF 487 ** @version 0.0.1 ** @purpose 1:22.3.1, null component in the multicast list of the to clause of the call operation ** @verdict pass reject *****************************************************************/ // The following requirements are tested: // No AddressRef shall contain the special value null at the time of the operation. module NegSem_220301_CallOperation_004 { signature S(); type port P procedure { inout S; } type component GeneralComp { port P p; } testcase TC_NegSem_220301_CallOperation_004() runs on GeneralComp system GeneralComp { var GeneralComp v_ptc := GeneralComp.create("PTC"), v_compRef := null; connect(self:p, v_ptc:p); p.call(S:{}, nowait) to (v_ptc, v_compRef); setverdict(pass); } control{ execute(TC_NegSem_220301_CallOperation_004(), 5.0); } } No newline at end of file ATS/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_009.ttcn 0 → 100644 +45 −0 Original line number Diff line number Diff line /***************************************************************** ** @author STF 487 ** @version 0.0.1 ** @purpose 1:22.3.2, null component in the from clause of the getcall operation ** @verdict pass reject *****************************************************************/ // The following requirements are tested: // No AddressRef shall contain the special value null at the time of the operation. module NegSem_220302_getcall_operation_009 { signature S(); type port P procedure { inout S; } type component GeneralComp { port P p; } function f() runs on GeneralComp { var GeneralComp v_compRef := null; alt { [] p.getcall(S:{}) from v_compRef {} // error expected [] p.getcall(S:{}) {} } } testcase TC_NegSem_220302_getcall_operation_009() runs on GeneralComp system GeneralComp { var GeneralComp v_ptc := GeneralComp.create; connect(self:p, v_ptc:p); p.call(S:{}, nowait); v_ptc.start(f()); v_ptc.done; setverdict(pass); } control { execute(TC_NegSem_220302_getcall_operation_009(), 5.0); } } No newline at end of file ATS/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_010.ttcn 0 → 100644 +44 −0 Original line number Diff line number Diff line /***************************************************************** ** @author STF 487 ** @version 0.0.1 ** @purpose 1:22.3.2, null component in the multicast list of the from clause of the getcall operation ** @verdict pass reject *****************************************************************/ // The following requirements are tested: // No AddressRef shall contain the special value null at the time of the operation. module NegSem_220302_getcall_operation_010 { signature S(); type port P procedure { inout S; } type component GeneralComp { port P p; } function f() runs on GeneralComp { var GeneralComp v_compRef := null; alt { [] p.getcall(S:{}) from (mtc, v_compRef) {} // error expected } } testcase TC_NegSem_220302_getcall_operation_010() runs on GeneralComp system GeneralComp { var GeneralComp v_ptc := GeneralComp.create; connect(self:p, v_ptc:p); p.call(S:{}, nowait); v_ptc.start(f()); v_ptc.done; setverdict(pass); } control { execute(TC_NegSem_220302_getcall_operation_010(), 5.0); } } No newline at end of file ATS/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_011.ttcn 0 → 100644 +51 −0 Original line number Diff line number Diff line /***************************************************************** ** @author STF 487 ** @version 0.0.1 ** @purpose 1:22.3.2, applying @decoded to a forbidden field ** @verdict pass reject *****************************************************************/ // The following requirements are tested: // When assigning individual fields of a message, encoded payload fields can be // decoded prior to assignment using the @decoded modifier. In this case, the // referenced field on the right hand sided of the assignment shall be one of the // bitstring, hexstring, octetstring, charstring or universal charstring types. It // shall be decoded into a value of the same type as the variable on the left hand // side of the assignment. module NegSem_220302_getcall_operation_011 { type record of integer RoI (0..255); signature S(RoI p_par); type port P procedure { inout S; } type component GeneralComp { port P p; } function f_server() runs on GeneralComp { var integer v_res with { encode "32bit" }; alt { [] p.getcall(S:?) -> param (v_res := @decoded p_par) { setverdict (pass); } [] p.getcall { setverdict(fail); } } } testcase TC_NegSem_220302_getcall_operation_011() runs on GeneralComp system GeneralComp { var GeneralComp v_ptc := GeneralComp.create("PTC"); connect(self:p, v_ptc:p); v_ptc.start(f_server()); p.call(S:{ p_par := { 0, 0, 0, 0 } }, nowait); v_ptc.done; setverdict(pass); } control { execute(TC_NegSem_220302_getcall_operation_011(), 5.0); } } No newline at end of file Loading
ATS/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_003.ttcn 0 → 100644 +35 −0 Original line number Diff line number Diff line /***************************************************************** ** @author STF 487 ** @version 0.0.1 ** @purpose 1:22.3.1, null component in the to clause of the call operation ** @verdict pass reject *****************************************************************/ // The following requirements are tested: // No AddressRef shall contain the special value null at the time of the operation. module NegSem_220301_CallOperation_003 { signature S(); type port P procedure { inout S; } type component GeneralComp { port P p; } testcase TC_NegSem_220301_CallOperation_003() runs on GeneralComp system GeneralComp { var GeneralComp v_ptc := GeneralComp.create("PTC"), v_compRef := null; connect(self:p, v_ptc:p); p.call(S:{}, nowait) to v_compRef; setverdict(pass); } control{ execute(TC_NegSem_220301_CallOperation_003(), 5.0); } } No newline at end of file
ATS/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_004.ttcn 0 → 100644 +35 −0 Original line number Diff line number Diff line /***************************************************************** ** @author STF 487 ** @version 0.0.1 ** @purpose 1:22.3.1, null component in the multicast list of the to clause of the call operation ** @verdict pass reject *****************************************************************/ // The following requirements are tested: // No AddressRef shall contain the special value null at the time of the operation. module NegSem_220301_CallOperation_004 { signature S(); type port P procedure { inout S; } type component GeneralComp { port P p; } testcase TC_NegSem_220301_CallOperation_004() runs on GeneralComp system GeneralComp { var GeneralComp v_ptc := GeneralComp.create("PTC"), v_compRef := null; connect(self:p, v_ptc:p); p.call(S:{}, nowait) to (v_ptc, v_compRef); setverdict(pass); } control{ execute(TC_NegSem_220301_CallOperation_004(), 5.0); } } No newline at end of file
ATS/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_009.ttcn 0 → 100644 +45 −0 Original line number Diff line number Diff line /***************************************************************** ** @author STF 487 ** @version 0.0.1 ** @purpose 1:22.3.2, null component in the from clause of the getcall operation ** @verdict pass reject *****************************************************************/ // The following requirements are tested: // No AddressRef shall contain the special value null at the time of the operation. module NegSem_220302_getcall_operation_009 { signature S(); type port P procedure { inout S; } type component GeneralComp { port P p; } function f() runs on GeneralComp { var GeneralComp v_compRef := null; alt { [] p.getcall(S:{}) from v_compRef {} // error expected [] p.getcall(S:{}) {} } } testcase TC_NegSem_220302_getcall_operation_009() runs on GeneralComp system GeneralComp { var GeneralComp v_ptc := GeneralComp.create; connect(self:p, v_ptc:p); p.call(S:{}, nowait); v_ptc.start(f()); v_ptc.done; setverdict(pass); } control { execute(TC_NegSem_220302_getcall_operation_009(), 5.0); } } No newline at end of file
ATS/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_010.ttcn 0 → 100644 +44 −0 Original line number Diff line number Diff line /***************************************************************** ** @author STF 487 ** @version 0.0.1 ** @purpose 1:22.3.2, null component in the multicast list of the from clause of the getcall operation ** @verdict pass reject *****************************************************************/ // The following requirements are tested: // No AddressRef shall contain the special value null at the time of the operation. module NegSem_220302_getcall_operation_010 { signature S(); type port P procedure { inout S; } type component GeneralComp { port P p; } function f() runs on GeneralComp { var GeneralComp v_compRef := null; alt { [] p.getcall(S:{}) from (mtc, v_compRef) {} // error expected } } testcase TC_NegSem_220302_getcall_operation_010() runs on GeneralComp system GeneralComp { var GeneralComp v_ptc := GeneralComp.create; connect(self:p, v_ptc:p); p.call(S:{}, nowait); v_ptc.start(f()); v_ptc.done; setverdict(pass); } control { execute(TC_NegSem_220302_getcall_operation_010(), 5.0); } } No newline at end of file
ATS/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_getcall_operation_011.ttcn 0 → 100644 +51 −0 Original line number Diff line number Diff line /***************************************************************** ** @author STF 487 ** @version 0.0.1 ** @purpose 1:22.3.2, applying @decoded to a forbidden field ** @verdict pass reject *****************************************************************/ // The following requirements are tested: // When assigning individual fields of a message, encoded payload fields can be // decoded prior to assignment using the @decoded modifier. In this case, the // referenced field on the right hand sided of the assignment shall be one of the // bitstring, hexstring, octetstring, charstring or universal charstring types. It // shall be decoded into a value of the same type as the variable on the left hand // side of the assignment. module NegSem_220302_getcall_operation_011 { type record of integer RoI (0..255); signature S(RoI p_par); type port P procedure { inout S; } type component GeneralComp { port P p; } function f_server() runs on GeneralComp { var integer v_res with { encode "32bit" }; alt { [] p.getcall(S:?) -> param (v_res := @decoded p_par) { setverdict (pass); } [] p.getcall { setverdict(fail); } } } testcase TC_NegSem_220302_getcall_operation_011() runs on GeneralComp system GeneralComp { var GeneralComp v_ptc := GeneralComp.create("PTC"); connect(self:p, v_ptc:p); v_ptc.start(f_server()); p.call(S:{ p_par := { 0, 0, 0, 0 } }, nowait); v_ptc.done; setverdict(pass); } control { execute(TC_NegSem_220302_getcall_operation_011(), 5.0); } } No newline at end of file