Loading B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010203_any_value/Sem_B010203_any_value_001.ttcn +3 −3 Original line number Diff line number Diff line Loading @@ -45,14 +45,14 @@ testcase TC_Sem_B010203_any_value_001() runs on GeneralComp { var MessageType v_testMessage; template MessageType mw_matchingTemplate:= { //todo for negative cases: omit values in sending { field1 := ?, field2 := ?, field3 := ?, field4 := ?, field5 := ?, field4 := {a:=1,b:=?,c:=true}, field5 := {a:=?} field6 := {a:=1,b:=?,c:=true}, field7 := {a:=?} } v_testMessage:= { Loading B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010203_any_value/Sem_B010203_any_value_002.ttcn 0 → 100644 +85 −0 Original line number Diff line number Diff line /*************************************************** ** @author STF 409 ** @version $Rev: 150 $ ** @purpose 1:B.1, Ensure that the IUT correctly handles template matching of ? values ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ module Sem_B010203_any_value_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, charstring field2, EnumeratedType field3, RecordType field4, UnionType field5, RecordType field6, UnionType field7 } type port loopbackPort message { inout MessageType } type component GeneralComp { port loopbackPort messagePort } testcase TC_Sem_B010203_any_value_002() runs on GeneralComp { var MessageType v_testMessage; template MessageType mw_matchingTemplate:= { field1 := ?, field2 := ?, field3 := ?, field4 := ?, field5 := ?, field6 := {a:=1,b:=?,c:=true}, //omitted value does not match ? field7 := {a:=?} } v_testMessage:= { field1 := 2, field2 := "test string", field3 := e_black, field4 := {a:=1,b:=omit,c:=true}, field5 := {a:=1}, field6 := {a:=1,b:=omit,c:=true}, field7 := {a:=1} } messagePort.send(v_testMessage); alt { [] messagePort.receive(mw_matchingTemplate) { setverdict(fail); } [] messagePort.receive { setverdict(pass); } } } control{ execute(TC_Sem_B010203_any_value_002()); } } No newline at end of file B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/NegSem_B010204_any_value_or_none_001.ttcn 0 → 100644 +74 −0 Original line number Diff line number Diff line /*************************************************** ** @author STF 409 ** @version $Rev: 150 $ ** @purpose 1:B.1, Ensure that the IUT correctly handles template matching of * values ** @verdict pass reject ***************************************************/ module NegSem_B010204_any_value_or_none_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, charstring field2, EnumeratedType field3, RecordType field4, UnionType field5, RecordType field6 } type port loopbackPort message { inout MessageType } type component GeneralComp { port loopbackPort messagePort } testcase TC_NegSem_B010204_any_value_or_none_001() runs on GeneralComp { var MessageType v_testMessage; template MessageType mw_matchingTemplate:= { field1 := *, // * is used on non-optional fields field2 := *, field3 := *, field4 := *, field5 := *, field6 := {a:=1,b:=*,c:=true} } v_testMessage:= { field1 := 2, field2 := "test string", field3 := e_black, field4 := {a:=1,b:=omit,c:=true}, field5 := {a:=1}, field6 := {a:=1,b:=omit,c:=true} } messagePort.send(v_testMessage); } control{ execute(TC_NegSem_B010204_any_value_or_none_001()); } } No newline at end of file B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/NegSem_B010204_any_value_or_none_002.ttcn 0 → 100644 +77 −0 Original line number Diff line number Diff line /*************************************************** ** @author STF 409 ** @version $Rev: 150 $ ** @purpose 1:B.1, Ensure that the IUT correctly handles template matching of * values ** @verdict pass reject ***************************************************/ module NegSem_B010204_any_value_or_none_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, EnumeratedType field3 optional, RecordType field4 optional, UnionType field5 optional, RecordType field6, UnionType field7 } type port loopbackPort message { inout MessageType } type component GeneralComp { port loopbackPort messagePort } testcase TC_NegSem_B010204_any_value_or_none_002() runs on GeneralComp { var MessageType v_testMessage; template MessageType mw_matchingTemplate:= { field1 := *, field2 := *, field3 := *, field4 := *, field5 := *, field6 := {a:=1,b:=*,c:=true}, field7 := {a:=*} //use of * on a union element } v_testMessage:= { field1 := 2, field2 := "test string", field3 := e_black, field4 := {a:=1,b:=omit,c:=true}, field5 := {a:=1}, field6 := {a:=1,b:=omit,c:=true}, field7 := {a:=1} } messagePort.send(v_testMessage); } control{ execute(TC_NegSem_B010204_any_value_or_none_002()); } } No newline at end of file B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/Sem_B010204_any_value_or_none_001.ttcn +9 −12 Original line number Diff line number Diff line Loading @@ -22,13 +22,12 @@ module Sem_B010204_any_value_or_none_001 { } type record MessageType { integer field1, charstring field2, EnumeratedType field3, RecordType field4, UnionType field5, RecordType field6, UnionType field7 integer field1 optional, charstring field2 optional, EnumeratedType field3 optional, RecordType field4 optional, UnionType field5 optional, RecordType field6 } type port loopbackPort message { Loading @@ -45,14 +44,13 @@ testcase TC_Sem_B010204_any_value_or_none_001() runs on GeneralComp { var MessageType v_testMessage; template MessageType mw_matchingTemplate:= { //todo for negative cases: use of * on non-optional fields { field1 := *, field2 := *, field3 := *, field4 := *, field5 := *, field4 := {a:=1,b:=*,c:=true}, field5 := {a:=*} field6 := {a:=1,b:=*,c:=true} } v_testMessage:= { Loading @@ -61,8 +59,7 @@ testcase TC_Sem_B010204_any_value_or_none_001() runs on GeneralComp { field3 := e_black, field4 := {a:=1,b:=omit,c:=true}, field5 := {a:=1}, field6 := {a:=1,b:=omit,c:=true}, field7 := {a:=1} field6 := {a:=1,b:=omit,c:=true} } messagePort.send(v_testMessage); Loading Loading
B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010203_any_value/Sem_B010203_any_value_001.ttcn +3 −3 Original line number Diff line number Diff line Loading @@ -45,14 +45,14 @@ testcase TC_Sem_B010203_any_value_001() runs on GeneralComp { var MessageType v_testMessage; template MessageType mw_matchingTemplate:= { //todo for negative cases: omit values in sending { field1 := ?, field2 := ?, field3 := ?, field4 := ?, field5 := ?, field4 := {a:=1,b:=?,c:=true}, field5 := {a:=?} field6 := {a:=1,b:=?,c:=true}, field7 := {a:=?} } v_testMessage:= { Loading
B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010203_any_value/Sem_B010203_any_value_002.ttcn 0 → 100644 +85 −0 Original line number Diff line number Diff line /*************************************************** ** @author STF 409 ** @version $Rev: 150 $ ** @purpose 1:B.1, Ensure that the IUT correctly handles template matching of ? values ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ module Sem_B010203_any_value_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, charstring field2, EnumeratedType field3, RecordType field4, UnionType field5, RecordType field6, UnionType field7 } type port loopbackPort message { inout MessageType } type component GeneralComp { port loopbackPort messagePort } testcase TC_Sem_B010203_any_value_002() runs on GeneralComp { var MessageType v_testMessage; template MessageType mw_matchingTemplate:= { field1 := ?, field2 := ?, field3 := ?, field4 := ?, field5 := ?, field6 := {a:=1,b:=?,c:=true}, //omitted value does not match ? field7 := {a:=?} } v_testMessage:= { field1 := 2, field2 := "test string", field3 := e_black, field4 := {a:=1,b:=omit,c:=true}, field5 := {a:=1}, field6 := {a:=1,b:=omit,c:=true}, field7 := {a:=1} } messagePort.send(v_testMessage); alt { [] messagePort.receive(mw_matchingTemplate) { setverdict(fail); } [] messagePort.receive { setverdict(pass); } } } control{ execute(TC_Sem_B010203_any_value_002()); } } No newline at end of file
B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/NegSem_B010204_any_value_or_none_001.ttcn 0 → 100644 +74 −0 Original line number Diff line number Diff line /*************************************************** ** @author STF 409 ** @version $Rev: 150 $ ** @purpose 1:B.1, Ensure that the IUT correctly handles template matching of * values ** @verdict pass reject ***************************************************/ module NegSem_B010204_any_value_or_none_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, charstring field2, EnumeratedType field3, RecordType field4, UnionType field5, RecordType field6 } type port loopbackPort message { inout MessageType } type component GeneralComp { port loopbackPort messagePort } testcase TC_NegSem_B010204_any_value_or_none_001() runs on GeneralComp { var MessageType v_testMessage; template MessageType mw_matchingTemplate:= { field1 := *, // * is used on non-optional fields field2 := *, field3 := *, field4 := *, field5 := *, field6 := {a:=1,b:=*,c:=true} } v_testMessage:= { field1 := 2, field2 := "test string", field3 := e_black, field4 := {a:=1,b:=omit,c:=true}, field5 := {a:=1}, field6 := {a:=1,b:=omit,c:=true} } messagePort.send(v_testMessage); } control{ execute(TC_NegSem_B010204_any_value_or_none_001()); } } No newline at end of file
B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/NegSem_B010204_any_value_or_none_002.ttcn 0 → 100644 +77 −0 Original line number Diff line number Diff line /*************************************************** ** @author STF 409 ** @version $Rev: 150 $ ** @purpose 1:B.1, Ensure that the IUT correctly handles template matching of * values ** @verdict pass reject ***************************************************/ module NegSem_B010204_any_value_or_none_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, EnumeratedType field3 optional, RecordType field4 optional, UnionType field5 optional, RecordType field6, UnionType field7 } type port loopbackPort message { inout MessageType } type component GeneralComp { port loopbackPort messagePort } testcase TC_NegSem_B010204_any_value_or_none_002() runs on GeneralComp { var MessageType v_testMessage; template MessageType mw_matchingTemplate:= { field1 := *, field2 := *, field3 := *, field4 := *, field5 := *, field6 := {a:=1,b:=*,c:=true}, field7 := {a:=*} //use of * on a union element } v_testMessage:= { field1 := 2, field2 := "test string", field3 := e_black, field4 := {a:=1,b:=omit,c:=true}, field5 := {a:=1}, field6 := {a:=1,b:=omit,c:=true}, field7 := {a:=1} } messagePort.send(v_testMessage); } control{ execute(TC_NegSem_B010204_any_value_or_none_002()); } } No newline at end of file
B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/Sem_B010204_any_value_or_none_001.ttcn +9 −12 Original line number Diff line number Diff line Loading @@ -22,13 +22,12 @@ module Sem_B010204_any_value_or_none_001 { } type record MessageType { integer field1, charstring field2, EnumeratedType field3, RecordType field4, UnionType field5, RecordType field6, UnionType field7 integer field1 optional, charstring field2 optional, EnumeratedType field3 optional, RecordType field4 optional, UnionType field5 optional, RecordType field6 } type port loopbackPort message { Loading @@ -45,14 +44,13 @@ testcase TC_Sem_B010204_any_value_or_none_001() runs on GeneralComp { var MessageType v_testMessage; template MessageType mw_matchingTemplate:= { //todo for negative cases: use of * on non-optional fields { field1 := *, field2 := *, field3 := *, field4 := *, field5 := *, field4 := {a:=1,b:=*,c:=true}, field5 := {a:=*} field6 := {a:=1,b:=*,c:=true} } v_testMessage:= { Loading @@ -61,8 +59,7 @@ testcase TC_Sem_B010204_any_value_or_none_001() runs on GeneralComp { field3 := e_black, field4 := {a:=1,b:=omit,c:=true}, field5 := {a:=1}, field6 := {a:=1,b:=omit,c:=true}, field7 := {a:=1} field6 := {a:=1,b:=omit,c:=true} } messagePort.send(v_testMessage); Loading