Loading B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010402_ifPresent_indicator/NegSem_B010402_ifPresent_indicator_001.ttcn 0 → 100644 +67 −0 Original line number Diff line number Diff line /*************************************************** ** @author STF 409 ** @version $Rev$ ** @purpose 1:B.1, Ensure that the IUT correctly handles template matching of ifpresent indicators ** @verdict pass reject ***************************************************/ module NegSem_B010402_ifPresent_indicator_001 { type enumerated EnumeratedType {e_black, e_white, e_green}; type record RecordType { integer a optional, integer b optional, boolean c } type union UnionType { integer a, EnumeratedType b, boolean c } type record MessageType { integer field1 optional, charstring field2 optional, RecordType field3, UnionType field4 optional } type port loopbackPort message { inout MessageType } type component GeneralComp { port loopbackPort messagePort } testcase TC_NegSem_B010402_ifPresent_indicator_001() runs on GeneralComp { var MessageType v_testMessage; template MessageType mw_matchingTemplate:= { field1 := (0..2) ifpresent, field2 := (aaa..fff) ifpresent, field3 := {a:=1,b:=(0..2) ifpresent,c:=true} ifpresent, //use of ifpresent on non-optional field field4 := {a:=(0..2)} ifpresent } v_testMessage:= { field1 := omit, field2 := omit, field3 := {a:=1,b:=omit,c:=true}, field4 := omit } messagePort.send(v_testMessage); } control{ execute(TC_NegSem_B010402_ifPresent_indicator_001()); } } No newline at end of file B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010402_ifPresent_indicator/Sem_B010402_ifPresent_indicator_001.ttcn 0 → 100644 +76 −0 Original line number Diff line number Diff line /*************************************************** ** @author STF 409 ** @version $Rev$ ** @purpose 1:B.1, Ensure that the IUT correctly handles template matching of ifpresent indicators ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ module Sem_B010402_ifPresent_indicator_001 { type enumerated EnumeratedType {e_black, e_white, e_green}; type record RecordType { integer a optional, integer b optional, boolean c } type union UnionType { integer a, EnumeratedType b, boolean c } type record MessageType { integer field1 optional, charstring field2 optional, RecordType field3, UnionType field4 optional } type port loopbackPort message { inout MessageType } type component GeneralComp { port loopbackPort messagePort } testcase TC_Sem_B010402_ifPresent_indicator_001() runs on GeneralComp { var MessageType v_testMessage; template MessageType mw_matchingTemplate:= { field1 := (0..2) ifpresent, field2 := (aaa..fff) ifpresent, field3 := {a:=1,b:=(0..2) ifpresent,c:=true}, field4 := {a:=(0..2)} ifpresent } v_testMessage:= { field1 := omit, field2 := omit, field3 := {a:=1,b:=omit,c:=true}, field4 := omit } messagePort.send(v_testMessage); alt { [] messagePort.receive(mw_matchingTemplate) { setverdict(pass); } [] messagePort.receive { setverdict(fail); } } } control{ execute(TC_Sem_B010402_ifPresent_indicator_001()); } } No newline at end of file B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010402_ifPresent_indicator/Sem_B010402_ifPresent_indicator_002.ttcn 0 → 100644 +76 −0 Original line number Diff line number Diff line /*************************************************** ** @author STF 409 ** @version $Rev$ ** @purpose 1:B.1, Ensure that the IUT correctly handles template matching of ifpresent indicators ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ module Sem_B010402_ifPresent_indicator_002 { type enumerated EnumeratedType {e_black, e_white, e_green}; type record RecordType { integer a optional, integer b optional, boolean c } type union UnionType { integer a, EnumeratedType b, boolean c } type record MessageType { integer field1 optional, charstring field2 optional, RecordType field3, UnionType field4 optional } type port loopbackPort message { inout MessageType } type component GeneralComp { port loopbackPort messagePort } testcase TC_Sem_B010402_ifPresent_indicator_002() runs on GeneralComp { var MessageType v_testMessage; template MessageType mw_matchingTemplate:= { field1 := (0..2) ifpresent, field2 := (aaa..fff) ifpresent, field3 := {a:=1,b:=(0..2) ifpresent,c:=true}, //element b is present and out of range field4 := {a:=(0..2)} ifpresent } v_testMessage:= { field1 := omit, field2 := omit, field3 := {a:=1,b:=3,c:=true}, field4 := omit } messagePort.send(v_testMessage); alt { [] messagePort.receive(mw_matchingTemplate) { setverdict(fail); } [] messagePort.receive { setverdict(pass); } } } control{ execute(TC_Sem_B010402_ifPresent_indicator_002()); } } No newline at end of file B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010501_set_expression/NegSem_B010501_set_expression_001.ttcn 0 → 100644 +46 −0 Original line number Diff line number Diff line /*************************************************** ** @author STF 409 ** @version $Rev$ ** @purpose 1:B.1, Ensure that the IUT correctly handles template matching of character pattern set expressions ** @verdict pass reject ***************************************************/ module Sem_B010501_set_expression_001 { type record MessageType { charstring field1 } type port loopbackPort message { inout MessageType } type component GeneralComp { port loopbackPort messagePort } testcase TC_Sem_B010501_set_expression_001() runs on GeneralComp { var MessageType v_testMessage; template MessageType mw_matchingTemplate:= { field1 := pattern "te[p[q-t]x]t" //embedded set is not allowed } v_testMessage:= { field1 := "test" } messagePort.send(v_testMessage); } control{ execute(TC_Sem_B010501_set_expression_001()); } } No newline at end of file B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010501_set_expression/Sem_B010501_set_expression_001.ttcn 0 → 100644 +60 −0 Original line number Diff line number Diff line /*************************************************** ** @author STF 409 ** @version $Rev$ ** @purpose 1:B.1, Ensure that the IUT correctly handles template matching of character pattern set expressions ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ module Sem_B010501_set_expression_001 { type record MessageType { charstring field1, charstring field2, charstring field3 } type port loopbackPort message { inout MessageType } type component GeneralComp { port loopbackPort messagePort } testcase TC_Sem_B010501_set_expression_001() runs on GeneralComp { var MessageType v_testMessage; template MessageType mw_matchingTemplate:= { field1 := pattern "te[pqrs]t[0-9]", field2 := pattern "test[^a-z]", field3 := pattern "[A-Z]est" } v_testMessage:= { field1 := "test1", field2 := "test1", field3 := "Test" } messagePort.send(v_testMessage); alt { [] messagePort.receive(mw_matchingTemplate) { setverdict(pass); } [] messagePort.receive { setverdict(fail); } } } control{ execute(TC_Sem_B010501_set_expression_001()); } } No newline at end of file Loading
B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010402_ifPresent_indicator/NegSem_B010402_ifPresent_indicator_001.ttcn 0 → 100644 +67 −0 Original line number Diff line number Diff line /*************************************************** ** @author STF 409 ** @version $Rev$ ** @purpose 1:B.1, Ensure that the IUT correctly handles template matching of ifpresent indicators ** @verdict pass reject ***************************************************/ module NegSem_B010402_ifPresent_indicator_001 { type enumerated EnumeratedType {e_black, e_white, e_green}; type record RecordType { integer a optional, integer b optional, boolean c } type union UnionType { integer a, EnumeratedType b, boolean c } type record MessageType { integer field1 optional, charstring field2 optional, RecordType field3, UnionType field4 optional } type port loopbackPort message { inout MessageType } type component GeneralComp { port loopbackPort messagePort } testcase TC_NegSem_B010402_ifPresent_indicator_001() runs on GeneralComp { var MessageType v_testMessage; template MessageType mw_matchingTemplate:= { field1 := (0..2) ifpresent, field2 := (aaa..fff) ifpresent, field3 := {a:=1,b:=(0..2) ifpresent,c:=true} ifpresent, //use of ifpresent on non-optional field field4 := {a:=(0..2)} ifpresent } v_testMessage:= { field1 := omit, field2 := omit, field3 := {a:=1,b:=omit,c:=true}, field4 := omit } messagePort.send(v_testMessage); } control{ execute(TC_NegSem_B010402_ifPresent_indicator_001()); } } No newline at end of file
B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010402_ifPresent_indicator/Sem_B010402_ifPresent_indicator_001.ttcn 0 → 100644 +76 −0 Original line number Diff line number Diff line /*************************************************** ** @author STF 409 ** @version $Rev$ ** @purpose 1:B.1, Ensure that the IUT correctly handles template matching of ifpresent indicators ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ module Sem_B010402_ifPresent_indicator_001 { type enumerated EnumeratedType {e_black, e_white, e_green}; type record RecordType { integer a optional, integer b optional, boolean c } type union UnionType { integer a, EnumeratedType b, boolean c } type record MessageType { integer field1 optional, charstring field2 optional, RecordType field3, UnionType field4 optional } type port loopbackPort message { inout MessageType } type component GeneralComp { port loopbackPort messagePort } testcase TC_Sem_B010402_ifPresent_indicator_001() runs on GeneralComp { var MessageType v_testMessage; template MessageType mw_matchingTemplate:= { field1 := (0..2) ifpresent, field2 := (aaa..fff) ifpresent, field3 := {a:=1,b:=(0..2) ifpresent,c:=true}, field4 := {a:=(0..2)} ifpresent } v_testMessage:= { field1 := omit, field2 := omit, field3 := {a:=1,b:=omit,c:=true}, field4 := omit } messagePort.send(v_testMessage); alt { [] messagePort.receive(mw_matchingTemplate) { setverdict(pass); } [] messagePort.receive { setverdict(fail); } } } control{ execute(TC_Sem_B010402_ifPresent_indicator_001()); } } No newline at end of file
B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010402_ifPresent_indicator/Sem_B010402_ifPresent_indicator_002.ttcn 0 → 100644 +76 −0 Original line number Diff line number Diff line /*************************************************** ** @author STF 409 ** @version $Rev$ ** @purpose 1:B.1, Ensure that the IUT correctly handles template matching of ifpresent indicators ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ module Sem_B010402_ifPresent_indicator_002 { type enumerated EnumeratedType {e_black, e_white, e_green}; type record RecordType { integer a optional, integer b optional, boolean c } type union UnionType { integer a, EnumeratedType b, boolean c } type record MessageType { integer field1 optional, charstring field2 optional, RecordType field3, UnionType field4 optional } type port loopbackPort message { inout MessageType } type component GeneralComp { port loopbackPort messagePort } testcase TC_Sem_B010402_ifPresent_indicator_002() runs on GeneralComp { var MessageType v_testMessage; template MessageType mw_matchingTemplate:= { field1 := (0..2) ifpresent, field2 := (aaa..fff) ifpresent, field3 := {a:=1,b:=(0..2) ifpresent,c:=true}, //element b is present and out of range field4 := {a:=(0..2)} ifpresent } v_testMessage:= { field1 := omit, field2 := omit, field3 := {a:=1,b:=3,c:=true}, field4 := omit } messagePort.send(v_testMessage); alt { [] messagePort.receive(mw_matchingTemplate) { setverdict(fail); } [] messagePort.receive { setverdict(pass); } } } control{ execute(TC_Sem_B010402_ifPresent_indicator_002()); } } No newline at end of file
B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010501_set_expression/NegSem_B010501_set_expression_001.ttcn 0 → 100644 +46 −0 Original line number Diff line number Diff line /*************************************************** ** @author STF 409 ** @version $Rev$ ** @purpose 1:B.1, Ensure that the IUT correctly handles template matching of character pattern set expressions ** @verdict pass reject ***************************************************/ module Sem_B010501_set_expression_001 { type record MessageType { charstring field1 } type port loopbackPort message { inout MessageType } type component GeneralComp { port loopbackPort messagePort } testcase TC_Sem_B010501_set_expression_001() runs on GeneralComp { var MessageType v_testMessage; template MessageType mw_matchingTemplate:= { field1 := pattern "te[p[q-t]x]t" //embedded set is not allowed } v_testMessage:= { field1 := "test" } messagePort.send(v_testMessage); } control{ execute(TC_Sem_B010501_set_expression_001()); } } No newline at end of file
B_matching_incoming_values/B01_template_matching/B0105_matching_character_pattern/B010501_set_expression/Sem_B010501_set_expression_001.ttcn 0 → 100644 +60 −0 Original line number Diff line number Diff line /*************************************************** ** @author STF 409 ** @version $Rev$ ** @purpose 1:B.1, Ensure that the IUT correctly handles template matching of character pattern set expressions ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ module Sem_B010501_set_expression_001 { type record MessageType { charstring field1, charstring field2, charstring field3 } type port loopbackPort message { inout MessageType } type component GeneralComp { port loopbackPort messagePort } testcase TC_Sem_B010501_set_expression_001() runs on GeneralComp { var MessageType v_testMessage; template MessageType mw_matchingTemplate:= { field1 := pattern "te[pqrs]t[0-9]", field2 := pattern "test[^a-z]", field3 := pattern "[A-Z]est" } v_testMessage:= { field1 := "test1", field2 := "test1", field3 := "Test" } messagePort.send(v_testMessage); alt { [] messagePort.receive(mw_matchingTemplate) { setverdict(pass); } [] messagePort.receive { setverdict(fail); } } } control{ execute(TC_Sem_B010501_set_expression_001()); } } No newline at end of file