Loading ATS/07_mapping_xsd_components/0701_attributes_of_xsd_component_declarations/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_001/Neg_070104_minoccurs_and_maxoccurs_001.ttcn 0 → 100644 +46 −0 Original line number Diff line number Diff line /*************************************************** ** @author STF 475 ** @version 0.0.1 ** @purpose 9:7.1.4, a list with minOccurs 0 should not be mapped optional in TTCN-3 ** @verdict pass reject ***************************************************/ module Neg_070104_minoccurs_and_maxoccurs_001 { import from schema_Neg_070104_minoccurs_and_maxoccurs_001 language "XSD" all; // foo_list should not be optional template ElemE15b m_msg := {foo_list := omit, bar := 3.0} /** * @desc The timeout given in seconds after which the test case will be stopped. */ modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; type universal charstring Raw; type port P message { inout all; } type component C { port P p; } testcase TC_Neg_070104_minoccurs_and_maxoccurs_001() runs on C system C { map(self:p, system:p); // encode the message p.send(m_msg); log("template should either be rejected by compiler or by runtime latest while encoding"); setverdict(fail, "Invalid template should not be encoded"); unmap(self:p, system:p); } control { execute(TC_Neg_070104_minoccurs_and_maxoccurs_001(), PX_TC_EXECUTION_TIMEOUT); } } ATS/07_mapping_xsd_components/0701_attributes_of_xsd_component_declarations/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_001/Neg_070104_minoccurs_and_maxoccurs_001.xsd 0 → 100644 +13 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="schema:Neg_070104_minoccurs_and_maxoccurs_001" xmlns:ns="schema:Neg_070104_minoccurs_and_maxoccurs_001"> <!-- The unrestricted case: --> <complexType name="e15b"> <sequence> <element name="foo" type="integer" minOccurs="0" maxOccurs="unbounded"/> <element name="bar" type="float"/> </sequence> </complexType> <element name="ElemE15b" type="ns:e15b" /> </schema> No newline at end of file ATS/07_mapping_xsd_components/0701_attributes_of_xsd_component_declarations/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_002/Neg_070104_minoccurs_and_maxoccurs_002.ttcn 0 → 100644 +45 −0 Original line number Diff line number Diff line /*************************************************** ** @author STF 475 ** @version 0.0.1 ** @purpose 9:7.1.4, A restricted length list [5, 10] should not allow less than 5 elements ** @verdict pass reject ***************************************************/ module Neg_070104_minoccurs_and_maxoccurs_002 { import from schema_Neg_070104_minoccurs_and_maxoccurs_002 language "XSD" all; template ElemE15c m_msg := {foo_list := {1, 2, 3, 4}, bar := 3.0} /** * @desc The timeout given in seconds after which the test case will be stopped. */ modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; type universal charstring Raw; type port P message { inout all; } type component C { port P p; } testcase TC_Neg_070104_minoccurs_and_maxoccurs_002() runs on C system C { map(self:p, system:p); // encode the message p.send(m_msg); log("template should either be rejected by compiler or by runtime latest while encoding"); setverdict(fail, "Invalid template should not be encoded"); unmap(self:p, system:p); } control { execute(TC_Neg_070104_minoccurs_and_maxoccurs_002(), PX_TC_EXECUTION_TIMEOUT); } } ATS/07_mapping_xsd_components/0701_attributes_of_xsd_component_declarations/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_002/Neg_070104_minoccurs_and_maxoccurs_002.xsd 0 → 100644 +13 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="schema:Neg_070104_minoccurs_and_maxoccurs_002" xmlns:ns="schema:Neg_070104_minoccurs_and_maxoccurs_002"> <!-- The length restricted case: --> <complexType name="e15c"> <sequence> <element name="foo" type="integer" minOccurs="5" maxOccurs="10"/> <element name="bar" type="float"/> </sequence> </complexType> <element name="ElemE15c" type="ns:e15c" /> </schema> No newline at end of file ATS/07_mapping_xsd_components/0701_attributes_of_xsd_component_declarations/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_003/Neg_070104_minoccurs_and_maxoccurs_003.ttcn 0 → 100644 +45 −0 Original line number Diff line number Diff line /*************************************************** ** @author STF 475 ** @version 0.0.1 ** @purpose 9:7.1.4, A restricted length list [5, 10] should not allow more than 10 elements ** @verdict pass reject ***************************************************/ module Neg_070104_minoccurs_and_maxoccurs_003 { import from schema_Neg_070104_minoccurs_and_maxoccurs_003 language "XSD" all; template ElemE15c m_msg := {foo_list := {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}, bar := 3.0} /** * @desc The timeout given in seconds after which the test case will be stopped. */ modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; type universal charstring Raw; type port P message { inout all; } type component C { port P p; } testcase TC_Neg_070104_minoccurs_and_maxoccurs_003() runs on C system C { map(self:p, system:p); // encode the message p.send(m_msg); log("template should either be rejected by compiler or by runtime latest while encoding"); setverdict(fail, "Invalid template should not be encoded"); unmap(self:p, system:p); } control { execute(TC_Neg_070104_minoccurs_and_maxoccurs_003(), PX_TC_EXECUTION_TIMEOUT); } } Loading
ATS/07_mapping_xsd_components/0701_attributes_of_xsd_component_declarations/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_001/Neg_070104_minoccurs_and_maxoccurs_001.ttcn 0 → 100644 +46 −0 Original line number Diff line number Diff line /*************************************************** ** @author STF 475 ** @version 0.0.1 ** @purpose 9:7.1.4, a list with minOccurs 0 should not be mapped optional in TTCN-3 ** @verdict pass reject ***************************************************/ module Neg_070104_minoccurs_and_maxoccurs_001 { import from schema_Neg_070104_minoccurs_and_maxoccurs_001 language "XSD" all; // foo_list should not be optional template ElemE15b m_msg := {foo_list := omit, bar := 3.0} /** * @desc The timeout given in seconds after which the test case will be stopped. */ modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; type universal charstring Raw; type port P message { inout all; } type component C { port P p; } testcase TC_Neg_070104_minoccurs_and_maxoccurs_001() runs on C system C { map(self:p, system:p); // encode the message p.send(m_msg); log("template should either be rejected by compiler or by runtime latest while encoding"); setverdict(fail, "Invalid template should not be encoded"); unmap(self:p, system:p); } control { execute(TC_Neg_070104_minoccurs_and_maxoccurs_001(), PX_TC_EXECUTION_TIMEOUT); } }
ATS/07_mapping_xsd_components/0701_attributes_of_xsd_component_declarations/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_001/Neg_070104_minoccurs_and_maxoccurs_001.xsd 0 → 100644 +13 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="schema:Neg_070104_minoccurs_and_maxoccurs_001" xmlns:ns="schema:Neg_070104_minoccurs_and_maxoccurs_001"> <!-- The unrestricted case: --> <complexType name="e15b"> <sequence> <element name="foo" type="integer" minOccurs="0" maxOccurs="unbounded"/> <element name="bar" type="float"/> </sequence> </complexType> <element name="ElemE15b" type="ns:e15b" /> </schema> No newline at end of file
ATS/07_mapping_xsd_components/0701_attributes_of_xsd_component_declarations/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_002/Neg_070104_minoccurs_and_maxoccurs_002.ttcn 0 → 100644 +45 −0 Original line number Diff line number Diff line /*************************************************** ** @author STF 475 ** @version 0.0.1 ** @purpose 9:7.1.4, A restricted length list [5, 10] should not allow less than 5 elements ** @verdict pass reject ***************************************************/ module Neg_070104_minoccurs_and_maxoccurs_002 { import from schema_Neg_070104_minoccurs_and_maxoccurs_002 language "XSD" all; template ElemE15c m_msg := {foo_list := {1, 2, 3, 4}, bar := 3.0} /** * @desc The timeout given in seconds after which the test case will be stopped. */ modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; type universal charstring Raw; type port P message { inout all; } type component C { port P p; } testcase TC_Neg_070104_minoccurs_and_maxoccurs_002() runs on C system C { map(self:p, system:p); // encode the message p.send(m_msg); log("template should either be rejected by compiler or by runtime latest while encoding"); setverdict(fail, "Invalid template should not be encoded"); unmap(self:p, system:p); } control { execute(TC_Neg_070104_minoccurs_and_maxoccurs_002(), PX_TC_EXECUTION_TIMEOUT); } }
ATS/07_mapping_xsd_components/0701_attributes_of_xsd_component_declarations/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_002/Neg_070104_minoccurs_and_maxoccurs_002.xsd 0 → 100644 +13 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="schema:Neg_070104_minoccurs_and_maxoccurs_002" xmlns:ns="schema:Neg_070104_minoccurs_and_maxoccurs_002"> <!-- The length restricted case: --> <complexType name="e15c"> <sequence> <element name="foo" type="integer" minOccurs="5" maxOccurs="10"/> <element name="bar" type="float"/> </sequence> </complexType> <element name="ElemE15c" type="ns:e15c" /> </schema> No newline at end of file
ATS/07_mapping_xsd_components/0701_attributes_of_xsd_component_declarations/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_003/Neg_070104_minoccurs_and_maxoccurs_003.ttcn 0 → 100644 +45 −0 Original line number Diff line number Diff line /*************************************************** ** @author STF 475 ** @version 0.0.1 ** @purpose 9:7.1.4, A restricted length list [5, 10] should not allow more than 10 elements ** @verdict pass reject ***************************************************/ module Neg_070104_minoccurs_and_maxoccurs_003 { import from schema_Neg_070104_minoccurs_and_maxoccurs_003 language "XSD" all; template ElemE15c m_msg := {foo_list := {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}, bar := 3.0} /** * @desc The timeout given in seconds after which the test case will be stopped. */ modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; type universal charstring Raw; type port P message { inout all; } type component C { port P p; } testcase TC_Neg_070104_minoccurs_and_maxoccurs_003() runs on C system C { map(self:p, system:p); // encode the message p.send(m_msg); log("template should either be rejected by compiler or by runtime latest while encoding"); setverdict(fail, "Invalid template should not be encoded"); unmap(self:p, system:p); } control { execute(TC_Neg_070104_minoccurs_and_maxoccurs_003(), PX_TC_EXECUTION_TIMEOUT); } }