Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
MTS - Methods for Testing and Specification
TTCN-3_Compiler_Tests
TTCN3_PART9
Commits
78eda58b
Commit
78eda58b
authored
Apr 06, 2017
by
urbant
Browse files
STF 521: New XSD tests (base on ETSI ES 201 873-9 V4.7.1)
parent
ee59ba90
Changes
144
Hide whitespace changes
Inline
Side-by-side
05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_024/Pos_050202_name_conversion_rules_024.ttcn_
0 → 100644
View file @
78eda58b
/***************************************************
** @author STF 521
** @version 0.0.1
** @purpose 9:5.2.2, Conversion of module names
** @verdict pass accept, ttcn3verdict:pass
***************************************************/
// The following requirements are tested:
// Rule a: Target namespace values used in XSD schema documents shall be ordered
// alphabetically, independently from the above components (after conversion they are
// merely used as TTCN-3 module names). The string value of the target namespace values
// shall be used, i.e. without un-escaping or removing trailing “/” SOLIDUS characters
// of the authority part or any other changes to the character string.
// Rule e:
// "_" (LOW LINE) characters occurring at the beginning or at the end of the name shall
// be removed, except trailing "_" (LOW LINE) characters resulted from converting target
// namespace values (to be used as TTCN-3 module names);
module Pos_050202_name_conversion_rules_024 {
import from schema_Pos_050202_name_conversion_rules_024 language "XSD" all;
import from schema_Pos_050202_name_conversion_rules_024_ language "XSD" all;
template schema_Pos_050202_name_conversion_rules_024_.Test m_msg := "abc";
//#TC
}
05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_024/Pos_050202_name_conversion_rules_024.xml
0 → 100644
View file @
78eda58b
<?xml version="1.0" encoding="utf-8"?>
<ns:Test
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:ns=
"schema:Pos_050202_name_conversion_rules_024/"
>
abc
</ns:Test>
\ No newline at end of file
05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_024/Pos_050202_name_conversion_rules_024.xsd
0 → 100644
View file @
78eda58b
<?xml version="1.0" encoding="UTF-8"?>
<schema
xmlns=
"http://www.w3.org/2001/XMLSchema"
targetNamespace=
"schema:Pos_050202_name_conversion_rules_024"
xmlns:ns=
"schema:Pos_050202_name_conversion_rules_024"
>
<element
name=
"Test"
type=
"integer"
/>
</schema>
05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_024/Pos_050202_name_conversion_rules_024_1.xsd
0 → 100644
View file @
78eda58b
<?xml version="1.0" encoding="UTF-8"?>
<schema
xmlns=
"http://www.w3.org/2001/XMLSchema"
targetNamespace=
"schema:Pos_050202_name_conversion_rules_024/"
xmlns:ns=
"schema:Pos_050202_name_conversion_rules_024/"
>
<element
name=
"Test"
type=
"string"
/>
</schema>
05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_025/Pos_050202_name_conversion_rules_025.ttcn_
0 → 100644
View file @
78eda58b
/***************************************************
** @author STF 521
** @version 0.0.1
** @purpose 9:5.2.2, Resolving name conflict in module names (not ending with underline)
** @verdict pass accept, ttcn3verdict:pass
***************************************************/
// The following requirements are tested:
// Rule a: If the name being generated is the name of a TTCN-3 module and the character
// string generated by items a) to e) above is identical to an another, previously
// generated TTCN-3 module name, then a postfix shall be appended to the character
// string: the postfix shall consist of a "_" (LOW LINE) followed by the canonical
// lexical representation (see W3C XML Schema Part 2 [9], clause 2.3.1) of an integer,
// unless the name already finishes with a "_" (LOW LINE) character, in which case the
// postfix is an integer only. This integer shall be the least positive integer such
// that the new name is different from all previously generated TTCN 3 modules names
// and clashing definition name.
module Pos_050202_name_conversion_rules_025 {
import from schema_Pos_050202_name_conversion_rules_025 language "XSD" all;
import from schema_Pos_050202_name_conversion_rules_025_1 language "XSD" all;
template schema_Pos_050202_name_conversion_rules_025_1.Test m_msg := "abc";
//#TC
}
05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_025/Pos_050202_name_conversion_rules_025.xml
0 → 100644
View file @
78eda58b
<?xml version="1.0" encoding="utf-8"?>
<ns:Test
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:ns=
"schema:Pos-050202-name-conversion-rules-025"
>
abc
</ns:Test>
\ No newline at end of file
05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_025/Pos_050202_name_conversion_rules_025.xsd
0 → 100644
View file @
78eda58b
<?xml version="1.0" encoding="UTF-8"?>
<schema
xmlns=
"http://www.w3.org/2001/XMLSchema"
targetNamespace=
"schema:Pos_050202_name_conversion_rules_025"
xmlns:ns=
"schema:Pos_050202_name_conversion_rules_025"
>
<element
name=
"Test"
type=
"integer"
/>
</schema>
05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_025/Pos_050202_name_conversion_rules_025_1.xsd
0 → 100644
View file @
78eda58b
<?xml version="1.0" encoding="UTF-8"?>
<schema
xmlns=
"http://www.w3.org/2001/XMLSchema"
targetNamespace=
"schema:Pos-050202-name-conversion-rules-025"
xmlns:ns=
"schema:Pos-050202-name-conversion-rules-025"
>
<element
name=
"Test"
type=
"string"
/>
</schema>
06_built_in_data_types/0601_mapping_of_facets/060102_minlength/Neg_060102_minlength_001/Neg_060102_minlength_001.ttcn_
0 → 100644
View file @
78eda58b
/***************************************************
** @author STF 521
** @version 0.0.1
** @purpose 9:6.1.2, Verify that correct constraint is generated for the minLength facet
** @verdict pass reject
***************************************************/
module Neg_060102_minlength_001 {
import from schema_Neg_060102_minlength_001 language "XSD" all;
template Test m_msg := "a"; // minLength is 3 -> the string "a" shall be rejected
//#TC_Neg
}
06_built_in_data_types/0601_mapping_of_facets/060102_minlength/Neg_060102_minlength_001/Neg_060102_minlength_001.xsd
0 → 100644
View file @
78eda58b
<?xml version="1.0" encoding="UTF-8"?>
<schema
xmlns=
"http://www.w3.org/2001/XMLSchema"
targetNamespace=
"schema:Neg_060102_minlength_001"
xmlns:ns=
"schema:Neg_060102_minlength_001"
>
<element
name=
"test"
>
<simpleType>
<restriction
base=
"string"
>
<minLength
value=
"3"
/>
</restriction>
</simpleType>
</element>
</schema>
06_built_in_data_types/0601_mapping_of_facets/060102_minlength/Pos_060102_minlength_001/Pos_060102_minlength_001.ttcn_
0 → 100644
View file @
78eda58b
/***************************************************
** @author STF 521
** @version 0.0.1
** @purpose 9:6.1.2, Verify mapping of the minLength facet
** @verdict pass accept, ttcn3verdict:pass
***************************************************/
module Pos_060102_minlength_001 {
import from schema_Pos_060102_minlength_001 language "XSD" all;
template Test m_msg := "abc";
//#TC
}
06_built_in_data_types/0601_mapping_of_facets/060102_minlength/Pos_060102_minlength_001/Pos_060102_minlength_001.xml
0 → 100644
View file @
78eda58b
<?xml version="1.0" encoding="UTF-8"?>
<ns:test
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:ns=
"schema:Pos_060102_minlength_001"
>
abc
</ns:test>
06_built_in_data_types/0601_mapping_of_facets/060102_minlength/Pos_060102_minlength_001/Pos_060102_minlength_001.xsd
0 → 100644
View file @
78eda58b
<?xml version="1.0" encoding="UTF-8"?>
<schema
xmlns=
"http://www.w3.org/2001/XMLSchema"
targetNamespace=
"schema:Pos_060102_minlength_001"
xmlns:ns=
"schema:Pos_060102_minlength_001"
>
<element
name=
"test"
>
<simpleType>
<restriction
base=
"string"
>
<minLength
value=
"3"
/>
</restriction>
</simpleType>
</element>
</schema>
06_built_in_data_types/0601_mapping_of_facets/060103_maxlength/Neg_060103_maxlength_001/Neg_060103_maxlength_001.ttcn_
0 → 100644
View file @
78eda58b
/***************************************************
** @author STF 521
** @version 0.0.1
** @purpose 9:6.1.3, Verify that correct constraint is generated for the maxLength facet
** @verdict pass reject
***************************************************/
module Neg_060103_maxlength_001 {
import from schema_Neg_060103_maxlength_001 language "XSD" all;
template Test m_msg := "abcd"; // maxLength is 3 -> the string "abcd" shall be rejected
//#TC_Neg
}
06_built_in_data_types/0601_mapping_of_facets/060103_maxlength/Neg_060103_maxlength_001/Neg_060103_maxlength_001.xsd
0 → 100644
View file @
78eda58b
<?xml version="1.0" encoding="UTF-8"?>
<schema
xmlns=
"http://www.w3.org/2001/XMLSchema"
targetNamespace=
"schema:Neg_060103_maxlength_001"
xmlns:ns=
"schema:Neg_060103_maxlength_001"
>
<element
name=
"test"
>
<simpleType>
<restriction
base=
"string"
>
<maxLength
value=
"3"
/>
</restriction>
</simpleType>
</element>
</schema>
06_built_in_data_types/0601_mapping_of_facets/060103_maxlength/Pos_060103_maxlength_001/Pos_060103_maxlength_001.ttcn_
0 → 100644
View file @
78eda58b
/***************************************************
** @author STF 521
** @version 0.0.1
** @purpose 9:6.1.3, Verify mapping of the maxLength facet
** @verdict pass accept, ttcn3verdict:pass
***************************************************/
module Pos_060103_maxlength_001 {
import from schema_Pos_060103_maxlength_001 language "XSD" all;
template Test m_msg := "abc";
//#TC
}
06_built_in_data_types/0601_mapping_of_facets/060103_maxlength/Pos_060103_maxlength_001/Pos_060103_maxlength_001.xml
0 → 100644
View file @
78eda58b
<?xml version="1.0" encoding="UTF-8"?>
<ns:test
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:ns=
"schema:Pos_060103_maxlength_001"
>
abc
</ns:test>
06_built_in_data_types/0601_mapping_of_facets/060103_maxlength/Pos_060103_maxlength_001/Pos_060103_maxlength_001.xsd
0 → 100644
View file @
78eda58b
<?xml version="1.0" encoding="UTF-8"?>
<schema
xmlns=
"http://www.w3.org/2001/XMLSchema"
targetNamespace=
"schema:Pos_060103_maxlength_001"
xmlns:ns=
"schema:Pos_060103_maxlength_001"
>
<element
name=
"test"
>
<simpleType>
<restriction
base=
"string"
>
<maxLength
value=
"3"
/>
</restriction>
</simpleType>
</element>
</schema>
06_built_in_data_types/0601_mapping_of_facets/060104_pattern/Neg_060104_pattern_001/Neg_060104_pattern_001.ttcn_
0 → 100644
View file @
78eda58b
/***************************************************
** @author STF 521
** @version 0.0.1
** @purpose 9:6.1.4, Verify that correct constraint is generated for the pattern facet
** @verdict pass reject
***************************************************/
module Neg_060104_pattern_001 {
import from schema_Neg_060104_pattern_001 language "XSD" all;
template Test m_msg := "aUser@iNstitute"; // should fail as the pattern doesn't allow capital N
//#TC_Neg
}
06_built_in_data_types/0601_mapping_of_facets/060104_pattern/Neg_060104_pattern_001/Neg_060104_pattern_001.xsd
0 → 100644
View file @
78eda58b
<?xml version="1.0" encoding="UTF-8"?>
<schema
xmlns=
"http://www.w3.org/2001/XMLSchema"
targetNamespace=
"schema:Neg_060104_pattern_001"
xmlns:ns=
"schema:Neg_060104_pattern_001"
>
<element
name=
"test"
>
<simpleType>
<restriction
base=
"string"
>
<pattern
value=
"(aUser|anotherUser)@(i|I)nstitute"
/>
</restriction>
</simpleType>
</element>
</schema>
Prev
1
2
3
4
5
…
8
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment